diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-30 17:35:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-30 17:35:06 -0300 |
| commit | 6d8da8721141284cf33bb901168b26135893eb86 (patch) | |
| tree | 791d63401d4e85fbca1d597a8ce0326e70efd545 /docs | |
| parent | efd43a3a2cf03bb741366331158b368abf9ac583 (diff) | |
| parent | bf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff) | |
| download | pardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz pardes-6d8da8721141284cf33bb901168b26135893eb86.zip | |
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
Diffstat (limited to 'docs')
192 files changed, 12352 insertions, 5397 deletions
diff --git a/docs/9p.typ b/docs/9p.typ deleted file mode 100644 index 50cec965..00000000 --- a/docs/9p.typ +++ /dev/null @@ -1,702 +0,0 @@ -// Second draft. The first is superseded; what changed and why is recorded -// entry by entry in `docs/registry.typ`, and every §-to-entry link below is -// live. Build: typst compile docs/9p.typ docs/9p.pdf -#let app = "PaRDeS" - -#set page( - paper: "us-letter", - margin: (x: 1.5in, y: 1.2in), - numbering: "1", - number-align: center, -) -#set text(font: "Libertinus Serif", size: 11pt, lang: "en") -#set par(justify: true, leading: 0.62em, first-line-indent: 1.5em) -#show raw: set text(font: "DejaVu Sans Mono", size: 8.5pt) -#show raw.where(block: true): block.with(inset: (left: 1.5em, y: 0.4em), width: 100%) -#set table(stroke: none, inset: 0.35em) - -#set heading(numbering: "1.") -#show heading: it => { - set text(size: 11pt, weight: "bold") - v(1.1em, weak: true) - block(counter(heading).display() + h(0.6em) + it.body) - v(0.4em, weak: true) -} -#show heading.where(level: 1): it => { - set text(size: 11pt, weight: "bold") - v(1.4em, weak: true) - block(counter(heading).display() + h(0.6em) + it.body) - v(0.5em, weak: true) -} - -/// A registry cross-reference. Every contestable claim in this note is an -/// entry over there, with its evidence and its losing arguments attached. -#let r(id) = text(size: 9pt)[#raw(id)] - -#align(center)[ - #v(0.5em) - #text(size: 15pt)[A File Interface for an Editor and Terminal Multiplexer] - #v(0.9em) - #text(size: 10.5pt, style: "italic")[architecture draft, second revision] - #v(0.4em) - #text(size: 10pt)[#datetime.today().display("[year]-[month]-[day]")] -] - -#v(1.2em) - -*Historical proposal, superseded by `docs/fs.md`.* Pardes now serves 9P by -default over Unix sockets, with optional TCP and QUIC. FUSE support and the -old examples have been removed. The arguments and source references below -describe the earlier implementation, not the current interface. - -#block(inset: (x: 2.5em))[ - #set text(size: 10pt) - #set par(first-line-indent: 0em) - #text(weight: "bold")[ABSTRACT] #h(0.8em) - #app is an editor with attached terminals. It runs as a daemon; clients attach - to it. It already serves acme's control filesystem, over FUSE, on Linux only. - This note adds 9P as that filesystem's second transport, and as a carrier for - the display protocol it already has. The program becomes a file server that - needs no kernel, so the tree reaches macOS, a browser tab, a microcontroller - and another machine, none of which FUSE can reach. The same program is also a - 9P client, which is how it edits a file on a board it cannot mount. We - describe the interface, what it costs — measured against two shipping - implementations rather than estimated — and, at greater length, the parts we - do not build. The first draft of this note proposed replacing FUSE and - replacing the wire protocol. Both are wrong, for reasons that turn out to be - cheap to state and expensive to discover. -] - -= What this is for - -One sentence, because every other section is downstream of it. - -*PaRDeS has no way to ask anything a question.* It can ask the kernel, and that -is all. Two running instances can do exactly two things to each other: shout — -`nested.sendLook` formats one line, connects, writes, returns, and never reads, -and its own test asserts that nothing comes back — or *become*, which is what -`Attach` does, and `Attach` is not a connection but a replacement: on a -successful handshake the frontend reaps its pane shells, closes its watches, -unmounts its filesystem, deinitialises the core, and turns into a thin client of -somebody else's. Nothing in the tree reads `PARDES_FS`. `Event` has no variant -for a peer. The 21-method host vtable has no peer method. Reading another -session's text is possible only by shelling out to `cat` a path derived from a -pid you must already know, on Linux, if that session was started with `--fs` — -and impossible against a detached session, which serves no filesystem at all. - -9P is a request/response protocol that crosses machines. That property is the -one thing none of the three private mechanisms can be extended to have, and -every item on the wanted list is the same feature wearing different clothes: -scripting from macOS, driving a session over a network, reading the board's -memory, chaining one instance to another without destroying either. All of it -is *being able to ask, and get an answer back*. - -That is the justification, and it is the only one. In particular it is not -simplification: §12 puts the honest figure at between 750 and 1,050 lines of -net growth, and the measurement is in the registry, not in a hope. What does -fall is the number of ideas — four framings become two, three schemes for -"which instance?" become two, two version negotiations become one, and six -concepts currently duplicated across 799 lines become one copy each. Fewer -ideas, more lines. Anyone selling this as "simpler" has not counted. - -= What changed, and why this draft exists - -The first draft argued that 9P should replace two things: the FUSE mount, and -the private protocol on the daemon's socket. Neither survives contact with the -sources. - -It cannot replace the mount. Linux grades mount privilege by a per-filesystem -flag, and 9P and FUSE are on opposite sides of it. `mount_capable` falls back to -`capable(CAP_SYS_ADMIN)` — root in the *initial* namespace — for any filesystem -that does not set `FS_USERNS_MOUNT`; FUSE sets it, v9fs does not. So -`mount -t 9p` costs real root, a user namespace does not help, and `trans=fd` -does not help because the syscall is checked before the transport is consulted. -The 281 lines in `src/fuse.zig` that fork a setuid helper and receive a -descriptor over `SCM_RIGHTS` are not overhead; they buy an unprivileged -pathname, which 9P cannot buy at any price on Linux. The usual escape, `9pfuse`, -is FUSE again in someone else's process — which is exactly what `ad`, the one -editor that already took this route, ships #cite(<ad>). #r("9P-13") - -It cannot replace the wire either, because the wire's payload is a compressed -cell grid and 9P has no server-initiated message. But the interesting half of -that finding is that 9P *can carry* the wire unchanged, and that this is how -remote display has actually shipped for thirty years #cite(<devdraw>). #r("9P-12") - -What is left is better than what was proposed, and smaller. - -= Two layers - -The first draft's mistakes are almost all one layer's property asserted about -the other, so the layers are worth naming before anything else. - -*Layer 1 is the control tree.* Request and response, nine operations, a pure -transaction over the core: `handle(p, req) Reply` in `src/acmefs.zig`, whose ABI -already records that "FUSE opcodes, 9P messages and a unit test all reduce to -these". It is transport-neutral today and unit-tested with no transport at all. - -*Layer 2 is the display protocol.* Nineteen message tags in -`src/detached/wire.zig` carrying run-length-encoded cell grids and input, one -message per frame, pushed by the server to N frontends that share one screen. - -They share a machine and nothing else. The tree is not private and not -undocumented — it is acme(4) #cite(<acme>). The wire is both, and deliberately: -it is a codec, and its cost is measured at seven lines per new fact, which is -cheap for what it does. - -9P is Layer 1's second transport and Layer 2's carrier. It is never a -re-encoding of either. #r("9P-1") - -= The interface - -A session is a tree. Windows are numbered directories under it. - -``` -/ - ctl session control; read lists windows - index one line per window: id, tag, flags - new/ walking here creates a window - 7/ - ctl commands in; id and state out - tag the tag line - body the text - addr an address - data read and write at addr - event the interesting one; see below - errors writes appear in the error window - pty/ - data the stream - ctl winsize, raw, cooked, sig, exec - status dimensions, mode, exit status -``` - -This is acme's tree plus `pty/`, minus the plan9 compatibility stubs. Four -conventions matter, and the first draft got three of them wrong. - -*Offsets are honoured everywhere they mean something.* `body`, `tag`, `addr`, -`ctl`, `index` and `rdsel` are seekable files and are read at the offset the -message carries. acme does the same, and its entire byte-to-rune cache exists to -serve a non-zero offset on `body`. Only `data` and `event` ignore offsets, and -only because they are positioned by `addr` and by the queue respectively. All -writes ignore offsets: a write to `body` appends, which acme(4) specifies. A -server that ignored offsets on `body` would make `cat`, `wc`, `diff` and `tail` -return the first chunk forever, which is the opposite of the whole point. - -*Directory reads carry a cookie, not an index.* 9P requires a directory read at -offset zero or at exactly the byte offset where the previous read ended, and the -reply must contain whole `stat` entries; anything else is `Ebadoffset`. The core -counts entries, so the transport keeps a per-fid byte cursor and the one entry -that did not fit. This is the only genuine offset discontinuity between FUSE and -9P, and it is about forty lines. #r("9P-5") - -*The address belongs to the window.* The first draft claimed per-fid and -attributed it to acme; acme keeps `Range addr` in `struct Window`, #app keeps it -per pane, and `ad` keeps it per buffer. Per-fid is a real improvement — two -scripts could then address one window without colliding — but it is a proposal, -not a restatement, and it is the only thing in this note that asks the core to -grow state. It is argued on its own merits or not at all. #r("9P-6") - -*`event` is opened by a client, not by a fid.* One controller per window is -right; enforcing it per fid is not, because a client that opens the file twice -is not two controllers. `ad` reaches the same conclusion and scopes `QTEXCL` to -a connection. #r("9P-7") - -= Events - -A window handles its own mouse and keyboard until a program opens `event`. From -then on it ships them out: origin, action, the character range, the text. The -program reads a record, decides, and writes it back to accept it; or handles it -itself and stays silent. - -This is the whole extension mechanism and it already works — `examples/acmefs/` -has four programs that use it, one of which puts words #app has never heard of -into a tag and makes them execute. There are no callbacks and no plugin API. A -program that wants to redefine what the right button does opens a file and reads -it. - -A read blocks. The core does not: it answers `again` — nothing consumed, ask me -later — and the transport holds the request. That inversion is what lets a -single-threaded core serve a filesystem at all, and it is worth stating plainly -because the prior art does not have it. `ad` spends three to four threads per -connection and then serialises all of them behind one mutex and a blocking -round trip into the editor thread. #app answers a blocked `event` read in -twenty-one nanoseconds and allocates nothing. - -= Terminals - -A pty is a file interface wearing the wrong clothes. Everything one wants to do -to it is an `ioctl`, and 9P has none in any dialect. They become writes to -`pty/ctl`: - -#v(0.3em) -#align(center)[ - #set text(size: 9.5pt) - #table( - columns: 2, - align: left, - column-gutter: 2em, - row-gutter: 0.3em, - [`TIOCSWINSZ`], [`winsize 80 24`], - [`TCSETS`], [`raw`, `cooked`, `echo off`], - [`kill`], [`sig INT`], - [`TIOCGWINSZ`], [read `status`], - [spawn], [`exec /bin/sh`], - ) -] -#v(0.3em) - -`pty/data` is the stream. A write is input to the process; a read blocks until -there is output. On exit a read returns zero bytes rather than an error, because -clients already know what end of file means. - -Two things about this section that the first draft did not say. It has *nothing -to do with 9P*: `push_spawn` and `push_pty_resize` are effects the core already -has, so `exec` and `winsize` are existing capabilities acquiring a name, and -`sig INT` is the only new one. Build it in the FUSE tree first and the 9P -transport inherits it. And it has *no prior art anywhere*: acme has no pty -files, `ad` has no terminal surface at all. Being first is a reason to keep it -to three files and stop. #r("9P-8") - -Every keystroke in raw mode is a round trip. On a local socket this does not -matter. Over a slow link it matters a great deal, which is why Plan 9's terminal -programs do line editing locally and send whole lines. Raw mode should be -entered deliberately and left promptly. - -= Layering: how 9P and the wire meet - -Six arrangements were costed. The finding that decides it is that the cost is -almost the same in all of them: a base-9P2000 codec, a dispatcher onto the -existing nine operations, and a fid table come to roughly 970 lines that appear -in every option. Layering moves about 150 lines either way. So this is not a -cost question. It is a question of reach. - -#v(0.3em) -#align(center)[ - #set text(size: 9pt) - #table( - columns: (auto, auto, auto, 1fr), - align: (left, right, right, left), - stroke: (y: 0.4pt), - table.header([], [msgs/frame], [msgs/key], [what decides it]), - [O1 9P replaces all], [2], [4], [64 park slots needed against 32; a round trip per frame], - [O2 two listeners], [1], [2], [no routing origin for the 9P descriptor], - [O3 9P inside the wire], [1], [2], [*works over the board's UART unchanged*], - [O4 wire inside 9P], [2], [4], [+34 B on a 56 B diff, or +61%], - [O5 side by side], [1], [2], [cheapest, but cannot reach the board], - [O6 frontend serves], [2], [4], [core would write and match tags inside `update`], - ) -] -#v(0.3em) - -That table is superseded, and the correction is the most important thing in -this note. It was written believing 9P has no way to push a frame, so every -arrangement that carried frames over 9P paid a round trip. The premise is -wrong — not because 9P can push, but because *the pushing end should be the -client.* - -Plan 9 has shipped this for thirty years and it needs no invention. `drawterm` -dials out to a cpu server, writes a shell script, and then calls -`exportfs(fd, fd)`: the dialer becomes the *server* on the socket it dialed. -The script the remote runs is `mount -nc /fd/0 /mnt/term`, and the remote is -the *client*. When the remote application draws, the bytes cross as the -application's `Twrite` to `/dev/draw/N/data`, and the terminal — the machine -with the screen — executes them. One descriptor, roles fixed per side, data -flowing both ways, no server-initiated message anywhere. - -So the rule is one role per connection, not one role per message: - -#v(0.3em) -#align(center)[ - #set text(size: 9.5pt) - #table( - columns: (auto, auto, 1fr), - align: (left, left, left), - column-gutter: 1.2em, - row-gutter: 0.3em, - [*display*], [frontend serves], [core `Twrite`s frames to `screen`, blocking-`Tread`s `input`], - [*session*], [core serves], [scripts and other instances walk `7/body`, `event`, `ctl`], - [*devices*], [board serves], [core reads `mem/`, `gpio/`, `prof`], - ) -] -#v(0.3em) - -Three connections, one role each; the program contains both halves and uses -whichever the link calls for. Do *not* build a link that carries both roles at -once. 9P permits it — T-messages are even and R-messages odd, so a stream is -self-demuxing — but nothing has ever done it, and it buys a `Tversion` ordering -hazard in which each side must answer the peer's version while awaiting its -own. - -Two numbers make the display path credible. Chunking is a non-issue: payload -per message is 131,072 bytes at Linux's default, so every real frame — 20 B, a -56 B keystroke diff, a 6,298 B full board frame, a 27 KB desktop frame — is one -`Twrite`, and the 1.7 MB worst case is thirteen. And the core need not block: -tags are allocated per outstanding request with no in-order reply requirement, -which is why `exportfs` can answer out of order at all. Where `exportfs` needs -a slave process per blocked request, PaRDeS needs none — `Status.again` and the -park table are the same thing done single-threaded. - -Copy the file discipline rather than inventing one: `/dev/draw/N/data` is a -write-only batched binary command stream with an exclusive `ctl`, and -`/dev/mouse` is an exclusive single-reader file whose read blocks until -something happens. That is `screen` and `input` already designed, and it is the -shape `event` already has. - -Frames are never re-represented. Whatever carries them carries `encodeFrame` -bytes; the existing five-byte length prefix already makes such a message a legal -9P payload. The counter-example is worth keeping in view: Plan 9's `/dev/screen` -is an offset-addressed raster a client polls, with no change notification, which -is precisely why nobody ever ran a remote rio through it. - -One scope limit, measured and not negotiable. This applies to *remote* displays -only. Turning the local host vtable into a tree costs every shell more than it -saves — tty and gui about +204 lines each, macOS +164, and the web shell +142 -lines of Zig plus roughly 500 of JavaScript, because its `present` today writes -a flat cell array that JavaScript reads straight out of wasm memory and 9P would -make that an RLE stream needing a decoder and a codec. The board is worse in -kind: its host is the same process behind a function pointer, so a message pair -per frame is overhead against a direct call. `host.VTable` is already the -abstraction — the design document says the surface *is* the abstraction and -refuses a layer over the shells — so a 9P host is one more implementation of -that vtable, chosen when the display is on the other end of a wire, and never -for the window in front of you. #r("9P-19") #r("9P-23") - -= The client half - -The same program is a 9P client. This is not symmetry for its own sake: it is -how one instance shows another instance's windows, and how it edits a file on a -machine it cannot mount. - -The client half needs no mount, and after §1 that is no longer one advantage -among several — it is the whole of what 9P buys that we cannot otherwise have. -To edit a file on the board, #app walks to `board/fs/etc/config`, opens, reads, -edits in a buffer, writes, and clunks. There is no path on the local machine, no -kernel involvement, and no privilege. That works on macOS, which has no 9P in -the kernel and no control filesystem at all today; it works in a browser tab, -which has no filesystem at all; it works on the board, which has no sockets; and -it works when the operator is not root, which on Linux is now the interesting -case. - -A mount is still worth offering, because `grep`, `make` and the compiler take -filenames and a filename is the one thing a client library cannot produce. But -on Linux that mount is `src/fuse.zig`, which we keep, or it is `9pfuse`, which -is `src/fuse.zig` written by someone else. It is not `mount -t 9p` unless the -operator is root and chooses to be. - -= The board - -The microcontroller is the case that motivated this note, and both the first -draft and its review were wrong about it in opposite directions. - -The first draft said the board runs "a 9P server and nothing else". It runs the -whole editor, as firmware, with two of twenty-one host methods filled. The -review said a 9P server would not fit, quoting nine kilobytes of free heap. That -number is two refactors stale: since the shadow grids were reduced to one cell, -the heap reports around 336 KB free and the binding constraint moved to the -240 KiB of low memory that holds `.bss`. #r("FIX-2") - -Costed from real components, a 9P server on this board is: - -#v(0.3em) -#align(center)[ - #set text(size: 9.5pt) - #table( - columns: (auto, auto, 1fr), - align: (left, right, left), - column-gutter: 1.2em, - row-gutter: 0.3em, - [two `msize` buffers], [8,192 B], [u9fs uses three; a minimal server needs two], - [fid table, fixed array], [512 B], [32 entries × 16 B, linear scan ≈0.4 µs], - [codec scratch], [128 B], [one `stat`, `ERRMAX`], - [#text(weight: "bold")[RAM total]], [#text(weight: "bold")[8,832 B]], [2.5% of free heap], - [flash, 9P-only image], [≈39 KiB], [2.5% of a 1.5 MB partition], - ) -] -#v(0.3em) - -The 4,096-byte floor that sizes those buffers is imposed by the Linux kernel and -by nothing else; Plan 9, plan9port and #app's own client all accept a -512-byte `msize`, which would halve them. And a 4,096-byte reassembly buffer -already exists on this exact serial line, with the property measured: that much -in a single write arrives intact. - -So it fits, easily. What does not work is having it both ways: the editor owns -the one UART bidirectionally and the board's header exposes no second one, so a -9P server on the P4 is a *second firmware image*, not a second role for this -one. The build already expresses that shape — the on-die test suite is a -separate executable with its own image and flash steps in fifty-four lines, and -it links no editor object. The board is an editor or a filesystem, and saying so -is better than implying both. #r("9P-11") - -Before quoting any latency for it, raise the console to 921600 baud. It is one -divider write on the existing crystal, the routine already exists, and it takes -a warm read of a small file from 10.8 ms to 1.35 ms. #r("BOARD-1") - -The tree such an image would serve is not invented. The board already exposes -its whole address space, its pin header and one pad toggle — as *acme words a -human types into a tag*, capped at four kilobytes per command because of the -console, with the answer landing in an output pane. Nothing about it is -machine-readable and nothing is remote. `mem/`, `gpio/pinout` and `prof` are -backed by functions that exist today; four more files need one new exported -symbol each; four have no implementation at all. A 9P tree is that capability -with names instead of verbs, and the inventory above is the honest scope. - -= What we do not build - -The temptation in this design is to keep going. Each of the following was -considered and declined. - -*A window system.* #app draws in one window. Panes are ours; surfaces are not. -Becoming a Wayland compositor would buy the ability to put someone else's -program in a pane, and cost input handling, buffer management, output hotplug, -scaling, clipboard, and a permanent maintenance obligation against a moving -protocol. We do not want someone else's program in a pane. - -*A namespace.* Per-process namespaces, union directories, `bind`, and walks that -cross mount points are what make Plan 9's implementation large #cite(<plan9>). -The distinction is worth defending, because the first union directory brings the -rest. - -*An aggregate.* The first draft's longest technical section described a prefix -router that re-exports attached instances, and its own final section concluded -the aggregate is not worth building before a second machine exists. That verdict -is right and also covers the client half of it. It also understates the work: a -proxied `Twalk` cannot be answered until the remote `Rwalk` arrives, and the -core may not block, so it is not a fid map — it is per-tag continuations, tag -remapping, flush forwarding and fid invalidation on connection death, in a -daemon that is one `poll(2)` with no worker pool. Deferred with a named -precondition rather than described as easy. #r("9P-10") - -*A file server.* Where a host's files must be exported, we run `u9fs` or `diod` -and attach as a client #cite(<u9fs>). Real filesystems are where the difficulty -in 9P actually lives: stable qids, `..` clamped at the export root, symlinks -that escape, identity mapping, and the full `wstat` surface. Our own trees are -synthetic, so we invent every file and there are no cases we did not choose. -Note that `u9fs` serves its requests from a strictly serial loop and its flush -handler is a `break`, so it is a reference for the tree and not for §10. - -*Authentication.* Not now, and not by us. The Unix socket is protected by the -permissions on the socket. Where a network is involved, the connection is -tunnelled. Linux's client never sends `Tauth` at all, and Plan 9's `mount` only -does so without `-N`, so a server that refuses it is not an obstacle to either. -Real authentication is `Tauth` or TLS, and it can be added without changing the -tree. - -= Protocol notes - -We serve base 9P2000 #cite(<intro5>). Plan 9 mounts it natively, plan9port's -`9p` speaks it, and Linux mounts it with `version=9p2000` #cite(<v9fs>). The -following are the traps, in the order they will bite. Each is cheap once known -and each has been shipped wrongly by someone. - -*Set `qid.version` to zero on every file.* This is the 9P equivalent of FUSE's -`FOPEN_DIRECT_IO` and it is server-side, not advice to the operator: Linux's -client disables both read and write caching for any file whose qid version is -zero, whatever the cache mode, unless `ignoreqv` is passed explicitly. A -synthetic tree of live editor state has no business being cached, and this is -how we say so. The first draft's "mount with `cache=none`" was unnecessary; its -claim that the default message size is small was simply wrong, since the default -is 128 KiB and the cap is 1 MB. #r("9P-3") - -*Clamp every reply to the client's `count`.* An `Rread` longer than the count -asked for is a hard `EIO` in the Linux client, not a truncation. This has no -FUSE analogue, which is why nobody looks for it, and `ad` gets it wrong on -exactly the file we care about. The existing rule that a read too small for one -event record is refused rather than split is what makes the clamp safe on -`event`. #r("9P-17") - -*Decide the error ABI deliberately.* `Rerror` in base 9P2000 is a string, and -Linux recovers an errno by exact match against a fixed table; a miss is not -`EIO` but `ESERVERFAULT`, which userspace prints as "Unknown error 526". `ad` -emits nineteen prose strings and not one of them is in that table. Either emit -the exact strings Linux knows, or serve 9P2000.u and send the number. The second -also restores `statfs`, which base 9P2000 does not have and which the core's -operation set includes. #r("9P-4") - -*`Tflush` is a park-table lookup.* The common failure is not omitting it — it is -implementing the message and still hanging, which is what `ad` does: correct -`Rflush` ordering in thirty-nine lines, and a filesystem hook that defaults to -doing nothing. #app is structurally better placed than either reference, because -the thirty-two-slot park table is already keyed per outstanding request and -already answers `FUSE_INTERRUPT` the same way. Implement flush against the -table, not against a callback, and the bug is unrepresentable. #r("9P-16") - -*Serve requests concurrently.* Several tags may be outstanding on one connection -and `event` reads block by design. This does not require threads: it requires -that a blocked request be parked rather than waited on, which is what the core's -`again` already means. - -= Cost, and the order to build in - -The honest figure is 1,600 to 1,900 lines of server plus around 500 of tests. -This is measured, not estimated: `ad`'s 9P2000 server core is 2,321 lines -(codec 704, stat and mode 437, session and fid and flush 615, loop and handlers -474) and `u9fs` is 1,838 with an 805-line codec. Two independent -implementations agree on codec ≈750 and server logic ≈1,700. Roughly 970 of -those lines are identical under every layering, so none of the estimate is at -risk from §6. #r("9P-15") - -What comes off against it has now been counted too, and it is less than hoped. -Six concepts are genuinely duplicated across the existing mechanisms — -endpoint-path derivation in six copies, directory create-and-vet in six, stale -sweeping in three, bind/listen/accept in three, "which instance?" in three, and -version negotiation in two — 799 lines in total, of which about 330 collapses -to one copy. Add `nested.zig`'s socket half and its socket tests, 518 more, and -the deletion is *≈850 lines*. What cannot be deleted is ≈7,700: `src/fuse.zig` -by §1, `wire.zig` because frames stay frames, the daemon's host half, the -158-line ancestor walk that answers a question 9P has no message for, and every -kernel interface that was never a protocol choice — inotify, the pty, the -subprocess pipes, `mkstemp`. - -*Net: between 750 and 1,050 lines of growth.* It breaks the house rule that a -change leaves the file it touches no longer than it found it, §1 forbids -retiring `src/fuse.zig` in exchange, and there is no arithmetic that rescues -it. The growth is justified by reach and by §0's reply, or it is not justified. - -One cost is still unpriced and should be before any code is written. `wire.zig` -chooses every protocol tag in one file so that reordering a core enum is a -compile error, and a test asserts that exactly eleven client tags exist and that -the other 250 bytes are refused, so a frontend built before a change cannot -forge a pane's output into a session built after it. 9P's codec validates 9P; it -cannot validate that a byte string is a legal keystroke. An exhaustive switch -checked by the compiler becomes a runtime string parse with nothing to bind to. -The likely answer is to generate the `ctl` grammar from the same enum so the -compile error survives as a parser generator, but nobody has tried it. -#r("9P-20") #r("9P-21") - -The order matters more than the total. Each step is stated with what it is, -where it lands, what becomes possible that was not, and how you know it worked. -Steps 1 to 3 are independent of each other and of 9P; step 4 needs step 2; -step 6 needs step 5. Any prefix of this list is a reasonable place to stop. - -== Step 1 — let a detached session be scripted - -A daemon started with `--detach=work` holds the core, and today it serves no -control filesystem at all: `src/detached/server.zig:566-570` records that it has -no `push_fs_reply` "because this process mounted no /dev/fuse". It simply never -calls `fs_service.start`. Nothing prevents it. - -The change is a `Source.fuse` variant in the poll union, an `fs` field, the -`fs_service.start` call, `fsReply` copied verbatim from `src/tty/tty.zig`, one -vtable entry, a pollfd and its dispatch arm, and the `drain` call. About sixteen -lines. It is *better* in the daemon than in the desktop hosts: those need a -background thread to notice a request, and the daemon's own `poll(2)` already -watches everything, so it can watch `/dev/fuse` too and the thread disappears. - -After: `pardes --detach=work` and then `ls $XDG_RUNTIME_DIR/pardes/<pid>/` works, -and every script in `examples/acmefs/` drives a daemon it previously could not -see. Proof is those four programs and the existing filesystem snapshots, run -against a detached session instead of a local one. #r("9P-14") - -== Step 2 — name the transport seam - -`fs_service.drain` and `step` take a `*fuse.Fs`, but they only ever call three -methods on it: `retry()`, `next()` and `reply()`. Replace the concrete pointer -with a context pointer and a three-function vtable, at the three call sites in -`tty.zig` and `gui.zig`. Forty lines changed, none added, `fuse.Fs` is the first -implementor, and nothing observable changes. - -This is the whole preparation for a second transport, and it is worth doing on -its own merits: if 9P is never written, the seam is documented in code rather -than in a comment. #r("9P-2") - -== Step 3 — make terminals scriptable - -Add `pty/data`, `pty/ctl` and `pty/status` to each pane's directory in -`src/acmefs.zig`, with `ctl` taking `winsize 80 24`, `raw`, `cooked`, -`echo off`, `sig INT` and `exec /bin/sh`. - -Today a script can write into a terminal that already exists and read its -rendered scrollback, and that is all — it cannot start one, resize one, or -signal one. Two of those are free: `push_spawn` and `push_pty_resize` are -already effects the core emits (`src/host.zig:80-82`), so `exec` and `winsize` -are existing capabilities acquiring a name. Only `sig INT` is new work; there is -no `kill` anywhere in `host_io.zig`. - -This has nothing to do with 9P. It lands in the FUSE tree, works immediately, -and any later transport inherits it. Keep it to three files: acme has no pty -files and neither does `ad`, so there is no prior art to be wrong about, which -is a reason for restraint rather than ambition. #r("9P-8") - -== Step 4 — serve the existing tree over 9P - -A new `src/ninep.zig`: base 9P2000 over a unix socket, serving exactly the tree -`src/acmefs.zig` already defines. No client, no aggregation, no `aname`, and no -new files — step 3 already added the only ones wanted. - -Implement `Tversion`, `Tattach`, `Twalk`, `Topen`, `Tread`, `Twrite`, `Tclunk`, -`Tstat`, `Twstat` and `Tflush`, and answer `Rerror` to `Tauth`, `Tcreate` and -`Tremove`. Lift the park table and its `retry`/`take`/`freeSlot`/`findSlot` -helpers out of `src/fuse.zig` unchanged — `Status.again` means the same thing to -both transports. What is genuinely new is the codec, the fid table, a per-fid -directory cursor, and `stat` marshalling. Every trap in §11 applies here and -nowhere else. - -After: macOS and the browser have a control filesystem for the first time, and a -script on another machine can drive a session over TCP. On Linux the FUSE mount -stays, because `mount -t 9p` needs root and `fusermount3` does not — the two are -complementary, not competing. Proof is the existing snapshots run through the -9P transport unchanged, and `examples/acmefs/` run through `9pfuse`. #r("9P-15") - -== Step 5 — become a 9P client - -The other half, and the one that moved up the list, because it is the mechanism -for everything the note is for. A server lets pardes be *talked to*; a client is -how pardes *asks*. - -It is a state machine over a byte stream — walk, open, read, write, clunk — with -no kernel, no mount and no privilege, and the protocol layer is freestanding-safe: -no allocator, no threads, no sockets, so it runs on the board's UART and in the -browser as readily as on a socket. - -After: `Look board/fs/etc/config` opens a file that lives on the microcontroller, -in a pane, with no mount anywhere. And `Attach` gains the sibling it has always -needed — one that *connects* instead of replacing. Today `Attach` deinitialises -the local core and turns the process into a thin frontend; the new word leaves -both cores alive and lets each walk the other's tree. That is the "chaining" -that is currently impossible. #r("9P-22") - -== Step 6 — let a remote display serve the core - -A frontend exports `screen`, `input`, `snarf` and `ctl`; the core dials it and -becomes its client, writing frames to `screen` and taking a blocking read on -`input`. This is `drawterm` exactly, and the file discipline should be copied -rather than invented: a write-only batched command stream with an exclusive -`ctl`, and an exclusive single-reader input file whose read blocks. - -The frame bytes are `encodeFrame` output verbatim — the codec does not change, -only what carries it. *Remote displays only.* The window in front of you keeps -the direct vtable call, because a tree costs every local shell more than it -saves. - -What this actually unlocks: the ESP32-P4 stops being a shrunken pardes — an -809 KB image running a subset of the editor in 384 KB of RAM — and becomes a -terminal for a full core running on the workstation. Roughly 39 KB of firmware, -and it gains language servers, tree-sitter and PDF because those now run -somewhere that can afford them. Raise the console to 921600 baud first, or every -measurement will be eight times worse than it needs to be. #r("9P-19") #r("BOARD-1") - -= Status - -The tree, the event protocol, the pty control language and the layering are -settled enough to implement, and the registry holds the arguments that settled -them. Three questions remain genuinely open: whether the address becomes a -per-fid property and the core grows state to hold it #r("9P-6"); which error ABI -we adopt #r("9P-4"); and whether the parked second core on the board could own a -9P server so the board need not choose between being an editor and being a -filesystem #r("9P-11"). - -Steps one through three are worth doing whatever the answer to the rest is, -which is the best property this plan has. - -#v(1.5em) -#line(length: 30%, stroke: 0.5pt) -#v(0.5em) - -#set text(size: 9.5pt) -#set par(first-line-indent: 0em) - -#bibliography( - title: none, - full: false, - ("refs.yml"), -) diff --git a/docs/cloud9.md b/docs/cloud9.md deleted file mode 100644 index d5acc37c..00000000 --- a/docs/cloud9.md +++ /dev/null @@ -1,36 +0,0 @@ -# cloud9 integration - -The published `cloud9` package owns the base 9P2000 wire format, client and server -connections, and TCP/Unix/QUIC transports. `build.zig.zon` pins a commit from -`[email protected]:~gbrls/cloud9`, so `zig build` fetches it into `zig-pkg/` like every -other dependency; no sibling checkout is required. Re-pin with -`zig fetch --save=cloud9 git+https://git.sr.ht/~gbrls/cloud9#<commit>`, and swap in -`.cloud9 = .{ .path = "../cloud9" }` while editing both packages at once. - -The file-server engine (fids, jobs, parking, flush, hangup) is cloud9's -`fs.Server`; the control tree in `src/ninep/` is its backend, using cloud9's -`fs.Req`, `fs.Op`, `fs.Status`, `fs.E` and `fs.ReplyWith` (extended with the -editor's reply payload locator). `src/9p.zig` names the editor's and the -board's `fs.Options` and re-exports the wire names the transports use. -Mounting, Unix namespace discovery and permissions, the editor event loop, -connection limits, and exported tree policy remain here. The Unix and TCP -listeners run on cloud9's `serve.Runner` (`std.Io`: an accept task per -listener, a reader and a writer task per connection, four slots); its handler -queues every backend request for the editor's thread, which answers them all -in `Listener.tick` after each editor update, retries parked reads there, and -has the runner ship the replies. `src/9p_quic.zig` selects the existing -`pardes-9p` ALPN for cloud9's optional OpenSSL transport; QUIC still runs on -the poll loop in `src/9p_io.zig`, since cloud9's QUIC adapter is -nonblocking-descriptor based rather than `std.Io` based. -The standalone protocol/GPIO tests import the same module. The separate -`05-zig-p4` build also supplies cloud9 for the GPIO firmware entry. - -Run `zig build 9p-test` for the engine configurations and -`zig build 9p-io-test -Dquic=true` for native transport/client integration. Run cloud9's `zig build test`, -`transport-test`, `quic-test -Dquic=true`, `fuzz`, and `differential` steps for the -shared implementation. See cloud9's `docs/validation.md` for recorded runs and -known test-environment limits. - -Invalid framing now terminates a server connection. Cloud9 also checks reply -counts and reserves tags until flush completion. Client metadata is slightly -larger to track those reservations, and its bounds tests reflect that fixed cost. diff --git a/docs/config.md b/docs/config.md deleted file mode 100644 index a229830b..00000000 --- a/docs/config.md +++ /dev/null @@ -1,570 +0,0 @@ -# Startup configuration - -Native pardes builds use a per-user `pardes` configuration directory. Its -main command file is named `init`: - -- Unix: `$XDG_CONFIG_HOME/pardes/init`, falling back to - `~/.config/pardes/init`. -- macOS: `$XDG_CONFIG_HOME/pardes/init` when that variable is set, otherwise - `~/Library/Application Support/pardes/init`. -- Windows: `%LOCALAPPDATA%\pardes\init`, with - `%USERPROFILE%\AppData\Local\pardes\init` as the fallback. - -On the two unixes `XDG_CONFIG_HOME` counts only when it is ABSOLUTE, as the -XDG base-directory specification requires; an empty or relative value falls -back to the home-directory form (`config.User.path`, and the test beside -it). Windows never consults it. An `init` that does not fit the `max_bytes` -read limit — 1 MiB, `config.User` in `src/config.zig` — or that cannot be read at all is -treated as no file: `load` takes the `readFileAlloc` error and keeps going. The -path still resolves, because "nothing is there yet" is the answer `Config` -exists to give. There is one case with no path at all: a native launch with no -`HOME` set (or, on Windows, neither `%LOCALAPPDATA%` nor `%USERPROFILE%`), -which `Config` reports as `no per-user config path`. - -`Config` (`SPC f c`, or the word executed anywhere) opens one refreshable -`+Config` pane. It reports the startup path and every live config-like value: -theme, colors, focus tint, syntax weight, wrapping, tag position, debug mode, the requested shell and the -executable actually resolved at the last spawn, requested/effective GUI font -and size, tagline scale, window opacity, panel transition, -scene effects, hover delay, platform, native-image support, and (on SDL) whether -the executable uses live-built shaders or the paired prebuilt shader snapshot. -Platform-dependent rows say `unsupported` instead of looking like an off or -empty supported setting. The five fields of `config.Runtime.Capabilities` gate -them and are stated once as plain data in `builtins.capabilities`: -`font_picker` is the SDL GUI and -native macOS only, `scene_shaders` the same two, `panel_transitions` every -hosted shell, `window_opacity` the SDL GUI only, and `tagline_font_size` -everything but the TTY and the board. So -the TTY reports Font, TaglineSize and the scene shaders as unsupported; the -browser reports Font, panel transitions and the scene shaders as unsupported, -and its TaglineSize row reads `82% (build-time only)` — tagline font size is -its own capability precisely because GUI font SELECTION is native-only while -the browser still applies the compiled percentage to its DOM glyphs. -The startup path is printed whether or not a file exists — that is usually when -it is most useful — and is ordinary selectable text, so a right click on it -opens the file. Shell follows the same requested/effective/pending model as -Font. `Compiled default shell` is the command built into the binary; `Shell -effective (last spawn)` is the executable the native host really chose after -installation lookup and fallback. A changed request remains pending until a -terminal is spawned, because the core does not resolve native executables. - -The mutable global values live together in the plain `config.Runtime` record. -One plain capability record gates the setting registry, leader table, -`EffectCode`, and report; the compile-time setting table generates both setter -builtins and their `Config` rows. Exhaustive checks require every table-backed -toggle, transition, and scene-effect switch to occur exactly once, so those -generated setting builtins cannot quietly lose their query row or leave a -renderer switch unnamed. Manual pane-local actions remain with their payload (for -example an image tag reports its renderer choices); they are not global -configuration. - -The browser build has no local user-config path and does not load this file. -(Nor does it have `Font`, the effect builtins or `EffectCode`, a language -backend, or ptys of its own — see `docs/web.md`.) - -The format is one existing builtin command per line, using the same spelling -and argument parsing as commands executed inside pardes: - -```text -Theme orchard -Font DejaVuSansMono-Regular -TaglineSize 82 -Shell zsh -Wrap -``` - -A line matches a builtin whose name takes NO argument only as that whole word: -`Kill` runs, `Kill something` does not. A builtin that takes one -(`takes_arg` in `src/builtins.zig`, or a `settings` row whose action is -`shell`, `theme`, `font`, `tagline_size` or `window_opacity` in `config.Runtime.settings`) takes -everything after the name as the argument. On a native build that is `Theme`, -`ThemeFile`, `Font`, `TaglineSize`, `Shell`, `Save`, `Restore`, `Attach`, -`Mount`, `Unmount`, `Find`, `Grep`, `Rename`, `WsSymbols`, `Look`, `Exec`, -`Msg` and `EffectCode`. -The SDL GUI also has `WindowOpacity`, which takes one argument. -(`Peek`, `Poke`, `Hexdump` and `Gpio` take one too, but they exist only where -`builtins.Board.enabled` holds, and that build has no config file.) - -`Theme <name>` wants one of the names in the compiled ring. Do not derive the -spelling — read it off `ThemeSel` (`SPC t t`), which lists every one as the -exact `Theme <name>` line that selects it. `slug` in `tools/gen_themes.zig` -lowercases, folds punctuation runs to a single `_` and then TRIMS leading and -trailing ones (`penumbra+.toml` is `penumbra`, not `penumbra_`), and every -variant read out of a zed `.json` gets `_zed` on the end so it cannot collide -with a helix theme of the same name — zed's "Ayu Mirage" is `ayu_mirage_zed` -and `ayu_mirage` is helix's `ayu_mirage.toml`. The suffix goes on all of them -rather than only the eight that clash today, so a name cannot move when either -project gains or loses a file. A name that is not in the ring is ignored. - -The fifteen [native Pardes themes](themes.md) lead the ring: `orchard` (the -default), `dusk`, `ink`, `paper`, `daybreak`, `atelier`, `forge`, `lagoon`, -`solarium`, `spectrum`, `harvest`, `clay`, `forge_black`, `forge_soft`, and -`orchard_black`. `ThemeSel` lists them first under Pardes themes, followed by -a separate legacy/imported section. They add coordinated -focus, search, diagnostic and terminal colors; `ink` and `daybreak` are high -contrast dark and light options. The original `helix`, `dark` and `acme` -themes and all imported names remain available. - -`FocusTint` toggles the focused pane and column tag tints; it is on by default. -Workspace, column and pane command text can be edited directly; see -[editable tags](tags.md) for naming and saved-workspace behavior. -`ColumnTags` toggles the column command row in both GUI and TTY; it is on by -default. Add `ColumnTags` to startup configuration to reclaim that row on a -compact screen. Hiding it preserves your custom column commands. -`SyntaxBold` toggles bold syntax keywords; it is off by default. These -settings are shared by GUI and TTY, and `Config` reports their current -states. Like `Colors` and `Wrap`, these commands take no argument and invert -the current value. A `FocusTint` line in a fresh startup configuration disables -the tint; a `SyntaxBold` line enables the stronger keyword weight. Those two -appearance controls leave focus, selections and editing behavior unchanged. - -`TreeContext` toggles sticky declaration headers for the current source pane. -It is off by default and appears in the default pane tag when a tree-sitter -grammar supports that file. `TreeContext on` and `TreeContext off` set it -explicitly. Scrolling inside a function, type or module keeps its enclosing -declarations above the body, with source line numbers, syntax colors and a -subtle background tint. Clicking a header moves the cursor there without -scrolling; scrolling upward reveals that source line as the headers recede. -`Dump` and `Restore` preserve the setting per pane. Customized tags retain -their text; the command can still be executed from any source pane. - -`TreeContextTagStyle` toggles the experimental tagline treatment for those -headers and is on by default. In graphical frontends it uses the tagline font, -line height and thin border. A matching separator marks gaps between the -headers' source lines. Turning it off restores body-sized context rows. -`TreeContext` itself still defaults off; this appearance option does not enable -it. `Config` reports the appearance option, and dumps preserve it. - -Search, Grep and LSP location-result panes include `LocationsConfig` in their -default tags. Custom tags keep their edits. - -Location highlighting is enabled by the command that produces a location list. -Plain reports, including `LocationsConfig`, keep ordinary text colors even -when their text resembles a location. `Mini` keeps its own syntax colors. -LSP references and goto results highlight the exact symbol span supplied by -the server, using the search-result colors. Source indentation is retained so -those byte ranges stay aligned; context and descriptive labels remain unmarked. - -`LocationsConfig` prints the current settings for Search, Grep and LSP location -results in an output pane. Execute the printed line to apply it again, or -supply just the fields to change: - -```text -LocationsConfig context:5 tscontext:on tslocations:off layout:stacked -``` - -- `context` is the number of source lines above and below each match (default - `0`). Overlapping context is shown once. These neighboring lines omit their - locations and keep their code aligned with the matching result. -- `tscontext` includes enclosing tree-sitter declaration headers in source - order (default `off`). Preceding neighboring context stops at the outermost - enclosing declaration, keeping unrelated lines above it out of the result. -- `tslocations` shows a location on the first line of each declaration header - (default `on`); continuation lines keep the same alignment without repeating - the location. Declaration headers use the same muted color as locations, with or - without their locations visible. -- `layout:stacked` (default) puts each location on its own line, followed by its - source preview. Hidden context locations do not add an empty address line. - Use `layout:inline` to put locations beside the source instead. - -In inline layout, result locations share padding in groups of eight matches, so a long path only -widens its own group. Context does not count toward the eight; at group boundaries, -it aligns with the nearer match (ties stay with the preceding group). Source -indentation is preserved. All visible locations start flush left; `n` and `N` -still stop on matches. -With `tscontext` enabled, asterisks after a match location show its declaration -depth (for example, `main.zig:42 ***`). Ordinary neighboring source lines retain -syntax colors; declaration headers do not. -A declaration context line ends with ` ...` when source lines are omitted -before the next displayed row from that file. -Source analysis is reused across result queries while the source bytes stay the -same. The cache retains at most 64 files and 64 MiB; it checks current buffer or -filesystem contents on each refresh. -Open file buffers supply context from their current edits. Missing files still -leave the original result available. These settings apply to subsequent result -generation and survive `Dump`/`Restore`. Invalid fields reject the entire -update; if a field appears twice, its last value wins. - -`WindowOpacity <percent>` controls the opacity of everything in the SDL window -except text and the cursor, which stay fully opaque. Use `WindowOpacity 85` -to see the desktop through the editor, or `WindowOpacity 100` to restore full -opacity (the default). The argument must be a whole number from -0 through 100; missing or invalid values -leave the setting unchanged. At zero only text and the cursor remain visible. -Add the command to `init` to persist it. - -The same opacity applies to editor and embedded terminal backgrounds, UI -chrome, borders, scrollbars, gutters, and images. Overlapping non-text drawing -does not make those areas more opaque. Regular text, syntax colors, tagline -text, terminal glyphs, and the cursor keep their normal opacity. This does -not blend foreground colors into their cell backgrounds. The TTY -and other non-SDL hosts do not emulate this effect; their `Config` report says -`WindowOpacity: unsupported`. - -On native Wayland, Pardes uses an alpha-capable transparent surface. It does -not use whole-window opacity protocols such as `wp_alpha_modifier_v1`, because -those would also fade the text. Presentation uses the existing GPU offscreen -renderer followed by a readback and SDL renderer upload per presented frame, -which adds rendering cost. Other SDL drivers can report background transparency -as unsupported unless their rendering configuration is alpha-capable. -If the rendering backend cannot apply the request, Pardes reports the error -and keeps the last successfully applied opacity. `Config` reports the -percentage and marks a request as pending until the SDL host handles it. - -## Crash records - -A panic appends to `crashes` in that same directory, beside `init`, and only -then prints to stderr (`src/crash.zig`, wired into the panic handlers in -`main.zig` and — because the macOS build roots there — `macos.zig`). stderr is -the one place this program cannot keep a trace: in the TTY shell stderr IS the -screen, so the trace lands on a grid the terminal is being reset out of; the SDL -and AppKit shells have no terminal at all; and a `--detach` session's stderr -goes wherever its launcher left it. The file is appended, never rewritten, and -each record is two lines — build metadata, then the panic message: - -```text -pardes 0.0.2 (a1b2c3d) 2026-09-03T11:20:44Z linux-x86_64 pid 48812 -panic: index out of bounds: index 4, len 4 -``` - -NO STACK TRACE, and that is a measured decision rather than an omission. The -frames stay on stderr, where `std.debug.defaultPanic` prints them. Collecting -them here instead HANGS the process: `writeCurrentStackTrace` called from a -panic handler before `defaultPanic` has run wedges at 0% CPU, and -`captureCurrentStackTrace` — which looks like the safe half — takes `SelfInfo`'s -rwlock exclusively on its first call, so a panic inside the walk leaves that -lock held and `defaultPanic` then waits on it forever. What makes `defaultPanic` -survive the same hazard is its own private `panic_stage`, which nothing outside -`std.debug` can reach. A crash that becomes a hang is worse than the crash, so -this file keeps only what it can gather without asking the process any -questions: which build, when, where, and what it said. - -Everything about it is best effort and silent: no config directory (a launch -with no `HOME`) means no file, and a directory that cannot be created or opened -leaves the panic exactly as it was before — stderr alone. The directory itself -is created if it does not exist, because the user who never wrote an `init` is -as likely as any other to hit a bug. One record at a time: two threads panicking -at once would otherwise interleave into one buffer, so the second falls straight -through to stderr. Only panics come here; a SIGSEGV is caught one level lower -(`main.zig`'s `debug.handleSegfault`) and unwinding one needs the signal's saved -CPU context. - -## Runtime theme files - -`ThemeFile <path>` loads one complete theme from a `.zon` file. An absolute -path is used as written; a relative path is resolved from the `pardes` -configuration directory, not from the process working directory. A typical -layout is: - -```text -~/.config/pardes/ -├── init -└── themes/ - └── mine.zon -``` - -and the corresponding init line is: - -```text -ThemeFile themes/mine.zon -``` - -After a successful load, hosts with document live reload watch the path with -the same parent-directory mechanism, so in-place writes and editor-style -rename-over saves reload the theme live. A malformed or incomplete save does -not replace the last valid theme; fixing and saving the file applies the next -valid snapshot. Selecting a compiled theme with `Theme <name>` or `NextColor` -stops the custom-file watch. - -Execute `DumpThemes` to write every theme compiled into the executable to: - -```text -<config directory>/themes/builtin/<name>.zon -``` - -The command replaces those generated reference files but leaves unrelated -files alone. Copy one into `themes/`, rename it, change its `.name`, and use it -as the starting point for a custom theme. The dumped file is also the complete -format, and it is `pardes.Theme` serialised by `std.zon.stringify`: the theme -name, thirteen required RGB roles (`sel_bg`, `sel_fg`, `tag_bg`, `tag_fg`, -`box`, `box_dim`, `kw`, `str`, `num`, `comment`, `lineno`, `scroll_track`, -`scroll_thumb`), nullable `bg`/`fg`, and either a 16-color RGB `palette` or -`null`. Optional nullable RGB roles extend this format: -`tag_active_bg`, `tag_active_fg`, `tag_name_fg`, `tag_active_name_fg`, `border`, `lineno_active`, `search_bg`, `search_fg`, -`diagnostic_error`, `diagnostic_warning`, `diagnostic_info`, and -`diagnostic_hint`. Missing new roles use backward-compatible defaults, so -previously exported files remain valid. [Theme customization](themes.md) -describes each role and its fallback. RGB values are three-byte arrays, and -hex literals are accepted. The original fields remain required; there is no -inheritance or partial override layer. - -`tag_name_fg` gives the filename at the end of a pane's path a separate -foreground. `tag_active_name_fg` can adjust that tint for active tags; it falls -back to `tag_name_fg`. When both are omitted or `null`, the filename uses -the corresponding tag foreground. All canonical themes use a different hue -at similar perceived brightness to the surrounding text in both states. -Directory text and tag commands retain -their regular colors; selecting filename text uses the selection colors. -Terminal tags use this color for `Tty`, which comes immediately after the path. - -`Filter` in a terminal's tag projects that pane's ANSI colors through the -active theme, and does it in two stages. The default foreground and background -roles are mapped FIRST, because ghostty-vt generates the whole 256-color -projection from that pair; every other color follows, by reducing it to its -nearest canonical xterm key and reading the key back out of the projection. - -That reduction compares RGB triples, so it knows about hue and nothing about -the page — and the projection's cube corners ARE the two anchors, which is how -a foreground used to end up painted the exact color of the paper behind it -(`\x1b[38;2;255;255;255m` on acme's `#ffffea`, and the ANSI black a shell -writes with `\x1b[30m` on either dark theme). So a foreground additionally has -to keep `tty_filter_min_contrast` — a WCAG ratio, `1.5` by default — against -the mapped background. One that cannot is not mapped: it takes whichever of -the theme's own two anchors is still visible on that background. Backgrounds -are exempt, since a background is the page the floor is measured against. Set -the constant to `1.0` to accept every projected color, collapses included. - -`Shell <name>` sets the binary that the NEXT terminal pane execs; panes -already open keep the shell they are running. A bare name is resolved against -the handful of directories a shell actually lives in, not `$PATH`. - -On Linux, `Tty9p` (`SPC n 9`) starts that shell with a private kernel 9P mount, -asking sudo inside the new terminal. `$PARDES_MOUNT` names the mountpoint. -The installed `pardes-v9fs` helper lives beside the editor; development builds -can set `PARDES_V9FS_HELPER` to its absolute path. See [v9fs.md](v9fs.md). - -Ctrl-B switches between raw TTY and editor mode. Plain Escape at a detected -shell prompt hops back to the previous pane. Other keys, including Ctrl-O, Ctrl-W, -paste shortcuts, and modified Escape belong -to the child. Use `Mode` in the pane tag to return to editor -mode in place. Desktop paste events still feed the terminal. - -`Font` and `FontSel` exist ONLY in the SDL GUI and native macOS builds — a -terminal's font belongs to its emulator and a browser's to the page — so a -`Font` line is one of the silently-ignored ones everywhere else. Both builds -resolve the name by walking the font directories on every lookup, so a face -installed a moment ago is findable. - -Use `Font <name>:<size>` to change face and size together, for example -`Font MartianMono-NrRg:18` in the startup file or an editable tag. Fractional -sizes such as `:18.5` are supported; the accepted range is 8–72 (pixels in SDL, -points on macOS). `Font <name>` without a suffix preserves the current size. -Invalid sizes or unknown faces leave the current font unchanged. - -The SDL GUI also has a tiny optional workspace-tag companion: `Pet cat`, -`Pet frog`, or `Pet off` (the default). Its original pixel sprite walks and -idles in the trailing blank area of the global tag only. It hides while that -tag is being edited, when the tag is full, or when the font leaves too little -room; it never replaces text, receives clicks, or appears in pane/column tags. -Animation runs at ten steps per second, uses theme ink, and requires no image -assets or shaders. Put `Pet cat` in the startup configuration to keep it; -`Pet off` disables the companion and its animation. Other hosts ignore the -startup command. `Config` reports the current choice in SDL. - -`Font` is asynchronous at the renderer boundary. `Config` therefore keeps -requested name/path/size, pending state, and the effective face/point-or-pixel size -as separate facts; a failed request never gets reported as the face on screen. -Taglines use a distinct face size in both native GUI renderers. Execute -`TaglineSize <percent>` to change it live, for example `TaglineSize 70`; the -accepted range is 1 through 100 and the default comes from -`gui_tagline_font_percent` in `src/config.zig` (82). The native renderer -remeasures both the glyph and its visible tag band while retaining body-grid -pane geometry. Graphical tag text uses the smaller face's measured monospace -advance and fills the available pixel width, including workspace and column -tags. Text selection and scrolling use that same capacity; drag grips retain -their physical body-grid width and position. The 100% ceiling is -deliberate: a tagline remains exactly one logical grid row, so a larger face or -band would overlap its pane body or a neighbour instead of leaving the body -grid stable. `Config` reports the active percentage. The browser applies the -same compiled percentage to its DOM glyphs but has no runtime setter. - -Both native GUIs join the reduced-height global and pane tagline bands with -`gui_topbar_pane_border_px` physical pixels. Set it to zero for a direct join. -`gui_topbar_pane_border_rgb` can pin an RGB color; its default `null` follows -the theme's `border` role in SDL (falling back to `scroll_track` for older -themes), and `scroll_track` in the macOS shell. With `Tagbottom` enabled, a tagline -on the final grid row is bottom-aligned so the same unused half-band does not -show beneath it. The rule itself lives in the core -(`pardes.taglineBandOffset`), and the macOS shell reaches it over the C ABI -rather than keeping its own copy — it had one, it only ever centred, and the -seam that leaves between the two bands is what this setting exists to close. - -What happens to a codepoint the chosen face has no glyph for differs by shell. -The SDL GUI falls back through a chain it builds itself: embedded Adwaita -Mono, then installed `NotoSansMono-Regular`, `DejaVuSansMono`, -`SymbolsNerdFont-Regular`, `NotoSansSymbols2-Regular`, -`NotoSansSymbols-Regular`, and `DejaVuSans`, in that order, missing entries -skipped; the rasterized glyphs are retained in its GPU atlas. The macOS shell -has none of that and needs none. It embeds no font. Its default face is -`NSFont.monospacedSystemFont`, resolved through the descriptor rather than by -name, and `Menlo` only if that face turns out not to be fixed-pitch — a -proportional face in a fixed grid is a broken screen, not a cosmetic problem -(`PardesView.defaultFace`). A `Font <name>` arrives as a PATH the core already -resolved by walking the font directories, and a file CoreText cannot measure -leaves the face already on screen rather than substituting one, because the -alternative is a terminal with no way back out (`PardesView.fromFile`). -Per-codepoint fallback is CoreText's own cascade at draw time. What the shell -caches is `CGGlyph` ids, not pixels. - -Blank, unknown, malformed, or unsuccessful lines are ignored silently, and a -bad line does not prevent later lines from running. Top-level text that is not -a builtin is not sent to a shell. (`Exec ...` remains an ordinary builtin and -therefore keeps its normal behavior.) Key bindings remain compile-time choices -in `src/config.zig`; this startup file does not remap them. - -## Panel and scene effects - -Exactly one panel transition is selected at a time. Executing its builtin a -second time turns it off; selecting another replaces it: - -```text -PanelSlide -PanelZoom -PanelDissolve -PanelAscii -PanelVertical -PanelEdges -PanelFall -PanelWave -PanelCurtain -PanelScramble -PanelType -``` - -All panel transitions start off. To disable one, execute its builtin again: -`PanelDissolve` turns off an active dissolve, and `PanelAscii` turns off an -active ASCII transition. `Config` shows the active command under -`Panel transition`. Remove that command from your startup configuration to -keep it off after restarting. Executing a different transition enables that -one instead; these commands are toggles, not an unconditional animation-off command. - -Slide uses cubic ease-out and zoom uses an -overshooting ease-out-back. Dissolve and ASCII compare the last successfully -presented grid with the new one. Dissolve switches visually changed cells at -stable noise thresholds. -ASCII walks every changed single-byte printable glyph -from its old `u8` value to its new one, spending that byte distance as the -frames of the walk. The walk is eased in and out: a glyph creeps at both ends -and crosses the middle of its distance in a few large skips, inside the same -number of frames a constant one-value-per-frame walk would have taken. -Glyph-stable style changes -and non-ASCII graphemes become canonical immediately. A walk is capped at -twelve movement frames, and each pane lasts only as long as its longest walk. -The core computes and composes that semantic diff once for every backend; -pixel attachments, which have no character value, pass through unchanged. - -Six further transitions are character *motion* over the same frozen/new grid -pair, and are composed in the core the same way: - -- `PanelEdges` — whole rows slide in from alternating screen edges. -- `PanelFall` — columns rain down into place, each with its own head start. -- `PanelWave` — a vertical ripple travels across the pane and decays. -- `PanelCurtain` — a curtain of glyphs marches column by column, left to right. -- `PanelScramble` — every cell churns through printable ASCII and locks onto - its final glyph at its own stable noise threshold. -- `PanelType` — reading-order reveal with a caret sitting on the write head. - -Unlike dissolve and ASCII these carry *every* glyph in the pane, changed or -not: text flying in from a screen edge has to bring its unchanged glyphs with -it. A cell whose glyph has not arrived shows the frozen old cell rather than a -blank or a blend, so every intermediate frame is made of real characters. No -cell is a valid input target until its own glyph has settled. - -Vertical is a pane-lifecycle effect: a newly added -pane rises from below inside its own fixed box, and a deleted pane's frozen -content drops back down; surviving panes are never animated. The TTY -implementation performs its remaining geometry/dissolve operations directly -on a copy of the core-composed presentation grid. -The SDL and native macOS GUI implementations pass plain panel tracks to their -GPU shaders, including native image/PDF pixels; layout itself commits -immediately and remains the one authoritative geometry. DOM web intentionally -does not expose these builtins: its renderer is selectable HTML/CSS and has no -canvas or shader stage. - -The scene effects are independent switches and can be combined: - -```text -Crt -Ripple -Glitch -``` - -They share one full-scene shader pass in SDL and macOS. With all three off the -pass is bypassed. CRT works in linear light with restrained scanlines, mask, -bloom, curvature, and noise rather than remapping the theme to a strong fixed -palette; Ripple and Glitch primarily perturb sample coordinates. - -`EffectCode PanelAscii` or `EffectCode Crt` lists the current backend's -build-embedded source paths under `/virtual`. Look opens each full file; -no checkout is needed, but the build must carry them (`-Dembed-sources=true`, -the default only for esp32p4); otherwise the command reports them unavailable. TTY exposes grid transitions, native GUI builds also -expose scene shaders, and web has neither. Shared implementations share paths. -SDL reports whether GLSL was compiled during this build or came from the -`-Dprebuilt-shaders` snapshot paired with the committed SPIR-V. -`zig build shaders` refreshes both files of every pair together, -so editing live GLSL without that explicit refresh changes neither half of a -prebuilt executable. - -## Delayed Look preview - -The preview is enabled by default. Moving the pointer onto selectable text and -leaving it still for `look_preview_delay_frames` — 2 animation ticks, and -`animation.frame_ms` is 16, so about 32 ms — paints a subtle theme-derived -preview of the exact operand a right-click Look would receive. -Repeated motion reports in the same semantic grid cell do not restart the -delay. The preview uses the same side-effect-free word/path expansion as Look; -it does not focus a pane, move a cursor, install a selection, activate a PDF -page, or execute anything. Motion to another operand, pointer leave, input, -pane teardown, and relevant content changes cancel it. - -Set this compile-time option in `src/config.zig` to disable the feature: - -```zig -pub const look_preview_delay_frames: ?u16 = null; -``` - -## Build-time configuration - -Runtime settings live in `src/config.zig`. Build options are listed below; -`zig build --help` lists the options available for the selected platform, -including the standard `-Dtarget` and `-Doptimize` options. - -| option | values | default | -|---|---|---| -| `-Dplatform` | `tty`, `gui`, `web`, `macos`, `esp32p4` | absent builds the tty cli and the SDL gui together | -| `-Dstatic` | bool | `false` | -| `-Dquic` | bool; 9P over QUIC using system OpenSSL 3.6+ | `false` | -| `-Dmupdf` | bool | on for a native target, off for web and esp32p4 | -| `-Djpx` | bool | `true` — JPEG 2000, and with it scanned PDFs | -| `-Dtree-sitter` | `disabled`, `zig`, `minimal`, `full` | `full` natively, `zig` for web, `disabled` for esp32p4 | -| `-Dtheme-animation` | bool | on everywhere except `-Dplatform=esp32p4` | -| `-Dworkspace-tag` | bool; draw the workspace tag row — the macOS shell hands its commands to the native menu bar instead | on except on `-Dplatform=macos` | -| `-Dprebuilt-shaders` | bool | on for a bare `zig build`, off when `-Dplatform` names a shell | -| `-Dtracy` | path to a Tracy source checkout | off | -| `-Dmacos-identity` | codesigning identity for `pardes.app` | `-` (ad-hoc) | -| `-Ddump` | a `dump.zon` to embed in the web shell | none | -| `-Dtest-filter` | substring; run only tests whose name contains it | none | -| `-Dtest-rebuild` | bool; force fresh Zig test compilation, retaining cached C dependencies | `false` | -| `-Dhelix-harness` | native reference executable for live differential tests | `HX_HARNESS`, otherwise `hx-harness` on PATH | -| `-Desp32p4-cols` | u16, the board's grid width in cells | `56` | -| `-Desp32p4-rows` | u16, the board's grid height in cells | `14` | - -The local board build emits an object. Firmware clock, serial port and profiling -options belong to the sibling `05-zig-p4` toolchain's build. - -Two build inputs reach the running binary as ordinary values rather than as -behaviour. `build.zig` reads `.version` from `build.zig.zon` through an untyped -`@import("build.zig.zon")` — one place to bump — and `gitCommit(b)` reads the -revision at configure time. Both land in `pardes_config` and are re-exported as -`pardes.version` and `pardes.commit`, and `pardes --version` prints -`pardes <version> (<commit>)`, or `pardes <version>` alone when there is no -commit: a tarball, a container with no `git`, or a checkout outside version -control all yield null, and the flag has to work anyway. Neither is a question -asked at runtime — a binary that shelled out to `git` would describe whatever -tree it was standing in rather than the one it came from. - -`Restore a.dump` first looks for the relative path in the default dump directory -(`$XDG_DATA_HOME/pardes`, or `~/.local/share/pardes`). If it is absent, Restore -uses the argument as a path as before. Absolute paths and argument-free Restore -retain their existing behavior. `Dump` still honors `$PARDES_DUMP` and otherwise -writes a timestamped file in the default directory. diff --git a/docs/design.typ b/docs/design.typ deleted file mode 100644 index 4c8956ba..00000000 --- a/docs/design.typ +++ /dev/null @@ -1,2050 +0,0 @@ -// docs/design.pdf is a retained test fixture, not regenerated by normal builds. -#import "@preview/cetz:0.5.1" - -#set page(paper: "a4", margin: (x: 1.5cm, y: 1.8cm), columns: 2, numbering: "1") -#set text(font: "New Computer Modern", size: 8.8pt) -#set par(justify: true, leading: 0.55em) -#set heading(numbering: "1.1") -#show heading: set block(above: 1.15em, below: 0.6em) -#show heading.where(level: 1): set text(size: 10.2pt) -#show heading.where(level: 2): set text(size: 9.2pt) -#show heading.where(level: 3): set text(size: 8.8pt, style: "italic") - -#show raw.where(block: true): it => block( - width: 100%, - fill: luma(246), - inset: (x: 0.5em, y: 0.45em), - radius: 1pt, - breakable: true, - text(size: 7.2pt, it), -) -#show raw.where(block: false): set text(size: 8.1pt) - -#show figure.caption: set text(size: 7.6pt) -#set figure(gap: 0.55em) -#set table(stroke: 0.4pt, inset: 0.35em) - -#let wide(caption: none, body) = place( - top, - scope: "parent", - float: true, - clearance: 1.2em, - figure(body, caption: caption), -) - -#let diagram(body) = [ - #show raw.where(block: false): set text(size: 5.9pt) - #body -] - -#place(top + center, scope: "parent", float: true, clearance: 1.5em)[ - #text(16pt)[*Pardes: A Text Environment*] - - #text(8.8pt)[Architecture and implementation of the rewrite] -] - -#place(top + center, scope: "parent", float: true, clearance: 1.4em)[ - #block(width: 82%, inset: (x: 0pt))[ - #set par(justify: true, leading: 0.52em) - #text(8.2pt)[ - *Abstract.* Pardes is a text environment in the acme tradition: columns of - panes, each pane a tag line plus a body, the body a live terminal, a file, - an image or a PDF. It is one program with five thin shells — a terminal - over libvaxis, an SDL3 window, a browser tab driven by vanilla JavaScript, - an AppKit application, and an ESP32-P4 microcontroller — where the - prototype had three parallel implementations of one editor. Two seams - carry that. Outward, the core is a state machine over plain values: - `Event` in, `Surface` and a queue of `Effect` out, and nothing that cannot - be said in those types exists in pardes. Downward, `Host.VTable` is - optional function pointers, with in-process fallbacks, - so the zero-method host is both the test harness and the browser. A - session can also be a daemon: the core keeps the ptys and the disk and N - frontends carry only a screen, a keyboard and a clipboard. - ] - ] -] - -= What it is - -== The acme inheritance - -Columns of panes; each pane is a tag line plus a body; the body is a live -terminal, a file, an image, or a PDF. The mouse carries meaning — left selects, -middle executes, right looks. Everything on screen is text and all text is -equally alive, whether the shell printed it or the user typed it. - -Two acme mechanisms are reproduced rather than reinterpreted. A *dump* is the -session as data: `pardes -l state.zon` on every platform reconstructs the panes -— terminals by replaying their raw VT streams into fresh emulators, files, -images and PDFs from their bytes. Editable tag tails are stored separately from -their dynamic live prefixes, and image records retain PETSCII, palette, and -ASCII renderer choices. A PDF rides the dump's `image` kind, carrying its path, -its bytes and the page it was on. The reader validates weights, scroll ranges, -pane references, and bounded tag tails before constructing anything; invalid -base64 fails instead of silently becoming empty content. A PDF record whose path -cannot be opened — or a build without MuPDF — falls back to an ordinary file -pane with those exact embedded bytes and its original editable tail. - -That is what collapses the prototype's *two* applications into one. Its browser -build was a separate 800-line read-only replay viewer; here loading another -instance's dump is a first-class feature of the one application, and the web -shell is that application with an embedded dump and `spawn` left unanswered. -Same core, no viewer fork. - -The other acme mechanism is a control filesystem, `src/fs.zig` -(@fs). - -== One core, five shells - -Pardes is a *library*, in the way ghostty-vt is a library: you feed it bytes and -events, and you read state out of it. Every platform owns its own event loop and -its own renderer; the core owns everything the user would recognize as pardes. - -*The core* owns layout, panes, modes, selection, click semantics, themes, and the -text of the UI. Pure state machine: `update(event)` mutates, `render(arena)` -returns the surface. No rendering, no event loop, and no IO that has an effect -for it — but "no syscalls" was never true and is less true now: `look` reads a -file a Look opened, walks a directory for Find and reads every candidate for -Grep, `fonts` walks the font directories, and MuPDF opens a `.pdf`. Those are the -ones that are cheaper done in place than round-tripped through an effect and -back; everything with a lifetime — a pty, a window, the clipboard — is still -asked for. - -*A shell* is one MODULE per platform: tty is one file, gui adds the CRT and -gamepad files plus a C font loader and eight GLSL shaders, and web, macOS and the -board each add a host language or a host repository. It owns the event loop, -translates native input into core events, renders the core's surface, and -performs the core's requested effects — spawn a shell, write a pty, open a link. - -The five, and what each one actually is: the terminal (libvaxis); a native SDL3 -window (the steamdeck); the browser (a freestanding wasm core driven by vanilla -JavaScript and rendered as HTML/CSS); a native macOS app (an AppKit and CoreText -shell over a static `libpardes.a`); and an ESP32-P4 microcontroller, a -freestanding riscv32 *object* that the sibling `05-zig-p4` toolchain links beside its own -`_start`, linker script and UART driver (`src/esp32p4.zig` header; the -`pardes-esp32p4` object `build.zig` emits). `pardes.Platform` is -`enum { tty, gui, web, macos, esp32p4 }`. - -Native shells share `host_io.Shell`'s OSC 133 startup snippets, but not their -files. Each host owns a private `mkstemp` pair for its lifetime, writes and -closes both before the first fork, passes those unpredictable paths directly -in child argv, and unlinks them at teardown. Concurrent tty, SDL and macOS -launches therefore cannot truncate, source, or replace one another's startup -files. - -== A shell need not share the process - -`pardes --detach[=name]` runs the core with no terminal of its own and -`pardes --attach[=name]` makes a frontend of it over a unix socket, so one -session can carry a terminal and an SDL window at the same time and outlive -both. `main.nativeMain` dispatches `--detach` before it switches on the -platform, because it is not a shell: the tty and gui builds can both be asked -for one. The two flags together are refused. Local and detached sessions both -serve 9P by default. Both flags take `=name` and never a separate word, so -`pardes --attach README` opens `README` in a fresh session instead of attaching -to one called `README`. See @detached and `docs/detached.md`. - -= The seam <seam> - -#wide(caption: [The core/shell seam. `Event` is the only way in; `Surface` and a -queue of `Effect` are the only ways out. `Host.VTable` is how an `Effect` -reaches a resource, and every method a host leaves null is answered by -`host_io.Fallback` inside the same process.])[ - #diagram[ - #cetz.canvas(length: 0.995cm, { - import cetz.draw: * - set-style(stroke: 0.4pt, mark: (fill: black, scale: 0.35)) - - // ---- the core ---- - rect((6.0, 0.9), (11.6, 4.3), name: "core") - content((8.8, 4.02), text(7.6pt)[*the core* --- `src/pardes.zig`]) - line((6.0, 3.78), (11.6, 3.78)) - content((8.8, 3.42), text(6.2pt)[`update(ev)` --- one dispatch, mutates]) - content((8.8, 2.92), text(6.2pt)[`render(arena)` #sym.arrow.r `*Surface`]) - content((8.8, 2.42), text(6.2pt)[`emit(e)` #sym.arrow.r fixed ring, `limits.effect_cap`]) - content((8.8, 1.92), text(6.2pt)[`nextEffect()` #sym.arrow.r `perform(e)`]) - content((8.8, 1.32), text(6.2pt)[single-threaded by construction]) - - // ---- native input ---- - rect((0, 3.0), (4.3, 4.3), name: "in") - content((2.15, 3.98), text(7.0pt)[*native input*]) - content((2.15, 3.52), text(6.0pt)[termios+vaxis / SDL / DOM /]) - content((2.15, 3.19), text(6.0pt)[AppKit / a byte sink on a UART]) - line("in.east", (6.0, 3.65), mark: (end: "stealth")) - content((5.15, 3.92), text(6.4pt)[`Event`]) - content((5.15, 3.5), text(5.6pt)[16 arms]) - - // ---- surface out ---- - rect((13.3, 3.0), (18.0, 4.3), name: "paint") - content((15.65, 3.98), text(7.0pt)[*paint the grid*]) - content((15.65, 3.52), text(6.0pt)[vaxis cell-by-cell / glyph atlas /]) - content((15.65, 3.19), text(6.0pt)[DOM cells / CoreText / ANSI]) - line((11.6, 3.65), "paint.west", mark: (end: "stealth")) - content((12.5, 3.92), text(6.4pt)[`Surface`]) - content((12.5, 3.5), text(5.6pt)[cells, cursor,]) - content((12.5, 3.16), text(5.6pt)[images, tracks]) - - // ---- effect out ---- - rect((13.3, 1.1), (18.0, 2.5), name: "perf") - content((15.65, 2.2), text(7.0pt)[*perform*]) - content((15.65, 1.78), text(6.0pt)[fork a pty, write a path, mark a]) - content((15.65, 1.45), text(6.0pt)[directory, put text on a clipboard]) - line((11.6, 1.8), "perf.west", mark: (end: "stealth")) - content((12.45, 2.05), text(6.4pt)[`Effect`]) - content((12.45, 1.62), text(5.6pt)[18 arms]) - - // ---- the vtable ---- - rect((6.0, -1.0), (11.6, 0.4), name: "vt") - content((8.8, 0.14), text(7.0pt)[`Host.VTable` --- optional callbacks]) - content((8.8, -0.32), text(6.0pt)[one host owns each core]) - content((8.8, -0.68), text(6.0pt)[null callbacks use core fallbacks]) - line((8.8, 0.9), (8.8, 0.4), mark: (end: "stealth")) - line("vt.east", (13.3, 1.5), mark: (end: "stealth")) - - // ---- fallback ---- - rect((0, -1.0), (4.3, 0.9), name: "fb") - content((2.15, 0.62), text(7.0pt)[`host_io.Fallback`]) - content((2.15, 0.18), text(6.0pt)[every null method, answered here:]) - content((2.15, -0.18), text(6.0pt)[a virtual filesystem over the]) - content((2.15, -0.52), text(6.0pt)[embedded source, a virtual]) - content((2.15, -0.84), text(6.0pt)[clipboard, silent ptys]) - line("vt.west", "fb.east", mark: (end: "stealth")) - - // ---- answers loop back. Routed through the one corridor that is free of - // every box (x between `fb`/`in` at 4.3 and the core column at 6.0) and - // below the lowest box edge, so the canvas stays inside 0..18 and cannot - // bleed into the page margins. - line((15.65, 1.1), (15.65, -1.6), (5.72, -1.6), (5.72, 3.58), - mark: (end: "stealth"), stroke: (dash: "dashed")) - content((9.0, -1.94), text(5.8pt)[an answer returns as an ordinary `Event`: `paste`, `lsp_resp`, `pipe_resp`, `file_changed`]) - }) - ] -] - -The boundary is three plain data types and one struct of function pointers. - -== `Event`: what comes in - -Sixteen arms (`pardes.Event`), in declaration order: -`key`, `mouse`, `resize`, `output`, `eof`, `lsp_resp`, `pipe_resp`, -`file_changed`, `paste`, `command`, `pdf_scroll`, `pinch`, `touch_scroll`, -`pointer_leave`, `tick`, `fs_req`. - -`key` carries typed `text`. `mouse` carries press/release/motion/drag; button -left, middle, right and the four wheel directions; a cell position; and the -`ctrl` flag, because Ctrl-left-click is goto-definition. `resize` carries cols, -rows, and — in a MuPDF build — the pixel size of one cell. `output` is bytes a -pty produced, tagged with the pane id. `command` is one builtin line arriving -from another process over the nested socket. `pointer_leave` exists because an -out-of-range motion must clamp onto the last grid cell and a pointer that has -left the drawable area must not: otherwise leaving the window previews whatever -is under the final cell. `fs_req` is one filesystem request from a process that -opened a file under the control mount, and its answer leaves as an -`Effect.fs_reply` in the same update. - -Four of the arms are answers to something the core asked for; @effect -names the asks. - -Touch policy belongs to the shell: web maps a one-finger tap to right-button -LOOK and a drag past its tap slop to natural scrolling; native SDL keeps its -two-finger gestures. A joystick cursor is a motion plus buttons. The shells do -this translation and nothing else with input: one event vocabulary, five -dialects translated at the door. - -`postEvent` is a value queue of 64 and asserts what cannot survive the trip -(`Pardes.postEvent`): `output`, `paste`, `lsp_resp`, `pipe_resp`, -`file_changed`, `command` and `fs_req` all carry a borrowed slice, so they are -`unreachable` there and must be handed to `update` directly inside the host's -borrow window. That is also what keeps the pty read path copy-free. - -== `Surface`: what goes out - -`cols`, `rows`, a grid of cells, a cursor, pixel attachments, and a bounded list -of plain panel-transition tracks (`pardes.Surface`). This is the -*canonical interface*: it is literally what the tty shell hands to vaxis, cell -by cell. SDL rasterizes the same grid through a glyph atlas; the browser reads a -packed copy and patches native DOM cells. If it cannot be expressed in the -surface, it does not exist in pardes. - -Pixel images ride along as a list of PLACEMENTS rather than one per pane — a PDF -pane contributes every page its viewport intersects, and pages can be -arbitrarily short. The SDL shells blit RGBA; the tty shell uses kitty graphics -when available and falls back to the petscii matcher. Transition tracks identify -their pane by slot and serial and carry only phase, effect, frame, and from/to -cell boxes. Canonical layout is committed immediately; tracks are finite -presentation data. - -== `Effect`: what is asked for <effect> - -Eighteen arms (`pardes.Effect`). The core never performs IO for any of -them; it asks. - -```zig -pub const Effect = union(enum) { - spawn: struct { pane: u8, cwd: Buf(256) }, - write: struct { pane: u8, bytes: Buf(64) }, - resize_pty: struct { - pane: u8, cols: u16, rows: u16 }, - open_link: Buf(256), - save_file: struct { pane: u8 }, - save_text: struct { - pane: u8, serial: u32, path: Buf(256) }, - write_dump, - set_clipboard, - read_clipboard, - lsp: struct { id: u32, kind: lsp.Kind, - pane: u8, offset: u32, arg: Buf(128) }, - pipe: struct { id: u32 }, - watch: struct { pane: u8, on: bool }, - theme_file: struct { - generation: u32, on: bool }, - dump_themes: struct { pane: u8 }, - fs_reply: filesystem.Reply, - attach: struct { - pane: u8, name: Buf(attach_name_max) }, - detach: struct { pane: u8 }, - quit, -}; -// doc comments elided; see the file -``` - -Every arm is a fixed-size value, and that is the constraint the widths record. -Unbounded content is never in the union: `save_file` names a pane and the shell -reads the bytes off the core, and `save_text` carries the *path* — bounded -exactly like a spawn's cwd, so two saves armed in one batch cannot cross — while -the bytes are read at drain time. `save_text` also carries the pane's `serial`, -so a slot freed and reused before the drain writes nothing rather than another -pane's text to that path. `attach_name_max` is 256 for the same reason `spawn`'s -cwd is, and reusing that width is why the arm costs the ring nothing: -`save_text` is still the widest member (`pardes.attach_name_max`). - -Four asks have an answer coming back. `read_clipboard` returns an ordinary -`paste` event — or nothing at all when the shell cannot read the clipboard, which -is most terminals, since they refuse the OSC 52 read. `lsp` returns `lsp_resp`. -`pipe` returns `pipe_resp`. `watch` returns `file_changed` whenever the shell -notices a text file or PDF moved under it. - -`theme_file` carries only a generation because the path lives in the core's fixed -request buffer, which keeps an already-large ring compact. `fs_reply` carries no -bytes either: `payload` says where they live — a staging buffer in the core, or a -range of a pane's live text — and `fsPayload` resolves it during the drain, so a -megabyte read costs one `writev` and no copy. - -`attach` and `detach` are the two arms no host method performs directly. `attach` -must not tear anything down (@swap); `detach` is served only by a -detached core's host, and the null case is the point rather than an oversight — -a local tty or SDL shell has no session to leave, so `perform` reports that on -the pane's message row instead of quietly quitting something (the `.detach` arm of -`Pardes.perform`). - -The watch path, in full, because it is the ask with the most machinery behind -it. The tty and SDL hosts and the detached daemon implement it in -`src/file_watch.zig`, with Linux inotify or a macOS kqueue behind one -mark/reconcile transaction; the native macOS host watches with debounced -DispatchSources instead, then restats the exact path under a pane-generation -guard. All three macOS watchers mark the same two things for the same reason: -the file catches in-place writes while the parent directory follows rename-over -saves, and the file mark is re-armed once such a save has moved the inode. -Text snapshots are filtered by their content hash; -PDFs use bounded inode/size/time identity and commit it only when equal stats -bracket a successful transactional MuPDF reopen (`file_watch.Generation`). A -mismatched transaction gets one bounded self-retry. This catches rename-over -saves without reading a large PDF merely to notice it changed, or spinning on a -malformed one. A PDF response retains its reading position and pane settings. -Web has no filesystem watcher, and nothing in the core waits for one. - -== The effect ring - -```zig -pub fn emit(p: *Pardes, e: Effect) void { - if (p.effects_len == p.effects.len) return; - const tail = (p.effects_head + - p.effects_len) % p.effects.len; - p.effects[tail] = e; - p.effects_len += 1; -} - -pub fn nextEffect(p: *Pardes) ?Effect { - if (p.effects_len == 0) { - p.effects_head = 0; - return null; - } - const e = p.effects[p.effects_head]; - p.effects_head = - (p.effects_head + 1) % p.effects.len; - p.effects_len -= 1; - return e; -} -``` - -`emit` REFUSES when full and never evicts (`Pardes.emit`). Byte -order is the reason: a `.write` dropped from the middle of a run would reorder a -pty's input, and a `.write` dropped from the tail merely truncates it. - -Capacity is 4096 on every hosted platform and 128 on the board -(`limits.effect_cap`). No capacity can deadlock the drain, because `pump` empties -the ring on every iteration with an unconditional `while (nextEffect())` — -including effects `perform` itself queues — so the only question a capacity -answers is how large a single-pump *burst* may be. The one producer that can -burst is `emitWrite`, which chunks arbitrary bytes into 64-byte `.write` effects -for a pty; everything else queues O(1) effects per event, and the input queue -holds at most 64 events per pump, so 128 leaves two effects per queued event. A -build with no terminal panes has no pty to write to at all. - -== `Host.VTable`: who serves the core - -`host_io.Host` holds a context pointer and optional callbacks. macOS enters -its native shell through the separate `Runtime` C ABI. - -```zig -pub const VTable = struct { - /// The ONLY place the process may sleep. - wait_input: ?*const fn ( - ctx: ?*anyopaque, - timeout_ms: u32, - ) void = null, - present: ?*const fn ( - ctx: ?*anyopaque, - surface: *const pardes.Surface, - ) void = null, - // ... - tty_taken: ?*const fn ( - ctx: ?*anyopaque, - pane: u8, - ) bool = null, - // ... -}; -``` - -A null method is not an error: the core substitutes a default backed by ordinary -data structures in the same process (`host_io.Fallback`). A `Save` lands in a real -file under the tty host and in `Fallback.files` under a host that never wrote a -filesystem method, and every path above that behaves identically. Two -consequences were taken on purpose. The zero-method host IS the test harness: a -`Host{}` is a complete, deterministic, in-process pardes with a virtual -filesystem, a virtual clipboard and silent ptys. And `Fallback` lives on the -`Pardes` instance rather than on the host, so cores keep independent state. - -The fallback filesystem is not empty. It is pardes's own source, embedded -(`src/fs.zig`), with `files` holding only what this session WROTE, -so a Save shadows the built-in copy and reading it back returns the edit. That is -what makes a host with no file methods a usable pardes rather than one staring -at an empty buffer. - -What is deliberately NOT in the vtable: whether a capability EXISTS in this -build. That stays comptime and stays next to the code it shapes -(`pardes.platform`, `pardes.hosted`, `pardes.pdf_enabled`, -`pardes.can_attach`, `pardes.terminal_panes`, `builtins.capabilities`, -`PdfSlot`). A vtable cannot make a field zero-sized or a builtin absent from an -enum. Comptime decides what a build HAS; the vtable decides who SERVES it at -runtime. - -`pardes.can_attach` is the sharpest of those, because it exists to close a gap -the coarser gate left open. `Attach` and `Detach` were gated on `pardes.hosted`, -and macOS is hosted: it has a unix socket and it compiles `detached/`. What it -does not do is POLL. `takeAttach` has to be a poll rather than a host method -precisely because attaching replaces the core the call is running inside -(@swap), and `src/macos.zig` never calls it — so there the word -parsed, queued an effect, stored a request in `attach_buf`, and then did nothing -at all, for ever, silently. `can_attach` admits exactly the tty and gui -platforms, which is exactly the pair `main.zig` accepts `--attach` for: the same -question asked at the command line instead of in a tag. A capability that a -build cannot serve should not be a word that build offers. - -=== Callback ownership - -Each core has one host. The detached host explicitly broadcasts shared state -and routes clipboard reads and link opening to the originating frontend. -There is no name-based fan-out layer. - -== The frame, as a frontend writes it - -```zig -pub fn pump(p: *Pardes, h: Host) !void { - p.host = h; - const v = h.vtable; - if (v.wait_input) |f| - f(h.ctx, if (p.animationActive()) - animation.frame_ms else 0); - while (p.nextQueued()) |ev| p.update(ev); - while (p.nextEffect()) |e| p.perform(e); - // A quitting frame has already freed - // what it would draw. - if (p.quit) return; - if (v.poll_frame) |f| f(h.ctx); - _ = p.frame_arena.reset(.retain_capacity); - const surface = try p.render( - p.frame_arena.allocator()); - if (v.present) |f| f(h.ctx, surface); - if (v.post_present) |f| f(h.ctx); - // ... -} -``` - -`Pardes.pump`, eighteen lines in the source, and the order of them is the -architecture. Input first, in whichever host owns the sleep; -then every queued event, to completion; then every effect, to completion, -including effects `perform` queued; then one arena reset and one render; then -present, then post-present. - -Animation time is not spent in here. `wait_input` was told how long it may -sleep, and a display clock wakes faster than that on input, so only the host -knows when a real frame interval has passed. Each spends it by handing back one -`.tick`. - -`post_present` is split from `present` because it must observe a frame -the user has actually seen: panel-presentation acknowledgement and pointer -refresh both depend on that, and a hook that ran before the pixels landed would -acknowledge a frame that was never shown. - -== Platform divergence is comptime - -There is one deliberately platform-divergent file by design: `look.zig` holds -path and `:line` resolution, URL detection, and the per-platform outcomes. The -divergence is a comptime switch on `pardes.platform`, used the way the stdlib -switches on `os.tag`, so every platform's behaviour sits in the same screenful. - -```zig -const platform_has_fs = !pardes.isolated and - switch (pardes.platform) { - .tty, .gui, .macos => true, - // The browser's filesystem is the embedded - // source archive; the P4 firmware's is - // whatever the serial host answers for, - // through the Host vtable — never a path - // this process opens. - .web, .esp32p4 => false, - }; -``` - -`look.platform_has_fs`. An isolated build has no filesystem *by construction* — -the option is comptime, so every libc path below is dead code the compiler -removes rather than a branch that could be taken by accident. - -The core's one `pointerOperand` primitive owns click-word expansion and is shared -verbatim by right-click and the delayed hover preview; that policy stays beside -input because it also observes live pane selections and wrapped grid coordinates. - -`panes.zig` keeps each pane kind's storage and operations together. -`layout.zig` owns placement and presentation state. `pardes.zig` handles input -and cross-pane state directly, without a pane vtable. Integration fixtures live -in `test/panes.zig`, `test/output.zig`, and `test/pdf.zig`. - -= State - -== One struct, fixed where it can be - -The whole state is one struct. Panes themselves are heap-allocated on demand and -their contents (file bytes, the yank register, PDF rasters, tree-sitter state) -grow with what you open; everything else is sized at init. - -```zig -Pardes - ncol + col_weight[6], col_panes[6][16], col_n[6] - panes: [16]?*Pane - active + drag + config.Runtime - rects: [16]layout.Rect - presentation: layout.Presentation - effects: [limits.effect_cap]Effect + head/len - in_q: [64]Event + head/len - fallback: host_io.Fallback - fs: fs.Namespace - -Pane - serial + mode + vweight - terminal: ?*panes.Terminal.State - file: ?panes.File.State - image: ?panes.Image.State - pdf: PdfSlot - cwd: none | inherited(*Pane) | owned([]u8) - tag_tail + prompt + cursor + selections - ovl: ?panes.Terminal.EditBuffer - -Terminal.State = VT + stream + replay + reply -File.State = path + bytes + line index + syntax + undo -Image.State = decoded pixels + render cache -Pdf.State = document + layout + raster cache + search -``` - -`MAX_PANES` is 16 and `MAX_COLS` is 6 (`pardes.MAX_PANES`, `pardes.MAX_COLS`). Sixteen panes -is also why the jump stack's depth is what it is: the depth that matters is -"more visits than you can hold in your head", not vim's hundred. - -== Cells - -```zig -pub const CellStyle = struct { - fg: Color = .default, - bg: Color = .default, - bold: bool = false, - dim: bool = false, - italic: bool = false, - blink: bool = false, - reverse: bool = false, - invisible: bool = false, - strikethrough: bool = false, - ul: enum { off, single, double, - curly, dotted, dashed } = .off, - font_role: FontRole = .body, -}; - -/// One surface cell. `default = true` means -/// "never painted this frame": the shell renders -/// it as the terminal's default cell (vaxis clear -/// semantics). -pub const Cell = struct { - text: [7]u8 = @splat(' '), - len: u8 = 1, - style: CellStyle = .{}, - default: bool = true, - - pub fn grapheme(c: *const Cell) []const u8 { - return c.text[0..c.len]; - } - // ... -}; -``` - -`pardes.CellStyle` and `pardes.Cell`. Seven bytes of `text` because a cell holds a -complete grapheme cluster and not a codepoint: keeping the cluster is what makes -combining marks visible and keeps ZWJ, modifier, flag and Indic sequences in the -same screen cell that cursor and edit maths treat as one unit. `len` bounds it, -and `default` distinguishes "a space was painted here" from "nothing was". - -That distinction is load-bearing twice over. `visuallyEqual` compares only what -a shell can present — bytes past `len` are scratch left by earlier graphemes and -must never manufacture a diff, and an unpainted default cell has no visible -style or text either. And `printableAscii` returns `' '` for a default cell but -`null` for a painted multi-byte one, which is what admits a cell to the ASCII -transition walk (@diff). - -== Columns and panes are arithmetic - -Layout is arithmetic, not objects: columns are weights over the width, panes are -weights over the column. - -#figure( - placement: auto, - caption: [The layout model. Each pane is a narrow gutter strip (move box and - scrollbar) plus a tag row plus a body. `col_weight` is 64-bit fixed point with - 32 fractional bits, so every possible column split divides an initial weight - exactly; `vweight` is an `f32` over its own column. `col_terms[c][k]` is the - pane in slot position `k` of column `c`, and `rects[id]` is where that pane - landed this frame.], - diagram[ - #cetz.canvas(length: 1cm, { - import cetz.draw: * - set-style(stroke: 0.35pt, mark: (fill: black, scale: 0.3)) - let w = 7.6 - let h = 4.5 - - rect((0, 0), (w, h)) - line((0, h - 0.28), (w, h - 0.28)) - content((w / 2, h - 0.14), text(4.9pt, style: "italic")[topbar, execute-only]) - - line((2.8, 0), (2.8, h - 0.28)) - line((5.2, 0), (5.2, h - 0.28)) - line((2.8, 1.8), (5.2, 1.8)) - - let pane(x0, y0, x1, y1, kind) = { - line((x0 + 0.26, y0), (x0 + 0.26, y1 - 0.26)) - line((x0, y1 - 0.26), (x1, y1 - 0.26)) - content(((x0 + x1) / 2, y1 - 0.13), text(4.9pt, style: "italic")[tag: #kind]) - } - pane(0, 0, 2.8, h - 0.28, [file]) - pane(2.8, 1.8, 5.2, h - 0.28, [terminal]) - pane(2.8, 0, 5.2, 1.8, [output]) - pane(5.2, 0, w, h - 0.28, [PDF]) - content((1.45, 2.3), text(4.9pt, style: "italic")[body]) - content((6.4, 2.0), text(4.9pt, style: "italic")[body]) - - line((0.04, -0.3), (2.76, -0.3), mark: (start: "stealth", end: "stealth")) - content((1.4, -0.58), text(5.4pt)[`col_weight[0]`]) - line((2.84, -0.3), (5.16, -0.3), mark: (start: "stealth", end: "stealth")) - content((4.0, -0.58), text(5.4pt)[`col_weight[1]`]) - line((5.24, -0.3), (w - 0.04, -0.3), mark: (start: "stealth", end: "stealth")) - content((6.4, -0.58), text(5.4pt)[`col_weight[2]`]) - - line((5.0, 1.86), (5.0, h - 0.34), stroke: (dash: "dotted"), - mark: (start: "stealth", end: "stealth")) - content((4.2, 3.0), text(5.2pt)[`vweight`]) - line((5.0, 0.06), (5.0, 1.74), stroke: (dash: "dotted"), - mark: (start: "stealth", end: "stealth")) - content((4.2, 0.9), text(5.2pt)[`vweight`]) - }) - ], -) - -Horizontal layout weights are fixed-point integers and geometry rounds -cumulative boundaries. Splitting a column replaces only its weight $W$ by -$A + B = W$ at the same position. Therefore every boundary outside the source -column is bit-identical before and after the split, including at awkward -non-dyadic screen widths; only the source and new column can receive movement -tracks. Vertical splits apply the corresponding rule to the source pane's -weight. - -`splitBelow` shrinks only the source pane; `absorbVWeight` gives a dying pane's -weight to one sibling; an emptied column hands its width to a neighbour. -Minimal motion is the invariant: an operation on one pane may not move panes it -does not touch. - -== Runtime settings are one table - -User-settable runtime choices are one plain `config.Runtime`: booleans, -theme index, owned bounded shell/font strings, requested/effective font facts, -one panel-transition enum, and scene-effect booleans -(`config.Runtime`). A compile-time `settings` array -(`config.Runtime.settings`) generates each setting builtin and the rows of the -single `Config` query. It has no callbacks and no parallel query registry to -drift from it. - -Requested and effective are separate fields on purpose. Resolving a shell name -to an executable, or a font name to a face, belongs to the native host; the core -retains what the host actually chose and marks a changed request `pending` until -the next spawn or the next atlas acknowledges it. A rejected request therefore -stays queryable without claiming it is on screen. - -= Modes and selections - -== Three modes and a boolean - -`Pane.mode` is `enum { normal, insert, tty }` (`pardes.Mode`). - -*normal* is the helix motion model. *insert* is click-and-type: terminals get -splice runs (shift right, never overwrite, anchored to an absolute row), files -get real edits. *tty* is raw pty forwarding — a Ctrl-key toggle, default Ctrl-b, -`--tty-toggle` — where the mouse is still usable, entry does a -`promptClickMove`, and prompts become visible again (they are hidden in the -other two modes via OSC 133). - -Select is not a fourth mode. `v` sets `Pane.select`, a bool on top of normal, -which makes motions extend from a fixed anchor instead of replacing the range; -`pane.mode` stays `.normal`, and insert/tty transitions drop it -(`Pane.select`). It is *displayed* as a fourth mode name, "select", -because that is what the user is in — but nothing in the dispatch branches on a -fourth mode. - -Since the helix motion model landed, a traversal motion SELECTS the range it -crossed. That is why there is no verb+noun grammar and why `i` after `w` types -at the selection's start. - -== One primary range and up to 63 more - -`MAX_SELS` is 64 (`pardes.MAX_SELS`). helix's `Selection` is a list of -ranges plus a primary index; pardes keeps the PRIMARY exactly where it has -always been — `cur_row`/`cur_col` plus `vsel` — and the other ranges in -`sels: [MAX_SELS - 1]SelRange`, document-ordered and disjoint -(`Pane.sels`, `Pane.nsel`). - -That split is the whole design. Every motion, operator, renderer and mouse path -still reads one selection, so with `nsel == 0` not a byte of behaviour moves, and -the differential and snapshot suites keep proving it. The extra ranges are driven -by replaying the single-selection key handler once per range (`replaySels`). - -`s`/`S` — select and split by regex — snapshot the selection they were armed on -in `sel_snap` and re-derive the preview FROM that snapshot on every keystroke, -rather than from the previous preview. This is what helix's `regex_prompt` does, -it is what makes typing a pattern one character at a time land on the same answer -as pasting it whole, and it is what makes Esc a plain restore with nothing else -to undo. The snapshot also records whether the range was a *user-intent* -selection, so restoring cannot silently promote motion residue into something -the acme chords will act on (`Pane.sel_snap`). - -== Three buttons, three meanings - -The mouse selections are `[3]Sel`, one per button, block-shaped, in text-area -coordinates where `r` counts from the tag row (`pardes.Sel`). Each -has three states, `none`, `dragging` and `done`, which is what lets a kept left -selection stay highlighted after the drag and still be distinguishable from one -in progress. - -Left selects and pins the cursor. Middle executes: with no drag it expands to a -file-ish word, then runs a builtin or sends the text to the shell, and it does -not focus. Right looks. A theme owns the SELECTION — `sel_bg`/`sel_fg` are one -pair per theme, and the three per-button tints and the dimmed extra cursors are -mixed off it, so what stays fixed is the distinction between buttons and not the -colours. - -`Drag` is a `union(enum)` with six arms (`pardes.Drag`): `none`, -`border_v`, `border_h`, `move`, `tag`, `select`. `border_v` carries an optional -`corner`: when the press lands on a cell that is both a column's vertical border -and one of the two adjoining columns' own horizontal borders, the one drag moves -*both* boundaries — never three, and when both columns happen to be split at the -grabbed row the left one wins, so the gesture that existed before is bit-for-bit -unchanged. - -== The tag is a command line - -A tag is one line: a live prefix (mode indicator, cwd or path) plus an editable -tail, and the tail gets the full modal editor. The coordinate space is UTF-8 byte -offsets into the *whole* rendered tag, prefix ++ tail, always on grapheme -boundaries (`Pane.tag_col`). The prefix is live chrome, so it is -selectable, yankable and executable but READ-ONLY: every edit op measures from -`edit0` — the first editable byte — and does nothing left of it. - -`tag_tail` is a fixed `[max_tag_tail]u8`, and the bound IS the storage -(`limits.max_tag_tail`): every writer — `appendTag`, `tagInsert`, -`restoreDumpTail`, the 9P `tag` file — refuses input that does not fit -rather than truncating it. The schema limit and the buffer therefore can never -disagree, which is what lets a dump reader reject data before copying it into a -pane. - -A tag edit is always insert mode, so it hijacks the body's mode; `tag_mode` -remembers what it hijacked and terminals restore it on exit, which is why -clicking a tag never changes a pane's mode. - -= Diffing and presenting a frame - -== Eleven transitions - -`layout.zig` is backend-neutral data and math: the transition -vocabulary, easing, exact endpoint progress, stable per-cell noise, and a POD -track. `Transition` has twelve members counting `off` -(`layout.Transition`), with explicit numeric values because they -cross both GUI shader ABIs — GLSL receives the enum in an instance `uvec4` and -the Core Image kernel receives it as a float, so spelling the numbers keeps a -source reorder from changing pixels. - -#table( - columns: (auto, auto, auto, 1fr), - align: (left, left, left, left), - table.header([*id*], [*name*], [*frames*], [*composed by*]), - [1], [`slide`], [12], [backend shader / tty grid], - [2], [`zoom`], [14], [backend shader / tty grid], - [3], [`dissolve`], [10], [backend shader / tty grid], - [4], [`ascii`], [13], [core], - [5], [`vertical`], [12], [backend, lifecycle only], - [6], [`edges`], [12], [core], - [7], [`fall`], [14], [core], - [8], [`wave`], [14], [core], - [9], [`curtain`], [12], [core], - [10], [`scramble`], [12], [core], - [11], [`typewriter`], [14], [core], -) - -The split in the last column is the design. `composedByCore` is true for every -*character* effect: the core writes the finished glyphs into the published -`Surface`, so no backend owns a byte walk, a stagger, or a noise threshold, and -every renderer presents the same byte at a given frame. The geometry effects -(`slide`, `zoom`, `vertical`) and `dissolve` are the ones a backend evaluates, -because they are transforms over rectangles rather than choices about characters. - -Easing follows from that too. A sweep and a typewriter are constant-rate by -definition, so `curtain` and `typewriter` are `linear`: easing their head would -make the pass visibly hesitate mid-pane. Character walks and per-cell locks read -best with a slow start, a fast middle and a slow settle, so `ascii`, `fall` and -`scramble` are `smoother`. - -The core detects opening and moving rectangles when it commits layout and -publishes only active tracks. A separate dense closing-track list is -presentation-only state for a pane whose functional lifetime has already ended, -which is why it needs no pane owner and no serial guard. Pointer input inverts -the presented slide/zoom/vertical rectangle back to the canonical grid, lets -unchanged dissolve and ASCII cells through immediately, and rejects closing -pixels, so pixels and gestures cannot disagree during a transition. - -== The semantic cell diff <diff> - -```zig -pub const PanelCellDiff = union(enum) { - unchanged, - visual, - ascii: AsciiDiff, - - pub fn between( - old: *const Cell, - new: *const Cell, - ) PanelCellDiff { - if (old.visuallyEqual(new)) return .unchanged; - if (AsciiDiff.between(old, new)) |diff| - return .{ .ascii = diff }; - return .visual; - } - - // ... -}; -``` - -`pardes.PanelCellDiff`; the elided member is `changed`, which is -`diff != .unchanged` and is what `Surface.panelCellChanged` calls. The core -retains the last successfully presented canonical grid and this typed old/new -classification, and it is the *semantics* that matter: unused grapheme bytes do -not manufacture a change, and a style-only or multi-byte change is `.visual` and -passes straight through. - -An `.ascii` diff is a `{ from: u8, to: u8 }` pair, and the core composes it by -incrementing or decrementing the printable byte. Short walks move one value per -frame; a longer walk is crossed by eased character skips and finishes within -`ascii_max_movement_frames`, which is 12 -(`layout.ascii_max_movement_frames`). Frame -zero is the exact old byte and the endpoint is exact, so an intermediate frame is -always valid UTF-8. `Track.frame_count` carries the core-computed duration for -these data-dependent effects — zero selects the effect preset, and the ASCII -composer fills it from the longest eased byte walk in the pane's diff. - -== What each backend does with it - -TTY copies that `Surface` grid into a compositor scratch grid, clears slide and -zoom destinations, then paints moving, opening, and closing panels in order. -Cleared geometry uses the theme page colour when it is explicit and the host -terminal default only for transparent themes, so a light theme cannot flash a -dark gap. Slide and zoom change the copied rectangle; dissolve changes only diff -cells from their old value to their new value; vertical raises only an opening or -frozen closing pane inside its own clip. - -Every effect's last active sample is its exact canonical endpoint, so the -compositor returns the source surface unchanged when no track is -non-canonical — keeping the real cursor and attachments in that sample rather -than suppressing them for one frame that is otherwise pixel-identical -(`panel_compositor.compose`). Kitty placements cannot be resampled -through the character-grid transform, so a moving pane's attachment is omitted -while its geometry moves and placed again on the last active sample. - -SDL supplies old/new glyph data, diff flags, final/presented boxes, and effect -parameters to the glyph and native-image shaders. Pixel attachments bypass ASCII -because they have no character byte. macOS passes the same records across its -plain C ABI and composites old/new panel images in Metal and Core Image. Scene -`Crt`, `Ripple` and `Glitch` bits share one full-window pass in each native GUI. - -DOM web is a separate platform, not a shader GUI: retaining selectable HTML and -CSS is more important than duplicating the renderer in canvas, so it exposes -neither effect family. - -`EffectCode <effect>` lists the current backend's build-embedded source paths -under `/virtual`. Look opens each full file without a source checkout. -Shared implementations share paths. - -== The ASCII fast paths - -Three loops in this codebase run once per character over text that is almost -always ASCII, and each asks two or three general functions for what arithmetic -already knows. The guard that makes elision *correct* rather than merely fast is -the same in all three, and it is a statement about Unicode: an ASCII base joins a -following combining mark, ZWJ or spacing mark into ONE cluster, and every scalar -that can do that is non-ASCII. So a printable ASCII byte followed by another -ASCII byte, or by nothing, is a complete grapheme cluster one column wide. - -```zig -// ASCII FAST PATH. Printable ASCII is one byte, -// one cell, one column, and the general path -// below reaches that answer through a UTF-8 -// length, a decode, a freshly constructed -// grapheme iterator, a slice validation and a -// width lookup - per character. -{ - const b = text[i]; - if (b >= 0x20 and b < 0x7f and - (i + 1 == text.len or text[i + 1] < 0x80)) - { - s.set(col, y, text[i .. i + 1], style); - i += 1; - col += 1; - continue; - } -} -``` - -`Surface.print`. Its own comment records the reason -it exists: this function was 26% of a keystroke when profiled in the ESP32-P4's -configuration — 40×12, no tree-sitter — which was the largest single item there. -`\t`, `\r`, the C0 controls and DEL are excluded by the range test and keep their -existing handling. - -The second is `panes.File.fitEnd` (`panes.File.fitEnd`), which decides -where a soft-wrapped row breaks. It asks `modal.nextGrapheme` and -`graphemeDisplayWidth` once per character, and a 640-column line asks 640 times. - -The third is `modal.nextGrapheme` itself -(`modal.nextGrapheme`), and it is where the argument above needs its one -correction. GB3 is the single UAX #29 rule that joins two ASCII scalars: a CR -takes a following LF into the same cluster. The two range-tested loops never see -it, because `0x20..0x7e` excludes CR — but `nextGrapheme`'s fast path admits -every byte below `0x80`, so it excludes CRLF by name. It did not always, and -`graphemeStart` did: the two then disagreed about a CRLF file by exactly one -byte, a head stepped onto the offset between CR and LF, and `graphemeStart` -repaired it back onto the CR. Everything else ASCII is still O(1). - -Because `fitEnd` decides where text lands on screen, a fast path that is off by -one column *moves text*. Both of its tests therefore pin it to the general walk -it replaces rather than to a transcribed expectation: one sweeps every byte -below 0x80 against a set of neighbours at every width and start offset -(*the ASCII run in fitEnd survives an exhaustive byte sweep*), and the other runs a hand-written case list — -including `"abc\u{00e9}def"` for a hand-over mid-run, a wide glyph a width -boundary can land inside, `"a\u{0301}bc"` for a cluster the fast path must not -split, and `"e\u{0301}x"` for an ASCII byte followed by a continuation byte — -through both routes (*the ASCII run in fitEnd cuts where the grapheme walk -would*). `Surface.print` has the same -arrangement: its reference implementation is `print` with the fast-path block -deleted and nothing else changed (the test *the ASCII fast path in surface -print paints what the general arm paints*). - -= Detached sessions <detached> - -#wide(caption: [A detached session. The daemon owns the core and every -machine-local resource; a frontend owns a screen, a keyboard and a clipboard. -Counts and tag numbers from `wire.ClientTag` and `wire.ServerTag`; the routing rules -from `src/detached/server.zig:34-59`.])[ - #diagram[ - #cetz.canvas(length: 1cm, { - import cetz.draw: * - set-style(stroke: 0.4pt, mark: (fill: black, scale: 0.35)) - - // ---- the daemon ---- - rect((0, 2.0), (6.4, 5.5), name: "d") - content((3.2, 5.24), text(7.4pt)[*the daemon* --- `pardes --detach[=name]`]) - line((0, 5.02), (6.4, 5.02)) - content((3.2, 4.74), text(6.0pt)[one `Pardes`; `update` is called here]) - content((3.2, 4.38), text(6.0pt)[every pty master (`host_io.forkShell`)]) - content((3.2, 4.02), text(6.0pt)[every file (`host_io.writeFileBytes`)]) - content((3.2, 3.66), text(6.0pt)[the inotify fd (`file_watch.zig`)]) - content((3.2, 3.30), text(6.0pt)[the theme dir and the acme mount]) - content((3.2, 2.94), text(6.0pt)[16 of 21 `VTable` methods implemented]) - content((3.2, 2.58), text(6.0pt)[ONE `poll(2)` --- the only sleep]) - content((3.2, 2.26), text(5.6pt, style: "italic")[pane shells outlive every frontend]) - - // ---- the socket, drawn in segments so the labels sit in the gaps ---- - line((9.3, 2.0), (9.3, 3.02), stroke: (dash: "dashed")) - line((9.3, 3.46), (9.3, 4.72), stroke: (dash: "dashed")) - line((9.3, 5.16), (9.3, 5.6), stroke: (dash: "dashed")) - content((9.3, 5.78), text(6.2pt)[`AF_UNIX`]) - - // ---- the two directions ---- - line((12.2, 4.7), (6.4, 4.7), mark: (end: "stealth")) - content((9.3, 4.94), text(6.2pt)[`ClientTag` --- 11 tags]) - line((6.4, 3.0), (12.2, 3.0), mark: (end: "stealth")) - content((9.3, 3.24), text(6.2pt)[`ServerTag` --- 8 tags]) - content((9.3, 2.48), text(5.6pt, style: "italic")[a frame per pump, per client;]) - content((9.3, 2.18), text(5.6pt, style: "italic")[never queued, only skipped]) - - // ---- frontends ---- - rect((12.2, 4.35), (18.0, 5.5)) - content((15.1, 5.24), text(6.8pt)[*frontend* --- a terminal]) - content((15.1, 4.86), text(5.8pt)[`--attach`; vaxis paints `grid`/`cursor`]) - content((15.1, 4.52), text(5.8pt)[screen + keyboard + clipboard + a link]) - - rect((12.2, 3.1), (18.0, 4.15)) - content((15.1, 3.90), text(6.8pt)[*frontend* --- an SDL window]) - content((15.1, 3.52), text(5.8pt)[same protocol, same session, same screen]) - content((15.1, 3.22), text(5.8pt)[`screen -x`, not N sessions]) - - rect((12.2, 1.85), (18.0, 2.9)) - content((15.1, 2.68), text(6.8pt)[#sym.dots.v up to `max_clients` = 32]) - content((15.1, 2.32), text(5.8pt)[the 33rd gets a `refuse .full`, not a backlog]) - content((15.1, 2.02), text(5.6pt, style: "italic")[NO FORK HAPPENS IN A FRONTEND]) - - // ---- the message tables, full width ---- - rect((0, -2.8), (18.0, 1.5)) - content((9.0, 1.24), text(7.0pt)[*every message, and which way it crosses*]) - line((0, 1.02), (18.0, 1.02)) - let row(y, body) = content((0.3, y), body, anchor: "west") - row(0.72, text(5.6pt)[frontend #sym.arrow.r core (11): `hello` `bye` `key` `mouse` `resize` `paste` `command` `pdf_scroll` `pinch` `touch_scroll` `pointer_leave`]) - row(0.32, text(5.6pt)[core #sym.arrow.r frontend (8): `welcome` `refuse` `frame` `quit` `detach` | `set_clipboard` `read_clipboard` `open_link`]) - row(-0.16, text(5.6pt)[BROADCAST --- every screen must show the same thing: `frame`, `set_clipboard`]) - row(-0.54, text(5.6pt)[ORIGIN ELSE PRIMARY --- the answer belongs to the human who acted: `read_clipboard`, `open_link`, `detach`]) - row(-0.92, text(5.6pt)[`read_clipboard`'s answer is not a reply message: it comes back as an ordinary `Event.paste`]) - row(-1.40, text(5.6pt)[the gaps `0x13`..`0x17`, `0x1e` were `output` `eof` `lsp_resp` `pipe_resp` `file_changed` `tick`: deleted, not renumbered,]) - row(-1.78, text(5.6pt)[when the daemon took the disk --- a decodable `output` let an attached peer forge a pane's text]) - row(-2.16, text(5.6pt)[never on the wire: `wait_input` (it IS the poll loop), the two informationless frame pushes, the four `pull_`s]) - row(-2.56, text(5.6pt)[that answer their own caller, and `fs_reply` --- with N frontends, N#sym.minus 1 would get an answer they never asked for]) - }) - ] -] - -== The daemon owns the machine - -The `Pardes` instance lives in the detached process. A frontend owns a terminal -(or a window, or a serial panel) and a socket, and nothing else: it sends the -input it collects and draws the frames it is sent. One core per session, N -frontends attached to it, all looking at the same screen — `screen -x`, not N -sessions. - -The argument for putting every machine-local effect in the daemon is one -sentence: a unix socket means the core and its frontends are on the SAME machine, -so there is no question of whose disk or whose process table is meant, and given -that, the process that must hold them is the long-lived one. A shell forked by a -frontend dies with that frontend, and a session whose whole promise is outliving -the frontend attached to it cannot keep its panes that way. So the daemon forks -the pane shells, writes the files, marks the directories, and drains the pty -masters in its own `poll(2)`. The pane shells outlive every frontend: attach, -detach, kill the terminal, attach from another one, and the build that was -running in pane 3 is still running and has been scrolling into the core the whole -time. - -The detached core also serves the default 9P socket. Its event loop drains -filesystem transactions alongside frontend and terminal input. - -Nothing blocks indefinitely, and that property is what a detached session is -*for*. Every descriptor is non-blocking; the single `poll(2)` is the only place -the process sleeps; and every queue that could grow without bound has a ceiling -with a stated answer for reaching it. Frames in particular are NOT queued: a -client with bytes still owed to the kernel is skipped for this frame and its -mirror is left alone, so the next frame it does get is a diff against what it -actually has. A slow frontend therefore sees fewer, larger frames instead of a -growing queue, and coalescing costs no byte surgery. What is left in a client's -out-queue is control messages, capped by `out_backlog` and checked *before* an -append, so a single oversized message still goes out whole and what gets refused -is a client that has stopped draining: it is closed, and its peers are untouched. - -== The wire - -```zig -pub const ClientTag = enum(u8) { - hello = 0x01, - bye = 0x02, - - key = 0x10, - mouse = 0x11, - resize = 0x12, - paste = 0x18, - command = 0x19, - pdf_scroll = 0x1a, - pinch = 0x1b, - touch_scroll = 0x1c, - pointer_leave = 0x1d, -}; - -pub const ServerTag = enum(u8) { - welcome = 0x01, - refuse = 0x02, - frame = 0x03, - quit = 0x04, - detach = 0x05, - - set_clipboard = 0x10, - read_clipboard = 0x11, - open_link = 0x12, -}; -``` - -`wire.ClientTag` and `wire.ServerTag`. Eleven tags in, eight out, and the shape of both -lists is the argument. - -Every `ClientTag` is something a human did: a handshake, a goodbye, and what a -keyboard, a mouse, a trackpad or a window manager produces. Six numbers are -missing from the input run — `0x13`..`0x17` and `0x1e` — and the gaps are left -rather than tidied away, because renumbering is a change every deployed frontend -feels. They were `output`, `eof`, `lsp_resp`, `pipe_resp`, `file_changed` and -`tick`: the machine-local host's own reports, which stopped being a frontend's -business when the daemon took the disk and the process table. Leaving them -decodable was not merely dead weight. `server.zig`'s `apply` routes any decoded -non-resize event straight into `core.update`, so an attached peer could forge a -pane's output, forge an `eof` for a shell that was still running — and unlike the -daemon's own `paneEof` the wire path never called `closePty`, so the master -stayed open and the shell was orphaned for the life of the session — or replace a -pane's text with bytes the next `Save` would write to disk. - -On the way out there are only three effects left, and which three is the whole -design: what a process nobody is looking at genuinely cannot do is put something -on THIS human's clipboard, read it back, and open a link in front of the person -who clicked it. The eight machine-local pushes — `spawn`, `pty_write`, -`pty_resize`, `write_file`, `write_dump`, `watch_file`, `watch_theme`, -`dump_themes` — were routed to ONE frontend precisely because each has one real -resource behind it, and every one of them is now performed in the daemon. Two -frontends can no longer fork two shells for pane 3 or race each other writing one -path, because neither of them writes anything. - -`detach` sits in the session range beside `quit` rather than among the three -effects, because it is not an effect the session performs on the world: it is one -frontend being told it is done. - -Host polling, presentation, process queries and worker dispatch stay local to -the session owner. They are not frontend wire messages. The owner also serves -9P: each filesystem reply returns to its requesting connection, not to attached -frontends. `Event.fs_req` therefore has no `ClientTag`. - -=== The codec is architecture- and build-neutral - -The frontend on the other end may be riscv32-freestanding while the core is -`x86_64` linux, so: every integer is an explicit width, little -endian, and no `usize` reaches the wire; no native struct is ever blitted, because -`@bitCast` of a Zig struct puts this compiler's field order and padding on a -socket; every union and every enum gets a tag chosen in this file and never -`@intFromEnum` of a core type, with exhaustive mapping switches, so adding a -variant to `Event` is a compile error here rather than a silent protocol -redefinition; every variable-length payload carries an explicit length prefix and -`max_payload` bounds the lot; a bool is one byte, 0 or 1, and any other value is a -decode error rather than "nonzero is true"; floats travel as their IEEE-754 -binary32 bit pattern inside an explicit `u32`. - -The codec is build-neutral for the same reason: `Event.resize.cell_pixels` exists only when -native PDF placement is compiled in, and a frontend must not have to have been -built with the core's options, so it is ALWAYS on the wire and dropped on arrival -by a build with nowhere to put it. - -`version` is a `u16` checked on connect and refused loudly, because two builds of -pardes are routinely on one machine — `zig build` replaces the binary under a -running session — and a frontend decoding another version's frame layout would -paint garbage and blame the terminal. `ClientTag` is exhaustive: both ends are -pardes, and an unknown tag is not a valid message in this protocol version. - -`max_payload` is 16 MiB, derived rather than chosen: a full frame of the largest -grid this protocol admits (512×128) at a worst case of one run per cell is -512×128×(6+20) = 1.6 MiB, and one paste is already capped at 4 MiB by the tty -frontend (`wire.max_payload`). - -== Connect first, swap second <swap> - -```zig -if (core.takeAttach()) |req| { - var attempt = detached_client.attempt( - gpa, req.name, core.screen_w, core.screen_h); - switch (attempt) { - .greeted => |client| { - attached.* = client; - break :frames; - }, - else => { - var mbuf: [256]u8 = undefined; - core.setMessage( - req.pane, - attemptEnd(&attempt, req.name) - .row(&mbuf), - ); - }, - } -} -``` - -`tty.localSession`, and the `takeAttach` block in `src/gui/gui.zig` is the same -shape. -CONNECTING IS NOT BEING ATTACHED, which is why this asks for a *greeted* client -and not for a socket: `Client.open` writes a hello and returns, and every way a -session says no — `refuse .version` for a session built from other bytes, -`.full`, `.quitting`, or a plain `quit` from one that ended in the same round — -arrives *after* a successful `connect(2)`. A swap that trusted the connect would -already have SIGKILLed every pane shell, unmounted the filesystem and freed every -undo history by the time it decoded the refusal. - -So `attached` is set only with the welcome in hand, and until it is, nothing has -been touched: a failed `Attach` costs one message row and leaves every pane, -every shell and every undo history where it was. The teardown that follows is -the function's own defers, reached by leaving its scope. - -The ordering is enforced in three places at once. The builtin only asks -(`builtins.Attach`). `Effect.attach` is unpacked into `attach_req` and -`attach_buf` by `perform`, and what the frontend acts on is what `takeAttach` -hands back AFTER the drain, not the effect value, which dies in the loop that -read it (`drainForAttach`). And `takeAttach` is consumed from the shell's -OUTER loop, beside `takeRestore` and for the same reason: both END this core, and -nothing running inside `pump` may destroy the core it is running in -(`Pardes.attach_req`). The unit test *Attach asks for a session and tears -nothing down* asserts -exactly that — after `Attach` and a full drain, `p.quit` is false and `p.panes[0]` -is still there. - -Because a failed connect is cheap, `Attach` is the one word in the session group -that is safe to press by accident, and it is the one that gets a leader chord: -`SPC s a`. `Detach` takes `SPC s D`, a capital because `sd` has been `Dump`'s -since before there was anything to detach from. Both entries sit behind -`if (pardes.can_attach)` in `src/config.zig`, and that gate is not decoration: -the leader table may only name a builtin that EXISTS, so on macOS — hosted, but -no poller — the two words are compiled out and naming them would be a compile -error. Which is the good outcome, and the reason the predicate exists. - -`Detach` is not `Attach` backwards, and the asymmetry is deliberate. Turning a -live local session into a daemon needs `setsid` and a fork; a word that pretended -to would hand you a session that dies with the window it was typed in. Run -locally, `Detach` therefore reports rather than acts. - -== `host_io.zig`: the machine-local half - -`forkShell`, `writeFileBytes` and `writeFd`, and it is now the only copy of them: -`tty.zig`, `detached/server.zig`, `gui/gui.zig` and `macos.zig` all fork and -write through it (`src/host_io.zig`, module header). - -They did not always, and what the four copies had in common is the better -argument for the file existing than "it is shared" is: ALL FOUR were missing -`FD_CLOEXEC` on the pty master. `/dev/ptmx` is opened by `forkpty` with no -`O_CLOEXEC` and there is no flag argument to ask for one, so in every shell -pardes has ever shipped, a program in one pane could read and write another -pane's terminal. The silent half is worse and compounds: closing a master is the -only thing that hangs its shell up, and a master a later shell still holds open is -not closed, so a pane delete or a respawn left an orphaned shell that never -exited — never reaped, eventually blocked writing into a pty nobody reads — and -each orphan pinned every earlier pane's master in turn. The startup drain forks -pane 0 and then pane 1, so the arrangement existed from boot. - -`nested.setCloexec(master)` after the fork fixes it for all four callers at once, -and the file states the window that leaves rather than papering over it: `fcntl` -after `fork` is not atomic, so a thread that forks and execs between the two -syscalls inherits the master anyway. In the detached daemon there is no such -thread — it is single-threaded by construction, which is what putting the pty -masters in its own `poll(2)` bought. Closing the window in the threaded shells -means replacing `forkpty` with `posix_openpt(O_CLOEXEC)` / `grantpt` / -`unlockpt` / fork / `setsid`. - -`forkShell` takes the core it is forking on behalf of and nothing about -terminals: no vaxis, no `Loop`, no reader thread. Who drains the master is the -caller's business, and the callers answer differently on purpose — the tty, gui -and macOS shells hand it to a worker that posts into their event loop; the daemon -adds it to the one `poll(2)` it already runs and makes its own copy non-blocking -in order to. - -= The board - -== An object, not a module - -`-Dplatform=esp32p4` emits ONE freestanding riscv32 object exporting the C ABI in -`src/esp32p4.zig`; the sibling `05-zig-p4` toolchain links it beside its own `_start`, its -generated linker script, and its UART driver (the `pardes-esp32p4` object -`build.zig` emits). Not an -executable, because the entry point is over there. Not a library, because -`addLibrary` bundles a `compiler_rt` the firmware already has. - -Historically, it was a module exposed through `build.zig.zon`. A dependency in the OTHER direction was built and -reverted: nesting this package's roughly 30-package graph under `zig-p4`'s broke -every build in that repo, not just the firmware one. `std/Build.zig:2091` -exceeded its -1000-branch comptime quota through ghostty's `SharedDeps.zig:874` `lazyImport`, -seven cached tree-sitter versions failed to compile because their `build.zig` -uses APIs removed in 0.16, and the fetch materialised 2.6 GB across 42,736 files -into a repo whose entire claim is that Zig is its only dependency. This direction -was possible because `zig_p4` declared no dependencies of its own. The current -editor build no longer imports that package; the firmware toolchain is separate. - -The C ABI carries terminal bytes. After building the object here, `zig build --Dpardes` in `../05-zig-p4` links `src/esp32p4/app.zig` into the firmware image. -That toolchain needs ESP-IDF register headers; the local object build does not. -The standalone GPIO 9P image instead uses `zig build --Dapp=../02-pardes-code/src/esp32p4_9p.zig` there. It does not link the editor: -`src/esp32p4_gpio.zig` holds its fixed namespace and `src/esp32p4_9p.zig` drives -the UART protocol loop. - -The object is also the compile probe. Rooted at `src/esp32p4.zig` it drags the -whole core through the riscv32 backend by actually calling it, so `llvm-size` on -the result is a real number to hold against the board's 1.5 MiB factory -partition. - -Where the terminal is: on the host. The board writes ANSI and reads ANSI, and the -emulator at the far end of the serial line does the font rendering and answers -this program's own capability queries. That is why vaxis works here unmodified — -`Vaxis.render`, `queryTerminalSend` and `enableDetectedFeatures` all take a bare -`*std.Io.Writer`, so the transport is a parameter, while `vaxis.Tty` and -`vaxis.Loop` are termios/ioctl/SIGWINCH bound and are not used. Window size -arrives as DEC mode 2048 in-band resize reports, parsed by `vaxis.Parser` like -any other input, because firmware has no `TIOCGWINSZ`. - -== The memory budget is one table - -`src/memory.zig`'s `limits` contains the board-shaped capacities. These numbers used -to be nine `platform == .esp32p4` tests scattered across nine files, each one a -separate place to forget — and they are not nine decisions. They are ONE -decision, how much memory this build is allowed to spend, taken nine times where -no reader could see the total. - -The original budget table below is historical; `memory.limits` is authoritative. - -```zig -/// `board` is the ESP32-P4 firmware's budget: -/// a 384 KiB heap and a 240 KiB chunk of L2MEM -/// shared between `.bss`, `.data` and the stack. -const board = config.platform == .esp32p4; -/// No OS means no address space to reserve -/// megabytes out of, whatever the platform is -/// called. -const reduced_target = - builtin.os.tag == .freestanding; - -pub const board_heap_bytes = 384 * KiB; -pub const effect_cap = if (board) 128 else 4096; -pub const wrap_rows = if (board) 128 else 256; -pub const cwd_buf_cap = if (board) 0 else 1024; -pub const undo_max = if (board) 16 else 256; -pub const max_tag_tail: usize = - if (board) 512 else 4096; -pub const host_path_cap: usize = - if (board) 0 else 4095; -pub const embedded_sources = !board; -pub const hexdump_row_bytes: u32 = - if (board) 8 else 16; -// ... `arena` below; see the wide listing -``` - -Two booleans derive all of it, and nothing outside this file tests the platform -for a capacity again. Every cap says what it is measured against, and -`board_heap_bytes` is the number the others are measured against: the 384 KiB -chunk of L2MEM at `0x4FF40000`. It is unconditional and not profile-derived, -because it is a fact about the silicon rather than a budget this build chose — a -desktop build that wants to know what the board affords is asking exactly that -question, which is what the memory tests in `pardes.zig` do with it. - -Each cap is a different *kind* of shrink, which is why they are not one scale -factor. - -- `cwd_buf_cap` and `host_path_cap` go to *zero*, and zero is a type: `Text(0)` - is a zero-sized field whose `set` refuses every non-empty path, so the three - producers — the resolved shell, the picked font file, the watched theme file — - report failure instead of storing 12 KiB nothing can fill. This is the - `PdfSlot` rule applied to a capacity: the board has no filesystem, no processes - to spawn a shell for and no font picker. -- `undo_max` and `wrap_rows` shrink *gracefully*. `pushHistory` evicts and frees - the oldest once full, so the smaller ring loses the deepest undo steps and - nothing else. `wrapWidth` reads the array's own length and refuses to wrap a - pane taller than it, so a taller pane renders unwrapped rather than getting a - truncated map. -- `effect_cap` changes *behaviour*, and the file says so: `emit` has always - refused rather than evicted once full, so on the board a burst larger than 128 - effects now drops its tail where 4096 would have held it. That is reachable - only through `emitWrite`, i.e. only if a pty ever appears on this platform. -- `embedded_sources` is a capacity spelled as rodata. The allowlist is empty on - the board, because the table is about 0.95 MiB against a 1.5 MiB partition. - The API is unchanged — `all` is a zero-length array and `find` answers null — so - every caller compiles identically and simply finds nothing embedded. -- `hexdump_row_bytes` is the one that is about the *display* rather than memory. - `hexdump -C`'s sixteen needs 79 columns; the P4 drives 56 of which seven go to - the line-number gutter, so a sixteen-byte row wraps onto a second display line - and the columns stop lining up, which is the entire value of the layout. Eight - fits in 46 and keeps every property that matters. - -#wide(caption: [`limits.arena`. Three tiers, because the address space -differs by four orders of magnitude. The board's tier is deliberately ALL -FALLBACK: every buffer here is a `StackFallbackAllocator`'s static, which lands -in `.bss`, and on the P4 `.bss`, `.data` and the stack share one 240 KiB chunk of -L2MEM while the heap is a separate 384 KiB chunk. A megabyte-shaped reservation -would not fit, and every byte that did fit would be taken from the stack's -neighbourhood to duplicate memory the heap already has. Zero is legal and always -spills, which is exactly what an arena for a compiled-out subsystem should do.])[ -```zig -pub const arena = struct { - pub const pardes = if (board) 4 * KiB else if (reduced_target) 8 * MiB else 32 * MiB; - pub const frame = if (board) 4 * KiB else if (reduced_target) 4 * MiB else 16 * MiB; - // ... - pub const tree_sitter = if (board) 0 else if (reduced_target) 4 * MiB else 16 * MiB; - pub const image = if (board) 0 else if (reduced_target) 64 * KiB else 32 * MiB; - pub const pdf = if (board) 0 else if (reduced_target or !config.mupdf) 64 * KiB else 64 * MiB; -}; -``` -] - -What does NOT belong in this table is capability switches. `terminal_panes`, -`builtins.Board.enabled`, `hosted` and `font_picker` answer "does this build have -the thing at all", which is a question about the platform and not about a budget, -so they stay next to the thing they gate. - -That division is also why a build option selecting the board's budget on a -desktop cannot work, and the file records the attempt. `-Dmem-profile=board` was -meant to let a native test runner compile the board's capacities and boot the -core under them. The dominant term in a boot is `@sizeOf(Pane)`, which carries -the ghostty-vt `Terminal` — 1.1 MiB of it — and what removes that is -`pardes.terminal_panes`, a CAPABILITY keyed on the platform rather than a -capacity in this table. So the option shrank the rings and left the boot six -times over budget, producing a configuration nothing was designed for: -`zig build unit-test -Dmem-profile=board` deadlocked in a futex rather than -failing, because a hosted build with the board's effect ring silently drops -effects a hosted test is waiting on. What DOES test the board's memory pressure -natively is in `pardes.zig`: the grid-scaled cost and the allocation-failure -sweep, both platform-independent and both running on the ordinary build. - -== What the board does not have - -`terminal_panes` is false there and nowhere else (`pardes.terminal_panes`), and it -is a platform gate and deliberately not one derived from the target: `web` is -freestanding too and KEEPS the emulator, because the browser shell renders a -replayed dump. False means ghostty-vt is not in the module graph at all — -`build.zig` never even asks for the dependency — which removes about 400 KiB of -flash, a `PageList` of RAM spent parsing input that cannot arrive, and a pile of -freestanding root hooks (`os.PATH_MAX`, `os.heap.page_allocator`, a cwd handle) -that the core itself does not want. - -Tree-sitter is refused outright: `-Dplatform=esp32p4` with anything but -`-Dtree-sitter=disabled` fails the build, because the grammars' parse tables are -megabytes against a 1.5 MiB partition (`build.zig:298`). MuPDF is refused for the -same reason (`build.zig:297`). - -The board gains four words nothing else has, all gated on -`builtins.Board.enabled == (platform == .esp32p4)`: `Peek`, `Poke`, `Hexdump` and -`Gpio`. Each takes an address or a pin, so none can have a leader path — a key -path names a builtin and can never carry an operand. `Gpio` is the one that goes -through the host seam (@seam) rather than reaching the registers directly, and -`gpio_toggle`'s comment says why: driving a pad correctly is not one -register. It is the IO MUX function select, the GPIO matrix output route, the -pad's drive and input-buffer bits, and the output enable, keyed by a per-pin -table. The firmware already owns that code and checks it against ESP-IDF's own -headers on the die; a second copy in the core would be a second copy nobody -tests. - -`builtins.Board` makes the target the *witness* rather than the gate: `enabled` -is keyed on the platform, and a `comptime` block then refuses to compile if that -platform is hosted, is not freestanding, or is wasm — because whatever else -`esp32p4` means, it has to still be a machine whose addresses are the bus's -(`builtins.Board.enabled`). - -= The control filesystem <fs> - -== Namespace and transactions - -`src/fs.zig` owns Look resolution and the editor's file interface. An ordinary -Look checks the OS first, then the virtual tree. `/n/os` and `/n/self` select -those mounts explicitly; `/virtual` names the embedded and self-reflecting tree. -Named remote mounts live under `/n/<name>` and retain their identity through Save. - -Every native session opens a 9P2000 Unix socket. The wire root exposes `os` and -`self`, without the editor's `/n` prefix. `self/pane/<serial>` contains `body`, -`tag`, `ctl`, `addr`, `data`, `event`, and selection files. Offsets are UTF-8 -bytes. `self/screen` freezes rendered cells and styles for the lifetime of an open. -See `docs/fs.md` for the public paths and commands. - -`src/9p.zig` implements the protocol without OS dependencies; `src/9p_io.zig` -owns native sockets and the client. Requests enter through `Event.fs_req`, and -`Effect.fs_reply` carries replies. A pending event read returns `Status.again`; -the native listener owns waiting and retries. Filesystem mutation runs on the -same thread as editing. - -== Nested Look - -Pane shells inherit `PARDES_9P`, `PARDES_PANE` (the pane serial), and -`PARDES_FORWARD_LOOK`. A child launch resolves its OS-relative argument in -the child's working directory, then writes `look <path>` to the parent's -`self/pane/<serial>/ctl`. Explicit `/virtual` and `/n` paths resolve in the -parent. The ordinary filesystem update performs layout and drains host effects. - -`--nested` starts a separate editor and disables forwarding from its direct -pane shells. Its 9P socket remains available for control and plugins. There is -no executable-name discovery or separate Look listener. - -Detached frontends use `pardes-detached-<name>.sock` in the same runtime -directory. The shared Unix socket conventions live in `src/9p_io.zig`. - -= Build - -#wide(caption: [The build graph. One `root_mod` per invocation, rooted at -whichever file that platform's host enters through; up to three more compilations -of the same graph beside it; one `pardes_config` per distinct *frontend*, which -is the only thing two of them are allowed to disagree about. Line numbers are -`build.zig`.])[ - #diagram[ - #cetz.canvas(length: 1cm, { - import cetz.draw: * - set-style(stroke: 0.4pt, mark: (fill: black, scale: 0.35)) - let row(y, body) = content((0.3, y), body, anchor: "west") - - // ---- tier 1: inputs, full width ---- - rect((0, 6.76), (18.0, 9.5)) - content((9.0, 9.24), text(7.0pt)[*inputs, generated or read at configure time*]) - line((0, 9.02), (18.0, 9.02)) - row(8.72, text(5.8pt)[`highlights.scm` from 29 grammars #sym.arrow.r one options module]) - row(8.34, text(5.8pt)[`vendor/themes/*.toml` (214 helix) and `*.json` (11 zed) #sym.arrow.r 225 generated theme modules plus a `list.zig`, straight into the build cache]) - row(7.96, text(5.8pt)[working-tree `.zig` sources #sym.arrow.r the web shell's read-only source archive]) - row(7.58, text(5.8pt)[8 GLSL shaders #sym.arrow.r SPIR-V through `glslc` --- or `-Dprebuilt-shaders` embeds the committed `.spv` + `.glsl` pair, so `EffectCode` cannot lie]) - row(7.24, text(5.8pt)[`@import("build.zig.zon")`, UNTYPED (`:8`) #sym.arrow.r `zon.version` (`:1920`) and a `comptime` check that `zls_version` matches the pinned sha (`:36-46`)]) - row(6.90, text(5.8pt)[`gitCommit(b)` (`:1855-1867`) #sym.arrow.r `?[]const u8`, null when there is no repository, no `git`, or nothing to say]) - - // ---- tier 2: modules and the options module ---- - rect((0, 3.8), (8.7, 6.6)) - content((4.35, 6.34), text(7.0pt)[*modules that compile* `src/pardes.zig`]) - line((0, 6.12), (8.7, 6.12)) - content((4.35, 5.84), text(5.8pt)[`root_mod` (`:306`) --- its root is the file this]) - content((4.35, 5.50), text(5.8pt)[platform's host enters through:]) - content((4.35, 5.14), text(5.6pt)[`main.zig` (tty, gui) | `web.zig` | `macos.zig` | `esp32p4.zig`]) - content((4.35, 4.74), text(5.8pt)[`hx_core_mod` --- a headless second core for `hxdiff`]) - content((4.35, 4.38), text(5.8pt)[`isolated_mod` --- one comptime bool: no filesystem]) - content((4.35, 4.02), text(5.8pt)[`gui_mod` --- the same `main.zig` at `platform = .gui`]) - - rect((9.3, 3.8), (18.0, 6.6)) - content((13.65, 6.34), text(7.0pt)[`pardes_config` --- ONE PER DISTINCT FRONTEND]) - line((9.3, 6.12), (18.0, 6.12)) - content((13.65, 5.84), text(5.8pt)[`platform`, `mupdf`, tree-sitter tier, `zls_version`,]) - content((13.65, 5.50), text(5.8pt)[`esp32p4_cols`/`rows`, `theme_animation`, `zig_lib_dir`,]) - content((13.65, 5.14), text(5.8pt)[`version` (from the manifest), `commit` (from `git`)]) - content((13.65, 4.70), text(5.8pt)[`ShellConfig` (`:1874-1890`) holds every field that is a]) - content((13.65, 4.34), text(5.8pt)[property of the BUILD, so the two modules a default build]) - content((13.65, 4.00), text(5.8pt)[cannot drift apart in any field but `platform`]) - - line((4.35, 6.76), (4.35, 6.6), mark: (end: "stealth")) - line((13.65, 6.76), (13.65, 6.6), mark: (end: "stealth")) - line((9.3, 5.2), (8.7, 5.2), mark: (end: "stealth")) - - // ---- tier 3: outputs, full width ---- - rect((0, 0), (18.0, 3.3)) - content((9.0, 3.04), text(7.0pt)[*what one invocation emits*]) - line((0, 2.82), (18.0, 2.82)) - let out(y, name, what) = { - content((0.3, y), text(6.0pt)[#name], anchor: "west") - content((4.9, y), text(5.8pt)[#what], anchor: "west") - } - out(2.52, [`pardes`], [`-Dplatform=tty`, the default --- vaxis over a real terminal]) - out(2.12, [`pardes-gui`], [`-Dplatform=gui` --- SDL3, a FreeType atlas, SPIR-V]) - out(1.72, [`pardes.wasm`], [`-Dplatform=web -Dtarget=wasm32-freestanding -Ddump=<dump.zon>`, plus a vanilla DOM shell]) - out(1.32, [`libpardes.a`], [`-Dplatform=macos`, then the `macos-app` step #sym.arrow.r `pardes.app` (Darwin host)]) - out(0.92, [`pardes-esp32p4.o`], [`-Dplatform=esp32p4`; the sibling `05-zig-p4` toolchain builds the firmware image]) - row(0.46, text(5.6pt)[a bare `zig build` emits the FIRST TWO together, because those two are what installing pardes means; every other spelling is one invocation each]) - row(0.18, text(5.6pt)[beside them, from the same graph: `pardes-isolate` (tty only --- the filesystem is not compiled in) and `hxdiff`'s headless core]) - - line((4.35, 3.8), (4.35, 3.3), mark: (end: "stealth")) - }) - ] -] - -== One primary shell, sometimes two - -`-Dplatform` names ONE shell. Absent, the build makes BOTH native shells — the -tty cli and the SDL gui — because those two together are what installing pardes -means, and asking for them one at a time is two invocations a person has to -remember are two (`also_gui` in `build.zig`). Everything else derives from `platform`, -the PRIMARY shell: the one rooted at `root_mod`, the one `unit-test` runs, and -the one the snapshot and harness suites drive. `also_gui` adds the second beside -it and changes nothing about the first. - -A bare `zig build` with an untouched prefix also redirects the install prefix, on -two conditions and the second is not the obvious one: no shell was NAMED -(`-Dplatform=web` keeps writing `zig-out/web`, which its docs name), and nothing -else has already said where to install — no `DESTDIR`, no `--prefix`, no -`--prefix-*dir`. It cannot depend on which *step* was asked for, because -`build.zig` cannot know that: `build_runner` keeps the step names in a local and -resolves them after `build()` returns. That is why the dev binaries install to -`<prefix>/dev` rather than `<prefix>/bin` — `zig build perf` redirects the prefix -too, and a 200 MB Debug benchmark must not land on a PATH. - -The other three platforms are separate invocations: -`-Dplatform=gui` for `pardes-gui`; -`-Dplatform=web -Dtarget=wasm32-freestanding -Ddump=<dump.zon>` for `pardes.wasm` -plus a vanilla DOM shell; `-Dplatform=macos` plus the `macos-app` step for -`pardes.app` wrapped around a static `libpardes.a` on a Darwin host; and -`-Dplatform=esp32p4` for the freestanding object. Any other spelling of the -combination fails on purpose rather than building something silently wrong — the -web target, the web dump, MuPDF on a freestanding platform, and tree-sitter on -the board each have a named refusal (`build.zig:292-298`). The esp32p4 target is -in fact *forced* to `esp32p4_target` rather than taken from `-Dtarget`, so a -`-Dtarget` cannot discard its CPU features, and a wrong one is still an error -rather than silently overridden. - -Because `platform` is comptime and `pardes.platform` is read from -`pardes_config`, two frontends in one build need two options modules — the gui -shell `@cImport`s an SDL the cli must not link. `ShellConfig` gathers everything -`pardes_config` carries that is a property of the BUILD rather than of one -frontend into one value, so the two modules a default build makes cannot drift -apart in any field but the one that is supposed to differ -(`ShellConfig`). `hxdiff`'s headless core and `pardes-isolate` share the -primary shell's, being the same frontend. - -`pardes-isolate` is a third compilation of the same graph whose only difference -is one comptime bool. It cannot be the same binary with a flag, because the point -is that the isolated build does not CONTAIN the filesystem: `look.zig`'s libc -paths compile away, so no runtime mistake can reach a disk that a `--flag` build -still links. Only the tty platform has one — gui adds a GPU it would still need, -and web and macOS are libraries whose host owns `main()`. - -== Generated inputs - -Native dependencies are ghostty, vaxis, uucode (shared config), zstbi, SDL (a -pinned fork, lazy), FreeType, MuPDF (`-Dmupdf`, on by default everywhere but the -web and the board, lazy), ZLS, mvzr (the regex engine behind `s`/`S`), -zig-tree-sitter with 29 grammars for 28 languages (markdown takes two, block and -inline) — all pinned through `zig fetch` and wired in `build.zig`. The board's -`05-zig-p4` firmware toolchain is a separate sibling checkout. - -The 9P library is the one pinned dependency that is not third-party: `cloud9` -lives at `git.sr.ht/~gbrls/cloud9`, pushed as `[email protected]:~gbrls/cloud9` and -fetched from that commit's HTTPS URL, since zig has no `git+ssh` support. - -Generated during the build: `highlights.scm` into an options module; the vendored -helix and zed theme sources into the generated half of the theme ring; -working-tree `.zig` sources into the web shell's read-only archive; and eight -GLSL shaders into SPIR-V. - -The themes go straight into the build cache and are handed over as a module, -rather than written back into `src/`. The output then has no freshness problem to -own — zig re-runs the generator only when a vendored file changes, and a cached -run leaves the compile's inputs byte-identical, so `zig build` with nothing -touched still does nothing — there is nothing to gitignore, and no stale `.zig` -can survive a deleted source. The INPUT list is read from the directory rather -than written out, so adding a theme is dropping a file in, and each file goes in -as a content-hashed argument, which is what makes that new file re-run the step -and nothing else. The generator is compiled in Debug on purpose: it runs for -about 40 ms, and every core module imports what it generates, so its compile is the -first link of every cold build; ReleaseSafe cost 16 s of compile to save 47 ms of -run time, and the files it writes are byte-identical either way -(`theme_gen` in `build.zig`). - -The shaders are the only build input wanting a tool a stock machine lacks -(`glslc`), so they are also the only one whose output is committed: -`zig build shaders` refreshes each paired `shaders/prebuilt/*.spv` binary and -`.glsl` source snapshot together. `-Dprebuilt-shaders` embeds that exact pair -rather than shelling out, so `EffectCode` cannot describe different shader text -from the binary on screen; this is also what lets a gui build need nothing but a -C toolchain. - -The tutor and the embedded font are plain `@embedFile`s, not codegen. Debug builds -are incremental for the seconds-loop; release builds are the product. - -== Versioning - -There is one version string in the tree and it is in the manifest. - -```zig -// build.zig:8 -const zon = @import("build.zig.zon"); -// ...in shellOptions, build.zig:1915-1923: -o.addOption([]const u8, "version", zon.version); -o.addOption(?[]const u8, "commit", cfg.commit); -``` - -The `@import` is UNTYPED on purpose, and that is what makes it possible: -annotating its type would demand an exact field match and reject -`.dependencies`, `.paths` and the rest, which is the failure the hand-synced -literal that used to sit there was working around. - -```zig -// src/pardes.zig -pub const version = @import("pardes_config").version; -pub const commit: ?[]const u8 = - @import("pardes_config").commit; - -// src/main.zig -const version_text = if (pardes.commit) |c| - "pardes " ++ pardes.version ++ " (" ++ c ++ ")\n" -else - "pardes " ++ pardes.version ++ "\n"; -``` - -Both halves are comptime, so `version_text` is one string in rodata and -`pardes --version` is one write (`main.version_text`). - -`gitCommit(b)` runs -`git -C <build root> rev-parse --short=12 HEAD` at CONFIGURE -time, so the binary carries a string rather than the ability to shell out. That -is the whole point: a `--version` that runs `git` itself reports the tree it -happens to be standing in rather than the one it was built from, and on the board -there is no `git` to run and no process to run it with. The `-C` is not -decoration either — `zig build` may be run from anywhere, and a `git` resolved -against the cwd would cheerfully answer about a different repository. - -Absence is not an error and must not be. A release tarball has no `.git`, a -container may have no `git` binary, and a source drop is not a repository; every -way of having no answer lands on the same `null` and the frontends print the -version alone. It is deliberately NOT `--dirty`: marking a dirty tree would cost -a worktree stat on every configure and — the real cost — would change -`pardes_config` on every file edit. Every module in the build imports that -options module, so a dirty marker means editing one line rebuilds the world. The -commit alone changes only when a commit does. - -The manifest is read at comptime twice, and the second read is what keeps the -one string this build cannot fold into the manifest honest. `zls_version` -(`zls_version`) has to be spelled beside `.dependencies.zls.url`, because the -semver half of it — `0.16.1-dev` — exists nowhere in the manifest, and ZLS's own -`build.zig` needs it: that file otherwise shells out to `git describe`, which -fails on a fetched package with no `.git`. So the duplication is unavoidable and -a `comptime` block beside it makes the two AGREE instead: it takes the -short commit after the `+`, takes the sha after the `#` in -`zon.dependencies.zls.url`, and `@compileError`s unless the pinned sha starts -with it. A `.zon` bump that forgets the line beside it is now a build error -rather than a `SPC l i` naming an analyser nobody linked. - -= Testing: the old program is the oracle - -Before the rewrite compiled, the prototype got a harness (`test/snapshot.zig`, -the `zig build snap` step): it forks either binary in a pty, feeds it an *event -script* (one line per input: keys, SGR mouse, resizes, sync points), and captures -the rendered grid — text, cursor, and per-cell style runs — through its own -ghostty terminal. Goldens are generated from the old binary -(`zig build snap -- --update`); the new binary must reproduce them byte for byte. -Eighteen scripts covered the checklist in Appendix A at the rewrite; ninety-five -cover it and everything since (`test/snapshots/` holds 95 `.snap`/`.golden` -pairs). All pass. - -Determinism pins: fixed workdir paths (they appear in tags), a controlled `$HOME` -with `PS1='$ '`, `LC_ALL=C`, and a grid-stability sync primitive instead of -timing guesses. - -Two of those pins were doing damage rather than work. - -== Deltas, not screens - -A capture used to restate the whole screen, so 82% of golden lines were a copy of -the line above (`test/snapshot.zig:59`), every golden carried the topbar and a tag -row, and adding one builtin word to a tagline rewrote 78 of them — 3,758 lines of -diff for a change no test was about. A capture is now a *delta* against the -previous capture of the same kind in the same script: the first is the whole -screen, the rest are only the rows that changed. The corpus went from 16,700 lines -to 5,722 and the same one-word edit now moves 337 (`src/CHANGELOG.md:9-13`). A -capture whose only change is the cursor is the empty delta its script always -meant. - -== A click names a word - -A click used to name a screen column, which is a coordinate into that same -chrome. When `Newtty`, `Joincol` and `Changelog` were added, seven scripts began -clicking the word next door. `snapshot.zig`'s own note enumerates six of them: -`tutor.snap` clicked `Grep` where it meant `Tutor`, `exec.snap`, `respawn.snap` -and `tagalign.snap` clicked `Newtty` where they meant `Del`, `find.snap` clicked -`Joincol` for `Find`, and `windowops.snap` clicked `Tutor` for `Debug` — and -`--update` blessed all of it, so 256 golden lines were green while asserting the -opposite of their script's first line (`test/snapshot.zig:817-825`). The seventh -is the changelog's: `tagbottomimage.snap` clicked blank space 176 columns from -the `Del` whose effect it asserted (`src/CHANGELOG.md:9-11`). A click may now -name the word (`press middle @Del 2`, `@Del#2` for the second pane on a row, -`@Save-2` for a column beside one), so the word is either there to be clicked or -the script fails. - -== Regeneration verifies itself - -Regeneration was the other half of that failure: `--update` captured once, -serially, and wrote whatever it saw, which is how six wrong clicks became -goldens. It now captures in parallel at the widest probe settings the harness -has and then runs the ordinary verify pass over what it wrote, so a capture that -does not reproduce is reported instead of committed — 77 s to 41 s, and the retry -machinery serial update never had (`src/CHANGELOG.md:14-16`). - -== Deviations kept after review - -Three deliberate deviations surfaced by the oracle and kept. - -The greeting `ls` waits for the exact OSC 133 B input mark after the real resize; -the prototype raced bash's startup and won only by allocator luck. Shells without -prompt integration omit that cosmetic greeting rather than guessing. Commands -which create a fresh shell are owned by its terminal pane until the host reports -the actual prompt capability, then wait for the same mark when it exists. - -Dump files compare with base64 pty history elided: it encodes prompt-redraw -micro-timing, not state, and the cleaned text fields are the contract. - -Typed insert runs do not survive a dump replay. They are an overlay, not pty -bytes, and the prototype's replay viewer had the same semantics. - -== The shell suites - -Shell correctness is no longer out of scope, and that is the biggest change to -this section since the rewrite. `web-snap` and `web-e2e` drive headless Chromium -over CDP with real DOM pointer and touch events and diff `test/web-snapshots/`; -`image-harness` and `pdf-harness` snapshot native PIXEL output through kitty -graphics and SDL; `macos-e2e` is an offscreen AppKit snapshot suite over its own -seven scripts (`test/macos-snapshots/`: boot, cwd, drop, font, keys, rotate, -trackpad). In the sibling `05-zig-p4` toolchain, `zig build selftest` flashes and -runs `src/esp32p4/selftest.zig` on real hardware. The local freestanding object -and the standalone GPIO 9P image can both be compiled without a board attached. - -Two suites are differential rather than golden: `hxdiff` compares the core's -motion and operator results against helix case by case, and `hxparity` compares -editing a file against editing the same text in a pty — which is what the -per-pane ghostty-vt `Terminal` buys. - -What remains untested by a snapshot is the last hop — that vaxis diffs correctly -onto a real terminal — plus each shell's inline unit tests (the FreeType atlas -raster, the trackpad and rotation maths, the gamepad replay). - -= Style - -TigerStyle, plus house rules proven in the prototype: imperative and flat; one -big `update` dispatch, not handler objects; no one-line helpers — inline the -four-line scan; assert invariants at entry (`assert(vsum > 0)`); static -allocation at init, arenas per frame. - -The rewrite used source size as a pressure toward direct code, and that remains -useful when a refactor deletes duplicate policy or state. A checked-in line-count -inventory does not: it goes stale whenever a pane kind, backend, or generated -asset moves. Measure the current tree when making that comparison; keep this -document about ownership and invariants that should survive the next edit. - -Two things that number is not. It is not one program's worth of growth — the -macOS, web and firmware shells and the PDF and language work are several products -sharing a core. And it is not licence: the rule that survives is the local one, -that a change should leave the file it touches no longer than it found it. - -= What is deliberately absent - -No render abstraction over the shells: the surface *is* the abstraction. No -plugin system, because the control filesystem is the extension point -(@fs) and needs no API of its own. No async runtime in the core — the -shells may thread, the core is single-threaded by construction. - -"No config files" held until the startup file (`docs/config.md`) arrived, and that -is the narrowest thing the phrase could still cover: a list of builtin COMMANDS -run before the first frame — no schema, no new vocabulary, and no key remapping. -The keymap is `src/config.zig`, compiled in, where a wrong binding is a compile -error rather than a silent no-op. - -#heading(numbering: none)[Appendix A: feature parity checklist] - -From the prototype survey; every line is covered by at least one of the event -scripts in `test/snapshots/` — the original eighteen (boot, tty, edit, scroll, -modal, look-file, look-dir, exec, tag, theme, tutor, windowops, dump, load, -ttyonly, syntax, fileedit, images), and seventy-seven more added since for -everything below that the prototype never had. - -*Layout.* Columns by weight (≤6), panes by vweight (16 panes in total, not -per column); global topbar; -per-pane gutter (move box + scrollbar) and tag row; `splitBelow` shrinks only -the source (cursor row kept visible); `Newcol` takes width only from the source -column and cannot resize any unrelated column; dying pane's weight absorbed by one -sibling; emptied column hands width to a neighbor; border-drag resize on a -pane's own trailing edge (v and h), hover shows `╎`/`╌` glyph-only hints; -corner grab moves exactly two boundaries; -move-drag via the gutter box with preview; Alt-n new shell below, Alt-c move -pane to new column; Ctrl-w h/j/k/l directional focus; body-normal Esc hops to -the pane you were in before this one, alternating between two (the same -builtin as SPC j j); -`--tty` single-pane mode. - -*Mouse.* Left: select (block, stays highlighted after drag, pins cursor, -enters normal), click clears, tag-row click enters tag edit, scrollbar -click scrolls up-to-row (right button: down), border/move drags. Middle: -execute — no-drag expands to file-ish word (alnum `.-+/:@_~`); builtin or send -to shell; does not focus. Right: look — peel `:NNN`, resolve against the -clicked pane's dir (`/proc/pid/cwd`, or a file's dirname) and, if that fails, -against every other live pane's, most-recently-focused first (the jump stack -backwards, duplicate dirs skipped; absolute words try one dir and stop) so a -relative name is openable from any window that can see it; dir → shell + `ls` -in source column (dedup by cwd), file → file pane at line (dedup by path, -first doc opens left column and may evict a lone pristine shell; later docs -split below the existing doc — an output pane, `+Search`/`+Help`, is not a -doc for either half of that rule: it never claims a column, it splits below -whatever pane asked for it, and nothing splits from it), image ext → image -pane, `.pdf` → PDF pane. Ctrl+left is goto-definition, the one chord borrowed -from every editor with a language backend. Two spellings the word expansion -has beyond a path: `` @`ls -la` `` is taken WHOLE and runs as a command rather -than opening as a file, and `@p7:10:5` addresses a live pane by number for the -things — terminals, output buffers — that have no path to name. -Middle+left chord: kept -left selection appended as trailing CLI argument. A stationary pointer gets a -delayed, theme-derived highlight of the exact side-effect-free selection that -Look would expand; it neither focuses nor installs that selection, and pointer -leave/input/content invalidation cancels it. Wheel: scroll hovered pane, batched. - -*Modes.* normal: helix motions (`h j k l w b e W B E 0 $ ^`, `f F t T` and -`Alt-.`, counts, `gg ge gh gs gl g| G`, `Ctrl-d/u/f/b`, `zt zz zb zj zk`), -insert entries (`i a I A o O`), selections (`v` extend — displayed as a fourth -mode name, "select" — `x`/`X`/`Alt-x`, `%`, `;`/`Alt-;`, `_`), MULTIPLE CURSORS -up to 64 (`C`/`Alt-C` copy, `s`/`S` select and split by regex with a live -preview, `Alt-s` split on newline, `,`/`Alt-,` keep and remove the primary, -`)`/`(` rotate, `Alt--`/`Alt-_` merge), operators (`d c y p P R u U`, `Alt-d` -delete-noyank, `J`, `>`/`<`, `~`/`` ` ``/`` Alt-` ``, `Ctrl-a`/`Ctrl-x`, -`Ctrl-c` comment-toggle), textobjects and surrounds under `m` -(`mm mi ma ms mr md`), the `]`/`[` pairs (`]p ]d ]D ]<space>`), `/` with `n`/`N`, -`|` to filter the selection through a command, `:` for the tag as a command -line, and Enter=look Tab=execute at cursor. Since the helix motion model -landed, a traversal motion SELECTS the range it crossed — which is why there is -no verb+noun grammar and why `i` after `w` types at the selection's start. insert: -click-and-type; terminals get splice runs (shift right, never overwrite; -absolute-row anchored), files get real edits. tty: raw pty forwarding -(Ctrl-key toggle, default Ctrl-b, `--tty-toggle`), mouse still usable, -promptClickMove on entry, prompts visible (hidden in the other modes via -OSC 133). `y` fills the yank register and `p` pastes it; neither touches the -system clipboard, which is helix's five words — `SPC y/Y/p/P/R`, out via -`set_clipboard` and back via `read_clipboard` — and nothing else, so a delete -cannot clobber what the desktop was holding. A paste from an outer terminal -arrives bracketed, as one `paste` event. - -*Tag.* Compact name/status prefix + editable command tail. File names support -staged edits: Enter commits a new buffer save target, Escape cancels, and no -disk rename or write happens until explicit Save. Terminal cwd and image/PDF -status stay generated. Save leads the tail of every pane holding text of its own: -`Save Tty Del Collapse` for a file or an output buffer, -`Save Tty Del Togglettymode Filter Collapse` for a terminal, and `Tty Del Collapse` -for an image. PDFs use `Tty Del PdfSections PdfTint Collapse`, without tint status text. -`Collapse` toggles a pane between its tagline alone and its expanded height; -hidden body contents and running terminals are retained. -An unsaved file has `*` after its name; an image tag -reports -`img petscii:<on|off> palette:<commodore|terminal> ascii:<on|off> <path>` -before the ordinary tail (its renderer toggles are builtins under `SPC t -p/l/a`). Topbar: -`Newcol Joincol Find Grep Help Changelog Tutor Dump NextColor Debug Kill` — -editable by left click, with keyboard command navigation and Exec/Look gestures. -An additional editable tag in each column supplies local New, Tty, Find, -Grep and Joincol commands. ColumnTags hides that row when space is tight; -Colors and Crt left it for their leader paths. - -*Panes.* Terminal: ghostty-vt, 16 MiB scrollback, OSC 133 prompt semantics, -OSC 7 cwd, DSR/DA/kitty-query replies (write_pty + device_attributes — the -nushell/helix regression), a default-on pane-local Filter which uses ghostty-vt's -theme-derived 256-colour generation and keys rendered cell foreground/background -truecolour and OSC overrides through that palette without mutating emulator state, -greeting `ls`, auto-follow output unless -navigating. File: line-number gutter (fixed width), tree-sitter highlights -(c/cpp/zig minimal tier; 26 grammars full tier; re-highlight on edit, -visible-range first), Save, open-at-line, undo/redo. Image: zstbi decode, -kitty graphics when available, petscii matcher fallback (C64/terminal -palettes, ascii glyph set toggle). PDF (`-Dmupdf`, native default on): MuPDF -rendering as one continuous page strip, real text search, mouse text -selection, the document outline into `+PdfSections`, fit-width/fit-height and -a themed duotone tint — the last three named in the pane's own live tag. -Embedded PDF links use the ordinary right-click Look gesture. Hovering one -shows an accent highlight and a pointing hand in graphical frontends; dragging -still selects text. Internal links reveal their page and anchor. When the -annotation's visible label resolves to a different Look location, a `+Links` -output lists the visible destination and the embedded destination for you to -choose with Look. Internal destinations in that list use `document.pdf:page`. -Labels that are not locations follow the embedded link directly; identical -destinations open once. Links use the same supported URL and file-location -rules as Look. -Tutor: embedded text as file pane. - -*Language.* The native host snapshots each request and runs it outside the UI -loop. Zig uses the in-process ZLS backend; configured external language servers -use the JSON-RPC client. Results become output rows or edits, applied only while -the request's pane and revision still match. Web and board builds have no -language backend. See `docs/lsp.md` for configuration and commands. - -*Chrome.* One theme per `.zig` file, folded into the ring at comptime: ours -first — helix (default; near-black page, chrome one grey-ramp step off it, -colors lifted from the helix editor's own theme), dark, and the acme-light one -named simply `acme` — then -everything `tools/gen_themes.zig` exports at build time out of the vendored -helix `.toml` and zed `.json` sources in `vendor/themes`, which is all 214 helix -ships plus zed's 11, sorted by name. Names are unique by construction: helix's -own acme is vendored as `acme_helix.toml` so it cannot collide with ours, and -every zed theme takes a `_zed` suffix for the same reason. helix and dark leave -a child's ANSI palette native; acme and the zed exports resolve it onto -the page so shell output stays readable on a light one. A theme owns the page, -the tag bar, the gutter, the move box and the SELECTION: `sel_bg`/`sel_fg` are -one pair per theme, and the three per-button tints and the dimmed extra cursors -are mixed off it, so what stays fixed is the distinction between buttons and not -the colours. `NextColor` browses the ring one -step at a time — at 228 it is no longer how you REACH one — -`Theme <name>` jumps to one and `ThemeSel` (`SPC t t`) lists them all into an -output buffer whose rows are those very commands — execute a row (Tab, middle -click) and the theme goes on; n/N select such a row WHOLE, since a command -line holds no place to pick out of it — the third grain of that motion, the -other two being one stop per ROW in a results list (the location at its head, -never the matched text after it) and every look-able word in free text. Native -shells also accept `ThemeFile <path>`: one complete ZON `Theme`, loaded at -runtime and, where document watches are available, watched with the same -parent-directory/rename-over semantics. `DumpThemes` materializes the compiled -ring under `<config>/themes/builtin/`, providing the schema and a copyable -starting point without adding inheritance or a second theme vocabulary. -Colors toggles -all recolor passes; Debug stats overlay; Dump writes state ZON. Eleven panel -transitions and three scene bits are settings, one builtin each, generated from -`config.Runtime.settings`. - -*Session.* `--detach[=name]` runs a core with no terminal; `--attach[=name]` -makes a thin frontend over a unix socket; `Attach [name]` (`SPC s a`) hands a -running frontend's screen to a detached core, connecting before it swaps; -`Detach` (`SPC s D`) leaves a session that carries on. Up to 32 frontends on one -session, all showing the same screen; the pane shells belong to the daemon and -outlive every frontend. The default 9P socket serves the control tree; a nested -`pardes <file>` hands its argument to the outer session over the per-pid socket. -`pardes --version` prints the manifest version and the commit it was configured -from. - -*Web (replay viewer parity).* Embedded dump; focus, border/move drags, wheel, -scrollbar, Colors/NextColor, and link-LOOK opening a new -tab (new — the prototype has no web link handling). One-finger touch is -deliberately complete by itself: tap = LOOK; drag past a small slop = natural -scroll, with no LOOK on release. A build-generated read-only archive lets LOOK -open the current contents of tracked or new/nonignored Pardes `.zig` files despite the web -shell having no host filesystem. The published launcher dump is captured from -a running Pardes TTY after -`git ls-files --cached --others --exclude-standard -- '*.zig' | sort`, so its -complete terminal listing is the same tracked-plus-new/nonignored set the user -can open. The freestanding module carries no host -libc, SDL, or WebGL; Tree-sitter's C runtime and the selected parsers link into -the module through a tiny local ABI shim (Zig is the compact web default). A body gesture retains -tap-LOOK/drag-scroll, but finger-down on -a tagline or a one-cell-tolerant pane separator latches to a left-mouse gesture -for its lifetime, keeping layout drags out of the scroll heuristic. Touch -input translation and scroll/tap state live entirely in the JavaScript shell. -The native SDL shell uses a FreeType light-hinted grayscale atlas over the SDL GPU API (SPIR-V). -The browser exposes each cell as selectable, inspectable text and applies the -surface styles with CSS. The browser `.snap` harness drives real Chromium touch -input and reads both text and per-cell styles from the DOM renderer's packed -surface. Joystick cursor for the steamdeck is *new* scope — the prototype ships -no gamepad input. - -*Board (ESP32-P4).* A 56×14 grid by default (`-Desp32p4-cols`/`-rows`), 384 KiB -of heap, no ptys, no tree-sitter, no MuPDF, no filesystem of its own, and no -embedded source table. vaxis unmodified over a byte sink the firmware supplies; -DEC mode 2048 for resizes. `Peek`, `Poke`, `Hexdump` (eight bytes per row) and -`Gpio` exist only here, and `Gpio` goes through the host vtable because the pad -sequence belongs to the firmware that already tests it against ESP-IDF's headers -on the die. diff --git a/docs/detached.md b/docs/detached.md deleted file mode 100644 index 2111e3dc..00000000 --- a/docs/detached.md +++ /dev/null @@ -1,63 +0,0 @@ -# Detached sessions - -A detached session owns the editor core, pane shells, files, undo history and -layout. TTY and SDL frontends can join and leave without ending the session. - -```sh -pardes --detach=work & -pardes --attach=work -pardes-gui --attach=work -``` - -Bare `--detach` names the session after its process ID. Bare `--attach` -requires exactly one listening session. The detached process runs in the -foreground unless the shell backgrounds it. - -Inside an editor, `Attach work` (`SPC s a`) switches the current window to -that session. `Detach` (`SPC s D`) closes only that frontend. It does not -turn a local editor into a detached session. - -## Files and transport - -The frontend socket is `pardes-detached-<name>.sock` under -`$XDG_RUNTIME_DIR`, or `~/.local/state/pardes` when no runtime directory is -set. A second session cannot replace a live listener with the same name. -Shared Unix socket handling lives in `src/9p_io.zig`. - -The session also opens its default 9P socket. Optional TCP and QUIC listeners, -runtime mounts and the control filesystem belong to the session, not its -frontends. See [fs.md](fs.md). - -## Ownership - -One poll loop owns all core mutation, frontend connections, PTY I/O and file -watch notifications. LSP and selection-pipe workers own request snapshots and -post completions through a bounded mailbox. Each subprocess is reaped by its -owner; PTY reaping cannot consume a language server or filter's exit status. - -Restore constructs a replacement core before changing the current one. It then -joins old work, clears obsolete completions, replaces panes and watches, and -sends a fresh frame to the existing frontends. - -Frontends provide input and presentation. Clipboard writes are broadcast; -clipboard reads, browser opens and Detach go to the originating frontend, -falling back to the primary attachment. Frontends never spawn pane shells, -write session files or install file watches. - -## Wire and tests - -`src/detached/wire.zig` owns the versioned frontend protocol. Frames are full -grids or changes relative to each frontend's last queued frame. A new -attachment receives a full grid. Output queues and per-poll work are bounded; -a lagging frontend cannot hold the session's event loop. Protocol version 6 -also carries the pointer shape, compact source-context body layers, source-gap -separators and independently sized tag text. Pointer -updates work even when no grid cells change, and graphical clients use the -same compact row and tag geometry for drawing and mouse input. Tag text positions -are separate from physical pane and drag-handle coordinates. Terminal clients retain -the ordinary fixed grid. - -`zig build unit-test` covers encoding, session ownership, real frontend -connections, worker completion and Restore. `zig build fs-test` drives -detached sessions through an independent 9P client. The snapshot suites also -exercise attach, detach and shared screen behavior. diff --git a/docs/diff-pager-proposals.md b/docs/diff-pager-proposals.md new file mode 100644 index 00000000..f75361df --- /dev/null +++ b/docs/diff-pager-proposals.md @@ -0,0 +1,164 @@ +# Diffs in a pager: what delta does, what pardes could + +Proposals, 2026-10-01, none decided. They come from reading delta, +diff-so-fancy and difftastic (all in `~/05-genizah/`) against pardes as of +`3815a0bf`, the commit that made `pardes -` a terminal's `PAGER` and +`GIT_PAGER`. The rule kept throughout: the pane's text stays the plain +text git printed, and whatever is added is something a look or an exec +can act on. + +## How the others read a diff + +**delta** reads stdin a line at a time and keeps each line twice: the raw +bytes and a copy with the ANSI stripped (`delta.rs:235`). Every match runs +on the stripped copy, so git's colour does not change the parse. The raw +copy is kept for two cases where colour is the information: a hunk line +whose colour is not git's plain red or green (`--color-moved`), and every +line under `--word-diff` or `--color-words`, which pass through as git +coloured them (`hunk.rs:136-171`). A state machine (`delta.rs:20-38`) moves +on `commit`, `diff`, `---`/`+++`, `@@`, and the `-`/`+`/space prefixes, with +further states for merge conflicts, submodules, `git blame`, `git grep` and +`git show REV:path`. Which git command it is reading it learns from its +parent process's command line (`utils/process.rs`), down to scanning the +pids next to its own. Within a line, it pairs each removed line with the +first added line within 0.6 edit distance, tokenises both on `\w+` and +aligns them (`edits.rs`, `align.rs`). Its OSC 8 links name only the new +side's `file:line`. `--navigate` writes `Δ` and `•` before file and hunk +headers and puts a search for them into a copy of less's history file, so +that `n` finds them. + +**diff-so-fancy** matches git's colour codes where they appear, colouring +for itself where there are none. It rewrites the diff for show: file +headers become a box, `@@ -a,b +c,d @@` becomes `@ file:N @`, and the +`+`/`-` markers go, leaving old against new to colour. Within a line it +uses git's diff-highlight, which pairs lines only in a block with as many +added as removed lines, and marks what lies between a common prefix and a +common suffix. Behind `OSC1717=V1` it emits a per-line escape carrying the +line's kind, its old and new numbers and its path. It is the only one of +the three whose output gives every line its place in both files. + +**difftastic** reads no diff. Git runs it as the diff program +(`GIT_EXTERNAL_DIFF`) and hands it both whole files. It parses each with +tree-sitter and finds the cheapest set of changes with Dijkstra, falling +back to a line diff past 1 MB, 3M graph vertices or any parse error. What +it prints is not a patch: change is shown only by colour, and its JSON is +unstable and counts lines from 0. + +## What pardes does now + +`pardes -` reads stdin, strips terminal escapes (`stripEscapes`, +`main.zig`), and puts the text in a `<cwd>/+Pager` pane. Git starts its +pager at the top of the work tree even when run from a subdirectory +(checked), so `<cwd>` is already the base git's repository-relative paths +need. + +A pane that is a diff is read by `src/diff.zig`. It is already at delta's +level, or past it: + +- A hunk's end comes from its `@@` counts, as patch reads it, so a removed + `--- x` line is never taken for a header. delta only counts this way for + a plain `diff -u`. +- `syntax.highlightDiff` colours each hunk's old side and new side each as + one piece in the file's own language, so a string or a comment that + spans lines colours as it does in the file. delta runs one highlighter + through the removed lines and then the added ones. +- git's other prefixes (`c/`, `i/`, `w/`, `--no-prefix`) are understood, and + so are rows a terminal wrapped. +- A look on any line goes to the place it names (`look.zig:1573`): a file + header to the file, an `@@` or a hunk line to `path:N`. delta's links + are the nearest thing it has. + +## Gaps + +1. **A +Pager pane is never a diff.** Whether a pane is coloured and looked + at as a diff is decided by its name ending `.diff` or `.patch` + (`panes.zig:451`); only a finished command pane is checked by content + (`looksLikeDiff`, `File.zig:1545`). So `git log -p` in a terminal pages + to plain text, with no colour and no look on its lines. (From reading + the code, not yet run.) +2. **Some of what git says is only colour, and stripping loses it.** With + `git diff --color-words`, `foo(1)` changed to `bar(1)` arrives as + `let x = foo(1);bar(1);` (checked). `--color-moved` loses its moved + blocks the same way. +3. **No changed words within a line**, which is most of what people use + delta for. +4. **Nothing for commits or blame.** A `git grep` line, `path:N:text`, is a + look already. + +## Proposals + +### A. Read +Pager as a diff when it is one + +Either `colorAlgo` checks a +Pager pane's content with `looksLikeDiff`, or +`pardes -` names the pane `+Pager.diff` when what it read is a diff. The +name has the merit that a 9P client, or a reader of the tag, sees what the +pane is. Either is a few lines, and everything in `diff.zig`, the +painter and the look comes along. Leaning to the content check, so that a +name always means where the text came from. + +### B. Turn colour that carries meaning into git's own text + +While stripping, a red or green run inside a hunk line under word diff +becomes `[-foo(1)-]` or `{+bar(1)+}`: exactly what `git diff +--word-diff=plain` prints. The pane stays plain text, searchable and +editable, and says what the colour said. `--color-moved` has no text form +in git; it can be kept as a style layer beside the text, dropped at the +first edit, or let go. + +### C. Changed words within a line, drawn only + +Pair removed lines with added ones and align their tokens as delta does +(edit distance, then an alignment table), and set an emph bit in the +style bytes beside `diff_added`/`diff_removed`. The text is untouched. A +change made only of whitespace, an indent or a gap, is not marked (the +patch carried in our own delta build, `local-patches` in the genizah). +Later, the tokens could be tree-sitter's leaves in place of `\w+`, which +gets much of difftastic's quality without its graph search. + +### D. Moving through a diff by address, not by marks + +delta's marks exist because less cannot search by structure. In pardes +`:/^@@/` and `:/^diff /` are text, and a look of them moves. They can sit +in a diff pane's tag. Or an `Index` exec writes a +Index pane with one +line per file or hunk, each a look: + + @p12:345 src/look.zig +12 -3 + +### E. A diff you can act on + +This is what a pager that only prints cannot do. + +- **Stage, Unstage, Revert** in the tag: the hunk under the cursor, with + its file header and its `@@` counts recounted, written to + `git apply --cached`, `git apply --cached -R`, or `git apply -R`. +- **Apply** for the whole pane: edit the diff, then apply it, which is + `git add -p`'s `e` for a whole buffer. +- **The old side.** A look on a removed line goes today to the new line now + standing where it was. The `index e1f909f..0136052` line names the old + blob, so a look on a removed line can open `git cat-file -p e1f909f` at + its old line instead. +- **Commits.** A look on `commit abc1234`, or on a blame line's hash, runs + `git show abc1234` into another +Pager, as acme's plumber would. + +These can be helpers over 9P (a script reads the pane's body and dot, +runs git, writes back), in keeping with the roadmap's helper step, rather +than code in the core. + +### F. Further off + +- **pardes as git's diff program**, where difftastic sits: it is handed + both whole files and still prints an ordinary unified diff, aligned by + syntax tree. Not worth it until C with tree-sitter tokens falls short. +- **Reading OSC 1717**, so that a diff from delta or diff-so-fancy, whose + text is too rewritten to parse again, can still be looked at line by + line. + +## Open questions + +1. A: check the content, or name the pane `.diff`? +2. B: word colour to `[-…-]{+…+}` text, a style layer beside the text, or + both? +3. E: in the core, or as helpers over 9P? + +Suggested order: A, then the text half of B, then E's commit and old-side +looks, then C. diff --git a/docs/divergences.md b/docs/divergences.md new file mode 100644 index 00000000..2ab65819 --- /dev/null +++ b/docs/divergences.md @@ -0,0 +1,17 @@ +# Divergences + +What is not on `main`, and what on `main` is known to be wrong, so that +moving a bookmark does not quietly orphan work or hide a failure. + +## Bookmarks off `main` + +| bookmark | | +|---|---| +| `reload-perf-wip` | unfinished: Reload presentation transport regression | +| `reload` | reload core code with shell-owned allocators | +| `reload-start` | names the Core/Shell seam, deferred Reload request | +| `tty-colors-mouse`, `vibes-ghostty`, `mouse` | older prototypes (divergent), also on the `vps` remote | + +`ninep`, `fx`, `macos-fix`, `full-prototype`, `term`, and the `before-*` and +`merged-*` bookmarks mark points already in `main`'s history. Only +`main` is pushed to the FreeBSD mirror, which serves a public site. diff --git a/docs/effects.md b/docs/effects.md new file mode 100644 index 00000000..894bd75d --- /dev/null +++ b/docs/effects.md @@ -0,0 +1,285 @@ +# Effects: feel reviews + +**The rule above all the others:** no effect may alter or cover a focus +indicator (the focused pane's tag colour, its grip, the cursor, the +selection) or reduce its contrast. The effects are sugar; the indicators are +how a person knows where they are. Every G stage is reviewed against this. +Lift, for one, falls only on pane bodies and rails, never on a tag, a grip or +a header, and its strength is capped so text and the selection keep min(their +contrast, 4.5) (tests in src/gui/gui.zig). The rule binds effects, not a +theme's structure: the rules between panes (2px, `rule_px`) are the theme's +borders, and the one over a tag band stays in the band's slack, never over +its text. A dim touches only the unfocused +panes, with the same floor, and the focused pane's text is never at less +contrast than theirs (tests in src/draw.zig). + +**Density.** A pixel shell draws every size given in pixels in logical +pixels, `dp()` in gui.zig (SDL's window display scale, rounded, at least +one; `PARDES_TEST_SCALE` forces one in a harness, and a test window is 1x +otherwise): the rules (`rule_px`), the tag rule, the grip's ring and its +dirty gap and mode bars, the rail's gap to the text and its minimum, the +thumb's inset, the rim, a bar cursor's minimum width, underline and +strikethrough thickness, the rule-grab margin, and the Crt's scanline and +mask periods (`pardesScale`). Left as they are: what is measured in cells +or the tagline (the rail's width, `rail_px` scaled with the tagline; Lift's +blur and offsets; every motion, in cells), Shadertoy's iResolution, +fragCoord and iMouse (the display's pixels, as ghostty's), and the pet and +touch debug overlays. + +Each effect of docs/render-pipeline.md §9 lands behind its own switch, off, +and is kept only after a feel review (§8.4): a frame series on the virtual +clock, a recording, and a verdict — keep, polish or drop — with one line of +why. The verdict is the user's. + +| effect | switch | state | review material | verdict | +|---|---|---|---|---| +| Crt (bundled post pass) | `Crt 0..3` | kept, rewritten (no barrel) | fx-compare stills, live window | kept at the user's live look | +| Ripple, Glitch | — | removed | live window | dropped by the user after a live look | +| G1 lift | `Lift shadow\|rim\|auto` (off), `InactiveDim <percent>` | opt-in until the focus-lift default is decided | lift-shots-2 (off, shadow, rim, auto on acme, dusk, forge); frame series + mp4 per Motion flavour | shadow on acme: keep as is. Round 1 dropped glow and surface (surface lowered the focused text's contrast) and made rim a hairline just above the focused tag (light on a dark page, shade on a light one). auto on a dark page recedes the others (InactiveDim 30) | +| G3 cursor | follows `Motion`; `CursorBlink on\|off` (on) | glide on by default through the default flavour (smooth); blink on (decision 6) | .scratch/render/cursor/cursor-flavours-grid.mp4 (and quarter speed), raw/<flavour>/<motion>/ | pending | +| G4 bloom, vignette, grain | `Bloom`, `Vignette`, `Grain` `0..3` (off) | bundled post passes; none touches a tag, grip, notice or the cursor (pardesSpare); each capped per theme (pardesCap) | .scratch/render/{bloom,vignette,grain}/ (levels 0-3 on forge, dusk, acme; crops; mp4 stepping through the levels) | pending | +| G5 lapis | `Theme lapis` (its `decor`) | a native theme with ornament: tag plaques with hard shadows inside their bands (the focused one striped), dots, rail checker, title shadow | .scratch/render/lapis/ (whole window at 1x and 2x, crops, a slide mp4) | pending | +| G6 smooth scroll | follows `Motion` (on through the default smooth; `Motion off` lands at once) | a mouse wheel's notch glides, a touchpad follows the finger | .scratch/render/scroll/ (glide-<flavour>.mp4, quarter speed, strips) | pending | +| G7 panel transitions | `PanelSlide`, `PanelZoom`, `PanelVertical`, `PanelDissolve` (off) with `Motion` | a moving pane casts a shadow; a retargeted move keeps its speed; the GUI's dissolve is a crossfade | .scratch/render/transitions/ (slide smooth, bouncy, retargeted; dissolve) | pending | +| G8 notice chips | follows `Motion` and `Lift` | a notice floats in tier 4 on a lift (shadow) while Lift is on, drops in easing out and dissolves easing in, quicker than it came (150 ms against 180) | .scratch/render/notices/ (acme, forge) | pending | +| G9 selection glow | `SelectionGlow on\|off` (off) | a soft halo of the selection's colour round each block of it in a body, fading in over 100 ms | .scratch/render/selection/ (forge, acme, lapis; lapis-glow-zoom.png) | pending | +| G10 theme crossfade | always (a theme change) | the chrome's colours fade through OKLab, easing in and out (out when retargeted) | .scratch/render/crossfade/ (forge, lapis, acme cut short by dusk) | pending | +| G11 look-hover glow | `HoverGlow on\|off` (off) | a soft underline of the theme's accent under the word a look-hover would open, fading in over 80 ms | .scratch/render/hover/ (forge, acme, lapis; zooms) | pending | +| G12 ambient occlusion | `Occlusion on\|off` (off) | pane bodies darken toward their edges, at most 2% (§9.1: 1 to 2%) | .scratch/render/occlusion/ (on/off on forge, acme, lapis; acme-diff-x40.png) | pending | +| G13 parallax | `Parallax on\|off` (off) | a theme's page pattern under the bodies (lapis's dots) moves with the text at a quarter of its speed, glides included | .scratch/render/parallax/ (lapis, notches down and up) | pending | +| G14 afterglow | — | removed | live lapis showcase | dropped by the user: "one of the animations is like a flashing on the whole pane or something, that is really bad, just remove it" (a pane whose whole text changed, a file opened, a +Search refilled, a terminal's output, lit up at once) | + +## Motion flavours + +`Motion off|crisp|smooth|bouncy|playful` (default smooth, tuned so arrivals +land inside §8.1's 220 ms; bouncy and playful run longer, opt-in) is one parameter set +(animation.Motion) every fx animation reads, so a flavour is data, not a +branch in each effect. Input is never blocked, and a new target always +retargets from the current position and velocity. + +| flavour | timing (ω, length) | follow-through (ζ) | anticipation | squash/stretch | exaggeration (gain) | secondary lag | arcs | +|---|---|---|---|---|---|---|---| +| off | instant | — | — | — | — | — | — | +| crisp | 60, 0.6× (leaves at full speed) | 1 (none) | — | — | 1 | in step | — | +| smooth | 34, 1.1× (slow in, slow out; ≤220 ms) | 1 (none) | — | — | 1 | 0.85 | 0.04 | +| bouncy | 24, 1.4× | 0.35 (overshoots ~30%, settles twice) | — | 0.15 | 1.25 | 0.8 | 0.08 | +| playful | 18, 1.7× | 0.28 (overshoots ~40%) | 0.15 of the move | 0.35 | 1.4 | 0.55 | 0.15 | + +The flavours are distinct by design, not tuning: crisp leaves at full speed +and never passes its mark; smooth takes twice as long and eases in and out; bouncy clearly passes its mark and settles back once or twice; +playful winds up the other way first, flies well past, and stretches along +its path and squashes as it lands, its text with it (the user's choice); a +pointer inverts the same stretched box, and landed, a pane is exactly its +target. A motion only a few pixels big (Lift) is +exaggerated by the flavour's gain so its character shows. The flavours drive +the Lift spring (time-based), the notice drop and the pane moves (PanelSlide, +PanelZoom, PanelVertical opening or moving, whose length scales with the +flavour); a closing pane keeps its effect's own exit. Chart and side-by-side +video: .scratch/render/motion/compare/. + +Which principles each motion uses: + +- **Lift** (G1): timing, slow in / slow out (the spring), follow-through + (bouncy and playful lift past full and settle back), anticipation (playful + dips before it rises; below zero nothing is drawn, so it reads as a beat + before the lift), staging (only the focused pane lifts; nothing else moves + with a focus change), exaggeration (the flavour's gain). Squash, stretch, + arcs and secondary lag have nothing to act on in a lift. +- **Notice drop and pane moves**: timing and follow-through from the flavour's + spring over the move's length; anticipation (playful). A pane past its mark + never takes a neighbour's click, a rising one stays in its box, and a notice + past its row stays in its pane's body. +- **Cursor** (G3): timing (the flavour's spring, 2.4x its pace: it follows + input), follow-through (bouncy and playful pass the target), squash and + stretch and secondary action (the trailing corners lag by the flavour's + follow, so a jump smears and collapses), arcs (a jump over 8 cells bows by + the flavour's arc), anticipation (playful's wind-up). A step of a cell or + less, or any move in insert mode, lands at once, so typing never trails; + a scroll carries the cursor with the text. Only the focused cursor moves. + A pane that moves carries it too: the springs keep its place in the pane + and the quad is drawn through the pane's presented box, so through a + slide, a zoom or a drag it rides with the text, and a layout change with + no transition lands it with the text. A focus change (to another pane, or + into a column's or the workspace's tag) glides from where the cursor is + drawn to the new one, free of the old pane's edges while it crosses + (.scratch/render/cursor/move/: ride-*, cross-*). + + +Notes on G1: the lift and the dim run on one focus spring per pane, at the +Motion flavour's pace, sampled at each frame's own time; while it moves the +GUI draws at the display's rate, and a grid snaps. A notice floats on a lift +of 1 while a shadow or rim is on. InactiveDim under `Lift auto` defaults to +30. The fade is in linear light, so on a dark page it is gentle: at 30 +forge's text goes from 15.5:1 to 11.2:1 and dusk's from 6.4:1 to 4.8:1, +plainly quieter and still easy reading; at 10 forge barely moves (14.1:1). +On a light page the same percent bites far harder (acme: 7.0:1 at 10, the +4.5 floor at 30), which is why `auto` shades there instead of dimming. + +Notes on G4: the three are post passes, so each is a frame of cost only +when it is in the chain. None moves (grain is still, by choice: moving +grain would redraw every frame for a texture), so none asks for frames. +The focus rule is kept by construction: the shell hands every pass the +rectangles of the tags (with their grips), the column and workspace tags, +the notices and the cursor, and a bundled pass leaves them as they are; its +strength is capped per theme so the text on the page and the selection's +text keep min(their contrast, 4.5) (Post.capsOf, tested over the native +themes). Bloom takes only what is brighter than the page, so a light page +does not bloom at all; its glow is a dual Kawase blur in float textures at +half size and down (3 to 5 steps by level), within §8.2's 5%. The vignette +is round, starts halfway to a corner and reaches 10, 18 and 28%. Grain is +1.5, 3 and 5 of 255 on page-coloured pixels only, a logical pixel big. +Found on the way: SDL GPU binds at most 4 KiB of a uniform block, so every +Shadertoy colour after the palette (iBackgroundColor and on) read zero; the +block is now cut in three with ghostty's names and order kept. + +Notes on G5: lapis (src/themes/lapis.zig) is 0x4200.cafe's lapis.css in +pardes's chrome, drawn inside it (decision 1). The tags are the site's +trail and title bars: every tag a plaque in its own band, framed in gold +(2 px, the trail's border) with the trail's hard vermilion shadow (5 px) +down and right, the frame and the shadow both inside the band's rows and +columns, so no shadow reaches a body, a grip or the next pane; down, the +shadow gets what the band's slack under the text leaves (a pixel or three +at a tagline under the body's size, more at a larger one), to the right +its full offset. The focused pane's plaque is the code window's title bar, +gold and lapis stripes of 2 px, its words on plates of the focused ground +(the words' cells stay opaque, the blanks between let the stripes show), +so the focus indicator is plainer to see than any theme's tint, never +less; the unfocused ones are plain. Column and workspace tags take the +quieter object-label language: a 1 px frame and a 2 px shadow of vermilion +toward the page. The plaques are decor drawn under their cells (a group's +under range) with the cells blended premultiplied over them; blank tag +cells on the tag's ground are see-through there. They need an opaque +window: under WindowOpacity 100 the tags are plain. Also from the site: +the colours (lapis-deep page, vellum text, gold names and rules, +vermilion rubrics and tag rule, gold selection in lapis ink), the page's +gold dot grid (22 px, #e8c46a22) on page-coloured cells only, fixed to the +window; the dither frame's checker in the scroll track, anchored to its +rail (the thumb solid gold); the titles' vermilion offset shadow under a +file name's letters. Left out: Crimson Pro and Departure Mono, the +ornaments, a decor crossfade (it snaps while the colours fade). The tty +shows the colours alone: a tag row abuts its body and its neighbour, so +there is no cell for a shadow row or column. + +Notes on G6: a mouse wheel's notch (SDL's whole-number step) scrolls the +core by its lines at once, so keys and clicks act where the text is, and +the picture follows on the Motion flavour's spring at half again its pace, +critically damped whatever the flavour (text never passes its mark; §8.1), +from its current speed, so notches in a row carry on without a stall. How +far the rows moved is measured on the next frame against the last (a +wrapped line's rows, a terminal's output), within a couple of rows' slack +for the cursor's line and its number moving with the scroll; the rows that +left are kept and drawn in the gap the lag opens, and a lag is never more +than the body's height (a flick past that jumps). A touchpad's fractions +keep moving the picture under the finger, as before; there is no momentum +(SDL reports no finger lift on a wheel). The glide runs on the core's +continuous path (Pardes.shell_continuous), so the shell draws every loop +while it moves and a virtual clock moves with it; idle, it costs nothing. +A PDF page scrolls as before. The test feed takes wheel events +(ESC]777;mouse;wheel;<amount>;<x>;<y>BEL). + +Notes on G7: the geometry already followed the Motion flavour's spring +(sxrrwplk); a move retargeted mid-way now carries its speed on +(Track.launch, from the old move's speed along the new one's longest +side), so a second Newcol during a slide bends the motion instead of +stopping it dead. A pane that slides, zooms or rises stands off the page +while it moves: a soft shadow as Lift's, at sin(pi x progress) of its +strength (none as it sets out or lands), on the other panes' bodies and +rails alone and under the same contrast ceiling, moving with the pane. The +GUI's PanelDissolve is a crossfade: a changed cell's new form drawn whole, +its old one over it at 1 - progress; the blend is in sRGB, not linear +light (a two-colour mix in linear light needs both in one shader; open +point 3). The tty keeps its per-cell swap. GUI golden 18-mid-transition +changes (the slide's shadow at frame 6). + +Notes on G8: most of it was there: the drop eases out on the Motion +flavour's spring (sxrrwplk), the dissolve eases in, and a notice floats in +tier 4 with Lift's shadow at its fade while Lift is on, on the bodies +alone. What G8 changed: leaving was slower than arriving (a 300 ms +dissolve against a 180 ms fall); §8.1 wants leaving the quicker, in 100 to +160 ms, so MessageDissolve now defaults to 150 (a test holds both bands). + +Notes on G9: the halo is Lift's soft kind in the selection's own colour, +cast by each block of selected rows in a pane body (the rows that touch), +with the block as its caster, so the selection itself is never touched; +a cursor beside a block joins the caster, so it is never glowed over +either. It stays on bodies (never a tag or a grip), is at most 22% (§8.2: +coloured glows at most 25%) and less where the text round it would drop +below min(its contrast, 4.5); it comes up over 100 ms with an ease-out +(micro-feedback), on the core's continuous path, and is not drawn while +panes move. The blocks are read from the cells painted in the theme's +selection colour, a pixel shell's inference (§1.5, smell 4) until +selections are regions. + +Notes on G10: a theme change already faded the chrome (tags, rules, grips, +rails) over 10 frames (160 ms, in §8.1's 150 to 250 for a state change), +mixing sRGB bytes linearly in time. Now each colour goes through OKLab, so +a fade between two hues keeps its lightness instead of dipping dark and +muddy, on a smooth ease-in-out; a change made mid-fade sets off from where +it shows and eases out, so it moves at once instead of stalling. The page, +its text and the syntax colours still change at once with the theme, as +before: fading them would re-resolve every cell each frame. + +Notes on G11: the word a look-hover would open is already lit (the +affordance's tint); HoverGlow adds a strip three logical pixels tall along +its foot in the theme's accent, its edges blurred by one, at most 22% and +under the text's contrast floor, fading in over 80 ms (micro-feedback). It +stays on bodies and is split round a cursor, so it never touches one. The +word is found by the tint's colour, as G9 finds the selection. +Found while reviewing: with the machine loaded, test/gui_golden.py's +two-captures-agree settle can take a scene's frame before the scene's +change lands, and every later hash moves up a scene; a rerun on a quiet +machine matches. + +Notes on G12: four soft strips cast from just outside each body inward, +clipped to it and round a cursor, black in linear light, 2% at most and +under the lift's contrast ceiling, in the pane's own group so it moves +with it. At §9.1's strength it is all but invisible on a dark page (a +level of 255 on forge) and faint on a light one (acme's page steps one +level toward the edges); acme-diff-x40.png shows where it falls. + +Notes on G13: a body region now carries its first line (Region.line: a +file's scroll, a terminal's grid offset; on the wire, a u32 more a +region). Under Parallax the dots under each body are offset by a quarter +of its line times the row height, plus G6's glide offset while one runs, +so they drift with the text as it glides and settle with it (measured: 4 +lines at 35 px move the 22 px grid 13 px, 35 mod 22). The cell shader +reads the offset from the instance's serial slot, free since G7 took the +dissolve's per-cell noise out. Without a pattern, nothing happens. + +Notes on G14: removed with its builtin, setting and code after the user +saw it in the lapis showcase: "one of the animations is like a flashing on +the whole pane or something, that is really bad, just remove it". Every +changed cell glowing meant a pane whose whole text changed flashed whole. + +## Terminal track (§9.2) + +Audit, after decision 2 (keep every whimsical effect and polish it, never +remove it): the six core-composed character transitions (ascii, edges, +fall, wave, scramble, typewriter) and curtain stay as they are, each +bounded to its pane's final rectangle and each cell's last sample its +canonical one; slide and vertical are the tty compositor's and follow the +Motion flavour (sxrrwplk); zoom stays (nearest-cell scaling, its look is +the effect); dissolve swaps each changed cell once at its threshold; +message fades and the theme's chrome fade are the core's (the latter in +OKLab since G10), and InactiveDim (T5's unfocused dim) works in a grid as +it does in a pixel shell. + +| # | effect | switch | state | review material | verdict | +|---|---|---|---|---|---| +| T2 | cursor jump trail | `JumpTrail on\|off` (off) | a jump of three cells or more leaves 3 to 5 cells of trail behind the cursor, their ground drawn toward the text's colour in OKLab, most beside it, fading in 120 ms; truecolor terminals (vaxis's answer or COLORTERM); never the cursor's cell, a selection or outside the focused body; off under Motion off; a few cells a frame | .scratch/render/tty/trail/ (pyte replay of a real tty session at 60 fps: trail-forge.mp4, zooms) | pending | +| T1 chip shadow | `ChipShadow on\|off` (off) | a notice chip casts a shadow a cell right and down in its body: half blocks (▌ ▀ ▘) in a darker ground on blank cells, the ground 35% darker (OKLab) under text; never the cursor, a selection, a tag or another chip; truecolor only | .scratch/render/tty/shadow/ (forge, acme; zooms) | pending | +| T4 ordered swap | `PanelDissolve` (off) | the terminal's dissolve swaps each changed cell once at its place in a 4x4 Bayer matrix (shifted per pane), an even patterned screen instead of noise; hit-testing follows the same order | .scratch/render/tty/dissolve/ (ordered-swap-sim: the matrix applied to two real frames; see note) | pending | +| T7 thumb flash | `ThumbFlash on\|off` (off) | a pane whose view moves has its scroll thumb drawn toward the text's colour, 60% at once and back over 250 ms (quadratic); the thumb only, never a focus indicator; truecolor only; a few cells a frame while it fades | .scratch/render/tty/thumb-flash.mp4, thumb-flash-strip.png (pyte replay, forge) | pending | +| T3 wipe | `PanelCurtain` (off) | the curtain becomes a wipe, left to right: new grid behind the head, old ahead, and a soft edge of two columns whose ink and ground sit 2/3 and 1/3 of the way to the old ground (OKLab; a palette colour steps at the half); only the head's columns change a frame; the head's cells are not hit-testable until settled | .scratch/render/tty/wipe/ (curtain-gui.mp4, curtain-edge-zoom.png) | pending | + +Note on T4's material: a pane opening in a tty session recorded through +pyte did not animate (PanelSlide did not either there), so the review +material applies the same matrix to two real frames of that session; the +unit test holds the order (a 4x4 block reveals exactly t x 16 cells). + +Not built: T5 (unfocused dim) is InactiveDim, which already works in a +grid. T6 (a truecolor ramp on the active tag band) would change the +focused tag's colour, a focus indicator no effect may alter, so it stays +out. The §9.2 byte budget (deferring a sample after an oversized frame, +DECRQM for sync 2026) is not built either: the terminal effects here change +a few cells a frame, and only PanelSlide rewrites a whole pane per sample. diff --git a/docs/fs.md b/docs/fs.md deleted file mode 100644 index 55ffdc9c..00000000 --- a/docs/fs.md +++ /dev/null @@ -1,155 +0,0 @@ -# Filesystem - -Every native session serves 9P2000 on a Unix socket. Pane shells receive -`PARDES_9P` (socket path) and `PARDES_PANE` (pane serial). The socket is -`$XDG_RUNTIME_DIR/pardes-9p-<pid>.sock`, or lives under -`~/.local/state/pardes` when XDG_RUNTIME_DIR is unset. Detached sessions use -their session name; `--9p=<name>` overrides it. - -A `pardes <file>` launched from a pane forwards Look to that pane over 9P. -`--nested` opens a separate editor and disables forwarding from its pane shells; -its 9P service stays available. - -Look resolves the OS filesystem first, then the editor's virtual filesystem. -Explicit paths bypass that search: - -| Editor path | Meaning | 9P server path | -|---|---|---| -| `/n/os/proc/self` | OS filesystem | `/os/proc/self` | -| `/n/self/pane/2/body` | pane 2's text | `/pane/2/body` | -| `/virtual/pane/2/body` | the same, in the editor's own spelling | `/pane/2/body` | -| `/virtual/src/pardes.zig` | source embedded in this build | `/src/pardes.zig` | -| `/n/peer/pane/2/body` | another session's text | peer's `/pane/2/body` | - -The mount name `self` is reserved and maps to the server root, so `/n/self/X` -and `/virtual/X` both name the served `/X`. - -`--mount=peer=work` mounts the named session `work`; the dial can also be an -absolute socket path, `unix!/path`, `tcp!IP!port`, or `quic!IP!port`. -At runtime, use `Mount peer dial` and -`Unmount peer`. There are eight named mounts; `os` and `self` are reserved. -Unmount refuses mounts still used by a pane, its working directory, or a -pending Save. Mounts are saved in dumps. Save uses the file's original mount. - -`pardes --9p-tcp='tcp!127.0.0.1!5640'` adds a TCP listener alongside the Unix -socket. Build with `-Dquic=true` and system OpenSSL 3.6+ to enable QUIC; -`--9p-quic='quic!127.0.0.1!5641'` adds its listener. Both accept numeric -IPv4/IPv6 addresses, not DNS names. Listener port zero chooses a free port; -`/listeners` reports all active dial addresses. - -All connections have session access, including `os`. TCP is unencrypted. -QUIC uses an ephemeral TLS identity without peer verification or login. -It carries 9P2000 on one bidirectional stream with ALPN `pardes-9p`. -Unix and TCP connections share four slots served by cloud9's `std.Io` -runner; QUIC has four of its own on the editor's poll loop. OpenSSL's -internal buffers are separate, dynamically allocated memory. - -[Plan9port's client](https://9fans.github.io/plan9port/man/man1/9p.html) can -drive Unix or TCP without a kernel mount, and `9ns` mounts the tree in a -private namespace: - -```sh -9p -n -a "unix!$PARDES_9P" read index -9p -n -a 'tcp!127.0.0.1!5640' ls pane/1 -9ns --unix "$PARDES_9P" -- sh -c 'cat "$NINE_MOUNT/index"' -``` - -For [Linux v9fs](https://www.kernel.org/doc/html/latest/filesystems/9p.html), -use `version=9p2000,cache=none,access=any` and `trans=unix`, or `trans=tcp` -with `port=5640`. Set `uname`, `dfltuid`, and `dfltgid` for the local user. -Leave `aname` empty. The opt-in -[Linux v9fs experiment](v9fs.md) tests a kernel mount in a separate subprocess -namespace (`zig build v9fs-test`, requiring explicit mount authorization). -Neither 9P2000.u nor 9P2000.L is implemented. -Existing Plan9port/v9fs clients need a userspace bridge for QUIC. - -## The served tree - -``` -/README this guide, also src/fs-help.txt -/index one line per pane: serial, kind (text|term|pdf|image), dirty flag, name -/ctl write: one command per line; read: the serials the last command made or touched -/new reading it creates one empty pane and answers "<serial>\n" (the /net/tcp/clone idiom) -/log one line per editor event: new|del|rename|save <serial> <name>; reads park -/screen rendered screen JSON; frozen per open handle -/listeners the session's dial addresses -/pane/<n>/ name body tag ctl addr data xdata sel errors event, plus pty/{ctl,status,data} -/os/ the host filesystem -/src/ the editor's embedded sources, only when built with -Dembed-sources=true -``` - -Nothing in the tree is created by list, stat, walk or read, except that -reading `/new` makes a pane; that is its whole purpose, so a recursive read -of the tree makes one pane per open of it. - -`/ctl` and `/pane/<n>/ctl` take the editor's own command language, two verbs: - -- `look TEXT` is a right click on `TEXT`: a path opens a file, `file:12` jumps - to a line, a directory opens a shell there, a URL opens in the browser. From - `/ctl` the look happens at the active pane; from a pane's `ctl` at that pane. -- `exec TEXT` is a middle click: a command word from `src/builtins.zig` - (`Save`, `Del`, `New`, `Newcol`, `Mount NAME DIAL`, `Unmount NAME`, `Dump`, - `Restore`, `Msg TEXT`, `Find`, `Grep`, `Tty`, ...), or anything else, which - runs in the pane's terminal. - -Both verbs are lowercase; the words after `exec` are the editor's capitalized -commands. A pane's `ctl` also keeps acme's addr verbs (`addr=dot`, `dot=addr`, -`limit=addr`, `clean`, `dirty`, `cleartag`, `get`, `mark`, `nomark`, -`noscroll`, `scroll`, `show`). Every line of a write is checked before any -line runs; a malformed line fails the write with EINVAL. A command that fails -inside the editor is reported on the message row, not as a write error. - -After a write to either `ctl`, reading `/ctl` answers the serials of the panes -the command created, or, when it created none, the pane a look focused or the -pane an exec acted on (even one it closed), one per line. Before any command it answers `pid`, `version` and `panes` lines. - -`/pane/<n>/name` reads the pane's file name (a terminal's directory) and -writing it renames the buffer; a relative name resolves against the pane's -directory. `sel` reads the editor selection and writing it replaces the -selection. `body` appends on write and replaces on truncating open. `addr` -selects a range and `data` or `xdata` read or replace it. `errors` appends to -the directory's `+Errors` pane. Holding `event` open redirects the pane's Look -and Exec clicks to that client; writing a record back performs the action. - -Stats report real lengths for `index`, `ctl`, `name`, `body`, `tag` and `sel`, -modes 0644/0666 (0444 for read-only files, 0222 for write-only), the pane's -last edit time or the process start as mtime, and stable qids. Directory -entries carry no sizes; stat the entry. - -`/log` records `new`, `del`, `rename` and `save` while at least one client -holds it open; a read parks until a record arrives. `/screen` returns JSON with -`cols`, `rows`, `cursor`, a `styles` table, and row-major `cells` of -`[grapheme, style_index]`. Each open freezes one frame until close. A -terminal `body` freezes its history on the first read of each open handle; -`pty/data` streams live output. Screen and terminal-body snapshots share 32 -handle slots, released on close or disconnect. - -`-Dembed-sources=true` embeds the editor's sources and serves them under -`/src` (and `/shaders` on GUI builds). `EffectCode <effect>` lists the current -backend's implementation files under `/virtual`, which Look opens; without the -option the command reports the sources as unavailable. The esp32p4 build -enables the option by default, so the device can serve its own source. - -This is a control filesystem, not a complete POSIX export. Native filenames -may contain up to 255 bytes. Existing regular OS files support read, write, -and truncation to zero; protocol create, remove, rename, and other metadata -changes are refused. Ownership and permissions under `/os` are synthetic. -Zero-length truncation accepts the accompanying `mtime` hint sent by Linux -v9fs; the hint is not stored. Standalone timestamp changes remain refused. - -The tree lives in `src/ninep/`: `tree.zig` (nodes, lookup, readdir, dispatch, -and the editor's reply payload over cloud9's backend contract), `pane.zig` -(pane files), `ctl.zig`, `addr.zig`, `pty.zig`, `events.zig` (event and log -streams), `screen.zig` and `sources.zig`. The protocol engine is cloud9's -`fs.Server`, configured in `src/9p.zig` (the editor's and the board's -capacities); the transports are `src/9p_io.zig` (cloud9's `serve.Runner` -for Unix and TCP, a poll loop for QUIC, and the 9P client for mounts); -`src/fs.zig` keeps host access, mounts, resolution, find and grep. - -`zig build fs-test` drives real sessions using the independent Python client -in `test/ninep.py`; `zig build fs-discovery-test` checks that browsing creates -nothing and that `new`, `ctl`, `name`, `sel` and `log` behave. `zig build -9p-test` checks the two engine configurations' budgets (the engine's own -tests are cloud9's `zig build test`); `zig build fs-bench` measures -filesystem transactions in the core. -`zig build fs-test quic-test -Dquic=true` also exercises QUIC mounts and I/O. diff --git a/docs/helix-keys.md b/docs/helix-keys.md index 6907473a..d47f3051 100644 --- a/docs/helix-keys.md +++ b/docs/helix-keys.md @@ -7,22 +7,29 @@ checkout (`~/05-genizah/helix`); that checkout now sits on the local `pardes-harness` branch, whose three commits add only the harness, so `book/src/keymap.md` is byte-identical at its tip (694e7dfd). As of phase 5 every helix-equivalent row in A and B is differentially verified against real -helix (see "Differential testing" at the bottom). Five of the six waivers are -named in the row they belong to; the sixth, `wiX-edit-drops-sel`, belongs to no -single key — it is the anchor-only divergence every insert-mode edit shares — -and is described in the Files list at the bottom instead. +helix (see "Differential testing" at the bottom). Every waiver is named in the +row it belongs to. + +**The reference helix is fixed at one commit:** the `hx-harness` built from +`694e7dfdd` on the genizah checkout's `pardes-harness` branch, which is upstream +`278b24389` (2026-06-29, `25.07-905`) plus the three harness commits. "helix" +in this document means that build, not the 25.07.1 release, which differs on +counted `Alt-(`/`Alt-)` and on `&`. Upstream master was 82 commits further on +2026-09-28 (`079a789e`); of those only `416a0e09` (continuing a comment in an +injected `comment` layer) touches the editing code, and it needs tree-sitter, +which the harness runs without. Code map, by SYMBOL — line numbers rot, names do not. Body-normal key RECOGNITION is `modal.Normal` in `src/modal.zig`: a state machine over `Role` (one per bound command, matched against `src/config.zig`'s chord lists by -`Pardes.normalInput`), a `Prefix`, a `MatchSub` and a count, emitting a +`normalInput` in `src/normal.zig`), a `Prefix`, a `MatchSub` and a count, emitting a semantic `Action` that both the text and PDF adapters consume. It knows -nothing about panes or text. `src/pardes.zig` then EXECUTES: `Key`, -`handleKey` (intercept order is load-bearing, see the comment there), -`handleNormal` (parses directly into `Pane.normal`), -`executeNormalAction`, `setPaneRange` (helix range → pane state), -`enterInsert`, `handleInsert` / `insertKey`, `insertTab`, `normalDelete`, -`normalYank`, `pasteText`, `normalChange`, `replaySels`, `multiOnce`. Undo +nothing about panes or text. Then it is EXECUTED: `Key` and `handleKey` in +`src/pardes.zig` (intercept order is load-bearing, see the comment there); +`handleNormal` (parses directly into `Pane.normal`), `executeNormalAction`, +`replaySels` and `multiOnce` in `src/normal.zig`; `setPaneRange` (helix range +→ pane state); and `enterInsert`, `handleInsert` / `insertKey`, `insertTab`, +`normalDelete`, `normalYank`, `pasteText`, `normalChange` in `src/edit.zig`. Undo and redo live in `panes.File` and `panes.Terminal`. Pure text math: `src/modal.zig` (the `hx*` family is the helix-semantics layer: gap offsets + ranges over the flat text). Differential harness: `test/hxdiff.zig` + @@ -41,7 +48,7 @@ at the bottom. collapse) — the checked-in helix goldens are the ground truth, verified case-by-case by `zig build hxdiff`. Motion-created ranges live in `pane.vsel` marked IMPLICIT (`vsel.explicit = false`); `v` extend mode, - `x`/`X` and `n`/`N` (the look-ring walk, `lookWalk`) set EXPLICIT ones. + `x`/`X` and search `n`/`N` set EXPLICIT ones. `d`/`c`/`y`/`~`/… act on the active selection either way — that is the point of the model. The pardes-specific chords (normal-mode Enter look / Tab execute) @@ -73,8 +80,8 @@ at the bottom. `gj` the textual one. With the toggle off a line is one visual row and the two pairs are the same motion. - **Undo is snapshot-per-edit-op / per-insert-session**, not a - transaction log. Anything requiring replayable edits (`.`, - macros) needs new machinery. + transaction log. `.` and macros replay KEYS (`Macro.zig`), not + edits, so they need none. ## A. Implemented today @@ -93,16 +100,18 @@ language-backend queries, and the shell pipe. | `w` `b` `e` | select to next word start / prev word start / next word end | full helix model incl. landing conventions (block cursor one before the next word after `w`) and newline/punct/EOF edges | helix-verified | | `W` `B` `E` | long-word (WORD) variants | same | helix-verified | | `Home` / `End` | line start / line end | matches `goto_line_start` / `goto_line_end` | helix-verified | -| `0` / `$` / `^` | line start / line end / first non-ws | `0` and `^` are pardes extras — helix leaves those two unbound (it spells them `gh`/`gs`). `$` is NOT unbound in helix: it is `shell_keep_pipe` (`keymap/default.rs`), and taking it for line-end is a deliberate divergence — see the `$` row in C. It is the one shell command still unimplemented: it needs a per-selection verdict, where the runner's answer is atomic. `0` is a count digit while a count is pending | pardes-specific (`$`: deliberate) | +| `0` / `^` | line start / first non-ws | pardes extras: helix leaves both unbound (it spells them `gh`/`gs`), so they collide with nothing. Line end is helix's own `gl` and End. `0` is a count digit while a count is pending | pardes-specific | | `G` | bare `G` is a **no-op**; `<n>G` = goto line n | vim-ism removed (phase 5): helix `goto_line` only acts with a count; `ge` is goto-last-line | helix-verified | | `gg` / `<n>gg` | goto first line / line n | | helix-verified | | `ge` | goto last content line | matches `goto_last_line` (ignores the trailing empty line) | helix-verified | | `gh` / `gl` | line start / line end (last char, not the newline) | | helix-verified | | `Ctrl-d` / `Ctrl-u` | half page down/up, cursor follows | matches `page_cursor_half_down/up` | helix-verified | | `Ctrl-f` | full page down | matches `page_down`; file panes only get `Ctrl-b` (see next row) | helix-verified | -| `Ctrl-b` | file panes: full page up. Terminal panes: **toggle raw tty/editor mode** (`opts.tty_toggle`, configurable; `Shift-Esc` also enters). In raw tty Shift-Esc goes to the child | tty toggle is pardes-specific and wins on terminals; harness `pane:"tty"` cases avoid `Ctrl-b` | helix-verified (file) / pardes-specific (tty) | +| `Ctrl-b` | file panes: full page up. Terminal panes: **toggle raw tty/editor mode** (`opts.tty_toggle`, configurable). In raw tty Esc runs `Last` and Shift-Esc goes to the child as a plain Esc (`ProgramEsc on` swaps them) | tty toggle is pardes-specific and wins on terminals; harness `pane:"tty"` cases avoid `Ctrl-b` | helix-verified (file) / pardes-specific (tty) | | `PageUp` / `PageDown` | full page | matches helix `page_up`/`page_down` (view scroll + cursor snap to the scrolloff edge) | helix-verified | | `zt` / `zz` / `zb` | scroll current line to top / center / bottom | matches `align_view_top/center/bottom` (helix harness pins scrolloff to pardes' 3) | helix-verified | +| `Z` | sticky view mode: the `z` keys stay armed after each until Esc, which only leaves the mode; other keys do nothing meanwhile | helix's sticky view node | helix-verified | +| `zm` | scroll the unwrapped view so the cursor's column is in its middle | helix `align_view_middle`; with soft wrap on there is no horizontal scroll, and nothing happens | out of corpus (the harness's text never scrolls sideways) | | `i` `a` | insert at selection start / after selection end | helix semantics: `i` before the selection, `a` selects and appends after it | helix-verified | | `I` `A` | insert at first non-ws / line end | matches `insert_at_line_start` / `insert_at_line_end` | helix-verified | | `o` `O` | open line below / above, copying the current line's indent levels; `<n>o` opens n | matches `open_below`/`open_above` | helix-verified | @@ -110,35 +119,40 @@ language-backend queries, and the shell pipe. | `x` / `<n>x` | select current line / extend one (n) line(s) down, char-range through the newline, cursor ON the `\n` | col-0 vim-ism removed (phase 5); matches `extend_line_below`, mode stays normal | helix-verified | | `d` | delete selection (implicit or explicit); bare cursor = the 1-wide selection | always yanks (`Alt-d` noyank in B); terminals: drops typed runs only | helix-verified | | `c` | change (delete + insert mode); linewise selections open a fresh indented line | same shape as `d` | helix-verified | -| `y` | yank selection; bare cursor yanks the 1-wide selection (char under cursor) | line-yank vim-ism removed (phase 5); yank keeps selection AND cursor (helix). Writes the DEFAULT REGISTER and nothing else — the system clipboard is `SPC y`, which is helix's own split and so moves this row TOWARDS helix, not away: a `d` of one character can no longer clobber what the desktop was holding | helix-verified | -| `u` / `U` | undo / redo | restores the pre-edit selection (helix); snapshot granularity, no `Alt-u`/`Alt-U` history walking (skipped) | helix-verified | -| `p` (normal) | paste the core's yank register after the selection | helix default-register semantics, and only the register — nothing on this path reads or writes the system clipboard. `SPC p` is the word that does, and on a tty its read is OSC 52, which most terminals refuse: an honest no-op there rather than a paste of the wrong text | helix-verified | -| `Esc` (body normal) | clear a pending modal prefix / exit select mode, keeping the selection, then run `Last`: hop to the pane you were in before this one, whichever kind it was, exactly like `SPC j j` — so held down it alternates between two panes, two files as readily as a file and its shell. A PDF pane is the ONE exception: there Esc is the document's own cancel (drop the mouse selection and the search overlay, stay where you are reading) and `Shift-Esc` is the hop out, while raw tty only intercepts unmodified Esc at a detected shell prompt | Pardes-specific focus binding layered on helix's cleanup. A leader path, tag, topbar or search owns Esc while it is active; raw tty forwards it | pardes-specific (cleanup helix-verified) | +| `y` | yank each range's text into the register (`"<reg>` names one, else `"`), one value per range | line-yank vim-ism removed (phase 5); yank keeps selection AND cursor (helix). The system clipboard is `"+y` / `SPC y`, helix's own split: a `d` of one character never clobbers what the desktop holds | helix-verified | +| `u` / `U` | undo / redo | restores the pre-edit selection (helix); snapshot granularity, `Alt-u`/`Alt-U` are the same two: helix walks a history tree by time with them, and pardes's history is linear, so earlier and later ARE undo and redo | helix-verified | +| `p` (normal) | paste the register after each range: value i at range i, the last value repeated when there are fewer | helix `paste_impl`. `"+p` asks the system clipboard (`SPC p`); on a tty that read is OSC 52, which most terminals refuse: an honest no-op rather than a paste of the wrong text | helix-verified | +| `Esc` (body normal) | clear a pending modal prefix / exit select mode, keeping the selection, then run `Last`: hop to the pane you were in before this one, whichever kind it was, exactly like `SPC j j` — so held down it alternates between two panes, two files as readily as a file and its shell. A PDF pane is the ONE exception: there Esc is the document's own cancel (drop the mouse selection and the search overlay, stay where you are reading) and `Shift-Esc` is the hop out, while raw tty takes unmodified Esc as `Last` and sends Shift-Esc to the program (with `ProgramEsc on`, Esc goes to the program except at a detected shell prompt) | Pardes-specific focus binding layered on helix's cleanup. A leader path, tag, topbar or search owns Esc while it is active; raw tty forwards it | pardes-specific (cleanup helix-verified) | | `Esc` (insert) | back to normal mode, cursor right after the insertion (no vim left-step) | | helix-verified | | `Enter` (normal) | acme **look** chord: EXPLICIT selection, else file-ish word under cursor | pardes-specific, keep (helix normal-mode Enter unbound). Covers helix `gf`. Implicit motion residue falls back to the cursor word | pardes-specific | | `Tab` (normal) | acme **execute** chord | pardes-specific, keep; explicit-selection rule as Enter | pardes-specific | -| `:` (normal, body) | focuses the pane's tag in normal mode at its remembered cursor position (first entry starts at the commands). `h`/`l`, arrows, word motions and `0`/`$`/`^` move within the tag; `k` stays on its single line; `j` or `Esc` returns to the body. Uppercase `H`/`J`/`K`/`L` run `Left`/`Down`/`Up`/`Right` and enter the neighboring pane's tag. `K` beyond the top pane reaches the headers below. `y` yanks; Enter/Tab Look/Exec; `i`/`a`/`I`/`A` enter insert mode, where letters type normally. Explicit mouse clicks choose a new cursor position. | Each tag keeps its own cursor position during the session. Positions are UTF-8 byte offsets in the rendered prefix plus editable tail; file-name changes are staged as described in [editable tags](tags.md). | pardes-specific | -| `K` (tag normal, topmost tagline) | focuses the column tag, then another `K` reaches the workspace tag. With `ColumnTags` disabled it goes directly to the workspace. `J` walks back down. Header arrows and `h`/`l` move by grapheme; word motions and `0`/`$`/`^` work too. `j`/`Esc` returns to the panel; lowercase `k` stays put. Enter/Tab executes in normal mode; `i`/`a`/`I`/`A` enter editing, where Enter is Look and Tab is Exec. | Column commands target that column's active pane, or its first pane when coming from elsewhere. Workspace and column text are independently editable and persist in dumps. See [editable tags](tags.md). | pardes-specific | -| `Ctrl-w` + `h/j/k/l`/arrows | directional pane focus prefix — editor normal mode only | pardes' own window handling (helix window mode skipped, section C). Runs the SAME `Left`/`Down`/`Up`/`Right` builtins `SPC w h/j/k/l` runs; Raw **tty** mode forwards Ctrl-w to the child. Insert mode owns `Ctrl-w` = delete-word-back, so a tag being TYPED into swallows it; from a tag in normal mode (`:`) it moves focus to the neighbour's BODY, while the bare letters `h/j/k/l` there move to its TAGLINE (next row) | pardes-specific | -| `Alt-n` | new terminal below (outside raw tty) | shadows helix `Alt-n` TS sibling-select — skipped anyway (tree-sitter) | pardes-specific | +| `:` (normal, body or tag) | in the body, focuses the pane's tag in normal mode at its remembered cursor (the first time, on `Save`); in the tag, goes back to the body; in a column or workspace tag, back to the active pane. The tag's normal and insert modes ARE the body's: every motion, selection, edit and undo works there, and `0` goes to the line's start, the path's. Tab runs the word under the cursor or the selection and Enter looks it up (in a column or workspace tag Enter runs it too), and either hands the keyboard back to the body first. Clicks choose a new cursor position and type into the tag. | Each tag keeps its own cursor during the session. The computed path/marker/page is reachable and yankable but read-only: an edit into it is refused, and typing into a file's path drafts a new name. File-name changes are staged as described in [editable tags](typ/guide.typ). | pardes-specific | +| `Ctrl-w k` / `SPC w k` (window mode, pane with nothing above) | focuses its column's tag, then the workspace tag. `Ctrl-w j` walks back to the panes, `Ctrl-w h`/`l` walk the column tags. Headers edit exactly as a pane tag does. | Column commands target that column's active pane, or its first pane when coming from elsewhere. Workspace and column text are independently editable and persist in dumps. See [editable tags](typ/guide.typ). | pardes-specific | +| `Ctrl-w` / `SPC w`, then `h/j/k/l`/arrows, `d`, `c` | window mode (`Window`): an outline moves between panes, `Enter`/`Esc` focuses it, a pane's label letter focuses that pane, `d` is `Del` on the outlined pane (its `k`/`j` answer between two panes, the outline moving to the pane that took the rows), `c` is `Collapse`; the mode stays on — editor normal mode only | pardes' own window handling (helix window mode skipped, section C). On a header `Ctrl-w` stays a prefix for the `Left`/`Down`/`Up`/`Right` header walk; Raw **tty** mode forwards Ctrl-w to the child. Insert mode owns `Ctrl-w` = delete-word-back, so a tag being TYPED into swallows it; from a tag in normal mode it moves focus to the neighbour's BODY, as from a body, and from the top pane `Up` reaches the column and workspace tags | pardes-specific | +| `Alt-n` | new terminal below (outside raw tty) | shadows helix `Alt-n` (select next sibling), which pardes spells `Alt-right` alone | pardes-specific | | `Alt-c` | move active terminal to a fresh column (outside raw tty) | helix `Alt-c` is change-noyank; the pardes window op wins (do-not-touch contract). `Alt-d` + `i` covers the behavior | waived (`alt-c-window-op`) | -| `Space` (normal, body) | starts the pardes LEADER: a key path runs the same builtin words used by tags and the topbar. The main groups are `f` files, `h` docs, `c` columns, `t` toggles/effects, `a` panel animations, `s` session, `j` jumps, `l` language, and `w` directional focus; `SPC ?` lists every path and `<prefix> ?` lists one group in `+Help`. The pending path appears on the active pane's transient body/message row. Esc or an unmapped key abandons it. Paths, Help rows, and dispatch are all generated from the builtin registry at comptime; the leader applies only to a BODY in normal mode because tags and tty programs own their input | pardes-specific; helix spends Space on pickers/LSP (section C), while pardes uses acme-style executable words | -| `SPC y` `SPC Y` `SPC p` `SPC P` `SPC R` | helix's clipboard menu on helix's own letters: yank the selection to the system clipboard (`ClipYank`) or the PRIMARY selection alone (`ClipYankMain`), paste the system clipboard after (`ClipPaste`) / before (`ClipPasteBefore`) the selection, replace the selection with it (`ClipReplace`) | the ONLY five words in pardes that touch the desktop's clipboard — `y`/`d`/`c`/`p`/`P`/`R` and the acme cut/paste chords are the internal register alone. Builtins rather than bare chords because a leader path names a builtin: they land in Help's index and are executable words like every other verb. One divergence: pardes keeps a single register VALUE where helix keeps one per range, so `SPC y` at N cursors joins them with newlines (`Pardes.setYank`, the divergence `msel-yank-paste` already waives). On a tty the write is OSC 52 out and the READ is OSC 52 back, which many terminals refuse or gate — so `SPC y` works there and `SPC p` can be a no-op | out of corpus | +| `Space` (normal, body) | starts the pardes LEADER: a key path runs the same builtin words used by tags and the topbar. The main groups are `f` files, `h` docs, `c` columns, `t` toggles/effects, `a` panel animations, `s` session, `j` jumps, `l` language, and `w` directional focus; `SPC ?` lists every path and `<prefix> ?` lists one group in `+Help`. Neither `Exit` (quits the editor, acme's Exit) nor `Kill` (stops the commands pardes typed into terminals, acme's Kill) has a leader path: both are the topbar's and the root `ctl`'s. The pending path appears on the active pane's transient body/message row. Esc or an unmapped key abandons it. Paths, Help rows, and dispatch are all generated from the builtin registry at comptime; the leader applies only to a BODY in normal mode because tags and tty programs own their input | pardes-specific; helix spends Space on pickers/LSP (section C), while pardes uses acme-style executable words | +| `SPC y` `SPC Y` `SPC p` `SPC P` `SPC R` | helix's clipboard menu on helix's own letters: yank the selection to the system clipboard (`ClipYank`) or the PRIMARY selection alone (`ClipYankMain`), paste the system clipboard after (`ClipPaste`) / before (`ClipPasteBefore`) the selection, replace the selection with it (`ClipReplace`) | the same as `"+y`, `"+p`, `"+P`, `"+R`: register `+` (and `*`) IS the desktop's clipboard, the only register that reaches it. `SPC y` writes `+` alone, as helix's does, not the default register too. Builtins rather than bare chords because a leader path names a builtin: they land in Help's index and are executable words like every other verb. The clipboard holds one text, so N values go out joined by newlines, as helix sends them. On a tty the write is OSC 52 out and the READ is OSC 52 back, which many terminals refuse or gate — so `SPC y` works there and `SPC p` can be a no-op | out of corpus | | a paste from the OUTER terminal | one `Event.paste`, spliced in at the cursor | the tty shell enables bracketed paste and coalesces `paste_start`..`paste_end` into a single event; before that the bytes arrived as individual key presses and normal mode RAN them, which is how a pasted `d` deleted a line. The bytes deliberately never enter the yank register — clipboard and default register are separate stores in both directions | pardes-specific | -| `/` (any pane) | pardes' own plain-substring search into a `+Search` output buffer: the tag takes the pattern, Enter fills the buffer, and its rows are ordinary look targets. Enter also GOES to the first row — the buffer is focused and then the step `n` is and the look Enter is run in it (`Pardes.lookFirstHit`), so `/foo` lands on the first hit with the matched span selected. A pattern that matched nothing opens its empty buffer and moves nothing | KEEP, do not touch; not in the corpus (helix `/` is regex search). Find and Grep answer with OTHER files and deliberately do NOT jump. The stepping half is the next row | pardes-specific | -| `n` / `N` (any pane) | MOTION, not a jump: move the SELECTION to the next / previous look-able text and open NOTHING. Enter — the look chord — on what it leaves selected is what opens it | KEEP, do not touch; not in the corpus (helix's `n`/`N` walk regex search hits). What a step selects is the pane's GRAIN (`output_pane.Grain`, read in `Pardes.lookSpanIn`): in FREE TEXT — a terminal, a file, a PDF, a prose answer buffer — the largest whitespace-delimited run `look.resolve` can act on (`look.lookableSpan`, wrapper punctuation peeled off both ends), several to a line; in a RESULTS BUFFER one stop per ROW, the largest run its head resolves as (`look.lookableLineSpan`), because a row there IS one location and the words after it are the match rather than a second place to go; in a COMMAND list the whole line. The walk is a RING across PANES: every pane that has performed a Look, most recent first (`Pardes.look_src`), then the output buffers that have not, newest first, and only when both are empty the active pane. Exhausting a pane enters the next at its first (forward) / last (backward) span and the end wraps to the start, so `N` is the exact inverse of `n`. What it lands on becomes an EXPLICIT `vsel` with the cursor on its FIRST column, in the pane the walk focuses. ONE motion in every pane kind and every buffer kind — a PDF steps the `+Search` buffer its own search filled, `n` to select the row and Enter to jump. The single thing a buffer may change is that grain, and it changes it by BEING a kind of buffer rather than by a branch: `output_pane.Traits.steps` (a list of locations) makes a step take one row at a time, and `Traits.commands` makes it take the WHOLE LINE, because a command list (`ThemeSel`/`FontSel`) holds words to run and there is no path inside `Theme gruvbox` to pick out. Tab on what `n` selected wears the theme, which is the same middle click on the row is. `]d`/`[d` are helix's diagnostic motions, a different binding, and they do still jump to each diagnostic (`docs/lsp.md`) | pardes-specific | +| `/` (a text) | a query pane under the pane (`src/Query.zig`): a `+Search` whose line 1 is the query, typed into; helix's regex with smart case, every match tinted and ticked on the rail as you type (the pane's places, `src/Places.zig`), the first after the cursor selected (helix's incremental preview). `Ctrl-n`/`Ctrl-p` step while typing; Enter lands, fills `/` and keeps the rows as text; Esc while typing restores the text and closes the pane. Line 1's first word names the source (`/`, `Find`, `Grep`, `Recent`, `Panes`, `Symbols`, `All`, `Refs`, `Def`, `Impl`, `Diagnostics`), helix's pickers as one pane. A terminal's and a PDF's `/` keep the notice-band prompt and its `+Search` | helix's `/` semantics (regex, smart case, preview); the pane is pardes' | pardes-specific | +| `n` / `N` | next / previous match of the text's places when a query pane fed them (a `/`, a list's places in this text: refs, diagnostics, a Grep's hits), round the ends without a message; else the last search register's regex in the current text, as before; counts repeat | only the primary selection is replaced; in select mode each match is added and becomes primary. Named registers work. `*` sets the pattern from selections with word boundaries (`Alt-*` without) and seeds the text's query pane with it, the keyboard staying. The former Look ring is `LookNext` / `LookPrev`, `SPC j n` / `SPC j p`. PDFs retain their location-result navigation | helix-verified | + | insert: printable text | file: real edit; terminal: typed run splice | | helix-verified (file) | | insert: `Enter` | newline; keeps the current full indent levels and adds one 4-space logical tab when the text before the cursor ends in `(`, `[`, `{`, or `)` (including `})`) | plain lines match `insert_newline`; delimiter heuristic is pardes-specific | helix-verified (plain) / pardes-specific (delimiter) | -| insert: `Backspace` (+ `Shift-Backspace`) | delete prev char, joins lines at col 0 | matches `delete_char_backward`; `Ctrl-h` alias in B | helix-verified | +| insert: `Backspace` (+ `Shift-Backspace`) | delete prev char, joins lines at col 0; in a line's leading blanks, back to the previous 4-column indent stop (a whole unit when on one; a tab still goes alone) | matches `delete_char_backward` and its dedent; `Ctrl-h` alias in B | helix-verified | | insert: `Up` `Down` `Left` `Right` | move cursor | matches helix's "not recommended" insert arrows | helix-verified | -| `gd` `gD` `gy` `gi` `gr` | LSP definition / declaration / type-definition / implementation / references. ONE answer jumps straight there; several fill `+Search`, where n/N walk and Enter opens | in-process ZLS (`src/lsp/lsp_zls.zig`), `.zig` only — on a file the backend does not speak these do nothing at all, with no error row. Ctrl+left-click is the mouse spelling of `gd` | out of corpus | +| `gd` `gD` `gy` `gi` `gr` | LSP definition / declaration / type-definition / implementation / references. One answer jumps straight there; several (definition, implementation, references) fill the text's query pane, line 1 `Def`/`Impl`/`Refs`, their places in the text tinted and stepped by `n`/`N`; the others fill `+Search`, where `LookNext` / `LookPrev` walk and Enter opens | Ctrl+left-click is the mouse spelling of `gd`; language support depends on the configured backend | out of corpus | | `]d` `[d` / `]D` `[D` | step the diagnostics list / go to its last or first; if no list is up, asking the backend for one is part of the press | | out of corpus | | `=` | `format_selections` — writes a `- old` / `+ new` diff into `+Lsp` | deliberate divergence: the seam returns ROWS, not edits, so this SHOWS the formatting instead of applying it. Not in the corpus, so there is no waiver to name — the query leaves the core as an effect the headless harness has no shell to perform | out of corpus | -| `Ctrl-o` / `Ctrl-i` | jumplist back / forward (also Mouse4 / Mouse5 in SDL, macOS and web); successful navigation clears selections in both panes and places the cursor at the saved location; raw tty forwards both to the child — the `Back` / `Forward` builtins, also on `SPC j o` / `SPC j i`, with `SPC j l` rendering the stack as a buffer | helix binds both keys (`jump_backward` / `jump_forward`) but to a POSITION jumplist; pardes' stack is over panes and focus, so the keys agree and the semantics do not. `Ctrl-i` and Tab are the same byte under the legacy encoding; there Tab keeps meaning execute, and the pair only separates where the host speaks the kitty keyboard protocol | pardes-specific | +| `Ctrl-o` / `Ctrl-i` | jumplist back / forward (also Mouse4 / Mouse5 in SDL, macOS and web); successful navigation clears selections in both panes and places the cursor at the saved location; raw tty forwards both to the child — the `Back` / `Forward` builtins, also on `SPC j o` / `SPC j i`, with `SPC j l` rendering the stack as a buffer; a closed file's entry stays, marked `(closed)`, and a jump to it opens the file again at its place | helix binds both keys (`jump_backward` / `jump_forward`) but to a POSITION jumplist; pardes' stack is over panes and focus, so the keys agree and the semantics do not. `Ctrl-i` and Tab are the same byte under the legacy encoding; there Tab keeps meaning execute, and the pair only separates where the host speaks the kitty keyboard protocol | pardes-specific | | `\|` | pipe every selection through `/bin/sh -c`: its bytes in on stdin, its stdout replacing them, one undo across all cursors | helix's own key and meaning; the command is typed into the pane's tag after a bare `\|` marker rather than into a popup | out of corpus | | `A-\|` | the same, and the output is DISCARDED — the text is not touched at all | helix `shell_pipe_to`. For a command run for its effect. Marker `\|-` | out of corpus | | `!` | run with NO stdin, insert the output BEFORE each selection | helix `shell_insert_output`. Runs ONCE and every cursor gets that one answer, as helix does — ten cursors and `date` give ten identical stamps. Marker `!` | out of corpus | | `A-!` | the same, appended AFTER each selection | helix `shell_append_output`. Marker `!+` | out of corpus | +| `$` | keep only the selections a shell command exits 0 on: each range's text on its stdin, one run per range, its output discarded; the primary stays if kept, else the last kept range takes over, and keeping none changes nothing | helix `shell_keep_pipe`. The runner's answer is all or nothing, so the command runs as `(cmd) >/dev/null; echo $?` and the status comes back as the output. Marker `$` | out of corpus | +| `Q` / `"<reg>Q` | record the keys that follow into `@` (or the named register) until the next `Q`; kept as helix writes a macro, in key notation (`xt,S=<ret>_<A-(>`), so `"@p` pastes it and a yanked text can be replayed | helix `record_macro` | helix-verified | +| `q` / `<n>q` / `"<reg>q` | type a register's keys again, n times. Replayed keys go to the modal handling only: Esc does not hop panes, Enter and Tab neither look nor execute, and Space does not open the leader | helix `replay_macro`; `Macro.zig`, `Pardes.replayKeys` | helix-verified | +| `.` / `<n>.` | repeat the last insert session: the normal command that entered it once, the keys typed n times, then leave insert mode the way it was left | helix `repeat_last_insert`; the same key log as macros | helix-verified | ## B. To implement @@ -173,6 +187,8 @@ found. Pure text math in `modal.zig`: `findChar`, `matchBracket`, | `Alt-.` | repeat last `f`/`t`/`F`/`T` motion (`Pane.find_op`/`find_ch`), takes a count | decision: repeats ONLY the find family, not `m`/`[`/`]` (helix extends it there; marginal) | helix-verified (phase 5) | | `g|`, `<n>g|` | goto column n (1 = line start), clamped to the line | | helix-verified (phase 5) | | `gs` | goto first non-whitespace | alias of the `^` handler | helix-verified (phase 5) | +| `g.` | go to where the last edit ended (a deletion's start, an insertion's end), every range there, extending in select mode | helix `goto_last_modification`. The position is `Text.last_edit`, set by `edit.setEditText` from where the old and new texts part; helix's is the last history revision's, so with nothing edited yet pardes stays put where the harness's helix goes to the end of its setup text | helix-verified | +| `gw` | label the words in view (two word characters or more) with two letters each, nearest the cursor first, one forward and one back in turn; typing a label selects its word (stretching the selection to it in select mode), any other key takes the labels away | helix `goto_word`, alphabet a-z (`config.jump_label_alphabet`). The labels are painted over the body's cells in `body_layer.renderBody`, in the selection colours; the words live on `Pane.jump` | helix-verified | | `gt` / `gc` / `gb` | goto screen top / center / bottom | view-relative (`pane.scroll()` + `pane.rows`), column kept (clamped) | helix-verified (phase 5) | | `gj` / `gk` | VISUAL line down / up (+ count) | follows the wrapped body's own breaks (`file_pane.visualRow`, the same walk `fillBody` renders), keeping the goal column INSIDE the row; the last row of a line steps into the next line's first. Wrap off = one row per line, and this IS `j`/`k`. helix assigns the pair the other way round (its `j` is the visual one) | pardes-specific | | `PageUp` / `PageDown` | FULL page (was half) | `Ctrl-u`/`Ctrl-d` stay the half-page pair | helix-verified (phase 5) | @@ -182,11 +198,12 @@ found. Pure text math in `modal.zig`: `findChar`, `matchBracket`, | Key | Behavior | Notes | Status | | --- | --- | --- | --- | | `r<ch>` | replace selection/char with `<ch>`, newlines kept | terminals: replaces the typed-run byte under the cursor if any, else no-op — one code path for both kinds, since `normalReplaceChar` goes through `Pardes.editText`/`setEditText`, which route to a file's content or to `term_pane`'s typed-run overlay | helix-verified (phase 5) | -| `R` | replace selection (or cursor char) with the yank register; pasted text becomes the selection, head on its last char | uses the INTERNAL yank (`p.yank`), no clipboard round trip — `SPC R` is the system-clipboard twin; empty register = no-op; terminals: no-op | helix-verified (phase 5) | +| `R` | replace selection (or cursor char) with the yank register; pasted text becomes the selection in the direction the replaced one had (head on its last char, or its first when backward) | uses the INTERNAL yank (`p.yank`), no clipboard round trip — `SPC R` is the system-clipboard twin; empty register = no-op; terminals: no-op | helix-verified (phase 5) | | `~` | switch case of selection/char, selection kept | terminals: run byte only | helix-verified (phase 5) | | `` ` `` | selection to lowercase | terminals: run byte only | helix-verified (phase 5) | | ``Alt-` `` | selection to uppercase | terminals: run byte only | helix-verified (phase 5) | | `J` | join lines in selection (or cur+next; helix ignores the count) | helix semantics: the newline + next line's leading whitespace collapse to ONE space (first line untrimmed); selection and cursor STAY where they were (vim's cursor-on-the-space removed in phase 5); terminals: no-op | helix-verified (phase 5) | +| `Alt-J` | join like `J`, then select the spaces the join put in (one bare cursor each); a join that put none in keeps the selection | helix `join_selections_space`. `J` and `Alt-J` are one edit over every range, so a line two ranges share is joined once | helix-verified | | `>` / `<` | indent / unindent selected lines (count times) | width = `modal.INDENT_W` = **4 spaces** (helix harness pins its no-language indent style to Spaces(4) to match); `<` also takes one leading tab as a level; empty lines never indented (helix); selection kept, positions mapped through the edit (phase 5) | helix-verified (phase 5) | | `Ctrl-a` / `Ctrl-x` | increment / decrement the decimal int under the cursor by count | helix-style: under the cursor only (no vim forward scan), `-` handled, i64 saturating, zero-padding width preserved (phase 5); cursor to the last digit, selection kept; terminals: no-op | helix-verified (phase 5) | | `Alt-d` | delete without yanking | `normalDelete(yank=false)` | helix-verified (phase 5) | @@ -200,6 +217,9 @@ found. Pure text math in `modal.zig`: `findChar`, `matchBracket`, | --- | --- | --- | --- | | `;` | collapse selection to cursor | drops vsel/msel, cursor stays | helix-verified (phase 5) | | `Alt-;` | flip anchor and head | vsel: swap cursor ↔ anchor; msel: cursor to the other end (r0/r1 swapped to keep the cursor-at-r1 invariant) | helix-verified (phase 5) | +| `Alt-:` | make every range point forward | helix `ensure_selections_forward` | helix-verified | +| `Alt-o`/`Alt-up`, `Alt-i`/`Alt-down`, `Alt-p`/`Alt-left`, `Alt-right`, `Alt-a`, `Alt-I`, `Alt-e`, `Alt-b` | walk the file's syntax tree from every range: grow to the enclosing node (and remember what it grew from), shrink back to that or to the first child, the previous / next sibling (anonymous ones included, so often a comma), every named sibling or child, the enclosing named node's end / start (stretching to it in select mode) | helix `expand_selection` and kin, on a whole-file parse (`File.node_tree`) made on the first such key after an edit and reused until the next; a range the tree says nothing about, and every range of a file without a grammar, stays. Checked against the installed hx on JSON (`normal.zig` test): the harness runs without grammars, so it only proves the plain-text no-op | helix-verified (plain text), hx-checked (JSON) | +| `]f [f ]t [t ]a [a ]c [c ]T [T ]e [e ]x [x`, `mi`/`ma` + `f t a c T e x` | function, class, argument, comment, test, entry, element: jump to the next one starting after the cursor / the previous one ending before it (count times; select mode stretches to it), or select the smallest one around the cursor, inside or around | helix `goto_ts_object` / `textobject_treesitter`, from helix's own `textobjects.scm` vendored in `vendor/queries` (MPL-2.0), with its `#eq?`/`#match?` predicates; `syntax.objectAt`/`objectNext` on the file's kept parse. Zig's query is helix's ported by hand to the zig grammar pardes builds, and a node that ends in its line's newline (that grammar's comments) is taken without it, as helix's grammars have it. Grammars without a query (fortran, markdown, powershell) or whose query does not compile against pardes's grammar (erlang) have none, and the keys do nothing there. Checked against the installed hx on Python, JSON and Zig (`normal.zig` test) | hx-checked | | `%` | select whole buffer | vsel anchor 0,0, cursor on the buffer's last char | helix-verified (phase 5) | | `X` | snap selection to line bounds | vsel → msel over its row span; bare cursor → 1-line msel; msel: already line-wise, no-op | helix-verified (phase 5) | | `Alt-x` | shrink selection to line bounds | vsel only: partial first/last lines drop out; nothing left collapses the selection; msel: no-op | helix-verified (phase 5) | @@ -223,10 +243,12 @@ grew `sels` + `primary`, emitted only when there is more than one range. | `_` | trim whitespace off both ends of every range | empty and all-whitespace ranges drop; nothing left = collapse + keep primary (helix) | helix-verified | | `<n>o` / `<n>O` | open n lines, one cursor per line | helix `open` with a count; this is why the `o-count` golden gained a `sels` field | helix-verified | | every motion/operator | acts at every cursor | replayed last-range-first, so an edit never disturbs a range still waiting; each pass's result is remembered as a distance from the END of the text, which an earlier edit cannot move | helix-verified (56 msel-* cases) | -| `y` with several ranges | joins the ranges' text with newlines into the ONE register | helix keeps a register VALUE per range and pastes value[i] at range[i]. Waived (`msel-yank-paste`) | waived | -| `a` … `Esc` with several ranges | the primary's appended-over span is restored; the others collapse to bare cursors | `Pane.append_at` is a single field. Waived (`msel-append`) | waived | -| `&` | align selections into a column | **skipped**: needs visual (tab-expanded) columns, which nothing else in pardes measures | -| `Alt-(` / `Alt-)` | rotate the CONTENTS of the selections | skipped: a separate feature from rotating which range is primary | +| `y` with several ranges | one value per range, pasted back value i at range i by `p`/`P`/`R` and insert `Ctrl-r`; the acme cut/paste chords and a paste into a terminal take the values joined by newlines | `Registers.zig` | helix-verified | +| `"<reg>` | the next command's register: any character names one of its own. Computed ones: `_` swallows writes and reads nothing (`"_d`), `#` is each range's number from 1, `.` each range's text, `%` the file's name, `/` the last `s`/`S` pattern; `+`/`*` the system clipboard. A count typed before `"` stays the command's | helix `select_register` | helix-verified | +| insert `Ctrl-r <reg>` | type this range's value of the register (`Ctrl-r #` numbers the cursors). Esc after `Ctrl-r` only cancels it. `Ctrl-r +` reads what pardes last put on the clipboard, not the desktop's | helix `insert_register` | helix-verified | +| insert mode with a selection | every range is carried through each edit as helix maps it (`Range::map`): typing at the head of an `i` range slides it, typing at the end of an `a` range stretches it, Enter slides or stretches it by what the cursor moved, and an arrow key collapses it. Esc after `a` pulls each range's end back one character (helix `restore_cursor`) | `edit.insertKey`, `Text.restore_cursor` | helix-verified | +| `&` | align selections into columns: the k-th range of each line is column k, and spaces go in before each range until its head reaches the column's widest head, in display cells (`File.rawDisplayCol`) | helix `align_selections` as of the harness's helix (25.07.1 grouped columns differently). A range over several lines refuses. A TAB counts as `tab_width` cells, not up to the next stop | helix-verified | +| `Alt-)` / `Alt-(` / `<n>Alt-)` | rotate the CONTENTS of the selections forward / back by one range (n ranges), in one edit; each range comes back over the text it now holds and the primary moves with its text | helix `rotate_selection_contents_*` as of the harness's helix: 25.07.1 read the count as a GROUP size instead (rotate by one within each run of n ranges) and left the primary where it was, which is what helix-golf's `invert_dictionary_2` relies on | helix-verified | Anything that reaches outside the buffer — a builtin, a language query — runs once from the primary and drops back to a single cursor rather than firing per @@ -235,14 +257,24 @@ other cursors where they are (`FileSnap` holds one range). ### Regex selection (`s` / `S`) — the interactive pair -Both arm the tag input the same way `/` does — the pattern is typed into the -tag tail after a marker, no popup — and both re-run on EVERY keystroke, from +Both arm the prompt the same way `/` does — the pattern is typed after a +marker on the prompt's own line in the notice band, no popup — and both +re-run on EVERY keystroke, from the selection the prompt opened on (`Pane.sel_snap`). That is what makes the selection a live preview, what makes typing a pattern one character at a time land where pasting it whole would, and what makes Esc a plain restore. Enter re-runs the final pattern down the same path, so a submit can never disagree -with what is on screen. Engine: **mvzr** (`build.zig.zon`), a bytecode VM that -compiles a runtime pattern with no allocator. +with what is on screen. Pressed in a tag, column tag or workspace tag they +select in that tag's own text, and so does `|` pipe it; `/` searches the +body wherever it is pressed (`Pane.prompt_for`). Engine: **mvzr** (`build.zig.zon`), a bytecode VM that +compiles a runtime pattern with no allocator, called the way sam searches +(`src/regexp.zig`, shared with a pane's `addr` file): each line is its own +haystack, so `^` and `$` match at every line's start and end and `.` never +crosses a newline, and a pattern naming `\n` runs over the whole selection. +Where helix's `^` is only the selection's start, this is sam's. mvzr +backtracks without bound of its own, so the step budget docs/typ/reference.typ gives +for `addr` holds here too: a search that runs out of it (about 300 ms) +keeps the matches it found so far. | Key | Behavior | Notes | Status | | --- | --- | --- | --- | @@ -250,10 +282,10 @@ compiles a runtime pattern with no allocator. | `S<pat>` Enter | split each range on its matches | helix `split_on_matches`; the pieces BETWEEN the matches, including the empty one a leading match produces | helix-verified | | `s`/`S` then Esc | back to the selection the prompt opened on | the empty pattern applies nothing, so cancelling IS the restore — one path, not a second one | helix-verified | | an all-lowercase pattern | matches case-blind | helix's smart-case. mvzr has no such flag, so the surface is lowercased instead (ASCII folding is byte-for-byte, so the offsets are identical) | helix-verified | -| `^` and `$` | assert at the SCAN position, not at a line | helix compiles with `multi_line(true)`, so its `^` is every line start. Waived (`sel-regex-caret`) | waived | -| `.` | matches a newline like any other byte | the Rust regex crate excludes `\n` by default; mvzr does not. `[^\n]` is the workaround and agrees in both. Waived (`sel-regex-dot-newline`) | waived | -| more than 64 matches | the ones past `MAX_SELS` are dropped | the ceiling the whole selection model has, not this key's | -| `K` / `Alt-K` | keep / remove ranges matching a regex | **skipped**: the same prompt, filtering instead of splitting — worth adding next | +| `^` and `$` | hold at every line's start and end | helix compiles with `multi_line(true)`; pardes gets the same by searching each line as its own haystack (`src/regexp.zig`) | helix-verified | +| `.` | never matches a newline | as the Rust regex crate: a pattern without `\n` searches line by line, and one that names `\n` has its `.`s made `[^\n]` (`src/regexp.zig`) | helix-verified | +| many matches | up to `memory.limits.selections` ranges: 1024 on the desktop, 64 on the board; matches past it are dropped | helix has no limit. The room for them is allocated when a second range appears and given back at one range, so a single cursor costs nothing | helix-verified up to the limit | +| `K<pat>` / `Alt-K<pat>` Enter | keep only the ranges a match starts inside / only those none does; primary 0, and keeping none leaves the selection alone | helix `keep_selections` / `remove_selections`, on the same prompt as `s`/`S` (markers `Keep /`, `Remove /`). The range is searched as `s` searches it, line by line with its lines' context, where helix matches the range's text alone: a `^` right at a range that starts mid-line matches in helix and not here | helix-verified | ### `Ctrl-c` — toggle comments @@ -273,7 +305,7 @@ compiles a runtime pattern with no allocator. | --- | --- | --- | --- | | `mm` | goto matching bracket | dumb text scan with nesting for `()[]{}<>`; ON a bracket only (no TS "nearest pair"); works on terminals via the motion surface | helix-verified (phase 5) | | `mi<pair>` / `ma<pair>` | select inside / around textobject | pairs `( ) [ ] { } < >` nesting-aware multi-line; quotes `' " `` ` `` ` **line-scoped** (plain-text strings don't span lines); `w`/`W` word run (+trailing ws around, leading if none); `p` blank-line block (+trailing blanks around). Empty inside (`()`) = no-op. Selections work on terminals; `Pane.pending2` holds the i/a/s/r/d sub-key | helix-verified (phase 5) | -| `ms<ch>` | surround selection (or cursor char) with the `<ch>` pair; wrap incl. pair becomes the selection | either bracket names its pair; any other ASCII char wraps with itself; file panes only | helix-verified (phase 5) | +| `ms<ch>` | surround selection (or cursor char) with the `<ch>` pair; wrap incl. pair becomes the selection, keeping the direction it had | either bracket names its pair; any other ASCII char wraps with itself; file panes only | helix-verified (phase 5) | | `mr<from><to>` | replace enclosing `<from>` pair chars with `<to>`'s | `Pane.pending_ch` holds `<from>` while `<to>` pends; file panes only | helix-verified (phase 5) | | `md<ch>` | delete the enclosing `<ch>` pair chars | file panes only | helix-verified (phase 5) | @@ -291,7 +323,7 @@ compiles a runtime pattern with no allocator. | Key | Behavior | Notes | Status | | --- | --- | --- | --- | | `]p` / `[p` | next / prev paragraph (+ count) | helix `goto_next/prev_paragraph`: selects to the boundary (anchor at the origin), blank-line-delimited blocks, count iterates | helix-verified (phase 5) | -| `]Space` / `[Space` | add `<n>` blank lines below / above, cursor staying on its text line | file panes only (shell output immutable) | helix-verified (phase 5) | +| `]Space` / `[Space` | add `<n>` blank lines below the selection's last line / above its first, the selection staying on its text | file panes only (shell output immutable) | helix-verified (phase 5) | ### Insert mode @@ -313,41 +345,27 @@ text. | `Ctrl-j` | insert newline (Enter alias) | | helix-verified (phase 5) | | `Home` / `End` | line start / line end past-the-last-char (`goto_line_end_newline`) | file panes (terminal insert cursor rides its run, as before) | helix-verified (phase 5) | | `PageUp` / `PageDown` | cursor page up / down, col kept (clamped to line) | file panes | helix-verified (phase 5) | -| `Tab` | indent to the next 4-column stop with SPACES (`insertTab`, `pardes.zig`: `pad = INDENT_W - col % INDENT_W`) — no `\t` byte ever reaches the file | helix's Spaces indent style; helix smart-tab skipped. After a `.` in a file the backend speaks, Tab instead asks for completion and only indents if the answer is empty (section A) | helix-verified (phase 5) | +| `Tab` | indent to the next 4-column stop with SPACES (`insertTab`, `edit.zig`: `pad = INDENT_W - col % INDENT_W`) — no `\t` byte ever reaches the file | helix's Spaces indent style; helix smart-tab skipped. After a `.` in a file the backend speaks, Tab instead asks for completion and only indents if the answer is empty (section A) | helix-verified (phase 5) | +| insert `Tab` after text / `Shift-Tab` | in a file with a grammar, Tab after text on its line leaves the syntax node the cursor is in (to the enclosing named node's end); Shift-Tab always indents | helix `smart_tab` / `insert_tab`. The reference pins smart tab off, so a file without a grammar indents as the harness's helix does, where stock helix would do nothing there. Smart tab is checked against the installed hx on JSON (`normal.zig` test) | helix-verified (plain text), hx-checked (JSON) | +| insert `Ctrl-s` | commit an undo checkpoint: `u` after the session goes back to the text as it was here, a second `u` to before the session | helix `commit_undo_checkpoint`; a snapshot pushed mid-session | helix-verified | ## C. Skipped | Key(s) | Helix behavior | Reason | | --- | --- | --- | -| `?`, `*`, `Alt-*` | rsearch / selection-as-pattern | search — pardes has its own `/` (plain substring into an output buffer, kept as-is) and an `n`/`N` that SELECTS the next look-able text instead of walking match hits; helix regex search machinery not wanted | +| `?` | reverse search prompt | pardes' `/` is a query pane (above); `N` steps backward. `*`, `Alt-*` and search-repeat `n`/`N` are implemented and verified above | | `Space` mode: `f F e . b j g G ' w c C Alt-c / ?` | pickers, global search, palette | pickers and the command palette do not exist here — but the KEY is taken: pardes' own leader runs the acme builtins (section A). Two halves of helix's space mode DO exist and are in section A: the clipboard menu (`<space>y Y p P R`, helix's letters on helix's leader) and the LSP menu, moved one prefix deeper to `SPC l k/r/a/h/s/S/d/D` because `d`, `k`, `s` and `h` were already pardes' most-pressed keys | | Popup `Ctrl-u`/`Ctrl-d`, Completion menu, Signature help tables | LSP popups | LSP | | Picker table (all rows), Prompt table (all rows) | picker / prompt internals | pickers — pardes' tag line is its own one-line editor | | `gn` `gp` `ga` `gm` | next/prev/alternate buffer | buffer nav — pardes panes aren't a buffer list | -| `gw` | word-label jump | label-jump overlay machinery, not core editing | -| `g.` | goto last modification | jumplist/history position tracking | -| Window mode table: `Ctrl-w` + `w v s t f F h j k l q o H J K L ns nv` (+ Ctrl variants) | splits/window management | window mode — pardes has its own Ctrl-w focus + Alt-n/Alt-c + mouse layout drags | -| `Alt-o`/`Alt-up`, `Alt-i`/`Alt-down`, `Alt-p`/`Alt-left`, `Alt-n`/`Alt-right`, `Alt-a`, `Alt-I`, `Alt-e`, `Alt-b` | syntax-node selection | tree-sitter | -| `]f [f ]t [t ]a [a ]c [c ]e [e ]T [T ]x [x` | TS unimpaired jumps | tree-sitter | -| `]g [g ]G [G` | git change jumps | needs VCS diff state | +| Window mode table: `Ctrl-w` + `w v s t f F h j k l q o H J K L ns nv` (+ Ctrl variants) | splits/window management | window mode — pardes has its own Ctrl-w focus + Alt-n/Alt-c + mouse layout drags; of helix's table it keeps `h j k l`, and closes with `d` (`Del`, which asks `k`/`j`) where helix has `q`, `c` collapsing | +| `]g [g ]G [G` | git change jumps | **deferred by decision**: needs a diff base per file (jj `@-` or git HEAD, fetched by the host on open and save) and line hunks from diffz; the design is written up, the work waits | | insert `Ctrl-x` | completion menu | completion exists, but not as a popup: insert-mode Tab straight after a `.` opens a buffer of candidate DECLARATIONS (section A). helix's menu itself is skipped | -| `"` `<reg>`, insert `Ctrl-r` | register select / insert | registers — one yank register and no way to name a second; the system clipboard is not spelled as a register here either, it is the five `SPC` commands in A | -| `Q` / `q` | record / replay macro | macros — needs replayable input log | | `Ctrl-s` (normal) | save jumplist position | jumplist itself is implemented (`Ctrl-o`/`Ctrl-i`, section A); only the explicit save point is skipped | -| `Alt-u` / `Alt-U` | undo-history earlier/later | history timeline — linear snapshot u/U covers pardes | -| `K Alt-K`, `Alt-:` | regex keep/remove, ensure-forward | `K`/`Alt-K` are the same prompt `s`/`S` now have, filtering instead of splitting (`s S` moved to "Regex selection" in A, the rest of the family to "Multiple cursors") | -| `&`, `Alt-(` / `Alt-)` | align selections, rotate selection CONTENTS | see the multiple-cursors table for why | -| `Alt-J` | join + select the inserted space | marginal over `J` | -| `Alt-\|` `!` `Alt-!` `$` | shell pipe-to (output discarded), insert output, append output, keep-by-exit-status | shell — `\|` (`shell_pipe`, output replaces the selection) is implemented in section A; these four are the other members of helix's shell family. `$` is additionally taken for line-end here (section A) | | `:` | command mode | side-effects/file-ops — pardes builtins live in the tag, and `:` is bound to focusing it (section A) | | `gf` | goto file under selection | covered by pardes Enter-look | | `Ctrl-z` | suspend | pardes IS the terminal multiplexer | -| insert `Ctrl-s` | commit undo checkpoint | undo is per-insert-session snapshots; no sub-session checkpoints | -| `Shift-Tab` (insert), smart-tab semantics | insert tab / smart tab | smart-tab machinery; plain Tab-inserts-tab lands in B | -| `Z` (sticky view mode) | persistent view mode | marginal; `z` one-shots suffice | -| `zm` (view) | align middle horizontally | marginal even with hscroll | -| `.` | repeat last insert | **deferred by decision**: needs recording the insert session's keystrokes and a replay path — a new subsystem; undo is whole-buffer snapshots with no edit log to piggyback on. Revisit after phases 2–5 if the log exists by then for another reason | -| Select/extend mode section (prose) | `v` turns all motions into extenders, `n`/`N` keep selections | implemented for motions (phase 5: `pane.select` + the fixed anchor, differential-verified — see the `v` row in A); helix's search-`n`/`N` extension doesn't apply (pardes' `n`/`N` is the look-ring motion, which REPLACES the selection with the span it lands on) | +| Select/extend mode section (prose) | `v` turns all motions into extenders, `n`/`N` keep selections | implemented for motions (phase 5: `pane.select` + the fixed anchor, differential-verified — see the `v` row in A); search `n`/`N` add matches in select mode, as in helix | ## Differential testing (phase 5) @@ -379,21 +397,40 @@ Files (all in `test/hxcases/`): (runs the `hx-harness` binary from the helix checkout; override with `$HX_HARNESS`). Only needed when cases change — the diff itself runs offline. -- `waivers.jsonl` — named exemptions, each with a reason. Six live ones: - `wiX-edit-drops-sel` and `msel-append` (helix maps selections through - insert-mode edits, pardes does not), `alt-c-window-op` (the pardes - window op deliberately shadows helix change-noyank), `msel-yank-paste` - (one yank register, not one value per range), and `sel-regex-caret` / - `sel-regex-dot-newline` (mvzr is not the Rust regex crate: no - multi-line `^`/`$`, and `.` matches a newline). +- `waivers.jsonl` — named exemptions, each with a reason. One live one: + `alt-c-window-op` (the pardes window op deliberately shadows helix + change-noyank). `wiX-edit-drops-sel` and `msel-append` went when insert + mode began carrying every range through its edits, `msel-yank-paste` with + registers of one value per range, `sel-regex-caret` and + `sel-regex-dot-newline` when `s`/`S` began searching line by line. - `parity.jsonl` — 80 further cases, used only by the parity gate below. -- `parity-waivers.jsonl` — 13 named exemptions for the parity gate, in three +- `parity-waivers.jsonl` — 19 named exemptions for the parity gate, in three classes: one deliberate pardes binding (`ctrl-b-page`, since `Ctrl-b` IS the tty toggle), eight pty VIEWPORT divergences (a terminal's view cannot scroll below the vt's live grid bottom, so the cursor snaps into a different - scrolloff band — no text differs), and four case texts a pty cannot hold + scrolloff band — no text differs), and five case texts a pty cannot hold verbatim (a literal TAB the emulator expands, a file with no trailing - newline, an all-whitespace last row the dump trims). + newline, an all-whitespace last row the dump trims). One more, + `dot-append-count`: `a` at a file's end grows it by a newline (helix + append_mode), which a terminal's text, not the editor's to grow, does not. + The sticky-view cases join the viewport class. +- `golf.jsonl` + `golf-goldens.jsonl` — every example on helix-golf + (github.com/nik-rev/helix-golf, imported at d78c18c): one case per numbered + step of each walkthrough, its keys being the command up to and including + that step, so the first failing case names the step that diverges. A + step that starts over with `%` also gets `-fromNN` cases replaying the rest + of the command from helix's own text there, so a later step is still + tested when an earlier one misses. The goldens are + `hx-harness test/hxcases/golf.jsonl`; `zig build hxgolf` runs them. + `golf-waivers.jsonl` is empty: all 124 cases pass, including the + search-register steps of `reverse_golf_example`. All ten examples + reproduce their published result in hx 25.07.1 under + the site's own conditions (a file of the example's language, auto-pairs + on). Under the harness two do not, and their goldens are the harness's + anyway, which pardes follows: `csv_to_sql` needs auto-pairs (off in the + harness and absent in pardes) to close its `VALUES (`, and + `invert_dictionary_2` needs 25.07.1's `<count>Alt-(` (rotate within groups + of count) where the reference helix rotates by count. - `smoke.jsonl` — 20 cases referenced by nothing in the tree: no build step, no script. Either wire it up or delete it. diff --git a/docs/ideas.typ b/docs/ideas.typ index 8c83ab55..87782dc5 100644 --- a/docs/ideas.typ +++ b/docs/ideas.typ @@ -1,5 +1,5 @@ // STATUS: live scratch notes, deliberately unfiled — nothing compiles this file -// (no `build.zig` step, and `docs/design.typ` does not include it); kept because +// (no `build.zig` step or other document includes it); kept because // the first two ideas are still open. The ideas themselves were last touched in // change `xmzpwklp` (2026-08-01); this header and the LANDED annotation below // are 2026-08-26 and changed no idea. @@ -21,3 +21,30 @@ (`look.lookableSpan`), in a results buffer one stop per ROW (`look.lookableLineSpan`). Written up in `docs/helix-keys.md`, the `n`/`N` row of section A. + +- OPEN (2026-10-01): a `Send` builtin, acme's Send in pardes terms + - not a rename of `Repl`: `Repl lang` is a binding (where Exec on a + language's files goes), Send is an action (push this text into a + terminal now) + - from a tag, type the pane's selection (else its current line) into the + bound REPL, else the terminal in the same column, and run it + - the gap it fills: sending from a pane no REPL routes (a .txt, a scratch, + a README) without binding anything + +- DONE (2026-10-21, window mode: SPC w / Ctrl-w enter, h/j/k/l move the + outline, Enter or Esc commits, labels always shown, other keys ignored): + an explicit pane picker for moving between panes + - the problem: SPC w h/l into a column that lands on a raw terminal leaves + the keys with its program, so Ctrl-w/SPC can't move on without Ctrl-b or + the mouse (raw terminals must keep Ctrl-w: bash deletes a word with it) + - the fix has to choose before focus lands. Options: + 1. a window mode: SPC w holds the keyboard; h/j/k/l move a highlighted + outline between panes (nothing receives keys meanwhile), Enter (or a + non-motion key) commits, Esc cancels + 2. pane labels (avy / tmux display-panes): a letter on every pane, press + one to jump there; skips raw terminals entirely + 3. landing rules: into a column, land on its last-focused non-terminal + pane, or land a terminal in normal mode; no new mode but implicit + - leaning: 1 with 2's labels shown while in the mode + - open: does Ctrl-w enter it too; does the committing key reach the pane or + only Enter commits; labels always or on a key diff --git a/docs/lsp-evaluation.md b/docs/lsp-evaluation.md index 184223e8..6aa58409 100644 --- a/docs/lsp-evaluation.md +++ b/docs/lsp-evaluation.md @@ -16,7 +16,7 @@ three independent implementations, one function each. C landed; see > `hxparity` **561** (`cases.jsonl` + the 80 editing extras in > `parity.jsonl`). The one number that IS kept current is the grammar count in > the Recommendation, because that is an argument about today rather than a -> measurement of then. For what the harness does TODAY, read `docs/lsp.md`. +> measurement of then. For what the harness does TODAY, read `docs/typ/building.typ` and the guide's Keys section. | | **A · stdlib** | **B · client** | **C · in-process** | |---|---|---|---| @@ -106,7 +106,7 @@ is spelled a second time in `build.zig` as `const zls_version = "0.16.1-dev+3e0d0820"`, for ZLS's own `-Dversion-string`; the semver half exists nowhere in the manifest, so the duplication cannot be removed, but a `comptime` block beside the constant `@compileError`s unless the two name the -same commit. See "Which ZLS, and which stdlib" in `docs/lsp.md`. +same commit. See `docs/typ/building.typ`. A and B were not deleted, only un-worktree'd. They remain whole commits: @@ -125,7 +125,7 @@ later, or if the ZLS coupling ever needs backing out. > status sink narrating server state onto the transient message row. B's > transport bones (socketpair, deadline-bounded writes, MSG_NOSIGNAL, > believe-the-server encoding) survive in it. See "The protocol client" in -> docs/lsp.md. +> docs/typ/building.typ. ## Recommendation (as written before the decision) diff --git a/docs/lsp.md b/docs/lsp.md deleted file mode 100644 index 82586344..00000000 --- a/docs/lsp.md +++ /dev/null @@ -1,72 +0,0 @@ -# Language intelligence - -Native hosts, including detached sessions, run language queries on workers. -Zig uses the linked ZLS analyser; other languages use the protocol client in -`src/lsp/lsp_client.zig`. Web and board builds have no language backend. - -`Lspinfo` (`SPC l i`) reports backend versions, server state, capabilities, -recent timings and errors. `Lspwhy` (`SPC l w`) traces resolution at the cursor. - -## Commands - -| Keys | Action | -|---|---| -| `gd`, `gD`, `gy`, `gi`, `gr` | Definition, declaration, type, implementation, references | -| `SPC l k` | Hover | -| `SPC l r` | Rename | -| `SPC l a` | Code action | -| `SPC l h` | Select references | -| `SPC l s`, `SPC l S` | Document and workspace symbols | -| `SPC l d`, `SPC l D` | Document and workspace diagnostics | -| `]d`, `[d`, `]D`, `[D` | Next, previous, last and first diagnostic | -| `=` | Format | -| Ctrl-click | Definition | -| Insert-mode Tab after `.` | Candidate declarations | -| `SPC l c`, `SPC l C` | Incoming and outgoing calls | -| `SPC l t`, `SPC l T` | Supertypes and subtypes | - -A single goto result jumps directly; several results open a reusable search -buffer. `n`/`N` select result rows and Enter opens them. Hover opens prose. -Locations use one-based `path:line:column` or `path:line:column-endcolumn`. -Paths below the requesting pane's directory are relative to that directory; -other paths stay absolute. - -Completion lists declarations and inserts nothing. An unanswered Tab indents -only if the cursor has not moved since the request. Multicursor Tab indents -without starting a query. - -Formatting and same-file rename apply as one undo transaction. A workspace -rename spanning other files opens a preview; it does not partially apply the -rename. The linked Zig analyser resolves current-file references and relative -imports, but does not run the build runner to discover dependency modules. - -## Configuration and testing - -`PARDES_LSP_RS`, `_C`, `_GO`, `_TS` and `_PY` override the server executable -for each language. An empty value disables that server. `ZIG_LIB_DIR` overrides -the stdlib path recorded at build time. `Lspinfo` shows the effective settings. - -The protocol client keeps one child server per configured language, negotiates -position encoding, and handles both push and pull diagnostics. Startup and -request waits have deadlines; failed starts back off before retrying. Worker -status messages reach the host event queue. - -`zig build lspprobe -- gd <file> <line>:<column>` queries the same backend from -the command line. `zig build lspbench` measures it. Snapshot tests use a Zig -mock server with deterministic answers while exercising the real client, -including process startup, framing, edits and undo. `zig build fs-test` also -checks language-worker delivery in TTY and detached sessions over 9P. - -## Ownership - -`host_io.Lsp.Job` owns copies of the source, path, argument and root. Workers -never read the live core. A request ID and pane serial reject obsolete replies; -mutating replies also require the original file revision. Restore cancels -owned work before replacing the core. - -Backends implement `query`, `speaks` and `supports` in `src/lsp/`. The first -backend supporting the file and query answers; status queries visit all of -them. Results are written to the caller's writer. Use `lsp.row` or `spanRow` -for locations, `edit` for rename ranges, and `put` for replacement text. -Edit records use half-open byte offsets into the request's source snapshot. -The core validates the complete response before applying it. diff --git a/docs/macos.md b/docs/macos.md index e104d3a6..3ee55d0a 100644 --- a/docs/macos.md +++ b/docs/macos.md @@ -102,8 +102,8 @@ asking for a thin insert caret instead of a block. `Surface.images` crosses separately as `pardes_frame_images` / `pardes_frame_image_list` — see "Pixel attachments" below. -`pardes_scene` is the matching full-window snapshot: a bit each for CRT, -ripple, and glitch, plus the 60 Hz time/frame that animates them. It is returned +`pardes_scene` is the matching full-window snapshot: a bit for CRT, plus the +60 Hz time/frame that animates it. It is returned by value, so the renderer never holds a pointer into live core state. A zero flags word is also the fast-path contract: draw the CoreText frame directly. @@ -355,8 +355,8 @@ The dirty half needed one core watermark. `File` counted `revision` but never recorded which edit was last *written*, so no shell could derive "unsaved" — `File.saved_revision` is that watermark, advanced by `Save` at the moment the write is asked for and by a successful external-file reload whose bytes -already came from disk. The core renders the same answer as ` *` after the -path in every tagline, while this host also puts it in the native close button. +already came from disk. The core shows the same answer on each pane's grip +button, while this host also puts it in the native close button. Save is marked at ask-time rather than on completion because `save_file` carries none back, which makes both indicators exactly as honest as the Save request. @@ -462,7 +462,7 @@ after `cd` and after an idle tick. Nested launches use the same inherited 9P address and pane serial as other native hosts. They do not inspect ancestor processes or executable names. -See [the control filesystem](fs.md) for paths and transports. +See [the control filesystem](typ/reference.typ) for paths and transports. Two more things this host cannot inherit from its launcher, because a `.app` has none: @@ -495,7 +495,7 @@ has none: The face is the shell's business and the size is the window's, so the two are reached differently on purpose. -`Font <name>` and the `FontSel` picker are ordinary core builtins, enabled by +`Font <name>` and the `Fonts` picker are ordinary core builtins, enabled by `pardes.font_picker` — the frontends that draw their own text, which is now the SDL shell and this one. `src/fonts.zig` moved out of `gui/` for that reason. It walks the platform's font directories and reads four small sfnt tables per file @@ -525,7 +525,7 @@ what is on screen. Cmd+=, Cmd- and Cmd+0 change the point size, rebuild `Metrics`, and report the new cell through the same resize path a window drag uses. They also observe the -effective face/point tuple through `pardes_font_observe`, so the single `Config` +effective face/point tuple through `pardes_font_observe`, so the single `DumpConfig` report follows a host-owned zoom without resolving a pending face request. The initial system face is observed the same way. Cmd+= rather than Cmd++ because AppKit matches the character and `=` is what is under the finger. @@ -662,8 +662,7 @@ longer leaves a dark titlebar over a cream grid. ## Scene effects -`Crt`, `Ripple`, and `Glitch` are three switches over one postprocess, not three -stacked filters. Their canonical macOS source is `shaders/crt.ci.metal`, which +`Crt` is one full-window postprocess. Its canonical macOS source is `shaders/crt.ci.metal`, which the build installs as `pardes.app/Contents/Resources/crt.ci.metal`. The Swift shell loads that exact asset with `CIKernel.kernels(withMetalString:)` and runs it through a `CIContext` created from the system Metal device. The source is @@ -673,14 +672,12 @@ The ordinary CoreText/attachment/cursor pass is one function. With any scene bit or panel track it targets a retained, backing-scale bitmap; kernels then sample the complete frame into the flipped view. PDFs, image panes, taglines, rules, and the caret therefore receive the same effect. With every bit off and -no panel track the bitmap and Core Image context are bypassed entirely. Ripple -and glitch alter sample coordinates only, preserving theme colors; CRT works +no panel track the bitmap and Core Image context are bypassed entirely. CRT works in linear light with restrained bloom, scan/mask, vignette, hum, and noise instead of applying a broad color remap. The scene kernel alone receives a `clampedToExtent` image and the final output -is cropped back to the original finite extent. Coordinate tears and chroma -samples therefore clamp to the edge exactly like SDL's scene sampler instead +is cropped back to the original finite extent. Chroma samples therefore clamp to the edge exactly like SDL's scene sampler instead of acquiring transparent-black seams from Core Image's finite source image. The Zig side owns the clock. `pardes_animation_tick` increments its wrapped @@ -689,8 +686,8 @@ from that integer. Input bursts cannot accelerate the shader. Pointer input follows the same destination-to-source transform as the last presented scene frame before it is divided by the cell metrics. The view keeps -that exact `pardes_scene_s` snapshot and mirrors the Metal barrel, ripple and -glitch sampling arithmetic in `ScenePostprocessor.sourcePoint`; pixels outside +that exact `pardes_scene_s` snapshot and mirrors the Metal barrel arithmetic +in `ScenePostprocessor.sourcePoint`; pixels outside the CRT tube have no cell. The resulting displayed-grid cell then reaches the core, whose panel-track mapping resolves it to canonical pane content. @@ -716,8 +713,8 @@ while `pardesComposedInCore` effects only clip the already-composed core cells; pixel attachments have no character value and pass through unchanged. Because the input is the finished bitmap rather than a glyph-only batch, backgrounds, glyphs, taglines, rules, the caret, PDF pages, and image -panes move and dissolve together. Scene CRT/ripple/glitch runs once after the -panel composition. +panes move and dissolve together. The scene CRT runs once after the panel +composition. With no scene bit and no panel track the retained bitmap, Core Image context, and Metal passes are bypassed. `EffectCode Panel*` links to this Metal @@ -762,7 +759,7 @@ separation is currently macOS-specific; other hosts keep the opaque raster path. `WindowBlur <0..100>` controls the strength of that native backdrop independently of `WindowOpacity`. It is a macOS-only builtin, also accepted in the startup -config and reported by `Config`. It defaults to 0 (off); 100 shows the full +config and reported by `DumpConfig`. It defaults to 0 (off); 100 shows the full AppKit material and intermediate values blend the material with the unblurred backdrop using the effect view's alpha. An opaque themed background hides the effect; lowering `WindowOpacity` makes the remembered strength visible again. @@ -1143,7 +1140,7 @@ used for the table and is not folded into the direct-path claim. `src/macos.zig` never calls `takeAttach`, so the word does nothing at all and says nothing either. Wiring it up means a unix-socket frontend loop beside the AppKit one, which is `src/detached/client.zig`'s job in the tty and SDL - shells; see `docs/detached.md`. + shells; see `docs/typ/building.typ`. - **IME and marked text.** Only finished characters reach `pardes_key`, so a dead key composes nothing and Option is Alt rather than a compose modifier. Real composition means implementing `NSTextInputClient` *and* giving the core diff --git a/docs/mvzr-group-backtrack.md b/docs/mvzr-group-backtrack.md new file mode 100644 index 00000000..867336a3 --- /dev/null +++ b/docs/mvzr-group-backtrack.md @@ -0,0 +1,86 @@ +# mvzr: a repeat inside a group never gives back to what follows the group + +A report for upstream (https://github.com/mnemnion/mvzr), against trunk +3efcfe3 (0.3.9). pardes patches its fetched copy at build time (build.zig) +until it is fixed there. + +## What happens + +```zig +const mvzr = @import("mvzr"); +// a+ab matches aab; the same with the repeat in a group does not +std.debug.assert(mvzr.compile("a+ab").?.match("aab") != null); +std.debug.assert(mvzr.compile("(a+)ab").?.match("aab") == null); // expected a match +``` + +The same for `(a*)ab` on `aab`, `(.+)_area` and `([a-z_]+)_area` on +`the_total_area`. `\w+_area` and `(\w)+_area` match, as does +`([a-z]+)_area` (whose class cannot eat the `_`, so no giving back is +needed). + +## Why + +`hasAlt` returns true when its scan reaches the group's own closing +`.right` at depth 0: + +```zig +.right => { + if (pump == 0) + return true // the group's own `)`, not an alternative + else + pump -= 1; +}, +``` + +so every group with more pattern after it goes down `matchGroup`'s +alternatives branch. That branch takes each alternative's single match (a +greedy repeat's longest) and, when the pattern after the group fails from +there, moves on to the next alternative; it never tries a shorter match of +the same alternative. The alt-free branch has the same shape. + +## A fix + +Where the pattern after the group fails from an alternative's match, try +that alternative's shorter matches, longest first, before the next +alternative. pardes's patch, in `matchGroup`'s loop: + +```zig +} else { // Try our next pattern, if any. + var e = m1.i; + while (e > i) { + e -= 1; + const shorter = matchAlt(remaining_patt, sets, haystack[0..e], i) orelse continue; + if (shorter.i != e) continue; + if (matchPattern(next_patt, sets, haystack, e)) |whole| return whole; + } + remaining_patt = m1.j; +} +``` + +Matching the alternative against `haystack[0..e]` makes `$` and `\b` see a +string end at `e`, so a group ending in either can accept a cut the full +string would not; a continuation-passing matcher (each repeat trying the +rest of the whole pattern) would be the full fix. `hasAlt` returning false +at the group's own `)` is worth fixing too. + +# mvzr: `$` before `|` is a bad pattern + +A second report, same trunk. `compile` refuses `$` anywhere but at the +very end of the pattern, so an anchored alternative must come last: + +```zig +std.debug.assert(mvzr.compile("zz|h$") != null); +std.debug.assert(mvzr.compile("h$|zz") == null); // expected a regex +std.debug.assert(mvzr.compile("(h$|zz)") == null); // likewise +``` + +The parser's check is `if (i + 1 < in.len) bad_string = true`. The +matcher already handles `.end` inside an alternative: `matchAlt` and +`matchGroup` hand `matchPattern` each alternative as its own slice, and +`.end` returns an empty rest, which ends that slice. So `$` can stand +before `|` or `)` as well as last; pardes's patch: + +```zig +'$' => { + if (i + 1 < in.len and in[i + 1] != '|' and in[i + 1] != ')') { +``` diff --git a/docs/next-anim.md b/docs/next-anim.md new file mode 100644 index 00000000..e1d7e14f --- /dev/null +++ b/docs/next-anim.md @@ -0,0 +1,1107 @@ +# anim: the game animation pass, as built + +The author's words were the spec: scrolling whose timing is consistent so +it never feels choppy; every scroll animated, a long one too; smooth +while keeping the responsiveness; the thin insert-mode caret animated like +the block; small motions that read as smooth; the game's habits for +implementation and testing, frame timings measured as a game measures +them. Later rounds: input latency is a hard constraint; p90/p99 against +the mean is the smoothness measure; throughput on a big file; every file +kind, pane kind and way a view moves, the tty, long lines walked along, +picture and PDF first frames; ponytail for all of it; recordings. + +Positions, not a verdict: argue with them. + +## The change stack (workspace `pardes-n-anim`, above converge `oqolqlko`) + +| change | what | +|---|---| +| anim 1 `vtmwqzpt` | `src/FrameStats.zig`, the frame probe in `Pardes.frames`, stamped by `pump`; the Debug box's timing lines; `PARDES_FRAMES` dump at exit | +| anim 1b `sxxnrzqz` | input-to-present latency, work zones, the view shown, the tty's bytes; the timedemos (`PARDES_FRAMES_DEMO=scroll\|stress\|jumps\|kinds\|panes\|longlines\|one\|clip-*`); `PARDES_FRAMES_CAPTURE` (every presented frame's pixels, for the samples) | +| anim 2 `yqwqutws` | the GUI's paced frame loop: a tick grid, each frame sampled at its tick, an input's frame at once | +| anim 3 `wkxvyoqy` | every scroll glides, whatever moved the view | +| anim 4 `qztrptlo` | the thin caret glides; a step eases; the caret rides a scroll's glide | +| anim 5 `ntnlpots` | colours painted ahead on a worker (`Stream.paintAhead`) | +| anim 6 `xykrnoql` | the tty paced too, its acks and output waited through | +| anim 7 `powlyrxv` | what the probe found: the spin, glide measure and emission, far-jump and long-line paints, the caret's sideways scroll, no join on the loop, pictures decoded off the loop | +| anim 8 | this note | +| anim 9 `nqznmskw` | the view's motion is one system: a stream of inputs moves it at its own rate, the spring only settles it | +| anim 10 `umnwnrvn` | the caret is its own body: drawn from its own springs, never carried by the text's glide | +| anim 11 `knzzzknu` | the integrator is `animation.Follow`; a PDF's strip moves in it, in pixels; a slow stream eases onto its mark | +| anim 12 `nqmoxkwz` | the tty runs the same glide (`src/glide.zig`), drawn at whole rows | + +Tests (one check each, `-Dtest-filter`): "frame stats: gaps into a motion +count as jank ...", "every scroll glides on one law ...", "a cursor eases +a cell at a time, keeps up with typing, and glides a jump ...", "the +focused cursor glides a jump, eases a step, the thin caret too ...", +"Stream: a scroll's colours are painted ahead on a worker ...", "a long +line is painted only around the caret", "a caret deep in a long line +scrolls the view sideways to it, measured from the view's edge". Builds: +Debug and ReleaseSafe, gui and tty. Failing: only the two baseline +failures NEXT.md names. Not re-baselined: the GUI golden `16-debug` (the +Debug box is three rows taller; it shows `frame virtual clock` under the +golden's clock so it stays still). + +## Method + +The probe (anim 1, 1b): a fixed ring of 16384 frames in `Pardes` (1.3 MB, +nothing allocated per frame, three clock reads a frame, always on). Per +drawn frame: update, render, present µs; the gap since the last present; +whether something was moving into it (a gap over 1.5 periods then is +jank); the input-to-present latency of the first input it answers (SDL's +event timestamp, moved onto the monotonic clock; the tty stamps a key as +its loop takes it); the view and the picture's offset (throughput is rows +actually presented); zones (the core's body rows and colours; the GUI's +instance build, shaping and rasterizing in it; a soft present's GPU wait, +upload and flip); the tty's bytes. `Debug` shows the last second. + +The timedemos are a game's: fixed scripts fed through the shell's own +input paths, named phases, the session ending itself. The tty is driven +through a pty I own (`.scratch/tools/ttydemo.py`, typing the same +scenarios as bytes, answering the frame acks). The corpus +(`.scratch/tools/corpus.sh`) links 13 big real files from the genizah +(a generated C parser, helix's commands.rs, a Python table, jquery, a +minified bundle, a grammar JSON, CHANGELOG.md, an HTML spec page, the +simdutf amalgamation, a TypeScript parser, a long shell test, a Go table, +guide.typ) and generates five (a 600 KB one-line JSON, CJK/emoji/ +combining/RTL/tab text, a 32 MB log, 400k short lines, six 360 KB lines). +The stress file is layout.zig x23 (38k lines, 1.6 MB). + +**Every before/after below is a pair run back to back** (`batch3.sh`: +base then after per demo), the before binary being main+probe (anim 1/1b +alone, `.scratch/base-bin`). The first batch, before and after an hour +apart, was useless: this i7-11700 under intel_pstate moves its clock 2-5x +with load, which moved every number more than any change did. + +## What the probe found, and what came of it + +1. **Only a wheel notch animated.** Ctrl-d/u/f/b, PageDown, G, ge, gg, n, + a Look: zero animated frames; a wheel flick past a body less three rows + snapped. Now every move glides (below). +2. **The loop ran uncapped while anything moved**, ~230 frames a second + on a 60 Hz display (the core asks for a 1 ms wait; the Wayland soft + present has no vsync), so the compositor showed whichever frame was + newest at each refresh: motion sampled at a random phase, the choppy + the author felt. Moving gaps before: p50 4.3 ms, stdev 2.2. Now one + frame a tick, sampled at the tick: p50 16.6, p99 17.2-18.0 ms. +3. **Pacing asleep made every frame 2-5x slower** (the same body-rows + work 3 -> 16 µs, an input's first frame 2.6 -> 7.5 ms p50 RS): a core + that sleeps 80% of each 16 ms is clocked down. Fixed by spinning while + something moves, as a game's frame limiter does (A/B below). +4. **Tree-sitter parsing on the frame** (perf: 36% of the Debug stress + run, most of it the DebugAllocator capturing a stack trace for every + tree-sitter allocation): a scroll past the painted stretch parsed the + next one on the frame, 6-58 ms in Debug, a hitch every two pages. Now + painted ahead on a worker; Debug held PageDown render p90 24 -> 1 ms. +5. **A key typed in the middle of a 500 KB line repainted the line**: + 172-213 ms a key in ReleaseSafe (minified JS, one-line JSON). Now 16 KB + round the caret. +6. **The caret's sideways scroll walked a long line from its start** + (no-wrap, `ensureCursorVisible`, `rawAtDisplay` measures the whole + line): now measured from the view's edge (`lineDisplayOffset`, which + already existed for selections). +7. **A picture decoded on its first frame**: 80-94 ms RS, 285-296 ms + Debug for the docs' screenshot. Now on a thread; the pane appears at + once and the picture lands a frame or so after the decode. +8. **The ReleaseSafe tail is the soft present**: a GPU fence wait (p50 0.6 + ms, p99 6.4) and a 6.7 MB upload (p50 0.9-1.7, p99 4.8) every frame. + With the GPU swapchain (X11 here) the scroll is 0.34 ms of work p50. + Not changed: see the positions. +9. Smaller, fixed: the glide's shift search on a page's first frame (6 ms + Debug: the core's line count is tried first), its emission of every + body row however far it lagged (twice the instances), a far jump + painting three views on the frame, a paint asked at every keystroke, a + paint of a 600 KB line joined on the loop (half a second), the tty's + loop running at the terminal's round trip (its acks woke it: one frame + every 0.4-2 ms while anything moved). + +## The design as built + +### Pacing (anim 2, 6, 7) + +While anything moves, the GUI draws one frame a display refresh on a grid +of ticks (`waitInput`, `Gui.pace_ns`), and the core is advanced to the +tick (`guiNow` -> `Shell.paced_ns`), not to whenever the loop woke, so each +frame moves the motion by exactly a period. A late frame skips the ticks +it missed. An input ends the wait at once and its frame is drawn then; +the grid restarts from it. Idle, the loop sleeps as before. Patterns: a +fixed presentation cadence over variable-step evaluation (the springs are +closed form, evaluated at the tick; the core's stepped animations keep +their 16 ms steps), a frame limiter, input acted on at once and never +gated (only the picture is paced). + +The tick is waited out polling, not asleep (anim 7). Same binary, same +script, interleaved, ReleaseSafe, the scroll demo (`.scratch/runs/ab*`): + +| loop | input-to-present p50/p90 ms (notches) | moving gap p50/p90/p99 ms | CPU s per 18 s run | +|---|---|---|---| +| before: uncapped | 3.2/15.2 | 4.4/9.3/10.1 | 1.9 | +| paced, asleep | 6.8-8.2/11-14 | 16.4/19.0/23.6 | 2.9-3.1 | +| paced, spinning | 1.8-1.9/7.7-15 | 16.6/16.8/17.4 | 7.0-7.3 | + +The tty is paced asleep (a terminal has no vsync and no sub-cell motion, +and power matters more there), and its wait now runs through the frame +acks and pty output to the tick (`waitOnce`): its moving frames went from +every 0.4-2 ms (each a write) to one a 16 ms tick. + +### Every scroll glides on one law (anim 3, 7) + +`stepGlide` keeps each pane's view as the last loop saw it (`Glide.seen`) +and finds the one that moved, whatever moved it. The body as the last +frame drew it is still in `core.surface` then, so it is copied there (no +per-frame copy). The next frame measures the rows moved (the core's line +count tried first; the shift search only when wrapped rows disagree), +keeps the rows that left for the gap, and kicks the spring. + +- The law: the Motion flavour's critically damped spring (the one the + author liked on a notch) at 1.5x its pace; a move during a glide adds + its rows and keeps the speed: retarget, never queue. A notch settles in + 12 frames, a half page 15, a page or a 30 000-line jump 16. +- Past what two frames share, the last frame's body is laid just past the + new one and slides one body (`.scratch/ge-montage.png`: line 55 runs + into 9448). The lag may reach two bodies, so a jump mid-glide carries on. +- Readable: at most a body in four frames (`Glide.sample`). +- Not gliding: a new pane (appears at once), a pane moved or resized in + the same step, a terminal's output, a touchpad (follows the finger), + generated text rewritten as its view moved, Motion off (all land; the + test checks). +- The caret and the glide quad ride the picture (`glideLift`). + +### The view's motion is one system (anim 9) + +The author watched sample 3 and saw a bounce a line under a held j: every +repeat restarted the spring's ease to its new target, so the picture sped +up and slowed down once an input. Now the picture's motion is one system +with its own state (`Glide`: its lag behind the text, its speed, and the +inputs that have been feeding it), integrated in one place every frame +(`Glide.advance`), and every scroll is an input into it (`Glide.kick`), +absorbed by what the system is doing: + +| the system is | an input comes | it does | +|---|---|---| +| at rest | any move (a j, a notch, a page, a jump) | the spring starts an ease from rest | +| easing | the same way, within 150 ms | the inputs are a stream now: it moves at their rate (rows an input over their spacing), a lag of an input or so behind, never easing to each | +| fed by a stream | another of the stream | the target moves on; the speed stays the stream's | +| fed by a stream | the inputs stop (none for 1.5 spacings) | the spring settles it, from the speed it has, never past its mark: the only ease-out | +| moving | an input the other way | the stream ends; the spring turns it through zero from its speed | +| moving | a jump past what two frames share | its rows are added (the stitched slide); the speed carries on | + +The caret is its own body (anim 10): its state is its own springs +(`CursorGlide`, screen cells as floats), integrated on the same tick, and +it is drawn from that state only, never from the text's glide (the ride +that lifted it with the glide's fractional lag is deleted: every motion +of the text had leaked into it). Its only coupling to the view is its +target: its cell in the view as it will be once settled (the core's view +is that one). + +| an input | the caret's target | it does | +|---|---|---| +| a page or half page, a scroll that keeps its screen row (Ctrl-f/b/d/u, PageDown/Up, a j or k at the edge row) | unchanged | not a pixel's move while the text slides under it | +| a move in a still view (h/j/k/l, w, a click, a typed character) | the new cell | the short ease | +| a stream of such moves (a held key, typing) | each new cell | lands on each, at the keys' rate | +| a scroll that carries its line (the wheel, Ctrl-o to a far place in view) | where its line will be | moves there whole, at the view's pace, and lands exactly | +| a jump that moves both (G, a Look) | the final cell | one ease, no trip with the old page | +| a terminal's output | its cell | lands with the output (which does not glide) | +| Motion off | the cell | there at once | + +While a glide moves the text the caret is drawn as its quad (from its +springs), not as a cell of the moving rows. Invariants, checked over every +frame of the scripted scroll and held-key runs (`GlideRun.checkCaret`): +while its cell stays and it is on it, its drawn row is identical frame to +frame; it only closes on its cell; it lands within half a second of its +last change. The blink keys off the last key or click, never a frame. + +So a held j, a spun wheel and a held Ctrl-d are the same case (a stream), +a single j or notch the same ease as before. Every input, a repeat too, +is still drawn at once: in a stream the picture is on the stream's +straight line wherever a frame samples it (tried: holding repeats to the +next tick cost a held key 7 ms of latency for no evenness one could see). + +### A PDF's strip, the same system (anim 11) + +The integrator is `animation.Follow` now (the Glide's state and rules, +moved out; the text's Glide holds one, in rows). A PDF pane's strip holds +another, in pixels: the core's position is `document_scroll_y` as every +input leaves it, and the strip is drawn `follow.offset` from it +(`pdf_view.stripAt`, each frame at the core's clock). Whatever moved the +core's position since the last frame kicks it, so every way a PDF moves is +one input to the same rules, the text's table above unchanged: + +| input | the strip | +|---|---| +| a wheel notch (a line's pixels), a spin | eases; a spin is a stream, at its rate | +| PageDown/Up, Ctrl-d/u/f/b, held | a stream, at its rate (to the 15 bodies a second cap) | +| ge, gg, a Look at `file.pdf:12`, Back, a section in the outline | a jump: past a body, one body's slide, as a text's far jump | +| a click on the rail, a tick | eases | +| a touchpad's fraction (`pdf_scroll.glide` false) | follows, drawn where the core is the same frame | +| a resize, a fit or zoom change (a relayout) | there at once | +| a search's reveal (it moves the strip as it draws) | there at once | +| Motion off | there at once | + +Rendering stays on the loop (MuPDF; its first-frame and context work is +the open item it was). So that no frame of a glide waits on it, the pages +a glide crosses to its mark are rendered in its input's frame, where the +instant move rendered its destination; a jump past a body (`far`) renders +only where it comes to rest, and its slide comes in over what is there +(the page above the mark is not drawn for a slide of a tenth of a second: +that page was the input frame's whole extra cost). Drawn at the strip's +position, rounded only by the draw (`pixel_offset_y` keeps the +fraction). Pictures are fit to their body and neither scroll nor pan: +nothing there to move. + +**Why the slow PDF scroll read as jumps**: a wheel notch moved the strip a +whole line's pixels (25 here) in the one frame after it, and nothing in +between: at a slow turn, one 25 px jump a notch. The touchpad path was +never quantized (fractions all the way to the placement). Now a notch is +a kick, and the strip eases over ~6 frames. + +### The tty, the same system (anim 12) + +The glide is shared now (`src/glide.zig`: the Glide, and its step that +finds the view that moved, snapshots the body and measures the move); the +GUI keeps only its wheel notches and its pixel draw. The tty steps the same +glide each loop (`pollFrame`), integrates it on its 16 ms ticks, and draws +it at whole rows (`glide.shifted`): the body's rows moved by the offset +rounded, the position never the step, the rows that left in the gap. So a +flick's fast part moves several rows a tick as the body dictates and its +tail is one-row steps further and further apart: a deceleration in the +timing, not in the step. The end is the instant version's. The caret: one +whose line rode the scroll (a wheel's) is carried with its rows; one that +kept its row (a page, a held j at the bottom) stays on its cell, still. + +Checks: "the tty draws a glide at whole rows" (a flick and a spin: once +slowing, steps a tick never grow, one-row steps never closer together, to +where the core is; then j held on the bottom row: the caret's row is the +same every tick). The timedemos typed into a pty (160x50, `ttydemo.py`, +RS): past each glide's fastest tick, steps never grew in the decelerating +part of any of 24 (scroll) and 186 (stress) glides, and the ticks between +one-row steps never shrank; the only growth is at a stream's constant +speed, where the rounding alternates (5, 4, 5, 4 rows a tick at the 4.5 a +tick cap). Bytes: a tick costs a body repaint (p50 7.4-7.9 KB, max +13.4-15.3 KB, the before's max), so a glide costs its row steps' worth: +the scroll demo wrote 383 -> 990 KB, the stress demo 3.8 -> 7.1 MB. Terminal +scroll regions would make a one-row step a few bytes (position 8). + +| tty | | latency ms p50/p90/p99/max | frame work ms | moving gap ms | bytes/frame p50/max | +|---|---|---|---|---|---| +| RS scroll | before | 2.3/3.0/11.5/11.5 | 2.2/2.7/8.5/11.0 | 15.9/16.7/18.8/18.8 | 120/15264 | +| | after | 2.5/3.1/11.5/11.5 | 2.3/2.8/4.4/11.9 | 15.7/16.7/18.4/18.7 | 0/15264 | +| RS stress | before | 1.4/2.9/5.9/15.6 | 1.1/2.7/4.9/14.1 | 15.6/16.6/18.4/18.4 | 140/13383 | +| | after | 1.5/2.8/5.5/14.0 | 1.9/2.9/3.8/12.5 | 14.3/16.5/18.1/19.0 | 7363/13383 | +| Debug scroll | before | 9.4/14.5/28.7/28.7 | 6.0/13.0/21.2/36.2 | 15.5/19.0/21.7/21.7 | 128/15264 | +| | after | 6.0/13.8/44.0/44.0 | 6.1/9.9/17.0/27.3 | 15.5/19.6/24.9/26.0 | 0/15264 | +| Debug stress | before | 2.4/13.0/92.9/148.4 | 2.2/10.8/68.2/148.1 | 15.6/18.7/25.4/25.4 | 6858/13383 | +| | after | 2.8/10.3/90.5/180.3 | 2.7/7.7/56.7/180.2 | 12.8/17.6/65.0/180.4 | 7270/13383 | + +Found on the way (sample 1): at a spin's end the measure found no shift +under which the rows agreed (the colours painted ahead arrive as it +stops) and gave the glide up, a 1.6-row snap on the last frame, in the +merge head as in anim 9-11. When the core moved a few lines and the rows +only disagree, the lines are the rows' guess now: it glides them, and the +spin's settle is whole (33, 4, 1.8 ... 0.03 px, never growing). Re-measured +on the head (stress, RS): the caret under a held j moves 0.0 rows frame to +frame over the 144 frames the view moves; every settle's steps never grow +after its fastest frame, the last at most 0.05 px. The snapshot harness's +virtual clock moves a frame a wake while the glide moves (it only moved to +the next due wait, so a tty glide stood still there): all 110 scripts pass, +no golden changed. + +(The Debug maxima are single frames of highlight paint on the 1.6 MB +file, as before; ponytail: a terminal's scrollback under the tty's wheel +lands, it reaches the core as a mouse event the GUI's notch count does not +see.) + +### Coming to rest (anim 9, 11) + +Found while measuring the PDF: a slow stream (notches 150 ms apart, just +inside the stream window) ran its constant rate into the mark, stopping +from 2.6 px a frame, and its last speed, never zeroed, then carried it +0.04 row past the mark and back. A stream is now never faster than the +spring's own pace from where it is (omega a unit of lag a second): it eases +onto each mark. The check: "a follow comes to rest without a snap" (a +spin, a page, and notches 144 ms apart: toward the mark only, onto it from +under a third of a pixel, past its fastest frame each step no longer than +the last); it fails on the old rule. + +Measured on every settle the runs have (frames after an input until the +view is still, speeds normalized by the frame's own time): before anim 9 +the old spring's tails were already monotonic; the anim 9+10 stream rule +had one rising tail in the scroll demo's notches (the stop from 2.6 px) +and a last step of 0.88 px; now, over the scroll, stress and PDF runs +(ReleaseSafe and Debug), no tail rises after its fastest frame and the +last step before rest is at most 0.06 px (text) and 0.05 px (PDF). + +### The cursor (anim 4) + +The thin caret glides as the block does. A step of a cell or less eases +instead of landing: its own spring 1.5x stiffer, the four corners +together, never overshooting, ~60 ms; at a key's repeat it trails half a +cell and never smears a caret into a block. A jump still smears and bows. + +### Colours painted ahead (anim 5, 7) + +`Stream.paintAhead` asks the disk engine's worker (its own generation +bit) to paint the stretch two views ahead the way the view last went, +with its own parser and cursor (`syntax.highlightApart`; markdown and +typst, whose injections share parsers, stay on the loop). +`refreshHighlights` takes it on arrival (`takeAhead`). A paint still +reaching into what is asked is let finish; one that does not is told to +stop and left to end on its own, never joined on the loop. Not asked +while the view stands still, nor for stretches over 512 KB. + +## Per scenario: glides, snaps or follows + +| scenario | | why | +|---|---|---| +| wheel notch, a spin | glides, each notch retargeting | discrete steps, piled onto one glide | +| touchpad | follows | direct manipulation: smoothing is lag | +| Ctrl-d/u/f/b, PageDown/Up, held | glide, retargeting | discrete jumps | +| G, 12G, 300G, 9000G, gg, ge | glide; past a body, one body's slide | a jump shorter than a body glides its rows; longer ones on the same law | +| n/N, `*`, a query's Ctrl-n/p moving its owner | glide (the owner's view) | the eye follows where the place went | +| Look `:40`, `:7000`, `file:line` in the same pane | glide | same | +| a Look opening a new pane | appears at once | nothing to glide from | +| jumplist Ctrl-o/Ctrl-i, SPC j o/i | glide | jumps | +| rail B1/B2/B3, a tick | glide | pardes's rail is acme's: a click scrolls by the row clicked; there is no thumb to drag, so nothing to follow (a thumb drag, if added, must be skipped in `stepGlide` as the touchpad is) | +| wheel over the gutter | glides | the wheel's | +| typing, arrows, w/e/l on long lines | the caret eases | small steps | +| Enter at the bottom of the view | a one-row glide each | the text rolls up | +| a 200-line paste | one body's slide | a long jump | +| terminal output | snaps | a stream would always lag | +| terminal under the wheel | glides | the wheel's; keys in its normal mode snap (position 4) | +| PDF | glides (its strip, in pixels, anim 11); a touchpad follows | the same rules as text | +| no-wrap sideways scroll | snaps | horizontal glides were not asked; position 6 | + +## Ponytail pass (on the stack, amended in place) + +Deleted: the cursor-quad columns of the probe (unused by any analysis: +about 5 lines in anim 1 and 3 in 1b), the `PARDES_PACE_SLEEP` toggle and +the sleeping branch it kept (about 12 in anim 7; the A/B above is its +record); nothing else in the stack had a cheaper rung. +Shortcuts marked `ponytail:` with their ceilings: the ring's size, the +tick grid's phase (ours, not the display's), one glide at a time, one +paint at a time, the spin's cost, a thread a picture, the 16 KB long-line +paint. Measured behaviour unchanged by the pass (the toggle's default was +what was measured). + +## Numbers + +Every row is a pair run back to back (`batch3.sh`), the final binaries, +ms p50/p90/p99/max; *latency* is input-to-present of the frames that answer +an input; *frame work* is update + render + present of every drawn frame; +*present gap* only over frames something was moving into; *late* counts +moving gaps over 25 ms. The soft present (Wayland) in both. Small phases +(under ten inputs) move a couple of ms round to round in both directions; +the long phases are the ones to read. + +### Headline: every phase of a demo pooled, before -> after + +| build | demo | latency | frame work | present gap (moving) | +|---|---|---|---|---| +| rs | scroll | 4.2/8.2/11.4/17.4 → 2.4/7.8/14.1/14.1 | 3.6/8.4/11.2/17.0 → 3.0/6.6/11.5/14.0 | 4.5/9.4/11.9/12.6 → 16.6/16.8/16.9/17.8 | +| rs | stress | 6.4/12.4/20.7/29.5 → 2.1/6.5/12.2/14.5 | 3.6/10.4/19.3/29.5 → 2.1/6.3/10.0/14.4 | 3.3/8.7/9.6/12.4 → 16.5/16.8/17.1/22.2 | +| rs | jumps | 6.5/10.1/15.9/21.5 → 3.8/11.2/12.8/20.5 | 4.0/8.8/13.5/21.1 → 1.9/7.1/11.6/20.0 | 8.4/17.1/21.2/23.8 → 16.6/16.8/18.0/22.7 | +| rs | kinds | 6.3/10.9/21.0/220.1 → 3.3/8.1/18.4/74.4 | 4.1/8.7/13.7/218.1 → 2.4/7.1/11.7/67.5 | 4.2/9.1/11.4/18.6 → 16.6/16.8/17.6/39.0 | +| rs | panes | 6.8/9.8/20.8/84.3 → 5.4/9.4/17.9/39.2 | 5.2/8.7/13.8/84.0 → 3.6/8.1/14.6/39.1 | 4.3/9.1/14.8/25.7 → 16.6/16.8/18.0/43.2 | +| rs | longlines | 8.7/17.6/189.4/218.7 → 7.7/17.9/26.5/37.7 | 4.7/9.1/13.7/210.2 → 3.6/9.3/19.9/36.7 | 4.3/9.2/11.3/22.0 → 16.5/16.8/17.3/22.1 | +| dbg | scroll | 8.2/15.6/33.3/40.2 → 4.4/15.6/23.7/29.7 | 3.7/8.9/15.5/32.9 → 3.1/7.5/17.6/23.2 | 4.4/8.9/11.8/15.0 → 16.6/16.8/17.3/18.0 | +| dbg | stress | 4.1/25.0/51.6/65.8 → 4.0/8.6/39.0/111.1 | 3.9/17.4/43.0/63.1 → 3.6/8.3/22.6/111.1 | 4.0/9.3/16.7/33.7 → 16.4/16.8/23.1/111.2 | +| dbg | jumps | 12.7/23.2/41.8/247.9 → 11.5/21.2/35.9/280.9 | 6.9/15.0/33.3/247.4 → 3.5/11.5/22.9/280.4 | 8.1/16.9/30.0/38.9 → 16.6/16.9/29.6/73.9 | +| dbg | kinds | 8.1/18.7/53.0/1979.3 → 4.6/15.2/56.8/438.8 | 4.4/12.3/28.9/1963.1 → 3.6/9.0/24.4/188.1 | 4.3/8.8/12.3/72.5 → 16.5/16.9/24.5/115.3 | +| dbg | panes | 7.9/16.2/65.6/304.3 → 6.2/16.1/64.1/266.2 | 5.3/13.1/18.7/301.1 → 4.1/12.9/23.7/262.6 | 4.6/9.2/27.9/108.3 → 16.6/16.8/37.1/146.3 | +| dbg | longlines | 16.6/33.1/35.8/2801.3 → 16.0/33.0/130.0/319.3 | 10.1/15.7/25.3/1963.0 → 9.2/16.5/80.0/180.3 | 8.6/16.8/27.4/34.5 → 16.6/16.8/18.2/167.2 | + +CPU (user s) per run, before -> after: base-rs-scroll 1.968, after-rs-scroll 7.072, base-rs-stress 4.059, after-rs-stress 14.329, base-rs-jumps 17.935, after-rs-jumps 48.597, base-rs-kinds 34.805, after-rs-kinds 94.319, base-rs-panes 11.838, after-rs-panes 24.085, base-rs-longlines 37.191, after-rs-longlines 70.976, base-dbg-scroll 2.524, after-dbg-scroll 7.842, base-dbg-stress 6.108, after-dbg-stress 18.640, base-dbg-jumps 31.800, after-dbg-jumps 60.583, base-dbg-kinds 56.343, after-dbg-kinds 109.000, base-dbg-panes 19.374, after-dbg-panes 29.634, base-dbg-longlines 77.796, after-dbg-longlines 90.633. +The spin is most of the difference (a core while something moves). + +Read in Debug: the before's long-line spikes were 2 s (a key in a 500 KB +line repainting it); after, a key there is 80-180 ms in Debug (16 KB of +tree-sitter through the DebugAllocator: position 2) and 18-22 ms in +ReleaseSafe; the pooled Debug p99 rises because those keys are many and +the 2 s ones were few, the max falls 2801 -> 319. + +### Per scenario + +#### GUI ReleaseSafe: `scroll` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| notches | before | 3.8/6.9/6.9/6.9 | 3.4/8.4/10.8/11.5 | 4.5/9.5/11.9/12.6 | 7 | 0 | +| | after | 1.9/8.4/8.4/8.4 | 1.8/3.2/8.3/8.3 | 16.7/16.9/17.8/17.8 | 7 | 0 | +| spin | before | 2.9/8.0/9.2/9.2 | 3.2/8.2/9.2/10.0 | 4.0/9.0/10.2/11.1 | 35 | 0 | +| | after | 2.4/7.1/11.8/11.8 | 2.3/6.4/11.7/11.7 | 8.8/16.7/17.0/17.0 | 34 | 0 | +| pages | before | 6.8/7.2/17.4/17.4 | 6.7/7.1/17.0/17.0 | - | 3788 | 0 | +| | after | 7.6/14.1/14.1/14.1 | 4.1/7.6/13.6/14.0 | 16.6/16.8/16.9/17.0 | 3598 | 0 | +| retarget | before | 8.4/11.2/11.2/11.2 | 8.4/11.1/11.1/11.1 | - | 150 | 0 | +| | after | 5.0/11.4/11.4/11.4 | 5.0/5.2/11.3/11.3 | 16.6/16.8/16.9/16.9 | 92 | 0 | +| cursor | before | 6.9/8.8/11.4/11.4 | 6.1/8.8/11.3/11.5 | 5.5/9.8/12.4/12.5 | 0 | 0 | +| | after | 2.4/8.2/10.6/10.6 | 4.0/6.7/10.4/11.5 | 16.6/16.7/16.9/17.7 | 0 | 0 | + +#### GUI ReleaseSafe: `stress` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| spin | before | 2.8/8.0/9.9/11.3 | 2.8/7.9/9.7/11.3 | 3.3/8.7/9.6/12.4 | 189 | 0 | +| | after | 2.1/6.0/7.6/10.6 | 2.2/6.5/7.5/10.6 | 8.2/13.2/16.8/16.9 | 175 | 0 | +| held-ctrl-d | before | 7.6/15.1/20.0/20.0 | 7.5/15.0/20.0/20.0 | - | 539 | 0 | +| | after | 2.2/6.5/14.5/14.5 | 2.1/6.1/9.3/14.4 | 16.6/16.9/17.3/18.2 | 508 | 0 | +| held-j | before | 6.8/11.1/15.3/15.3 | 6.7/11.0/15.3/15.3 | - | 35 | 0 | +| | after | 2.0/6.3/11.5/11.5 | 2.2/6.0/7.6/11.4 | 16.6/16.9/17.1/17.8 | 33 | 0 | +| held-pagedown | before | 11.2/19.4/29.5/29.5 | 11.1/19.3/29.5/29.5 | - | 758 | 0 | +| | after | 2.1/5.7/7.8/7.8 | 2.2/6.3/7.7/10.3 | 16.6/16.8/17.3/22.2 | 703 | 0 | +| far | before | 8.1/17.2/17.6/17.6 | 8.1/15.8/16.2/16.2 | - | 64670 | 0 | +| | after | 12.2/12.4/12.5/12.5 | 1.8/8.6/12.3/12.4 | 16.6/16.8/17.0/17.0 | 60219 | 0 | + +#### GUI ReleaseSafe: `jumps` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| counted-G-big | before | 6.9/12.0/16.5/16.5 | 6.5/9.6/16.1/16.1 | 4.7/9.4/10.7/10.7 | 9605 | 0 | +| | after | 8.6/12.5/12.8/12.8 | 5.2/8.5/12.1/12.3 | 16.6/16.8/22.5/22.5 | 8998 | 0 | +| pages-up-big | before | 8.2/14.2/21.2/21.2 | 8.1/14.1/21.1/21.1 | - | 1784 | 0 | +| | after | 8.4/8.8/15.4/15.4 | 4.1/6.0/12.7/15.3 | 16.6/16.8/18.0/18.1 | 1706 | 0 | +| search-n-big | before | 7.3/9.1/10.1/10.1 | 4.3/8.9/10.7/12.4 | 5.0/10.0/21.6/23.8 | 1255 | 0 | +| | after | 11.4/11.8/11.8/11.8 | 1.8/7.0/11.7/11.7 | 16.6/16.8/16.9/18.0 | 1255 | 0 | +| rail-big | before | 6.2/15.6/15.6/15.6 | 4.5/8.9/15.5/15.5 | 5.3/9.9/12.5/14.9 | 3028 | 0 | +| | after | 8.5/12.6/17.4/17.4 | 1.9/6.2/12.5/17.2 | 16.6/16.8/17.0/18.0 | 3030 | 0 | +| query-ctrl-n-big | before | 7.8/15.9/16.1/16.1 | 4.2/10.3/15.8/16.0 | 4.7/10.2/16.1/16.1 | 624 | 0 | +| | after | 6.3/8.8/9.2/9.2 | 1.8/6.0/9.1/11.7 | 16.6/16.8/17.9/18.2 | 724 | 0 | +| star-big | before | 6.9/10.1/10.1/10.1 | 3.5/8.6/11.2/11.2 | 4.5/10.6/16.0/16.0 | 853 | 0 | +| | after | 11.5/11.7/11.7/11.7 | 1.9/11.4/11.6/11.6 | 16.6/16.8/16.9/16.9 | 853 | 0 | +| jumplist-big | before | 12.5/15.6/19.1/19.1 | 6.8/12.6/19.0/19.0 | 16.9/18.9/22.7/22.7 | 4506 | 0 | +| | after | 11.6/11.8/11.9/11.9 | 1.8/7.1/11.7/11.8 | 16.6/16.9/18.7/21.9 | 7227 | 0 | +| insert-big | before | 3.3/7.4/12.6/21.5 | 2.4/7.0/12.3/21.0 | 15.9/16.8/22.0/22.4 | 42 | 0 | +| | after | 2.5/6.2/8.6/20.5 | 1.9/6.0/7.5/20.0 | 16.6/16.8/16.9/17.9 | 58 | 0 | +| counted-G-small | before | 9.1/12.4/12.4/12.4 | 9.0/12.3/12.3/12.3 | - | 384 | 0 | +| | after | 8.2/11.4/11.4/11.4 | 2.5/8.6/11.3/12.0 | 16.6/16.8/18.2/18.2 | 363 | 0 | +| pages-up-small | before | 7.6/15.6/15.7/15.7 | 7.5/15.4/15.6/15.6 | - | 78 | 0 | +| | after | 11.6/11.8/12.6/12.6 | 1.8/6.8/11.6/12.5 | 16.6/16.8/17.0/17.5 | 74 | 0 | +| search-n-small | before | 8.9/10.1/12.0/12.0 | 3.3/8.8/10.3/11.7 | 4.0/9.3/12.2/14.1 | 44 | 0 | +| | after | 7.2/10.7/11.4/11.4 | 5.6/7.1/11.3/11.3 | 16.6/16.8/18.1/18.1 | 45 | 0 | +| rail-small | before | 8.8/9.8/12.3/12.3 | 8.8/9.7/12.3/12.3 | - | 71 | 0 | +| | after | 7.3/7.8/8.7/8.7 | 7.1/7.5/8.5/8.5 | 16.6/16.8/16.9/16.9 | 72 | 0 | +| query-ctrl-n-small | before | 8.7/9.0/12.5/12.5 | 4.6/8.7/10.3/12.3 | 5.1/10.0/16.2/16.2 | 91 | 0 | +| | after | 7.1/7.6/10.8/10.8 | 1.8/7.0/10.5/10.5 | 16.6/16.8/17.5/17.5 | 94 | 0 | +| star-small | before | 9.3/10.4/10.4/10.4 | 6.8/9.5/11.0/11.0 | 6.9/9.7/12.4/12.4 | 166 | 0 | +| | after | 7.8/8.4/8.4/8.4 | 1.8/7.7/9.2/9.2 | 16.6/16.9/22.7/22.7 | 155 | 0 | +| look-small | before | 7.5/7.5/7.5/7.5 | 7.4/7.4/7.4/7.4 | - | 0 | 0 | +| | after | 8.3/9.6/9.6/9.6 | 5.9/9.4/12.2/12.2 | 16.6/16.8/18.0/18.0 | 80 | 0 | +| jumplist-small | before | 9.4/10.2/12.2/12.2 | 8.7/10.1/12.1/12.1 | 16.6/17.2/22.0/22.0 | 88 | 0 | +| | after | 8.2/9.5/11.2/11.2 | 6.6/8.1/12.3/12.3 | 16.6/17.2/22.4/22.4 | 87 | 0 | +| insert-small | before | 4.6/8.7/12.1/12.3 | 4.1/8.2/12.2/13.1 | 18.1/20.4/23.2/23.5 | 27 | 0 | +| | after | 2.0/6.2/8.0/12.9 | 1.8/5.7/7.6/12.8 | 16.6/16.8/17.4/17.9 | 38 | 0 | +| look-new-pane | before | 7.8/7.8/7.8/7.8 | 4.5/7.0/9.7/9.7 | 16.6/17.4/18.8/18.8 | 0 | 0 | +| | after | 14.8/14.8/14.8/14.8 | 14.0/14.0/14.0/14.0 | - | 0 | 0 | + +#### GUI ReleaseSafe: `kinds` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| generated-parser.c | before | 4.4/10.4/15.9/25.6 | 3.3/8.3/13.4/23.7 | 4.0/8.9/10.7/12.3 | 3794 | 0 | +| | after | 2.1/6.7/11.6/22.9 | 2.1/6.9/12.2/21.4 | 16.6/16.8/17.2/18.0 | 3788 | 0 | +| commands.rs | before | 6.8/11.8/22.4/62.2 | 4.1/9.0/18.2/60.6 | 4.3/9.0/10.8/11.8 | 1696 | 0 | +| | after | 2.0/7.0/11.7/16.2 | 1.9/6.5/11.5/14.7 | 16.5/16.8/18.1/22.6 | 1694 | 0 | +| tables.py | before | 6.9/12.7/16.3/25.2 | 3.7/8.7/13.8/23.4 | 4.2/9.1/11.4/12.3 | 2447 | 0 | +| | after | 2.0/6.4/9.5/11.4 | 1.9/5.7/11.3/12.6 | 16.6/16.8/17.9/22.6 | 2447 | 0 | +| jquery.js | before | 6.8/10.2/14.5/199.5 | 4.2/9.1/13.2/197.7 | 4.1/9.1/10.9/11.5 | 2154 | 0 | +| | after | 1.9/7.0/11.8/31.1 | 1.9/6.7/11.3/29.3 | 16.5/16.8/17.4/22.7 | 2147 | 0 | +| minified.js | before | 7.0/16.8/21.4/21.9 | 5.7/9.0/11.5/12.5 | 7.5/10.0/11.8/11.8 | 0 | 0 | +| | after | 7.0/16.5/22.5/22.6 | 4.8/8.3/12.0/12.5 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| grammar.json | before | 6.2/9.9/13.1/205.0 | 3.2/8.1/12.1/204.2 | 4.0/8.6/9.7/10.5 | 2286 | 0 | +| | after | 1.8/7.0/11.5/22.4 | 1.8/6.9/11.1/20.4 | 16.6/16.8/16.9/18.0 | 2282 | 0 | +| oneline.json | before | 6.7/8.9/13.1/25.3 | 6.2/8.9/12.5/24.0 | 5.0/10.0/11.5/11.5 | 4 | 0 | +| | after | 6.8/10.1/35.0/47.4 | 6.4/9.1/32.0/45.8 | 16.6/16.8/16.8/16.8 | 4 | 0 | +| CHANGELOG.md | before | 4.1/16.5/26.4/28.2 | 3.3/8.7/21.8/28.1 | 4.0/9.0/11.6/13.6 | 715 | 0 | +| | after | 2.9/7.6/13.7/25.4 | 2.4/7.1/11.4/25.2 | 16.6/16.8/22.7/25.5 | 712 | 2 | +| cascade.html | before | 5.2/9.4/16.3/87.4 | 3.3/8.3/12.1/79.9 | 3.9/8.9/10.4/11.1 | 645 | 0 | +| | after | 2.2/6.7/10.8/74.4 | 1.9/6.5/11.1/67.5 | 16.6/16.8/17.0/17.6 | 645 | 0 | +| simdutf.cpp | before | 5.1/12.5/23.0/24.5 | 4.0/9.1/22.5/24.4 | 4.4/8.9/10.8/12.8 | 9874 | 0 | +| | after | 2.0/6.9/11.0/11.0 | 1.9/6.2/10.8/11.0 | 16.6/16.8/17.2/17.6 | 9872 | 0 | +| parser.ts | before | 5.4/9.5/13.0/33.0 | 4.5/8.9/12.3/32.0 | 4.5/9.6/11.4/12.0 | 1779 | 0 | +| | after | 2.0/7.0/10.6/25.8 | 2.0/6.8/11.9/24.8 | 16.5/16.8/17.5/18.3 | 1778 | 0 | +| fcnal-test.sh | before | 4.1/10.4/14.0/57.5 | 3.3/8.6/12.2/55.3 | 4.0/8.9/10.6/11.6 | 1037 | 0 | +| | after | 1.9/7.0/10.8/58.8 | 1.9/6.6/10.7/56.6 | 16.6/16.8/17.5/18.2 | 1036 | 0 | +| data.go | before | 6.9/9.2/14.3/28.0 | 3.9/8.6/12.3/27.8 | 4.3/9.1/11.2/12.1 | 3898 | 0 | +| | after | 2.1/6.8/10.6/38.6 | 2.0/6.2/11.7/38.1 | 16.6/16.8/17.1/18.2 | 3892 | 0 | +| guide.typ | before | 6.8/13.2/17.7/17.9 | 4.3/9.0/15.6/17.7 | 4.4/9.2/11.3/13.3 | 119 | 0 | +| | after | 2.6/7.9/13.3/19.3 | 2.0/7.1/12.5/15.6 | 16.5/16.8/18.3/23.7 | 119 | 0 | +| unicode.txt | before | 6.9/9.8/15.6/53.9 | 4.1/8.7/11.7/21.0 | 4.4/9.3/11.6/13.1 | 4642 | 0 | +| | after | 2.1/6.9/17.3/55.2 | 1.9/6.3/11.2/22.0 | 16.6/16.8/17.0/18.4 | 4635 | 0 | +| big.log | before | 3.8/11.0/15.8/29.8 | 3.3/8.8/12.8/13.9 | 4.1/8.9/10.7/12.4 | 69343 | 0 | +| | after | 2.4/8.7/23.4/24.8 | 2.4/7.2/12.3/13.9 | 16.5/16.7/17.0/17.8 | 69269 | 0 | +| words.txt | before | 6.4/8.6/12.4/15.7 | 3.6/8.5/11.4/12.3 | 4.1/9.3/11.2/12.5 | 92633 | 0 | +| | after | 1.9/6.6/13.8/14.3 | 2.2/7.0/11.9/12.0 | 16.6/16.8/17.3/22.2 | 92628 | 0 | +| hugelines.txt | before | 6.7/10.0/16.5/177.6 | 6.0/9.3/12.3/177.1 | 7.0/15.7/18.6/18.6 | 12 | 0 | +| | after | 6.8/10.6/15.2/29.9 | 6.3/10.2/12.1/28.1 | 16.6/17.0/39.0/39.0 | 12 | 1 | +| minified.js! | before | 7.2/16.1/21.3/220.1 | 5.3/9.0/12.4/218.1 | 6.4/12.2/17.0/17.0 | 0 | 0 | +| | after | 7.2/17.3/22.3/27.3 | 5.0/8.7/12.4/25.4 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| oneline.json! | before | 6.7/10.5/13.0/17.4 | 5.8/9.4/12.3/12.8 | 4.9/9.5/11.0/11.1 | 0 | 0 | +| | after | 6.4/10.2/20.0/38.1 | 5.3/8.9/12.7/37.6 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| hugelines.txt! | before | 6.4/9.6/16.0/18.2 | 5.4/8.7/11.7/13.7 | 5.0/9.7/12.0/12.3 | 2 | 0 | +| | after | 5.6/9.4/13.6/16.5 | 3.6/8.1/11.5/13.4 | 16.6/16.8/17.0/17.2 | 2 | 0 | + +#### GUI ReleaseSafe: `panes` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| command-cat | before | 7.1/9.1/14.5/31.5 | 5.9/8.2/12.9/25.9 | 4.5/9.0/14.8/14.8 | 4668 | 0 | +| | after | 6.7/11.1/13.7/24.6 | 6.2/10.2/12.3/12.7 | 16.6/16.9/22.8/22.8 | 4616 | 0 | +| command-yes | before | 6.7/9.6/13.0/22.6 | 6.0/8.9/12.6/20.6 | 5.7/9.8/11.9/11.9 | 4855 | 0 | +| | after | 6.1/9.1/12.7/23.5 | 4.6/8.5/12.5/21.4 | 16.6/16.8/17.4/17.4 | 4924 | 0 | +| pager | before | 7.0/9.2/12.7/12.9 | 6.1/8.7/12.3/12.6 | 4.4/9.0/13.0/13.0 | 0 | 0 | +| | after | 6.9/9.7/14.3/14.6 | 5.5/9.2/12.4/14.6 | 16.6/16.8/17.3/17.3 | 0 | 0 | +| directory | before | 6.4/9.3/12.2/12.3 | 4.4/8.6/12.0/12.2 | 4.4/9.1/11.4/12.2 | 2 | 0 | +| | after | 5.6/8.7/12.4/12.5 | 3.5/7.6/11.9/12.4 | 16.6/16.8/17.7/18.0 | 2 | 0 | +| pdf | before | 6.9/16.1/44.7/44.9 | 6.4/13.3/31.5/44.8 | 3.9/9.1/9.5/9.5 | 0 | 0 | +| | after | 7.0/16.6/38.5/39.2 | 6.4/14.6/34.5/39.1 | 16.6/16.8/17.8/17.8 | 0 | 0 | +| image | before | 6.9/10.1/24.1/84.3 | 5.9/9.1/12.4/84.0 | 4.6/9.1/10.7/10.7 | 0 | 0 | +| | after | 6.9/9.0/12.7/14.1 | 6.4/8.9/12.4/28.5 | 16.6/16.8/43.2/43.2 | 0 | 1 | +| help | before | 6.8/8.8/12.1/12.6 | 3.5/8.2/11.5/12.5 | 4.2/8.8/11.5/12.4 | 69 | 0 | +| | after | 2.6/7.1/8.0/14.4 | 1.9/6.8/8.0/14.0 | 16.6/16.8/17.1/18.0 | 69 | 0 | +| changelog | before | 6.3/9.6/12.9/13.0 | 4.0/8.6/12.0/12.9 | 4.2/9.2/11.7/12.7 | 220 | 0 | +| | after | 1.8/6.8/13.7/14.3 | 1.8/6.4/11.2/14.3 | 16.6/16.8/17.3/18.3 | 220 | 0 | +| query-typing | before | 7.5/10.6/13.8/13.8 | 1.7/11.7/13.8/14.1 | 2.8/15.4/23.2/25.7 | 0 | 1 | +| | after | 7.3/9.3/12.4/12.4 | 1.9/7.9/12.3/12.6 | 16.6/17.0/22.9/22.9 | 17 | 0 | + +#### GUI ReleaseSafe: `longlines` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| w-held-minified.js-wrap | before | 3.0/7.9/9.4/9.4 | 3.2/8.1/9.4/9.9 | 4.1/9.1/10.5/11.0 | 0 | 0 | +| | after | 1.8/5.9/7.7/7.7 | 1.7/5.7/7.3/7.6 | 16.6/16.7/16.9/17.3 | 0 | 0 | +| e-held-minified.js-wrap | before | 3.1/8.3/9.3/9.3 | 3.1/8.0/9.2/11.3 | 4.1/9.0/10.0/12.4 | 0 | 0 | +| | after | 1.7/5.9/7.2/7.2 | 1.7/5.7/7.2/7.2 | 16.6/16.8/17.7/18.2 | 0 | 0 | +| l-held-minified.js-wrap | before | 6.6/10.1/11.7/11.7 | 3.3/8.5/11.3/11.6 | 4.2/9.2/10.3/12.0 | 0 | 0 | +| | after | 1.9/5.9/7.3/7.3 | 1.9/5.9/7.3/7.3 | 16.6/16.8/17.1/17.4 | 0 | 0 | +| dollar-zero-minified.js-wrap | before | 7.5/8.7/8.7/8.7 | 7.3/8.6/8.6/8.6 | - | 0 | 0 | +| | after | 7.5/7.7/7.7/7.7 | 3.2/7.7/11.4/11.4 | 16.6/16.9/16.9/16.9 | 0 | 0 | +| f-t-minified.js-wrap | before | 7.3/7.6/7.8/7.8 | 7.2/7.5/7.7/7.7 | - | 0 | 0 | +| | after | 7.2/7.5/9.0/9.0 | 4.6/11.2/11.6/12.0 | 14.5/16.7/17.9/18.0 | 0 | 0 | +| gl-gh-minified.js-wrap | before | 7.4/7.6/7.7/7.7 | 7.3/7.5/7.6/7.6 | - | 0 | 0 | +| | after | 7.4/8.1/8.4/8.4 | 5.0/11.0/11.4/11.4 | 13.9/16.7/18.7/18.7 | 0 | 0 | +| insert-end-minified.js-wrap | before | 7.2/11.0/12.7/12.7 | 7.0/10.7/12.6/12.6 | 5.7/9.8/10.6/10.6 | 0 | 0 | +| | after | 1.8/6.2/8.0/8.0 | 1.8/6.1/10.6/10.9 | 16.6/16.8/17.3/18.1 | 0 | 0 | +| insert-middle-minified.js-wrap | before | 171.7/177.5/185.4/185.4 | 7.3/174.3/184.4/184.4 | 5.2/9.8/10.3/10.3 | 0 | 0 | +| | after | 16.8/26.5/28.1/28.1 | 12.7/24.9/27.3/27.3 | 15.9/16.7/16.9/16.9 | 0 | 0 | +| sweep-L-W-minified.js-wrap | before | 7.1/11.5/212.2/212.2 | 6.9/10.2/14.1/210.2 | 5.5/9.4/12.9/12.9 | 0 | 0 | +| | after | 7.3/12.1/13.5/13.5 | 6.8/11.2/12.6/12.9 | 16.6/16.9/20.9/20.9 | 0 | 0 | +| w-held-oneline.json-wrap | before | 3.9/10.1/11.3/11.3 | 4.1/8.6/10.9/11.5 | 4.8/9.6/11.4/12.0 | 0 | 0 | +| | after | 1.8/6.0/13.3/13.3 | 1.8/5.7/7.3/13.2 | 16.6/16.8/17.0/17.6 | 0 | 0 | +| e-held-oneline.json-wrap | before | 3.2/7.8/9.0/9.0 | 3.2/8.2/9.4/11.1 | 4.1/9.2/10.6/12.2 | 0 | 0 | +| | after | 1.8/5.6/7.7/7.7 | 1.8/5.6/7.6/7.6 | 16.6/16.8/16.9/17.0 | 0 | 0 | +| l-held-oneline.json-wrap | before | 4.4/10.4/13.3/13.3 | 3.2/8.4/11.9/13.2 | 4.0/9.1/11.0/13.4 | 0 | 0 | +| | after | 1.9/6.1/7.5/7.5 | 1.8/6.0/7.4/7.5 | 16.6/16.8/17.2/17.4 | 0 | 0 | +| dollar-zero-oneline.json-wrap | before | 7.6/8.0/8.0/8.0 | 7.4/7.7/7.7/7.7 | - | 0 | 0 | +| | after | 9.0/9.4/9.4/9.4 | 2.3/8.9/10.8/10.8 | 16.5/16.9/17.0/17.0 | 0 | 0 | +| f-t-oneline.json-wrap | before | 7.4/7.6/9.2/9.2 | 7.3/7.5/9.1/9.1 | - | 0 | 0 | +| | after | 7.3/8.8/9.3/9.3 | 4.6/10.4/11.7/12.3 | 14.7/16.7/17.0/17.4 | 0 | 0 | +| gl-gh-oneline.json-wrap | before | 7.5/7.6/7.6/7.6 | 7.3/7.4/7.5/7.5 | - | 0 | 0 | +| | after | 7.5/7.7/8.6/8.6 | 4.0/10.6/11.5/11.5 | 14.5/16.6/16.9/16.9 | 0 | 0 | +| insert-end-oneline.json-wrap | before | 7.4/10.8/12.8/12.8 | 7.2/10.6/12.9/12.9 | 7.8/10.3/14.0/14.0 | 0 | 0 | +| | after | 1.8/6.0/7.4/7.4 | 1.8/5.9/11.1/11.3 | 16.6/16.8/17.0/17.0 | 0 | 0 | +| insert-middle-oneline.json-wrap | before | 193.1/199.8/207.9/207.9 | 5.2/195.5/206.4/206.4 | 4.0/9.3/13.6/13.6 | 0 | 0 | +| | after | 21.3/29.0/37.7/37.7 | 18.1/25.4/36.7/36.7 | 16.6/16.9/17.9/17.9 | 0 | 0 | +| sweep-L-W-oneline.json-wrap | before | 7.2/11.3/31.8/31.8 | 6.8/9.3/12.2/12.5 | 4.4/9.3/10.1/10.5 | 6 | 0 | +| | after | 7.7/12.1/21.5/21.5 | 6.9/11.0/12.6/21.5 | 16.6/16.8/16.9/16.9 | 6 | 0 | +| w-held-hugelines.txt-wrap | before | 3.2/8.5/11.8/11.8 | 3.2/8.2/10.2/12.2 | 4.2/9.1/10.5/13.3 | 0 | 0 | +| | after | 1.8/5.8/10.7/10.7 | 1.8/5.5/7.4/10.6 | 16.6/16.8/17.3/17.9 | 0 | 0 | +| e-held-hugelines.txt-wrap | before | 5.1/7.3/11.7/11.7 | 4.1/8.5/11.3/11.9 | 4.5/9.5/12.1/12.9 | 0 | 0 | +| | after | 3.7/7.3/12.6/12.6 | 2.4/7.1/12.5/12.5 | 16.6/16.8/18.1/18.1 | 0 | 0 | +| l-held-hugelines.txt-wrap | before | 7.3/11.6/13.0/13.0 | 7.1/11.4/12.9/12.9 | - | 0 | 0 | +| | after | 7.2/11.4/13.4/13.4 | 7.1/11.2/13.2/13.2 | - | 0 | 0 | +| dollar-zero-hugelines.txt-wrap | before | 7.3/7.4/7.4/7.4 | 7.1/7.2/7.2/7.2 | - | 0 | 0 | +| | after | 7.3/7.3/7.3/7.3 | 6.0/10.4/11.0/11.0 | 15.6/16.6/16.7/16.7 | 0 | 0 | +| f-t-hugelines.txt-wrap | before | 7.2/7.5/7.6/7.6 | 7.1/7.3/7.5/7.5 | - | 0 | 0 | +| | after | 7.2/7.4/9.2/9.2 | 4.4/10.9/11.7/11.9 | 14.6/16.7/16.9/16.9 | 0 | 0 | +| gl-gh-hugelines.txt-wrap | before | 7.4/7.6/7.6/7.6 | 7.2/7.4/7.5/7.5 | - | 0 | 0 | +| | after | 7.4/7.9/10.8/10.8 | 4.6/10.6/11.2/11.2 | 14.8/16.8/17.7/17.7 | 0 | 0 | +| insert-end-hugelines.txt-wrap | before | 7.4/10.6/12.1/12.1 | 7.2/10.5/12.0/12.0 | - | 0 | 0 | +| | after | 2.1/7.4/8.0/8.0 | 2.2/7.3/10.7/10.8 | 16.6/16.8/16.9/17.0 | 0 | 0 | +| insert-middle-hugelines.txt-wrap | before | 7.9/10.7/13.0/13.0 | 7.2/10.2/12.1/12.1 | - | 0 | 0 | +| | after | 7.9/12.9/13.5/13.5 | 7.2/12.2/12.4/12.4 | - | 0 | 0 | +| sweep-L-W-hugelines.txt-wrap | before | 7.8/12.3/14.9/14.9 | 7.0/11.5/13.8/14.8 | 5.8/10.8/19.9/22.0 | 0 | 0 | +| | after | 7.7/11.9/13.1/13.1 | 7.1/12.1/13.6/14.6 | 16.7/16.9/20.1/20.1 | 0 | 0 | +| w-held-minified.js-nowrap | before | 7.1/16.3/28.5/28.5 | 3.5/8.2/10.2/13.7 | 4.5/9.2/10.9/11.3 | 0 | 0 | +| | after | 2.7/15.9/22.6/22.6 | 2.1/3.9/12.7/12.7 | 16.6/16.8/17.9/17.9 | 0 | 0 | +| e-held-minified.js-nowrap | before | 15.5/19.6/24.7/24.7 | 4.4/8.4/10.1/10.1 | - | 0 | 0 | +| | after | 15.2/18.8/23.0/23.0 | 4.1/8.2/9.4/9.4 | - | 0 | 0 | +| l-held-minified.js-nowrap | before | 15.7/20.7/27.7/27.7 | 4.3/8.4/11.3/11.3 | - | 0 | 0 | +| | after | 15.3/19.6/24.2/24.2 | 3.9/8.9/9.9/9.9 | - | 0 | 0 | +| dollar-zero-minified.js-nowrap | before | 9.2/10.1/10.1/10.1 | 9.0/9.9/9.9/9.9 | - | 0 | 0 | +| | after | 9.3/10.4/10.4/10.4 | 3.7/9.1/10.2/10.2 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| f-t-minified.js-nowrap | before | 8.9/9.1/9.9/9.9 | 8.7/9.0/9.8/9.8 | - | 0 | 0 | +| | after | 8.7/9.0/9.7/9.7 | 3.3/8.8/10.7/11.0 | 16.0/16.7/17.9/18.3 | 0 | 0 | +| gl-gh-minified.js-nowrap | before | 9.1/9.2/10.4/10.4 | 8.9/9.1/10.3/10.3 | - | 0 | 0 | +| | after | 8.9/9.2/9.3/9.3 | 2.8/8.9/9.7/9.7 | 16.1/16.8/18.2/18.2 | 0 | 0 | +| insert-end-minified.js-nowrap | before | 8.8/12.1/13.8/13.8 | 8.5/11.0/13.7/13.7 | 4.5/8.9/11.9/11.9 | 0 | 0 | +| | after | 2.1/7.3/9.0/9.0 | 2.2/7.1/9.1/9.4 | 16.6/16.8/16.9/17.1 | 0 | 0 | +| insert-middle-minified.js-nowrap | before | 185.1/192.3/201.4/201.4 | 3.4/172.0/182.2/182.2 | 4.0/8.8/9.4/9.4 | 0 | 0 | +| | after | 16.1/26.7/29.1/29.1 | 8.5/15.2/18.4/18.4 | 16.6/16.9/17.2/17.2 | 0 | 0 | +| sweep-L-W-minified.js-nowrap | before | 11.2/19.6/26.4/26.4 | 7.0/10.2/13.9/14.2 | 5.6/9.6/11.6/12.2 | 0 | 0 | +| | after | 11.9/20.0/26.9/26.9 | 3.9/10.9/13.9/26.2 | 16.6/16.8/17.1/17.1 | 1 | 0 | +| w-held-oneline.json-nowrap | before | 8.8/16.9/21.6/21.6 | 3.3/7.9/8.9/13.2 | 4.2/8.9/9.9/10.6 | 0 | 0 | +| | after | 8.1/20.2/23.4/23.4 | 2.3/5.8/9.3/9.3 | 16.5/16.7/19.7/19.7 | 0 | 0 | +| e-held-oneline.json-nowrap | before | 15.8/20.7/24.4/24.4 | 4.5/8.0/9.4/9.4 | - | 0 | 0 | +| | after | 15.7/20.7/24.5/24.5 | 3.8/6.3/8.5/8.5 | - | 0 | 0 | +| l-held-oneline.json-nowrap | before | 15.7/19.1/29.3/29.3 | 3.6/7.4/9.1/9.1 | - | 0 | 0 | +| | after | 15.8/20.5/25.1/25.1 | 3.8/7.4/10.1/10.1 | - | 0 | 0 | +| dollar-zero-oneline.json-nowrap | before | 9.9/9.9/9.9/9.9 | 9.6/9.7/9.7/9.7 | - | 0 | 0 | +| | after | 9.8/10.2/10.2/10.2 | 4.5/9.6/12.6/12.6 | 16.4/16.8/17.8/17.8 | 0 | 0 | +| f-t-oneline.json-nowrap | before | 9.7/9.8/10.0/10.0 | 9.6/9.7/9.9/9.9 | - | 0 | 0 | +| | after | 9.4/9.6/10.1/10.1 | 3.2/9.4/13.1/13.2 | 16.1/16.8/18.2/18.6 | 0 | 0 | +| gl-gh-oneline.json-nowrap | before | 9.6/9.9/10.0/10.0 | 9.5/9.7/9.8/9.8 | - | 0 | 0 | +| | after | 9.6/10.3/10.4/10.4 | 2.7/9.4/10.2/10.2 | 16.5/16.8/22.1/22.1 | 0 | 0 | +| insert-end-oneline.json-nowrap | before | 9.5/13.3/15.2/15.2 | 9.2/11.7/15.1/15.1 | 5.2/9.5/12.7/12.7 | 0 | 0 | +| | after | 2.3/7.3/10.9/10.9 | 2.3/7.0/9.9/10.8 | 16.6/16.8/17.0/17.8 | 0 | 0 | +| insert-middle-oneline.json-nowrap | before | 209.8/216.8/218.7/218.7 | 3.0/195.5/196.9/196.9 | 4.0/9.0/9.4/9.4 | 0 | 0 | +| | after | 23.1/29.0/35.4/35.4 | 10.3/21.1/28.7/28.7 | 16.6/16.8/17.9/17.9 | 0 | 0 | +| sweep-L-W-oneline.json-nowrap | before | 10.3/14.9/24.9/24.9 | 6.6/11.0/14.2/14.8 | 4.4/9.3/14.3/14.4 | 0 | 0 | +| | after | 10.0/15.6/21.7/21.7 | 4.9/11.6/15.0/15.5 | 16.6/16.8/18.2/18.2 | 0 | 0 | +| w-held-hugelines.txt-nowrap | before | 12.8/18.8/22.8/22.8 | 4.5/8.1/11.5/12.7 | 4.2/8.9/9.9/11.2 | 0 | 0 | +| | after | 9.8/18.4/20.3/20.3 | 2.4/7.9/11.2/11.2 | 16.5/16.8/18.2/18.2 | 0 | 0 | +| e-held-hugelines.txt-nowrap | before | 15.7/20.0/20.9/20.9 | 6.0/9.7/11.9/11.9 | - | 0 | 0 | +| | after | 14.9/19.2/20.8/20.8 | 5.6/9.7/10.7/10.7 | - | 0 | 0 | +| l-held-hugelines.txt-nowrap | before | 15.4/20.1/25.1/25.1 | 5.3/10.0/13.7/13.7 | - | 0 | 0 | +| | after | 15.6/19.4/21.8/21.8 | 5.2/9.2/11.3/11.3 | - | 0 | 0 | +| dollar-zero-hugelines.txt-nowrap | before | 9.7/9.8/9.8/9.8 | 9.5/9.7/9.7/9.7 | - | 0 | 0 | +| | after | 9.4/9.4/9.4/9.4 | 3.1/8.5/9.3/9.3 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| f-t-hugelines.txt-nowrap | before | 9.4/10.4/11.4/11.4 | 9.3/10.3/11.2/11.2 | - | 0 | 0 | +| | after | 9.2/9.4/9.9/9.9 | 2.8/9.0/9.4/9.8 | 16.3/16.7/16.8/17.7 | 0 | 0 | +| gl-gh-hugelines.txt-nowrap | before | 9.4/9.9/10.1/10.1 | 9.3/9.7/9.9/9.9 | - | 0 | 0 | +| | after | 9.3/9.9/10.9/10.9 | 3.0/9.2/10.7/10.7 | 16.3/16.7/17.0/17.0 | 0 | 0 | +| insert-end-hugelines.txt-nowrap | before | 9.6/13.7/15.1/15.1 | 9.0/12.6/14.9/14.9 | 6.0/9.3/10.3/10.3 | 0 | 0 | +| | after | 2.3/7.1/9.4/9.4 | 2.3/6.8/9.2/9.2 | 16.6/16.7/16.8/16.8 | 0 | 0 | +| insert-middle-hugelines.txt-nowrap | before | 18.4/22.5/26.1/26.1 | 4.7/8.8/10.6/10.6 | 5.0/9.2/10.0/10.0 | 0 | 0 | +| | after | 17.0/19.9/23.0/23.0 | 5.9/8.6/12.4/12.4 | 16.6/16.9/17.1/17.1 | 0 | 0 | +| sweep-L-W-hugelines.txt-nowrap | before | 11.9/18.7/24.0/24.0 | 6.2/9.1/14.4/14.5 | 4.2/9.0/9.8/9.8 | 0 | 0 | +| | after | 10.2/18.1/22.5/22.5 | 7.0/11.1/14.1/14.5 | 16.6/16.9/17.1/17.1 | 0 | 0 | + +#### GUI Debug: `scroll` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| notches | before | 8.2/14.4/14.4/14.4 | 3.4/7.8/9.3/14.3 | 4.4/8.6/10.1/10.4 | 7 | 0 | +| | after | 3.5/19.8/19.8/19.8 | 3.0/3.5/19.8/19.8 | 16.7/17.0/17.6/17.6 | 7 | 0 | +| spin | before | 3.6/8.8/15.8/15.8 | 3.5/8.6/14.0/15.7 | 4.2/8.9/12.7/14.1 | 35 | 0 | +| | after | 4.3/8.4/20.4/20.4 | 4.3/7.7/20.4/20.4 | 10.1/16.7/17.1/17.1 | 34 | 0 | +| pages | before | 15.4/25.7/40.2/40.2 | 15.0/25.2/32.8/32.8 | - | 3787 | 0 | +| | after | 15.0/22.0/29.7/29.7 | 3.0/7.1/17.6/21.3 | 16.6/16.8/17.3/18.0 | 3607 | 0 | +| retarget | before | 16.7/33.3/33.3/33.3 | 16.3/32.9/32.9/32.9 | - | 150 | 0 | +| | after | 9.6/23.7/23.7/23.7 | 3.0/6.2/23.2/23.2 | 16.6/16.8/16.8/16.8 | 92 | 0 | +| cursor | before | 12.2/15.6/16.2/16.2 | 6.5/11.9/15.4/15.5 | 5.6/9.7/12.5/15.0 | 0 | 0 | +| | after | 3.8/14.9/18.4/18.4 | 3.6/6.3/17.1/17.7 | 16.6/16.8/17.2/18.0 | 0 | 0 | + +#### GUI Debug: `stress` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| spin | before | 3.6/8.9/25.4/33.7 | 3.6/8.8/17.2/33.7 | 4.0/9.3/16.7/33.7 | 188 | 3 | +| | after | 3.7/7.9/13.1/23.3 | 3.6/7.3/11.9/23.2 | 8.2/13.1/16.7/16.8 | 175 | 0 | +| held-ctrl-d | before | 8.3/33.2/45.9/45.9 | 8.1/32.8/45.5/45.5 | - | 539 | 0 | +| | after | 4.3/8.5/24.4/24.4 | 3.7/7.5/12.6/24.0 | 16.6/17.2/18.4/23.1 | 508 | 0 | +| held-j | before | 11.9/15.6/30.7/30.7 | 11.5/15.2/30.3/30.3 | - | 35 | 0 | +| | after | 3.6/8.3/25.0/25.0 | 3.3/7.3/12.2/24.7 | 16.6/16.8/17.9/22.4 | 33 | 0 | +| held-pagedown | before | 9.7/38.3/63.4/63.4 | 9.7/38.0/63.1/63.1 | - | 758 | 0 | +| | after | 4.8/13.1/111.1/111.1 | 4.6/8.7/82.3/111.1 | 16.6/17.5/83.3/111.2 | 703 | 8 | +| far | before | 15.2/56.1/65.8/65.8 | 14.8/32.4/35.9/35.9 | - | 64673 | 0 | +| | after | 15.3/30.0/39.0/39.0 | 3.2/8.7/22.6/23.3 | 16.6/16.8/17.1/17.1 | 60139 | 0 | + +#### GUI Debug: `jumps` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| counted-G-big | before | 13.0/41.0/46.9/46.9 | 6.9/20.5/40.0/40.0 | 4.6/9.2/12.0/12.0 | 9607 | 0 | +| | after | 12.4/26.7/32.5/32.5 | 3.0/11.1/19.3/24.9 | 16.6/16.8/17.0/17.0 | 9013 | 0 | +| pages-up-big | before | 18.7/43.6/56.7/56.7 | 18.3/43.2/56.3/56.3 | - | 1784 | 0 | +| | after | 20.1/28.3/46.7/46.7 | 5.0/8.7/27.9/46.2 | 16.6/16.8/22.3/22.4 | 1709 | 0 | +| search-n-big | before | 12.7/14.8/33.3/33.3 | 4.3/9.3/14.2/27.8 | 4.6/9.3/18.2/19.2 | 1254 | 0 | +| | after | 11.9/14.5/24.7/24.7 | 4.3/9.5/14.0/14.0 | 16.6/16.8/22.7/24.4 | 1255 | 0 | +| rail-big | before | 8.2/37.9/50.1/50.1 | 3.5/7.9/37.0/49.3 | 4.4/8.7/10.4/10.9 | 3032 | 0 | +| | after | 9.0/35.6/38.7/38.7 | 3.2/7.1/34.9/38.0 | 16.6/16.8/22.3/22.6 | 3030 | 0 | +| query-ctrl-n-big | before | 22.2/39.4/40.3/40.3 | 7.2/21.8/38.3/38.9 | 7.1/15.5/31.1/31.1 | 628 | 2 | +| | after | 7.0/22.4/28.3/28.3 | 3.6/8.8/18.9/19.4 | 16.6/16.8/26.4/27.4 | 727 | 3 | +| star-big | before | 12.8/36.9/36.9/36.9 | 7.2/12.3/19.6/19.6 | 8.2/10.1/17.2/17.2 | 853 | 0 | +| | after | 11.6/44.7/44.7/44.7 | 3.1/11.0/21.8/21.8 | 16.6/16.9/17.0/17.0 | 853 | 0 | +| jumplist-big | before | 33.4/41.0/41.4/41.4 | 8.1/32.9/41.0/41.0 | 15.9/20.3/21.2/21.2 | 4759 | 0 | +| | after | 17.9/23.4/23.5/23.5 | 3.0/12.4/23.0/23.0 | 16.6/16.8/18.4/20.1 | 7394 | 0 | +| insert-big | before | 9.3/14.9/29.9/247.9 | 6.5/13.5/23.3/247.4 | 11.8/23.0/31.6/35.5 | 42 | 12 | +| | after | 10.3/17.0/30.5/280.9 | 3.4/11.4/22.9/280.4 | 16.6/19.1/26.5/33.4 | 58 | 13 | +| counted-G-small | before | 13.4/26.4/26.7/26.7 | 12.6/25.0/26.1/26.1 | - | 384 | 0 | +| | after | 11.4/22.9/29.3/29.3 | 3.9/9.7/27.8/27.8 | 16.6/16.8/18.3/18.3 | 363 | 0 | +| pages-up-small | before | 21.8/34.4/36.4/36.4 | 21.1/33.6/35.6/35.6 | - | 78 | 0 | +| | after | 23.0/35.3/35.9/35.9 | 3.1/7.7/34.6/35.2 | 16.6/16.8/17.4/17.9 | 75 | 0 | +| search-n-small | before | 15.2/20.5/25.3/25.3 | 3.2/14.4/20.2/24.5 | 4.0/9.0/31.3/31.3 | 44 | 1 | +| | after | 16.2/17.5/21.1/21.1 | 3.0/16.0/21.2/21.2 | 16.6/16.9/31.3/31.3 | 45 | 1 | +| rail-small | before | 14.3/16.1/18.2/18.2 | 14.1/15.1/18.2/18.2 | - | 71 | 0 | +| | after | 14.5/17.5/21.8/21.8 | 6.8/16.0/20.3/20.3 | 16.6/16.8/17.0/17.0 | 72 | 0 | +| query-ctrl-n-small | before | 15.0/17.0/19.5/19.5 | 4.2/14.3/17.4/17.9 | 4.8/9.1/19.0/19.0 | 91 | 0 | +| | after | 12.8/17.4/17.4/17.4 | 3.4/13.6/16.7/16.7 | 16.6/16.8/25.3/25.3 | 94 | 1 | +| star-small | before | 15.9/28.3/28.3/28.3 | 6.5/14.1/27.5/27.5 | 4.7/8.8/13.5/13.5 | 166 | 0 | +| | after | 17.3/19.5/19.5/19.5 | 3.0/12.1/18.5/18.5 | 16.6/16.8/17.1/17.1 | 155 | 0 | +| look-small | before | 26.1/26.1/26.1/26.1 | 24.7/24.7/24.7/24.7 | - | 0 | 0 | +| | after | 15.4/20.6/20.6/20.6 | 7.7/14.3/20.4/20.4 | 16.7/16.8/16.9/16.9 | 81 | 0 | +| jumplist-small | before | 16.3/28.9/29.2/29.2 | 9.8/25.2/28.3/28.3 | 16.7/18.8/21.2/21.2 | 81 | 0 | +| | after | 17.1/21.5/27.1/27.1 | 4.7/12.1/20.8/26.3 | 16.6/17.0/18.8/19.7 | 87 | 0 | +| insert-small | before | 13.1/19.4/32.8/41.8 | 7.7/17.0/29.2/41.5 | 13.0/24.1/34.0/38.9 | 27 | 13 | +| | after | 9.6/20.6/28.4/61.6 | 4.9/14.0/23.4/60.6 | 16.4/18.5/32.4/73.9 | 37 | 35 | +| look-new-pane | before | 14.9/14.9/14.9/14.9 | 8.2/8.7/8.8/8.8 | 16.8/17.3/17.9/17.9 | 0 | 0 | +| | after | 24.9/24.9/24.9/24.9 | 18.4/18.4/18.4/18.4 | - | 0 | 0 | + +#### GUI Debug: `kinds` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| generated-parser.c | before | 7.3/22.4/29.5/103.2 | 3.6/11.7/24.9/86.5 | 4.2/8.7/10.1/13.0 | 3787 | 0 | +| | after | 3.9/7.9/26.6/39.3 | 3.2/6.8/17.6/31.5 | 16.5/16.9/18.4/18.8 | 3789 | 0 | +| commands.rs | before | 7.4/21.6/32.5/33.8 | 3.8/11.8/30.0/33.4 | 4.4/8.9/10.8/15.1 | 1694 | 0 | +| | after | 4.3/8.7/23.0/35.4 | 3.8/8.0/12.8/18.8 | 16.5/17.2/18.5/23.3 | 1690 | 0 | +| tables.py | before | 6.8/25.3/32.2/77.5 | 3.6/12.0/29.5/69.8 | 4.2/8.7/14.5/16.6 | 2444 | 0 | +| | after | 3.9/8.9/25.5/26.7 | 3.2/7.8/17.2/24.8 | 16.5/16.9/17.9/23.1 | 2442 | 0 | +| jquery.js | before | 7.6/18.8/28.0/1979.3 | 4.3/12.1/23.3/1958.4 | 4.2/8.7/10.6/12.6 | 2217 | 0 | +| | after | 3.8/8.4/27.9/119.7 | 3.2/7.1/14.6/98.3 | 16.5/16.9/17.6/17.8 | 2149 | 0 | +| minified.js | before | 8.4/18.7/29.4/34.0 | 4.1/12.4/17.2/17.5 | 4.4/8.4/9.1/9.1 | 0 | 0 | +| | after | 7.7/19.3/28.9/32.5 | 4.3/13.1/16.6/18.4 | 16.6/16.8/17.2/17.2 | 0 | 0 | +| grammar.json | before | 7.8/17.3/23.9/1870.4 | 3.9/12.2/21.5/1850.4 | 4.4/8.7/10.1/17.2 | 2351 | 0 | +| | after | 3.5/8.4/26.5/84.4 | 3.2/7.3/14.2/61.4 | 16.5/16.8/17.4/18.4 | 2279 | 0 | +| oneline.json | before | 7.2/16.2/45.4/92.1 | 6.0/13.0/27.4/76.5 | 4.5/9.1/45.4/45.4 | 4 | 1 | +| | after | 7.8/14.1/180.6/189.0 | 6.5/13.1/78.9/188.1 | 16.6/16.8/16.9/16.9 | 4 | 0 | +| CHANGELOG.md | before | 10.7/58.2/72.2/72.5 | 4.7/12.8/66.5/72.5 | 4.4/8.9/58.8/72.5 | 715 | 7 | +| | after | 7.2/60.5/74.0/75.3 | 4.7/17.0/70.5/75.1 | 16.6/18.1/73.5/75.4 | 713 | 31 | +| cascade.html | before | 8.5/17.8/25.9/119.6 | 4.0/13.8/19.6/83.9 | 4.2/8.8/10.6/11.3 | 643 | 0 | +| | after | 3.9/8.6/19.7/72.3 | 3.3/7.0/18.1/36.4 | 16.5/16.8/18.8/22.8 | 642 | 0 | +| simdutf.cpp | before | 6.4/29.0/58.8/65.4 | 3.3/11.2/52.7/64.7 | 4.2/8.6/9.6/12.8 | 9852 | 0 | +| | after | 4.0/12.9/113.9/115.2 | 3.8/7.9/55.9/114.8 | 16.5/16.8/56.5/115.3 | 9862 | 9 | +| parser.ts | before | 8.6/17.7/25.6/27.0 | 3.7/13.4/19.8/26.0 | 4.2/8.8/10.4/13.8 | 1776 | 0 | +| | after | 3.7/8.8/21.8/22.2 | 3.1/7.0/16.2/21.1 | 16.5/16.9/18.9/22.6 | 1775 | 0 | +| fcnal-test.sh | before | 8.1/17.7/27.8/30.8 | 4.0/11.9/21.7/27.1 | 4.2/8.8/11.1/14.0 | 1034 | 0 | +| | after | 4.0/8.7/18.6/82.3 | 3.5/7.3/14.4/62.3 | 16.6/16.8/18.1/23.2 | 1034 | 0 | +| data.go | before | 8.6/18.7/24.3/42.6 | 3.8/13.6/21.5/40.0 | 4.2/8.8/12.8/19.1 | 3897 | 0 | +| | after | 4.2/9.7/19.1/42.0 | 3.4/7.4/17.0/39.4 | 16.5/16.9/22.8/24.1 | 3898 | 0 | +| guide.typ | before | 7.8/31.1/43.8/52.2 | 4.0/11.4/37.3/50.9 | 4.4/9.1/33.2/37.4 | 117 | 6 | +| | after | 4.9/24.8/46.6/54.8 | 3.9/11.3/37.1/53.5 | 16.5/16.8/40.5/46.7 | 117 | 21 | +| unicode.txt | before | 8.7/19.2/92.4/435.3 | 4.2/10.3/17.4/146.9 | 4.4/8.9/10.2/11.5 | 4510 | 0 | +| | after | 4.0/9.2/92.9/438.8 | 3.2/6.8/16.3/146.3 | 16.5/16.8/17.7/18.2 | 4505 | 0 | +| big.log | before | 8.3/17.6/61.1/188.2 | 4.2/12.7/21.5/25.7 | 4.3/8.7/9.9/14.9 | 69103 | 0 | +| | after | 6.6/14.8/73.4/201.2 | 4.8/11.2/15.8/24.4 | 16.5/17.0/24.5/28.9 | 69008 | 3 | +| words.txt | before | 7.9/15.7/22.7/27.6 | 3.3/11.4/16.4/17.7 | 4.1/8.7/10.2/16.5 | 92552 | 0 | +| | after | 3.3/8.5/25.1/47.8 | 3.0/7.1/15.1/17.6 | 16.5/16.8/17.7/19.0 | 92274 | 0 | +| hugelines.txt | before | 8.9/15.3/34.3/1973.2 | 7.0/13.3/16.5/1963.1 | 5.3/16.7/25.9/25.9 | 12 | 1 | +| | after | 7.9/15.8/33.0/96.5 | 6.2/13.8/17.4/90.4 | 16.7/18.9/22.1/22.1 | 12 | 0 | +| minified.js! | before | 9.1/21.0/43.3/1875.3 | 5.8/15.0/24.5/1852.3 | 5.0/11.7/17.4/17.4 | 0 | 0 | +| | after | 8.4/21.5/46.2/87.9 | 5.0/14.6/21.4/64.6 | 16.6/16.8/17.0/17.0 | 0 | 0 | +| oneline.json! | before | 7.8/18.2/47.5/48.0 | 6.6/12.7/16.8/48.0 | 7.5/9.3/48.1/48.1 | 0 | 1 | +| | after | 7.6/17.1/72.2/193.8 | 7.0/12.9/21.4/182.3 | 16.6/16.8/22.5/22.5 | 0 | 0 | +| hugelines.txt! | before | 8.1/17.8/33.0/41.8 | 6.1/11.4/16.6/18.4 | 6.3/10.2/11.8/12.7 | 2 | 0 | +| | after | 6.6/18.7/32.3/46.7 | 5.6/11.3/14.9/22.2 | 16.6/16.9/23.9/26.1 | 2 | 1 | + +#### GUI Debug: `panes` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| command-cat | before | 8.9/19.7/34.8/35.0 | 4.6/9.1/15.7/27.5 | 7.0/37.5/58.1/58.1 | 4509 | 5 | +| | after | 7.8/19.3/36.5/45.4 | 4.1/9.2/17.9/30.8 | 16.6/37.9/53.8/53.8 | 4501 | 6 | +| command-yes | before | 8.0/17.0/27.5/34.5 | 6.6/14.5/17.5/24.1 | 4.4/34.9/44.9/44.9 | 4616 | 7 | +| | after | 7.6/15.7/34.5/35.0 | 6.4/13.6/17.8/22.8 | 16.6/34.5/58.8/58.8 | 4545 | 7 | +| pager | before | 7.5/14.6/18.6/20.2 | 6.5/13.7/17.1/18.0 | 4.3/8.7/46.2/46.2 | 0 | 1 | +| | after | 8.6/16.2/19.7/19.8 | 7.6/14.8/19.0/19.2 | 16.6/16.9/47.3/47.3 | 0 | 1 | +| directory | before | 7.6/15.3/18.7/19.2 | 5.0/12.6/17.7/18.6 | 4.7/9.2/14.5/16.6 | 2 | 0 | +| | after | 5.4/14.4/18.6/24.6 | 3.9/12.9/17.3/21.6 | 16.6/16.8/17.1/17.1 | 2 | 0 | +| pdf | before | 7.7/57.3/138.0/190.3 | 6.7/13.8/113.8/174.4 | 4.3/8.9/13.5/13.5 | 0 | 0 | +| | after | 8.0/59.7/155.2/161.8 | 8.1/41.0/134.9/161.5 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| image | before | 7.5/16.5/128.7/304.3 | 6.8/15.2/18.7/301.1 | 5.4/9.1/10.4/10.4 | 0 | 0 | +| | after | 7.9/14.2/17.2/18.3 | 6.8/13.9/17.0/133.0 | 16.7/17.0/146.3/146.3 | 0 | 1 | +| help | before | 7.8/14.4/18.8/19.8 | 5.2/12.4/17.3/18.2 | 4.7/8.8/12.2/16.3 | 69 | 0 | +| | after | 3.3/12.7/17.2/17.4 | 3.0/7.9/16.1/17.2 | 16.5/16.8/17.5/18.7 | 69 | 0 | +| changelog | before | 8.1/16.7/19.3/20.2 | 3.8/12.9/18.2/19.5 | 4.3/8.9/10.6/14.2 | 220 | 0 | +| | after | 3.9/8.7/16.2/25.1 | 3.7/7.7/14.6/23.7 | 16.6/16.8/17.4/22.5 | 220 | 0 | +| query-typing | before | 13.1/16.8/41.6/41.6 | 6.5/12.4/38.2/102.2 | 7.6/17.3/27.9/108.3 | 0 | 2 | +| | after | 13.4/50.3/266.2/266.2 | 3.1/13.0/262.6/262.6 | 16.6/17.0/62.1/62.1 | 17 | 2 | + +#### GUI Debug: `longlines` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| w-held-minified.js-wrap | before | 3.6/8.6/19.8/19.8 | 3.3/8.2/9.1/19.0 | 4.2/9.0/9.7/10.4 | 0 | 0 | +| | after | 3.5/7.4/12.3/12.3 | 3.2/7.2/10.8/11.6 | 16.6/16.9/17.4/17.4 | 0 | 0 | +| e-held-minified.js-wrap | before | 3.7/11.5/15.0/15.0 | 3.3/8.1/13.9/14.4 | 4.2/9.0/10.3/11.4 | 0 | 0 | +| | after | 3.3/7.3/8.9/8.9 | 3.1/6.9/8.5/8.8 | 16.6/16.8/17.0/17.1 | 0 | 0 | +| l-held-minified.js-wrap | before | 8.1/17.0/19.1/19.1 | 4.6/10.3/17.6/18.4 | 4.7/9.2/11.6/13.4 | 0 | 0 | +| | after | 3.2/7.4/8.6/8.6 | 3.1/7.2/8.5/8.5 | 16.6/16.7/17.5/17.7 | 0 | 0 | +| dollar-zero-minified.js-wrap | before | 7.3/7.4/7.4/7.4 | 6.5/6.6/6.6/6.6 | - | 0 | 0 | +| | after | 14.6/14.7/14.7/14.7 | 2.8/9.0/13.7/13.7 | 16.6/16.8/17.4/17.4 | 0 | 0 | +| f-t-minified.js-wrap | before | 14.3/16.7/16.9/16.9 | 13.6/16.1/16.2/16.2 | - | 0 | 0 | +| | after | 14.4/20.7/20.7/20.7 | 3.0/13.8/20.1/20.1 | 16.4/16.8/17.6/17.7 | 0 | 0 | +| gl-gh-minified.js-wrap | before | 14.0/16.4/16.5/16.5 | 13.3/15.6/15.9/15.9 | - | 0 | 0 | +| | after | 13.8/20.2/20.4/20.4 | 3.2/13.1/19.7/19.7 | 16.5/16.7/17.3/17.3 | 0 | 0 | +| insert-end-minified.js-wrap | before | 14.9/18.5/20.1/20.1 | 12.1/17.1/19.5/19.5 | 7.1/9.8/10.9/10.9 | 0 | 0 | +| | after | 3.3/8.6/14.6/14.6 | 3.1/8.3/13.6/13.8 | 16.5/16.8/17.3/18.2 | 0 | 0 | +| insert-middle-minified.js-wrap | before | 14.1/1994.4/1994.4/1994.4 | 6.9/13.5/1963.0/1963.0 | 6.7/11.1/11.5/11.5 | 0 | 0 | +| | after | 82.9/83.5/95.1/95.1 | 79.0/81.3/84.2/84.2 | 16.4/16.8/17.0/17.0 | 0 | 0 | +| sweep-L-W-minified.js-wrap | before | 13.0/19.3/1858.0/1858.0 | 3.6/12.4/18.7/1848.9 | 4.4/8.7/10.0/10.0 | 0 | 0 | +| | after | 13.4/17.0/71.2/71.2 | 12.4/15.5/60.7/84.4 | 16.6/16.8/84.5/84.5 | 0 | 1 | +| w-held-oneline.json-wrap | before | 3.8/8.3/9.3/9.3 | 3.3/7.8/8.6/9.1 | 4.1/8.8/9.3/9.8 | 0 | 0 | +| | after | 3.7/8.1/19.4/19.4 | 3.4/7.4/12.6/18.4 | 16.6/16.9/17.5/22.5 | 0 | 0 | +| e-held-oneline.json-wrap | before | 3.7/8.1/11.7/11.7 | 3.3/7.8/8.4/11.3 | 4.2/8.8/9.3/9.8 | 0 | 0 | +| | after | 3.6/7.2/9.1/9.1 | 3.4/7.0/8.5/8.9 | 16.6/16.9/17.1/17.9 | 0 | 0 | +| l-held-oneline.json-wrap | before | 8.1/18.0/21.3/21.3 | 3.7/8.6/18.9/20.5 | 4.3/8.9/10.8/13.0 | 0 | 0 | +| | after | 3.7/7.9/9.2/9.2 | 3.4/7.4/9.0/9.0 | 16.7/16.9/17.6/22.5 | 0 | 0 | +| dollar-zero-oneline.json-wrap | before | 7.6/12.9/12.9/12.9 | 6.8/12.0/12.0/12.0 | - | 0 | 0 | +| | after | 18.1/18.7/18.7/18.7 | 2.9/16.3/17.7/17.7 | 16.7/16.8/16.9/16.9 | 0 | 0 | +| f-t-oneline.json-wrap | before | 14.2/17.3/17.6/17.6 | 13.4/16.4/16.7/16.7 | - | 0 | 0 | +| | after | 18.8/20.1/20.3/20.3 | 5.1/18.0/19.4/19.5 | 15.5/16.8/16.9/17.0 | 0 | 0 | +| gl-gh-oneline.json-wrap | before | 13.8/16.8/17.0/17.0 | 12.9/15.9/16.1/16.1 | - | 0 | 0 | +| | after | 19.8/20.4/20.6/20.6 | 6.7/18.1/19.7/19.7 | 15.4/16.8/17.2/17.2 | 0 | 0 | +| insert-end-oneline.json-wrap | before | 15.4/18.1/21.5/21.5 | 13.4/17.2/20.7/20.7 | 8.6/14.1/20.7/20.7 | 0 | 0 | +| | after | 3.3/8.2/20.3/20.3 | 3.1/8.1/17.5/19.4 | 16.6/16.8/18.0/18.2 | 0 | 0 | +| insert-middle-oneline.json-wrap | before | 15.1/1887.6/1887.6/1887.6 | 7.1/18.2/1844.0/1844.0 | 7.8/14.6/17.4/17.4 | 0 | 0 | +| | after | 82.1/177.2/182.1/182.1 | 14.4/171.6/176.3/176.3 | 16.6/16.8/16.8/16.8 | 0 | 0 | +| sweep-L-W-oneline.json-wrap | before | 15.4/23.1/49.8/49.8 | 3.5/11.2/18.3/19.6 | 4.4/8.6/10.5/10.6 | 6 | 0 | +| | after | 13.9/18.3/167.2/167.2 | 10.2/15.2/19.4/167.0 | 16.6/16.8/167.2/167.2 | 5 | 1 | +| w-held-hugelines.txt-wrap | before | 3.4/8.6/21.4/21.4 | 3.3/8.2/9.1/20.3 | 4.3/9.0/10.2/13.5 | 0 | 0 | +| | after | 3.3/7.7/11.9/11.9 | 3.2/7.4/10.8/11.3 | 16.6/16.8/17.2/17.8 | 0 | 0 | +| e-held-hugelines.txt-wrap | before | 8.0/14.5/20.0/20.0 | 3.8/9.3/18.5/18.9 | 4.4/9.2/10.8/11.6 | 0 | 0 | +| | after | 6.0/17.2/21.2/21.2 | 4.2/14.8/19.9/19.9 | 16.6/16.8/17.0/17.0 | 0 | 0 | +| l-held-hugelines.txt-wrap | before | 14.4/18.8/20.4/20.4 | 13.4/17.8/19.4/19.4 | - | 0 | 0 | +| | after | 14.0/16.8/20.8/20.8 | 13.0/15.7/19.7/19.7 | - | 0 | 0 | +| dollar-zero-hugelines.txt-wrap | before | 15.7/16.6/16.6/16.6 | 14.5/15.5/15.5/15.5 | - | 0 | 0 | +| | after | 18.7/19.3/19.3/19.3 | 7.1/17.6/18.2/18.2 | 16.5/16.8/16.8/16.8 | 0 | 0 | +| f-t-hugelines.txt-wrap | before | 16.1/16.4/16.8/16.8 | 15.1/15.3/15.7/15.7 | - | 0 | 0 | +| | after | 20.1/20.3/22.6/22.6 | 4.8/19.1/20.5/21.6 | 14.7/16.8/16.9/17.3 | 0 | 0 | +| gl-gh-hugelines.txt-wrap | before | 13.9/16.9/16.9/16.9 | 12.9/15.7/15.8/15.8 | - | 0 | 0 | +| | after | 18.8/19.6/20.0/20.0 | 6.8/15.4/19.0/19.0 | 15.1/16.8/17.3/17.3 | 0 | 0 | +| insert-end-hugelines.txt-wrap | before | 15.4/19.2/21.1/21.1 | 14.4/18.2/20.1/20.1 | - | 0 | 0 | +| | after | 3.3/8.1/18.4/18.4 | 3.2/7.6/10.2/17.3 | 16.6/16.8/16.9/17.3 | 0 | 0 | +| insert-middle-hugelines.txt-wrap | before | 17.6/21.3/26.2/26.2 | 13.0/16.9/20.2/20.2 | - | 0 | 0 | +| | after | 16.7/21.7/24.6/24.6 | 12.2/16.5/19.2/19.2 | - | 0 | 0 | +| sweep-L-W-hugelines.txt-wrap | before | 14.3/17.8/32.3/32.3 | 8.5/16.1/20.0/26.1 | 7.4/16.7/18.3/18.3 | 0 | 0 | +| | after | 14.0/18.6/30.0/30.0 | 11.4/15.1/19.1/30.0 | 16.7/16.8/17.0/17.0 | 0 | 0 | +| w-held-minified.js-nowrap | before | 16.8/32.8/34.0/34.0 | 15.6/15.8/27.7/27.7 | 16.7/16.9/33.3/33.3 | 0 | 5 | +| | after | 14.3/29.1/30.6/30.6 | 9.5/13.5/20.8/20.8 | 16.6/17.1/32.3/32.3 | 0 | 4 | +| e-held-minified.js-nowrap | before | 28.0/31.1/33.5/33.5 | 11.6/14.4/17.1/17.1 | - | 0 | 0 | +| | after | 25.9/30.0/32.7/32.7 | 9.5/13.7/16.4/16.4 | - | 0 | 0 | +| l-held-minified.js-nowrap | before | 27.5/31.5/33.0/33.0 | 11.0/15.2/16.4/16.4 | - | 0 | 0 | +| | after | 25.3/29.3/30.6/30.6 | 8.9/13.0/14.3/14.3 | - | 0 | 0 | +| dollar-zero-minified.js-nowrap | before | 24.5/25.0/25.0/25.0 | 23.4/23.8/23.8/23.8 | - | 0 | 0 | +| | after | 23.3/24.4/24.4/24.4 | 8.5/13.3/23.2/23.2 | 16.6/17.0/18.0/18.0 | 0 | 0 | +| f-t-minified.js-nowrap | before | 29.4/35.6/36.6/36.6 | 28.4/34.6/36.2/36.2 | - | 0 | 0 | +| | after | 31.3/31.5/31.6/31.6 | 8.6/30.2/30.5/30.6 | 16.5/16.8/17.9/18.1 | 0 | 0 | +| gl-gh-minified.js-nowrap | before | 24.5/35.6/35.7/35.7 | 23.5/34.5/34.6/34.6 | - | 0 | 0 | +| | after | 21.9/31.0/31.8/31.8 | 9.2/20.8/30.8/30.8 | 16.6/16.7/17.4/17.4 | 0 | 0 | +| insert-end-minified.js-nowrap | before | 19.4/25.7/35.6/35.6 | 18.4/24.3/34.5/34.5 | 16.7/17.9/17.9/17.9 | 0 | 0 | +| | after | 8.8/14.5/23.9/23.9 | 8.6/12.7/22.5/22.8 | 16.6/16.8/22.4/22.6 | 0 | 0 | +| insert-middle-minified.js-nowrap | before | 16.6/1994.8/1994.8/1994.8 | 13.9/18.2/1955.8/1955.8 | 15.3/18.5/30.3/30.3 | 0 | 1 | +| | after | 166.7/251.2/253.8/253.8 | 8.6/153.7/166.3/166.3 | 16.5/16.8/18.0/18.0 | 0 | 0 | +| sweep-L-W-minified.js-nowrap | before | 24.7/2780.7/2780.7/2780.7 | 15.6/16.3/1963.0/1963.0 | 16.7/16.8/16.8/16.8 | 0 | 0 | +| | after | 16.4/26.3/84.3/84.3 | 11.0/14.2/18.3/77.0 | 16.6/16.9/17.1/17.1 | 1 | 0 | +| w-held-oneline.json-nowrap | before | 32.7/33.7/34.4/34.4 | 15.3/15.7/24.8/24.8 | 16.7/17.8/33.9/33.9 | 0 | 5 | +| | after | 32.8/33.5/34.7/34.7 | 15.1/15.4/22.0/22.0 | 16.7/18.0/33.4/33.4 | 0 | 5 | +| e-held-oneline.json-nowrap | before | 33.3/33.7/51.7/51.7 | 13.7/14.0/14.9/14.9 | - | 0 | 0 | +| | after | 33.3/33.5/52.7/52.7 | 13.7/13.9/14.0/14.0 | - | 0 | 0 | +| l-held-oneline.json-nowrap | before | 33.3/33.5/52.6/52.6 | 13.4/13.7/14.9/14.9 | - | 0 | 0 | +| | after | 33.3/33.5/51.0/51.0 | 13.7/13.9/14.9/14.9 | - | 0 | 0 | +| dollar-zero-oneline.json-nowrap | before | 26.1/33.4/33.4/33.4 | 17.3/25.3/25.3/25.3 | - | 0 | 0 | +| | after | 30.5/33.3/33.3/33.3 | 16.6/22.0/30.7/30.7 | 16.7/16.8/17.2/17.2 | 0 | 0 | +| f-t-oneline.json-nowrap | before | 27.2/35.5/39.1/39.1 | 26.2/34.5/38.1/38.1 | - | 0 | 0 | +| | after | 30.8/31.0/31.2/31.2 | 16.5/29.6/30.3/30.3 | 16.7/16.8/17.1/17.4 | 0 | 0 | +| gl-gh-oneline.json-nowrap | before | 25.8/27.6/35.3/35.3 | 24.8/27.0/34.2/34.2 | - | 0 | 0 | +| | after | 31.7/32.6/32.7/32.7 | 15.8/30.5/31.6/31.6 | 16.6/16.8/16.8/16.8 | 0 | 0 | +| insert-end-oneline.json-nowrap | before | 21.8/26.4/35.2/35.2 | 20.5/25.0/34.2/34.2 | 16.6/16.8/16.8/16.8 | 0 | 0 | +| | after | 16.6/18.2/32.8/32.8 | 16.4/16.6/31.3/31.7 | 16.7/16.9/18.2/19.0 | 0 | 0 | +| insert-middle-oneline.json-nowrap | before | 16.7/1891.8/1891.8/1891.8 | 15.6/16.7/1853.1/1853.1 | 16.7/16.9/34.5/34.5 | 0 | 1 | +| | after | 124.1/318.2/319.3/319.3 | 16.4/179.1/180.3/180.3 | 16.7/16.7/16.9/16.9 | 0 | 0 | +| sweep-L-W-oneline.json-nowrap | before | 16.8/2801.3/2801.3/2801.3 | 15.6/15.8/16.7/1844.0 | 16.7/16.8/17.0/17.0 | 0 | 0 | +| | after | 16.4/33.2/70.5/70.5 | 13.4/16.8/26.4/31.8 | 16.6/16.9/17.5/17.5 | 0 | 0 | +| w-held-hugelines.txt-nowrap | before | 22.3/27.4/27.8/27.8 | 15.3/16.0/16.8/16.8 | 16.8/25.6/27.8/27.9 | 0 | 11 | +| | after | 22.4/26.9/31.7/31.7 | 15.1/16.0/27.1/27.1 | 16.7/22.7/27.6/27.6 | 0 | 3 | +| e-held-hugelines.txt-nowrap | before | 22.5/27.5/28.8/28.8 | 11.4/16.3/17.0/17.0 | 22.3/27.4/28.8/28.8 | 0 | 17 | +| | after | 22.4/26.7/28.1/28.1 | 11.4/15.2/17.0/17.0 | - | 0 | 0 | +| l-held-hugelines.txt-nowrap | before | 22.0/27.4/28.1/28.1 | 10.8/15.8/16.7/17.0 | 21.8/24.2/28.1/28.1 | 0 | 16 | +| | after | 22.1/26.4/27.6/27.6 | 10.9/15.3/16.4/16.4 | - | 0 | 0 | +| dollar-zero-hugelines.txt-nowrap | before | 16.6/16.7/16.7/16.7 | 15.6/15.8/16.5/20.6 | 16.7/16.8/17.3/21.7 | 0 | 0 | +| | after | 15.6/30.4/30.4/30.4 | 13.9/16.1/29.2/29.2 | 16.6/16.8/16.9/16.9 | 0 | 0 | +| f-t-hugelines.txt-nowrap | before | 16.6/16.8/16.9/16.9 | 15.6/16.0/16.6/16.7 | 16.7/16.8/17.0/17.5 | 0 | 0 | +| | after | 30.7/30.9/31.4/31.4 | 14.8/29.6/29.9/30.4 | 16.6/16.8/22.3/22.6 | 0 | 0 | +| gl-gh-hugelines.txt-nowrap | before | 10.9/16.7/16.8/16.8 | 15.6/15.8/16.9/20.7 | 16.6/16.8/18.0/21.7 | 0 | 0 | +| | after | 16.8/31.4/31.6/31.6 | 15.0/16.7/30.6/30.6 | 16.6/16.8/22.7/22.7 | 0 | 0 | +| insert-end-hugelines.txt-nowrap | before | 16.5/16.8/17.1/17.1 | 15.6/16.4/16.8/16.9 | 16.6/16.8/17.1/17.9 | 0 | 0 | +| | after | 16.5/18.3/31.8/31.8 | 16.3/16.6/29.8/30.8 | 16.6/16.9/22.7/22.7 | 0 | 0 | +| insert-middle-hugelines.txt-nowrap | before | 26.2/29.0/29.4/29.4 | 11.6/15.7/16.2/16.4 | 16.6/26.9/29.2/29.4 | 0 | 40 | +| | after | 24.4/29.0/37.4/37.4 | 10.7/16.3/16.9/16.9 | 16.6/17.1/22.3/22.3 | 0 | 0 | +| sweep-L-W-hugelines.txt-nowrap | before | 16.2/25.8/30.4/30.4 | 12.6/15.7/16.5/18.3 | 16.2/25.6/30.0/30.5 | 0 | 30 | +| | after | 21.0/25.8/30.4/30.4 | 14.1/18.1/29.3/29.7 | 16.6/16.8/16.9/16.9 | 0 | 0 | + +#### tty ReleaseSafe: `scroll` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 2.6/3.0/8.8/8.8 | 0.4/1.4/2.8/8.7 | 0.5/1.9/3.1/16.5 | 1449 | 0 | 105/15264 | +| | after | 2.4/3.0/8.1/8.1 | 2.2/2.7/7.9/8.0 | 15.8/16.9/18.6/18.6 | 1455 | 0 | 120/15264 | + +#### tty ReleaseSafe: `stress` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 2.6/11.4/23.2/26.1 | 1.0/2.7/20.1/26.0 | 2.0/2.6/5.2/16.7 | 9811 | 0 | 174/13383 | +| | after | 1.3/2.8/5.9/14.6 | 1.1/2.7/4.9/13.1 | 15.5/16.6/17.6/17.6 | 9807 | 0 | 132/13383 | + +#### tty ReleaseSafe: `jumps` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 1.6/6.0/22.0/22.7 | 0.4/0.8/2.8/22.7 | 0.4/1.5/2.8/16.7 | 2190 | 0 | 108/15264 | +| | after | 1.6/3.6/15.8/17.4 | 1.1/2.6/7.3/17.3 | 15.8/16.8/18.4/19.1 | 2189 | 0 | 100/15264 | + +#### tty Debug: `scroll` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 9.8/14.8/60.9/60.9 | 1.9/5.4/14.7/45.2 | 2.0/2.0/13.3/24.9 | 1452 | 0 | 86/15264 | +| | after | 7.3/14.1/36.2/36.2 | 5.6/11.8/25.2/27.9 | 15.5/19.8/20.8/20.8 | 1454 | 0 | 128/15264 | + +#### tty Debug: `stress` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 3.5/29.0/73.5/103.4 | 2.6/13.2/58.9/103.0 | 3.0/3.2/18.7/24.0 | 9825 | 0 | 180/13383 | +| | after | 2.4/12.8/69.9/195.7 | 2.3/11.0/66.3/195.5 | 15.6/19.2/24.9/24.9 | 9825 | 0 | 6859/13383 | + +#### tty Debug: `jumps` + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | bytes/frame p50/max | +|---|---|---|---|---|---|---|---| +| all | before | 26.1/43.9/74.5/78.0 | 2.1/22.9/44.8/77.5 | 2.1/2.3/15.7/40.8 | 2189 | 1 | 108/15264 | +| | after | 24.5/37.8/63.1/70.3 | 4.9/27.5/42.9/68.7 | 15.7/18.5/24.2/39.9 | 2175 | 1 | 101/15264 | + +#### GUI: `pdf-scroll` (anim 11), before = anim 10 with the scenario, after = anim 11 + +ReleaseSafe, run 1 of 2 (`.scratch/runs9/v1-*`; run 2 within a few ms but far-jump max): + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| spin | before | 4.7/9.2/33.4/33.4 | 4.7/9.2/33.4/33.4 | - | 1073 | 0 | +| | after | 2.0/6.8/22.0/22.0 | 1.7/6.9/17.2/22.0 | 12.9/16.7/21.8/28.4 | 1009 | 1 | +| held-pagedown | before | 15.3/29.4/31.1/31.1 | 15.2/29.3/31.0/31.0 | - | 9092 | 0 | +| | after | 1.8/19.2/26.8/26.8 | 1.7/9.6/26.7/26.7 | 16.6/20.5/33.9/33.9 | 6359 | 5 | +| far-jump | before | 16.5/32.8/32.8/32.8 | 6.8/18.0/32.7/32.7 | 17.0/17.2/19.1/19.1 | 24126 | 0 | +| | after | 22.6/32.1/32.1/32.1 | 5.8/7.1/32.0/32.0 | 16.6/16.8/18.8/18.8 | 23744 | 0 | +| slow-notches | before | 7.1/7.1/7.1/7.1 | 8.8/9.8/9.8/9.8 | 16.8/17.4/17.4/17.4 | 83 | 0 | +| | after | 6.9/7.0/7.0/7.0 | 1.7/6.7/6.9/6.9 | 16.6/16.8/17.3/17.3 | 87 | 0 | +| slow-touch | before | 6.9/10.7/12.3/12.3 | 6.8/10.6/12.2/12.2 | - | 94 | 0 | +| | after | 6.8/11.0/12.4/12.5 | 6.7/10.9/12.4/12.4 | - | 94 | 0 | + +Debug (`w1-*`): + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| spin | before | 4.8/12.7/148.2/148.2 | 4.7/12.3/148.1/148.1 | - | 1074 | 0 | +| | after | 3.2/7.7/140.4/140.4 | 2.7/7.6/71.8/140.3 | 16.4/16.8/72.2/141.1 | 995 | 2 | +| held-pagedown | before | 78.5/115.5/115.5/115.5 | 78.3/115.3/115.3/115.3 | - | 8296 | 0 | +| | after | 10.1/121.7/127.6/127.6 | 6.5/98.4/127.5/127.5 | 16.6/98.6/141.2/141.2 | 6106 | 4 | +| far-jump | before | 45.4/84.2/84.2/84.2 | 6.2/45.1/83.9/83.9 | 16.6/17.7/18.7/18.7 | 24172 | 0 | +| | after | 51.4/86.9/86.9/86.9 | 6.1/8.5/86.7/86.7 | 16.6/17.5/20.8/20.8 | 23525 | 0 | +| slow-notches | before | 11.4/13.1/13.1/13.1 | 7.5/12.6/12.6/12.6 | 15.6/19.2/19.2/19.2 | 83 | 0 | +| | after | 18.3/19.0/19.0/19.0 | 2.7/11.9/18.5/18.5 | 16.6/16.9/19.2/19.2 | 88 | 0 | +| slow-touch | before | 7.3/11.8/14.1/17.8 | 7.0/11.5/13.8/17.3 | - | 94 | 0 | +| | after | 7.2/11.0/12.5/15.4 | 7.0/10.5/12.3/15.1 | - | 94 | 0 | + +The `panes` timedemo's pdf phase (`u1-*`, RS then Debug): + +| scenario | | latency ms p50/p90/p99/max | frame work ms | present gap ms (moving) | rows/s | late | +|---|---|---|---|---|---|---| +| pdf | before | 6.9/14.8/44.1/46.3 | 6.7/14.5/30.6/44.0 | 16.7/16.8/16.9/16.9 | 4678 | 0 | +| | after | 2.0/7.4/34.8/37.8 | 1.8/6.6/18.4/34.7 | 16.6/16.8/27.2/32.9 | 4678 | 9 | +| pdf | before | 7.6/57.1/149.4/158.8 | 6.3/18.0/142.1/149.3 | 16.6/16.8/17.9/17.9 | 4663 | 0 | +| | after | 3.2/16.2/144.5/155.5 | 2.8/7.2/125.0/144.4 | 16.5/16.8/134.0/149.4 | 4655 | 7 | + +Strip steps between presented frames (px, the probe's `scroll` column is +the strip's drawn y for a focused PDF; cell height 25): + +| phase | before | after | +|---|---|---| +| slow notches (one each 300 ms) | 25 px in one frame a notch, 7 of 7 steps whole lines | p10/p50/p90/max 0.04/0.8/6.8/7.2 px, none a whole line | +| slow touchpad (0.06 line a frame) | 1.5 px every frame | 1.5 px every frame (followed) | +| a spin's steps | 25 px each (a notch a frame, 100 at a burst) | 0.5/16/28/42, a stream | +| settle tails | none (nothing settled) | no rise after the fastest frame; last step <= 0.05 px | + +Latency: the spin and held PageDown answer sooner (the frame that answers +a key no longer renders the pages it moves to before showing it; they +render as the glide's input frames, a stream's, come). The far jumps +(ge, gg, a Look at a page, Back) answer within the before's spread in +ReleaseSafe (p50 16.5/17.8 -> 22.6/14.9 over two runs, max 32.8/31.7 -> +32.1/31.2); in Debug ge's frame renders what the before split between the +`g` prefix's frame (~20 ms, re-rendering pages left banded by a fling) and +ge's own (~40): the same total in one frame (60-67 ms). The `late` frames +are a held PageDown's input frames rendering a page while it moves (33 ms +gaps; before they were not moving frames, and took 30 ms to answer). + +## The coordinator's latency rows, answered + +- **pages-up-big** (p90 8.8 -> 24): real. The paint-ahead's upward stretch + stopped two lines short of the view's own bottom (it was "two views out", + the AFTER rows counted from the far end), so a half page up missed it and + painted on the frame (11-17 ms). The stretch is now the view itself and + three more the way it goes, both ways; re-measured (two interleaved + rounds and the final batch): p90 8.8-11.0 against 9.7-19.1 before, frame + work p90 6.0 against 14.1; the p99 left (15-20 ms) is the first page up + after `ge`, which paints on the frame in both (the paint-ahead was + looking down). +- **notches p90/p99**: the wheel takes the drawn-at-once branch (its SDL + event sets `input_seen` as a key's does: the nine notches into a running + glide answer in 1.7-2.0 ms against 2.7-4.7 before). The p90 of ten + samples is the first notch after 1.2 s idle: 13.3 against 9.8, n=1, the + CPU and GPU waking in both (its upload 4.7 ms, its fence 2.4). +- **small-file jumps +2 ms**: not reproducible: two more interleaved rounds + put after both above and below before (search-n-small 8.6/7.2 against + 9.1/10.4, rail-small 8.6/7.0 against 8.9/12.1). Per frame, an input after + idle pays the soft present's upload at a low clock (4.7 ms against 0.8 + warm) in both builds; that is the spread. +- **insert-big max**: the 200-line paste's frame (a far, stitched slide and + its paint), 31-37 ms in both builds. +- **rows/s that changed meaning**: the `scroll` demo's before ran `G` (a + no-op without a count; the script was fixed to `ge` in anim 3, not in + 1b, so before and after ran different scripts). Moved into 1b, both + rebuilt and re-run: the tables below are the same script. `jumplist`'s + rows/s counts how far the jumps went, which depends on what earlier + phases left in the jumplist; before's `look-big` phase drew no frames + (its Looks resolved in the query pane), so its jumplist held fewer far + places. Compare its latency and work, not its rows/s. + +## Open questions and positions + +1. **The soft present on Wayland is the ReleaseSafe frame's tail.** Every + native-Wayland GUI presents through SDL_Renderer so WindowOpacity can be + background-only, whatever the setting: a GPU fence wait and a 6.7 MB + upload a frame, and the first frame after idle pays both at a low clock. + With the GPU swapchain (X11) the scroll is 0.34 ms of work p50. Position: + claim the GPU swapchain when a session starts at WindowOpacity 100 (the + author's config) and say "needs a restart" below 100. +2. **Debug is slow where tree-sitter allocates**: a third of the Debug + stress run was the DebugAllocator's stack capture per tree-sitter + allocation. Position: a size-class pool for tree-sitter in safe builds, + leak-checked by counting. +3. **The spin** costs a core while something moves (CPU 2.0 -> 7.3 s over + the 18 s scroll demo, ReleaseSafe). Position: keep; asleep, the clock + that cannot be trusted costs the latency the author ranked first. +4. **Terminals and keys**: a terminal glides only under the wheel. Ctrl-d + in its normal mode could glide too when no output arrived that frame. + Position: next, with the stream test. +5. **The far jump's slide** shows the last frame's body sliding off and the + new one in, not what lies between. Position: keep; it reads as motion + and never shows anything that was not on screen. +6. **Long lines**: 16 KB round the caret is painted; the rest of a minified + line keeps its last colours. Typing in the middle of a 500 KB line is + now 18-22 ms a key in ReleaseSafe (was 173-213); what is left is the + text's splice and the wrap of the line. The no-wrap sideways scroll + snaps (a horizontal glide was not asked). Position: an incremental + whole-text parse is the real fix; not ponytail-sized. +7. **PDF first frames are not improved.** The bridge renders on the loop + through one MuPDF context and a one-page cache (30-38 ms RS, 110-184 + Debug, the page's content stream interpreted). Off the loop needs a + cloned fz_context per worker and locks round the document: a day's + work with the band-render design in the latency notes. Pictures are + done (decoded on a thread: first frame 90 -> 13 ms max RS, 296 ms -> + one frame later in Debug); a second open still decodes again (no cache: + a Restore is rare). +8. **The tty** has no vsync and no sub-cell motion: it is paced (a 16 ms + tick through its acks), it glides at whole rows (anim 12), and a scroll still rewrites + most rows (vaxis diffs cells; terminal scroll regions would move them + for a few bytes). Position: scroll regions, if the tty's bytes matter. diff --git a/docs/next-drag.md b/docs/next-drag.md new file mode 100644 index 00000000..d217bf94 --- /dev/null +++ b/docs/next-drag.md @@ -0,0 +1,178 @@ +# drag: panes and columns between windows, the window by its tagline + +> Web browsers open a new window when you drag a tab outside the window, we +> should have this with panes and columns. They also let you drag the +> window by dragging on a empty space near the tabs, we should do this when +> the user drags some empty space on the window tagline. Also it should +> take columns/panes from one window to another like web browsers do too. + +Three changes on the converge head (`oqolqlko`), cheapest first: +`drag 1/3` (urzqmmmy), `drag 2/3` (xpxquklp), `drag 3/3` (xyxunnrn). + +## How windows relate (what the design stands on) + +One `pardes-gui` process per window, one core each, each a 9P session +posted in the registry (`$XDG_RUNTIME_DIR/9p/pardes/<pid>`, a symlink to its +socket, 9p_io.zig `postToRegistry`). Nothing else ties two windows: no +shared process, no shared memory. So a pane moving between windows is +serialised (Dump's format, as the brief said) and handed over 9P, and the +window it goes to is found by asking every registry session. + +## As built + +### 1. The window dragged by the workspace tag's blank + +- `tagline.workspaceBlank(p, col, row, tag_hit)`: true on the workspace + tag's row for its inset (the 4 cells left of the text) and for every cell + two or more past the end of its text. The gap between two words is not + blank; the two cells after the text are kept for the caret, so B1 there + still types at the tag's end. +- `gui.hitTest`, given to `SDL_SetWindowHitTest`: `SDL_HITTEST_DRAGGABLE` + on those cells. The compositor moves the window; pardes never sees the + press. B2 and B3 there are untouched (SDL takes only the left button). +- Not in test mode (hidden windows), not attached (`--attach`: the session's + tag is another process's; `g.hit_core` is null there). + +### 2. A grip let go past the window's edge: a new window + +- gui: a button release whose point is outside the window sets + `Mouse.outside` (SDL keeps reporting a held button outside the window: + Wayland's implicit grab, X11's capture). `col`/`row` stay the last cell + inside, so nothing that ignores the flag changes behaviour. +- `mouse.handleMouse`: a `.move` (pane grip) or `.column_move` (column + grip) released outside goes to `Handover.begin` instead of the layout + move. Inside the window the grip drag is exactly as before. +- `src/Handover.zig` (`Pardes.handover`), the core half: the pane with the + panes attached to it (an attachment dragged alone goes alone, unattached), + or the column, is dumped alone: `dump.dumpBytes(p, keep, carried)`, which + `dumpState` now calls with no mask; `State.carried` (`pane`/`column`) + marks such a dump. Each carried pane's serial and `File.revision` is + recorded, the effect `hand_over` emitted, the message row says "to a new + window…". +- The host half (gui `handOver`): the dump goes to + `$XDG_RUNTIME_DIR/pardes-handover-<pid>-<seq>.zon` (0600) and a detached + thread (`Handover.carry`) double-forks this program as + `pardes-gui -l <dump> --geometry=WxH` (the source window's size; `+X+Y` + at the pointer where SDL can place windows), in its own session, so it + outlives the source and leaves no zombie. It waits (up to 15 s) for the + child's registry entry to answer `status`; the child reads the dump before + it listens (gui.localSession), so then the file is removed and `handed` + is posted into `host_io.Inbox`. +- `Handover.finish`: taken, each carried pane is closed with + `Pardes.removePane` (Del's rows rule: its rows go to its neighbour; a + carried column's empty column is dropped); a pane whose revision changed + since the dump is kept, unattached ("copied to …; edited on the way, kept + here too"). Refused or failed: everything stays, the reason on the + message row. One handover flies at a time. +- New option `--geometry=WxH[+X+Y]` (main.zig, `Options.geometry`). + +### 3. A grip let go over another pardes window: it goes there + +- `/status` gains `pointer in|out` in a window host (`Pardes.windowed`, set + by the gui; a terminal's mouse reports never say the pointer left, so a + tty session would claim it for ever and says nothing). +- Before spawning, the worker asks every registry session but its own + (skipped by the socket its entry links to) for `status`, up to 10 rounds + 40 ms apart while any answers with a `pointer` line at all. The one saying + `in` is written `adopt <dump>` on its root ctl. +- `adopt` (ninep/ctl.zig) is a window's word to a window, as `size` is a + frontend's: no builtin, nothing in Help. `Handover.adopt` restores the + dumped panes into free slots and places them where the pointer is: a + pane goes right under the group the pointer is over, out of that group + owner's rows alone (the owner keeps its rows down to the pointer's row; + over one of its attachments, half); a column goes beside the column the + pointer is over, out of that column's width alone (`insertColumn`). Every + other pane's rect is unchanged (tested). The ctl write is answered after + the panes are in, so the source closes its pane only once the target has + it; a refusal (`NoRoom`, `TooManyPanes`, `NotText`) keeps it in the source + and opens no new window: the user aimed at a window. + +## What each platform allowed + +| | Wayland (Halley 0.8, this desktop) | X11 | macOS | tty | +|---|---|---|---|---| +| move by the tag (SDL hit test) | yes, `xdg_toplevel.move`; tried live | `_NET_WM_MOVERESIZE` (untested) | SDL's own (not wired: macos.zig is its own root) | no: the window is the terminal's | +| release outside the window seen | yes (implicit grab) | yes (SDL auto-capture) | yes in SDL | no: mouse reports clamp to the grid | +| new window at the pointer | no: no client positions a toplevel; Halley put it on top of the old one's place | `--geometry=+X+Y` from `SDL_GetGlobalMouseState` (untested) | — | — | +| the window under the pointer | no global pointer, no window positions: asked of each window instead (`pointer in`) | geometry would work too; the same ask is used | — | never a target (no pointer line) | + +What SDL did not allow: a move that starts after a drag threshold (there is +no `SDL_StartWindowMove`; the hit test answers on the press, so a B1 click +on the blank no longer reaches pardes); being a drag-and-drop *source* +(SDL 3 is a drop target only), which is what would have let the compositor +tell the receiving window directly and draw the pane under the pointer +between the windows; any drawing outside the window while the grip is out. + +## Measured (Debug, hidden PARDES_TEST windows, .scratch/e2e.py) + +| what | time | +|---|---| +| release over B → the pane closed in A (adopt answered) | 55, 58 ms | +| release outside, no other window → new window up, pane closed in A | 407, 450 ms | +| release outside, other windows not under the pointer | + up to 10×40 ms asking (estimated, not measured) | + +Live on the desktop: step 1 (a window moved ~370 px), step 2 twice (the +last pane out: the old window closes; a.txt with an unsaved line: dirty in +the new window, disk untouched, the dump file gone). Step 3 headless only: +the author was using the desktop and the field panned under my pointer. + +## Open questions and positions + +1. **B1 on the blank is the compositor's.** Position: keep it, with the two + caret cells. A click there used to start typing at the tag's end, which + the caret cells still do; the inset (cells 0-3) did nothing before. The + alternative (only the inset, or Alt+drag) keeps every click but is not + what browsers do and the inset is narrow. +2. **Terminals do not travel.** The shell is the source process's child; + the pane dies with it. Passing the pty master over `SCM_RIGHTS` would + keep the program running in the other window, but its exit status is + lost to the new owner (it cannot waitpid a non-child). Position: refuse + (as built) until someone wants it; an idle shell could be re-spawned in + its cwd with its scrollback, which Restore already does. +3. **PDFs and images do not travel.** Dump/Restore handle them; `adopt` + restores file panes only. Position: cheap to add, left out to keep the + receiving side one restore path. +4. **Undo history stays behind** (Dump does not carry it; acme's dump does + not either). The text, dirty state, dot and tag tail travel. +5. **The last pane out closes its window** (removePane's `quitEmpty`): what + a browser does when its last tab leaves. Position: keep, it is right. +6. **Where it lands in the target.** Under the pane the pointer is over, + from the pointer's row (acme's movePane split). Position: right for a + pane; a drop on a column's tag could mean "top of this column", not done. +7. **No drop preview.** The target does not know a drag is under way (no + DnD), so it cannot show the guide row until the release. Position: the + source could announce a flying handover over 9P (`status`: `drag`) and + every window show the guide where its pointer is; worth one more step. +8. **Path, not bytes.** `adopt` names a file on this machine; a registry + session is local by definition, so it is enough. A mounted remote + session (tcp, quic) would need the zon in the write. +9. **Asking every window on each drop-out.** Reading the user's other + sessions' `status` is harmless (read-only), but an old pardes answers + none and a hung one costs its 2 s budget on the worker. Position: fine. +10. **The `adopt` read is on the 9P task** (`ponytail:` in ctl.zig). + +## Rough + +- One handover at a time; a second grip let go outside while one flies is + refused with a message. +- An edit made during the ~50-400 ms flight leaves a copy in both windows. +- The new window inherits the source's environment: launched from a pardes + shell, it has that shell's `PARDES_*` (`-l` makes it a new session, so + nothing is forwarded, but its own panes overwrite them anyway). +- `--geometry` and the hit test on X11 and macOS are untested. +- Not changed: docs (prototype); /status's new line is undocumented in + reference.typ. + +## Tests + +`the workspace tag is blank left of its text and past its end, and nowhere +else` (tagline.zig); `a grip let go past the window's edge dumps its pane +alone, and closes it only once another window has it`, `a pane edited while +it is on its way to another window stays here too`, `a terminal's grip let +go past the edge stays`, `a pane let go over another window goes under the +pane the pointer is over, out of its rows alone, unsaved text and all` (the +layout invariant), `a column let go over another window goes beside the +column the pointer is over, out of its width alone` (Handover.zig); the +status test updated (ctl.zig). Run with `-Dtest-filter`; `dump`, `restore`, +`wire`, `grip` filters pass but for the baseline's known "tagline pointer +mapping retains physical grips". gui and tty builds compile. diff --git a/docs/next-pdfrender.md b/docs/next-pdfrender.md new file mode 100644 index 00000000..e006aa48 --- /dev/null +++ b/docs/next-pdfrender.md @@ -0,0 +1,257 @@ +# pdfrender: PDF pages rendered off the loop + +The author's ask: "add concurrency to the mupdf build so its smoother". The +open item of `next-anim.md` (7): the bridge rendered on the loop through one +MuPDF context and a one-page cache, so a PDF's first frame, a far jump's +page and every page a held PageDown reached cost the frame they landed in. +Later asks from the coordinator, answered here too: the Intel SDM (combined +volumes, 5363 pages, 27 MB) as the stress file with its own timedemo; the +page-size pass off the loop; a PDF's places on the jumplist. + +Positions, not a verdict: argue with them. + +## The change stack (workspace `pdfrender`, on main `nqmoxkwz`) + +| change | what | +|---|---| +| pdfrender 0 `ttsruwot` | the `pdf-sdm` timedemo (run where `sdm.pdf` is) and the probe's `landed` column: PDF rasters installed in a frame, on the loop or from a lane. The "before" binaries are built from this change | +| pdfrender 1 `vnpzkxnt` | pages render on lanes: locks, cloned contexts, a document a lane, jobs, generations, cookies, blanks, render-ahead, kept pages; the watch's double open and the far jump's text frame fixed | +| pdfrender 2 `owxvnlpw` | the page-size pass on a lane; MuPDF's page-tree map off | +| pdfrender 3 `swnnkynt` | a PDF's place on the jumplist: page and offset, Back lands on it, JumpScope file, a closed PDF reopens there | + +## MuPDF's threading rules, as applied + +MuPDF allows one thread at a time in an `fz_context` and one at a time in an +`fz_document`; contexts cloned from one made with `fz_locks_context` share +what is safe to share under its locks. + +| object | shared or per thread | +|---|---| +| base `fz_context` | the loop's own; made with `fz_locks_context` over `FZ_LOCK_MAX` pthread mutexes (in the base document struct), so it can be cloned. The loop clones a lane's context on the loop, from its own context | +| lane `fz_context` | one per lane (`fz_clone_context`), used by one job at a time on the lane's thread, dropped on the loop after the lane is joined | +| `fz_document` | **never shared**. The loop's document (text, search, selection, links, outline, the highlight pass) is the base's; each lane opens its OWN from the same bytes (`pardes_pdf_lane_open`, on its thread) | +| `fz_buffer` (the file's bytes) | shared, read only; its count kept and dropped under the alloc lock | +| store, glyph cache, fonts' context, colorspaces, document handlers | shared by the clones (MuPDF keeps them under `FZ_LOCK_ALLOC`, `FZ_LOCK_FREETYPE`, `FZ_LOCK_GLYPHCACHE`) | +| allocator | the shared C heap over `pdf_gpa` (the pdf region: a thread-safe DebugAllocator); MuPDF takes `FZ_LOCK_ALLOC` round every call anyway | +| `fz_cookie` | per job, in the `Job`; the loop sets `abort` (atomic store), MuPDF reads it at each operator | +| pixmap, device, page, display list | per job, made and dropped on the lane | + +So no `fz_context` or `fz_document` is ever touched by two threads: the +loop's are the loop's, a lane's are the lane's (one job at a time, handed +over through the job's future, whose await is the happens-before). The +test "two lanes render two pages of one document at once, each as the base +renders it, and a cookie aborts" renders pages 0 and 1 on two threads at +once and compares them byte for byte with the base's render. + +Why a document a lane rather than one document under a lock with display +lists handed out (MuPDF's `multi-threaded.c` pattern): with one document, +the loop's text, search, hover and selection would wait on the lock while a +lane records a page's display list (its content interpreted, ~half a render). +A document a lane costs one more parse a lane (40-60 ms RS on the SDM, on +the lane) and its own fonts. + +## The design as built + +- **Lanes** (`pdf_view.Lane`, two): `io.concurrent` jobs (`renderJob`), the + Stream pattern. `reconcile` asks; the loop never calls MuPDF to render + (banded pages, too tall for one buffer, stay on the loop as before). + `collect` takes what is done at the start of each reconcile, `land` swaps + the buffer into its slot (no pixel copied on the loop). `nextWake` asks for + frames while a lane works (as a picture's decode does). +- **Generations**: each slot records the job it waits for (`pending`); a job + lands only into the slot that waits for its generation. A request changed + (resize, fit, tint) or the page gone from the strip: the slot asks again or + is retired, and the old job's raster is dropped when it comes. `sweep` + sets the cookie of every job no slot waits for. Test: "off the loop: pages + land from lanes, a stale request's raster never lands, and a job nobody + waits for is aborted" (eight request changes raced against their jobs). +- **What a frame draws before its page lands**: the slot's previous raster + if it has one (any resolution: scaled by the placement), else the page's + paper where the page will be (a 1x1 tinted texel drawn the page's size). + Never a stall. A far jump's first frame used to fall back to the page's + extracted text when nothing was placed (9 ms RS, 110 ms Debug on the SDM, + shown for one frame); it now keeps the PDF's frame. +- **Ahead**: the page past the strip the way it last went joins the asked + span (one page, after the ones in view). With two lanes that is the bound. +- **Measure** moved to the lane: loading a page on the loop's document (its + links, its annotations) cost 6-7 ms a page of the SDM in Debug. +- **Cold lanes**: a lane's first job parses its document and loads fonts; two + cold lanes at once slowed each other (the SDM's first page 1.7 -> 2.5 s + Debug), so a lane starts once the one before it is warm. +- **Kept pages** (`keepPage`/`unkeep`): a closing State hands its whole, + unhighlighted rasters to a process-wide list; a second open or a Restore of + the same file (path, length, hash of its first and last 64 KiB) at the same + request and tint shows them on its first frame. Bound: 64 MiB and 16 pages, + the least recently kept evicted first; freed at the shell's end + (`dropKept`). Test: "kept pages: ... bounded in bytes, the oldest going + first". +- **Page sizes** (pdfrender 2): the strip is laid out on the first page's + size; the last lane's first job measures every page; when the sizes land + (and differ) the next draw lays the strip out again by page and offset at + the core's position and shifts the strip's drawn position by the same + amount, so a glide in progress carries on (a retarget, not a reset). A + one-size document never relayouts. **A Look at page 3000 during the pass** + lands at page 3000's top on the assumed layout; when the sizes land the + anchor is page 3000, offset 0, so it stays on that page, its pixels moved + with the layout and the glide still running. Test: "page sizes off the + loop: ...". +- **MuPDF's page-tree map is off** (`pdf_set_page_tree_cache(0)`, every + document): its first page lookup parsed every page object (735 ms Debug on + the SDM): that, not the 5363 sizes, was the open's stall and every lane's + slow first page. A lookup walks the tree by /Count now. +- **The watch's double open**: arming a PDF's watch reloaded it (the + generation for a PDF started null), so every open parsed the document + twice, two thirds of the SDM's open. It now compares the bytes on disk with + the ones the pane read (`sameBytes`, the key of the kept pages). +- **Unchanged, on the loop, as the latency notes designed them**: the + highlight repaint (the clean copy kept by the lane's job, MuPDF's highlight + pass over the dirty rows on the loop's document), hover, selection, links, + text and search. The lane bakes a job's highlights the way a loop render + did; highlights that changed while it ran are repainted from its clean copy + when it lands. +- **Pictures** keep their thread (anim 7): one decode, no generations or + cancel to share, and moving it onto the lanes would not make it smaller. + +## The jumplist (pdfrender 3) + +A PDF's jump (`Loc.pdf`) is its page (`line`) and how far down it the strip +stands (`col`, a fraction of the page in 2^-32), and its path's hash. A +fraction rather than pixels: a zoom, a fit change or a resize scales every +page, and the fraction lands on the same print. Places are the same visit +when they stand within a body of each other on the strip (the text rule), so +a held PageDown or a wheel is one entry that follows the view, and two +places on one page more than a body apart are two. Back and Forward move the +core there at once and the strip follows through the motion system (a far +one as one body's slide, the page rendered where it comes to rest); a place +the strip already stands on (half a pixel is the fraction's rounding) is not +moved. JumpScope file keeps to the PDF. A closed PDF's entries stay while +Recent knows it and a step onto one reopens it at the page and fraction. +The Jumplist pane prints a PDF's entry as `path:page`. Tests: "a PDF's jumps: +Back after a far jump returns to the exact offset, two places on one page are +two entries" (the SDM when the machine has it, else the docs' PDF), "a PDF's +jumps: JumpScope file keeps to the PDF, and a closed PDF reopens at its +place". Before: `line = page + 1, col = 0, path_hash = 0`, compared in rows, +so every jump within a body's count of PAGES was one entry, scope file +treated a PDF as no file, a closed PDF could not reopen, and Back landed on a +page's top. + +## Numbers + +Headless (`SDL_VIDEO_DRIVER=offscreen`, 1280x900, `.scratch/tools/demo.sh`, +`an.py`): this offscreen SDL presents **in software**, so the present is the +frame's tail in both builds (a software GPU wait of 10-30 ms now and then) +and the lanes compete with it for CPU. The column that is the render's is +*core work* (update + render). Pairs run back to back, base (main + the +demo, `ttsruwot`) then after; round 1 shown, round 2 within a ms or two +everywhere but the present tails (`.scratch/runs/final/`). ms +p50/p90/p99/max; *gap* is the present gap of frames something moved into; +*jank* counts those over 1.5 periods (period 16 ms here); *landed* is the +frames a page landed in. The open's numbers are from the Look's input: the +open runs in the shell's wait, before the frame's marks. + +### Intel SDM (`pdf-sdm`) + +| | open -> first frame | open -> first page | +|---|---|---| +| Debug before | 2123 ms (one frame of 1286) | 2123 | +| Debug after | 97 | 458 | +| RS before | 198 (one of 113) | 198 | +| RS after | 80 | 160 | + +| Debug | phase | core work | frame work | gap (moving) | jank | landed | landed frame work p50/max | +|---|---|---|---|---|---|---|---| +| before | spin | 0.8/0.9/39.7/55.9 | 4.5/8.6/49.4/59.2 | 12.6/17.1/49.6/63.6 | 2 | 2 | 59.2/59.2 | +| after | spin | 0.9/1.1/1.4/1.5 | 5.4/9.3/11.7/13.0 | 11.7/17.6/21.3/21.7 | 0 | 2 | 11.7/11.7 | +| before | held PageDown 5 s | 0.8/34.3/83.0/86.1 | 6.3/38.7/87.0/92.2 | 15.2/42.9/93.3/94.4 | 45 | 44 | 52.7/92.2 | +| after | held PageDown 5 s | 0.8/1.0/1.3/1.5 | 4.9/10.0/16.2/18.0 | 14.9/19.3/23.1/27.0 | 3 | 44 | 4.8/11.2 | +| before | far jump (Look :3000, Back, gg) | 1.1/1.5/52.2/52.2 | 5.6/9.2/59.1/59.1 | 15.9/19.1/20.6/20.6 | 0 | 1 | 59.1/59.1 | +| after | far jump | 0.9/1.1/2.1/2.1 | 4.5/9.5/12.6/12.6 | 16.3/18.9/21.3/21.3 | 0 | 2 | 12.6/12.6 | +| before | slow notches | 0.8/1.1/1.5/37.6 | 4.7/7.0/10.9/53.9 | 16.0/17.6/20.9/22.1 | 0 | 1 | 53.9/53.9 | +| after | slow notches | 0.8/1.0/1.2/1.5 | 4.6/5.6/8.5/12.5 | 16.2/17.2/19.0/23.7 | 0 | 2 | 12.5/12.5 | +| before | whole run | | | 15.5/21.4/88.4/94.4 | 47 of 567 | | | +| after | whole run | | | 15.3/18.9/22.8/27.0 | 3 of 803 | | | + +| RS | phase | core work | frame work | gap (moving) | jank | landed | landed frame work | +|---|---|---|---|---|---|---|---| +| before | spin | 0.1/0.2/8.3/9.1 | 3.4/7.7/14.7/18.1 | 11.9/16.8/19.2/20.3 | 0 | 2 | 18.1/18.1 | +| after | spin | 0.1/0.2/0.3/2.0 | 3.1/7.8/9.3/9.3 | 11.7/16.6/20.1/20.4 | 0 | 2 | 8.7/8.7 | +| before | held PageDown | 0.1/5.1/9.3/11.0 | 3.7/10.5/16.6/20.0 | 14.7/20.8/29.1/30.1 | 9 | 44 | 11.2/20.0 | +| after | held PageDown | 0.1/0.2/0.2/0.3 | 3.5/8.5/14.4/14.7 | 15.3/20.2/23.2/27.9 | 2 | 44 | 4.2/8.3 | +| before | far jump | 0.2/0.3/6.2/6.2 | 3.6/5.2/14.3/14.3 | 16.2/16.9/17.3/17.3 | 0 | 1 | 9.3/9.3 | +| after | far jump | 0.2/0.2/2.9/2.9 | 3.5/7.3/14.3/14.3 | 16.4/20.1/27.6/27.6 | 1 | 2 | 14.3/14.3 | +| before | slow notches | 0.1/0.2/0.2/7.1 | 3.9/6.2/7.7/23.4 | 16.4/16.9/17.2/17.3 | 0 | 1 | 23.4/23.4 | +| after | slow notches | 0.1/0.2/0.2/0.2 | 3.8/7.6/8.1/8.2 | 16.5/17.1/20.5/20.7 | 0 | 1 | 8.2/8.2 | +| before | whole run | | | 15.6/18.3/24.7/30.1 | 9 of 725 | | | +| after | whole run | | | 15.7/18.9/23.1/29.0 | 4 of 747 | | | + +The far-jump phase does more after: Back used to do nothing on a PDF +(Ctrl-o found no entry), so "after" also slides back from page 3000 and +renders it. The landed frame's remaining cost is the present's upload of the +new texture (12.8 MB at this size); the core's part of it is under 0.3 ms. + +### docs/design.pdf (`pdf-scroll`) + +| | open -> first frame | open -> first page | +|---|---|---| +| Debug before / after | 167 / 10 ms | 167 / 313 | +| RS before / after | 38 / 7 | 38 / 67 | + +| | phase | Debug core work | Debug gap | RS core work | RS gap | +|---|---|---|---|---|---| +| before | spin | 0.8/0.9/1.2/139.3 | 12.0/17.1/20.6/147.8 | 0.1/0.2/0.3/22.1 | 11.0/17.0/21.5/33.1 | +| after | spin | 0.8/1.0/1.3/1.7 | 11.6/16.7/21.4/22.3 | 0.2/0.3/0.4/1.9 | 11.5/17.6/21.4/21.5 | +| before | held PageDown | 0.8/128.9/166.1/166.1 | 16.3/133.8/175.8/175.8 | 0.2/0.6/34.5/34.5 | 15.1/22.3/40.5/40.5 | +| after | held PageDown | 0.9/1.1/1.4/1.4 | 15.3/20.5/24.8/24.8 | 0.1/0.2/0.3/0.3 | 15.7/19.0/22.9/22.9 | +| before | far jump | 0.9/1.2/78.5/78.5 | 16.4/18.0/20.0/20.0 | 0.2/0.3/16.5/16.5 | 16.0/19.9/21.7/21.7 | +| after | far jump | 0.9/1.4/2.1/2.1 | 16.3/19.9/27.1/27.1 | 0.2/0.3/2.4/2.4 | 16.3/20.1/21.9/21.9 | +| before | whole run, jank | 7 of 299 | | 5 of 348 | | +| after | whole run, jank | 5 of 441 | | 1 of 439 | | + +The first page of the small PDF lands later than before in Debug (313 vs +167 ms): the lane's parse and cold fonts, against the old open that rendered +it inside a frozen 162 ms frame. The window is up and moving 10 ms after the +Look. + +## Tests + +`mupdf-check` (25, the lanes test among them); unit filters `PDF`, `pdf`, +`off the loop`, `kept pages`, `page sizes off the loop`, `watch`, +`JumpScope`, `Back`, `jump`, `Jump`, `Recent`, `a PDF's jumps`: green. The +snapshot suite (`zig build snap -Dplatform=tty`): all 110 scripts. The tty +compiles (the suite builds it). The two baseline failures were not run. + +## Open questions and positions + +1. **The open itself is still on the loop**: reading the file, MuPDF's open + (the xref), and the watch's re-read to compare bytes: 75-95 ms on the SDM + in both builds. Position: open the base document on a lane too, the pane + appearing at once with its tag and paper; it is the next stall. +2. **Two lanes, a document each**: the price is one parse a lane and each + lane's own fonts (memory, and a cold first page per lane). Position: keep + it; a shared document behind a lock would make the loop's text, search and + hover wait on a lane. +3. **Lanes compete with a software present** (this headless run): the + present gap's tail moved within the noise, but on a CPU-starved machine + the lanes could take the present's core. The `io.concurrent` threads are + the pool's, so they cannot be niced without leaving the pool thread niced. + Position: leave it; on the author's GPU present it does not arise. +4. **The jumplist's tolerance**: asked "within a few rows' worth"; built + "within a body", the text's rule. With a few rows, every PageDown and + every PageDown held would be a jump of its own. Two places on one page a + body apart are still two entries. The entry follows the wheel (a PDF has + no cursor to stay behind), so Back after wheeling far and a `gg` returns + to where the wheel left you, where a text returns to its cursor. +5. **A far jump's slide** starts a body short of its pages and shows paper + there: the old page is not kept for the slide. Position: keep (as anim's + position 5). +6. **The highlight pass and hover stay on the loop's document**: a hover on a + page the loop has not loaded loads it there (6-7 ms Debug on the SDM). + Position: fine for now; it is the pointer's own frame, not a scroll's. +7. **Recent keeps a file by the path it was opened as**: a PDF (or a text) + opened by a relative path and closed does not reopen from the jumplist + when the Look from another pane resolves it differently (found writing the + test, not changed). +8. ponytail ceilings in the code: two lanes; one page ahead; the blank's + texture keyed revision 0 (a tint change shows the old paper until the page + lands); the kept pages' file key (path, length, first and last 64 KiB); + failed sizes pass keeps the assumed sizes. diff --git a/docs/next-searchrows.md b/docs/next-searchrows.md new file mode 100644 index 00000000..79ffc444 --- /dev/null +++ b/docs/next-searchrows.md @@ -0,0 +1,89 @@ +# searchrows: query rows that are addresses, coloured as their files + +The author's ask (2026-10-25): the search results "should show Lookable +locations for the matches, and it should highlight the near text on the +preview/result pane", then "using treesitter for the highlight I mean", +then on the row format: "the row can be just path:line:row but the path +should be minimal i.e. it should be the smallest one that doesn't refer to +panes like @p1 but that resolves a Look". Change `tsyvmpux`, on +`zmluwpuv`. Positions, not a verdict. + +## The row + + Places.zig:163:8 pub fn firstFrom(hits: []const Hit, at: usize) usize { + Places.zig:237:19 const i = firstFrom(set.hits.items, at); + ../shade.zig:1:11 pub const Shade = enum { + +- `path:line:col`, then the line's code from its first non-blank: plain + text, so B3 anywhere on the address is a Look as anywhere, a sweep copies + it, and a frozen pane saved is a list of addresses that still work. +- The path is `Query.lookPath(buf, path, dir)`: the shortest text a Look + from the query pane resolves: relative to the pane's directory (`x`, + `sub/x`, `../x`) when strictly shorter, else absolute. A relative name a + Look would read as something else (`@p...`, `://`) stays absolute. One + function, used by every hit row and by the file and declaration headers + of Grep, `/`/All and the language server lists. +- On every row, `/` in the owner included: a bare `:12:5` would be looked + up in the +Search itself (a Look resolves against the pane it is in) and + a saved list would lose its file. +- A group's code starts in one column: the address padded to + `path + ':' + digits(longest line in the group) + ':' + 3`, then two + spaces (a column of four digits or more pushes its own row one cell). +- Declaration headers carry `path:line` in the same column; file headers + stay the bare path (itself a Look). + +## Colours + +- Rows: `Stream.paintRows` paints a whole file on the worker + (`syntax.highlightApart`, the same call as the anim paint-ahead): the text + of the pane that shows it, else read from disk there. It lands in the + locations cache beside Callstack's (`locations.Cache.put`); each row takes + its line's slice when the line still reads as the row does + (`Query.Shades`, one walk down each file a refill). Until then rows are + plain; on arrival `Query.recolor` colours every query pane's plain rows + in place and asks for the next file: one at a time, each (path, revision) + once a Grep (a 256 ring). The match tint (`decorateRow`) sits on top, its + position past the address (`code_start`). Not on the loop, not in a 9P + write (asked again on the next step), not without workers. +- The +Preview: colours are its own pane's (painted as any file pane), and + the query's hits in that file are its places (`Places.search` literal for + a Grep, `Places.feed` from the rows for a list), tinted and ticked, the + current row's one current and selected, centred. A pane that already + shows the file gets the same (`selectPlace`). + +## Numbers + +`zz grep rows timings` (src/Stream.zig, `GREP_TIMES=<path>`): Debug, a +TestShell worker, 160x50, the stress file (src/layout.zig x17, 1.22 MB, +29002 lines), typing `pane` three times with 400 ms of frames after each +key, then Enter on 2000 rows. Load 2.4-3.0 before, 2.7-2.8 after; after is +three runs. + +| frame work | before | after | +|---|---|---| +| keystroke (update + render) p50 / p90 / max | 2.2 / 4.2 / 6.0 ms | 2.0-2.1 / 2.9-6.5 / 4.4-6.7 ms | +| refill frame (rows remade) p50 / p90 / max | 4.4 / 5.2 / 5.2 ms | 4.8-5.1 / 5.4-6.1 / 5.4-6.1 ms | +| other frames p50 / p90 / max | 0.9 / 1.3 / 10.6 ms | 0.9 / 1.2-1.3 / 10.0-10.2 ms | +| Enter (2000 rows written) | 27.0 ms | 28.2-28.7 ms | +| frames after Enter p50 / max | 0.9 / 1.7 ms | 0.9 / 1.3-1.7 ms | + +Rows coloured after Enter: 1718 of 2000; the other 282 are plain in the +file's own colours too (checked against `highlightApart` of the file). A +refill costs ~0.4 ms more (the wider rows and the Shades walk), inside the +noise of the keystroke column; the paint itself never shows on the loop. + +## Pushback and rough edges + +- The current row's address is barely legible: the address's dim location + colour on the current row's mark tint (visible in the screenshot). The + thing B3 aims at should read; a brighter location fg on the marked row is + a one-line theme decision I left to you. +- A text with no file (a +New scratch) has no path any Look resolves, so + its `/` rows keep `@pN`, the only address that works there. +- `lsprelpath` asserted the opposite policy ("must NOT become + `../shade.zig`"); the author's shortest-path rule wins, the script says so. +- Rows of a file over 4 MB, and of markdown/typst (their injections share + parsers, so no worker paints them) stay plain; a disk file changed after + it was painted keeps plain rows for its changed lines until the next Grep. +- One file painted at a time: a Grep over hundreds of files colours file + by file (each lands in a frame); a worker per file if that is slow. diff --git a/docs/next-store.md b/docs/next-store.md new file mode 100644 index 00000000..67702438 --- /dev/null +++ b/docs/next-store.md @@ -0,0 +1,241 @@ +# The store: bounded state shared by every pardes window + +> We should have some persistent state that is bounded (a houndred or so +> MiB at most) stored on the fs and shared among all pardes windows. It will +> store stuff for like the recent files picker. We should also have a panes +> picker and this should include panes from the current session that were +> deleted/closed. + +## What was there + +`recent.zig` kept 200 files in `$XDG_STATE_HOME/pardes/recent`, one line a +file. Each process read it once at start and, at the end of any step that +changed it, wrote the whole of its own list back (`saveRecent`: truncate, +write). With two windows that is last-writer-wins: window A opens `a.zig`, +window B opens `b.zig`, whichever saves last erases the other's entry, and +neither ever sees the other's files until it restarts. A crash between the +truncate and the write leaves an empty or half file (the reader passed bad +lines over, so it never stopped pardes starting, but the list was gone). +Closed panes were nowhere: a closed file's dot was its Recent entry, a +closed scratch, terminal or +Errors was gone. + +## The format (argued first; the code follows it) + +One file, `$XDG_STATE_HOME/pardes/store`, an append-only log of framed +records, plain enough to `cat`: + +``` +@<kind> <len> <crc32, 8 hex>\n<body: len bytes>\n +``` + +The first record is `@h` with the body `pardes-store 1`; a file that does +not start with it is not a store (garbage, an older format) and reads as +empty. The kinds: + +| kind | body | meaning | +|---|---|---| +| `h` | `pardes-store 1` | the header, a version | +| `r` | `<line> <col> <aline> <acol> <path>` | a recent file and its place: the old `recent` line, unchanged | +| `c` | `<session> <pid> <serial> <column> <gainer> <below> <owner> <rows>\t<name>\n<dump>` | a pane closed in session `<session>`, with where it was, and the pane itself as a one-pane Dump | +| `x` | `<session> <serial>` | that closed pane was reopened: no longer listed | + +Folding the log in order gives the state: a path's latest `r` wins and its +order is the order of last writes (so every window folds the same list); a +`c` not followed by its `x` is a closed pane. + +**Why a closed pane is a Dump.** `dump.zig` already turns any pane into +data and back: a file's dot and scroll (its text only when unsaved), a +scratch's or an output pane's text with its origin and rows' metadata, a +terminal's scrollback (a shell comes back running under its old history, a +command pane finished, as Restore does), a PDF's page, an image. Reusing it +means Panes can bring back every kind of pane with the same fidelity as +Restore, through the same validation (`dump.readZon` checks a record before +anything is built from it), and nothing new to keep in step when a pane +grows a field. + +**Why on disk and not in memory**, since only this session reads its own +closed panes: their text is what makes them big (a terminal's history, a +long +Errors, a discarded unsaved buffer), and the store is where the bound +lives; in memory each window keeps only an index (serial, name, place, +offset). Restore keeps them (same process, same session). A session that +crashed leaves its records for the next compaction to drop. Position, not a +verdict: an in-memory list would be simpler, and I would accept that +pushback; the cap argument is what tipped it. + +**Bounds.** The file never passes `max_bytes` (100 MiB): an append that +would compacts first. A compaction keeps the newest live records within +half of that, so it is not redone at once. A record is at most `max_record` +(8 MiB): a terminal whose dump is bigger is kept without its history (it +comes back as a fresh shell in its directory), any other pane that big is +not kept. Recent keeps `recent.cap` (200) files; a session keeps its 64 +newest closed panes. + +## The sharing + +- **Writers** take `flock(LOCK_EX | LOCK_NB)` on `store.lock`, a file of + its own (the store's inode changes at each compaction, so locking it + would let two writers hold locks on two different files). Busy, the + records wait in memory for the next step: a window never blocks a frame + on another's compaction. At exit the lock is waited for. +- Under the lock a writer first reads what others appended since it last + read (so its list's order is the log's), then writes its records with one + positional write at the end of the file, then notes the new end. +- **Readers** take no lock. On use (Recent, Panes, `/recent`, before an + append) one `stat` of the path: the same inode and size as last read, + nothing to do; the same inode and longer, read the tail; another inode + (a compaction renamed a new file over it) or shorter, read it all again. +- **Torn and garbage records.** A record whose length runs past the end of + the file is being written (or its writer died): reading stops before it + and tries again next time. A complete record with a bad CRC or a bad + header is garbage: the reader resynchronises at the next `\n@` that + starts a valid record, and marks the file for compaction, which the next + writer does under the lock (rewriting only valid records). A missing, + unreadable or foreign file is an empty store: pardes always starts. +- **Compaction**, under the lock: fold the whole file, write the live + records (Recent, oldest first so the fold gives the same order; closed + panes of sessions whose pid is alive, copied byte for byte) to + `store.new`, `fsync`, rename it over `store`. Readers see the new inode. + Triggered when the file is past twice its live size plus 1 MiB, when it + holds garbage, or when an append would pass the cap. +- **Startup reads headers, not bodies**: a new session has no closed panes + of its own, so every `c` body is skipped by its length; only `r` bodies + (a line each) are read. + +### Rejected + +1. **Rewrite the whole file under a lock** (today's scheme, made safe with + read-merge-write and a rename): correct, but every open or close costs + the whole file, and with closed panes' text in it that is megabytes per + Del. +2. **SQLite**: one more C library to vendor and hook into Zig's allocators + (the shared-deps policy), WAL needs shared memory, for three record + kinds and a fold. +3. **A file per entry** (maildir): atomic by rename and lock-free, but the + bound means listing and statting a directory of thousands of files on + every use, two windows race deleting the same oldest, and "what changed" + is not one `stat`. +4. **A file per window, merged by readers**: no lock, but a merge needs + wall clocks across processes for order, every read opens N files, and + dead windows' files need a reaper that races the living. +5. **A fixed-size mmap'd ring**: always 100 MiB on disk, cross-process + writes into shared pages need atomics, a writer that dies mid-record + corrupts in place, and a format change is a migration. +6. **A watcher thread / inotify** (spec says no) or **a daemon** (none + exists; pardes must start without one): a `stat` on use is cheaper than + either and as fresh as anything that is looked at. + +The old `recent` file is read once into a store that does not exist yet, +so nobody's list is lost; it is left where it is. + +## As built + +| piece | where | +|---|---| +| the log: framing, reader, resync, fold, flush, compaction | `src/Store.zig` (`Pardes.store`) | +| Recent as records: `Entry.changed`, `List.note` (a record read), `changedFirst` | `src/recent.zig` | +| a pane to and from a Dump, one at a time | `dump.dumpPane`, `dump.restorePane` (lifted out of `dumpState` / `initDump`) | +| a closed pane kept: before its teardown, its rows' gainer after | `Pardes.removePane`, `Pardes.removeColumn` (`Store.keep`, `Store.close`) | +| back where it was | `Store.reopen` → `layout.giveBack` (rows from the gainer alone), `layout.attachFrom` for an attachment whose owner is open, else `exec.placeNew` | +| Panes: open panes, then this session's closed ones, `@p7 notes/a.md (closed)`, dimmer (the gutter's colour between the match marks) | `Query.startSource` / `makeNameRows` / `land` | +| Recent and `/recent` read the store on use | `Query.startSource`, `ninep/tree.zig` | +| the path | `main.storePath`: `$XDG_STATE_HOME/pardes/store` (`Options.store_path`, was `recent_path`) | + +Which closes are kept: every `removePane` / `removeColumn` of a pane the +user had (announced: a pane made and refused in one step never was), not +a query pane nor a +Preview. Exit and Restore keep nothing (Restore's new +core takes the old session's list, `Store.clone`). Brought back, a pane is +a new pane (a fresh serial, as Restore gives); its row goes (`x` record). + +A Look at `@p7` naming a pane this session closed brings it back instead of +the "no pane @p7" miss: the row's text is its address, as everywhere. That +is the only change to Look, in its miss branch. + +**The turn.** Every host call is made out of the turn (`Store.host(f, +args)`, one call each), so a store under a mount of this session's own +tree cannot deadlock, and nothing in the store or Recent changes while a +step is out. `/recent` (a 9P read) reads the store only when no step is +out; otherwise it answers the list as it was. + +## Measured (Debug, the `zz store timings` test, STORE_TIMES=<dir>) + +A store as a running session leaves it: 200 files and 90 closed panes of +1 MiB (94 MB). + +| what | cost | +|---|---| +| a session starting on it (`load`: headers only, every `c` body skipped) | 3.4 ms | +| a refresh with nothing new (one `stat`) | ~1 µs | +| a flush of one record (lock, read the tail, one write) | 36 µs | +| a compaction of the 94 MB file (CRC of every record, copy the live, rename) | 278 ms, to 51 MB (the newest within half the cap) | + +## Tests + +`store: two windows share Recent...` (two cores on one file, a lock held by +a third party delays a write and loses nothing, a fresh window folds the +same list), `store: the cap holds...` (3000 files and 30 closed 20 KB +scratches against a 48 KiB / 256 KiB cap: never past it, compactions +happen, the newest 200 files and the newest closed pane survive), +`store: a garbage or torn file...` (a foreign file, a torn header, junk, +then a whole record; a half-written record waited for; mended by the next +writer), `store: a closed pane comes back...` (from the file, not memory; +its rect, the gainer's and another column's as before the close; listed +`(closed)` in Panes, Enter brings it back, unlisted after a re-read; another +session lists none). `test/fs.py store_shared_between_windows`: two live +sessions over 9P. The related suites (dump, Restore, query, Find, Grep, +Del, Delcol, attach, collapse, jump, Edit, recent) pass. The tty build +compiles. + +Found, not mine: `fs.py recent_survives_restart` fails on the converge +baseline too, at its Recent step (the query pane's rows are relative +names now, the test looks for absolute ones). + +## Open questions, and my position on each + +1. **Closed panes on disk or in memory?** On disk (argued above). The + honest counter: only this session reads them, and a Del now costs a + dump and a write. Measured, a flush is 36 µs; the dump of a big + terminal is the cost (its history base64'd), capped at 8 MiB. +2. **Recent's cap stays 200**, now for every window together. Shared, it + fills faster; 1000 is cheap for the fuzzy scorer. I kept 200 to change + one thing at a time; I would raise it. +3. **"open" means open here.** A file open in another window reads + `(closed)` in this one's Recent (its place is the other window's last + close). Saying `open elsewhere` needs the store to know which windows + are alive and what they hold (a record per open, its pid): doable, + not done. +4. **Compaction is on the loop** (278 ms for 94 MB, Debug). It happens + when the file doubles past what was live, or reaches the cap, which a + window that closes many big terminals does. Off the loop it would need + the disk engine's worker and the lock held across frames; I would do + it only if it shows up. A store of Recent alone is ~20 KB to rewrite + (not timed separately). +5. **A crashed session's closed panes** are dropped at the next + compaction (its pid is gone). Keeping them a day for a "what was I + doing" word would be cheap: the records are there. +6. **A dirty file pane closed with the second Del** comes back with its + unsaved text (it is in its dump, by Restore's rules; not tested + here). That is a feature (undo a discard) + and a surprise (the discard was asked for twice). I kept it; say if a + discard should be final. + +## What I would push back on + +- "shared among all pardes windows" for the closed panes: they are this + session's by the spec, so the sharing is only of the file and its bound. + If the bound is the only reason, an in-memory list with a byte budget + is less code (no `c`/`x` records, no offsets); I chose the disk for the + memory and Restore, but this is the part I hold least firmly. +- The 100 MiB: nothing in Recent comes near it; only closed terminals' + history does. A smaller cap (16 MiB) would bound compaction to ~50 ms + and lose little. 100 MiB is what was asked, so it is the default. +- Reopening a closed pane makes a new serial: `@p7` in old text names a + pane that is now `@p12`. Restore does the same and logs `restored 7 12`; + the store could log the same, not done. + +## Rough + +- The dim tint of a closed Panes row is the gutter colour (`lineno`), not + checked by eye in every theme. +- A Delcol'd pane comes back where `placeNew` puts it (its column is gone). +- An attachment whose owner was closed with it comes back as a plain pane + next to wherever placement puts it (its owner's serial is new). diff --git a/docs/next-tables.md b/docs/next-tables.md new file mode 100644 index 00000000..cc9e567c --- /dev/null +++ b/docs/next-tables.md @@ -0,0 +1,176 @@ +# Tables in markdown files, as built + +> Could we do special rendering for tables in markdown files? + +A GFM pipe table in a `.md` file is drawn as a table, in its own rows: every +column's `|` on one screen column whatever the source spacing, the `|` drawn +as rules, the delimiter row (`|:--|--:|`) drawn as one rule with its colons +kept, the header bold on the tag's ground. Every byte stays in its row as the +text it is: B1 selects it, B2/B3 take its words, the chords cut and paste it, +the caret sits on it, and nothing is drawn over anything. Editing a cell +re-aligns the table on the keystroke. + +## The one idea: a pad is a tab's extra cells + +The rows are not rewritten. A cell narrower than its column is given the +cells it lacks as **virtual width before one of its bytes** (a *pad*): before +the `|` that ends it (left), before its first byte (right), split (centred). +A pad is to its byte what a tab's extra cells are to the tab: drawn blank, +each of its cells maps back to that byte, and the caret before that byte is +drawn after the pad, against its glyph. So there is no parallel map: the +existing pane-aware column functions in `File.zig` add the pads, and so does +every walk that draws a file row. + +| where | what changed | +|---|---| +| `File.rowPads` / `rowTable` | the gate: a row of a table of the text as it is now, that fits the pane | +| `File.displayOffset`, `displayEndOffset`, `byteAtRowDisplay` | `+ Tables.between(pads)` / `Tables.byteAt` | +| `File.fillBody` | writes the pads as blanks into the body string (so `paneText`, `expandedSel`, the sweep text see the drawn row) | +| `File.recolorSyntax` | its screen walk steps over the pads | +| `body_layer` | pointer-selection tint and the view-edge checks through the pane-aware functions | +| `edit.capturePointerSelection` | a sweep's columns to bytes through `byteAtRowDisplay` | +| `Text.verticalMove` / `visualMove` | j/k keep the column the table shows (a body of a file pane only) | + +Everything else (mouse.zig, exec.zig's B2 cells, look.zig's cursor word, the +caret, multi-cursor tints, `gw` labels) already went through those three +functions and needed no change. That is the evidence the mapping is in one +place: the round-trip test clicks every cell of a row with pads of all three +kinds and checks the caret lands on the byte and is drawn where it is. + +## The look (`Tables.paint`) + +Glyphs and colours only, on the cells the row has, after the syntax colours: +`|` as `│`, the delimiter row as `├──┼──┤` (its `-`, blanks and pads as `─`, +its `:` in the rule colour), the header bold on `tag_bg` (the compact context +rows' ground: tables reuse a look the editor has). The rule colour is the +theme's `border`, else `lineno`. + +## Finding the tables + +tree-sitter-markdown here does expose `pipe_table` (header, delimiter row, +cells, alignments). I did not use the tree to find them: the highlighter +parses only the lines around the view (`refreshHighlights`, a fragment from +`scroll - slack`), which starts mid-table as soon as a long table is +scrolled, and a fence is only known from the top. So `Tables.zig` finds +tables by lines with the grammar's own rules (its scanner's +`PIPE_TABLE_START`: a header's cells counted by pipes, a `:?-+:?` delimiter +row of the same count with at least one pipe; rows until a blank line or a +block that interrupts a paragraph; escaped `\|`), and the grammar is the +**oracle in a test** (`tables are the pipe_tables tree-sitter finds`: five +tables including an indented one, a no-pipe continuation row and an escaped +pipe; the fenced one and the short-delimiter one not). + +## Cost (measured) + +`.scratch/stress-tables.md`: 2.7 MB, 54 508 lines, 2000 tables of 3-6 columns +and 10-30 rows, fences every 50 tables. Debug build, 160x50, each step +`update` + a full render, the same text as `.md` and as `.txt` +(`zz tables timings`, `TABLES_TIMES=<path>`). + +| what | .md | .txt | +|---|---|---| +| a whole read of the tables (once, blocking, for comparison) | 127 ms | - | +| the first frame | 27 ms | 18 ms | +| frames until every table is read (4 ms a frame from the top) | 24 | - | +| `j` and its frame, in a table | 1.0 ms (worst 1.5) | 0.6 ms (0.9) | +| a letter typed in a cell and its frame | 3.2 ms (worst 8.5) | 2.0 ms (6.8) | + +The first version re-read the whole text on every edit: 119 ms a keystroke. +Two changes the numbers forced, both Places' patterns: + +- **An edit reflows**: the tables it did not touch shift by the lines it + added (`File.State.splice`), and only its block (blank line to blank line, + the touched tables taken in) is read again. A fence line in the edit, or + in what it replaced, reads everything (a fence changes every line after + it). A random 1500-edit test checks every result against a whole read; + more than 1000 took the short way. +- **Opening reads from the top a frame's budget at a time** (`Tables.frame_ns`, + `Pardes.nextWake` while `busy`): rows below the read point are drawn as + source until it gets there (a quarter second on this file). An edit past + the read point changes nothing read; one before it starts the read again. + +## GUI and tty + +Both draw the same grid: alignment, rules, header, the mapping are core. +What only the GUI does: the light box-drawing rules (`─│┌┐└┘├┤┬┴┼`) are drawn +by hand edge to edge (`gui.zig` `ruleArms`/`drawRule`, a `rule` bit in +`GlyphKey`, never a slice of a shaped word), so a table's `│` joins the rows +above and below at any line height and the delimiter row is one unbroken +line. In a terminal they are the terminal font's glyphs, which may leave gaps +between rows (the terminal's business). This applies to every box-drawing +cell in the GUI, terminal panes' TUIs too (as Ghostty and kitty do). + +Things only a GUI could do next, not done: pixel-thin rules between cells +rather than a cell-wide glyph (needs a cell decoration the surface does not +have); a half-cell inset so a rule does not take a whole column. + +## Rough + +- A table wider than a wrapping pane is shown as its source, wrapped (a + padded row must not wrap: wrapping is byte-fitted). `Wrap off` lays it out + again with hscroll. +- Inline markdown is not coloured inside cells: `syntax.inject` injects + `markdown_inline` into `inline` nodes, and `pipe_table_cell` is not one. +- A table in a blockquote or list item is not found (the line detector has + no container prefixes); tree-sitter finds it. +- Mixed leading pipes (`| a |` over `a |`) misalign by one cell; a leading + pipe's indentation is padded only when the pad is not at byte 0. +- Columns past 64 are not aligned. Zerox twins do not share the splice, so a + twin re-reads the whole text after an edit (sliced, so it still does not + hold a frame). +- The sweep-text fallback (`selectionText` without captured rows, a sweep + begun on the tag) reads the drawn row, so it would carry pad blanks; the + same is true of the callstack guide today. + +## Open questions, and my position on each + +1. **Hide redundant source spaces?** Position: no. Every byte stays visible; + only width is added, never taken. `| foo|` shows its two spaces. Hiding + bytes would make a click land on something you cannot see, which is the + constraint's spirit even if a space is "text". +2. **The glyph substitution: is drawing `|` as `│` drawing over text?** + Position: no; it is the byte's glyph, like a font ligature (which the GUI + already does), with the byte selectable, searchable, typed over. The + alternative, keeping `|` and only padding, is one constant away + (`rule_v`); I find the plain `|` reads as source, not as a table. +3. **Delimiter colons**: kept, in the rule colour, at the cell edges. The + alignment is visible anyway, but you edit them, so they must show. +4. **Rule colour**: `border` is faint on doom_one, especially the 1 px + horizontal rule. `lineno` or a mix toward `fg` would read better; a theme + field (`table_rule`) is the honest answer if you want it tunable. +5. **Wide tables**: source wrapped (now) versus clipped laid-out rows with + hscroll per table. Position: source; a clipped row hides text, and the + wrap is honest. A column could also be squeezed by wrapping a cell inside + it, but that is a virtual row, and virtual rows break the row = line + invariant everything here rests on. + +## Pushback + +- The NEXT brief says "check whether the grammar exposes pipe_table nodes and + use them if so". It does, and using them for detection would be worse here + (a view-local fragment parse starts mid-table; a whole-file parse is + ~seconds in Debug on the stress file, by converge's 4.8 s for 1.2 MB of + Zig). Using the grammar as the test oracle keeps its rules without its + cost. If a whole-file markdown tree ever exists (a worker parse, as + converge does for declarations), the detector could read it instead. +- Re-aligning live means a column widens under the caret as you type in its + widest cell, so the rest of the row moves right per keystroke. That is the + point of the feature, but it is motion in text you are not editing; a + `TableAlign off` setting may be wanted for heavy table editing. +- Making box-drawing rules procedural is a GUI-wide change (terminal TUIs + change look too). I think it is right (Ghostty, kitty, WezTerm all do it), + but it is a decision beyond tables. + +## Tests + +`zig build unit-test -Dplatform=gui -Dtest-filter="tables"`: +`tables: a pipe table's columns, alignments and pads, by line`; `...every +byte's cell maps back to it, and every pad cell to the byte after it`; `...is +drawn aligned, its bytes in order, the caret and a click on each byte's cell` +(also the look); `...typing in a cell re-aligns the table live, and j/k keep +the column shown`; `...an edit's tables, shifted and found again around it, +are the whole text's` (1500 random edits); `...a big text's tables are read +a frame's budget at a time`; `...wider than a wrapping pane is shown as its +source`; `tables are the pipe_tables tree-sitter finds` (syntax.zig); +`a box-drawing rule reaches its cell's edges` (gui.zig); `zz tables timings` +(skipped without `TABLES_TIMES`). No layout change, so no rects invariant. diff --git a/docs/next-winmode.md b/docs/next-winmode.md new file mode 100644 index 00000000..c2a01da8 --- /dev/null +++ b/docs/next-winmode.md @@ -0,0 +1,69 @@ +# winmode: d and c in window mode, the Del question as a hint + +> The window mode should have d for deleting and c for collapsing too, the +> deletion should keep that j/k movement. The current spc d j/k should only +> show the message after a timeout so that a user that does this fast won't +> even see it, it will be more like a hint for users that tried to delete +> and nothing happenend. + +## As built + +- `layout.windowKey`: `c` runs `Collapse` on the outlined pane; `d` makes + the outlined pane active and runs `Del` on it, exactly the keyboard Del + (`can_ask` is set: it is a key). With panes above and below, Del asks + and the next key is its answer (`Pardes.answerQuestion`, which already + runs before window mode sees keys); with one neighbour it closes at once. + Either way, once the pane is gone the outline moves to `p.active`, which + `removePane` already sets to the pane that grew into the rows. The mode + stays on: `Ctrl-w d j d` closes two panes. A refused Del (unsaved text) + leaves the outline where it is, the refusal on the message row. +- Keys: `config.window_delete` (`d`) and `config.window_collapse` (`c`), + apart from `window_keys`, because those are also the header walk under + `Ctrl-w` on a tag, where `d`/`c` mean nothing. +- Labels: `layout.window_labels` loses `d` and `c` (22 -> 20 letters). +- The hint: Del sets `Pane.question_due_ns = clock + 400 ms` when it asks; + `Messages.collectNotices` leaves the prompt band out while + `question_due_ns > now_ns`; `nextWake` wakes once at that time (while + `question_due_ns > stepped_ns`, so stepping past it ends the wake and a + tick draws the frame). Same pattern as the REPL's `repl_enter_due_ns`. + The question exists from the first moment: keys answer it, the 9P log + says `ask` at once, a script's `answer` works; only the band waits. + +## Why 400 ms + +Typed in one go, the `j` after `SPC d` lands 100-250 ms after the `d` +(a leader sequence's inter-key gap). Above ~300 ms it is a pause, the hand +waiting to see something happen. 400 ms clears a relaxed typist with margin +and is still quick enough to read as "it is asking", not "it is broken". +Key-hint popups elsewhere (which-key) wait a few hundred ms for the same reason. It is a compile-time +constant beside `del_question` (keys are compiled in); a Runtime setting +would be one line in config if the author wants to tune it live. + +## Tests + +- `window mode d deletes the outlined pane and asks k or j, c collapses + it, and the mode stays` (pardes.zig): c twice restores the height; d asks, + Esc keeps it, d j gives the rows below and the outline follows; d with one + neighbour closes at once onto it; labels hold none of h j k l d c. +- `the Del question shows only once its delay is up: a quick SPC d j never + sees it`: no prompt band before the due time, nextWake at it and not + past one frame, the band after, no wake once stepped past; a fast + `SPC d j` closes with the band never showing it. +- The old Del test moves the clock to the due time before looking at the + band. `test/snapshots/delask.snap` waits out the delay (`settle 700`) + before `snap asked`; its golden is unchanged (it raced otherwise: the + first `stable 400` saw no change and captured the band empty). + +## Open questions, positions + +- Should `d` leave window mode after closing? Position: no. The point of a + mode is a run of layout edits (`Ctrl-w d j d c`), and the outline landing + on the pane that grew says where you are; Enter/Esc end it as ever. +- `d`/`c` taken from the labels: the 21st and 22nd panes lose a letter. + Position: fine; past 20 panes you move anyway. The alternative (labels + only after a prefix) costs a key on every jump. +- Del's question from a click or 9P never asks, so the delay touches only + the keyboard paths that ask today. +- Pushback: the hint could be the message row's own lingering text instead + of the prompt band, but the band is where the answer's keys are named and + the caret logic already knows it; kept. diff --git a/docs/open-questions.md b/docs/open-questions.md new file mode 100644 index 00000000..f1ffb544 --- /dev/null +++ b/docs/open-questions.md @@ -0,0 +1,17 @@ +# Open questions + +Decisions deliberately left open, with what is known so far, so they can be +picked up without redoing the research. None is open now. + +## Decided + +- **Where an unknown command word runs** (2026-09-28): at a terminal idle at + its prompt it is typed into that shell; anywhere else it runs as a command + pane, a terminal whose child is `Shell -c <line>`, reporting `exit N` in + its tag and the log ([the reference](typ/reference.typ)). Chosen over acme's + process writing into `+Errors` because interactive programs keep working + without a streaming runner, and over checking `PATH` before typing into a + shell, which misjudges builtins, aliases and functions. +- **Where an exec from a code file goes** (2026-09-28): to a REPL bound for + its language, when one is ([the reference](typ/reference.typ)). Chosen over a per-file + or per-directory binding, which would need a place to keep and show it. diff --git a/docs/refs.yml b/docs/refs.yml deleted file mode 100644 index 47e49a69..00000000 --- a/docs/refs.yml +++ /dev/null @@ -1,82 +0,0 @@ -acme: - type: Article - title: "Acme: A User Interface for Programmers" - author: Pike, Rob - date: 1994 - parent: - type: Proceedings - title: Proceedings of the Winter 1994 USENIX Conference - page-range: 223-234 - -plan9: - type: Article - title: Plan 9 from Bell Labs - author: - - Pike, Rob - - Presotto, Dave - - Dorward, Sean - - Flandrena, Bob - - Thompson, Ken - - Trickey, Howard - - Winterbottom, Phil - date: 1995 - parent: - type: Periodical - title: Computing Systems - volume: 8 - issue: 3 - page-range: 221-254 - -netorg: - type: Article - title: The Organization of Networks in Plan 9 - author: - - Presotto, Dave - - Winterbottom, Phil - date: 1993 - parent: - type: Proceedings - title: Proceedings of the Winter 1993 USENIX Conference - page-range: 271-280 - -intro5: - type: Reference - title: intro(5) — introduction to the Plan 9 File Protocol, 9P - date: 2002 - parent: - type: Book - title: Plan 9 Programmer's Manual, Volume 1 - publisher: Bell Labs - -v9fs: - type: Article - title: "v9fs: A Plan 9 Resource Sharing Filesystem for Linux" - author: - - Van Hensbergen, Eric - - Minnich, Ron - date: 2005 - parent: - type: Proceedings - title: Proceedings of the 2005 USENIX Annual Technical Conference, FREENIX Track - -devdraw: - type: Reference - title: draw(3) — screen graphics - date: 2002 - parent: - type: Book - title: Plan 9 Programmer's Manual, Volume 1 - publisher: Bell Labs - -ad: - type: Repository - title: "ad: an adaptable text editor" - author: Ellis, Innes - url: https://github.com/sminez/ad - note: 9P server implementation in crates/ninep - -u9fs: - type: Repository - title: "u9fs: serve 9P from Unix" - publisher: Bell Labs - url: https://github.com/plan9foundation/u9fs diff --git a/docs/registry.typ b/docs/registry.typ deleted file mode 100644 index 4d386f1c..00000000 --- a/docs/registry.typ +++ /dev/null @@ -1,1209 +0,0 @@ -// THE DESIGN REGISTRY — the one place where an idea, a refactor or an open -// question lives between "someone said it" and "the tree does it". -// -// WHY A FILE AND NOT AN ISSUE TRACKER. Every claim in here cites `file:line` -// against this tree, and a tracker cannot be grepped from an editor pane, does -// not diff, and is not there when the network is not. `docs/design.typ` says -// what pardes IS; this file says what is being argued about. When an argument -// settles, its conclusion moves into `design.typ` (or into the code) and the -// entry here becomes `landed` or `rejected` — a tombstone with the reasoning -// still attached, because the expensive part of a decision is the part that -// says why the other option lost. -// -// NO PACKAGES. `design.typ` pins cetz because diagrams are genuinely painful to -// hand-roll; this file has none, so it depends on nothing and builds offline -// forever: -// -// typst compile docs/registry.typ docs/registry.pdf -// -// HOW TO ADD TO IT. Append an `#entry`. Argue inside it with `#note`. Cite with -// `#ev`. Never delete a note — flip the entry's status and let the losing -// argument stand. The dashboard on page one is generated from the entries, so -// there is no index to keep in sync. - -#set page(paper: "a4", margin: (x: 2.2cm, y: 2cm), numbering: "1") -#set text(font: "New Computer Modern", size: 9.6pt) -#set par(justify: true, leading: 0.58em) -#set heading(numbering: none) -#show heading: set block(above: 1.4em, below: 0.7em) -#show heading.where(level: 1): set text(size: 12pt) -#show heading.where(level: 2): set text(size: 10.4pt) - -#show raw.where(block: true): it => block( - width: 100%, - fill: luma(246), - inset: (x: 0.5em, y: 0.45em), - radius: 1pt, - breakable: true, - text(size: 7.8pt, it), -) -#show raw.where(block: false): set text(size: 8.8pt) -#set table(stroke: 0.4pt, inset: 0.4em) - -// --------------------------------------------------------------------------- -// machinery -// --------------------------------------------------------------------------- - -/// The lifecycle. `open` is a question nobody has taken; `investigating` has an -/// agent or a human on it; `decided` has an answer but no code; `landed` and -/// `rejected` are terminal and keep their argument; `deferred` is "correct, but -/// not until X exists" and must say what X is; `blocked` waits on someone else. -#let states = ( - open: (rgb("#8a6d3b"), "OPEN"), - investigating: (rgb("#31708f"), "LOOKING"), - decided: (rgb("#2f6f4f"), "DECIDED"), - landed: (rgb("#3c763d"), "LANDED"), - rejected: (rgb("#a94442"), "REJECTED"), - deferred: (rgb("#6f5499"), "DEFERRED"), - blocked: (rgb("#777777"), "BLOCKED"), -) - -#let chip(state) = { - let (c, label) = states.at(state) - box( - fill: c, - inset: (x: 4.5pt, y: 2.2pt), - outset: (y: 1.5pt), - radius: 2pt, - text(size: 6.4pt, fill: white, weight: "bold", tracking: 0.4pt, label), - ) -} - -/// One argument. `id` is stable forever — notes and code comments cite it, so a -/// renumber is a lie in every file that referenced the old number. -#let entry(id, title, state: "open", tags: (), body) = { - [#metadata((id: id, title: title, state: state, tags: tags)) <reg>] - block(above: 1.5em, below: 0.5em, breakable: true)[ - #block( - width: 100%, - fill: luma(242), - inset: (x: 0.6em, y: 0.45em), - radius: 2pt, - stroke: (left: 2pt + states.at(state).at(0)), - )[ - #text(weight: "bold", size: 9.6pt)[#raw(id) #h(0.5em) #title] - #h(1fr) - #chip(state) - #if tags.len() > 0 [ - #linebreak() - #text(size: 7.4pt, fill: luma(90))[#tags.join(" · ")] - ] - ] - #block(inset: (x: 0.2em, top: 0.5em))[#body] - ] -} - -/// A comment. The thread IS the design discussion; keep them in time order and -/// never edit one in place — reply to it instead. -#let note(who, date, body) = block( - width: 100%, - inset: (left: 0.9em, y: 0.35em), - stroke: (left: 1.6pt + luma(205)), - { - text(size: 7.6pt, weight: "bold", fill: luma(70))[#who] - text(size: 7.6pt, fill: luma(140))[ · #date] - linebreak() - set text(size: 9.2pt) - body - }, -) - -/// Evidence. A claim with a path is a fact; a claim without one is an opinion, -/// and this makes the difference visible at a glance. -#let ev(where, body) = block( - width: 100%, - inset: (left: 0.9em, y: 0.25em), - { - text(size: 8.2pt, fill: rgb("#2f6f4f"))[▸ ] - raw(where) - text(size: 9.2pt)[ — #body] - }, -) - -/// A question with no owner yet. Rendered so it can be found by eye when -/// scanning for something to pick up. -#let q(body) = block( - width: 100%, - inset: (x: 0.7em, y: 0.4em), - fill: rgb("#fdf6e3"), - radius: 2pt, - { text(size: 7.6pt, weight: "bold", fill: rgb("#8a6d3b"))[OPEN QUESTION]; linebreak(); body }, -) - -/// What the entry concluded. One per entry at most, and only when the state is -/// `decided`, `landed` or `rejected`. -#let verdict(body) = block( - width: 100%, - inset: (x: 0.7em, y: 0.4em), - fill: rgb("#eef5ef"), - radius: 2pt, - stroke: 0.4pt + rgb("#2f6f4f"), - { text(size: 7.6pt, weight: "bold", fill: rgb("#2f6f4f"))[VERDICT]; linebreak(); body }, -) - -// --------------------------------------------------------------------------- - -#align(center)[ - #text(size: 15pt, weight: "bold")[The Design Registry] - #v(0.3em) - #text(size: 9pt, style: "italic")[open arguments, their evidence, and how they were settled] - #v(0.2em) - #text(size: 8.5pt)[#datetime.today().display("[year]-[month]-[day]")] -] - -#v(0.8em) - -*Historical decision record.* Entries retain their original source references -and states. For the current filesystem and transport interface, use -`docs/fs.md`; FUSE and the proof-of-concept examples are no longer supported. - -#context { - let es = query(<reg>).map(e => e.value) - let order = ("open", "investigating", "blocked", "decided", "deferred", "landed", "rejected") - let counts = order - .map(s => (s, es.filter(e => e.state == s).len())) - .filter(p => p.at(1) > 0) - .map(p => [#chip(p.at(0)) #text(size: 8.4pt)[#p.at(1)]]) - align(center, counts.join(h(0.9em))) - v(0.6em) - table( - columns: (auto, 1fr, auto), - align: (left + horizon, left + horizon, right + horizon), - table.header( - text(size: 8pt, weight: "bold")[ID], - text(size: 8pt, weight: "bold")[Argument], - text(size: 8pt, weight: "bold")[State], - ), - ..es - .sorted(key: e => order.position(s => s == e.state) * 1000) - .map(e => (raw(e.id), text(size: 8.8pt)[#e.title], chip(e.state))) - .flatten() - ) -} - -#pagebreak() - -= 9P - -Born from the draft note `docs/9p.typ`. The owner's instinct: replace FUSE with -9P, replace the private unix-socket wire with 9P too, and put a small 9P server -on the ESP32-P4 that pardes talks to as a client. The instinct is recorded here -entry by entry so it can be argued with in pieces rather than accepted or -rejected whole. - -#entry("9P-1", "Where does 9P go? Two layers, and 9P is the outward face of one of them", state: "decided", tags: ("architecture", "umbrella"))[ - The umbrella. The draft conflated two things that share a socket and nothing - else. - - #ev("src/acmefs.zig:63-78")[LAYER 1, the acme control tree: request/response, nine operations, and an ABI that already says "FUSE opcodes, 9P messages and a unit test all reduce to these".] - #ev("src/detached/wire.zig:187-232")[LAYER 2, the detached wire: 19 tags carrying RLE cell frames and input, server-push, N frontends on one screen. None of them is a file.] - - #verdict[ - 9P is a TRANSPORT FOR LAYER 1 and a CARRIER FOR LAYER 2 — never a - re-encoding of either. - - Layer 1 gets 9P as a second transport beside FUSE, because the ABI was - built for it and because FUSE cannot leave the machine (`9P-13`). - - Layer 2 keeps `encodeFrame` byte for byte. 9P may carry those bytes - (`9P-12`), but the moment a frame is re-expressed as a file's contents the - design has lost the thing that makes it fast, and there is a thirty-year - demonstration of both answers (`9P-12`, devdraw against `/dev/screen`). - ] - - #note("review", "2026-08-27")[ - The reason this is worth stating as its own entry: nearly every mistake in - the draft is one layer's property asserted about the other. "Offsets are - meaningless" is true of Layer 2 and false of Layer 1. "The protocol is - private and undocumented" is true of Layer 2 and false of Layer 1, which is - acme(4). "Adding a feature means adding a message" is true of Layer 2 — - measured at 7 lines per fact (`src/detached/wire.zig`, `set_clipboard` - occurring 8 times) — and false of Layer 1, where a feature is a file. - ] -] - -#entry("9P-2", "Make the transport seam explicit before writing any 9P", state: "decided", tags: ("refactor", "cheap"))[ - `fs_service` already touches its transport through exactly three methods. - Turning `*fuse.Fs` into a ctx+vtable at three call sites is a no-behaviour - change that makes a second transport possible without deciding anything else. - - #ev("src/fs_service.zig:158-200")[`drain`/`step` call only `retry()`, `next()` and `reply()`.] - #ev("src/tty/tty.zig:1216")[call site 1.] - #ev("src/gui/gui.zig:3738")[call site 2 — and `:3841` for the headless grid harness.] - - #verdict[Do it first, independently of every other entry. ≈40 lines changed, 0 added, `fuse.Fs` is the first implementor. If 9P is never built, this costs nothing and documents the seam.] -] - -#entry("9P-3", "Direct I/O is `qid.version = 0`, not `cache=none`", state: "decided", tags: ("protocol", "correction"))[ - Under FUSE the server asserts `FOPEN_DIRECT_IO` per open and the client - cannot argue. The draft assumed 9P gives this up and compensated with advice - ("mount with `cache=none`"). It does not have to: Linux's client disables - both read and write caching for any file whose qid version is zero. - - #ev("linux/fs/9p/fid.h:52-53")[`(fid->qid.version == 0) && !(s_flags & V9FS_IGNORE_QV)` sets `P9L_DIRECT` — "no read or write cache".] - #ev("linux/fs/9p/v9fs.h:82")[`CACHE_NONE = 0` is the default anyway.] - #ev("linux/fs/9p/v9fs.c:93")[`ignoreqv` is the only opt-out, and it is explicit.] - - #verdict[A synthetic tree reports `qid.vers = 0` on every file. Server-enforced, near-parity with `FOPEN_DIRECT_IO`, and the mount advice in the draft becomes unnecessary. Plan 9 needs nothing: its cache is opt-in via `mount -c`.] -] - -#entry("9P-4", "The error ABI: 9P2000 Rerror is a string", state: "open", tags: ("protocol", "ABI"))[ - The core answers with numbers. 9P2000 answers with prose, and the Linux - client turns prose back into a number by exact string match. A miss is not - `EIO`; it is 526, which userspace prints as "Unknown error 526". - - #ev("src/acmefs.zig:152-165")[`E.PERM..E.NOSYS`, nine numeric values.] - #ev("linux/net/9p/error.c:224-243")[`p9_errstr2errno` hash lookup; on a miss `errno = ESERVERFAULT`.] - #ev("principia-softwarica/editors/acme/xfid.c:19-24")[acme's own strings — `Ebadctl`, `Ebadaddr`, `Ebadevent` — are all misses in that table.] - - Three ways out, and they are not equally good. - - / A: #[Emit Linux `strerror` text verbatim so all nine round-trip. Cheap (≈20 lines), and makes English kernel strings this project's error ABI.] - / B: #[Serve 9P2000.u, whose `Rerror` carries a numeric errno alongside the string. Costs a second dialect in the codec; buys exact errnos and keeps a human-readable string for Plan 9 clients.] - / C: #[Emit acme's strings and accept 526 on Linux. Faithful to acme, hostile to `mount -t 9p`.] - - #q[Which? Note that B also answers `9P-5`'s `statfs` gap for free, and that the draft deferred `.u`/`.L` without noticing either.] - - #note("prior-art", "2026-08-27")[ - `ad` — a Rust acme-like editor that already ships this — chose option C - without noticing. It emits nineteen lowercase prose strings: `"unknown - fid"`, `"permission denied"`, `"file not open"`, `"exclusive file already - open"`, `"invalid offset for read on directory"` - (`~/05-genizah/ad/crates/ninep/src/sansio/server.rs:25-43`). *None* of - them is in Linux's table, so under `mount -t 9p` every single error `ad` - can produce arrives as 526. It also serves `SUPPORTED_VERSION = "9P2000"` - and nothing else (`:46`), so there is no `.u` escape hatch in place. - Real implementations fall into this; it is not a theoretical trap. - ] -] - -#entry("9P-5", "Directory reads need per-fid state the core does not have", state: "decided", tags: ("protocol", "cost"))[ - This is the real offset discontinuity, and the draft missed it while - inventing a false one about `body`. - - 9P requires a directory read at offset 0 or at exactly the byte offset where - the previous read ended, and the reply must contain whole `Dir` entries. - `acmefs` treats the offset as an *entry index* and re-stages the whole - listing each call, which is right for FUSE and wrong here. - - #ev("principia-softwarica/lib_networking/lib9p/srv.c:473")[a dir read whose offset is neither 0 nor `fid->diroffset` is answered `Ebadoffset`.] - #ev("u9fs/u9fs.c:60-64")[the reference server keeps `diroffset`, a cached `dirent` and `direof` per fid.] - #ev("src/acmefs.zig:972")[`var skip = req.off;` — an entry index.] - - #verdict[Transport-side, not core-side: the 9P transport keeps a per-fid byte cursor plus the one entry that did not fit, and calls the existing `readdir` with the entry index it has counted. `acmefs.zig` is untouched. Budget ≈40 lines.] - - #note("prior-art", "2026-08-27")[ - `ad` has no cookie at all: `read_dir` returns the entire `Vec<Stat>` on - every call and the server re-serialises all of it and byte-skips the offset - (`ninep/src/sync/server.rs:203`, `sansio/server.rs:377-401`). Its - `FidMeta` is `{qid, mode}` — no dir state (`:700-703`). So it is O(N) per - read, O(N²) per directory, and `E_INVALID_OFFSET` fires only when the - offset lands mid-entry (`:388-390`), which means an arbitrary offset on an - entry boundary is silently accepted and a changing directory tears. - The 40-line budget above buys correctness `ad` does not have. - ] - - #note("built", "2026-08-27")[ - Built, and the carry-over entry turned out to be unnecessary. u9fs needs one - because `readdir(3)` has already consumed the entry it could not fit; - `acmefs` re-stages the whole listing from an index on every call and says - why (`src/acmefs.zig:1013-1016`), so an entry that does not fit is simply - not counted and the next read asks for it by index. The server keeps a - per-fid PAIR — a byte cursor for the client's rule and an entry index for - the core's — advanced together. That removes ≈300 bytes per fid and a class - of staleness bug. The ≈40-line budget held. - ] -] - -#entry("9P-6", "Is `addr` per-fid or per-window?", state: "open", tags: ("semantics", "divergence"))[ - The draft claimed per-fid and attributed it to acme. acme does the opposite, - and so does pardes today. - - #ev("principia-softwarica/editors/acme/dat.h:239")[`Range addr;` is a field of `struct Window`; every use in `xfid.c` is `w->addr`.] - #ev("src/acmefs.zig:1027-1031")[pardes copied that, deliberately, and records why: there is no fid table because FUSE puts the nodeid on every request.] - - Per-fid genuinely is better — two scripts can address one window without - colliding — but it is a divergence from acme, not a restatement of it, and it - is the one place in the whole draft that asks the *core* to grow state. Under - FUSE there is no fid to hang it on at all. - - #q[Take the divergence and pay for it (per-fid `addr` lives in the 9P transport, and the FUSE transport keeps one per mount), or keep acme's race and document it?] - - #note("prior-art", "2026-08-27")[ - Third independent source against the draft: `ad`'s address is per-BUFFER, - keyed by buffer id (`Req::SetBufferAddr{id, addr}`, - `ad/src/fsys/message.rs:77-80`). acme per-window, pardes per-pane, `ad` - per-buffer. Nobody has ever shipped it per-fid. That is not proof it is - wrong — it is proof it is a proposal, and it should be argued as one. - ] -] - -#entry("9P-7", "One controller per window, or many?", state: "open", tags: ("semantics", "divergence"))[ - The draft says `event` is exclusive-use. acme does not do this, and pardes - currently allows any number of readers. - - #ev("principia-softwarica/editors/acme/xfid.c:603-609")[acme's exclusivity is an advisory `lock` ctl verb setting `w->ctlfid`, cleared on clunk.] - #ev("principia-softwarica/editors/acme/fsys.c:537-563")[`fsysopen` checks permission bits only; a second `event` reader is not refused.] - #ev("src/acmefs.zig")[`pf.readers +|= 1` on open — a count, and the count is what suppresses button actions.] - - `DMEXCL` would make a second open fail with `EAGAIN` under Linux. That is a - tightening with a real cost: two cooperating scripts on one window stop - working, and nothing in `examples/acmefs/` was written expecting it. - - #q[Leave it a count (status quo, acme-compatible), or make it exclusive and lose multi-reader?] - - #note("prior-art", "2026-08-27")[ - `ad` DOES do what the draft describes: `event` is `FileType::EXCLUSIVE`, - i.e. QTEXCL (`ninep/src/sansio/protocol.rs:503`, added in commit - `678fbf5`). Note how it is scoped, though — enforcement is per *ClientId*, - not per fid (`sansio/server.rs:762-764`), so one client may hold two fids - on `event` and two clients may not share one window. That is a third - position between "a count" and "one fid", and it is probably the right one: - it stops two unrelated scripts fighting without breaking a script that - opens the file twice. - ] -] - -#entry("9P-8", "`pty/` files — the best idea in the draft, and unrelated to 9P", state: "open", tags: ("feature", "transport-independent"))[ - A script today can write a terminal pane's `body` (it becomes a pty write) - and read its rendered scrollback. It cannot spawn a terminal, resize one, or - signal one. The draft's `pty/{data,ctl,status}` fixes that, and none of it - needs 9P — it is `ctl` verbs and two new `PaneFile` variants. - - #ev("src/host.zig:80-82")[`push_spawn` and `push_pty_resize` already exist as effects, so `exec` and `winsize` are two existing effects with a name.] - #ev("src/acmefs.zig")[the `Verb` table has no pty verb; `PaneFile` has no pty entry.] - - `sig INT` is the only genuinely new capability — there is no `kill` anywhere - in `host_io.zig`. - - #verdict[Not blocked on anything. Build it in the FUSE tree now; a 9P transport inherits it for free. Sequencing it *after* 9P would be putting the transport before the feature.] - - #note("prior-art", "2026-08-27")[ - Worth knowing before building it: there is *no prior art anywhere*. acme - has no pty files; `ad` has none either — its tree is - `{ctl, minibuffer, scratch, log, buffers/…}` and contains no terminal - surface at all (`ad/src/fsys/mod.rs:17-32`). So `pty/` is a genuinely new - interface, which cuts both ways: nobody has made these mistakes for us, and - nobody's scripts already expect a particular spelling. Being first is a - reason to keep it small — `data`, `ctl`, `status`, and no more. - ] -] - -#entry("9P-9", "Naming sessions: `aname` or a top-level directory", state: "open", tags: ("protocol", "naming"))[ - Verified: `aname` works, and the draft's mount line is valid verbatim. - - #ev("linux/fs/9p/v9fs.c:72-90")[`aname` parses to `Opt_remotename`; `version=9p2000` selects `p9_proto_legacy`.] - #ev("linux/fs/9p/vfs_super.c:340")[`port` defaults to 564, so the draft's command line needs no `port=`.] - #ev("u9fs/u9fs.c:409-420")[u9fs uses `aname` to pick a tree, so there is precedent for exactly this use.] - - Against it: pardes has no multi-session concept in the core at all today — - `--detach=work` names a *socket*, not a tree. A top-level directory needs no - protocol feature and works with clients that ignore `aname`. - - #q[Is this question even live before `9P-12` settles? A per-session socket already names a session; `aname` matters only if one listener serves many.] - - #note("prior-art", "2026-08-27")[ - `ad` does not use `aname` either: `Server::new` installs a single anonymous - root `""` (`ninep/src/sansio/server.rs:91-95`), and multi-session is the - SOCKET name, `ad-<pid>`, with discovery through a `list_open_sessions` - helper (`ad/src/fsys/mod.rs:158-159`). That is exactly pardes's - `--detach=work` shape. Two implementations independently reaching for a - named socket over `aname` is evidence about which one people actually - build. - ] -] - -#entry("9P-10", "Aggregation: the prefix router", state: "deferred", tags: ("architecture", "premature"))[ - The draft's longest technical section, and its own §11 concludes the - aggregate is not worth building before a second machine exists. That verdict - is correct and also covers the client half. - - What the section understates: a proxied `Twalk` cannot be answered until the - remote `Rwalk` arrives, so "the fid table maps our fid to a pair" is not the - entire proxy — it needs per-tag continuations, remote↔local tag remapping, - `Tflush` forwarding and fid invalidation on connection death. - - #ev("src/detached/wire.zig:64-70")[a round trip inside `update` is the one thing the transport must never do.] - #ev("src/detached/server.zig:238-241")[the daemon is one `poll(2)` over 50 slots, and `:565-569` records that it has no worker pool.] - - #verdict[Deferred until a second machine exists AND `9P-12` has settled, because the proxy's shape depends entirely on which layer 9P occupies. Reopen with a named use case, not with an architecture.] - - #note("unblocked", "2026-08-27")[ - *Reopen this.* The deferral rested on one objection and steps 4 and 5 - dissolved it without meaning to. - - The objection was that a proxied `Twalk` cannot be answered until the remote - `Rwalk` arrives, so the router needs per-tag continuations, tag remapping, - flush forwarding and fid invalidation — machinery a core that must not block - has nowhere to put. Three of those four now exist as shipped primitives: - - #ev("src/9p.zig")[`Server.retry()` re-offers a parked request oldest-first and `reply()` RE-PARKS it when the answer is still `.again`. The park table is therefore a continuation store that already survives across frames, and it is the one the FUSE mount has used all along.] - #ev("src/9p.zig")[`Client` is sans-io: `submit()` hands back a tag and never waits, `take()` returns a completed operation or null. Its tag table is indexed BY the tag, so attributing an out-of-order reply is one bounds check — which is the remapping the objection was about.] - - So a proxy is now a loop, not a subsystem: `Server.next()` gives a request, - `Client.submit()` forwards it, the answer is `.again`, and each frame - `Server.retry()` offers it back until `Client.take()` completes and the real - reply goes out. Nothing blocks, nothing is added to the core, and the - daemon's poll set grows by one descriptor per upstream. - - What is still genuinely missing is fid invalidation on a connection that - dies mid-walk, and a decision about whether `Tflush` forwards or is answered - locally. Both are small and neither is architectural. - - Re-cost before building: the "several hundred lines" the draft claimed was - wrong in the other direction too. Measure it against the ≈200 lines this - loop looks like, and against `src/fs9_client.zig`'s 622, which already does - the connect-and-pump half. - ] -] - -#entry("9P-11", "A 9P server on the ESP32-P4 — real, cheap, and a second firmware image", state: "decided", tags: ("board", "motivating-case"))[ - The owner's motivating case, and the entry that changed the most under - measurement. Both the draft and the first review were wrong about it, in - opposite directions. - - The draft was wrong about what the board IS: it describes a machine running - "a 9P server and nothing else", and today the P4 runs the whole editor - (`src/esp32p4.zig:264-300`, 2 of 21 vtable methods at `:930-934`). - - The review was wrong about what the board CAN AFFORD, because it quoted a - stale number. - - #ev("src/esp32p4.zig:470-473")[the "9,128 bytes free at 80×24" comment predates `direct_emit` (`:870`), which sized vaxis's two shadow grids to one cell.] - #ev("05-zig-p4/experiments/report.typ:848-849,877-880")[measured after that change: "the heap now reports 336 KB free at every geometry tried, including ones that used to fail outright… the heap has 336 KB spare while `.bss` runs out". The binding resource is the 240 KiB low L2MEM, not the 384 KiB heap.] - - A 9P server's RAM, costed from real components: two msize buffers at 4,096 - (u9fs uses three — `rxbuf`, `txbuf`, `databuf`, `u9fs.c:1814-1816` — a - minimal server needs two) = 8,192 B; a FIXED-ARRAY fid table of 32 entries × - 16 B (`fid`, `qid.path`, `mode`, `diroffset`) = 512 B; codec scratch with - `P9_ERRMAX` = 128 B. *Total 8,832 B, or 2.5% of free heap.* - - #ev("src/esp32p4/input_rescue.zig:52")[and a 4,096-byte reassembly buffer already exists on this exact UART, measured: "4,096 bytes in a single write arrive intact, and past that the loss is counted rather than silent".] - #ev("linux/net/9p/client.c:840-843,908-910")[the 4,096 floor is imposed by the LINUX KERNEL and by nothing else. Plan 9's devmnt, plan9port's `9p` and pardes's own client accept a 512-byte msize, which halves the buffers to 1 KiB.] - - Flash: the editor image is 809,536 B of a 1,536,000 B partition - (`report.typ:375-376`), leaving 726,464 B. A 9P-only image is ≈23,870 B of - platform plus ≈15 KiB of server ≈ *39 KiB, 2.5% of the partition*. - - #ev("build.zig:1182-1235")[a second board image is ALREADY expressible: `esp32p4-test` builds its own executable, `ImageStep`, `FlashStep` and run step in 54 lines, and deliberately links no pardes object. That is the shape.] - #ev("src/acmefs.zig")[and the semantics layer already compiles for riscv32: `llvm-nm` finds 21,548 B across 17 `acmefs.*` symbols in `zig-out/pardes-esp32p4.o`.] - - #verdict[ - Buildable, and much cheaper than anyone assumed. But it is a SECOND - FIRMWARE IMAGE, not a second role for this one: the editor owns UART0 - bidirectionally (`esp32p4.zig:611`, `uart.zig:43-44,122-130`) and JP1 - exposes no second P4 UART (`board9p.Header`). The board is either - an editor or a filesystem at any one time. Say that plainly rather than - implying both. - ] - - #note("review", "2026-08-27")[ - The reframing the draft misses: the board already exposes `Peek`, `Poke`, - `Hexdump` and `Gpio` as acme words (`src/builtins.zig`, `Board` namespace). - All four cap at 4,096 bytes - per command and the cap's stated reason is the 115200 console. So the whole - 2³² address space is already reachable — by *typing a word into a tag*, - with the answer landing in an output pane. Nothing is machine-readable and - nothing is remote. A 9P tree is that same capability with names instead of - verbs, and `mem/`, `gpio/pinout` and `prof` are backed by functions that - exist today (`builtins.Board.readWord`, `builtins.Board.gpio`, - `pardes_esp32p4_frame_prof` at `esp32p4.zig:985`, already exported). - Four more files need one new C-ABI extern each; four have no - implementation at all. That inventory belongs in the note, not a wishlist. - ] - - #q[Should the parked second RISC-V core own the 9P server? `report.typ:552-563` says it needs four register writes plus a trampoline, shares one L1 D-cache so a lock-free ring needs only fences, and that giving core 1 the UART "eliminates the silent input loss". That is the one arrangement where the board serves 9P *and* keeps the editor. Uncosted.] - - #note("built", "2026-08-27")[ - *The RAM figure above is wrong and the built one is 21,776 B, not 8,832.* - Measured from the real structs: `Fid` is 64 B × 32 = 2,048, `Slot` is 208 B - × 32 = 6,656, and the whole `Server` is 9,488 B before buffers; a 4,096 - msize adds `in` 4,096 + `out` 8,192. - - Three reasons, all of them things the estimate did not know. `out` is TWO - msize — one message being written, one being built — which is what makes - every reply infallible and removes "can I write yet" from the whole file. A - fid entry is 64 B and not 16, because `Rstat` carries a NAME that a node id - does not, plus the open handle and the two-coordinate cursor. And the - estimate did not cost the park table at all, which is 6,656 B of the total. - - It still fits with room: 6.5% of the board's ≈336 KB free heap, and about - 11 KB in total at the 512-byte msize Plan 9 accepts. A test bounds `Fid` and - `Slot` so that a change to either shows up as a diff in the board's budget - rather than as a surprise on the die. - ] -] - -#entry("BOARD-1", "Raise UART0 to 921600 before quoting any board latency", state: "decided", tags: ("board", "cheap", "prerequisite"))[ - Every board 9P latency figure is eight times worse than it needs to be, for - no reason but that the bootloader left the divider alone. - - #ev("src/esp32p4/uart.zig:35-38")[the firmware never programs the divider; 115200 is inherited.] - #ev("05-zig-p4/src/hal/uart.zig:321-333")[`setBaudrate` and `divider` already exist and `reset()`'s refusal of instance 0 does not apply to them.] - #ev("05-zig-p4/experiments/report.typ:540-544")[921600 is one `UART_CLKDIV_SYNC` write on the existing 40 MHz XTAL — int 43, frag 6, +0.064% error. 2 Mbaud is representable but this CH340 is unreliable there, corroborated by the flasher at `build.zig:1136-1138`.] - - #verdict[ - One register write, 86.8 µs → 10.85 µs per byte. A warm - `cat /mnt/board/gpio/2/value` goes from 10.8 ms to 1.35 ms; a 4 KiB `Tread` - from 358 ms to 45 ms. Do it first, and re-measure everything after. - The hazard the same files record: writing the console UART's divider is - adjacent to what bricks the board, and the host must be reopened in step. - ] -] -#entry("9P-12", "Should 9P replace the private wire protocol? Half of it, and not the half you would guess", state: "decided", tags: ("architecture", "the-real-question"))[ - Six layerings were costed. The finding that settles it is that layering is - not a cost decision at all. - - #ev("src/detached/wire.zig")[1705 lines = 1092 code + 613 tests, of which only 303 are FRAME and 789 are TRANSPORT: bounds, tags, message structs, framing, codecs.] - #ev("src/detached/wire.zig:1401,1412")[a 56×14 full frame is 6,298 B; a one-keystroke diff is 56 B. Ratio over 100.] - #ev("src/detached/server.zig:1102-1110")[skip-slow is three lines: `if (c.out.items.len != 0) continue;` — skip the frame and leave the mirror alone, so the next frame diffs against what the client really has.] - - A base-9P2000 codec (≈450), a dispatcher onto `acmefs.Op` (≈400) and a fid - table (≈120) come to ≈970 lines that are IDENTICAL in all six layerings. - Layering moves ±150. So the question is reach and semantics, not lines. - - *Does 9P subsume the wire's job?* The transport half, yes, with shipped - precedent: clipboard becomes `snarf` (`rio/fsys.c:61`), input becomes - `mouse`/`cons` — and rio's `mouse` is exclusive-open with a blocking read and - a flush (`rio/xfid.c:167-173,638-660`), which is the `event` idiom exactly. - The frame half, no: 9P has no server-initiated message. - - *Is "the frame is a file" a category error?* Only if you mean push. Two - shipped counter-forms exist and they disagree with each other, which is the - most useful thing in this entry: - - #ev("plan9/rio/fsys.c:53, lens.c:281-282")[`/dev/screen` is an offset-addressed raster you POLL — `lens` seeks to a scanline and repaints on mouse events because it never learns the screen changed. Real, and precisely why nobody runs a remote rio through it.] - #ev("drawterm-9front/kern/devdraw.c:1574, include/draw.h:55")[`/dev/draw/N/data` is a PRIVATE BINARY COMMAND STREAM batched into 8,000-byte buffers and flushed as one `Twrite`. Real, and how remote display has actually shipped for thirty years.] - #ev("drawterm-9front/cpu.c:149,191,251,359")[and it inverts direction: the DISPLAY exports its devices and the APPLICATION mounts them. The frame travels as a client's `Twrite`, never as a server's push.] - - pardes's codec is already devdraw's shape. `wire.zig`'s 5-byte length prefix - (`:145`, `framed()` `:564`) makes an `encodeFrame` message a legal 9P payload - with zero new framing. - - #verdict[ - *Superseded in part by `9P-19`.* The reasoning below stands; the conclusion - moved. O3's tunnel was chosen because it was the only option that reached - the board without sockets. `9P-19` shows the tunnel is unnecessary: the - link simply carries 9P, with the FRONTEND as the server and the core as the - client, and the frame travels as the client's `Twrite` to `screen`. That is - O1 done the way it has actually shipped for thirty years, and it dissolves - the objection recorded here. - - What survives unchanged: *O4* (wire inside 9P) costs +34 B per frame, +61% - on a 56-byte diff. *O5* (a standalone listener) remains correct and is - independently worth building — it is the scripting face and it composes - with anything. - - What was wrongly rejected: *O6*. "The frontend serves, the core is a - client" was rejected here for making the core write and match tags inside - `update` and for foreclosing the freestanding targets. Both are wrong. The - core need not wait for `Rwrite` — 9P permits many outstanding tags - (`linux/net/9p/client.c:194-199`, `plan9/devmnt.c:783-800`) with no - in-order reply requirement — and the freestanding targets have a byte - stream even though they have no sockets, which is all 9P asks for. - O6 is the destination. See `9P-19`. - ] - - #note("review", "2026-08-27")[ - One honest caveat against O3: `exportfs` carries 9P and nothing else — its - framing is 9P's own 4-byte size prefix (`exportfs.c:434,476`) — so - multiplexing a second protocol beside 9P on one link has *no* Plan 9 - precedent. It is not hard, but we would be first, and "the transport - becomes someone else's problem" stops being true for that link. - ] -] - -#entry("9P-13", "9P cannot replace FUSE on Linux; it can only join it", state: "decided", tags: ("portability", "privilege", "decisive"))[ - The strongest argument for 9P was that it needs no kernel and no privileged - mount helper: 281 non-test lines of `fuse.zig` exist only to obtain a mount - an unprivileged user is not allowed to make. - - #ev("src/fuse.zig:497-703")[207 lines: `_FUSE_COMMFD`, socketpair, `CMSG_*`/`SCM_RIGHTS`, fork/execve/waitpid of the setuid `fusermount3`, environ rebuild.] - #ev("src/fuse.zig:752-773")[22 more for the helper's unmount, `:933-978` 46 for the mount call, `:1718-1723` 6 for `clearCloexec`. 281 total, measured.] - #ev("src/fuse.zig:64")[and all of it is Linux-only, so macOS (14/21 vtable) and web (6/21) have no control filesystem at all.] - - That argument is dead. The kernel grades mount privilege by a per-filesystem - flag, and the two filesystems are on opposite sides of it. - - #ev("linux/fs/super.c:694-700")[`mount_capable`: without `FS_USERNS_MOUNT` the check is `capable(CAP_SYS_ADMIN)` — and `capable()` is `ns_capable(&init_user_ns, …)`, i.e. root in the INITIAL namespace, not the caller's.] - #ev("linux/fs/9p/vfs_super.c:362")[`.fs_flags = FS_RENAME_DOES_D_MOVE` — v9fs does not set `FS_USERNS_MOUNT`.] - #ev("linux/fs/fuse/inode.c:2004")[`.fs_flags = FS_HAS_SUBTYPE | FS_USERNS_MOUNT | FS_ALLOW_IDMAP` — FUSE does.] - - So `mount -t 9p` costs real root, unconditionally: a fresh - `unshare(CLONE_NEWUSER|CLONE_NEWNS)` does not help, because `mount_capable` - falls back to the init namespace for exactly the filesystems that lack the - flag. `trans=fd` does not help either — it lets an unprivileged process own - the connected socket, but `mount(2)` is checked before the transport is ever - consulted (`linux/fs/namespace.c:3838`). And `9pfuse`, the usual escape, - is FUSE: it needs `fusermount` in `PATH` and reimports the whole setuid dance - in someone else's process. - - #verdict[ - The 281 lines are not overhead. They buy an *unprivileged pathname*, which - is a capability 9P has no way to provide on Linux. `fuse.zig` stays. - - This does not weaken 9P; it relocates it. The two are complementary faces - of one `acmefs.handle`: FUSE is the PATHNAME face — local, unprivileged, - Linux, for `grep` and `make`. 9P is the NETWORK AND IPC face — remote, - unprivileged, every platform, for pardes's own client, for the board, for - the daemon, and for anyone with root who wants `mount -t 9p`. - - Everything downstream follows from this split, and `9P-2` is what makes it - cost nothing. - ] - - #note("review", "2026-08-27")[ - Worth being precise about what survived. The draft's §6 has two halves and - only one of them died. "The client half needs no mount… no kernel - involvement, no privilege" is TRUE and remains the best paragraph in the - document. "The mount is for other people's programs… and it is sufficient" - is where the root requirement lands, and it is not sufficient — on Linux - that mount is strictly more privileged than the one we already have. - ] -] - -#pagebreak() - -= Corrections - -Small, certain, and independent of every argument above. - -#entry("FIX-1", "`acmefs.zig` is wrong about 9P truncation", state: "decided", tags: ("comment", "one-line"))[ - The comment justifying `setattr` says 9P has no truncate-on-open and that - nothing in acme answers a `Twstat` carrying a length. Both halves are wrong. - - #ev("src/acmefs.zig:1097-1100")[the claim.] - #ev("u9fs/plan9.h:150")[`#define OTRUNC 16` — base 9P2000, used at `u9fs.c:1578` and `:1682`.] - #ev("u9fs/u9fs.c:1047")[`Twstat` with a length calls `truncate(2)`; that is how 9P truncates.] - - #verdict[Rewrite the comment. The real reason `setattr` exists is that Linux strips `O_TRUNC` from the OPEN when `FUSE_ATOMIC_O_TRUNC` is not negotiated, which is a FUSE fact and stands on its own without the false claim about 9P. Under a 9P transport, `> body` arrives as `Topen` with `OTRUNC` or as `Twstat`, and maps onto the same `Req.truncate`.] -] - -#entry("DOC-1", "`design.typ` says \"No 9P\"", state: "open", tags: ("docs", "consistency"))[ - The project has already recorded a decision against this, under *What is - deliberately absent*, and the draft neither cites nor rebuts it. - - #ev("docs/design.typ:1969-1971")[«No 9P. The library boundary is exactly where acme put the file server, and the FUSE mount is already that server with a Linux transport instead of a 9P one; a sixth shell could serve `Surface` and `Event` over 9P without touching the core.»] - - Read closely, that paragraph is not hostile — it says *not built*, and its - second clause proposes something stronger than the draft does: serving - `Surface` and `Event`, i.e. `9P-12`'s option 1, which the project apparently - considered plausible enough to write down. - - #q[When `9P-1` settles, this paragraph is rewritten rather than deleted — it should say which layer 9P occupies and why the other one was left alone.] -] - -#entry("9P-14", "Do the daemon's filesystem first, with 16 lines and no 9P", state: "decided", tags: ("sequencing", "cheap", "do-first"))[ - The strongest *stated* motive for putting 9P in the daemon is that a - detached session has no control filesystem. That is true, and it is not a - protocol problem. - - #ev("src/detached/server.zig:563-570")[«no `push_fs_reply`, because this process mounted no /dev/fuse». The daemon simply never calls `fs_service.start`.] - - The fix, counted: a `Source.fuse` variant (1 line), an `fs` field (1), - `fs_service.start` (1), `fsReply` copied verbatim from `tty.zig:1455-1458` - (4), a vtable entry (1), a pollfd and dispatch arm (6), `drain` (2). - *≈16 lines.* And it is *better* there than on the desktop hosts: the - daemon's own `poll(2)` covers `/dev/fuse` directly, so it needs no wake - thread at all (`src/fs_service.zig:127-131`). - - #verdict[ - Build this before deciding anything else. It costs sixteen lines, it - delivers the feature people actually want, and it removes a motive from the - 9P argument so that argument is decided on its merits. If it turns out to - be all anyone needed, that is a good outcome, not a wasted one. - ] -] - -#entry("9P-15", "The honest cost of a 9P stack is ≈1,600-1,900 lines, not ≈770", state: "decided", tags: ("cost", "estimate"))[ - Two independent implementations were measured rather than guessed, and they - agree closely. - - #ev("~/05-genizah/ad/crates/ninep")[12,296 lines total; the irreducible 9P2000 SERVER core is 2,321 non-blank non-comment: codec 704, `Stat`/`Perm`/`Mode`/`WStat` 437, session+fid+flush 615, loop+handlers 474. Fid table alone is 57 lines; the server loop 141; the flush path ≈58; directory reads 50; tests 3,669, i.e. 31%.] - #ev("~/05-genizah/u9fs/u9fs.c")[1,838 lines — NOT the 6,149 the first review quoted, which counted a whole plan9-libc substitute. Its codec, `convM2S` + `convS2M`, is 805.] - - Codec ≈700-800 and server logic ≈1,500-1,900, from both. The earlier - ≈770-line figure was the size of one component. - - #verdict[ - Budget ≈1,600-1,900 core lines plus ≈500 of tests, and say so out loud, - because it *breaks the house rule* (`docs/design.typ:1957-1960`: a change - leaves the file it touches no longer than it found it) unless something is - retired in exchange. `9P-13` says `fuse.zig` cannot be the thing retired. - So this is net growth, and it has to be justified by reach — the board, the - network, macOS, web — not by simplification. - ] - - #note("review", "2026-08-27")[ - Two mitigations that are real. First, ≈970 of those lines are identical in - every layering (`9P-12`), so none of it is at risk from the layering - decision. Second, 296 of ninep's 704 codec lines are macro-generated - (`protocol.rs:809-1154`); Zig `comptime` over an exhaustive message enum - should compress that at least as well, and the message set is the one part - of 9P that never changes. Against that: `ad` needed `UnsafeCell` plus - `unsafe impl Send/Sync` to get zero-allocation parsing - (`protocol.rs:67-76`), which Zig gives for free — so the *hard* part of - their codec is not a cost we inherit. - ] -] - -#entry("9P-16", "Tflush is a park-table lookup, and this is where we beat the prior art", state: "decided", tags: ("protocol", "advantage"))[ - The draft says `Tflush` is the most common omission in hand-written 9P - servers. It understates the problem: the common failure is having it and - still hanging. - - #ev("~/05-genizah/ad/crates/ninep/src/sansio/server.rs:767-819")[`ad` gets the ORDERING right in 39 lines — an Rflush for an in-flight tag is chained and sent only after the original replies, matching `lib9p/srv.c:241-266`.] - #ev("~/05-genizah/ad/crates/ninep/src/sync/server.rs:163-164")[and then `Serve9p::flush` defaults to a no-op, which `ad` never overrides. A client flushing a blocked `event` read gets no Rflush until an unrelated editor event happens to arrive. Interrupts and unmounts hang exactly as the draft warns, *despite* Tflush being "implemented".] - - #verdict[ - pardes is structurally better placed than either reference. The 32-slot - park table (`src/fuse.zig:789`) is already keyed per outstanding request, so - `Tflush` is a lookup, a reply to the original, and a reply to the flush — - the same path `FUSE_INTERRUPT` already takes, which is tested - (`src/fuse.zig`: "interrupt answers the original with EINTR and drops it"). - Implement it against the table, not against a filesystem callback, and the - class of bug `ad` shipped is unrepresentable. - ] -] - -#entry("9P-17", "Clamp Rread to the client's count, or Linux hard-fails the read", state: "decided", tags: ("protocol", "correctness", "trap"))[ - A trap with no analogue in FUSE, which is why nobody looks for it. - - #ev("linux/net/9p/client.c:1475-1479")[`if (rsize < received) { pr_err("bogus RREAD count"); *err = -EIO; }` — an Rread longer than the `count` asked for is a HARD ERROR, not a truncation.] - #ev("~/05-genizah/ad/crates/ninep/src/fsys/event.rs:116-122")[`ad` clamps replies to `msize` (`protocol.rs:1011-1018`) but never to `count`, and its `event` file concatenates every drained event and returns the lot. Under a kernel mount that is `-EIO`.] - - #verdict[ - Every reply path clamps to `min(count, msize - 11)`. This interacts with a - decision already made the other way: `acmefs` refuses a read smaller than - one event record with `EINVAL`, on the grounds that half a record silently - desynchronises a client (`docs/acme-fs.md`). That rule stays and is now - load-bearing for a second reason — it is what makes "clamp to count" - safe on `event`, because a record is either whole or refused. - ] -] - -#entry("9P-18", "The spec-bug checklist, taken from someone else's git history", state: "open", tags: ("testing", "gift"))[ - `ad` shipped and then fixed each of these. They are the test list for - `src/ninep.zig`, in roughly the order they will bite. - - #ev("~/05-genizah/ad/crates/ninep/src/sansio/server.rs:335-338")[the scar they left in the source: «Spec: first element failure must be Rerror, not Rwalk with zero qids».] - - Partial walks (`09334ce`); `Tcreate` of `".."` (`bcb05d9`); write-then-remove - (`1c8ae96`); create permission masking (`3ccc461`); open with truncate - (`f0c71be`); remove-on-close (`6471cd3`); the root qid's name being `"/"` - (`64f2f4b`); the default `aname` (`b3a2c8b`, `ce7ebc6`); exclusive files - (`135190c`); clearing the fid cache on clunk (`113b053`); fid open state - (`22041ab`); flush tracking (`7170e6a`, `5a6b5bf`). - - #q[Most of these are `Tcreate`/`Tremove` bugs, and a synthetic tree could simply answer `Rerror` to both — the draft's §9 already argues our trees are invented and have no cases we did not choose. Does `new/` need real `Tcreate`, or is walk-to-create enough as it is under FUSE?] - - #note("built", "2026-08-27")[ - *Answered, and most of the list is moot.* `new/` creates a pane on WALK - (`src/acmefs.zig:901-919`), so the capability exists and is not spelled - `Tcreate`. The server answers `Rerror` to both `Tcreate` and `Tremove`, - which takes the create-permission-masking, create-`..`, remove-on-close and - write-then-remove bugs off the table entirely — four of `ad`'s twelve. - `Tremove` still clunks the fid first, because remove(5) says the fid is - invalid even if the remove fails. - - Of the rest, the partial-walk rule and the flush tracking are implemented - and tested by name; the root qid's name is `"/"`; the fid cache is cleared - on clunk and the release the core is owed is issued there. - ] -] - -#entry("FIX-2", "The board's free-heap comment is two refactors out of date", state: "decided", tags: ("comment", "board", "one-line"))[ - #ev("src/esp32p4.zig:470-473")[says 9,128 bytes free at 80×24. That was measured before `direct_emit` (`:870`) sized vaxis's two shadow grids to one cell.] - #ev("05-zig-p4/experiments/report.typ:848-849,877-880")[the heap now reports ≈336 KB free, and `.bss` in the 240 KiB low L2MEM is the binding constraint instead.] - - #verdict[ - Fix the comment and name the new constraint, because the stale number was - load-bearing in an architecture review — it is the reason a 9P server on - the board looked impossible when it costs 2.5% of free heap. A stale - measurement in a comment is worse than none: it gets quoted. - ] - - #q[The `report.typ` figure of "336 KB at every geometry tried" cannot be literally true across the 62,480-byte swing between 56×14 and 80×24 at 55 B/cell. One boot and one `MARK PARDES_HEAP` line closes it.] -] - -#pagebreak() - -= Direction - -The four entries below were written after the owner rejected the first -synthesis as directionless and stated the goal himself: *"make it overall -simpler, and more transparent to scripting and integrating over the network, -and that could unlock some interesting things like chaining a pardes to -another — right now these kinds of things are complex and ad hoc."* - -Three of those four are achievable. One is not, and `9P-20` says which. - -#entry("9P-19", "Bidirectional 9P is one role per CONNECTION, not one role per message", state: "decided", tags: ("protocol", "mechanism", "correction"))[ - The owner's objection to the first review: *"you said the server can't - initiate a message, but since the daemon and the app both could have a client - and a server, they could communicate bidirectionally."* He is right, and the - mechanism is better than either of us described. - - The tempting reading is a double-role link: both ends run a server and a - client on one descriptor, demuxing on the message-type parity, which 9P makes - possible for free. - - #ev("u9fs/fcall.h")[`Tversion = 100, Rversion, Tauth = 102, Rauth, …` — T is even, R is odd, so a receiver can always tell a request it must serve from a reply it is owed.] - - That reading is available and *nobody has ever built it*. - - #ev("drawterm-9front/exportfs/io.c:132-163")[`io()` is a pure server loop: read a T-message, dispatch through `fcalls[type]`, reply. It never emits a message that is not a reply. Plan 9's `exportfs` is the same (`exportfs.c:510-515`), u9fs is the same, and v9fs and `devmnt` are pure clients. No implementation anywhere demuxes two roles on one descriptor.] - - What ships instead is better, because it needs no invention at all: - - #ev("drawterm-9front/cpu.c:119-192")[drawterm DIALS OUT to the cpu server, writes a shell script, and then calls `exportfs(fd, fd)` — *the dialer becomes the server on the socket it dialed*.] - #ev("principia-softwarica/networking/misc/cpu.c:448,459-463")[the script the remote runs is `mount -nc /fd/0 /mnt/term`, then it opens `/mnt/term/dev/cons` as its stdin and stdout. The remote is the CLIENT.] - #ev("drawterm-9front/kern/devdraw.c:1323-1326")[so when the remote application draws, the bytes cross as *the application's `Twrite`* to `/dev/draw/N/data`, and the terminal — the machine with the screen — executes them as a server.] - - One descriptor, roles fixed per side, data flowing both ways. There is no - server push because none is needed: *the frame producer is the client.* - - #verdict[ - The rule for pardes, and it is the whole architecture in three lines: - - / display: #[the FRONTEND is the server (it owns the screen), the CORE is the client. The core `Twrite`s frames to `screen` and blocking-`Tread`s `input`. This is `cpu` verbatim.] - / session: #[the CORE is the server (it owns the windows), scripts and other instances are clients.] - / devices: #[the BOARD is the server (it owns the memory and the pads), the core is the client.] - - Three connections, one role each, and the program contains both halves. Do - NOT build a double-role single-descriptor link: no precedent, a `Tversion` - ordering hazard where each side must answer the peer's version while - awaiting its own, and `trans=fd` wants separate read and write descriptors - anyway. - ] - - #note("mechanism", "2026-08-27")[ - Two numbers that make the display path credible, both of which the first - review got wrong by assuming a push. Chunking is a non-issue: payload per - message is `msize − P9_IOHDRSZ` = 131,072 B at Linux's default - (`client.h:23`, `9p.h:364`), so every real frame — 20 B, a 56 B keystroke - diff, a 6,298 B full board frame, a 27 KB desktop frame — is ONE `Twrite`, - and even the 1,703,936 B worst case is 13. And the core need not block: - tags are allocated per outstanding request with no in-order reply - requirement (`client.c:194-199`, `devmnt.c:783-800`, and `exportfs` - deliberately answers out of order via slave procs, `exportsrv.c:408-520`). - pardes needs no slave procs — `Status.again` plus the park table is the - same thing done single-threaded. - ] - - #note("mechanism", "2026-08-27")[ - Copy the file discipline rather than inventing one. `/dev/draw/N/data` is a - write-only batched binary command stream (`devdraw.c:1323-1326`) with an - exclusive `ctl` (`:1047-1051`); `/dev/mouse` is an exclusive single-reader - file whose read blocks until something happens (`devmouse.c:96-98,150-158`). - That is exactly `screen` and `input`, already designed, already debugged, - and already the shape `event` has in `acmefs`. - ] -] - -#entry("9P-20", "\"Simpler\" is false in lines and true in concepts — argue reach instead", state: "decided", tags: ("cost", "honesty", "framing"))[ - The owner's first criterion was that 9P make the codebase *overall simpler*. - Measured, it does not. This entry exists so that nobody argues otherwise - later, including us. - - The baseline: *nine* IPC mechanisms, *four* framings, *three* discovery - schemes, *two* version-negotiation schemes and one mechanism with none. - - #ev("src/nested.zig")[743 lines to deliver ONE line. By region: 255 transport, 158 ancestor discovery, 43 `sendLook`, 232 tests, 30 header — and the FEATURE is ≈12 lines (`:301-306` format, `:507` filter). Ratio feature-to-transport ≈ 1:24.] - #ev("src/detached/wire.zig")[contains ZERO syscalls — no `socket`, `bind`, `accept`, `poll`, `read` or `write` anywhere. It is a pure codec into caller buffers, so calling 789 of its lines "transport" was wrong: they are the definition of what may be said. 9P replaces its 5-byte length prefix with a 4-byte one.] - - Six concepts are genuinely duplicated across the mechanisms, and the - duplication is real: endpoint-path derivation 82 lines across 6 copies; - directory create-and-vet 105 across 6; stale sweeping 112 across 3; - bind/listen/accept 213 across 3; "which instance?" 231 across 3; version - negotiation 56 across 2. *799 lines, of which ≈330 is recoverable.* - - #ev("src/fs_service.zig:37-55")[the comment there is right on the facts and wrong on the conclusion: `parentFrom` and `nested.socketDir` differ ONLY by appending `/pardes` under `$XDG_RUNTIME_DIR` and coincide verbatim under the HOME fallback. And there are two liveness oracles for one question — `kill(0)`/ESRCH at `nested.zig:401` and `fuse.zig:742`, `connect`/ECONNREFUSED at `server.zig:1940-1942`.] - - #verdict[ - Could delete ≈850 lines (`nested.zig`'s transport and its socket tests, - 518; the net collapse of duplicated plumbing, ≈330). Could not delete - ≈7,700 — `fuse.zig` 2,709 (`9P-13`), `wire.zig` 1,705, the daemon's host - half, the 158-line ancestor walk that answers a question 9P has no message - for, and every kernel interface that was never a protocol choice (inotify, - pty, pipes, `mkstemp`). - - Against a 1,600-1,900-line 9P stack (`9P-15`): *net growth of +750 to - +1,050 lines.* - - So: strike "simpler" from every argument. What IS true, and is worth - saying, is that the CONCEPT count falls — four framings to two, three - discovery schemes to two, two version schemes to one, six duplicated - concepts to one copy each. Fewer ideas, more lines. Say exactly that. - ] - - #note("contra", "2026-08-27")[ - The strongest form of the objection, and it should stay on the record: the - three mechanisms do not share a problem. `nested`'s format is twelve lines - *because* it reuses a language pardes already speaks — the file says so at - `:14-16`, "no serialization, nothing to version". `wire`'s codec is 1,167 - lines because it carries a 1.6 MiB worst-case RLE grid at one message per - frame. `acmefs` is 2,324 because it is acme's semantics. The general thing - costs ≈970 lines before saying anything specific to pardes, and each of the - three still needs its specific part afterwards. - ] -] - -#entry("9P-21", "The lost compile-time invariant, which nothing else prices", state: "open", tags: ("cost", "correctness", "unpriced"))[ - The best objection found against the whole direction, and no other entry - costs it. - - #ev("src/detached/wire.zig:23-27")[«every union and every enum gets a tag chosen HERE … so reordering `Event` or `CellStyle.ul` cannot silently redefine the protocol. The mapping switches are exhaustive: adding a variant to the core is a compile error in this file, which is the point of them.»] - #ev("src/detached/wire.zig:1199-1265")[and a test enumerates the eleven legal client tags by name under the rule "A HUMAN DID IT", asserts the enum holds exactly those, and asserts the other 250 tag bytes answer `BadTag` — so a frontend built before a change cannot forge a pane's output into a session built after it.] - - Under a `ctl`-file grammar, input arrives as `Twrite` payload bytes. 9P's - codec validates 9P; it cannot validate that a byte string is a legal `key`. - An exhaustive switch checked by the compiler and a 250-byte refusal test - become a runtime string parse with nothing to bind to. - - #ev("src/host.zig:44-52")[a related loss: fourteen of twenty-one vtable methods are `push_` and return nothing, because "a push with an answer would have N answers and no way to pick one". 9P answers every T with an R, so each acquires a tag, a reply, and a matching obligation.] - - #q[Three candidate answers, none costed yet. (a) Keep the typed wire for input and use 9P only for control and text — accepts two protocols forever. (b) Make the `ctl` grammar generated from the same enum, so the exhaustive switch survives as a parser generator and adding a variant is still a compile error. (c) Accept the loss and buy it back with a fuzz test over the grammar. (b) looks best and nobody has tried it.] -] - -#entry("9P-22", "The real gap: pardes cannot ask another pardes anything", state: "decided", tags: ("direction", "motivating-case"))[ - This is the entry the whole file was missing, and it is the owner's own - criterion stated precisely. - - Two instances of pardes can do exactly two things to each other today. - - / Shout: #[`nested.sendLook` formats `Look <path>`, connects, writes, returns `true`, and NEVER READS (`src/nested.zig:294-330`). The receiver filters for the one legal verb and closes (`:466-510`). The test at `:652-702` exercises the whole protocol and asserts that nothing comes back.] - / Become: #[`Attach` is not a connection, it is a replacement. Only on a successful handshake does the frontend reap its pane shells, close its watches, unmount `--fs`, *deinit the core*, and enter the thin loop (`src/detached/client.zig`, `docs/detached.md:207-213`). The local core is destroyed, not linked.] - - Everything else is out of reach. Nothing in `src/` reads `PARDES_FS`; `Event` - has no variant for a peer; `Host.VTable`'s 21 methods have no peer method. - Reading another session's text is possible only by shelling out — - `Exec cat /run/user/1000/pardes/<other-pid>/1/body` — which is Linux-only, - opt-in behind `--fs`, requires already knowing the pid, and is mediated - entirely by `/bin/sh`. And it fails outright against a detached session, - which serves no filesystem at all (`src/detached/server.zig:566-570`). - - #verdict[ - *The direction is a reply.* - - pardes has no request/response channel to anything that is not the kernel. - `nested` is one-way by construction. The detached wire forbids a round trip - inside `update` by design (`wire.zig:64-70`). `acmefs` has request/response - and cannot leave the machine (`fuse.zig:64`, `9P-13`). - - 9P is a request/response protocol that crosses machines, and that single - property is what the other three cannot be extended to have. Every good - thing on the list — scripting from macOS, driving a session over a network, - reading the board's memory, chaining one instance to another without - destroying either — is the same feature: *being able to ask, and get an - answer back.* - - That is the justification. Not simplification (`9P-20` forbids it), not - elegance, and not symmetry. - ] - - #note("direction", "2026-08-27")[ - The measure of success, so this can be checked rather than admired: after - the work, `Attach` should have a sibling that CONNECTS instead of - replacing — two live cores, each able to walk the other's tree — and the - twelve-line `Look` sentence should be a `Twrite` to the other instance's - `new/` on a connection that can also answer. If those two things are not - true at the end, the protocol was adopted for its own sake. - ] -] - -#entry("9P-23", "The host vtable stays; 9P is one implementation of it, for remote hosts only", state: "decided", tags: ("architecture", "scope-limit"))[ - The grand version of the direction was that `Host.VTable` becomes a tree the - core mounts, so that the downward seam and the outward seam are the same kind - of thing. Measured, that is wrong for every LOCAL host and right only for - remote ones. - - #ev("src/host.zig:52-140")[the seam is 21 methods: 15 `push_` and 6 `pull_`, with the prefix compiler-enforced (`isPull`, `:265-274`) — a `push_` returning non-void does not build.] - - The blocking objection turns out to be nearly empty. Of the six `pull_` - methods, three are ALREADY asynchronous — `pull_read_clipboard`, `pull_lsp` - and `pull_pipe` return `void` and their answers arrive as `Event.paste`, - `.lsp_resp`, `.pipe_resp` (`src/pardes.zig:6896-6907`). `pull_wait_input` - cannot become an event because it is how events arrive. That leaves two: - `pull_gpio_toggle`, whose answer is only used to set a message row - (`builtins.Board.gpio`), so deferring it a frame is invisible; and - `pull_tty_taken`, which is reached from `takesCommandLine` - (`pardes.zig:6465-6469`) at four call sites, two of which loop over all 16 - panes — 16 probes per call, collapsing to ONE read if `proc` is a single file - of sixteen lines rather than `proc/N/status`. - - So the core could be a 9P client without blocking. It should not be, locally: - - #ev("per-host measurement")[bodies replaced by an estimated 9P server, per host: tty 345 → ≈225 but *+204* with the tree and `ctl` grammars; gui *+204*; detached server *+182*; macos *+164*; web *+142 Zig plus ≈500 lines of JavaScript*; board *+59* and 8,832 B of RAM. *No host gets simpler.*] - #ev("src/web.zig:356-391")[and web gets actively worse than the count shows: `present` today writes a flat `WebCell` array that JavaScript reads *directly out of wasm memory* across four `extern` declarations (`:330-340`). Under 9P that zero-copy array becomes an RLE stream JS must decode, and wasm32 has no sockets, so JS must carry a 9P codec too.] - #ev("src/esp32p4.zig:127")[the board is worse still in kind: its "host" is the same process behind a C-ABI function pointer, so a `Twrite`/`Rwrite` pair per frame is pure protocol overhead against a direct call.] - - #verdict[ - `Host.VTable` is already the abstraction — `docs/design.typ:1964-1965` says - the surface IS the abstraction and refuses a render layer over the shells. - A tree would be that layer. - - So: a 9P host is *one more implementation of the existing vtable*, chosen - when the display is on the other end of a wire, exactly as `9P-2` makes a - 9P transport one more implementation of the filesystem seam. Local hosts - keep the direct call and pay nothing. The two seams stay two seams; what - they gain is a second backend each. - - That also settles `9P-19`'s scope: the core is a 9P client of its display - only when the display is REMOTE — a detached frontend, or a board acting as - a terminal for a full core elsewhere. Never for the window in front of you. - ] - - #note("correction", "2026-08-27")[ - Fact correction for anything quoting the earlier tally: `tty` and `gui` - fill *19* of 21, not 20 — `src/detached/server.zig:558-559` already says - "NINETEEN each". The 20 figure was wrong by one and is superseded here. - ] -] - -#entry("9P-24", "A dead descriptor left in a poll set is a whole core, forever", state: "landed", tags: ("bug", "lesson"))[ - Found by an adversarial pass over step 1 after it was committed and after the - happy path had been demonstrated with the project's own example clients. It is - recorded because the shape recurs, not because the fix was hard. - - Step 1 put `/dev/fuse` in the daemon's `poll(2)` set whenever the mount - existed, and gave `Source.fuse` an empty arm on the grounds that being in the - set was the whole point. - - #ev("linux/fs/fuse/dev.c")[`fuse_dev_poll` answers `EPOLLERR` once the connection is gone — and POSIX reports `POLLERR` whatever the `events` mask asked for, so an empty arm cannot decline it.] - #ev("src/fuse.zig")[`pollLoop`, the mount's own poll thread, has carried `if (revents & (ERR|HUP|NVAL) != 0) return;` all along. That is why the tty and SDL shells never showed this and the daemon did: they never poll the descriptor themselves.] - - So an external `fusermount3 -u`, a sysfs abort, or systemd taking - `/run/user/$UID` away at final logout — *exactly the moment a detached session - is supposed to keep running* — made `poll(2)` return instantly and forever. - Measured on the committed change: 0 CPU ticks over 10 s idle, then 1000 ticks - over the next 10 s. After the fix, 0 ticks over 8 s in the same scenario, with - the process alive and in state `S`. - - #verdict[ - Gate the insertion on `!f.dead` and let the arm consume `POLLERR`/`POLLHUP`/ - `POLLNVAL` by marking the mount dead. Both, not either: the gate is what - ends the spin, and the arm is what saves the one spinning round before - `Fs.next`'s first failed read would have set the flag anyway. - - The general rule, which is the reason this entry exists: *a descriptor - added to a shared poll set needs an error arm even when it needs no data - arm.* An empty arm is a decision about `POLLIN` only, and the kernel does - not ask permission before reporting `POLLERR`. - ] - - #note("review", "2026-08-27")[ - Worth noticing how it was caught. The feature was demonstrated working — - `pardesctl panes`, `new`, `send`, `body`, `del` against a live daemon — and - the bug was nowhere near the happy path. It took an adversary told to - *assume the happy path works and look elsewhere*, who then went and measured - `/proc/<pid>/stat` before and after an unmount. Four of that pass's other - seven findings were false comments rather than false code, which in this - codebase is the same severity: the comments are how the next change is made. - ] -] - -#pagebreak() - -= After the build - -Five steps shipped, and the shape of what is left is not the shape the note -predicted. These entries are written from the tree as built, not from the plan. - -#entry("9P-25", "The tree behind the server is pluggable, and that was not planned", state: "decided", tags: ("architecture", "windfall"))[ - `Server` is `pub fn Server(comptime fs: type) type`, duck-typed on exactly - `fs.Req`, `fs.Reply` and `fs.Reply.Attr`. That shape was chosen for a boring - reason — importing `acmefs.zig` drags `pardes.zig` into `zig test` — and it - turned out to be the most useful thing in the file. - - #ev("src/acmefs.zig")[filesystem one: the acme control tree, 9 ops.] - #ev("src/board9p.zig")[filesystem two: 867 lines that re-declare the same `Op`, `Status`, `Req`, `Reply` and `handle`, and are served by the same `Server` with no translation layer at all.] - - So "serve X over 9P" is no longer a protocol question. It is: write a - `handle()` over nine operations, and get a wire, a fid table, directory - cursors, `Tflush`, error strings and both freestanding targets for free. - - #verdict[ - Treat `Server(fs)` as the extension point it accidentally became, and say so - where someone will look. Candidates that are now cheap and were never on a - list: the LSP surface as a tree, a session dump as a tree, the config as a - tree. None of them needs a line of 9P. - - The discipline that keeps this from becoming a plugin system: nine - operations and no tenth. A filesystem that wants a tenth wants an API. - ] -] - -#entry("9P-26", "What is cheap now, ranked, and step 6 is not first", state: "open", tags: ("sequencing", "next"))[ - Step 6 — a remote display serving `screen` and `input` while the core is its - client — is cheaper than it was, because its one hard prerequisite is done: - `Client` exists, is 152 bytes, and blocks nowhere. And `board9p` proved that - writing a second filesystem behind `Server(fs)` is a day's work, which is - exactly what a `host` tree would be. - - But four things are now cheaper than step 6 AND serve the stated goals more - directly. Ranked by value over cost: - - / A serial transport for the client: #[the board image exists and speaks 9P on UART0; `src/fs9_client.zig` speaks unix sockets. One transport away from the motivating case being real, and it is the smallest item here.] - / TCP: #[`fs9_service` and `fs9_client` are `AF_UNIX` only. "Integrating over the network" was one of the four stated goals and it is currently a socket family, not a design problem.] - / macOS and the browser: #[step 4's entire portability argument — that a 9P server needs no kernel — is UNEXERCISED. Nobody has run `9pfuse` against the socket on macOS, and the web build has no client. This is the payoff that justified the growth in `9P-20`, and it is closer to zero code than anything else on the list.] - / Aggregation: #[unblocked, see `9P-10`'s note. Serves "chaining a pardes to another", which is the goal `9P-22` named as the whole point.] - - #q[Step 6 also changed SHAPE, and the note should be rewritten before it is built. It was sold as "the board stops being a shrunken pardes and becomes a terminal for a full core". What got built is the INVERSE: the board is a 9P server of its own devices and the desktop is the client. Both are useful and they are different images. Which one is step 6 — and is a board that shows a remote core's screen worth an image, now that a board that exposes its pins is already flashed?] - - #note("scope", "2026-08-27")[ - Unchanged by any of this: `9P-23`'s measurement. Local hosts keep the direct - vtable call, because a tree costs tty and gui about +204 lines each and the - web shell +142 Zig plus ≈500 JavaScript. Step 6 is remote displays only, and - the moment it is argued for the window in front of you, that number is the - answer. - ] -] - -#entry("9P-27", "What three adversaries found in steps 3, 4 and 5", state: "landed", tags: ("bug", "lesson", "review"))[ - Steps 1 and 2 were reviewed and the pass found a 100%-CPU spin in the smallest - change of the chain (`9P-24`). Steps 3, 4 and 5 — 1,005, 9,158 and 3,535 line - diffs — were verified on the happy path and shipped unreviewed. Three agents, - one per step, told to assume the happy path works and look elsewhere. - - Eight defects. Six fixed, five reproduced with measurements before and after. - - / Remote crash of the whole daemon: #[`Server.push` takes nothing once `startFrame` gives up on the framing, and `fs9_service.fill` asserted it took everything. One `size[4]` of zero plus one later byte reached `unreachable` — every pane, every frontend and the FUSE mount gone. The same stuck buffer separately made `room == 0` return without reading while poll reported ready forever: *99.7% of a core*, in one `write(2)`, from any process with the uid.] - / A 177-second freeze of the editor: #[`fs9_client.connect` ran `connect(2)` on a still-BLOCKING socket, before `setNonblock` and before the deadline existed. On AF_UNIX a full accept backlog waits in `unix_wait_for_peer` for `sk_sndtimeo`, which is forever, and the core is single-threaded. Measured at *177.3 s*, ending only because the peer was killed. Now 2.03 s, the budget.] - / A 64 KiB pty read wiping the queue: #[`queue_cap` is 65536 and a record must fit in `queue_cap - 4`, but every host reads a pty master with a 64 KiB buffer and a single read really returns 65536 on Linux. The eviction loop then emptied the queue and dropped the new record too, silently. Deterministic, not a race.] - / Four silent sockets denying `--fs9` forever: #[nothing took a slot back, and there are four. `version(5)` requires `Tversion` first and `msize == 0` already meant "has not versioned", so the frontend transport's own five-second rule applied unchanged.] - / EMFILE spinning a core: #[`accept` treated every failure as EAGAIN, but EMFILE leaves the connection in the backlog and poll is level triggered. *99.8% of one core.*] - / `max_fids = 32` refuting the step's own acceptance clause: #[a mounting client keeps a fid per cached inode, and `docs/9p.typ` §12.4 makes `9pfuse` the proof. At 32, `find` produced *57 consecutive `Rerror`s*. Now 256 for a host and `board_fids` 32 for the board.] - - #verdict[ - Three of the six are the SAME defect as `9P-24`: a descriptor left in a - level-triggered poll set with no error arm, or a wait with no deadline. That - is now four instances across five steps, every one of them a whole core or - a frozen editor, and every one written by someone who had just read the - previous one. - - So make it a rule rather than a lesson: *every descriptor this project adds - to a poll set needs an error arm, and every wait needs a deadline set before - the thing it is waiting on can begin.* Both are checkable by reading, and - both were missed by authors who knew the rule. - ] - - #note("method", "2026-08-27")[ - Two observations about the reviewing, worth more than the bugs. - - The instruction that worked was *"assume the happy path works — it has been - demonstrated live — and look everywhere else."* Every finding came from - somewhere the demonstration could not reach: a peer that stalls, a mount - that is torn down, a buffer at exactly its limit. The demonstrations were - all real and all passed, and none of them would ever have found any of this. - - And the reviewers were told to *measure*. Every serious finding arrived with - `/proc/<pid>/stat` before and after, or a wall-clock figure, or a count of - consecutive errors. A report saying "this could spin" would have been argued - with; "998 jiffies per 10 s against a 0-jiffy baseline, here is the script" - could not be. The cost of asking for that was a reviewer that took forty - minutes instead of ten. - ] - - #q[Two findings are NOT fixed and should be. A parked `pty/data` read whose client is gone keeps consuming the queue destructively — measured as 34% of a pane's output going nowhere on a long-running daemon, with the trigger not isolated in 23 attempts. And a `Tclunk` does not sweep park slots on the fid it retires, so a `close(2)` with a read in flight strands the tag forever; 32 of those and the connection can never serve a blocking read again. Both are reachable by ordinary client behaviour.] -] diff --git a/docs/render-pipeline.md b/docs/render-pipeline.md new file mode 100644 index 00000000..9d41f7fa --- /dev/null +++ b/docs/render-pipeline.md @@ -0,0 +1,915 @@ +# pardes render pipeline: one frame, one clock, one order + +Status: DESIGN, FINAL (draft 2 plus the adversary's two convergence fixes; converged with the adversary; the adversary's 17 objections to draft 1 are folded in, each marked "draft-2 fix" where it changed the design). Nothing here is implemented. Line numbers are +the working copy of 2026-09-28 (`losuylsy`, mid tag→Text refactor; they drift). + +Goal, in the user's words: an algorithm for the ordering of rendering, how each +part is selected and joined, the shader passes after that, and one animation +model. Consumers: the lapis theme (shader effects on specific parts), multi-line +tags, the full-screen post pass (now Shadertoy-compatible), images/PDF, and +animations. Added requirements: a game-quality GUI effects catalogue, a separate +terminal effects track (audit + new cell-native effects), and a motion / colour / +performance / "feel" discipline. + +--------------------------------------------------------------------------------- + +## 1. Today's frame, end to end + +### 1.1 Who drives a frame + +`Pardes.pump` (pardes.zig:4607) is the only loop body every shell runs: +`wait_input(timeout = animationActive ? 16 : 0)` → queued events → `update` → +effects → `poll_frame` → **skip unless `needs_frame or animationActive()`** → +`frame_arena.reset` → `render` → `present` → `needs_frame = present_skipped` → +`post_present`. + +Ticks (`Event.tick`) are produced by six different clocks: + +| shell | who ticks | cadence | +|---|---|---| +| tty | `tickWatch` thread: nanosleep 16 ms **after** the wait asked, then `postEvent(.tick)` (tty.zig:1513) | 16 ms + frame time: drifts slow, worse over ssh | +| gui | `AnimationClock.due` in `postPresent` re-arms `now+16ms` (gui.zig:203, 221, 4095) | a tick only once ≥16 ms have passed since the re-arm: at 144 Hz every 3rd frame (20.8 ms) → animations ~25% slow; at 120 Hz every 2nd; a slow frame slows them further | +| gui grid mode | every `poll_frame` while active (gui.zig ~4114) | as fast as the loop | +| web | JS rAF fixed-step bank, capped (app.mjs:566) | correct average rate, always ticking | +| macOS | `spendTickTime` bank (macos.zig:868, 1549) | correct average rate | +| detached server | after a timed `poll` (server.zig:816, 828) | ≥16 ms | + +So the same animation runs at different speeds per shell. Everything counts +16 ms frames (`layout.Animation.frame_ms`, layout.zig:2041). + +Acknowledgement is also per shell: tty `postPresent` acks the tracks it drew +(tty.zig:1187), GUI acks then ticks (`finishPresentedAnimationFrame`), grid mode +acks `&.{}`, macOS acks via `pardes_frame_presented`, **web never acks**. + +### 1.2 Core render (`Pardes.render`, pardes.zig:5950), in code order + +1. `File.refreshHighlights`; size the grid; reset cursor/pointer shape, **clear + every cell's hover bit** (5979 — stale state that exists only because paint + passes do not own their output), zero layers/images/tracks. +2. Fill the whole screen with `chrome.border` (5991). +3. Per pane: `collectNotices` → `renderPane` (6580): `clearRect` + page fill + ("two full passes over every cell in the pane", 6596) → grip → `paintPaneTag` + → PDF / image / `renderBody` (+scrollbar) → `renderBodyLayer` (body_layer.zig:243) + which **renders the whole body again** into a temporary Surface by + `std.mem.swap(Surface, &p.surface, &temporary)` (body_layer.zig:266-272). +4. Notice chips painted on the grid (6000-6065). +5. Workspace tag, column tags, their hover word and header selection/caret on + the grid (6068-6155). +6. `renderTagLayers` (6396): **paints every pane tag a second time** into a + temp Surface via the same swap (6414-6419); builds notice layers (re-deriving + chip geometry, text, caret the grid pass already computed) and column / + workspace layers (`renderHeaderLayer` 6520, which re-does hover and header + selection). +7. Drag overlays (`overlayDash`, glyph-only rewrites, 6158); the column-move + rail shrinks layer viewports by one cell so the rail stays visible. +8. Debug box (6244). +9. `presentation.submit` (6301): tracks, previous grid, per-cell diffs. +10. `composeAsciiTransitions` (6305): character effects composed in the core + into an arena copy of the cells. + +Implicit orderings that matter and are written nowhere: body layers before tag +layers (notice chip over a context band); images after cells, which is why an +image pane "gives up the rows" under its notices (6629) instead of having z; +tag layer array index order (panes, columns, workspace, notices) is paint order. + +### 1.3 Surface: what the shells get (surface.zig) + +`cells` (the canonical grid), `cursor`, `pointer_shape`, `images` +(`ImagePlace`, with `patch` rows), `body_layers[16]` (compact context rows + +body rows), `tag_layers[MAX_TAG_LAYERS]` (one row each; the tag refactor just +added `line` — one layer per tag line), `panel_tracks`, `previous_*` + `cell_diffs` +while a transition needs them, `mark_hover` (a flag that makes `Surface.at` +set `cell.hover`, 378-385 — a side channel for macOS glass). + +### 1.4 Shells + +- **tty** (tty.zig:1100): `panel_compositor.compose` rewrites cells for + slide/zoom/dissolve/vertical → `paintCells` (win.clear + every cell) → kitty + images (hidden while geometry moves) → cursor → `vx.render` (vaxis diffs + against its last screen, wraps in sync 2026). Layers are ignored. +- **gui** (`renderFrame`, gui.zig:5035): one render pass. `makePaintPlan` + (2048) = one batch per active track + static batch. Per batch: grid cells not + covered by a layer (`coverLayers` 5656) → body layers → tag layers → previous + layers/cells for transitions → that batch's images. Then the overlay + (`buildOverlay` 7258: pet, topbar rule, column rule, bottom fill, pane chrome + 7468, grips 7543, bar cursors, touch). Then optional crt pass scene_tex → + swapchain (5439). Cell = one instance drawing bg + glyph (ui.frag.glsl). +- **web**: DOM spans for the grid + absolutely positioned divs for tag and body + layers. No images, tracks, scene; never acks. +- **detached** (wire.zig, `version = 7`): cells + body/tag layers, delta coded. + A GUI attached client has `core == null` → no pane chrome (appendPaneChrome + reads `core.rects`): a per-shell divergence caused by the shell reading core. +- **macOS** (out of scope): its own copies of tag/body layer ABIs, its own + tick bank, Metal crt. + +### 1.5 Duplicated logic, smells, bugs + +1. Paint twice: pane tags (grid + layer), bodies with context rows (grid + layer), + notices (grid + layer, text/geometry/caret recomputed), workspace/column tags + and their hover/selection/caret (grid + layer). The two copies already + disagree: a notice layer highlights the hovered word, the grid chip does not; + the column-tag grid hover is suppressed during `column_move`, the layer's is not. +2. `std.mem.swap(Surface, &p.surface, …)` as the way to "paint into something + else": every paint function writes `p.surface` directly. +3. Geometry recomputed everywhere: `tag_y = if tag_bottom …` appears in + renderPane, paintPaneTag, renderBody, renderTagLayers, appendPaneChrome, + taglineBaseRgb; `bodyTop`; BOX_H == 1 assumed throughout (multi-line tags + break all of these). +4. The GUI infers semantics from painted cells: scrollbar thumb from + `cellBackgroundIs(scroll_thumb)` (7468ff), topbar rule from "row 1 has a + tagline cell" (5509), bottom band (5519), grips from tagline cells + (`paneGripCell` 5872), focus tint recomputed from `core.active` + (`taglineBaseRgb` 5609). Any theme where two roles share a colour breaks it. +5. Six clocks (1.1), four ack sites, and a web that never acks. +6. `animationActive` (5884) is true while crt/ripple/glitch are on → the whole + core render (double paints included) and `capturePrevious` run every 16 ms + for a time-only uniform. +7. `acknowledge(&.{})` → `capturePrevious` memcpys all cells and all layer + cells on **every idle presented frame, even with `panel_transition = .off`** + (layout.zig:283-290). +8. A lingering message (`message_linger_ms`) keeps `needs_frame` true every + tick for its whole linger (Messages.zig:238-250): seconds of full 60 Hz + renders that change nothing. Look-hover delay likewise ticks every frame. +9. `Animation.Transition.retarget` (layout.zig:2064) restarts from the displayed + value with step 0: position continuous, velocity snaps to zero. +10. Colour fades mix sRGB bytes (`interpolateRgb` layout.zig:2111, + `Messages.blendRgb`, `colors.mix`): muddy mid-fades. +11. Shell-side animations each have their own time: crt uniform + (`SDL_GetTicksNS`), pet (`SDL_GetTicks`), smooth scroll lag (per poll), + touch flash (per rendered frame), macOS coasting. +12. `mark_hover` hack and the hover-bit reset (1.2 step 1). + +--------------------------------------------------------------------------------- + +## 2. Principles + +1. **Core decides WHAT and WHERE; shells decide HOW.** The core emits an ordered + region list with geometry, z, and resolved styles. No shell reads + `core.rects`, `core.active`, settings or theme to decide what something is. +2. **Paint once.** Every part is painted exactly once, into its own target; the + grid is produced by joining those targets. +3. **One clock.** Time is the shell's monotonic `now_ns`, passed in; the core + never reads a clock. Animations are functions of `now - start` (tweens) or + closed-form springs, never frame counters. +4. **A fixed, named order**, written as straight-line code in one function per + side. No pass objects, graphs or vtables. +5. **Zero cost when off; zero work when idle.** A disabled effect emits nothing. + Idle means the earliest deadline is "never". +6. **Decorations never change cell geometry.** Grid, hit testing, 9P cells and + snapshot goldens are unaffected by any GUI effect. + +--------------------------------------------------------------------------------- + +## 3. The frame + +### 3.1 Loop (pump, all shells) + +``` +pump(h, now_ns): + wait_input(timeout = min(core.nextWake(now), shell's own next wake)) + drain events → update ; drain effects → perform + core.advance(now) // settles animations whose time passed; sets + // needs_frame if something core-visible moved + poll_frame + if needs_frame or core.running(now): + render(now) → present → if present said "shown": core.acknowledge(tracks) + else if shell has a presentation-only animation: + shell redraws at level A (post chain only) or B (decor only), §5.5; + no core render, no cell-instance rebuild +``` + +`animationActive: bool` becomes `nextWake(now) ?u64` (null = idle, 0 = run +every frame, >0 = sleep until). `acknowledge` moves into `pump` (present returns +whether it showed the frame); the four shell ack sites and GUI's +`finishPresentedAnimationFrame` go. `capturePrevious` runs only when +`panel_transition != .off`. + +### 3.2 Core `render` (moves to `src/draw.zig`, `pub const render = draw.render`) + +Straight-line, in this order: + +``` +render(p, arena, now): + 0. BEGIN size grid; reset regions, layers, images, cursor, tracks + 1. PLACE compute every part's rect ONCE and append a Region, in z order: + page; per pane: body, tag (h = tag lines), grip, rail(+thumb), + notices; per column: tag + grip; workspace tag; drag overlays; + debug box; cursor + 2. PAINT for each region: paint its cells once into its target — its + layer (tags, notices, bodies with compact rows) or the grid + 3. JOIN copy each layer's grid-visible cells into the grid at its + viewport, in region order → the canonical grid (tty/9P/wire) + 4. GRID-ONLY glyph-only overlays (drag dashes) and the debug box on the grid + 5. PRESENT presentation.submit (tracks, diffs); region tier from role + and track phase (§3.4) + 6. STYLE resolve region styles: lift, dim (focus animation), the + theme's decor per region kind, style_alpha, per-pane view origin +``` + +Paint functions take the target `s: *Surface` instead of writing `p.surface` +(mechanical signature change through body_layer, File, Terminal, Image, Pdf); +the swap hack and the second tag/body/notice paint are deleted. Where the +old grid and layer copies disagree, **the grid's behaviour wins** so goldens +stay byte-identical. Every disagreement is listed in the change and decided +on its merits later (e.g. the column_move hover suppression is right for both; +notice-word hover could go either way). JOIN traps: (a) a wide grapheme at the +viewport's right edge. `print` drops a width-2 glyph that does not fit +(`col + 1 >= end`), but the layer has columns beyond it, so the copy must +re-clip at the edge and never leave a head without its spacer. (b) The body +layer's first `r.h − tag_rows` rows must equal today's grid rows with +`tag_bottom` both on and off (`first_row`, body_layer.zig ~275). + +### 3.3 Which parts render, and from what + +- A region is emitted iff its rect intersects the screen and its owner is + visible (collapsed pane → tag region only). +- Pixel shells draw a region **from its layer if it has one, else from the grid + cells in its rect**. The page region draws only grid cells no other region + covers (today's `coverLayers`, generalised to regions). +- Cell shells (tty, detached tty) draw the grid; layers exist only for pixel + shells. + +### 3.4 Composition order (GUI): fixed tiers by ROLE + +A region's tier comes from its **role** and is fixed for the frame. Animated +elevation (`Region.lift`, 0..1) only drives shadow offset, σ and strength, so +nothing changes draw order partway through a lift (draft-2 fix: an animated +`z` whose floor is the tier makes the draw order pop mid-animation). + +| tier | role | overlap inside the tier? | +|---|---|---| +| 0 | page, static panes, their chrome (rails, grip marks, rings, rules) | no | +| 1 | the active pane (only when focus lift is on) | no | +| 2 | panes moving/opening in a transition | **yes**: split per track, in `paintOrder` | +| 3 | closing tombstones (frozen previous cells) | **yes**: split per track | +| 4 | floating: notice chips, debug box, drag preview | no | +| 5 | true overlays: cursor, touch/pet (debug) | no | + +A pane's own chrome (rail, grip marks, rings, rules) is decor of the pane's +tier and carries its track transform, so it moves with the pane. Today it is +hidden during transitions (`transient_on`, gui.zig ~7299) because it doesn't +move. Only real overlays live in tier 5. + +Straight-line GUI draw, one render pass: + +``` +for tier 0..5: + for each group in tier // one group per tier, except tiers 2 and 3: + // one group per track, in paintOrder + decor-under fills, patterns, rings under content [decor] + cells bg + glyph; text-shadow regions in 3 phases [ui] + images the group's images [image] + cast shadows this group's shadows, darken-only, each with + its caster's rect as an exclude rect [decor] + decor-over rings over edges, rails, rules, grip marks [decor] +post chain (§6) → present +``` + +Why cast shadows come AFTER cells (draft-2 fix): static panes share tier 0. If +the shadow were drawn before the tier's cells, the neighbour's opaque cells +would paint over a shadow cast onto its gutter or tag row, which is exactly the +lapis case. Each shadow instance discards inside its caster's rect, so it only +darkens what lies beside or under it. An elevated tier's shadow onto lower +tiers works the same way. + +Draw calls: ≤ 5 per group. Tiers 0, 1, 4 and 5 are one group each, so ~20 draws. +Tiers 2 and 3 add ≤ 16 groups, and only while a transition runs. Empty draws are +skipped. The per-track batching that exists today (PaintPlan) survives only in +tiers 2 and 3, as groups. The vertical effect's scissor becomes a per-instance +clip rect. A notice chip (tier 4) ends up above an image, so the image pane can +stop "giving up the rows" (its own visual-change step). + +--------------------------------------------------------------------------------- + +## 4. Data the core hands the shells + +Additions to `Surface` (all POD, fixed-size): + +```zig +pub const Region = struct { + kind: enum(u8) { page, body, tag, grip, rail, column_tag, workspace_tag, + notice, overlay, debug }, + pane: u8 = none, column: u8 = none, serial: u32 = 0, + rect: Rect, // grid cells: the hit-test geometry + tier: u8 = 0, // fixed by role (§3.4) + lift: f32 = 0, // animated elevation 0..1: shadow only + dim: f32 = 0, // 0..1 pull toward the page (unfocused) + layer: u16 = none, // layer index, or draw the grid cells in rect + style: u8 = 0, // index into Surface.styles (0 = plain) + style_alpha: f32 = 1, // decor weight; theme crossfade (below) + active: bool = false, + thumb: struct { y: u16, h: u16 } = .{}, // rail only +}; +regions: [MAX_REGIONS]Region, nregions: u16, +styles: [8]Style, // resolved per frame from theme + settings +view: [MAX_PANES]struct { serial: u32, top_line: i32, wrap_at: i32 }, // ABSOLUTE per-pane view origin (§5.4) +``` + +`Style` holds a theme's decor for one region kind. Hard-edged geometry is in +**logical pixels** and snapped to whole device pixels by the shell (logical px × +display scale, rounded): ring widths, pattern periods, hard-shadow offsets. +Lapis is pixel art (2/3/1 px rings, 6 px checker, 5-6 px hard shadow). In +fractional cell units those would blur and change with font size (draft-2 fix). +Fields: `fill`, `ring[3] {px, rgba}`, `pattern {none|checker|stripes|dots, px, +duty, a, b, see_through}`, `hard_shadow {dx_px, dy_px, rgba}`, `text_shadow +{dx_px, dy_px, rgba}`. Soft elevation shadows are not per style. They come from +`lift` and one global `shadow {rgba, σ_px, offset_px}` per theme. + +`see_through`: a region style with an under-pattern (the lapis dot grid under +pane bodies) marks page-coloured cell backgrounds as clear, using the existing +ui.frag clear-bg flag (0x40000000), so the pattern shows between glyphs. In a +tiled layout the page region is almost never visible, so the pattern has to sit +under the bodies. + +Theme crossfade: switching into or out of a decorated theme fades +`style_alpha` from 0→1 or 1→0 over the same Tween as the colours. Decor never +snaps while colours fade. Schema: `decor` is an optional field on `Theme`. The +comptime `fold` and the ZON ThemeFile parser (colors.zig:266) both walk the +same struct, so theme files get decor with no separate schema. Lapis ships +compiled in first. + +Layers: once the tag refactor lands, `TagLayer` and `BodyLayer` merge into one +`Layer { kind, id, serial, viewport, cols, rows, compact_rows, cells, cursor +{x,y,bar}, bg, slide, fade, separators }`. A tag is all compact rows. A body is +`context_rows` compact rows followed by body rows. A notice is one compact row. +There is one `rowTop/rowHeight/hitAt`. Multi-line tags are `rows > 1`, which +replaces the refactor's one-layer-per-line `line` field. This is the only part +that touches the other agent's files, and it waits for them. + +Time: `Surface.now_ns`, the core's time for this frame. + +Wire: regions and styles go over the detached wire (`version` 7 → 8). The +attached GUI then draws chrome from them, which fixes the core==null +divergence. Web ignores the new data at first. Its lapis could later map styles +onto CSS box-shadow, borders and gradients, a natural fit since the reference +IS CSS. + +Deleted from the shell once regions exist: `taglineBaseRgb`, +`topbarPaneBorderHeight`, `bottomTaglinePresent`, the scrollbar inference in +`appendPaneChrome`, `cellBackgroundIs`, `paneGripCell`'s scan, and `mark_hover`. +The hover affordance becomes an `overlay` region. + +--------------------------------------------------------------------------------- + +## 5. Region effects on the GPU + +### 5.1 One decor pipeline, instanced + +New `shaders/decor.{vert,frag}.glsl`. Each decoration is one instance: +`{ rect_px, clip_px, exclude_px, kind, params vec4, color0..2 (premultiplied), +transition header (the same fields as CellInstance) }`. + +- **Hard-edged kinds, no AA, snapped edges**: `solid`, `ring` (up to 3 inset + rings), `checker`, `stripes`, `dots`, `hard_shadow`. Rules, rails and grip + marks become `solid` decor emitted from regions. Because they are snapped and + un-anti-aliased, stage 8's "PPM goldens byte-identical" is achievable. +- **Soft kinds, fwidth AA, dithered**: `soft_shadow` (a rectangle convolved + with a Gaussian in erf closed form, as Wallace and GPUI do: one quad grown by + 3σ, no blur pass), `inner_shadow`, `glow`, and `cursor` (rounded corners). + Wide gradients get ±0.5/255 interleaved-gradient-noise dither. + +The triangle overlay pipeline stays only for the pet and the touch debug view. + +### 5.2 Shadows and gamma + +A pane's right and down shadow lands on its neighbour's gutter or tag row +(chrome), because pane rects tile. With `tag_bottom` it lands on the first body +row instead, which is simply what a shadow does. §3.4 guarantees it is drawn +over the neighbour and never over the caster. + +Gamma decision (draft-2 fix, one rule instead of two). Decor blends on the +UNORM target, so blending happens in sRGB space, as CSS does. +- Dark shadows: alpha is pre-warped so the result matches linear light, + `a' = 1 − (1 − a)^(1/2.2)`. This is exact for black. +- Coloured decor (glows, selection halo, tinted shadows) is capped at ≤ 25% + alpha, where sRGB-space falloff is only slightly dark. That is documented, and + it is accepted by the feel review, not by maths. +- Opaque decor (lapis hard shadows, rings) has no gamma issue. +- Measured experiment in the fx set: render the scene into RGBA16F linear + (ui.frag writes a linearised `mix(bg,fg,a)`, so glyphs look identical) and add + one encode pass that also produces the sRGB iChannel0. It is adopted only if + its cost at 4K on the iGPU fits §8.3. + +### 5.3 Text shadow + +Only for regions whose style has `text_shadow` (lapis titles). The region's +cells are emitted in three phases in its group: all bg instances (glyph = the +space slot), then shadow glyph instances (offset, shadow colour, clear bg), then +glyph instances (clear bg). Every other region keeps its single bg+glyph +instance. Within a group, bodies come before tags, so a tag's shadow can hang +over the body's top edge. + +### 5.4 Cursor (shell-owned presentation) + +The cursor is decor in tier 5, not a reversed cell. It is a quad whose 4 corners +follow the target on critically damped springs. The leading corners are stiffer +than the trailing ones, which gives a smear along the motion that collapses at +rest. +- **Distance rule** (draft-2 fix): a move of ≤ 1 cell, or any move in insert + mode, snaps or settles in ≤ 40 ms. Only jumps glide (90-150 ms), as neovide + does. At key-repeat rate (~33 ms per cell) a 120 ms spring would trail 3-4 + cells behind and feel sluggish. +- **Scroll-aware**: the core exposes each pane's ABSOLUTE view origin + (`view[pane]`: serial, first line, wrap offset). The shell diffs it against + the origin it last drew and shifts its spring state by the difference in + pixels, so the cursor does not glide against text that jumped. It is absolute, + not a per-frame delta, because frames get dropped: the detached server skips + clients with pending output (server.zig ~712), and a GUI can skip a present. + G6 smooth scroll uses the same origin. +- **Legible during the glide**: glyphs under the quad are re-emitted in the + cursor-text colour, clipped to the quad (per-instance clip), as neovide does. +- **Geometry**: the pixel rect comes from the layer the cursor sits in (body + layer compact rows, or tag layer pitch plus band offset), not from `cols × cell_w`. +- **Blink**: default OFF, as pardes never blinked. When on, it is a square wave + with an ~80 ms ease at each edge, so it redraws only at the edges, held solid + while typing and for 500 ms after, and it stops after 10 s idle. + +### 5.5 Presentation-only redraw levels (draft-2 fix: zero idle cost must be real) + +| level | trigger | work | +|---|---|---| +| A: chain only | iTime or ShaderAnimation, scene unchanged | re-run only the post chain from the retained `scene_tex` | +| B: decor only | cursor glide, blink edge, hover fade | reuse the uploaded cell vbuf and image draws; rebuild and upload the decor instances AND the cursor-legibility glyph instances (the glyphs under the cursor quad in cursor-text colour, ui pipeline, clipped to the quad); redraw the scene, then the chain | +| C: core frame | `needs_frame` or a core animation | full render and instance build | + +Cell instances are rebuilt only at level C. With a chain active, the cursor +lives in the scene, so cursor motion is level B, not A (a documented choice: +iCurrentCursor shaders still get exact uniforms). + +### 5.6 tty / web / wire + +GUI decor is GUI-only. The tty realises nothing from `styles` beyond the colours +that are already in cells; its own effects are in §9.2. Web ignores the new +data. The wire carries regions and styles so an attached GUI draws the same +frame. + +--------------------------------------------------------------------------------- + +## 6. Post passes: a Shadertoy-compatible chain (GUI) + +Mirror ghostty 1.4.0 (`zig-pkg/ghostty-*/src/renderer/shadertoy.zig`, +`shaders/shadertoy_prefix.glsl`, `generic.zig:2106-2230, ~1692`): + +- **Source format**: user file with `void mainImage(out vec4 fragColor, in vec2 + fragCoord)`, untouched. pardes prepends its OWN prefix with ghostty's exact + uniform names, types and std140 order (iResolution, iTime, iTimeDelta, + iFrameRate, iFrame, iChannelTime[4], iChannelResolution[4], iMouse, iDate, + iSampleRate, iCurrentCursor, iPreviousCursor, iCurrentCursorColor, + iPreviousCursorColor, iCurrentCursorStyle, iPreviousCursorStyle, + iCursorVisible, iTimeCursorChange, iTimeFocus, iFocus, iPalette[256], + iBackgroundColor, iForegroundColor, iCursorColor, iCursorText, + iSelectionForegroundColor, iSelectionBackgroundColor; CURSORSTYLE_* defines; + `#define texture2D texture`), but SDL GPU bindings: `iChannel0` at set 2 + binding 0, the block at set 3 bindings 0 to 2 (cut before and after + iPalette: SDL GPU binds at most 4 KiB of a block, so one block left + the colours after the palette at zero until G4), pardes's own at 3. `main()` calls + `mainImage(_fragColor, gl_FragCoord.xy)`. Trap found: ghostty's Zig + `Uniforms` (shadertoy.zig:13) orders selection_background before + selection_foreground while its GLSL block orders Foreground before Background, + so in ghostty the two arrive swapped. pardes fills by the GLSL names (the + documented meaning); a unit test checks our Zig mirror's std140 offsets + against the prefix (≈4.6 KB block, pushed with SDL_PushGPUFragmentUniformData). +- **Y is down**, exactly like ghostty on Metal (`custom_shader_y_is_down`): + fragCoord, iChannel0 UV and cursor uniforms share one top-left space, no flip. + `iCurrentCursor = (left x, BOTTOM-edge y, w, h)` in framebuffer pixels (the + "+Y edge" rule community cursor shaders rely on). Directional shaders appear + flipped versus Linux ghostty (OpenGL, y-up); documented, not emulated. +- **Chain**: a list of paths, run in order; ping-pong two UNORM textures + (cleared to 0), the last pass writes the swapchain. iChannel0 holds + sRGB-encoded values (scene_tex and swapchain are UNORM today — keep it so; if + the scene ever moves to an _SRGB/float target, encode before the chain). Empty + chain → render straight to the swapchain, no scene texture (today's cost). +- **Uniform sources** (shell): iTime since the first post frame, iTimeDelta + between draws, iFrame per draw (ghostty semantics, shell wall clock); iMouse = + real Shadertoy mouse (superset; ghostty leaves it 0); cursor rect/colour/style + from the region cursor (5.4 geometry), iTimeCursorChange stamped when rect or + colour changes; iFocus/iTimeFocus from window focus events; palette, + background, foreground, selection from the theme. +- **Alpha**: forced to 1 unless WindowOpacity < 100 (then passed through + premultiplied). Transparent grounds keep working. +- **Input mapping**: identity. The bundled CRT has NO geometric distortion + (beam-profile scanlines, aperture mask, bloom, vignette), so input stays exact. + Barrel exists only in user shaders, with the drift documented: 1.6% is ~30 px, + ≈3 cells, at the corners of a 4K screen, where the grips and rails are. + `crt.zig` is deleted. If the user insists on barrel in the bundled CRT, keep + `crt.zig`'s inverse keyed to "bundled crt active". +- **Compile** (decision 3): a user's file is compiled by spawning `glslc` with + the build's own flags, prefix and file on its stdin, SPIR-V on its stdout + (no file of ours anywhere; std's spawn allocates before fork), on a thread of its own when the file joins the chain, never on the + frame path; the result is taken in at the next loop step. The prefix ends in + `#line 1`, so glslc's errors count the file's own lines, and they name the + file, not `<stdin>`. Level A redraws once a refresh of the window's display. A failed compile keeps the file's last good + pipeline and says glslc's first line as a message; glslc missing is said + once, and only files stay off (the bundled passes are compiled with the + build, through the same prefix). The files' directories are watched + (file_watch shader slots): a change there has each file read and hashed, + and one whose bytes moved compiles again; the same bytes (good or bad) + compile nothing and say nothing twice. The process that holds the core + compiles (ShaderBuild.zig): a local GUI, or a detached session, which + sends its attached GUIs the chain with each file's SPIR-V (wire `post`, + on attach and on every change), so an attached GUI runs the same passes, + levels and ShaderAnimation as a local one and still reads no disk and runs + no program. +- **Animation mode**: `ShaderAnimation off|on|always` (ghostty's + `custom-shader-animation`): off = redraw only when content changes; on = + continuous while the window is focused; always = continuous. Continuous means + the shell redraws its retained Surface (3.1), never a core tick or render. +- **Existing crt** becomes a bundled Shadertoy file in `shaders/post/` under + the same builtin; `scene_effects` and `crt.frag.glsl`/`crt.zig` are deleted. + It takes a level, `Crt 0..3` (0 off, `on` the default 2, `off` and bare + still work), passed as `pardesLevel`: 2 is the polished rewrite, 3 at least + as strong as the old CRT (pixels changed by more than 8 in a channel against + a plain frame: 18.3% vs 17.4%). Ripple and Glitch were rewritten too, then + removed at the user's word after a live look (decision 8). The chain is + `Crt` and `Shader <path>` in the order they were put in + (`Shader off` empties it of files), `ShaderAnimation off|on|always` + (default on). The core keeps no clock for it: level A redraws are the + shell's. +- macOS (out of scope) would need spirv-cross → MSL, as ghostty does. + +Region filters (e.g. "tint/blur one pane") are NOT built. If one is ever needed: +one post pass reading a uniform array of ≤16 region rects+kinds, not a pass per +region. + +--------------------------------------------------------------------------------- + +## 7. Animation model + +### 7.1 Time + +- The shell's monotonic `now_ns` is the only clock. It enters the core with each + `pump` (and a `.tick = now_ns` event for shells without pump, e.g. esp32). + Tests inject a fixed clock: a helper steps `now` by 16.67 ms. +- Two domains, one clock: + - **core animations** (change what hit-testing or the grid show, or state): + panel geometry, message life, notice slide/fade, look-hover delay, chrome + theme crossfade, focus lift/dim. Stored in the core, deterministic in tests. + - **presentation-only animations** (never touch core state): cursor glide/ + trail/blink, shader iTime, smooth-scroll pixel offset, pet, touch flash. + Owned by the shell, redraw the retained Surface, never tick the core. + +### 7.2 Two primitives, closed form + +```zig +Tween { start_ns, duration_ns, from, to, curve } // value = lerp(from,to, curve(t)) +Spring { start_ns, x0, v0, target, omega } // critically damped: + x(t) = target + (c1 + c2 t) e^{-ωt}, c1 = x0-target, c2 = v0 + ω c1 +``` + +Both are pure functions of `now`: frame-rate independent, free catch-up after a +sleep, no per-tick `advance` loops. Retarget: a Spring evaluates `(x, v)` at now +and restarts from them (velocity kept); a Tween retargets from the displayed +value with an ease-out curve (starts moving at once, no ease-in stall). +Colours interpolate in OKLab (small CPU function), not sRGB bytes. + +Settling (draft-2 fix: a critically damped spring never reaches its target). +Each quantity has an end rule: position springs end when |x − target| < 0.5 +device px and |v| < 1 px/s, lift/elevation when < 0.002, and then they snap to +the target and stop. A test checks that `nextWake` returns null after settle. +A Tween ends at `start + duration`. + +### 7.3 Idle and wakes + +`nextWake(now)` is ONE straight-line function listing every core animation +(the same list `advance` settles): + +- running tween/spring → 0 (frame now) +- holding phase (message linger, look-hover delay) → its end time +- nothing → null + +Shells wait `min(core wake, own wake, input)`. A lingering message now costs +zero frames until it starts to dissolve. `advance(now)` performs the state +changes at phase ends (message entering→shown→lingering→leaving→removed, +track done → drop, hover wait → preview) and sets `needs_frame` only when +something visible changed. + +### 7.4 What each animation becomes + +| today | becomes | +|---|---| +| `ChromeAnimation` 10 steps sRGB (colors.zig:192) | Tween, 200 ms, OKLab, ease-in-out; retarget ease-out | +| panel `Track.frame` counters (layout.zig:1583) | geometry Spring per track (retarget-safe); content crossfade Tween | +| `MessageLife.frame` (Messages.zig) | phase + start_ns; motion from Tween curves | +| look-hover wait frames (look.zig:902) | deadline | +| GUI `AnimationClock`, tty `tickWatch` cadence, web `animationTicks`, macOS `spendTickTime`, detached tick | deleted; each shell passes `now_ns` and sleeps to `nextWake` | +| crt time uniform, pet, touch flash, scroll lag | shell-owned, same now_ns source | + +--------------------------------------------------------------------------------- + +## 8. Motion, colour, performance, feel (both tracks) + +### 8.1 Motion spec + +| class | examples | curve | duration | +|---|---|---|---| +| micro-feedback | hover affordance, button/word highlight, selection appear | ease-out (cubic) | 80–120 ms | +| follows input | cursor, smooth scroll, drag preview, pane geometry under interaction | critically damped spring | settles 90–150 ms (cursor), 180–260 ms (layout) | +| arriving | notice drop-in, pane open | ease-out (cubic / quint), no overshoot | 150–220 ms | +| leaving | notice dissolve, pane close | ease-in (cubic), shorter than arriving | 100–160 ms | +| state change | focus lift/dim, theme crossfade | ease-in-out (smooth) | 150–250 ms | +| anything > 300 ms | — | must be justified in the feel review | — | + +Rules: leaving is faster than arriving; nothing overshoots at text scale +(a 2 px bounce reads as jitter); interruptions retarget (7.2), never snap or +restart from zero; **input is never gated**: hit testing uses logical geometry +(`presentation.pointer` already does), keys act on the logical state +immediately, animations only lag the picture. + +### 8.2 Colour and contrast spec + +- Targets (WCAG ratio via `colors.themeContrast`, colors.zig:113): body text vs + page ≥ 4.5 (aim 7); secondary ink (comments, line numbers) ≥ 3; tag/chrome text + vs its band ≥ 4.5; non-text chrome (rules, grips, scroll thumb) ≥ 3 vs + neighbours; selection text vs selection bg ≥ 4.5. +- Absolute targets apply to the 15 native themes only, matching the existing + test (colors.zig ~465), including its deliberate 2.5-4 band for line numbers + (lineno is the exception to "secondary ≥ 3"). Imported themes get a RELATIVE + rule: with every effect at its maximum (shadow darkening, unfocused dim, glow), + no text/ground pair may drop below min(its original contrast, the target). + Measured against the composited ground. If an effect would break the rule, its + strength is clamped for that theme. +- Subtlety budget: elevation shadow max 30% darkening at the edge, σ 0.4–0.8 + cell; unfocused dim ≤ 10% toward the page; glows ≤ 25% alpha; bloom threshold + high (only true highlights), strength ≤ 5%. +- Gamma: effect maths in linear light (shaders convert), shadows via pre-warped + alpha (5.2), crossfades in OKLab; glyph coverage untouched (ui.frag stays). + Wide gradients dithered. +- Focus hierarchy by light, not only hue: the active pane is lifted (shadow), + unfocused panes recede (dim), the cursor is the brightest thing on screen, + chrome is quieter than text. + +### 8.3 Performance budget + +- Targets: 60 Hz → 16.6 ms, 144 Hz → 6.9 ms end to end. Shares (144 Hz, + 200×60 grid, 4K, iGPU): core render ≤ 1.5 ms (only on state change), GUI + instance build ≤ 1 ms, scene GPU ≤ 2 ms, decor+text-shadow ≤ 0.5 ms, post + chain ≤ 2 ms for two passes (bloom at half res). Measured with the existing + tracy zones plus GPU timestamps; numbers are budgets to verify, not facts. +- Idle: zero ticks, zero renders, zero presents (7.3); blink stops after 10 s. +- Presentation-only animation: shell redraw only, no core render. +- Degrade order: post chain to half res → bloom off → soft shadows become hard + (σ = 0) → cursor trail off → transitions snap. Hysteresis: step down after 30 + of the last 60 frames miss the budget; step up only after 10 s with none + missed; at most one step per 2 s, reset on theme or window-size change. A step + is never taken mid-transition, only at the next idle, and each one is logged + (and shown in Debug). Input handling is never deferred for effects. + +### 8.4 Feel review (gate before an effect is kept) + +Each effect lands behind its own toggle, default off. Before "keep": render a +frame sequence with the injected clock (GUI capture mode, PPM per frame, at 60 +and 144 Hz; tty via the snapshot harness `snapstyle` per frame) and a live +screen recording; judge in motion against a reference (the lapis page, ghostty +cursor trail, neovide smear); record keep / polish / drop with one line of why +in `docs/effects.md`. Code review never substitutes for this. + +--------------------------------------------------------------------------------- + +## 9. Effects catalogues + +Every effect: a toggle (one `Fx` bitset in settings + builtin words, like +`scene_effects` today), zero instances/passes/uniforms when off. + +### 9.1 GUI track + +Existing, verdicts: crt → REWRITE as bundled Shadertoy (Lottes-style mask, +proper scanline beam profile, subtle); ripple → DROP; glitch → DROP (or a +tasteful rewrite only if the feel review asks); pet → keep as-is, out of scope; +transitions slide → POLISH (spring + elevation shadow while moving); zoom → DROP; +dissolve → REPLACE with a linear-light crossfade; vertical → POLISH timing; the +character effects (ascii…typewriter) → not a GUI effect (terminal track). + +| # | effect | needs from pipeline | pri | +|---|---|---|---| +| G1 | soft elevation shadows onto lower panes (active lifted, floating chips, dragged pane) | regions + z tiers, decor `soft_shadow` | P1 | +| G2 | focus transition: lift (spring) + unfocused dim | core focus Tween, `Region.dim`, cell-instance dim | P1 | +| G3 | cursor: jumps glide on springs, adjacent moves snap (≤40 ms), 4-corner smear with glyphs re-drawn legibly inside it, optional edge-eased blink | layer geometry, per-pane view origin, shell time, decor `cursor`, redraw level B | P1 | +| G4 | Shadertoy chain + bundled CRT, bloom (half-res dual-Kawase), vignette+grain | post chain, offscreen ping-pong, shell time | P1 | +| G5 | lapis decor: rings, checker, stripes, hard offset shadows, title text shadow | styles, decor kinds, 3-phase text shadow | P1 (lapis set) | +| G6 | smooth scroll: pixel offset on a spring, momentum for touchpads | shell-side; replaces scroll_lag stepping | P2 | +| G7 | panel transitions redone: spring geometry, shadow while moving, linear crossfade | Track as Spring, tiers | P2 | +| G8 | notice chips: elevation, shadow, ease-out drop, ease-in fade | tier 4, existing slide/fade | P2 | +| G9 | selection glow: soft halo behind selection runs, 100 ms fade-in | selection runs as regions (overlay kind) | P2 | +| G10 | theme crossfade in OKLab, 200 ms | Tween | P2 | +| G11 | look-hover affordance: soft underline glow, 80 ms | hover region | P3 | +| G12 | pane edge ambient occlusion (inner shadow, 1–2%) | decor `inner_shadow` | P3 | +| G13 | parallax body pattern (lapis dots under see-through bodies at 0.25× scroll) | `see_through` style, per-pane view origin | P3 | +| G14 | damage afterglow (changed cells glow briefly) | removed: a pane whose whole text changed flashed whole (the user: "really bad, just remove it") | — | + +### 9.2 Terminal track (tty, cell-native; separate, smaller) + +Where: presentation-only cell rewrites in the tty shell after the canonical +grid (`tty/panel_compositor.zig` grows into the tty compositor), never in the +canonical grid, so 9P/goldens stay clean with effects off. Gated on truecolor +(vaxis caps / COLORTERM) — static effects may quantise to 256, animated ones +turn off below truecolor. Safe glyph set by default (░▒▓ ▀▄▌▐ ▖▗▘▝); +sextants/octants behind a setting. Budget: an animated frame ≤ 8 KB of output +(≤ 4 KB and 30 Hz when `SSH_CONNECTION` is set); prefer effects whose per-frame +delta is a moving edge, not a full-pane rewrite; without sync 2026, animated +effects are off (static ones stay). vaxis has `caps.rgb` but no 2026 cap: the +tty sends its own `CSI ? 2026 $ p` (DECRQM) at startup, next to the kitty shm +probe; no answer = assume unsupported. Under tmux, tmux answers for itself (its +own 2026 handling; old tmux does not answer → animated effects off), which is +correct, because tmux is the thing that repaints the outer terminal. + +Enforcing the budget (draft-2 fix): tty animations are time-based, so dropping +samples is free and correct. After each `vx.render` the shell counts the bytes +written. If a frame exceeded the budget, the next sample is deferred by +`bytes / budget × frame` ms. Slide and vertical therefore get fewer samples over +ssh; they are not exempt. Effects are designed so each cell changes as few +times as possible over the whole animation. + +Audit of what exists: + +| effect | where | verdict | why | +|---|---|---|---| +| ascii (byte walk) | core compose | REMOVE | slot-machine noise, rewrites every changed cell every tick | +| edges | core compose | REMOVE | gimmick, full-pane churn | +| fall | core compose | REMOVE | gimmick | +| wave | core compose | REMOVE | gimmick, illegible mid-motion | +| scramble | core compose | REMOVE | noise every tick, worst byte cost | +| typewriter | core compose | REMOVE | slow on big panes, row-major reveal reads as lag | +| curtain | core compose | POLISH → wipe | a directional reveal is good; give it a 2-cell soft truecolor edge | +| slide | tty compositor | POLISH | ≤150 ms ease-out, pane open/close only; a full-pane rewrite per sample, so the byte budget thins it to few samples over ssh | +| zoom | tty compositor | REMOVE | nearest-neighbour cell scaling is garbage | +| dissolve | tty compositor | POLISH → ordered swap | Bayer 4×4 threshold per cell; each cell swaps old→new ONCE at its threshold (no continuous colour lerp), so the total output is one pane's worth spread over the animation | +| vertical | tty compositor | KEEP (timing polish) | reads as a drawer, cheap | +| message fade | core (grid colours) | KEEP (OKLab) | | +| theme crossfade | core | KEEP (OKLab, fewer steps over ssh) | | + +Removing the six core-composed effects deletes `composeAsciiTransitions`, +`charSource`, `AsciiDiff`, `PanelCellDiff.ascii` and their shader/GUI paths +(user decides). + +New, cell-native: + +| # | effect | technique | pri | +|---|---|---|---| +| T1 | floating shadow for chips/debug box/drag preview | 1 cell right/down darkened in OKLab; blank edge cells get ▗▄/▐ half-cell edges | P1 | +| T2 | cursor jump trail | on jumps ≥ 3 cells: 3–5 cells along the path, bg ramp cursor→page, 120 ms; tiny delta | P1 | +| T3 | wipe transition | 2-cell soft leading edge; only the edge changes per frame | P2 | +| T4 | ordered swap transition | = polished dissolve: Bayer threshold, one swap per cell | P2 | +| T5 | unfocused dim | fg 15% toward bg, instant (no animation over ssh) | P2 | +| T6 | active tag gradient | subtle horizontal truecolor ramp on the active tag band | P3 | +| T7 | scroll thumb flash | rail thumb brightens 300 ms on scroll | P3 | + +--------------------------------------------------------------------------------- + +## 10. Lapis on this pipeline + +Colours: a normal theme file (lapis #0f1a4a, deep #0a1030, ink #050a24, gold +#e8c46a, vermilion #d4412f/#ff6a4a, vellum #eee6d2/#9aa6d9). No fonts. Styles: + +- workspace/column/pane tag (the "trail"): lapis fill, 2 px gold ring, hard + shadow 5×5 px vermilion (px snapped to device pixels, no AA), 3 px title + text shadow for the file name. +- pane (the "panel"): gutter (2 cells ≈ the CSS 18 px band) carries the + ornament pattern (checker gold/lapis), inset rings gold/lapis/vermilion + (2/3/1 px) on the pane edge, soft black shadow from its tier. +- column tag bar / notice chips: striped gold/lapis (`stripes`, period 4 px) + behind the text band, ring gold, hard vermilion shadow. +- page: lapis-deep. The dot grid sits under the pane BODIES (`dots` pattern + with `see_through`, so page-coloured cell backgrounds let it show between + glyphs). It is fixed to the pane, not to the text, so it does not track + scroll. G13 parallax is retargeted to this body pattern at 0.25× scroll and + stays P3. + +Where the pixels come from: left band = the pane's own gutter; top = its tag +row (the band has vertical slack above/below the tagline glyphs); right/bottom += 1–2 px rings over the last column/row's side bearings; shadows fall on the +neighbour's gutter/tag row (§5.2, drawn after the neighbour's cells, §3.4). No +layout change. If the user wants the CSS +look with real gaps between panes, that is a separate layout knob (question 1). + +--------------------------------------------------------------------------------- + +## 11. Damage / dirty tracking + +No new dirty bits without a measurement. Existing: `needs_frame` (frame-level), +vaxis cell diff (tty output), wire deltas, web node caches. The pipeline makes +two savings free: (a) presentation-only animations skip the core render +entirely; (b) deadlines replace per-tick renders for holding phases. Region +lists make per-region instance caching possible later, if tracy shows the +instance build matters. + +--------------------------------------------------------------------------------- + +## 12. What gets deleted or merged + +Core: second pane-tag paint, second body paint, grid-notice pass (joined from +layers), duplicated header hover/selection/caret, `std.mem.swap` of the Surface, +hover-bit reset + `mark_hover`, per-animation `advance` counters and frame +constants, `animationActive` (→ `nextWake`), `SceneEffect` (→ shader list), +`capturePrevious` on idle frames with transitions off; if the user agrees, the +six core-composed character effects. +Types: TagLayer + BodyLayer → Layer; layout.zig's Presentation/Track/Easing/ +Animation move to `src/Presentation.zig` and `src/animation.zig` (pure moves). +GUI: AnimationClock, finishPresentedAnimationFrame, PaintPlan/PaintBatch, +coverLayers-as-cell-loop (→ page cover), the five inference functions (4), +crt.zig mapping, crt.frag.glsl, `scene_failures` plumbing folds into the chain. +Shells: four ack sites, six tick drivers. + +--------------------------------------------------------------------------------- + +## 13. Staged plan (jj changes on a bookmark `render-pipeline`; effects on top of it on `fx`, droppable) + +Gate for every stage: `zig build snap` byte-identical, `zig build unit-test` +and `unit-test -Dplatform=gui` pass, `-Dplatform=web` builds, tracy frame time +not worse at 200×60. Builds redirected to files; `-Dplatform` always; PARDES_* +stripped. No visual change until stage 9 unless stated. + +| # | change | notes / risk | +|---|---|---| +| 0 | GUI capture goldens: a handful of scenes rendered hidden in capture mode, PPM hashes checked in (same machine/driver) | the safety net the GUI stages need; machine- and driver-specific, so a LOCAL gate only, never CI | +| 1 | pure moves: render → `src/draw.zig`; Presentation/animation out of layout.zig | no behaviour | +| 2a | clock plumbing: `Host.now` (the shell's monotonic ns) and `Pardes.advance(now)`, which runs one `.tick` per whole 16 ms frame since core time last stood still; `nextWake()` lists every core animation and answers the next frame while anything moves, the wait's end while something only waits (message linger, look-hover delay), null when idle; the pump sleeps to it and draws only stepped frames. No shell posts `.tick` any more (tty's timer thread only wakes the wait; GUI's AnimationClock, web's JS tick bank and the detached server's and the board's ticks are gone; grid mode moves its virtual clock straight to the next wake). `acknowledgePanelPresentation` stays in the shells (revisit at stage 8: grid mode acks `&.{}` on purpose). capturePrevious only when transitions are on. `.tick` stays as the one-frame step `advance` and the unit tests use, so every curve and every asserted number is unchanged | pacing is corrected (144 Hz no longer ~25% slow, ssh no longer drifts): a bug fix allowed in this phase. PARDES_TEST_CLOCK (set by the snapshot harness): tty and the detached server answer a virtual clock that a timed-out wait moves exactly to the core's next wake, so goldens replay the same frame sequence on any machine load. Review fixes: tty's wake timer is interruptible (a newer, shorter request cuts short an older sleep); a wait (linger, hover delay) is jumped to its end in one step, never counted against the 240-frame catch-up cap; an overshoot under 1.5 ms after a step is let go, so 60 and 120 Hz take exactly one step per display frame. Known exceptions: the GUI still polls every 16 ms when idle (SDL events, gamepad, fs tick, smooth scroll depend on it; revisit at stage 8); a minimized GUI renders every stepped frame of a running animation (stage 8) | +| 2b | (on `fx`, feel-reviewed) Tween/Spring curves, settle rules, OKLab crossfades, new durations from §8.1 | a look change, kept apart from 2a so either can be bisected | +| 3 | paint functions take `s: *Surface`; delete the swap hack | mechanical, wide | +| 4 | PLACE: Region list built once; renderPane/tags/notices read their rects from it | wait for tag→Text; the refactor is already replacing BOX_H with `pane.tag_rows` and `p.tagTop/bodyTop(pane, r)` — PLACE absorbs those into the region rects | +| 5 | JOIN: paint tags/notices/headers once into layers, copy into grid; the grid wins where the copies disagree, and each disagreement is listed for a later decision | goldens are the oracle; wide-grapheme re-clip at the edge (§3.2) | +| 6 | body layer joined the same way (paint once, copy visible rows) | riskiest join; A/B the old double paint in a temporary test with tag_bottom on and off, then delete it | +| 7 | Layer merge (TagLayer + BodyLayer), wire v8, web accessors | after the other agent lands; touches mouse hit paths; breaks the macOS shell's layer ABI (accepted: macOS build ignored for now); done: one `Layer` (src/Layer.zig) with `rows` (0 = no layer) and a `cursor{x, y}`; a tag of N rows is ONE layer of N grid rows (`tagHit` answers the row as `line`, `bodyHit` keeps its meaning), so the per-line layer bases are gone. Wire v8 ships rows, cursor y and the region list in the one bump; v7 and v9 peers are refused in both directions (tests). web: `tag_layer_value` 11 = rows, 12 = cursor y, and app.mjs lays every row. macOS: its Zig side compiles against `Layer`, but pardes.h still sees one row per tag layer (a taller tag shows its first row there) | +| 8 | GUI draws from regions: role tiers with track groups in tiers 2-3, page cover, hard-edged snapped decor for rules/rails/grips (pane chrome in the pane's tier), per-instance clip; delete inference functions, `transient_on` and `mark_hover` (breaks macOS glass hover; accepted, macOS ignored for now) | stage-0 PPM goldens byte-identical (possible only because hard decor is snapped and not anti-aliased); pane chrome now also shows during transitions, which is the one allowed visible delta, listed Done: the frame is drawn in groups (makeGroups): tier 0, one group per track in paint order (tiers 2 and 3), tier 4 as two groups (the notices; then the guides and the debug box, which the core paints over them), tier 5 (bar cursors), each drawing cells, images, decor. Decor is every rule, rail, thumb, grip mark, spine, the workspace and column rules, the bottom band, notice rules and bar cursors: whole-pixel rects drawn by `decor.frag` over `ui.vert` as cell instances (colour in the ground, coverage in fg.r, blended like the overlay), so each carries its track's transition and clip; a closing pane's comes from the last frame's regions (`Surface.previous_regions`). Only `solid` exists yet: `decor.vert` and the other kinds (§5.1) come with the first effect that needs them. Deleted: taglineBaseRgb, topbarPaneBorderHeight, bottomTaglinePresent, frameChromeBg, cellBackgroundIs and the rail inference, paneGripCell's scan, transient_on, PaintPlan; one cover map (coverFrame: layer, grip and offset, focus, anchor, floating) is marked from layers and regions once a frame. New regions: `column` (spines, anchors, the focused column's tint), `guide`, `debug`; `Surface.chrome` is the palette, on the wire in v8 (not yet shipped, so no bump), and an attached GUI draws the same chrome (test). Per-instance clip (`CellInstance.clip_*`, 104 → 120 bytes an instance, ~15% more upload a frame) replaces the vertical transition's scissor. While any pane moves, opens or closes, notices stay in their own panes' groups, under whatever slides over them; tier 4 holds them only when nothing moves. Goldens: 01-12 byte-identical; 13-17 differ only in pixels past the grid (with a picture on screen the image pass left the scissor at the grid's size, cutting every rule end, rail foot and band that runs into the leftover pixels; they now run to the edge as in every scene without one); 16-debug shows the debug box (it was drawn from the grid under the source's context-row layer, so the GUI never showed it there); 18-mid-transition is new (virtual clock, PanelSlide Newcol with the picture, frame 6 of 12: chrome moves with its pane). Other deltas, outside the goldens: a guide over a tag or a context-row body now shows; with WindowOpacity < 100 a layer's bar cursor is ink like the grid's; an attached GUI gains the focus tint, notice rules, spines and the theme's page and caret colours. Deferrals fixed: the GUI sleeps when idle (SDL and queue events wake it; a smooth scroll, a gamepad, the test feed, a shell's kill deadline, a present to retry still poll), and a minimized or occluded window sleeps through animation. Tracy, `gui frame build`, 200x60, terminal output plus scrolling, ReleaseFast, two interleaved runs of ~180 frames: before 992/1015 µs median, after 989/987 µs | +| 9 | post chain: glslang, Shadertoy prefix, ping-pong, ShaderAnimation, redraw levels A/B (§5.5); bundled CRT without barrel; delete scene_effects/crt.zig/crt.frag | first visual change (the CRT look) Done: src/gui/Post.zig, shaders/post/ (prefix, crt, ripple, glitch), post.vert. glslc (decision 3) with compileGlsl's flags, off the frame path; ghostty's Uniforms matched offset for offset by a test against a copy, and the prefix's block checked name by name; ghostty's test_shadertoy_crt and _focus compile, _invalid fails with glslc's words. Level A measured (Tracy, 200x60, Crt, idle 10 s): 215 chain-only redraws at 34 µs median CPU each, 6 core frames (957 µs) in the same time; the core's clock stays idle. Input is identity (test: the corner click with Crt on). The three bundled passes were rewritten: Crt without barrel or tube edge, scanlines and mask that average to one, dithered vignette; Ripple as rings in pixels, eased in, lit on their slopes in linear light, dithered; Glitch as short eased bursts of torn bands with an RGB split, keyed to iTime. Before/after stills for the user's judgement. | +| 10+ | `fx` bookmark: G1–G3 → feel review → G4 bundled → G5 lapis theme → P2s; tty T1–T2 → feel review → removals of audited effects (after user decision) → T3–T5 | each effect its own change, default off | + +Tests to add: fixed-clock animation tests (Tween/Spring closed form, retarget +velocity continuity, `nextWake` for each holding phase); region placement vs +old ad-hoc geometry (all layouts, tag_bottom, collapsed, multi-line tags); +contrast test (absolute targets on the native themes, relative rule on all themes × effect maxima); +settle tests (`nextWake` is null after every spring settles); Shadertoy prefix compile test with +ghostty's test shaders (`test_shadertoy_crt.glsl`, `_focus`, `_invalid`) and +uniform-offset checks against ghostty's `Uniforms` struct; tty byte budget test +(bytes per animated frame via the snapshot harness). + +Risks: the tag refactor moving under stages 4–7; body-layer join parity; glslang +build time and size (C++, ~minutes on the ~10 min build); machine-specific GPU +goldens; ssh/tty byte budgets; wire version bump breaks mixed-version attach. + +--------------------------------------------------------------------------------- + +## 14. Recorded open points (agreed with the adversary: not blockers) + +1. Selection colours: because ghostty swaps them (§6), Shadertoy shaders tuned + on ghostty will see iSelectionForeground and iSelectionBackground swapped in + pardes, which fills them by their GLSL names. Documented. +2. A same-tier cast shadow over a neighbour sits under that neighbour's + decor-over rings, because rings are drawn last. Accepted as the look; check it + in the feel review. +3. Gamma is a compromise (sRGB-space blending with pre-warped alpha). Coloured + glows keep a slightly dark falloff until the RGBA16F experiment is measured. +4. The macOS shell breaks at stages 7 and 8 (Layer ABI, mark_hover). Accepted, + since the macOS build is ignored for now. +5. Stage-0 GPU goldens gate locally only. +6. Revisit at the first visual stage (from stage 5): the notice layer lost + its hover word to keep the grid's behaviour. Notice words are Look/Exec + targets, so bring the hover affordance back in BOTH the grid and the + layer then. Done right after stage 8: a notice's word under the pointer + is lit as a header's is, in the layer and so in the grid's copy joined + from it. The same change deleted `mark_hover`, the `Cell.hover` bit and + the per-frame reset of it (never set since stage 5; macOS loses its + glass hover rect, accepted with open point 4). +7. Revisit at stage 8 (from stage 6): a body without context rows has no + layer (paint once, straight onto the grid). If the GUI is to read every + body from a layer, give every body one then and measure the copy. The + context-row path also still builds the body's text twice (a pre-pass + with body_rows 0 decides the context rows, renderBody builds it again at + the layer's rows); the paint is single. Measure both there. Decided at + stage 8, measured (Tracy, 200x60, TreeContext on a scrolled source, + ReleaseFast): the pre-pass text build is 5 µs median and the layer's + copies 10 µs per context-row body per frame. Kept as they are: nothing in + the GUI reads a layerless body from anything but the grid, which is + exact, so a layer for every body would be ~10 µs a body a frame for no + pixel. + +## 15. Questions for the user + +1. Lapis geometry: decorations inside existing chrome (gutter band, tag row, + thin edge rings; no layout change — recommended), or real pixel/cell gaps + between panes like the CSS page (layout + hit-testing change)? +2. Remove the six core-composed character transitions (ascii, edges, fall, + wave, scramble, typewriter) and GUI zoom/ripple/glitch? +3. Runtime shader compile: link glslang (C++, from ghostty's vendored pkg, + allocator-policy exception), or spawn `glslc` at load time (no new dep, needs + glslc installed)? +4. Focus lift/dim on by default once it passes the feel review, or opt-in? +5. Stage 2a corrects animation pacing (144 Hz is ~25% slow today, and ssh + drifts) while keeping every curve. OK as a bug fix inside the "no visual + change" phase? +6. Cursor blink: pardes never blinked. Keep it off by default (recommended), + with an opt-in eased square-wave blink? +7. Bundled CRT without barrel distortion (exact clicks, recommended), or barrel + plus keeping crt.zig's inverse mapping for the bundled shader? + +## Decisions (user, 2026-09-28) + +1. Lapis is drawn inside the existing pane chrome; no gaps between panes. +2. Keep every whimsical effect (the six terminal transitions, GUI zoom, ripple, + glitch): the problem is their quality, so polish each until it feels good + instead of removing it. +3. Shadertoy shaders are compiled by spawning `glslc`, not by linking glslang. +4. Focus lift/dim default: undecided, ask when that stage lands. +5. The animation pacing fix goes into the no-visual-change phase. +6. Cursor blink is on by default. +7. The bundled CRT has no barrel distortion, so clicks stay exact. +8. (After trying them live) Ripple and Glitch are removed entirely; Crt stays. diff --git a/docs/search-proto-converge.md b/docs/search-proto-converge.md new file mode 100644 index 00000000..7a3e361a --- /dev/null +++ b/docs/search-proto-converge.md @@ -0,0 +1,235 @@ +# Search, converged: the query pane + +The design the twelve prototypes added up to (CONVERGE.md), built as the +product in six changes. One pane kind does all searching: the **query +pane**, a `+Search` attached under the pane that asked (its *owner*), whose +body's line 1 is the query, typed into, and whose rows below are made live +from a source. The owner shows the set in its own text (its **places**: +tints, rail ticks, the current one selected), and a row that points at a +file no pane shows is shown in a **+Preview** attached under the query +pane. Everything on screen is text in a pane: B1/B2/B3 and the chords work +on all of it, nothing is drawn over anything, and the notice band keeps +only the prompts that are not search. + +## The pieces, and where they came from + +| piece | file | lifted from | +|---|---|---| +| attached panes: a group under its owner, rows from the owner alone, moving/folding/closing with it, seam drag, Dump/Restore, `Unattach` | `src/layout.zig` "Attached panes", `Pane.attached_to` | attached | +| places: every match tinted, rail ticks (B1 on a tick goes there), current selected and in view, smart-case regex, view-first sliced scan, silent wrap | `src/Places.zig`, `Pane.places` | incsearch (MatchSet) | +| the query pane: line 1, its first word the source, live rows, preview, Enter/Esc/Del, reuse, settings | `src/Query.zig`, `Pane.query` | queryline, pick, live, preview, everywhere | +| fuzzy names (files, recent, panes, declarations) | `src/Names.zig` | pick (its scorer, whole) | +| the disk engine: Grep and Find's listing on a worker, rg or the walk, generations, debounce, cap + `More`; and the declarations parse | `src/Stream.zig`, `Pardes.stream` | stream | +| the finder column (`SearchPlace column`) | `src/Finder.zig`, `Pardes.finder` | column | + +## Semantics + +**Line 1's first word names the source**; editing it changes the source. + +| line 1 | searches | keys | +|---|---|---| +| `/pat` | the owner's text, a regex, any case unless a capital | `/`, `*` (keyboard stays) | +| `Find name` | the files below the pane's directory, fuzzy | `SPC f f`, `Find` | +| `Grep text` | their lines, literally, smart case | `SPC f g`, `Grep` | +| `Recent name` | the files opened lately, fuzzy | `SPC f r`, `Recent` | +| `Panes name` | the open panes, fuzzy | `SPC b b`, `Panes` | +| `Symbols name` | the owner's declarations, fuzzy | `SPC s s` | +| `All pat` | every open pane's text, rows under `@pN name (count)` | `SPC /` | +| `Refs`, `Def`, `Impl`, `Diagnostics` | the language server's lists | `gr`, `gd`, `gi`, `]d`, ... | + +`Search <line 1>` is the builtin under the three argument paths +(`config.leader_args`, pick's table). + +**Rows look like Callstack's**: each row's place first, as text, +`path:line:col`, the path the shortest a Look from the query pane +resolves (relative to its directory, `../` included, when that is shorter, +else absolute; `Query.lookPath`), never an `@pN` but for a text with no +file, padded so a group's code starts in one column, then +the hit's line coloured as its file's language colours it, the match +tinted over that (every match on a line tinted, one row a line); under the +declaration it is in (once a parse exists, see below; the header has its +`path:line` too), under the file (Grep, the LSP lists), under `@pN name +(count)` in serial order (All). B3 on the address is a Look as anywhere, a +sweep copies it, and a frozen pane saved is a list of addresses that still +work; B3 on its code is a word Look; B2 on line 1 runs it again. The pane +has no gutter of its own, and its rows are read-only while live +(queryline's clampEdit). The address is on every row, `/`'s included: +a bare `:12:5` would be looked up in the +Search itself (a Look resolves +against the pane it is in), and a saved list would lose its file. + +The rows' colours are their files' whole (`Stream.paintRows`): a file is +painted once on the worker (`syntax.highlightApart`, the text of the pane +that shows it, else read there from disk), kept in the locations cache +beside Callstack's, and each row takes its line's slice when the line +still reads as the row does (`Query.Shades`, one walk down each file a +refill). Until then the rows are plain; when a file lands, every query +pane's plain rows from it are coloured in place (`Query.recolor`), which +asks for the next file, one at a time. Without workers (tests) the rows +stay plain. + +**The +Preview is the file as its own pane shows it**: its colours are +the file's (`colorAlgo` `.source`, painted ahead as any pane), and the +query's hits in it are its places (a Grep's searched there as in an open +pane, a list's fed from its rows), tinted and ticked, the current row's +one current and selected, centred with its neighbours round it. A pane +that already shows the file gets the same: its places, the row's one +selected. + +**Keys** on line 1, typing: Ctrl-n / Ctrl-p (and Down / Up, `config.query_next` +/ `query_prev`) step the current row; Enter lands; Esc cancels. Tab stays the +exec chord. In the pane's normal mode (live or frozen): n / N step its rows +(the caret with them when it is on them), j / k onto a row make it current, +Enter lands the current row. In the owner: n / N step its places, round the +end without a word; with no places (or after an `s` changed the register) +they are helix's register search as before. `]d` / `[d` step the +diagnostics' places once a Diagnostics query fed them. + +**A language server's list is answered, not typed.** `gd`, `gr`, `gi` +and `SPC l d` ask; the answer decides: one place is a jump (the keyboard +on it, the place that text's places, so it is tinted and n/N have it; no +query pane); several open the query pane with its rows there and the +keyboard in its normal mode on the current row (the first after where it +was asked), its target shown, so j/k/n/N step, Enter lands and Esc goes +back to the text as it was; none is a message. Line 1 reads `Refs` as text +(B2 asks again; editing it to `/x` works), but no language key puts the +keyboard there in insert mode. Diagnostics keep the keyboard in the text +so `]d`/`[d` step their places. `Symbols` (`SPC s s`) is fuzzy, typed +into: a query. + +**The current row shows its target**, the keyboard staying on line 1: a +place in an open pane's text is selected there and scrolled into view +(remembered for Esc); a file an open pane shows, its line there; any other +file in the +Preview. Only the keyboard moves it: Ctrl-n / Ctrl-p on line +1, n / N in the pane's normal mode, and j / k taking the caret onto a row +(a helix picker's preview follows its selection the same way). The mouse +never does: B1 (a click, a sweep, the chords) places the caret and selects +as in any pane, no other pane moves, nothing is previewed; B3 on a row's +address is a Look as anywhere, on its code a word Look; B2 on line 1 runs +it again. Enter lands the current row, which is the caret's once j / k put +it there, never a row B1 only clicked; Callstack has no current row apart +from its caret, so the two agree except after a click. The current row's +mark is its own, a row tint drawn from the current row under the match's +tint (`Query.paintMark`), no selection: a click, a sweep or a chord never +erases it and B2 / B3 on it take the word clicked, as on any row. + +**Enter** puts the keyboard on the current hit in its pane (the +Preview +promoted in place: same slot, serial, rect, an unattached file pane from +then on), fills `/`, and freezes the rows into ordinary text (tag ` Save +Unattach Del`). A `/` freezes its whole list (every place found first, 2000 +rows at most), a Grep every line it has. **Esc** while typing puts every +view back, clears the places it fed and closes the pane, its rows back to +the owner; a reused pane's frozen rows and their places come back instead. +**Del** closes it; closing the owner closes its group. + +**Nothing moves while you type.** The pane is born at tag + 1 + `SearchRows` +(8) rows out of the owner's rows alone, with its +Preview when the source +can preview (the owner's spare rows split between the two if it is short); +it never resizes, closes or rewrites line 1 by itself, and while typed line +1 never scrolls away (the live rows start two places before the current +one, so it sits under line 1). Zero hits is `0` in the tag. A preview made +later (line 1's word edited to a source that previews) takes rows from the +query pane's own bottom, so line 1 stays put; a reused pane gets its +preview at the key that asked. + +**Settings**: `SearchPlace attached|column`, `SearchPane reuse|new`, +`SearchRows N` (1-100). + +## Storyboards + +Text: `/` in the 1.2 MB stress file (playground `src/layout.zig` x23), +cursor on line 15000. + +| step | the screen | +|---|---| +| `/` | A `+Search` opens under layout.zig, taking 10 of its rows; line 1 reads `/`, the caret after it in insert mode; tag `^ +Search 0 Del`. Nothing else moves. | +| keystroke 1, `p` | Every `p` in the view tinted at once, the rest found a 4 ms slice a frame (the tag `1/38479+` until done); rail ticks fill in; the first `p` at or after the cursor selected in layout.zig (scrolled only if off screen). Rows: the lines holding `p`, each ` 15003 code`, from two before the current one, the current marked as the visited row, a note row above saying how many places come before them. | +| keystroke 2, `a` | `pa`: tints, ticks and rows narrow (`1/10189`); the current is again the first at or after where `/` was pressed, not after the last preview. The pane is the same size, line 1 where it was. | +| Ctrl-n / Ctrl-p | The next / previous `pa` current, selected in layout.zig; `2/10189`. | +| Enter | The keyboard on that `pa`, `pa` in `/`, the rows frozen (the whole list, 2000 rows), tag `+Search 2/10189 Save Unattach Del`; tints and ticks stay while the pane lives. Ctrl-o goes back to where `/` was pressed. | +| `n` | The next `pa` in layout.zig, `3/10189`, its row marked in the +Search. | +| `N` | Back to `2/10189`; from the first, round to the last with no message. | +| Esc (typing) | layout.zig's selection and scroll exactly as at `/`, tints and ticks gone, the +Search closed, its rows back to layout.zig. | + +Files: `SPC f f` from the playground's README.md, whose directory is the +playground's root (the snapshot `find.snap` runs the same steps). + +| step | the screen | +|---|---| +| `SPC f f` | The query pane under the pane with its +Preview under it, both out of that pane's rows; line 1 `Find `; the 15 files below the directory listed at once (rg `--files` on the worker; dot-files like `.fill-section.py` and .gitignore'd ones passed over), the first current; tag `1/15`. | +| keystroke 1, `l` | The names scored fuzzily (pick's scorer: segment starts, basename, camel humps), best first, the matched letters tinted: `src/layout.zig`, `src/locations.zig`, `open-all.sh`, `notes/helix-keys.md`, ...; the best current, its head in the +Preview; tag `1/7`. | +| keystroke 2, `a` | `la`: `src/layout.zig`, `src/locations.zig`; tag `1/2`, layout.zig's head in the preview. Nothing moves. | +| Ctrl-n / Ctrl-p | `src/locations.zig` current, its head in the preview. | +| Enter | The preview becomes `src/locations.zig`'s pane where it stands (same rect and serial); the list frozen above it. | +| `n` / `N` | In the query pane: the next / previous name current, shown in a new preview under it (or in its pane when open). In the opened file: helix's register search (a list of names has no places in a text). | +| Esc (typing) | The query pane and its preview closed, their rows back to the pane that asked; nothing opened. | + +Grep is Find's twin with rows under each file's name, run once the typing +pauses (80 ms), stopping at 2000 lines with `More` in the tag; hits in an +open file are that pane's places (n/N there). + +## Numbers + +Debug build (what the playground runs), 160x50, each step `update` + a full +render, machine load ~3. Unit tests `zz query timings` / `zz stream +timings` / `places: a big file...` (run with QUERY_TIMES / PLACES_TIMES). + +| what | cost | +|---|---| +| a cursor move and its frame, no search (baseline) | 0.70 ms | +| `/` opens | 1.05 ms | +| a keystroke of `/pane.v` (38 479 -> 276 places) | 3.0-3.5 ms | +| the ticks after it (7-11 of them, scan slice + rows every third) | worst 6.8-7.3 ms | +| an edit in the owner with the frozen pane open (insert `x` + a tick) | 8.3 ms mean, 10.9 worst | +| the same edit with no search | 7.5 ms | +| places' share of an edit on 1.9 MB (one-splice shift) | 0.44 ms | +| the declarations parse of the 1.2 MB file, on the worker | 474 ms, off the loop; worst frame meanwhile 7.5 ms | +| a keystroke once the rows are grouped under declarations | 4.4 ms | +| Grep race test: 2 engines x 12 rounds, a rogue thread pushing the stale generation | every round only B's lines land | + +So the search costs a keystroke ~2.5 ms over a plain frame and an edit +~0.8 ms, in Debug. Three fixes the numbers forced: `Text.primaryRange` +counted lines from the top for a selection's anchor on every call (18% of +a run; now through the line index, which also took the editor's own +insert-mode key on this file from 11.5 to 7.1 ms); live rows are a window +of 100 (the Debug SafeAllocator's stack capture per allocation was 30% at +1000 rows); the keystroke scans only the view. + +## What differs from CONVERGE, and why + +- **Declaration grouping is the worker's.** A tree-sitter parse of the + stress file is 4.8 s in Debug and the owner's "existing tree" exists only + with TreeContext on. The parse runs on the disk engine's worker with a + parser of its own (`syntax.declarationsApart`, cancellable through + tree-sitter's progress callback) and lands in the pane's + `context_declarations` (what sticky headers read); rows stay ungrouped + until then (live's trick). Without workers (tests) only texts under 64 KB + are parsed, on the loop. +- **Places shift on an edit** instead of being found again view-first: + `File.State.splice` records each edit's span, and the places before it + stay, those after move, only the touched lines are searched again. +- **Grep is literal** (smart case): rg's regex dialect is not mvzr's sam + rules (stream's call). `/` and All are regex. +- **All** follows the open panes (selection and scroll, put back on Esc) + rather than previewing a pane that is on screen anyway. +- **Terminals keep the band `/`**, as PDFs do: a terminal's text is no + `File`, and places need one. +- **A list's places feed every open file its rows land in**, not only the + owner (Refs in main.rs, asked from lib.rs: n/N in main.rs step them). +- **The live rows are a window**: 100 rows from two before the current + place; the whole list on Enter. +- A dumped query pane restores as a plain +Search, and a dumped finder + column as a plain column. + +## Rough + +- LookNext / LookPrev do not step query rows (their addresses are in row + metadata, not text). +- Rows of a file bigger than 4 MB, of markdown and typst (their + injections share parsers, so no worker paints them) stay plain; a disk + file changed after it was painted keeps plain rows for its changed + lines until the next Grep. +- Rail ticks are not carried over the detached wire (a detached frontend + shows tints, not ticks). +- In a window too short for the group (4 rows), only the query pane's tag + shows. +- The finder column keeps 8 query panes; older ones close. diff --git a/docs/selections.md b/docs/selections.md new file mode 100644 index 00000000..0817c215 --- /dev/null +++ b/docs/selections.md @@ -0,0 +1,150 @@ +# Selections + +How normal mode holds and changes its selections, and where that differs from +helix's `Selection` (a list of ranges over gap offsets, with a primary index). +Key-by-key behaviour is in docs/helix-keys.md; this is the model underneath. +"helix" here is the reference build docs/helix-keys.md names: `hx-harness` +at `694e7dfdd`, upstream `278b24389`. + +## What a selection is + +Every `Text` (src/Text.zig) has its own: a pane's body, its tag, a prompt's +answer, a column's or the workspace's tag. A selection is one primary range +plus others, up to `memory.limits.selections` in all (1024 on the +desktop, 64 on the board). + +- The PRIMARY is where the cursor always was: `cur_row`/`cur_col` is the + head, `vsel.row`/`vsel.col` the anchor while `vsel.active`, and a bare + cursor (inactive `vsel`) is the one-character range under it. `msel` is + the older whole-line form (`r0`..`r1`), kept for search-result highlights. +- The others are `sels[0..nsel]`, in room allocated when a second range + appears and given back when the selection is one range again (a column's + or the workspace's tag allocates from `Text.gpa`, any other text from its + pane's), each a `SelRange` of head and anchor plus + its own `j`/`k` goal column, in document order. The primary is not in the + list; `Text.ranges` slots it in and returns its index. +- Ends are CELLS, the characters a block cursor sits on, where helix's are + gaps between characters. `Text.cellRange`, `cellOffRange` and `rangeCells` + convert. A range covers at least one character, as in helix (min width 1), + so there are no empty ranges. +- `vsel.explicit` says the selection was made on purpose (`v`, `x`, `%`, + `s`, `n`/`N`, ...) rather than left behind by a motion. Only pardes reads + it: the look (Enter) and execute (Tab) chords act on explicit selections + and on the word under the cursor otherwise. +- `select` is `v` extend mode. `restore_cursor` says the insert session + began with `a`, so Esc gives each range back the character it was + stretched by. + +`Text.setRanges` is the one writer of a whole selection: it sorts by start, +merges ranges that overlap or share a start (helix `normalize`), follows the +primary through the merges, and keeps the first `max_selections`. `setRange` writes one +range and drops the others. + +## Making, splitting, merging, rotating, removing + +- Made several by `C`/`Alt-C` (copy to the next/previous line), `s` (every + match inside each range), `S` (the pieces between matches), `Alt-s` (one + per line), `<n>o`/`<n>O`, and `Alt-J` (the spaces a join put in). `s`/`S` + re-run on every keystroke from the selection the prompt opened on + (`Pane.sel_snap`); Esc is that snapshot restored. +- `K`/`Alt-K` keep or drop the ranges a regex matches in, on the `s` prompt; + `Alt-:` turns every range forward. +- `Alt-minus` merges all into one, `Alt-_` the consecutive ones, `_` trims + whitespace (dropping all-blank ranges). +- `)`/`(` rotate which range is primary; `Alt-)`/`Alt-(` rotate the TEXT + between ranges, the primary moving with its text. +- `,` keeps only the primary, `Alt-,` removes it (the next range takes over). +- After `s`, `S` and `Alt-s` the primary is the first range, which is + helix's behaviour (its own TODO), not a choice. + +## How a command reaches every range + +A parsed action has a scope (`modal.Normal.Action.scope`). + +- `per_selection` (motions, `d`, `c`, `y`, `p`, `r`, `~`, `>`, `ms`, ...): + `normal.replaySels` runs the ONE-range handler once per range, last range + first, each pass seeing a single selection. A pass's result is stored as + distances from the END of the text, which an edit at an earlier range + cannot move; `setRanges` then puts them back together. The mode, prefix + and select state that survive are the primary's pass. Insert-mode keys are + replayed the same way. +- `once` (the `multi` family, `s`/`S`, `J`/`Alt-J`, `Alt-(`/`Alt-)`, `&`, + `Ctrl-c`, undo/redo, builtins, search): one function takes `Text.ranges`, + makes one edit and hands the mapped ranges to `setRanges`, the way a helix + command builds one transaction. +- Anything that reaches outside the text (a builtin, a language query, a + look) runs once from the primary and drops back to one cursor + (`normal.multiOnce`). + +## Insert mode + +Each range lives on through insert mode. Every insert-mode edit happens at +the cursor, so `edit.insertKey` runs it on the bare cursor and then carries +the range through what it did to the text, with helix's `Range::map` rules: +at an insertion, a backward range's head and an empty range move past it +and a forward range's head stays before it, so typing slides an `i` range +and stretches an `a` range. Enter slides or stretches the range by what the +cursor moved; an arrow key collapses it. The other ranges get the same by +the replay. + +## Undo, registers, repeat + +- One keystroke is one undo step however many ranges it edited: only the + first replay pass records (`pushUndo`). +- An undo snapshot (`File.Snapshot`) holds the content and the PRIMARY + range. Undo puts the primary back and leaves the other ranges where they + were; helix restores the whole selection of that revision. +- Registers (`Registers.zig`) hold one value per range. A yank under the + replay fills slot `Pardes.multi_index` of `multi_count`, and `p`, `P`, `R` + and insert `Ctrl-r` read slot i at range i, the last value standing in + for missing ones. `"<reg>` names the register (`Pardes.register` for the + length of one command); `_ # . % /` are computed or special and `+`/`*` + is the system clipboard. The acme chords and a paste into a terminal read + the default register joined by newlines. The clipboard's read is an + answer from the shell that comes later, so `"+p` pastes once, at the + primary, and insert `Ctrl-r +` types what pardes last put on the + clipboard rather than asking the desktop. +- `Alt-.` repeats the last `f`/`t`/`F`/`T`. `.` and macros (`Q`/`q`) are + keys typed again (`Macro.zig`), so whatever those keys do to the ranges + happens again: there is no edit log underneath. + +## Where it differs from helix + +- Direction of a one-character range: both of its cells are the same cell, + so it has none. helix can flip one (`Alt-;`) and the commands that read + the head (`&`, the next extend) see the difference. +- Count: at most `memory.limits.selections` ranges (1024 on the desktop, 64 + on the board); matches past that are dropped silently. +- `n`/`N` walk the look ring (acme), not regex search hits, and there is no + `*`; helix-golf's `*`, `""N` and `n` do not apply. +- `s`/`S` match as sam does (docs/helix-keys.md, "Regex selection"): each + line is its own haystack, so `^`/`$` hold at every line and a class like + `\s` does not reach the newline unless the pattern names `\n`. +- Undo restores only the primary (above). + +## The mouse + +A B1, B2 or B3 sweep selects a stream, as acme's does (libframe +frselect.c:115): from the press to the end of its line, the lines between +whole, the last from its start to the release, the character under the +pointer included. A plain B1 click puts the caret on its cell. A second +plain click at the same cell within half a second is acme's double-click +(plan9port acme text.c:1407, textdoubleclick): just after `{ [ ( < «` or +just before their closers it selects up to the match, nested pairs +counted; at a line's start or end the whole line; just inside `' " \`` +the quoted text; anywhere else the word (letters, digits, `_` and any +non-ASCII character). It works in bodies, tags and a terminal in normal +mode; a terminal whose program has the tty gets its own clicks. + +A B2 or B3 pressed while B1 holds a sweep is acme's chord: B1-B2 cuts, +B1-B3 pastes over it. Everything done while B1 stays down is one undo +step, as acme marks the file once per B1 hold (text.c:881, textselect), so +B1-B2 then B1-B3 is a copy: the text cut and pasted back, the cut text +left in the register. + +A B1 sweep held past a pane's top (on its tag) or bottom (past it, or on +its last row when the pane reaches the screen's bottom, which the pointer +cannot leave) scrolls the body a line a tick, as acme's frselect scrolls, +the sweep's end under the pointer and its start on its text. A sweep that +scrolled ends as the text's own selection, from where it began to where it +ended. B2 and B3 sweeps do not scroll. diff --git a/docs/shared-libs.md b/docs/shared-libs.md new file mode 100644 index 00000000..79f3cdb9 --- /dev/null +++ b/docs/shared-libs.md @@ -0,0 +1,120 @@ +# One copy of each library + +The policy (2026-09-24): + +- **One copy per library in a binary.** When a dependency bundles a library + the build also has, a build change makes it use the build's copy. Duplicates + link silently: same symbol names, the linker keeps one of each, and the two + copies were compiled with different options. +- **Every C library allocates through a Zig allocator** where it has a hook, + so tests run its allocations under the Debug allocator. +- **Patches to fetched packages are applied in build.zig at build time**, each + behind a count-checked anchor (as for vaxis and mvzr), because a fresh fetch + would clobber a patch made in zig-pkg. +- **This file lists what is shared, and where the policy could not be met.** + +`zig build shared-libs-check -Dplatform=tty|gui` (it also runs with every +`unit-test`) reads the linked binary's ELF symbol table. It fails when a family +the build chose against is linked again: stb_image's PNG, JPEG or inflate +beside wuffs, a second stb_image, stb_image_write's deflate, a second zlib, or +a second FreeType (tools/shared_libs_check.zig). It counts static functions +too, and several functions per family, because a release build inlines some +of them. + +## Inventory (ghostty 1.4.0, 2026-10-28) + +Sizes are function bytes in the ReleaseFast symbol tables (`nm -S`). The tty +and gui columns are the two binaries. + +| Job | Implementation | Who uses it | Copies before → after | Bytes before → after (tty / gui) | Allocator | +|---|---|---|---|---|---| +| PNG decode | wuffs (ghostty-vt's `pkg/wuffs`) | ghostty-vt; **now pardes's image panes and its kitty `f=100` hook** | 1 → 1 | 35.0 KiB, unchanged (already linked: wuffs's function tables keep its decoders in) | Zig allocator: ghostty's wrapper allocates every work buffer | +| PNG decode | stb_image (zstbi) | image panes, kitty `f=100` | 1 / 2 → **0** | 17.9 / 25.2 KiB → 0 | removed | +| PNG and JPEG decode | SDL's private stb_image (`SDL_stb.c`) | `SDL_LoadPNG` and camera MJPEG, which pardes never calls | gui 1 → **0** (`SDL_DISABLE_STB`) | counted in the stb rows; glue 4.9 → 0.6 KiB | (SDL_malloc) | +| PNG decode | MuPDF's `fz_load_png` (on our zlib) | `fz_new_image_from_buffer` only, which PDF rendering does not call | 1 → 1 | 6.3 KiB | fz allocator | +| JPEG decode | wuffs | **now image panes** | 1 → 1 | 39.4 KiB, unchanged | Zig allocator | +| JPEG decode | stb_image | image panes | 1 / 2 → **0** | 18.1 / 38.1 KiB → 0 | removed | +| JPEG decode | MuPDF's libjpeg | PDF `DCTDecode` | 1 → 1 | 114.9 KiB | fz allocator (MuPDF's memory manager) | +| GIF, BMP, TGA, PSD, HDR, PIC, PNM | stb_image | image panes | 1 → 1 | 22.3 KiB | Zig allocator (`zstbi.init`) | +| Image resize | stb_image_resize | image panes (downscale) | 1 → 1 | 28.4 KiB | Zig allocator | +| Image write (and its deflate) | stb_image_write | nothing | 1 → **0** (patched out of zstbi.c) | 30.6 KiB → 0 | removed | +| Inflate | zlib (allyourcodebase) | FreeType gzip, MuPDF `FlateDecode` | 1 → 1 (MuPDF links FreeType's, mupdf.zig) | 15.5 + 9.7 + 4.6 KiB | per stream: MuPDF's `fz_zlib_alloc`, FreeType's `FT_Memory` | +| Inflate | wuffs zlib/deflate | ghostty-vt: kitty `o=z` | 1 → 1 | 17.2 KiB | Zig allocator | +| Inflate | stb_image's own | stb PNG | 1 / 2 → **0** | 1.1 / 2.3 KiB → 0 (most of it was inlined into the PNG decoder) | removed | +| Fonts | FreeType (allyourcodebase) | gui glyph atlas, MuPDF (built against it, not its slim bundle) | 1 → 1 | 331 KiB | gui: `ui_malloc` (c_heap); MuPDF's library: `FT_MemoryRec` on fz | +| Shaping | HarfBuzz 11.0.0 (the tarball ghostty pins) | gui | 1 → 1 | 143 KiB | `hb_*_impl` → `ui_*` | +| JPEG 2000, JBIG2 | openjpeg, jbig2dec (inside MuPDF) | PDF | 1 → 1 | 66 KiB (jbig2) | `fz_opj_malloc`, `Jbig2Allocator` on fz | +| Unicode properties | uucode | ghostty-vt, vaxis, pardes: one module (`external_uucode`) | 1 → 1 | | Zig | +| UTF-8, base64 (SIMD) | simdutf, highway | ghostty-vt | 1 → 1 | 206 KiB (debug) | none: allocates nothing in these paths | +| Regex | mvzr | pardes | 1 → 1 | 17 KiB | Zig | +| Parsing | tree-sitter | pardes | 1 → 1 | | `ts_set_allocator` → c_heap | +| Window, input, GPU | SDL 3.4.18 | gui | 1 → 1 | 1009 KiB | `SDL_SetMemoryFunctions` | + +Text section: tty 61,369,343 → 61,294,855 bytes (**−74,488**); gui +67,336,392 → 67,182,000 bytes (**−154,392**). + +## What changed (this change) + +- **PNG and JPEG are wuffs's**, the decoders ghostty itself uses. image.zig + calls them wherever ghostty-vt is in the build (`wuffs_images`). Each image + is sized from its header first: PNG's IHDR, JPEG's first SOF. Other formats, + and builds without ghostty-vt (esp32p4, web), stay on stb_image. +- **zstbi is compiled with `-DSTBI_NO_PNG -DSTBI_NO_JPEG`.** That also drops + stb's inflate, which only PNG used. Its `stb_image_write` include is patched + out (one count-checked anchor), with a no-op `stbi_flip_vertically_on_write` + left for `zstbi.deinit`. Both happen in build.zig, so a fresh fetch keeps + them. +- **SDL is compiled with `SDL_DISABLE_STB`.** `SDL_LoadPNG` and MJPEG camera + frames then report unsupported; pardes calls neither. + +## Where one copy was not possible + +- **Two inflates: zlib and wuffs.** FreeType and MuPDF call zlib's C API + (`inflateInit2_`, `inflate`, raw and zlib streams). ghostty-vt calls + `wuffs.zlib.decode` for kitty `o=z`. One of them would have to go: + - Dropping zlib needs a zlib-API shim over wuffs's streaming decoder. + - Dropping wuffs needs a patch to ghostty's `graphics_image.zig` that points + away from ghostty's own choice. + + Neither is small, and each copy is about 17 KiB. +- **Two JPEG decoders: MuPDF's libjpeg and wuffs.** MuPDF's `DCTDecode` filter + (`filter-dct.c`) is written against libjpeg's streaming source-manager API. + Moving PDFs onto wuffs means a new DCT filter for fitz. Moving image panes + onto libjpeg instead would leave the builds without MuPDF (esp32p4, web) + with no JPEG decoder. +- **MuPDF's fitz image loaders** (`fz_load_png`, `_jpeg`, `_gif`, `_bmp`, + `_tiff`, `_pnm`, `_psd`; 16.7 KiB together). They are compiled because + mupdf.zig builds all of `source/fitz`. They are reachable only through + `fz_new_image_from_buffer`, which PDF rendering does not call. Dropping + them means stubbing fitz's image-type dispatch (`image.c`) at build time. + Left in. +- **base64**: + - Zig's `std.base64`: pardes (dumps, the tty's kitty output) and vaxis. + - simdutf's: ghostty-vt, for kitty payloads. + - MuPDF's own: unused paths. + + Pure Zig beside C++, so lower priority. Going through simdutf from pardes + would mean importing ghostty's SIMD module surface. +- **Unicode text**: uucode is shared. Each of these still carries its own + UTF-8 and property code for its own job: + - ghostty's generated `unicode_tables` (built from the same uucode); + - HarfBuzz's UCD; + - SDL's `SDL_utf8*`; + - MuPDF's `fz_chartorune`; + - simdutf. + + None of them is a separate copy of the same library. +- **Image scaling**: stb_image_resize (image panes) beside MuPDF's pixmap + scaler and SDL's blitter. These are three algorithms with different jobs, + not one library twice. +- **Zig's `std.compress.flate`** (15 KiB): std.debug pulls it in to read + compressed debug sections for stack traces. It is not a codec pardes + calls. +- **zigimg** (vaxis's image loader, pure Zig): vaxis only uses it to load + images from paths, which pardes never asks for. Zig compiles only what is + referenced, so none of it is linked. +- **libc++**: simdutf's build links Zig's bundled libc++ (`link_libcpp` unless + MSVC). It is one copy, and its `new`/`delete` go to libc's malloc, not a Zig + allocator. +- **simdutf and highway**: no allocator hook, and none needed; the paths + ghostty uses allocate nothing (`HWY_NO_LIBCXX`, `SIMDUTF_NO_LIBCXX`). diff --git a/docs/site/README b/docs/site/README new file mode 100644 index 00000000..41804163 --- /dev/null +++ b/docs/site/README @@ -0,0 +1,28 @@ +docs/site: the pardes website, built from docs/typ + + site.typ the wrapper: every page, the shared tag-line header and + chapter nav, the landing page, and the files it ships. + Pages come from `chapters` in ../typ/style.typ, so a new + chapter is a new page; #doc links resolve across pages. + site.css the whole look (lapis layout from 0x4200.cafe in + pardes's orchard greens; forestbones_light when the + reader prefers light). + fonts/ Departure Mono and Crimson Pro, both SIL OFL, licences + alongside. + media/clips.toml the landing page's recordings, in order: name, caption, + ready. For a clip named N the site ships media/N.webm, + media/N.mp4 and media/N.png (the poster); until `ready` + is true it shows placeholder.svg instead. + casts/casts.toml the terminal recordings (asciicast v2), in order: name, + title, caption, cols, rows, ready; casts/N.cast each. + test/record_casts.py records them from a tty pardes + and writes this file. + +Build (from the repo root): + + typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT + zig build site -Dplatform=tty --prefix DIR # DIR/share/doc/pardes/site/ + +Every page sits at the top of OUT and every link is relative, so the site +works from file:// and from any static server. The only prose of the +site's own is the landing page; everything else is included from docs/typ. diff --git a/docs/site/casts/casts.toml b/docs/site/casts/casts.toml new file mode 100644 index 00000000..9cf8afb6 --- /dev/null +++ b/docs/site/casts/casts.toml @@ -0,0 +1,33 @@ +# The landing page's terminal recordings (asciicast v2), in the order +# shown: casts/<name>.cast for each. Each plays by itself while on screen; all loop +# and fit the page's width. While `ready` is false the cast shows +# placeholder.svg, so the site builds before a recording exists. +# `poster_at` is the second whose frame stands for the cast before it plays. +# test/record_casts.py writes the casts and this file. + +[[cast]] +name = "live-text" +title = "Live text" +caption = "Rename a variable with helix keys, middle-click make, right-click the error." +cols = 100 +rows = 30 +ready = true +poster_at = 14 + +[[cast]] +name = "terminals" +title = "Terminals as panes" +caption = "A shell beside a file: Ctrl-b, copy a line, page git log." +cols = 100 +rows = 30 +ready = true +poster_at = 11 + +[[cast]] +name = "petscii" +title = "Images and PDFs in a plain terminal" +caption = "No kitty graphics: a Mandelbrot in PETSCII, then the Intel manual searched." +cols = 100 +rows = 30 +ready = true +poster_at = 3 diff --git a/docs/site/casts/live-text.cast b/docs/site/casts/live-text.cast new file mode 100644 index 00000000..66240f6b --- /dev/null +++ b/docs/site/casts/live-text.cast @@ -0,0 +1,44 @@ +{"version": 2, "width": 100, "height": 30, "title": "Live text", "env": {"TERM": "xterm-256color", "SHELL": "/bin/sh"}} +[0.0, "o", "\u001b[?25l\u001b[0m\u001b[2J\u001b[1;1H\u001b[0;38;2;178;195;184;48;2;29;40;36mNewcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit\u001b[0;39;48;2;29;40;36m \u001b[2;1H\u001b[0;38;2;255;255;255;48;2;136;116;85m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;49;71;56m \u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello/\u001b[0;38;2;223;188;229;48;2;49;71;56mmain.c\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del TreeContext\u001b[0;39;48;2;49;71;56m \u001b[4;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;97;111;100;48;2;13;20;16;1m 1 \u001b[0;38;2;201;167;237;48;2;13;20;16m#include\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;184;216;138;48;2;13;20;16m<stdio.h>\u001b[0;39;48;2;13;20;16m \u001b[5;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 2 \u001b[0;39;48;2;13;20;16m \u001b[6;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 3 \u001b[0;38;2;201;167;237;48;2;13;20;16mstatic\u001b[0;38;2;229;238;229;48;2;13;20;16m int square(int n)\u001b[0;39;48;2;13;20;16m \u001b[7;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[0;38;2;229;238;229;48;2;13;20;16m{\u001b[0;39;48;2;13;20;16m \u001b[8;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 5 \u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;201;167;237;48;2;13;20;16mreturn\u001b[0;38;2;229;238;229;48;2;13;20;16m n * n;\u001b[0;39;48;2;13;20;16m \u001b[9;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;38;2;229;238;229;48;2;13;20;16m}\u001b[0;39;48;2;13;20;16m \u001b[10;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 7 \u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 8 \u001b[0;38;2;229;238;229;48;2;13;20;16mint main(void)\u001b[0;39;48;2;13;20;16m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 9 \u001b[0;38;2;229;238;229;48;2;13;20;16m{\u001b[0;39;48;2;13;20;16m \u001b[13;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 10 \u001b[0;38;2;229;238;229;48;2;13;20;16m int sum = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0;39;48;2;13;20;16m \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 11 \u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;201;167;237;48;2;13;20;16mfor\u001b[0;38;2;229;238;229;48;2;13;20;16m (int i = \u001b[0;38;2;248;192;130;48;2;13;20;16m1\u001b[0;38;2;229;238;229;48;2;13;20;16m; i <= \u001b[0;38;2;248;192;130;48;2;13;20;16m4\u001b[0;38;2;229;238;229;48;2;13;20;16m; i++)\u001b[0;39;48;2;13;20;16m \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 12 \u001b[0;38;2;229;238;229;48;2;13;20;16m sum += square(i);\u001b[0;39;48;2;13;20;16m \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 13 \u001b[0;38;2;229;238;229;48;2;13;20;16m printf(\u001b[0;38;2;184;216;138;48;2;13;20;16m\"squares: %d\\n\"\u001b[0;38;2;229;238;229;48;2;13;20;16m, sum);\u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 14 \u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;201;167;237;48;2;13;20;16mreturn\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[0;39;48;2;13;20;16m \u001b[18;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 15 \u001b[0;38;2;229;238;229;48;2;13;20;16m}\u001b[0;39;48;2;13;20;16m \u001b[19;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 16 \u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[30;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[4;8H\u001b[?25h"] +[1.6, "o", "\u001b[4;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 1 \u001b[5;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 2 \u001b[0m\u001b[5;8H\u001b[?25h"] +[1.73, "o", "\u001b[5;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 2 \u001b[6;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 3 \u001b[0m\u001b[6;8H\u001b[?25h"] +[1.86, "o", "\u001b[6;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 3 \u001b[7;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 4 \u001b[0m\u001b[7;8H\u001b[?25h"] +[1.99, "o", "\u001b[7;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[8;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 5 \u001b[0m\u001b[8;8H\u001b[?25h"] +[2.12, "o", "\u001b[8;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 5 \u001b[9;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 6 \u001b[0m\u001b[9;8H\u001b[?25h"] +[2.25, "o", "\u001b[9;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[10;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 7 \u001b[0m\u001b[10;8H\u001b[?25h"] +[2.38, "o", "\u001b[10;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 7 \u001b[11;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 8 \u001b[0m\u001b[11;8H\u001b[?25h"] +[2.51, "o", "\u001b[11;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 8 \u001b[12;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 9 \u001b[0m\u001b[12;8H\u001b[?25h"] +[2.64, "o", "\u001b[12;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 9 \u001b[13;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 10 \u001b[0m\u001b[13;8H\u001b[?25h"] +[3.07, "o", "\u001b[13;8H\u001b[0;38;2;245;247;238;48;2;60;97;74m \u001b[0m\u001b[13;11H\u001b[?25h"] +[3.29, "o", "\u001b[13;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0;38;2;245;247;238;48;2;60;97;74mint \u001b[0m\u001b[13;15H\u001b[?25h"] +[3.51, "o", "\u001b[13;12H\u001b[0;38;2;229;238;229;48;2;13;20;16mint\u001b[13;16H\u001b[0;38;2;245;247;238;48;2;60;97;74msum\u001b[0m\u001b[13;18H\u001b[?25h"] +[4.3, "o", "\u001b[13;15H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0m\u001b[13;18H\u001b[?25h"] +[5.0, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m^\u001b[0;38;2;0;0;0;48;2;249;203;112;1m*\u001b[13;16H\u001b[0;38;2;229;238;229;48;2;13;20;16m = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[13;22H\u001b[0;38;2;185;244;128;48;2;13;20;16m/*\u001b[13;25H1 + 4 + 9 + 16\u001b[13;40H*/\u001b[13;43H\u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[13;16H\u001b[?25h"] +[5.3, "o", "\u001b[13;16H\u001b[0;38;2;229;238;229;48;2;13;20;16mt = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0m\u001b[13;17H\u001b[?25h"] +[5.39, "o", "\u001b[13;17H\u001b[0;38;2;229;238;229;48;2;13;20;16mo = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0m\u001b[13;18H\u001b[?25h"] +[5.48, "o", "\u001b[13;18H\u001b[0;38;2;229;238;229;48;2;13;20;16mt = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0m\u001b[13;19H\u001b[?25h"] +[5.57, "o", "\u001b[13;19H\u001b[0;38;2;229;238;229;48;2;13;20;16ma = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0m\u001b[13;20H\u001b[?25h"] +[5.66, "o", "\u001b[13;20H\u001b[0;38;2;229;238;229;48;2;13;20;16ml = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m; \u001b[0;38;2;185;244;128;48;2;13;20;16m/* 1 + 4 + 9 + 16 */\u001b[0m\u001b[13;21H\u001b[?25h"] +[5.96, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0m\u001b[13;21H\u001b[?25h"] +[6.56, "o", "\u001b[4;96H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mSPC\u001b[0;39;48;2;29;40;36m \u001b[0m\u001b[13;21H\u001b[?25h"] +[6.78, "o", "\u001b[4;94H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mSPC f\u001b[0m\u001b[13;21H\u001b[?25h"] +[7.0, "o", "\u001b[3;2H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[4;61H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m--:--:-- saved /tmp/cast/hello/main.c\u001b[0m\u001b[13;21H\u001b[?25h"] +[8.1, "o", "\u001b[4;61H\u001b[0;39;48;2;13;20;16m \u001b[13;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 10 \u001b[0m\u001b[3;60H\u001b[?25h"] +[8.4, "o", "\u001b[0m\u001b[3;61H\u001b[?25h"] +[8.49, "o", "\u001b[3;61H\u001b[0;38;2;190;207;196;48;2;49;71;56mm\u001b[0m\u001b[3;62H\u001b[?25h"] +[8.58, "o", "\u001b[3;62H\u001b[0;38;2;190;207;196;48;2;49;71;56ma\u001b[0m\u001b[3;63H\u001b[?25h"] +[8.67, "o", "\u001b[3;63H\u001b[0;38;2;190;207;196;48;2;49;71;56mk\u001b[0m\u001b[3;64H\u001b[?25h"] +[8.76, "o", "\u001b[3;64H\u001b[0;38;2;190;207;196;48;2;49;71;56me\u001b[0m\u001b[3;65H\u001b[?25h"] +[9.46, "o", "\u001b[3;61H\u001b[0;38;2;245;247;238;48;2;91;126;90mmake \u001b[0m\u001b[3;65H\u001b[?25h"] +[10.26, "o", "\u001b[3;61H\u001b[0;38;2;190;207;196;48;2;49;71;56mmake\u001b[0;39;48;2;49;71;56m \u001b[4;95H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mExec\u001b[0;39;48;2;29;40;36m \u001b[14;1H\u001b[0;39;48;2;21;32;25m \u001b[15;1H \u001b[16;1H \u001b[17;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello (make) exit 2 Kill Save Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[18;3H\u001b[0;38;2;229;238;229;48;2;13;20;16m%\u001b[18;5Hmake\u001b[19;3Hmain.c:\u001b[19;11HIn\u001b[19;14Hfunction\u001b[19;23H‘main’:\u001b[20;3Hmain.c:12:9:\u001b[20;16Herror:\u001b[20;23H‘sum’\u001b[20;29Hundeclared\u001b[20;40H(first\u001b[20;47Huse\u001b[20;51Hin\u001b[20;54Hthis\u001b[20;59Hfunction)\u001b[21;3Hmain.c:12:9:\u001b[21;16Hnote:\u001b[21;22Heach\u001b[21;27Hundeclared\u001b[21;38Hidentifier\u001b[21;49His\u001b[21;52Hreported\u001b[21;61Honly\u001b[21;66Honce\u001b[21;71Hfor\u001b[21;75Heach\u001b[21;80Hfunction\u001b[21;89Hit\u001b[21;92Happears\u001b[21;100Hi\u001b[22;3Hn\u001b[23;3Hmain.c:10:9:\u001b[23;16Hwarning:\u001b[23;25Hunused\u001b[23;32Hvariable\u001b[23;41H‘total’\u001b[24;3Hmake:\u001b[24;9H***\u001b[24;13H[Makefile:4:\u001b[24;26Hhello]\u001b[24;33HError\u001b[24;39H1\u001b[25;3Hexit\u001b[25;8H2\u001b[0m\u001b[3;65H\u001b[?25h"] +[12.26, "o", "\u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello/\u001b[0;38;2;211;176;217;48;2;29;40;36mmain.c\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del TreeContext make\u001b[0;39;48;2;29;40;36m \u001b[4;95H\u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello (make) exit 2 Kill Save Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[20;3H\u001b[0;38;2;245;247;238;48;2;107;120;88mmain.c:12:9:\u001b[0m\u001b[26;3H\u001b[?25h"] +[13.06, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello/\u001b[0;38;2;223;188;229;48;2;49;71;56mmain.c\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del TreeContext make\u001b[0;39;48;2;49;71;56m \u001b[4;1H\u001b[0;39;48;2;21;32;25m \u001b[4;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m6\u001b[4;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m}\u001b[0;39;48;2;13;20;16m \u001b[4;17H \u001b[5;1H\u001b[0;39;48;2;21;32;25m \u001b[5;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m7\u001b[6;1H\u001b[0;39;48;2;21;32;25m \u001b[6;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m8\u001b[6;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mint main(void)\u001b[0;39;48;2;13;20;16m \u001b[6;30H \u001b[7;1H\u001b[0;39;48;2;21;32;25m \u001b[7;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m9\u001b[8;5H10\u001b[8;12H\u001b[0;38;2;229;238;229;48;2;13;20;16mint total = \u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[8;27H\u001b[0;38;2;185;244;128;48;2;13;20;16m/*\u001b[8;30H1\u001b[8;32H+\u001b[8;34H4\u001b[8;36H+\u001b[8;38H9\u001b[8;40H+\u001b[8;42H16\u001b[8;45H*/\u001b[9;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m11\u001b[9;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[9;12H\u001b[0;38;2;201;167;237;48;2;13;20;16mfor\u001b[9;16H\u001b[0;38;2;229;238;229;48;2;13;20;16m(int\u001b[9;21Hi\u001b[9;23H=\u001b[9;25H\u001b[0;38;2;248;192;130;48;2;13;20;16m1\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[9;28Hi\u001b[9;30H<=\u001b[9;33H\u001b[0;38;2;248;192;130;48;2;13;20;16m4\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[9;36Hi++)\u001b[10;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 12 \u001b[10;16H\u001b[0;38;2;229;238;229;48;2;13;20;16msum\u001b[10;20H+=\u001b[10;23Hsquare(i);\u001b[11;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m13\u001b[11;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[11;12Hpr\u001b[11;16Htf(\u001b[0;38;2;184;216;138;48;2;13;20;16m\"squares:\u001b[11;29H%d\\n\"\u001b[0;38;2;229;238;229;48;2;13;20;16m,\u001b[11;36Hsum);\u001b[12;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m14\u001b[12;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[12;12H\u001b[0;38;2;201;167;237;48;2;13;20;16mreturn\u001b[12;19H\u001b[0;38;2;248;192;130;48;2;13;20;16m0\u001b[0;38;2;229;238;229;48;2;13;20;16m;\u001b[13;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m5\u001b[13;8H\u001b[0;38;2;229;238;229;48;2;13;20;16m}\u001b[13;12H\u001b[0;39;48;2;13;20;16m \u001b[13;16H \u001b[13;22H \u001b[13;24H \u001b[13;27H \u001b[13;30H \u001b[13;32H \u001b[13;34H \u001b[13;36H \u001b[13;38H \u001b[13;40H \u001b[13;42H \u001b[13;45H \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[14;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m6\u001b[14;12H\u001b[0;39;48;2;13;20;16m \u001b[14;16H \u001b[14;21H \u001b[14;23H \u001b[14;25H \u001b[14;28H \u001b[14;30H \u001b[14;33H \u001b[14;36H \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[15;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[15;16H\u001b[0;39;48;2;13;20;16m \u001b[15;20H \u001b[15;23H \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[16;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[16;12H\u001b[0;39;48;2;13;20;16m \u001b[16;29H \u001b[16;36H \u001b[17;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello (make) exit 2 Kill Save Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[20;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mmain.c:12:9:\u001b[0m\u001b[10;16H\u001b[?25h"] +[15.06, "o", "\u001b[10;16H\u001b[0;38;2;245;247;238;48;2;60;97;74msum\u001b[0m\u001b[10;18H\u001b[?25h"] +[15.66, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m^\u001b[0;38;2;0;0;0;48;2;249;203;112;1m*\u001b[10;16H\u001b[0;38;2;229;238;229;48;2;13;20;16m +=\u001b[10;20Hsquare(i);\u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[10;16H\u001b[?25h"] +[15.96, "o", "\u001b[10;16H\u001b[0;38;2;229;238;229;48;2;13;20;16mt += square(i);\u001b[0m\u001b[10;17H\u001b[?25h"] +[16.05, "o", "\u001b[10;17H\u001b[0;38;2;229;238;229;48;2;13;20;16mo += square(i);\u001b[0m\u001b[10;18H\u001b[?25h"] +[16.14, "o", "\u001b[10;18H\u001b[0;38;2;229;238;229;48;2;13;20;16mt += square(i);\u001b[0m\u001b[10;19H\u001b[?25h"] +[16.23, "o", "\u001b[10;19H\u001b[0;38;2;229;238;229;48;2;13;20;16ma += square(i);\u001b[0m\u001b[10;20H\u001b[?25h"] +[16.32, "o", "\u001b[10;20H\u001b[0;38;2;229;238;229;48;2;13;20;16ml += square(i);\u001b[0m\u001b[10;21H\u001b[?25h"] +[16.62, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0m\u001b[10;21H\u001b[?25h"] +[18.62, "o", ""] diff --git a/docs/site/casts/petscii.cast b/docs/site/casts/petscii.cast new file mode 100644 index 00000000..466dd3c7 --- /dev/null +++ b/docs/site/casts/petscii.cast @@ -0,0 +1,39 @@ +{"version": 2, "width": 100, "height": 30, "title": "Images and PDFs in a plain terminal", "env": {"TERM": "xterm-256color", "SHELL": "/bin/sh"}} +[0.0, "o", "\u001b[?25l\u001b[0m\u001b[2J\u001b[1;1H\u001b[0;38;2;178;195;184;48;2;29;40;36mNewcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit\u001b[0;39;48;2;29;40;36m \u001b[2;1H\u001b[0;38;2;255;255;255;48;2;136;116;85m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;49;71;56m \u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/art/\u001b[0;38;2;223;188;229;48;2;49;71;56mREADME\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[4;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;97;111;100;48;2;13;20;16;1m 1 \u001b[0;38;2;229;238;229;48;2;13;20;16mpictures, right-click a name:\u001b[0;39;48;2;13;20;16m \u001b[5;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 2 \u001b[0;39;48;2;13;20;16m \u001b[6;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 3 \u001b[0;38;2;229;238;229;48;2;13;20;16m mandelbrot.png the whole set\u001b[0;39;48;2;13;20;16m \u001b[7;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[0;38;2;229;238;229;48;2;13;20;16m seahorse.png a seahorse valley, zoomed in\u001b[0;39;48;2;13;20;16m \u001b[8;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 5 \u001b[0;38;2;229;238;229;48;2;13;20;16m sdm.pdf Intel SDM vol. 2, 2,515 pages\u001b[0;39;48;2;13;20;16m \u001b[9;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;39;48;2;13;20;16m \u001b[10;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[13;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[18;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[19;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[30;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[4;8H\u001b[?25h"] +[1.6, "o", "\u001b[6;10H\u001b[0;38;2;245;247;238;48;2;107;120;88mmandelbrot.png \u001b[0m\u001b[4;8H\u001b[?25h"] +[2.1, "o", "\u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/art/\u001b[0;38;2;211;176;217;48;2;29;40;36mREADME\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[4;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 1 \u001b[6;10H\u001b[0;38;2;229;238;229;48;2;13;20;16mmandelbrot.png \u001b[8;1H\u001b[0;39;48;2;21;32;25m \u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mimg petscii:off palette:commodore ascii:on /tmp/cast/art/\u001b[0;38;2;223;188;229;48;2;49;71;56mmandelbrot.png\u001b[0;38;2;190;207;196;48;2;49;71;56m Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[10;1H\u001b[0;39;48;2;21;32;25m \u001b[10;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝🬎\u001b[0;38;2;112;164;178;48;2;108;94;181m🬹🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▙🬒🬬🬎█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█🬱\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[11;1H\u001b[0;39;48;2;21;32;25m \u001b[11;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝▀~\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝🬝\u001b[0;38;2;255;255;255;48;2;112;164;178m🬜\u001b[0;38;2;255;255;255;48;2;0;0;0m🬬\u001b[0;38;2;112;164;178;48;2;255;255;255m▜█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;112;164;178m🬊█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[12;1H\u001b[0;39;48;2;21;32;25m \u001b[12;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝▀\u001b[0;38;2;112;164;178;48;2;108;94;181m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬺\u001b[0;38;2;255;255;255;48;2;184;199;111m🬴\u001b[0;38;2;0;0;0;48;2;184;199;111m▄🬻🬺▖\u001b[0;38;2;255;255;255;48;2;184;199;111m▜\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬺\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[13;1H\u001b[0;39;48;2;21;32;25m \u001b[13;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█🬆\u001b[0;38;2;112;164;178;48;2;108;94;181m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬬🬎🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝\u001b[0;38;2;255;255;255;48;2;112;164;178m__\u001b[0;38;2;255;255;255;48;2;184;199;111m🬲\u001b[0;38;2;0;0;0;48;2;184;199;111m🬬\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m🬕\u001b[0;38;2;184;199;111;48;2;255;255;255m^\u001b[0;38;2;255;255;255;48;2;112;164;178m_\u001b[0;38;2;112;164;178;48;2;255;255;255m█🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬺\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[14;1H\u001b[0;39;48;2;21;32;25m \u001b[14;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝\u001b[0;38;2;112;164;178;48;2;108;94;181m▄█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;255;255;255;48;2;112;164;178m🬫\u001b[0;38;2;184;199;111;48;2;0;0;0m▛\u001b[0;38;2;0;0;0;48;2;112;164;178m▄_🬭\u001b[0;38;2;0;0;0;48;2;184;199;111m🬹\u001b[0;38;2;0;0;0;48;2;111;79;37m🬹\u001b[0;38;2;0;0;0;48;2;104;55;43m🬹\u001b[0;38;2;111;79;37;48;2;0;0;0m~\u001b[0;38;2;0;0;0;48;2;67;57;0m█\u001b[0;38;2;0;0;0;48;2;111;79;37m█\u001b[0;38;2;0;0;0;48;2;104;55;43m🬹\u001b[0;38;2;0;0;0;48;2;108;108;108m🬹\u001b[0;38;2;0;0;0;48;2;184;199;111m🬹🬹\u001b[0;38;2;184;199;111;48;2;0;0;0m🬎\u001b[0;38;2;112;164;178;48;2;255;255;255m🬝\u001b[0;38;2;112;164;178;48;2;0;0;0m🬝\u001b[0;38;2;0;0;0;48;2;112;164;178m_\u001b[0;38;2;255;255;255;48;2;184;199;111m🬬\u001b[0;38;2;112;164;178;48;2;255;255;255m▜\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬺\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[15;1H\u001b[0;39;48;2;21;32;25m \u001b[15;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝\u001b[0;38;2;112;164;178;48;2;108;94;181m▟\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝\u001b[0;38;2;112;164;178;48;2;184;199;111m🬎\u001b[0;38;2;255;255;255;48;2;112;164;178mj\u001b[0;38;2;0;0;0;48;2;184;199;111m🬯\u001b[0;38;2;0;0;0;48;2;67;57;0m🬸\u001b[0;38;2;104;55;43;48;2;0;0;0m`\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m🬺\u001b[0;38;2;0;0;0;48;2;67;57;0m🬝\u001b[0;38;2;0;0;0;48;2;255;255;255m🬎\u001b[0;38;2;112;164;178;48;2;255;255;255m▟█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬲\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[16;1H\u001b[0;39;48;2;21;32;25m \u001b[16;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝\u001b[0;38;2;112;164;178;48;2;108;94;181m▟\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▛\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▌\u001b[0;38;2;184;199;111;48;2;154;103;89m▌\u001b[0;38;2;184;199;111;48;2;0;0;0m~\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m🬺\u001b[0;38;2;112;164;178;48;2;184;199;111m🬊🬬\u001b[0;38;2;112;164;178;48;2;255;255;255m▜\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[17;1H\u001b[0;39;48;2;21;32;25m \u001b[17;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;112;164;178;48;2;108;94;181m🬵\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▙\u001b[0;38;2;255;255;255;48;2;112;164;178m🬩\u001b[0;38;2;255;255;255;48;2;0;0;0m🬝\u001b[0;38;2;112;164;178;48;2;255;255;255m🬒\u001b[0;38;2;255;255;255;48;2;112;164;178m▟\u001b[0;38;2;184;199;111;48;2;0;0;0m🬝\u001b[0;38;2;112;164;178;48;2;255;255;255m▀🬙🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝\u001b[0;38;2;0;0;0;48;2;154;103;89m🬞\u001b[0;38;2;67;57;0;48;2;0;0;0m`\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;154;103;89m▛\u001b[0;38;2;184;199;111;48;2;0;0;0m▟\u001b[0;38;2;112;164;178;48;2;255;255;255m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m▌\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[18;1H\u001b[0;39;48;2;21;32;25m \u001b[18;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝\u001b[0;38;2;112;164;178;48;2;108;94;181m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▀\u001b[0;38;2;0;0;0;48;2;255;255;255m_\u001b[0;38;2;0;0;0;48;2;184;199;111m🬷\u001b[0;38;2;0;0;0;48;2;154;103;89m🬺\u001b[0;38;2;104;55;43;48;2;0;0;0m~\u001b[0;38;2;0;0;0;48;2;111;79;37m█\u001b[0;38;2;104;55;43;48;2;0;0;0m~\u001b[0;38;2;0;0;0;48;2;184;199;111m🬺🬹\u001b[0;38;2;0;0;0;48;2;112;164;178m🬏\u001b[0;38;2;255;255;255;48;2;184;199;111m▌\u001b[0;38;2;0;0;0;48;2;111;79;37m🬻\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;154;103;89m▛\u001b[0;38;2;255;255;255;48;2;112;164;178m🬑\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬲\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[19;1H\u001b[0;39;48;2;21;32;25m \u001b[19;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;112;164;178;48;2;108;94;181m▟\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▌🬡\u001b[0;38;2;111;79;37;48;2;255;255;255m_\u001b[0;38;2;255;255;255;48;2;184;199;111m🬆\u001b[0;38;2;0;0;0;48;2;111;79;37m🬻\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;67;57;0;48;2;0;0;0m╱\u001b[0;38;2;184;199;111;48;2;0;0;0mT\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;112;164;178m🬆\u001b[0;38;2;112;164;178;48;2;184;199;111m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[20;1H\u001b[0;39;48;2;21;32;25m \u001b[20;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m██\u001b[0;38;2;112;164;178;48;2;154;103;89m🬴\u001b[0;38;2;112;164;178;48;2;255;255;255m🬸█🬰\u001b[0;38;2;255;255;255;48;2;112;164;178m─\u001b[0;38;2;112;164;178;48;2;255;255;255m🬰\u001b[0;38;2;255;255;255;48;2;112;164;178m🬛\u001b[0;38;2;255;255;255;48;2;184;199;111m🬴\u001b[0;38;2;0;0;0;48;2;184;199;111m🬫\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;104;55;43m🬛\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;104;55;43m🬴\u001b[0;38;2;0;0;0;48;2;112;164;178m🬐\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[21;1H\u001b[0;39;48;2;21;32;25m \u001b[21;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;112;164;178;48;2;108;94;181m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▌\u001b[0;38;2;255;255;255;48;2;112;164;178m🬌\u001b[0;38;2;0;0;0;48;2;112;164;178m~\u001b[0;38;2;255;255;255;48;2;184;199;111m🬱\u001b[0;38;2;0;0;0;48;2;111;79;37m🬬\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;111;79;37m█\u001b[0;38;2;255;255;255;48;2;67;57;0m,\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m█\u001b[0;38;2;0;0;0;48;2;112;164;178m▖\u001b[0;38;2;112;164;178;48;2;184;199;111m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[22;1H\u001b[0;39;48;2;21;32;25m \u001b[22;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▄\u001b[0;38;2;255;255;255;48;2;67;57;0m🬹\u001b[0;38;2;0;0;0;48;2;184;199;111m🬨\u001b[0;38;2;0;0;0;48;2;104;55;43m🬝\u001b[0;38;2;0;0;0;48;2;184;199;111m█\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;111;79;37m█🬝\u001b[0;38;2;0;0;0;48;2;154;103;89m🬆\u001b[0;38;2;255;255;255;48;2;111;79;37m🬹\u001b[0;38;2;255;255;255;48;2;184;199;111m▌\u001b[0;38;2;0;0;0;48;2;67;57;0m▜\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;111;79;37m🬛\u001b[0;38;2;255;255;255;48;2;112;164;178m▚\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬕\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[23;1H\u001b[0;39;48;2;21;32;25m \u001b[23;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬊\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m▛\u001b[0;38;2;255;255;255;48;2;112;164;178m🬍\u001b[0;38;2;255;255;255;48;2;0;0;0m🬺\u001b[0;38;2;112;164;178;48;2;255;255;255m🬮\u001b[0;38;2;184;199;111;48;2;255;255;255m'\u001b[0;38;2;0;0;0;48;2;184;199;111m🬁\u001b[0;38;2;112;164;178;48;2;184;199;111m▄\u001b[0;38;2;112;164;178;48;2;255;255;255m🬶🬹█🬺\u001b[0;38;2;0;0;0;48;2;184;199;111m▝\u001b[0;38;2;0;0;0;48;2;67;57;0m█\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;154;103;89m🬲\u001b[0;38;2;112;164;178;48;2;0;0;0m🬬\u001b[0;38;2;112;164;178;48;2;255;255;255m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m▌\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[24;1H\u001b[0;39;48;2;21;32;25m \u001b[24;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬲\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;184;199;111m🬚\u001b[0;38;2;0;0;0;48;2;184;199;111m🬠\u001b[0;38;2;0;0;0;48;2;111;79;37m🬝\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m🬝\u001b[0;38;2;184;199;111;48;2;112;164;178mf\u001b[0;38;2;112;164;178;48;2;184;199;111m🬹\u001b[0;38;2;112;164;178;48;2;255;255;255m▟\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬻\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[25;1H\u001b[0;39;48;2;21;32;25m \u001b[25;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬺\u001b[0;38;2;112;164;178;48;2;184;199;111m🬹\u001b[0;38;2;255;255;255;48;2;112;164;178m4\u001b[0;38;2;0;0;0;48;2;184;199;111m🬡\u001b[0;38;2;0;0;0;48;2;67;57;0m🬸\u001b[0;38;2;0;0;0;48;2;104;55;43m█\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;0;0;0;48;2;184;199;111m🬝\u001b[0;38;2;0;0;0;48;2;67;57;0m█\u001b[0;38;2;184;199;111;48;2;104;55;43m🬂\u001b[0;38;2;112;164;178;48;2;255;255;255m🬨\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬕\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[26;1H\u001b[0;39;48;2;21;32;25m \u001b[26;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬊█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬐\u001b[0;38;2;184;199;111;48;2;0;0;0m▙\u001b[0;38;2;0;0;0;48;2;184;199;111m▀\u001b[0;38;2;255;255;255;48;2;184;199;111m▄\u001b[0;38;2;0;0;0;48;2;184;199;111m🬂🬎🬎\u001b[0;38;2;149;149;149;48;2;0;0;0m_\u001b[0;38;2;154;103;89;48;2;0;0;0m_\u001b[0;38;2;0;0;0;48;2;67;57;0m█\u001b[0;38;2;67;57;0;48;2;0;0;0m_\u001b[0;38;2;108;108;108;48;2;0;0;0m__\u001b[0;38;2;0;0;0;48;2;184;199;111m🬎🬎🬂\u001b[0;38;2;112;164;178;48;2;255;255;255m🬺\u001b[0;38;2;112;164;178;48;2;111;79;37m🬹\u001b[0;38;2;0;0;0;48;2;112;164;178m~\u001b[0;38;2;255;255;255;48;2;184;199;111m🬻\u001b[0;38;2;112;164;178;48;2;255;255;255m▟\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬝\u001b[0;38;2;108;94;181;48;2;112;164;178m🬻\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[27;1H\u001b[0;39;48;2;21;32;25m \u001b[27;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬺\u001b[0;38;2;112;164;178;48;2;108;94;181m🬊🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬹🬹🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬺\u001b[0;38;2;255;255;255;48;2;112;164;178m~\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;255;255;255;48;2;184;199;111m▛\u001b[0;38;2;0;0;0;48;2;184;199;111m🬻\u001b[0;38;2;0;0;0;48;2;0;0;0m \u001b[0;38;2;255;255;255;48;2;104;55;43m🬁\u001b[0;38;2;255;255;255;48;2;184;199;111m🬬\u001b[0;38;2;184;199;111;48;2;112;164;178m~\u001b[0;38;2;255;255;255;48;2;112;164;178m~\u001b[0;38;2;112;164;178;48;2;255;255;255m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;255;255;255;48;2;112;164;178m'\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;112;164;178m🬻\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[28;1H\u001b[0;39;48;2;21;32;25m \u001b[28;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█🬹\u001b[0;38;2;112;164;178;48;2;108;94;181m▀🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝\u001b[0;38;2;255;255;255;48;2;184;199;111m🬴\u001b[0;38;2;0;0;0;48;2;184;199;111m▀🬬🬝▀\u001b[0;38;2;255;255;255;48;2;184;199;111m🬸\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m🬝\u001b[0;38;2;108;94;181;48;2;112;164;178m🬻\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[29;1H\u001b[0;39;48;2;21;32;25m \u001b[29;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m█🬹\u001b[0;38;2;112;164;178;48;2;108;94;181m▀🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬺▙\u001b[0;38;2;255;255;255;48;2;0;0;0m🬺\u001b[0;38;2;184;199;111;48;2;0;0;0m🬻\u001b[0;38;2;112;164;178;48;2;255;255;255m▟█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█🬆\u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[30;1H\u001b[0;39;48;2;21;32;25m \u001b[30;20H\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;112;164;178;48;2;108;94;181m\"\u001b[0;38;2;108;94;181;48;2;112;164;178m🬹\u001b[0;38;2;112;164;178;48;2;108;94;181m🬎🬬\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m🬝🬣\u001b[0;38;2;255;255;255;48;2;112;164;178m~\u001b[0;38;2;112;164;178;48;2;255;255;255m🬹█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█🬆\u001b[0;38;2;108;94;181;48;2;112;164;178m🬻\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0m\u001b[4;8H\u001b[?25h"] +[4.1, "o", "\u001b[9;89H\u001b[0;38;2;245;247;238;48;2;91;126;90mDel \u001b[0m\u001b[4;8H\u001b[?25h"] +[4.5, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/art/\u001b[0;38;2;223;188;229;48;2;49;71;56mREADME\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[6;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 3 \u001b[8;1H\u001b[0;39;48;2;96;130;105m \u001b[9;1H \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;39;48;2;13;20;16m \u001b[10;1H\u001b[0;39;48;2;96;130;105m \u001b[10;20H\u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[11;20H\u001b[0;39;48;2;13;20;16m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[12;20H\u001b[0;39;48;2;13;20;16m \u001b[13;1H\u001b[0;39;48;2;96;130;105m \u001b[13;20H\u001b[0;39;48;2;13;20;16m \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[14;20H\u001b[0;39;48;2;13;20;16m \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[15;20H\u001b[0;39;48;2;13;20;16m \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[16;20H\u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;39;48;2;96;130;105m \u001b[17;20H\u001b[0;39;48;2;13;20;16m \u001b[18;1H\u001b[0;39;48;2;96;130;105m \u001b[18;20H\u001b[0;39;48;2;13;20;16m \u001b[19;1H\u001b[0;39;48;2;96;130;105m \u001b[19;20H\u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;39;48;2;96;130;105m \u001b[20;20H\u001b[0;39;48;2;13;20;16m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[21;20H\u001b[0;39;48;2;13;20;16m \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[22;20H\u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[23;20H\u001b[0;39;48;2;13;20;16m \u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[24;20H\u001b[0;39;48;2;13;20;16m \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[25;20H\u001b[0;39;48;2;13;20;16m \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[26;20H\u001b[0;39;48;2;13;20;16m \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[27;20H\u001b[0;39;48;2;13;20;16m \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[28;20H\u001b[0;39;48;2;13;20;16m \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[29;20H\u001b[0;39;48;2;13;20;16m \u001b[30;1H\u001b[0;39;48;2;96;130;105m \u001b[30;20H\u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[6;10H\u001b[?25h"] +[5.0, "o", "\u001b[7;10H\u001b[0;38;2;245;247;238;48;2;107;120;88mseahorse.png \u001b[0m\u001b[6;10H\u001b[?25h"] +[5.5, "o", "\u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/art/\u001b[0;38;2;211;176;217;48;2;29;40;36mREADME\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[6;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 3 \u001b[7;10H\u001b[0;38;2;229;238;229;48;2;13;20;16mseahorse.png \u001b[8;1H\u001b[0;39;48;2;21;32;25m \u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mimg petscii:off palette:commodore ascii:on /tmp/cast/art/\u001b[0;38;2;223;188;229;48;2;49;71;56mseahorse.png\u001b[0;38;2;190;207;196;48;2;49;71;56m Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[10;1H\u001b[0;39;48;2;21;32;25m \u001b[10;20H\u001b[0;38;2;112;164;178;48;2;108;94;181m🬝\u001b[0;38;2;184;199;111;48;2;112;164;178mq_\u001b[0;38;2;112;164;178;48;2;184;199;111m🬎\u001b[0;38;2;112;164;178;48;2;154;103;89m🬫🬱\u001b[0;38;2;154;103;89;48;2;53;40;121m🬴\u001b[0;38;2;149;149;149;48;2;108;94;181mY\u001b[0;38;2;112;164;178;48;2;154;103;89m\\\u001b[0;38;2;184;199;111;48;2;112;164;178m▖\u001b[0;38;2;108;94;181;48;2;112;164;178m🬺🬹\u001b[0;38;2;108;94;181;48;2;184;199;111m🬻\u001b[0;38;2;53;40;121;48;2;112;164;178m🬵\u001b[0;38;2;108;94;181;48;2;149;149;149m🬹\u001b[0;38;2;108;94;181;48;2;184;199;111m🬻\u001b[0;38;2;112;164;178;48;2;149;149;149m🬃\u001b[0;38;2;184;199;111;48;2;112;164;178m─\u001b[0;38;2;108;94;181;48;2;112;164;178m▟\u001b[0;38;2;53;40;121;48;2;108;94;181m🬻\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█🬹▄\u001b[0;38;2;108;94;181;48;2;53;40;121m~\u001b[0;38;2;53;40;121;48;2;108;94;181m█\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█🬹🬹\u001b[0;38;2;108;94;181;48;2;53;40;121m▀🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[11;1H\u001b[0;39;48;2;21;32;25m \u001b[11;20H\u001b[0;38;2;108;94;181;48;2;149;149;149m▐\u001b[0;38;2;53;40;121;48;2;108;94;181m🬹🬹🬱\u001b[0;38;2;53;40;121;48;2;112;164;178m🬶▄\u001b[0;38;2;53;40;121;48;2;184;199;111m🬹\u001b[0;38;2;112;164;178;48;2;149;149;149m🬜\u001b[0;38;2;184;199;111;48;2;149;149;149m─\"\u001b[0;38;2;53;40;121;48;2;108;94;181m▟\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█▄🬻\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬺\u001b[0;38;2;108;94;181;48;2;53;40;121m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[12;1H\u001b[0;39;48;2;21;32;25m \u001b[12;20H\u001b[0;38;2;53;40;121;48;2;112;164;178m🬦\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;112;164;178;48;2;53;40;121m~\u001b[0;38;2;53;40;121;48;2;108;94;181m▄█\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;108;94;181;48;2;53;40;121m🬨\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[13;1H\u001b[0;39;48;2;21;32;25m \u001b[13;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m▌\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[14;1H\u001b[0;39;48;2;21;32;25m \u001b[14;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬄\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[15;1H\u001b[0;39;48;2;21;32;25m \u001b[15;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬝▘\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[16;1H\u001b[0;39;48;2;21;32;25m \u001b[16;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█🬎\u001b[0;38;2;108;94;181;48;2;53;40;121m🬹█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[17;1H\u001b[0;39;48;2;21;32;25m \u001b[17;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬝\u001b[0;38;2;108;94;181;48;2;53;40;121m🬹\u001b[0;38;2;108;94;181;48;2;184;199;111m🬎\u001b[0;38;2;108;94;181;48;2;53;40;121m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;53;40;121m█\u001b[0;38;2;108;94;181;48;2;149;149;149m🬬\u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[18;1H\u001b[0;39;48;2;21;32;25m \u001b[18;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;112;164;178m🬆\u001b[0;38;2;184;199;111;48;2;108;94;181m▄\u001b[0;38;2;108;94;181;48;2;112;164;178m▜\u001b[0;38;2;112;164;178;48;2;108;94;181m_\u001b[0;38;2;108;94;181;48;2;154;103;89m🬝\u001b[0;38;2;149;149;149;48;2;108;94;181m_\u001b[0;38;2;112;164;178;48;2;108;94;181m🬳\u001b[0;38;2;154;103;89;48;2;112;164;178m🬶\u001b[0;38;2;108;94;181;48;2;184;199;111m🬴▀\u001b[0;38;2;108;94;181;48;2;255;255;255m🬝\u001b[0;38;2;108;94;181;48;2;112;164;178m🬆\u001b[0;38;2;184;199;111;48;2;108;94;181mc\u001b[0;38;2;53;40;121;48;2;149;149;149m_\u001b[0;38;2;108;94;181;48;2;149;149;149m🬫\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0;38;2;108;94;181;48;2;112;164;178m🬝🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[19;1H\u001b[0;39;48;2;21;32;25m \u001b[19;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬎\u001b[0;38;2;149;149;149;48;2;53;40;121m_\u001b[0;38;2;53;40;121;48;2;108;94;181m🬎\u001b[0;38;2;108;94;181;48;2;53;40;121m_\u001b[0;38;2;53;40;121;48;2;108;94;181m▀\u001b[0;38;2;108;94;181;48;2;112;164;178m🬝\u001b[0;38;2;108;94;181;48;2;149;149;149m🬄\u001b[0;38;2;112;164;178;48;2;154;103;89m🬤\u001b[0;38;2;112;164;178;48;2;108;94;181m│\u001b[0;38;2;184;199;111;48;2;154;103;89m~\u001b[0;38;2;154;103;89;48;2;184;199;111ma\u001b[0;38;2;255;255;255;48;2;112;164;178mq\u001b[0;38;2;112;164;178;48;2;154;103;89m🬄\u001b[0;38;2;154;103;89;48;2;112;164;178m🬹\u001b[0;38;2;53;40;121;48;2;154;103;89m🬈\u001b[0;38;2;184;199;111;48;2;154;103;89m▄\u001b[0;38;2;255;255;255;48;2;149;149;149m<\u001b[0;38;2;112;164;178;48;2;184;199;111mT\u001b[0;38;2;108;94;181;48;2;154;103;89m}\u001b[0;38;2;149;149;149;48;2;108;94;181mt\u001b[0;38;2;154;103;89;48;2;149;149;149md\u001b[0;38;2;255;255;255;48;2;184;199;111m▗\u001b[0;38;2;112;164;178;48;2;255;255;255m▜\u001b[0;38;2;108;94;181;48;2;154;103;89m🬕\u001b[0;38;2;53;40;121;48;2;149;149;149m🬏\u001b[0;38;2;112;164;178;48;2;184;199;111m🬴\u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[20;1H\u001b[0;39;48;2;21;32;25m \u001b[20;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;108;94;181;48;2;112;164;178m▌\u001b[0;38;2;112;164;178;48;2;154;103;89m▝\u001b[0;38;2;108;94;181;48;2;149;149;149m🬑\u001b[0;38;2;184;199;111;48;2;108;94;181m─\u001b[0;38;2;184;199;111;48;2;149;149;149m=\u001b[0;38;2;112;164;178;48;2;184;199;111m🬜\u001b[0;38;2;255;255;255;48;2;112;164;178m.\u001b[0;38;2;255;255;255;48;2;149;149;149m_\u001b[0;38;2;184;199;111;48;2;154;103;89m🬭\u001b[0;38;2;149;149;149;48;2;154;103;89m~\u001b[0;38;2;184;199;111;48;2;149;149;149m🬊\u001b[0;38;2;255;255;255;48;2;184;199;111m🬞\u001b[0;38;2;154;103;89;48;2;184;199;111mz\u001b[0;38;2;184;199;111;48;2;149;149;149m▀\u001b[0;38;2;108;94;181;48;2;154;103;89m🬹\u001b[0;38;2;184;199;111;48;2;108;94;181m🬊\u001b[0;38;2;255;255;255;48;2;149;149;149m🬢\u001b[0;38;2;184;199;111;48;2;149;149;149m▀\u001b[0;38;2;112;164;178;48;2;154;103;89m▗\u001b[0;38;2;184;199;111;48;2;108;94;181m🬉\u001b[0;38;2;184;199;111;48;2;149;149;149m🬴🬪\u001b[0;38;2;184;199;111;48;2;154;103;89m🬐\u001b[0;38;2;184;199;111;48;2;108;94;181m▝\u001b[0;38;2;53;40;121;48;2;108;94;181mL\u001b[0;38;2;112;164;178;48;2;154;103;89m🬁\u001b[0;38;2;112;164;178;48;2;149;149;149m▜\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[21;1H\u001b[0;39;48;2;21;32;25m \u001b[21;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;149;149;149m🬎▀\u001b[0;38;2;108;94;181;48;2;112;164;178m▀\u001b[0;38;2;112;164;178;48;2;154;103;89m🬱\u001b[0;38;2;108;94;181;48;2;154;103;89m─\u001b[0;38;2;154;103;89;48;2;112;164;178m▟\u001b[0;38;2;53;40;121;48;2;154;103;89m-\u001b[0;38;2;154;103;89;48;2;184;199;111m_─\u001b[0;38;2;255;255;255;48;2;149;149;149m🬭\u001b[0;38;2;184;199;111;48;2;255;255;255m🬎\u001b[0;38;2;111;79;37;48;2;112;164;178m▀\u001b[0;38;2;149;149;149;48;2;53;40;121m🬺\u001b[0;38;2;255;255;255;48;2;149;149;149m🬞\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;184;199;111;48;2;255;255;255m'\u001b[0;38;2;255;255;255;48;2;184;199;111m🬺\u001b[0;38;2;255;255;255;48;2;149;149;149m🬵\u001b[0;38;2;255;255;255;48;2;68;68;68m█\u001b[0;38;2;255;255;255;48;2;154;103;89m█\u001b[0;38;2;255;255;255;48;2;149;149;149m🬱\u001b[0;38;2;255;255;255;48;2;112;164;178m🬭\u001b[0;38;2;255;255;255;48;2;184;199;111m🬺\u001b[0;38;2;255;255;255;48;2;154;103;89m🬏\u001b[0;38;2;112;164;178;48;2;154;103;89mx\u001b[0;38;2;184;199;111;48;2;154;103;89m▗🬛\u001b[0;38;2;53;40;121;48;2;184;199;111m🬄\u001b[0;38;2;255;255;255;48;2;184;199;111mm\u001b[0;38;2;112;164;178;48;2;108;94;181m🬎\u001b[0;38;2;112;164;178;48;2;154;103;89m▀\u001b[0;38;2;108;94;181;48;2;149;149;149m🬂\u001b[0;38;2;108;94;181;48;2;112;164;178m🬨\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[22;1H\u001b[0;39;48;2;21;32;25m \u001b[22;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m▌\u001b[0;38;2;53;40;121;48;2;112;164;178m^\u001b[0;38;2;112;164;178;48;2;149;149;149m🬍\u001b[0;38;2;108;94;181;48;2;154;103;89m🬝\u001b[0;38;2;184;199;111;48;2;108;94;181m🬋\u001b[0;38;2;184;199;111;48;2;112;164;178m▄\u001b[0;38;2;184;199;111;48;2;149;149;149m🬐\u001b[0;38;2;112;164;178;48;2;154;103;89m🬎\u001b[0;38;2;255;255;255;48;2;112;164;178m.\u001b[0;38;2;149;149;149;48;2;184;199;111m/\u001b[0;38;2;154;103;89;48;2;184;199;111m~\u001b[0;38;2;184;199;111;48;2;154;103;89m▌\u001b[0;38;2;53;40;121;48;2;154;103;89m)\u001b[0;38;2;184;199;111;48;2;149;149;149m🬞\u001b[0;38;2;149;149;149;48;2;108;94;181m🬸\u001b[0;38;2;255;255;255;48;2;112;164;178m▀~~~\u001b[0;38;2;112;164;178;48;2;255;255;255m██🬹\u001b[0;38;2;255;255;255;48;2;112;164;178m🬬\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;255;255;255;48;2;112;164;178m▙▄\u001b[0;38;2;255;255;255;48;2;184;199;111m🬓\u001b[0;38;2;184;199;111;48;2;154;103;89m🬇🬄\u001b[0;38;2;149;149;149;48;2;104;55;43m🬍\u001b[0;38;2;53;40;121;48;2;184;199;111m🬯\u001b[0;38;2;154;103;89;48;2;0;0;0m🬻\u001b[0;38;2;255;255;255;48;2;112;164;178m`\u001b[0;38;2;112;164;178;48;2;108;94;181m🬕\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[23;1H\u001b[0;39;48;2;21;32;25m \u001b[23;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬺\u001b[0;38;2;184;199;111;48;2;108;94;181m🬊\u001b[0;38;2;112;164;178;48;2;154;103;89m▐\u001b[0;38;2;112;164;178;48;2;53;40;121m🬴\u001b[0;38;2;108;94;181;48;2;149;149;149m🬷\u001b[0;38;2;154;103;89;48;2;108;94;181m🬨\u001b[0;38;2;108;94;181;48;2;154;103;89m.\u001b[0;38;2;184;199;111;48;2;255;255;255m█🬎\u001b[0;38;2;255;255;255;48;2;154;103;89m▄\u001b[0;38;2;255;255;255;48;2;184;199;111m▄\u001b[0;38;2;112;164;178;48;2;184;199;111m🬻\u001b[0;38;2;184;199;111;48;2;112;164;178m~\u001b[0;38;2;112;164;178;48;2;255;255;255m🬻\u001b[0;38;2;154;103;89;48;2;112;164;178m~\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;255;255;255;48;2;112;164;178m🬷\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;255;255;255;48;2;149;149;149m▛\u001b[0;38;2;112;164;178;48;2;154;103;89m╲\u001b[0;38;2;154;103;89;48;2;149;149;149m🬉\u001b[0;38;2;184;199;111;48;2;154;103;89ma\u001b[0;38;2;154;103;89;48;2;255;255;255m🬝\u001b[0;38;2;255;255;255;48;2;149;149;149m🬭\u001b[0;38;2;112;164;178;48;2;184;199;111m▐\u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;112;164;178m🬬\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[24;1H\u001b[0;39;48;2;21;32;25m \u001b[24;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬝\u001b[0;38;2;53;40;121;48;2;112;164;178m🬎\u001b[0;38;2;53;40;121;48;2;149;149;149m🬆\u001b[0;38;2;112;164;178;48;2;108;94;181m▄🬺\u001b[0;38;2;104;55;43;48;2;112;164;178m^\u001b[0;38;2;154;103;89;48;2;104;55;43m🬺\u001b[0;38;2;184;199;111;48;2;154;103;89m🬭🬳\u001b[0;38;2;154;103;89;48;2;184;199;111m🬺\u001b[0;38;2;108;94;181;48;2;149;149;149m🬓\u001b[0;38;2;104;55;43;48;2;108;108;108m🬃\u001b[0;38;2;154;103;89;48;2;149;149;149m🬓\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;255;255;255;48;2;112;164;178mm\u001b[0;38;2;112;164;178;48;2;108;108;108m🬎\u001b[0;38;2;255;255;255;48;2;149;149;149m~\u001b[0;38;2;184;199;111;48;2;154;103;89m🬰\u001b[0;38;2;255;255;255;48;2;154;103;89m🬂▜\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;184;199;111;48;2;255;255;255m~\u001b[0;38;2;154;103;89;48;2;184;199;111m🬻\u001b[0;38;2;184;199;111;48;2;154;103;89m🬋\u001b[0;38;2;53;40;121;48;2;149;149;149m🬞\u001b[0;38;2;255;255;255;48;2;112;164;178m🬂\u001b[0;38;2;112;164;178;48;2;154;103;89m▀▀\u001b[0;38;2;112;164;178;48;2;108;94;181m🬺\u001b[0;38;2;108;94;181;48;2;112;164;178m▜\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[25;1H\u001b[0;39;48;2;21;32;25m \u001b[25;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;111;61;134m█\u001b[0;38;2;111;61;134;48;2;53;40;121m_\u001b[0;38;2;53;40;121;48;2;149;149;149m🬆\u001b[0;38;2;53;40;121;48;2;184;199;111m🬎\u001b[0;38;2;53;40;121;48;2;108;94;181m🬬▛\u001b[0;38;2;53;40;121;48;2;112;164;178m▘\u001b[0;38;2;184;199;111;48;2;112;164;178m_\u001b[0;38;2;184;199;111;48;2;149;149;149m_\u001b[0;38;2;108;108;108;48;2;112;164;178m_\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;149;149;149m▙\u001b[0;38;2;184;199;111;48;2;154;103;89m▟\u001b[0;38;2;184;199;111;48;2;255;255;255m🬻\u001b[0;38;2;154;103;89;48;2;184;199;111m_\u001b[0;38;2;154;103;89;48;2;149;149;149m▛\u001b[0;38;2;112;164;178;48;2;154;103;89m🬷\u001b[0;38;2;112;164;178;48;2;149;149;149m🬹\u001b[0;38;2;104;55;43;48;2;112;164;178m`\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;149;149;149m🬆\u001b[0;38;2;108;94;181;48;2;154;103;89m🬒\u001b[0;38;2;154;103;89;48;2;184;199;111m▛\u001b[0;38;2;184;199;111;48;2;112;164;178m█▛\u001b[0;38;2;184;199;111;48;2;154;103;89m🬀\u001b[0;38;2;184;199;111;48;2;108;108;108m▐\u001b[0;38;2;255;255;255;48;2;184;199;111m█\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;184;199;111;48;2;154;103;89m🬰🬭🬭\u001b[0;38;2;108;94;181;48;2;154;103;89m🬉\u001b[0;38;2;112;164;178;48;2;104;55;43m┼\u001b[0;38;2;154;103;89;48;2;0;0;0m🬻\u001b[0;38;2;112;164;178;48;2;184;199;111m🬲\u001b[0;38;2;112;164;178;48;2;149;149;149m🬵\u001b[0;38;2;108;94;181;48;2;112;164;178m~\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[26;1H\u001b[0;39;48;2;21;32;25m \u001b[26;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;112;164;178m▙\u001b[0;38;2;112;164;178;48;2;108;94;181m▐\u001b[0;38;2;112;164;178;48;2;149;149;149m▖\u001b[0;38;2;112;164;178;48;2;154;103;89m🬎\u001b[0;38;2;108;94;181;48;2;149;149;149m🬑\u001b[0;38;2;108;108;108;48;2;112;164;178m*\u001b[0;38;2;184;199;111;48;2;108;94;181m🬂\u001b[0;38;2;154;103;89;48;2;184;199;111m🬺\u001b[0;38;2;184;199;111;48;2;154;103;89m▀🬭🬹🬝🬓\u001b[0;38;2;255;255;255;48;2;149;149;149m🬭\u001b[0;38;2;112;164;178;48;2;184;199;111m▟\u001b[0;38;2;255;255;255;48;2;112;164;178m/\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;149;149;149m▌\u001b[0;38;2;154;103;89;48;2;108;94;181m🬝\u001b[0;38;2;184;199;111;48;2;154;103;89m▝█\u001b[0;38;2;184;199;111;48;2;255;255;255m🬕\u001b[0;38;2;255;255;255;48;2;184;199;111m🬹█\u001b[0;38;2;255;255;255;48;2;255;255;255m \u001b[0;38;2;255;255;255;48;2;184;199;111m▛\u001b[0;38;2;255;255;255;48;2;149;149;149m▀\u001b[0;38;2;255;255;255;48;2;108;108;108m🬀\u001b[0;38;2;184;199;111;48;2;154;103;89m╲\u001b[0;38;2;154;103;89;48;2;108;108;108m▟\u001b[0;38;2;255;255;255;48;2;154;103;89m▄\u001b[0;38;2;184;199;111;48;2;154;103;89m🬓\u001b[0;38;2;112;164;178;48;2;184;199;111m🬻\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m▌\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[27;1H\u001b[0;39;48;2;21;32;25m \u001b[27;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;111;61;134m█\u001b[0;38;2;53;40;121;48;2;112;164;178m▖\u001b[0;38;2;184;199;111;48;2;112;164;178m▐\u001b[0;38;2;154;103;89;48;2;108;94;181m🬕\u001b[0;38;2;184;199;111;48;2;108;94;181m[\u001b[0;38;2;53;40;121;48;2;184;199;111m🬄\u001b[0;38;2;112;164;178;48;2;108;94;181m▌\u001b[0;38;2;53;40;121;48;2;108;94;181m🬈\u001b[0;38;2;154;103;89;48;2;108;94;181m🬴▟\u001b[0;38;2;184;199;111;48;2;255;255;255m█\u001b[0;38;2;255;255;255;48;2;184;199;111m─\u001b[0;38;2;255;255;255;48;2;149;149;149m▀\u001b[0;38;2;255;255;255;48;2;112;164;178m🬂\u001b[0;38;2;184;199;111;48;2;112;164;178m🬋\u001b[0;38;2;112;164;178;48;2;184;199;111m▜\u001b[0;38;2;112;164;178;48;2;53;40;121m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;67;57;0m█\u001b[0;38;2;112;164;178;48;2;154;103;89m🬹\u001b[0;38;2;184;199;111;48;2;154;103;89m┼\u001b[0;38;2;154;103;89;48;2;111;61;134m🬎\u001b[0;38;2;184;199;111;48;2;154;103;89m🬂🬬\u001b[0;38;2;255;255;255;48;2;149;149;149m▀\u001b[0;38;2;255;255;255;48;2;184;199;111m🬎🬆\u001b[0;38;2;255;255;255;48;2;108;94;181m▀\u001b[0;38;2;154;103;89;48;2;184;199;111m▄\u001b[0;38;2;184;199;111;48;2;154;103;89m-\u001b[0;38;2;154;103;89;48;2;149;149;149m🬻\u001b[0;38;2;53;40;121;48;2;108;94;181mq\u001b[0;38;2;112;164;178;48;2;108;108;108m▖\u001b[0;38;2;0;0;0;48;2;108;108;108m🬏\u001b[0;38;2;112;164;178;48;2;149;149;149m▀\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m▌\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[28;1H\u001b[0;39;48;2;21;32;25m \u001b[28;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m🬛\u001b[0;38;2;108;94;181;48;2;184;199;111m▙\u001b[0;38;2;108;94;181;48;2;149;149;149m🬯\u001b[0;38;2;184;199;111;48;2;108;94;181m▄\u001b[0;38;2;108;94;181;48;2;154;103;89mY\u001b[0;38;2;53;40;121;48;2;154;103;89m`\u001b[0;38;2;184;199;111;48;2;154;103;89m_🬹\u001b[0;38;2;154;103;89;48;2;53;40;121m🬝🬥\u001b[0;38;2;108;94;181;48;2;149;149;149m🬲\u001b[0;38;2;53;40;121;48;2;108;94;181m+\u001b[0;38;2;112;164;178;48;2;184;199;111m▛\u001b[0;38;2;154;103;89;48;2;149;149;149m▌\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;108;108;108;48;2;112;164;178m.\u001b[0;38;2;154;103;89;48;2;112;164;178m>\u001b[0;38;2;184;199;111;48;2;154;103;89m🬚\u001b[0;38;2;154;103;89;48;2;108;108;108m🬙\u001b[0;38;2;104;55;43;48;2;108;94;181m▘\u001b[0;38;2;154;103;89;48;2;149;149;149m🬝\u001b[0;38;2;154;103;89;48;2;184;199;111m🬬\u001b[0;38;2;108;94;181;48;2;154;103;89m\"\u001b[0;38;2;154;103;89;48;2;108;94;181m🬆\u001b[0;38;2;154;103;89;48;2;184;199;111mP\u001b[0;38;2;255;255;255;48;2;184;199;111m🬃\u001b[0;38;2;154;103;89;48;2;108;94;181m🬎\u001b[0;38;2;184;199;111;48;2;112;164;178m─\u001b[0;38;2;112;164;178;48;2;184;199;111m🬴\u001b[0;38;2;184;199;111;48;2;112;164;178m+\u001b[0;38;2;149;149;149;48;2;112;164;178m-\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m▙\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[29;1H\u001b[0;39;48;2;21;32;25m \u001b[29;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;108;94;181m█\u001b[0;38;2;112;164;178;48;2;53;40;121m_\u001b[0;38;2;53;40;121;48;2;112;164;178m🬆\u001b[0;38;2;53;40;121;48;2;149;149;149m~\u001b[0;38;2;112;164;178;48;2;149;149;149m🬹▄\u001b[0;38;2;108;94;181;48;2;112;164;178m^\u001b[0;38;2;112;164;178;48;2;154;210;132m█\u001b[0;38;2;255;255;255;48;2;149;149;149m~\u001b[0;38;2;184;199;111;48;2;154;103;89m▐\u001b[0;38;2;255;255;255;48;2;184;199;111m🬆\u001b[0;38;2;184;199;111;48;2;255;255;255m█\u001b[0;38;2;184;199;111;48;2;149;149;149m🬺\u001b[0;38;2;154;103;89;48;2;111;79;37m🬝\u001b[0;38;2;184;199;111;48;2;154;103;89m▄\u001b[0;38;2;112;164;178;48;2;184;199;111m▟\u001b[0;38;2;112;164;178;48;2;255;255;255m██\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;53;40;121m█\u001b[0;38;2;112;164;178;48;2;184;199;111m🬔\u001b[0;38;2;53;40;121;48;2;112;164;178m+\u001b[0;38;2;112;164;178;48;2;255;255;255m▙\u001b[0;38;2;112;164;178;48;2;154;103;89m🬮🬯\u001b[0;38;2;112;164;178;48;2;108;108;108m▙\u001b[0;38;2;149;149;149;48;2;154;103;89m╱\u001b[0;38;2;112;164;178;48;2;255;255;255m█\u001b[0;38;2;112;164;178;48;2;0;0;0m█\u001b[0;38;2;112;164;178;48;2;154;103;89m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;108;94;181m█\u001b[0;38;2;108;94;181;48;2;112;164;178m█\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[30;1H\u001b[0;39;48;2;21;32;25m \u001b[30;20H\u001b[0;38;2;53;40;121;48;2;53;40;121m \u001b[0;38;2;53;40;121;48;2;112;164;178m█\u001b[0;38;2;112;164;178;48;2;108;94;181m🬨\u001b[0;38;2;112;164;178;48;2;149;149;149m🬭\u001b[0;38;2;184;199;111;48;2;149;149;149mt\u001b[0;38;2;112;164;178;48;2;184;199;111m██🬬\u001b[0;38;2;112;164;178;48;2;154;210;132m█\u001b[0;38;2;112;164;178;48;2;184;199;111m█\u001b[0;38;2;255;255;255;48;2;112;164;178m]\u001b[0;38;2;184;199;111;48;2;154;103;89m🬒🬆\u001b[0;38;2;154;103;89;48;2;184;199;111m🬻🬙\u001b[0;38;2;112;164;178;48;2;149;149;149m▄\u001b[0;38;2;112;164;178;48;2;184;199;111m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;149;149;149m█\u001b[0;38;2;112;164;178;48;2;104;55;43m█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;112;164;178;48;2;149;149;149m🬺🬺█\u001b[0;38;2;112;164;178;48;2;112;164;178m \u001b[0;38;2;108;94;181;48;2;112;164;178m▐\u001b[0;38;2;108;94;181;48;2;108;94;181m \u001b[0m\u001b[6;10H\u001b[?25h"] +[7.5, "o", "\u001b[9;87H\u001b[0;38;2;245;247;238;48;2;91;126;90mDel \u001b[0m\u001b[6;10H\u001b[?25h"] +[7.9, "o", "\u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/art/\u001b[0;38;2;223;188;229;48;2;49;71;56mREADME\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[7;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 4 \u001b[8;1H\u001b[0;39;48;2;96;130;105m \u001b[9;1H \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;39;48;2;13;20;16m \u001b[10;1H\u001b[0;39;48;2;96;130;105m \u001b[10;20H\u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[11;20H\u001b[0;39;48;2;13;20;16m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[12;20H\u001b[0;39;48;2;13;20;16m \u001b[13;1H\u001b[0;39;48;2;96;130;105m \u001b[13;20H\u001b[0;39;48;2;13;20;16m \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[14;20H\u001b[0;39;48;2;13;20;16m \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[15;20H\u001b[0;39;48;2;13;20;16m \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[16;20H\u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;39;48;2;96;130;105m \u001b[17;20H\u001b[0;39;48;2;13;20;16m \u001b[18;1H\u001b[0;39;48;2;96;130;105m \u001b[18;20H\u001b[0;39;48;2;13;20;16m \u001b[19;1H\u001b[0;39;48;2;96;130;105m \u001b[19;20H\u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;39;48;2;96;130;105m \u001b[20;20H\u001b[0;39;48;2;13;20;16m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[21;20H\u001b[0;39;48;2;13;20;16m \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[22;20H\u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[23;20H\u001b[0;39;48;2;13;20;16m \u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[24;20H\u001b[0;39;48;2;13;20;16m \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[25;20H\u001b[0;39;48;2;13;20;16m \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[26;20H\u001b[0;39;48;2;13;20;16m \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[27;20H\u001b[0;39;48;2;13;20;16m \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[28;20H\u001b[0;39;48;2;13;20;16m \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[29;20H\u001b[0;39;48;2;13;20;16m \u001b[30;1H\u001b[0;39;48;2;96;130;105m \u001b[30;20H\u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[7;10H\u001b[?25h"] +[8.4, "o", "\u001b[8;10H\u001b[0;38;2;245;247;238;48;2;107;120;88msdm.pdf \u001b[0m\u001b[7;10H\u001b[?25h"] +[8.9, "o", "\u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/art/\u001b[0;38;2;211;176;217;48;2;29;40;36mREADME\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[7;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[8;1H\u001b[0;39;48;2;21;32;25m \u001b[8;10H\u001b[0;38;2;229;238;229;48;2;13;20;16msdm.pdf \u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/home/goblin/01-resources/\u001b[0;38;2;223;188;229;48;2;49;71;56mintel-devref-ii.pdf\u001b[0;38;2;190;207;196;48;2;49;71;56m [1/2515] Tty PdfSections PdfTint Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[10;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mIntel®\u001b[10;10H64\u001b[10;13Hand\u001b[10;17HIA-32\u001b[10;23HArchitectures\u001b[11;1H\u001b[0;39;48;2;21;32;25m \u001b[11;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mSoftware\u001b[11;12HDeveloper’s\u001b[11;24HManual\u001b[12;1H\u001b[0;39;48;2;21;32;25m \u001b[12;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mVolume\u001b[12;10H2\u001b[12;12H(2A,\u001b[12;17H2B,\u001b[12;21H2C,\u001b[12;25H&\u001b[12;27H2D):\u001b[13;1H\u001b[0;39;48;2;21;32;25m \u001b[13;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mInstruction\u001b[13;15HSet\u001b[13;19HReference,\u001b[13;30HA-Z\u001b[14;1H\u001b[0;39;48;2;21;32;25m \u001b[14;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mNOTE:\u001b[14;9HThe\u001b[14;13HIntel\u001b[14;19H64\u001b[14;22Hand\u001b[14;26HIA-32\u001b[14;32HArchitectures\u001b[14;46HSoftware\u001b[14;55HDeveloper's\u001b[14;67HManual\u001b[14;74Hconsists\u001b[14;83Hof\u001b[14;86Hfour\u001b[14;91Hvolumes:\u001b[15;1H\u001b[0;39;48;2;21;32;25m \u001b[15;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mBasic\u001b[15;9HArchitecture,\u001b[15;23HOrder\u001b[15;29HNumber\u001b[15;36H253665;\u001b[15;44HInstruction\u001b[15;56HSet\u001b[15;60HReference,\u001b[15;71HA-Z,\u001b[15;76HOrder\u001b[15;82HNumber\u001b[15;89H325383;\u001b[16;1H\u001b[0;39;48;2;21;32;25m \u001b[16;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mSystem\u001b[16;10HProgramming\u001b[16;22HGuide,\u001b[16;29HOrder\u001b[16;35HNumber\u001b[16;42H325384;\u001b[16;50HModel-Specific\u001b[16;65HRegisters,\u001b[16;76HOrder\u001b[16;82HNumber\u001b[17;1H\u001b[0;39;48;2;21;32;25m \u001b[17;3H\u001b[0;38;2;229;238;229;48;2;13;20;16m335592.\u001b[17;11HRefer\u001b[17;17Hto\u001b[17;20Hall\u001b[17;24Hfour\u001b[17;29Hvolumes\u001b[17;37Hwhen\u001b[17;42Hevaluating\u001b[17;53Hyour\u001b[17;58Hdesign\u001b[17;65Hneeds.\u001b[18;1H\u001b[0;39;48;2;21;32;25m \u001b[18;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mOrder\u001b[18;9HNumber:\u001b[18;18H325383-084US\u001b[19;1H\u001b[0;39;48;2;21;32;25m \u001b[19;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mJune\u001b[19;8H2024\u001b[20;1H\u001b[0;39;48;2;21;32;25m \u001b[21;1H \u001b[22;1H \u001b[23;1H \u001b[24;1H \u001b[25;1H \u001b[26;1H \u001b[27;1H \u001b[28;1H \u001b[29;1H \u001b[30;1H \u001b[0m\u001b[10;3H\u001b[?25h"] +[10.4, "o", "\u001b[9;63H\u001b[0;38;2;245;247;238;48;2;91;126;90mPdfSections \u001b[0m\u001b[10;3H\u001b[?25h"] +[10.9, "o", "\u001b[9;63H\u001b[0;38;2;190;207;196;48;2;49;71;56mPdfSections \u001b[10;88H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mPdfSections\u001b[0;39;48;2;29;40;36m \u001b[19;3H\u001b[0;39;48;2;13;20;16m \u001b[19;8H \u001b[20;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/home/goblin/01-resources/\u001b[0;38;2;211;176;217;48;2;29;40;36m+PdfSections\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del LocationsConfig\u001b[0;39;48;2;29;40;36m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[21;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m1\u001b[21;8Hintel-devref-ii.pdf:29:1\u001b[21;33H\u001b[0;38;2;229;238;229;48;2;13;20;16mChapter\u001b[21;41H1\u001b[21;43HAbout\u001b[21;49HThis\u001b[21;54HManual\u001b[22;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m2\u001b[22;8Hintel-devref-ii.pdf:29:2\u001b[22;35H\u001b[0;38;2;229;238;229;48;2;13;20;16m1.1\u001b[22;39HOverview\u001b[22;48Hof\u001b[22;51HVolume\u001b[22;58H2A,\u001b[22;62H2B,\u001b[22;66H2C,\u001b[22;70Hand\u001b[22;74H2D:\u001b[22;78HInstruction\u001b[22;90HSet\u001b[22;94HRefere\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[23;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mnce\u001b[24;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m3\u001b[24;8Hintel-devref-ii.pdf:31:3\u001b[24;33H\u001b[0;38;2;229;238;229;48;2;13;20;16mChapter\u001b[24;41H2\u001b[24;43HInstruction\u001b[24;55HFormat\u001b[25;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m4\u001b[25;8Hintel-devref-ii.pdf:31:4\u001b[25;35H\u001b[0;38;2;229;238;229;48;2;13;20;16m2.1\u001b[25;39HInstruction\u001b[25;51HFormat\u001b[25;58Hfor\u001b[25;62HProtected\u001b[25;72HMode,\u001b[25;78Hreal-address\u001b[25;91HMode,\u001b[25;97Hand\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[26;9H\u001b[0;38;2;229;238;229;48;2;13;20;16mvirtual-8086\u001b[26;22Hmode\u001b[27;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m5\u001b[27;8Hintel-devref-ii.pdf:31:5\u001b[27;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m2.1.1\u001b[27;43HInstruction\u001b[27;55HPrefixes\u001b[28;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m6\u001b[28;8Hintel-devref-ii.pdf:33:6\u001b[28;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m2.1.2\u001b[28;43HOpcodes\u001b[29;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m7\u001b[29;8Hintel-devref-ii.pdf:33:7\u001b[29;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m2.1.3\u001b[29;43HModR/M\u001b[29;50Hand\u001b[29;54HSIB\u001b[29;58HBytes\u001b[30;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m8\u001b[30;8Hintel-devref-ii.pdf:33:8\u001b[30;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m2.1.4\u001b[30;43HDisplacement\u001b[30;56Hand\u001b[30;60HImmediate\u001b[30;70HBytes\u001b[0m\u001b[10;3H\u001b[?25h"] +[12.2, "o", "\u001b[9;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/home/goblin/01-resources/\u001b[0;38;2;211;176;217;48;2;29;40;36mintel-devref-ii.pdf\u001b[0;38;2;178;195;184;48;2;29;40;36m [1/2515] Tty PdfSections PdfTint Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[10;88H\u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/home/goblin/01-resources/\u001b[0;38;2;223;188;229;48;2;49;71;56m+PdfSections\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del LocationsConfig\u001b[0;39;48;2;49;71;56m \u001b[0m\u001b[20;80H\u001b[?25h"] +[12.5, "o", "\u001b[0m\u001b[20;81H\u001b[?25h"] +[12.59, "o", "\u001b[20;81H\u001b[0;38;2;190;207;196;48;2;49;71;56mC\u001b[0m\u001b[20;82H\u001b[?25h"] +[12.68, "o", "\u001b[20;82H\u001b[0;38;2;190;207;196;48;2;49;71;56mP\u001b[0m\u001b[20;83H\u001b[?25h"] +[12.77, "o", "\u001b[20;83H\u001b[0;38;2;190;207;196;48;2;49;71;56mU\u001b[0m\u001b[20;84H\u001b[?25h"] +[12.86, "o", "\u001b[20;84H\u001b[0;38;2;190;207;196;48;2;49;71;56mI\u001b[0m\u001b[20;85H\u001b[?25h"] +[12.95, "o", "\u001b[20;85H\u001b[0;38;2;190;207;196;48;2;49;71;56mD\u001b[0m\u001b[20;86H\u001b[?25h"] +[13.65, "o", "\u001b[20;81H\u001b[0;38;2;245;247;238;48;2;107;120;88mCPUID \u001b[0m\u001b[20;86H\u001b[?25h"] +[14.05, "o", "\u001b[20;81H\u001b[0;38;2;190;207;196;48;2;49;71;56mCPUID\u001b[0;39;48;2;49;71;56m \u001b[21;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m95\u001b[21;28H103:95\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[21;41H3.1.1.2\u001b[21;49HOpcode Column\u001b[21;63Hin\u001b[21;66Hthe\u001b[21;70HInstruction\u001b[21;82HSummary\u001b[21;90HTable\u001b[21;96H(Ins\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[22;6H \u001b[22;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mtructions with VEX prefix)\u001b[22;35H\u001b[0;39;48;2;13;20;16m \u001b[22;39H \u001b[22;48H \u001b[22;51H \u001b[22;58H \u001b[22;62H \u001b[22;66H \u001b[22;70H \u001b[22;74H \u001b[22;78H \u001b[22;90H \u001b[22;94H \u001b[23;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m96\u001b[23;8Hintel-devref-ii.pdf:105:96\u001b[23;41H\u001b[0;38;2;229;238;229;48;2;13;20;16m3.1.1.3\u001b[23;49HInstruction\u001b[23;61HColumn\u001b[23;68Hin\u001b[23;71Hthe\u001b[23;75HOpcode\u001b[23;82HSummary\u001b[23;90HTable\u001b[24;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m97\u001b[24;28H108:97\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[24;41H3.1.1.4 Operand Encoding\u001b[24;66HColumn\u001b[24;73Hin\u001b[24;76Hthe\u001b[24;80HInstruction\u001b[24;92HSummary\u001b[24;100H\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[25;6H \u001b[25;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mTable\u001b[0;39;48;2;13;20;16m \u001b[25;35H \u001b[25;39H \u001b[25;51H \u001b[25;58H \u001b[25;62H \u001b[25;72H \u001b[25;78H \u001b[25;91H \u001b[25;97H \u001b[26;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m98\u001b[26;8Hintel-devref-ii.pdf:108:98\u001b[26;41H\u001b[0;38;2;229;238;229;48;2;13;20;16m3.1.1.5\u001b[26;49H64/32-bit\u001b[26;59HMode\u001b[26;64HColumn\u001b[26;71Hin\u001b[26;74Hthe\u001b[26;78HInstruction\u001b[26;90HSummary\u001b[26;98HTa\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[27;6H \u001b[27;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mble\u001b[0;39;48;2;13;20;16m \u001b[27;37H \u001b[27;43H \u001b[27;55H \u001b[28;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m99\u001b[28;28H109:99\u001b[28;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m 3.1.1.6 \u001b[0;38;2;245;247;238;48;2;60;97;74mCPUID\u001b[28;55H\u001b[0;38;2;229;238;229;48;2;13;20;16mSupport\u001b[28;63HColumn\u001b[28;70Hin\u001b[28;73Hthe\u001b[28;77HInstruction\u001b[28;89HSummary\u001b[28;97HTab\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[29;6H \u001b[29;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mle\u001b[0;39;48;2;13;20;16m \u001b[29;37H \u001b[29;43H \u001b[29;50H \u001b[29;54H \u001b[29;58H \u001b[30;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m100\u001b[30;28H109:100\u001b[30;37H\u001b[0;38;2;229;238;229;48;2;13;20;16m 3.1.1.7 Description Column in \u001b[30;73Hhe\u001b[30;76HInstruction\u001b[30;88HSummary\u001b[30;96HTabl\u001b[0m\u001b[20;86H\u001b[?25h"] +[14.95, "o", "\u001b[20;81H\u001b[0;38;2;245;247;238;48;2;107;120;88mCPUID \u001b[0m\u001b[20;86H\u001b[?25h"] +[15.35, "o", "\u001b[20;81H\u001b[0;38;2;190;207;196;48;2;49;71;56mCPUID\u001b[0;39;48;2;49;71;56m \u001b[21;1H\u001b[0;39;48;2;21;32;25m \u001b[21;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m1\u001b[21;6H7\u001b[21;28H310\u001b[21;32H197\u001b[21;40H\u001b[0;38;2;229;238;229;48;2;13;20;16mCMPXCHG8B/CMPXCHG16B—Compare and Exchange\u001b[21;82HBytes\u001b[0;39;48;2;13;20;16m \u001b[21;90H \u001b[21;96H \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[22;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m198\u001b[22;8Hintel-devref-ii.pdf:313:198\u001b[22;40H\u001b[0;38;2;229;238;229;48;2;13;20;16mCOMISD—Compare\u001b[22;55HScalar\u001b[22;62HOrdered\u001b[22;70HDouble\u001b[22;77HPrecision\u001b[22;87HFloating-Poin\u001b[0;38;2;89;103;92;48;2;13;20;16m↩\u001b[23;5H \u001b[23;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mt Values and Set EFLAGS\u001b[0;39;48;2;13;20;16m \u001b[23;41H \u001b[23;49H \u001b[23;61H \u001b[23;68H \u001b[23;71H \u001b[23;75H \u001b[23;82H \u001b[23;90H \u001b[24;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m1\u001b[24;6H9\u001b[24;28H315\u001b[24;32H199\u001b[24;40H\u001b[0;38;2;229;238;229;48;2;13;20;16mCOMISS—Com\u001b[24;51Ha\u001b[24;53He Scalar Ordered Single Preci\u001b[24;83Hion Fl\u001b[24;90Hating-Poin\u001b[25;8Ht Values\u001b[25;17Hand\u001b[25;21HSet\u001b[25;25HEFLAGS\u001b[26;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m200\u001b[26;28H317\u001b[26;32H200\u001b[26;40H\u001b[0;38;2;245;247;238;48;2;60;97;74mCPUID\u001b[0;38;2;229;238;229;48;2;13;20;16m—CPU Identification\u001b[0;39;48;2;13;20;16m \u001b[26;71H \u001b[26;74H \u001b[26;78H \u001b[26;90H \u001b[26;98H \u001b[27;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m201\u001b[27;8Hintel-devref-ii.pdf:318:201\u001b[27;42H\u001b[0;38;2;229;238;229;48;2;13;20;16mBasic\u001b[27;48HCPUID\u001b[27;54HInformation\u001b[28;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m202\u001b[28;28H318\u001b[28;32H202\u001b[28;41H\u001b[0;38;2;229;238;229;48;2;13;20;16m 0H\u001b[0;39;48;2;13;20;16m \u001b[28;49H \u001b[28;55H \u001b[28;63H \u001b[28;70H \u001b[28;73H \u001b[28;77H \u001b[28;89H \u001b[28;97H \u001b[29;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m203\u001b[29;8Hintel-devref-ii.pdf:318:203\u001b[29;44H\u001b[0;38;2;229;238;229;48;2;13;20;16m01H\u001b[30;4H\u001b[0;38;2;89;103;92;48;2;13;20;16m2\u001b[30;6H4\u001b[30;28H318\u001b[30;32H2\u001b[30;34H4\u001b[30;42H\u001b[0;38;2;229;238;229;48;2;13;20;16m 02H\u001b[0;39;48;2;13;20;16m \u001b[30;50H \u001b[30;62H \u001b[30;69H \u001b[30;72H \u001b[30;76H \u001b[30;88H \u001b[30;96H \u001b[0m\u001b[20;86H\u001b[?25h"] +[16.25, "o", "\u001b[26;8H\u001b[0;38;2;245;247;238;48;2;107;120;88mintel-devref-ii.pdf:317:\u001b[0m\u001b[20;86H\u001b[?25h"] +[16.75, "o", "\u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/home/goblin/01-resources/\u001b[0;38;2;223;188;229;48;2;49;71;56mintel-devref-ii.pdf\u001b[0;38;2;190;207;196;48;2;49;71;56m [317/2515] Tty PdfSections PdfTint Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[10;1H\u001b[0;39;48;2;21;32;25m \u001b[10;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mCPUID—CPU\u001b[10;13HIdentification\u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[11;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mV\u001b[11;5Hl. 2A 3-217\u001b[0;39;48;2;13;20;16m \u001b[11;24H \u001b[12;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mCPUID—CPU Identification\u001b[0;39;48;2;13;20;16m \u001b[13;15H\u001b[0;38;2;229;238;229;48;2;13;20;16mOperand Encoding\u001b[0;39;48;2;13;20;16m \u001b[14;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mDescription\u001b[0;39;48;2;13;20;16m \u001b[14;19H \u001b[14;22H \u001b[14;26H \u001b[14;32H \u001b[14;46H \u001b[14;55H \u001b[14;67H \u001b[14;74H \u001b[14;83H \u001b[14;86H \u001b[14;91H \u001b[15;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mThe ID flag (bit 21) in the EFLAGS register indicates support for the CPUID instruction. If a\u001b[15;97Hsoft\u001b[16;3Hset and clear this\u001b[16;22Hflag, the p\u001b[16;34Hocesso\u001b[16;42Hexecuting the pro\u001b[16;60Hedure support\u001b[16;74H the CPUID instruction.\u001b[16;98HThi\u001b[17;3Hoperates th\u001b[17;15H same in\u001b[17;24Hn\u001b[17;26Hn-64-bit modes and 64-b\u001b[17;50Ht mode.\u001b[17;58H\u001b[0;39;48;2;13;20;16m \u001b[17;65H \u001b[18;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mCPUID\u001b[18;9Hreturns\u001b[18;17Hprocessor identification\u001b[18;42Hand\u001b[18;46Hfeature\u001b[18;54Hinformation\u001b[18;66Hin\u001b[18;69Hthe\u001b[18;73HEAX,\u001b[18;78HEBX,\u001b[18;83HECX,\u001b[18;88Hand\u001b[18;92HEDX\u001b[18;96Hregis\u001b[20;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/home/goblin/01-resources/\u001b[0;38;2;211;176;217;48;2;29;40;36m+PdfSections\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del LocationsConfig CPUID\u001b[0;39;48;2;29;40;36m \u001b[26;8H\u001b[0;38;2;245;247;238;48;2;60;97;74mintel-devref-ii.pdf:317:200 \u001b[26;41H\u001b[0;38;2;229;238;229;48;2;13;20;16mPUID\u001b[0m\u001b[10;3H\u001b[?25h"] +[18.55, "o", "\u001b[20;61H\u001b[0;38;2;245;247;238;48;2;91;126;90mDel \u001b[0m\u001b[10;3H\u001b[?25h"] +[18.95, "o", "\u001b[11;1H\u001b[0;39;48;2;21;32;25m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[19;3H\u001b[0;38;2;229;238;229;48;2;13;20;16minstruction’s\u001b[19;17Houtput\u001b[19;24His\u001b[19;27Hdependent\u001b[19;37Hon\u001b[19;40Hthe\u001b[19;44Hcontents\u001b[19;53Hof\u001b[19;56Hthe\u001b[19;60HEAX\u001b[19;64Hregister\u001b[19;73Hupon\u001b[19;78Hexecution\u001b[19;88H(in\u001b[19;92Hsome\u001b[19;97Hcase\u001b[20;1H\u001b[0;39;48;2;21;32;25m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;229;238;229;48;2;13;20;16mFor example, the following pseudocode loads EAX with 00H and causes CPUID to return a Maximum Retu\u001b[21;3Hand the Vendor Identification String\u001b[21;40Hin the appropriate registe\u001b[21;67Hs:\u001b[0;39;48;2;13;20;16m \u001b[21;73H \u001b[21;82H \u001b[22;1H\u001b[0;39;48;2;21;32;25m \u001b[22;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mMOV EAX, 00H\u001b[0;39;48;2;13;20;16m \u001b[22;40H \u001b[22;55H \u001b[22;62H \u001b[22;70H \u001b[22;77H \u001b[22;87H \u001b[23;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mCPUID\u001b[0;39;48;2;13;20;16m \u001b[23;10H \u001b[23;17H \u001b[23;21H \u001b[23;25H \u001b[24;3H\u001b[0;38;2;229;238;229;48;2;13;20;16mTable 3-17 shows information returned, depending on\u001b[24;55Hthe initial value loaded into the EAX register\u001b[25;3HTwo\u001b[25;7Htypes of informa\u001b[25;24Hion are\u001b[25;32Hreturned:\u001b[25;42Hbasic\u001b[25;48Hand\u001b[25;52Hextended\u001b[25;61Hfunction\u001b[25;70Hinformation.\u001b[25;83HIf\u001b[25;86Ha\u001b[25;88Hvalue\u001b[25;94Hentered\u001b[26;3His higher than the maximum input value for basic or extended function\u001b[26;73Hfor\u001b[26;77Hthat\u001b[26;82Hprocessor\u001b[26;92Hthen\u001b[26;97Hthe\u001b[27;3Hhighest basic information leaf is\u001b[27;37Hreturned. For example, us\u001b[27;63Hng\u001b[27;66Hsome\u001b[27;71HIntel\u001b[27;77Hprocessors,\u001b[27;89Hthe\u001b[27;93Hfollowin\u001b[28;3HCPUID.EAX = 05H (* Returns MONITOR/MWAIT\u001b[28;44Hleaf.\u001b[28;50H*)\u001b[29;3HCPUID.EAX = 0AH (* Returns Architectural\u001b[29;44HPerformance\u001b[29;56HMonitoring\u001b[29;67Hleaf.\u001b[29;73H*)\u001b[30;4H\u001b[0;39;48;2;13;20;16m \u001b[30;8H \u001b[30;44H \u001b[0m\u001b[10;3H\u001b[?25h"] +[19.75, "o", "\u001b[0m\u001b[13;3H\u001b[?25h"] +[20.05, "o", "\u001b[10;97H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m /\u001b[0;39;48;2;29;40;36m \u001b[0m\u001b[10;100H\u001b[?25h"] +[20.35, "o", "\u001b[10;96H\u001b[0;39;48;2;29;40;36m \u001b[10;98H\u001b[0;38;2;178;195;184;48;2;29;40;36m/b\u001b[0m\u001b[10;100H\u001b[?25h"] +[20.44, "o", "\u001b[10;95H\u001b[0;39;48;2;29;40;36m \u001b[10;97H\u001b[0;38;2;178;195;184;48;2;29;40;36m/bi\u001b[0m\u001b[10;100H\u001b[?25h"] +[20.53, "o", "\u001b[10;94H\u001b[0;39;48;2;29;40;36m \u001b[10;96H\u001b[0;38;2;178;195;184;48;2;29;40;36m/bit\u001b[0m\u001b[10;100H\u001b[?25h"] +[20.62, "o", "\u001b[10;93H\u001b[0;39;48;2;29;40;36m \u001b[10;95H\u001b[0;38;2;178;195;184;48;2;29;40;36m/bit \u001b[0m\u001b[10;100H\u001b[?25h"] +[20.71, "o", "\u001b[10;92H\u001b[0;39;48;2;29;40;36m \u001b[10;94H\u001b[0;38;2;178;195;184;48;2;29;40;36m/bit 2\u001b[0m\u001b[10;100H\u001b[?25h"] +[20.8, "o", "\u001b[10;91H\u001b[0;39;48;2;29;40;36m \u001b[10;93H\u001b[0;38;2;178;195;184;48;2;29;40;36m/bit 21\u001b[0m\u001b[10;100H\u001b[?25h"] +[21.1, "o", "\u001b[10;91H\u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[12;1H\u001b[0;39;48;2;21;32;25m \u001b[19;3H\u001b[0;39;48;2;13;20;16m \u001b[19;17H \u001b[19;24H \u001b[19;27H \u001b[19;37H \u001b[19;40H \u001b[19;44H \u001b[19;53H \u001b[19;56H \u001b[19;60H \u001b[19;64H \u001b[19;73H \u001b[19;78H \u001b[19;88H \u001b[19;92H \u001b[19;97H \u001b[20;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/home/goblin/01-resources/\u001b[0;38;2;211;176;217;48;2;29;40;36m+Search\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del LocationsConfig\u001b[0;39;48;2;29;40;36m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[21;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 1 intel-devref-ii.pdf:317:1\u001b[0;39;48;2;13;20;16m \u001b[21;40H \u001b[21;43H \u001b[21;47H \u001b[21;59H \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[22;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 2 \u001b[0;38;2;229;238;229;48;2;13;20;16mbit\u001b[22;12H21\u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[23;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 3 intel-devref-ii.pdf:320:1\u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[24;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[0;38;2;229;238;229;48;2;13;20;16mbit 21\u001b[0;39;48;2;13;20;16m \u001b[24;20H \u001b[24;32H \u001b[24;42H \u001b[24;52H \u001b[24;55H \u001b[24;59H \u001b[24;67H \u001b[24;73H \u001b[24;80H \u001b[24;85H \u001b[24;89H \u001b[24;93H \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[25;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 5 intel-devref-ii.pdf:321:1\u001b[0;39;48;2;13;20;16m \u001b[25;42H \u001b[25;48H \u001b[25;52H \u001b[25;61H \u001b[25;70H \u001b[25;83H \u001b[25;86H \u001b[25;88H \u001b[25;94H \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[26;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[26;6H6 \u001b[0;38;2;229;238;229;48;2;13;20;16mbit 21\u001b[0;39;48;2;13;20;16m \u001b[26;18H \u001b[26;22H \u001b[26;30H \u001b[26;36H \u001b[26;42H \u001b[26;46H \u001b[26;52H \u001b[26;55H \u001b[26;64H \u001b[26;73H \u001b[26;77H \u001b[26;82H \u001b[26;92H \u001b[26;97H \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[27;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 7 intel-devref-ii.pdf:323:1\u001b[27;34H\u001b[0;39;48;2;13;20;16m \u001b[27;37H \u001b[27;47H \u001b[27;51H \u001b[27;60H \u001b[27;66H \u001b[27;71H \u001b[27;77H \u001b[27;89H \u001b[27;93H \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[28;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 8 \u001b[0;38;2;229;238;229;48;2;13;20;16mbit 21\u001b[28;15H\u001b[0;39;48;2;13;20;16m \u001b[28;19H \u001b[28;22H \u001b[28;30H \u001b[28;44H \u001b[28;50H \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[29;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 9 intel-devref-ii.pdf:684:1\u001b[0;39;48;2;13;20;16m \u001b[29;44H \u001b[29;56H \u001b[29;67H \u001b[29;73H \u001b[30;5H\u001b[0;38;2;89;103;92;48;2;13;20;16m10\u001b[30;8H\u001b[0;38;2;229;238;229;48;2;13;20;16mbit\u001b[30;12H21\u001b[0m\u001b[13;3H\u001b[?25h"] +[23.1, "o", ""] diff --git a/docs/site/casts/terminals.cast b/docs/site/casts/terminals.cast new file mode 100644 index 00000000..bac022a2 --- /dev/null +++ b/docs/site/casts/terminals.cast @@ -0,0 +1,59 @@ +{"version": 2, "width": 100, "height": 30, "title": "Terminals as panes", "env": {"TERM": "xterm-256color", "SHELL": "/bin/sh"}} +[0.0, "o", "\u001b[?25l\u001b[0m\u001b[2J\u001b[1;1H\u001b[0;38;2;178;195;184;48;2;29;40;36mNewcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit\u001b[0;39;48;2;29;40;36m \u001b[2;1H\u001b[0;38;2;255;255;255;48;2;136;116;85m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;49;71;56m \u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello/\u001b[0;38;2;223;188;229;48;2;49;71;56mNOTES\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[4;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;97;111;100;48;2;13;20;16;1m 1 \u001b[0;38;2;229;238;229;48;2;13;20;16mhello: notes\u001b[0;39;48;2;13;20;16m \u001b[5;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 2 \u001b[0;39;48;2;13;20;16m \u001b[6;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 3 \u001b[0;38;2;229;238;229;48;2;13;20;16mThe sum of the squares of 1 to 4 is 30.\u001b[0;39;48;2;13;20;16m \u001b[7;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 4 \u001b[0;38;2;229;238;229;48;2;13;20;16mWhat ./hello prints:\u001b[0;39;48;2;13;20;16m \u001b[8;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 5 \u001b[0;39;48;2;13;20;16m \u001b[9;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;39;48;2;13;20;16m \u001b[10;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[11;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[12;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[13;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[14;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[15;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[16;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[17;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[18;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[19;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[20;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[21;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[22;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[23;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[24;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[25;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[26;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[27;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[28;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[29;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[30;1H\u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[0;39;48;2;13;20;16m \u001b[0m\u001b[4;8H\u001b[?25h"] +[1.2, "o", "\u001b[3;31H\u001b[0;38;2;245;247;238;48;2;91;126;90mTty \u001b[0m\u001b[4;8H\u001b[?25h"] +[1.7, "o", "\u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello/\u001b[0;38;2;211;176;217;48;2;29;40;36mNOTES\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[4;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 1 \u001b[4;96H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mTty\u001b[0;39;48;2;29;40;36m \u001b[8;1H\u001b[0;39;48;2;21;32;25m \u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m$ \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello \u001b[0;38;2;223;188;229;48;2;49;71;56mTty+sh\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Mode Filter Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[10;3H\u001b[0;38;2;229;238;229;48;2;13;20;16m$\u001b[0m\u001b[10;5H\u001b[?25h"] +[2.7, "o", "\u001b[4;96H\u001b[0;39;48;2;13;20;16m \u001b[9;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0m\u001b[10;5H\u001b[?25h"] +[3.0, "o", "\u001b[2;3H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;255;255;255;48;2;136;116;85m \u001b[2;54H\u001b[0;38;2;190;207;196;48;2;49;71;56mNew\u001b[2;58HTty\u001b[2;62HFind\u001b[2;67HGrep\u001b[2;72HJoincol\u001b[2;80HDelcol\u001b[3;51H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello \u001b[0;38;2;223;188;229;48;2;49;71;56mTty+sh\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Mode Filter Collaps\u001b[4;51H\u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56me Del\u001b[0;39;48;2;49;71;56m \u001b[5;51H\u001b[0;39;48;2;96;130;105m \u001b[5;53H\u001b[0;38;2;229;238;229;48;2;13;20;16m$\u001b[6;51H\u001b[0;39;48;2;96;130;105m \u001b[7;51H \u001b[8;1H \u001b[8;51H \u001b[9;1H \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0;39;48;2;13;20;16m \u001b[0;39;48;2;96;130;105m \u001b[0;39;48;2;13;20;16m \u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[10;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m \u001b[10;51H\u001b[0;39;48;2;96;130;105m \u001b[11;51H \u001b[12;51H \u001b[13;51H \u001b[14;51H \u001b[15;51H \u001b[16;51H \u001b[17;51H \u001b[18;51H \u001b[19;51H \u001b[20;51H \u001b[21;51H \u001b[22;51H \u001b[23;51H \u001b[24;51H \u001b[25;51H \u001b[26;51H \u001b[27;51H \u001b[28;51H \u001b[29;51H \u001b[30;51H \u001b[0m\u001b[5;55H\u001b[?25h"] +[3.4, "o", "\u001b[3;51H\u001b[0;38;2;0;0;0;48;2;173;211;138m$\u001b[0m\u001b[5;55H\u001b[?25h"] +[4.0, "o", "\u001b[5;55H\u001b[0;38;2;229;238;229;48;2;13;20;16mm\u001b[0m\u001b[5;56H\u001b[?25h"] +[4.07, "o", "\u001b[5;56H\u001b[0;38;2;229;238;229;48;2;13;20;16ma\u001b[0m\u001b[5;57H\u001b[?25h"] +[4.14, "o", "\u001b[5;57H\u001b[0;38;2;229;238;229;48;2;13;20;16mk\u001b[0m\u001b[5;58H\u001b[?25h"] +[4.21, "o", "\u001b[5;58H\u001b[0;38;2;229;238;229;48;2;13;20;16me\u001b[0m\u001b[5;59H\u001b[?25h"] +[4.28, "o", "\u001b[0m\u001b[5;60H\u001b[?25h"] +[4.35, "o", "\u001b[5;60H\u001b[0;38;2;229;238;229;48;2;13;20;16m&\u001b[0m\u001b[5;61H\u001b[?25h"] +[4.42, "o", "\u001b[5;61H\u001b[0;38;2;229;238;229;48;2;13;20;16m&\u001b[0m\u001b[5;62H\u001b[?25h"] +[4.49, "o", "\u001b[0m\u001b[5;63H\u001b[?25h"] +[4.56, "o", "\u001b[5;63H\u001b[0;38;2;229;238;229;48;2;13;20;16m.\u001b[0m\u001b[5;64H\u001b[?25h"] +[4.63, "o", "\u001b[5;64H\u001b[0;38;2;229;238;229;48;2;13;20;16m/\u001b[0m\u001b[5;65H\u001b[?25h"] +[4.7, "o", "\u001b[5;65H\u001b[0;38;2;229;238;229;48;2;13;20;16mh\u001b[0m\u001b[5;66H\u001b[?25h"] +[4.77, "o", "\u001b[5;66H\u001b[0;38;2;229;238;229;48;2;13;20;16me\u001b[0m\u001b[5;67H\u001b[?25h"] +[4.84, "o", "\u001b[5;67H\u001b[0;38;2;229;238;229;48;2;13;20;16ml\u001b[0m\u001b[5;68H\u001b[?25h"] +[4.91, "o", "\u001b[5;68H\u001b[0;38;2;229;238;229;48;2;13;20;16ml\u001b[0m\u001b[5;69H\u001b[?25h"] +[4.98, "o", "\u001b[5;69H\u001b[0;38;2;229;238;229;48;2;13;20;16mo\u001b[0m\u001b[5;70H\u001b[?25h"] +[5.38, "o", "\u001b[6;53H\u001b[0;38;2;229;238;229;48;2;13;20;16msquares:\u001b[6;62H30\u001b[7;53H$\u001b[0m\u001b[7;55H\u001b[?25h"] +[6.58, "o", "\u001b[3;51H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0m\u001b[7;55H\u001b[?25h"] +[7.18, "o", "\u001b[0m\u001b[6;55H\u001b[?25h"] +[7.58, "o", "\u001b[6;53H\u001b[0;38;2;245;247;238;48;2;60;97;74msquares: 30 \u001b[0m\u001b[6;64H\u001b[?25h"] +[8.88, "o", "\u001b[2;3H\u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;49;71;56m \u001b[2;53H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;29;40;36m \u001b[3;1H\u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello/\u001b[0;38;2;223;188;229;48;2;49;71;56mNOTES\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Tty Collapse Del\u001b[0;39;48;2;49;71;56m \u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello \u001b[0;38;2;211;176;217;48;2;29;40;36mTty+sh\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Mode Filter Collaps\u001b[4;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 1 \u001b[4;51H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36me Del\u001b[0;39;48;2;29;40;36m \u001b[5;95H \u001b[0;38;2;178;195;184;48;2;29;40;36mLeft\u001b[0;39;48;2;29;40;36m \u001b[0m\u001b[4;8H\u001b[?25h"] +[9.48, "o", "\u001b[5;95H\u001b[0;38;2;229;238;229;48;2;13;20;16m \u001b[0m\u001b[4;8H\u001b[?25h"] +[9.7, "o", "\u001b[4;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 1 \u001b[8;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 5 \u001b[0m\u001b[8;8H\u001b[?25h"] +[10.2, "o", "\u001b[3;2H\u001b[0;38;2;0;0;0;48;2;249;203;112;1m*\u001b[8;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 5 \u001b[9;3H\u001b[0;38;2;97;111;100;48;2;13;20;16;1m 6 \u001b[0;38;2;245;247;238;48;2;60;97;74msquares: 30 \u001b[10;6H\u001b[0;38;2;89;103;92;48;2;13;20;16m7\u001b[0m\u001b[9;19H\u001b[?25h"] +[11.4, "o", "\u001b[2;3H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;29;40;36m \u001b[2;53H\u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56mNew Tty Find Grep Joincol Delcol\u001b[0;39;48;2;49;71;56m \u001b[3;1H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[3;3H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello/\u001b[0;38;2;211;176;217;48;2;29;40;36mNOTES\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;0;0;0;48;2;173;211;138m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56m/tmp/cast/hello \u001b[0;38;2;223;188;229;48;2;49;71;56mTty+sh\u001b[0;38;2;190;207;196;48;2;49;71;56m Save Mode Filter Collaps\u001b[4;44H\u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36mRight\u001b[0;39;48;2;29;40;36m \u001b[0;39;48;2;49;71;56m \u001b[0;38;2;190;207;196;48;2;49;71;56me Del\u001b[0;39;48;2;49;71;56m \u001b[9;3H\u001b[0;38;2;89;103;92;48;2;13;20;16m 6 \u001b[0m\u001b[6;64H\u001b[?25h"] +[11.8, "o", "\u001b[3;51H\u001b[0;38;2;0;0;0;48;2;173;211;138m$\u001b[4;44H\u001b[0;39;48;2;13;20;16m \u001b[6;53H\u001b[0;38;2;229;238;229;48;2;13;20;16msquares: 30 \u001b[0m\u001b[7;55H\u001b[?25h"] +[12.4, "o", "\u001b[7;55H\u001b[0;38;2;229;238;229;48;2;13;20;16mg\u001b[0m\u001b[7;56H\u001b[?25h"] +[12.47, "o", "\u001b[7;56H\u001b[0;38;2;229;238;229;48;2;13;20;16mi\u001b[0m\u001b[7;57H\u001b[?25h"] +[12.54, "o", "\u001b[7;57H\u001b[0;38;2;229;238;229;48;2;13;20;16mt\u001b[0m\u001b[7;58H\u001b[?25h"] +[12.61, "o", "\u001b[0m\u001b[7;59H\u001b[?25h"] +[12.68, "o", "\u001b[7;59H\u001b[0;38;2;229;238;229;48;2;13;20;16ml\u001b[0m\u001b[7;60H\u001b[?25h"] +[12.75, "o", "\u001b[7;60H\u001b[0;38;2;229;238;229;48;2;13;20;16mo\u001b[0m\u001b[7;61H\u001b[?25h"] +[12.82, "o", "\u001b[7;61H\u001b[0;38;2;229;238;229;48;2;13;20;16mg\u001b[0m\u001b[7;62H\u001b[?25h"] +[12.89, "o", "\u001b[0m\u001b[7;63H\u001b[?25h"] +[12.96, "o", "\u001b[7;63H\u001b[0;38;2;229;238;229;48;2;13;20;16m-\u001b[0m\u001b[7;64H\u001b[?25h"] +[13.03, "o", "\u001b[7;64H\u001b[0;38;2;229;238;229;48;2;13;20;16m-\u001b[0m\u001b[7;65H\u001b[?25h"] +[13.1, "o", "\u001b[7;65H\u001b[0;38;2;229;238;229;48;2;13;20;16ms\u001b[0m\u001b[7;66H\u001b[?25h"] +[13.17, "o", "\u001b[7;66H\u001b[0;38;2;229;238;229;48;2;13;20;16mt\u001b[0m\u001b[7;67H\u001b[?25h"] +[13.24, "o", "\u001b[7;67H\u001b[0;38;2;229;238;229;48;2;13;20;16ma\u001b[0m\u001b[7;68H\u001b[?25h"] +[13.31, "o", "\u001b[7;68H\u001b[0;38;2;229;238;229;48;2;13;20;16mt\u001b[0m\u001b[7;69H\u001b[?25h"] +[13.38, "o", "\u001b[0m\u001b[7;70H\u001b[?25h"] +[13.45, "o", "\u001b[7;70H\u001b[0;38;2;229;238;229;48;2;13;20;16m|\u001b[0m\u001b[7;71H\u001b[?25h"] +[13.52, "o", "\u001b[0m\u001b[7;72H\u001b[?25h"] +[13.59, "o", "\u001b[7;72H\u001b[0;38;2;229;238;229;48;2;13;20;16mp\u001b[0m\u001b[7;73H\u001b[?25h"] +[13.66, "o", "\u001b[7;73H\u001b[0;38;2;229;238;229;48;2;13;20;16ma\u001b[0m\u001b[7;74H\u001b[?25h"] +[13.73, "o", "\u001b[7;74H\u001b[0;38;2;229;238;229;48;2;13;20;16mr\u001b[0m\u001b[7;75H\u001b[?25h"] +[13.8, "o", "\u001b[7;75H\u001b[0;38;2;229;238;229;48;2;13;20;16md\u001b[0m\u001b[7;76H\u001b[?25h"] +[13.87, "o", "\u001b[7;76H\u001b[0;38;2;229;238;229;48;2;13;20;16me\u001b[0m\u001b[7;77H\u001b[?25h"] +[13.94, "o", "\u001b[7;77H\u001b[0;38;2;229;238;229;48;2;13;20;16ms\u001b[0m\u001b[7;78H\u001b[?25h"] +[14.01, "o", "\u001b[0m\u001b[7;79H\u001b[?25h"] +[14.08, "o", "\u001b[7;79H\u001b[0;38;2;229;238;229;48;2;13;20;16m-\u001b[0m\u001b[7;80H\u001b[?25h"] +[14.48, "o", "\u001b[8;53H\u001b[0;38;2;229;238;229;48;2;13;20;16m$\u001b[18;51H\u001b[0;38;2;255;255;255;48;2;73;102;86m \u001b[0;39;48;2;29;40;36m \u001b[0;38;2;178;195;184;48;2;29;40;36m/tmp/cast/hello/\u001b[0;38;2;211;176;217;48;2;29;40;36m+Pager\u001b[0;38;2;178;195;184;48;2;29;40;36m Save Tty Collapse Del\u001b[0;39;48;2;29;40;36m \u001b[19;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m1\u001b[19;58H\u001b[0;38;2;233;198;128;48;2;13;20;16mcommit\u001b[19;65H691de50\u001b[20;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m2\u001b[20;58H\u001b[0;38;2;229;238;229;48;2;13;20;16mAuthor:\u001b[20;66HDemo\u001b[20;71H<[email protected]>\u001b[21;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m3\u001b[21;58H\u001b[0;38;2;229;238;229;48;2;13;20;16mDate:\u001b[21;66HSun\u001b[21;70HSep\u001b[21;74H27\u001b[21;77H16:40:00\u001b[21;86H2026\u001b[21;91H+0000\u001b[22;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m4\u001b[23;51H\u001b[0;39;48;2;21;32;25m \u001b[23;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m5\u001b[23;62H\u001b[0;38;2;229;238;229;48;2;13;20;16mKeep\u001b[23;67Hnotes\u001b[24;51H\u001b[0;39;48;2;21;32;25m \u001b[24;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m6\u001b[25;51H\u001b[0;39;48;2;21;32;25m \u001b[25;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m7\u001b[25;59H\u001b[0;38;2;229;238;229;48;2;13;20;16mNOTES\u001b[25;65H|\u001b[25;67H5\u001b[25;69H\u001b[0;38;2;182;206;148;48;2;13;20;16m+++++\u001b[26;51H\u001b[0;39;48;2;21;32;25m \u001b[26;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m8\u001b[26;59H\u001b[0;38;2;229;238;229;48;2;13;20;16m1\u001b[26;61Hfile\u001b[26;66Hchanged,\u001b[26;75H5\u001b[26;77Hinsertions(+)\u001b[27;51H\u001b[0;39;48;2;21;32;25m \u001b[27;56H\u001b[0;38;2;89;103;92;48;2;13;20;16m9\u001b[28;51H\u001b[0;39;48;2;21;32;25m \u001b[28;55H\u001b[0;38;2;89;103;92;48;2;13;20;16m10\u001b[28;58H\u001b[0;38;2;233;198;128;48;2;13;20;16mcommit\u001b[28;65H09d5c1f\u001b[29;51H\u001b[0;39;48;2;21;32;25m \u001b[29;55H\u001b[0;38;2;89;103;92;48;2;13;20;16m11\u001b[29;58H\u001b[0;38;2;229;238;229;48;2;13;20;16mAuthor:\u001b[29;66HDemo\u001b[29;71H<[email protected]>\u001b[30;51H\u001b[0;39;48;2;21;32;25m \u001b[30;55H\u001b[0;38;2;89;103;92;48;2;13;20;16m12\u001b[30;58H\u001b[0;38;2;229;238;229;48;2;13;20;16mDate:\u001b[30;66HThu\u001b[30;70HSep\u001b[30;74H24\u001b[30;77H09:15:00\u001b[30;86H2026\u001b[30;91H+0000\u001b[0m\u001b[8;55H\u001b[?25h"] +[16.48, "o", ""] diff --git a/docs/site/fonts/CrimsonPro-VF-italic.woff2 b/docs/site/fonts/CrimsonPro-VF-italic.woff2 Binary files differnew file mode 100644 index 00000000..59923684 --- /dev/null +++ b/docs/site/fonts/CrimsonPro-VF-italic.woff2 diff --git a/docs/site/fonts/CrimsonPro-VF-normal.woff2 b/docs/site/fonts/CrimsonPro-VF-normal.woff2 Binary files differnew file mode 100644 index 00000000..7fd174a4 --- /dev/null +++ b/docs/site/fonts/CrimsonPro-VF-normal.woff2 diff --git a/docs/site/fonts/DepartureMono-Regular.woff2 b/docs/site/fonts/DepartureMono-Regular.woff2 Binary files differnew file mode 100644 index 00000000..b4a23dc1 --- /dev/null +++ b/docs/site/fonts/DepartureMono-Regular.woff2 diff --git a/docs/site/fonts/LICENSE-CrimsonPro.txt b/docs/site/fonts/LICENSE-CrimsonPro.txt new file mode 100644 index 00000000..6a7d97cd --- /dev/null +++ b/docs/site/fonts/LICENSE-CrimsonPro.txt @@ -0,0 +1,93 @@ +Copyright 2018 The Crimson Pro Project Authors (https://github.com/Fonthausen/CrimsonPro) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/site/fonts/LICENSE-DepartureMono.txt b/docs/site/fonts/LICENSE-DepartureMono.txt new file mode 100644 index 00000000..de524761 --- /dev/null +++ b/docs/site/fonts/LICENSE-DepartureMono.txt @@ -0,0 +1,93 @@ +Copyright 2022–2024 Helena Zhang (helenazhang.com). + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +https://openfontlicense.org + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/docs/site/media/captions.txt b/docs/site/media/captions.txt new file mode 100644 index 00000000..4879cb12 --- /dev/null +++ b/docs/site/media/captions.txt @@ -0,0 +1,13 @@ +pdf-navigation: A 2,515-page PDF: page, jump to CPUID, search, step hits. +image-pane: Right-click an image's name, even in a shell, to open it. +pdf-tint-fit: PdfTint tints the page, PdfFit fits it, a page address jumps. +text-is-the-interface: Middle-click make in the README; right-click the error. +terminals-are-panes: A terminal is a pane: Ctrl-b, then move over its output. +scripting-over-9p: A script drives the session through its virtual filesystem (9P). +diff-review: Right-click a diff line to open that line of the file. +chords: Hold left, click middle to cut; click right to paste. +columns: Newcol adds a column; a look opens there; Alt-c moves a pane. +search: Grep lists the hits; n and N walk them; right-click opens one. +where-commands-run: A file's tag runs in its directory; the column tag, in the session's. +edit-via-ctl: An Edit written to ctl changes every sum; one Undo restores. +wait-editor: git commit's message opens in a pane; Del returns it to git. diff --git a/docs/site/media/chords.mp4 b/docs/site/media/chords.mp4 Binary files differnew file mode 100644 index 00000000..43bc556b --- /dev/null +++ b/docs/site/media/chords.mp4 diff --git a/docs/site/media/chords.png b/docs/site/media/chords.png Binary files differnew file mode 100644 index 00000000..a140347c --- /dev/null +++ b/docs/site/media/chords.png diff --git a/docs/site/media/chords.webm b/docs/site/media/chords.webm Binary files differnew file mode 100644 index 00000000..42a6f4e6 --- /dev/null +++ b/docs/site/media/chords.webm diff --git a/docs/site/media/clips.toml b/docs/site/media/clips.toml new file mode 100644 index 00000000..f2406396 --- /dev/null +++ b/docs/site/media/clips.toml @@ -0,0 +1,77 @@ +# The landing page's recordings, in the order shown. For each clip the +# site ships media/<name>.webm and media/<name>.mp4, with media/<name>.png +# as the poster; a caption may hold markup (#link). `landing = false` keeps a clip off the landing (the +# terminal casts show the same) while its files stay for the chapters. While `ready` is false the clip shows placeholder.svg and +# no video, so the site builds before a recording exists. + +[[clip]] +name = "pdf-navigation" +caption = "A 2,515-page PDF: page, jump to CPUID, search, step hits." +ready = true + +[[clip]] +name = "image-pane" +caption = "Right-click an image's name, even in a shell, to open it." +ready = true + +[[clip]] +name = "pdf-tint-fit" +caption = "PdfTint tints the page, PdfFit fits it, a page address jumps." +ready = true + +[[clip]] +name = "text-is-the-interface" +caption = "Middle-click make in the README; right-click the error." +ready = true + +[[clip]] +name = "terminals-are-panes" +caption = "A terminal is a pane: Ctrl-b, then move over its output." +ready = true +landing = false + +[[clip]] +name = "scripting-over-9p" +caption = "A shell under #link(\"setup.html#ninens\")[9ns], where the session is a directory: ls, cat, echo." +ready = true + +[[clip]] +name = "diff-review" +caption = "Right-click a diff line to open that line of the file." +ready = true + +[[clip]] +name = "chords" +caption = "Hold left, click middle to cut; click right to paste." +ready = true +landing = false + +[[clip]] +name = "columns" +caption = "Newcol adds a column; a look opens there; Alt-c moves a pane." +ready = true +landing = false + +[[clip]] +name = "search" +caption = "Grep lists the hits; n and N walk them; right-click opens one." +ready = true +landing = false + +[[clip]] +name = "where-commands-run" +caption = "File tags run in their directory; column tags, in the session's." +ready = true +landing = false + +[[clip]] +name = "edit-via-ctl" +caption = "An Edit written to ctl changes every sum; one Undo restores." +ready = true +landing = false + +[[clip]] +name = "wait-editor" +caption = "git commit's message opens in a pane; Del returns it to git." +ready = true +landing = false diff --git a/docs/site/media/columns.mp4 b/docs/site/media/columns.mp4 Binary files differnew file mode 100644 index 00000000..48bc462b --- /dev/null +++ b/docs/site/media/columns.mp4 diff --git a/docs/site/media/columns.png b/docs/site/media/columns.png Binary files differnew file mode 100644 index 00000000..f8cc1801 --- /dev/null +++ b/docs/site/media/columns.png diff --git a/docs/site/media/columns.webm b/docs/site/media/columns.webm Binary files differnew file mode 100644 index 00000000..ddb6bdfc --- /dev/null +++ b/docs/site/media/columns.webm diff --git a/docs/site/media/diff-review.mp4 b/docs/site/media/diff-review.mp4 Binary files differnew file mode 100644 index 00000000..73fa1a76 --- /dev/null +++ b/docs/site/media/diff-review.mp4 diff --git a/docs/site/media/diff-review.png b/docs/site/media/diff-review.png Binary files differnew file mode 100644 index 00000000..76a7dc43 --- /dev/null +++ b/docs/site/media/diff-review.png diff --git a/docs/site/media/diff-review.webm b/docs/site/media/diff-review.webm Binary files differnew file mode 100644 index 00000000..da7756f9 --- /dev/null +++ b/docs/site/media/diff-review.webm diff --git a/docs/site/media/edit-via-ctl.mp4 b/docs/site/media/edit-via-ctl.mp4 Binary files differnew file mode 100644 index 00000000..d63f6e7f --- /dev/null +++ b/docs/site/media/edit-via-ctl.mp4 diff --git a/docs/site/media/edit-via-ctl.png b/docs/site/media/edit-via-ctl.png Binary files differnew file mode 100644 index 00000000..7a21d734 --- /dev/null +++ b/docs/site/media/edit-via-ctl.png diff --git a/docs/site/media/edit-via-ctl.webm b/docs/site/media/edit-via-ctl.webm Binary files differnew file mode 100644 index 00000000..77639d34 --- /dev/null +++ b/docs/site/media/edit-via-ctl.webm diff --git a/docs/site/media/image-pane.mp4 b/docs/site/media/image-pane.mp4 Binary files differnew file mode 100644 index 00000000..9fb1a0e9 --- /dev/null +++ b/docs/site/media/image-pane.mp4 diff --git a/docs/site/media/image-pane.png b/docs/site/media/image-pane.png Binary files differnew file mode 100644 index 00000000..94eb7b50 --- /dev/null +++ b/docs/site/media/image-pane.png diff --git a/docs/site/media/image-pane.webm b/docs/site/media/image-pane.webm Binary files differnew file mode 100644 index 00000000..764be10c --- /dev/null +++ b/docs/site/media/image-pane.webm diff --git a/docs/site/media/pdf-navigation.mp4 b/docs/site/media/pdf-navigation.mp4 Binary files differnew file mode 100644 index 00000000..f0369f7b --- /dev/null +++ b/docs/site/media/pdf-navigation.mp4 diff --git a/docs/site/media/pdf-navigation.png b/docs/site/media/pdf-navigation.png Binary files differnew file mode 100644 index 00000000..79dd6453 --- /dev/null +++ b/docs/site/media/pdf-navigation.png diff --git a/docs/site/media/pdf-navigation.webm b/docs/site/media/pdf-navigation.webm Binary files differnew file mode 100644 index 00000000..17c8b1b3 --- /dev/null +++ b/docs/site/media/pdf-navigation.webm diff --git a/docs/site/media/pdf-tint-fit.mp4 b/docs/site/media/pdf-tint-fit.mp4 Binary files differnew file mode 100644 index 00000000..a1b4a5a6 --- /dev/null +++ b/docs/site/media/pdf-tint-fit.mp4 diff --git a/docs/site/media/pdf-tint-fit.png b/docs/site/media/pdf-tint-fit.png Binary files differnew file mode 100644 index 00000000..923ab143 --- /dev/null +++ b/docs/site/media/pdf-tint-fit.png diff --git a/docs/site/media/pdf-tint-fit.webm b/docs/site/media/pdf-tint-fit.webm Binary files differnew file mode 100644 index 00000000..e641101f --- /dev/null +++ b/docs/site/media/pdf-tint-fit.webm diff --git a/docs/site/media/placeholder.svg b/docs/site/media/placeholder.svg new file mode 100644 index 00000000..0b0efde0 --- /dev/null +++ b/docs/site/media/placeholder.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 400"><rect width="640" height="400" fill="#121c16"/><rect x="24" y="24" width="592" height="28" fill="#1d2824"/><rect x="24" y="24" width="28" height="28" fill="#add38a"/><rect x="24" y="64" width="592" height="312" fill="none" stroke="#486152" stroke-width="2"/><text x="320" y="230" fill="#b2c3b8" font-family="monospace" font-size="22" text-anchor="middle">recording to come</text></svg> diff --git a/docs/site/media/scripting-over-9p.mp4 b/docs/site/media/scripting-over-9p.mp4 Binary files differnew file mode 100644 index 00000000..af69f85c --- /dev/null +++ b/docs/site/media/scripting-over-9p.mp4 diff --git a/docs/site/media/scripting-over-9p.png b/docs/site/media/scripting-over-9p.png Binary files differnew file mode 100644 index 00000000..84e47ba3 --- /dev/null +++ b/docs/site/media/scripting-over-9p.png diff --git a/docs/site/media/scripting-over-9p.webm b/docs/site/media/scripting-over-9p.webm Binary files differnew file mode 100644 index 00000000..bf39a7e8 --- /dev/null +++ b/docs/site/media/scripting-over-9p.webm diff --git a/docs/site/media/search.mp4 b/docs/site/media/search.mp4 Binary files differnew file mode 100644 index 00000000..6c9c9445 --- /dev/null +++ b/docs/site/media/search.mp4 diff --git a/docs/site/media/search.png b/docs/site/media/search.png Binary files differnew file mode 100644 index 00000000..40e5bed5 --- /dev/null +++ b/docs/site/media/search.png diff --git a/docs/site/media/search.webm b/docs/site/media/search.webm Binary files differnew file mode 100644 index 00000000..e1581570 --- /dev/null +++ b/docs/site/media/search.webm diff --git a/docs/site/media/terminals-are-panes.mp4 b/docs/site/media/terminals-are-panes.mp4 Binary files differnew file mode 100644 index 00000000..b5f43b35 --- /dev/null +++ b/docs/site/media/terminals-are-panes.mp4 diff --git a/docs/site/media/terminals-are-panes.png b/docs/site/media/terminals-are-panes.png Binary files differnew file mode 100644 index 00000000..a97bb6ba --- /dev/null +++ b/docs/site/media/terminals-are-panes.png diff --git a/docs/site/media/terminals-are-panes.webm b/docs/site/media/terminals-are-panes.webm Binary files differnew file mode 100644 index 00000000..15ee73fe --- /dev/null +++ b/docs/site/media/terminals-are-panes.webm diff --git a/docs/site/media/text-is-the-interface.mp4 b/docs/site/media/text-is-the-interface.mp4 Binary files differnew file mode 100644 index 00000000..b4a12c87 --- /dev/null +++ b/docs/site/media/text-is-the-interface.mp4 diff --git a/docs/site/media/text-is-the-interface.png b/docs/site/media/text-is-the-interface.png Binary files differnew file mode 100644 index 00000000..a31dcb78 --- /dev/null +++ b/docs/site/media/text-is-the-interface.png diff --git a/docs/site/media/text-is-the-interface.webm b/docs/site/media/text-is-the-interface.webm Binary files differnew file mode 100644 index 00000000..76c2c06b --- /dev/null +++ b/docs/site/media/text-is-the-interface.webm diff --git a/docs/site/media/themes/acme.png b/docs/site/media/themes/acme.png Binary files differnew file mode 100644 index 00000000..da647db1 --- /dev/null +++ b/docs/site/media/themes/acme.png diff --git a/docs/site/media/themes/alucard.png b/docs/site/media/themes/alucard.png Binary files differnew file mode 100644 index 00000000..dab6ce80 --- /dev/null +++ b/docs/site/media/themes/alucard.png diff --git a/docs/site/media/themes/atelier.png b/docs/site/media/themes/atelier.png Binary files differnew file mode 100644 index 00000000..a8c36f2a --- /dev/null +++ b/docs/site/media/themes/atelier.png diff --git a/docs/site/media/themes/ayu_dark.png b/docs/site/media/themes/ayu_dark.png Binary files differnew file mode 100644 index 00000000..711ed8aa --- /dev/null +++ b/docs/site/media/themes/ayu_dark.png diff --git a/docs/site/media/themes/ayu_light.png b/docs/site/media/themes/ayu_light.png Binary files differnew file mode 100644 index 00000000..0ddcb9af --- /dev/null +++ b/docs/site/media/themes/ayu_light.png diff --git a/docs/site/media/themes/ayu_mirage.png b/docs/site/media/themes/ayu_mirage.png Binary files differnew file mode 100644 index 00000000..56676d1f --- /dev/null +++ b/docs/site/media/themes/ayu_mirage.png diff --git a/docs/site/media/themes/catppuccin_frappe.png b/docs/site/media/themes/catppuccin_frappe.png Binary files differnew file mode 100644 index 00000000..58c13dbe --- /dev/null +++ b/docs/site/media/themes/catppuccin_frappe.png diff --git a/docs/site/media/themes/catppuccin_latte.png b/docs/site/media/themes/catppuccin_latte.png Binary files differnew file mode 100644 index 00000000..27e58ce0 --- /dev/null +++ b/docs/site/media/themes/catppuccin_latte.png diff --git a/docs/site/media/themes/catppuccin_macchiato.png b/docs/site/media/themes/catppuccin_macchiato.png Binary files differnew file mode 100644 index 00000000..fb32c742 --- /dev/null +++ b/docs/site/media/themes/catppuccin_macchiato.png diff --git a/docs/site/media/themes/catppuccin_mocha.png b/docs/site/media/themes/catppuccin_mocha.png Binary files differnew file mode 100644 index 00000000..e16e4224 --- /dev/null +++ b/docs/site/media/themes/catppuccin_mocha.png diff --git a/docs/site/media/themes/clay.png b/docs/site/media/themes/clay.png Binary files differnew file mode 100644 index 00000000..117b731d --- /dev/null +++ b/docs/site/media/themes/clay.png diff --git a/docs/site/media/themes/dark.png b/docs/site/media/themes/dark.png Binary files differnew file mode 100644 index 00000000..6346759e --- /dev/null +++ b/docs/site/media/themes/dark.png diff --git a/docs/site/media/themes/dark_plus.png b/docs/site/media/themes/dark_plus.png Binary files differnew file mode 100644 index 00000000..6a750655 --- /dev/null +++ b/docs/site/media/themes/dark_plus.png diff --git a/docs/site/media/themes/daybreak.png b/docs/site/media/themes/daybreak.png Binary files differnew file mode 100644 index 00000000..ca3dcc5c --- /dev/null +++ b/docs/site/media/themes/daybreak.png diff --git a/docs/site/media/themes/doom_one.png b/docs/site/media/themes/doom_one.png Binary files differnew file mode 100644 index 00000000..95f13135 --- /dev/null +++ b/docs/site/media/themes/doom_one.png diff --git a/docs/site/media/themes/doom_one_light.png b/docs/site/media/themes/doom_one_light.png Binary files differnew file mode 100644 index 00000000..c8c4c69a --- /dev/null +++ b/docs/site/media/themes/doom_one_light.png diff --git a/docs/site/media/themes/dracula.png b/docs/site/media/themes/dracula.png Binary files differnew file mode 100644 index 00000000..64eea04a --- /dev/null +++ b/docs/site/media/themes/dracula.png diff --git a/docs/site/media/themes/dracula_soft.png b/docs/site/media/themes/dracula_soft.png Binary files differnew file mode 100644 index 00000000..9ef81583 --- /dev/null +++ b/docs/site/media/themes/dracula_soft.png diff --git a/docs/site/media/themes/duckbones.png b/docs/site/media/themes/duckbones.png Binary files differnew file mode 100644 index 00000000..9809ab36 --- /dev/null +++ b/docs/site/media/themes/duckbones.png diff --git a/docs/site/media/themes/dusk.png b/docs/site/media/themes/dusk.png Binary files differnew file mode 100644 index 00000000..0d95b59c --- /dev/null +++ b/docs/site/media/themes/dusk.png diff --git a/docs/site/media/themes/forestbones_dark.png b/docs/site/media/themes/forestbones_dark.png Binary files differnew file mode 100644 index 00000000..ea399605 --- /dev/null +++ b/docs/site/media/themes/forestbones_dark.png diff --git a/docs/site/media/themes/forestbones_light.png b/docs/site/media/themes/forestbones_light.png Binary files differnew file mode 100644 index 00000000..862858de --- /dev/null +++ b/docs/site/media/themes/forestbones_light.png diff --git a/docs/site/media/themes/forge.png b/docs/site/media/themes/forge.png Binary files differnew file mode 100644 index 00000000..bab91d48 --- /dev/null +++ b/docs/site/media/themes/forge.png diff --git a/docs/site/media/themes/forge_black.png b/docs/site/media/themes/forge_black.png Binary files differnew file mode 100644 index 00000000..e09320ed --- /dev/null +++ b/docs/site/media/themes/forge_black.png diff --git a/docs/site/media/themes/forge_soft.png b/docs/site/media/themes/forge_soft.png Binary files differnew file mode 100644 index 00000000..1b9fb2fb --- /dev/null +++ b/docs/site/media/themes/forge_soft.png diff --git a/docs/site/media/themes/harvest.png b/docs/site/media/themes/harvest.png Binary files differnew file mode 100644 index 00000000..b95e8c76 --- /dev/null +++ b/docs/site/media/themes/harvest.png diff --git a/docs/site/media/themes/helix.png b/docs/site/media/themes/helix.png Binary files differnew file mode 100644 index 00000000..6c353815 --- /dev/null +++ b/docs/site/media/themes/helix.png diff --git a/docs/site/media/themes/ink.png b/docs/site/media/themes/ink.png Binary files differnew file mode 100644 index 00000000..314610db --- /dev/null +++ b/docs/site/media/themes/ink.png diff --git a/docs/site/media/themes/kanagawabones.png b/docs/site/media/themes/kanagawabones.png Binary files differnew file mode 100644 index 00000000..c2c58ec9 --- /dev/null +++ b/docs/site/media/themes/kanagawabones.png diff --git a/docs/site/media/themes/lagoon.png b/docs/site/media/themes/lagoon.png Binary files differnew file mode 100644 index 00000000..bdd3dd49 --- /dev/null +++ b/docs/site/media/themes/lagoon.png diff --git a/docs/site/media/themes/lapis.png b/docs/site/media/themes/lapis.png Binary files differnew file mode 100644 index 00000000..2bc4024a --- /dev/null +++ b/docs/site/media/themes/lapis.png diff --git a/docs/site/media/themes/lapis_plain.png b/docs/site/media/themes/lapis_plain.png Binary files differnew file mode 100644 index 00000000..7315c2a0 --- /dev/null +++ b/docs/site/media/themes/lapis_plain.png diff --git a/docs/site/media/themes/monokai.png b/docs/site/media/themes/monokai.png Binary files differnew file mode 100644 index 00000000..4b4854b8 --- /dev/null +++ b/docs/site/media/themes/monokai.png diff --git a/docs/site/media/themes/monokai_pro.png b/docs/site/media/themes/monokai_pro.png Binary files differnew file mode 100644 index 00000000..e8036053 --- /dev/null +++ b/docs/site/media/themes/monokai_pro.png diff --git a/docs/site/media/themes/monokai_pro_classic.png b/docs/site/media/themes/monokai_pro_classic.png Binary files differnew file mode 100644 index 00000000..4e25319c --- /dev/null +++ b/docs/site/media/themes/monokai_pro_classic.png diff --git a/docs/site/media/themes/monokai_pro_light.png b/docs/site/media/themes/monokai_pro_light.png Binary files differnew file mode 100644 index 00000000..ee2f1e4c --- /dev/null +++ b/docs/site/media/themes/monokai_pro_light.png diff --git a/docs/site/media/themes/monokai_pro_light_sun.png b/docs/site/media/themes/monokai_pro_light_sun.png Binary files differnew file mode 100644 index 00000000..67e6e807 --- /dev/null +++ b/docs/site/media/themes/monokai_pro_light_sun.png diff --git a/docs/site/media/themes/monokai_pro_machine.png b/docs/site/media/themes/monokai_pro_machine.png Binary files differnew file mode 100644 index 00000000..3f683a68 --- /dev/null +++ b/docs/site/media/themes/monokai_pro_machine.png diff --git a/docs/site/media/themes/monokai_pro_octagon.png b/docs/site/media/themes/monokai_pro_octagon.png Binary files differnew file mode 100644 index 00000000..bc7a831e --- /dev/null +++ b/docs/site/media/themes/monokai_pro_octagon.png diff --git a/docs/site/media/themes/monokai_pro_ristretto.png b/docs/site/media/themes/monokai_pro_ristretto.png Binary files differnew file mode 100644 index 00000000..06429245 --- /dev/null +++ b/docs/site/media/themes/monokai_pro_ristretto.png diff --git a/docs/site/media/themes/monokai_pro_spectrum.png b/docs/site/media/themes/monokai_pro_spectrum.png Binary files differnew file mode 100644 index 00000000..c6e49f4c --- /dev/null +++ b/docs/site/media/themes/monokai_pro_spectrum.png diff --git a/docs/site/media/themes/neobones_dark.png b/docs/site/media/themes/neobones_dark.png Binary files differnew file mode 100644 index 00000000..026400de --- /dev/null +++ b/docs/site/media/themes/neobones_dark.png diff --git a/docs/site/media/themes/neobones_light.png b/docs/site/media/themes/neobones_light.png Binary files differnew file mode 100644 index 00000000..62d26b3a --- /dev/null +++ b/docs/site/media/themes/neobones_light.png diff --git a/docs/site/media/themes/nord.png b/docs/site/media/themes/nord.png Binary files differnew file mode 100644 index 00000000..d5c903b2 --- /dev/null +++ b/docs/site/media/themes/nord.png diff --git a/docs/site/media/themes/nordbones.png b/docs/site/media/themes/nordbones.png Binary files differnew file mode 100644 index 00000000..272ad19d --- /dev/null +++ b/docs/site/media/themes/nordbones.png diff --git a/docs/site/media/themes/orchard.png b/docs/site/media/themes/orchard.png Binary files differnew file mode 100644 index 00000000..623fde75 --- /dev/null +++ b/docs/site/media/themes/orchard.png diff --git a/docs/site/media/themes/orchard_black.png b/docs/site/media/themes/orchard_black.png Binary files differnew file mode 100644 index 00000000..02d78992 --- /dev/null +++ b/docs/site/media/themes/orchard_black.png diff --git a/docs/site/media/themes/paper.png b/docs/site/media/themes/paper.png Binary files differnew file mode 100644 index 00000000..59919d80 --- /dev/null +++ b/docs/site/media/themes/paper.png diff --git a/docs/site/media/themes/rose_pine.png b/docs/site/media/themes/rose_pine.png Binary files differnew file mode 100644 index 00000000..9dbf1d76 --- /dev/null +++ b/docs/site/media/themes/rose_pine.png diff --git a/docs/site/media/themes/rose_pine_dawn.png b/docs/site/media/themes/rose_pine_dawn.png Binary files differnew file mode 100644 index 00000000..8a062630 --- /dev/null +++ b/docs/site/media/themes/rose_pine_dawn.png diff --git a/docs/site/media/themes/rose_pine_moon.png b/docs/site/media/themes/rose_pine_moon.png Binary files differnew file mode 100644 index 00000000..ee93f871 --- /dev/null +++ b/docs/site/media/themes/rose_pine_moon.png diff --git a/docs/site/media/themes/rosebones_dark.png b/docs/site/media/themes/rosebones_dark.png Binary files differnew file mode 100644 index 00000000..19992fea --- /dev/null +++ b/docs/site/media/themes/rosebones_dark.png diff --git a/docs/site/media/themes/rosebones_light.png b/docs/site/media/themes/rosebones_light.png Binary files differnew file mode 100644 index 00000000..a879dc55 --- /dev/null +++ b/docs/site/media/themes/rosebones_light.png diff --git a/docs/site/media/themes/seoul256_dark_233.png b/docs/site/media/themes/seoul256_dark_233.png Binary files differnew file mode 100644 index 00000000..a757640b --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_233.png diff --git a/docs/site/media/themes/seoul256_dark_234.png b/docs/site/media/themes/seoul256_dark_234.png Binary files differnew file mode 100644 index 00000000..a34b3f2a --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_234.png diff --git a/docs/site/media/themes/seoul256_dark_235.png b/docs/site/media/themes/seoul256_dark_235.png Binary files differnew file mode 100644 index 00000000..d4c69938 --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_235.png diff --git a/docs/site/media/themes/seoul256_dark_236.png b/docs/site/media/themes/seoul256_dark_236.png Binary files differnew file mode 100644 index 00000000..8f1c48ce --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_236.png diff --git a/docs/site/media/themes/seoul256_dark_237.png b/docs/site/media/themes/seoul256_dark_237.png Binary files differnew file mode 100644 index 00000000..3816b258 --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_237.png diff --git a/docs/site/media/themes/seoul256_dark_238.png b/docs/site/media/themes/seoul256_dark_238.png Binary files differnew file mode 100644 index 00000000..9553da5f --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_238.png diff --git a/docs/site/media/themes/seoul256_dark_239.png b/docs/site/media/themes/seoul256_dark_239.png Binary files differnew file mode 100644 index 00000000..8109f756 --- /dev/null +++ b/docs/site/media/themes/seoul256_dark_239.png diff --git a/docs/site/media/themes/seoul256_light_252.png b/docs/site/media/themes/seoul256_light_252.png Binary files differnew file mode 100644 index 00000000..7f01a1ab --- /dev/null +++ b/docs/site/media/themes/seoul256_light_252.png diff --git a/docs/site/media/themes/seoul256_light_253.png b/docs/site/media/themes/seoul256_light_253.png Binary files differnew file mode 100644 index 00000000..5b9d2a43 --- /dev/null +++ b/docs/site/media/themes/seoul256_light_253.png diff --git a/docs/site/media/themes/seoul256_light_254.png b/docs/site/media/themes/seoul256_light_254.png Binary files differnew file mode 100644 index 00000000..125546f7 --- /dev/null +++ b/docs/site/media/themes/seoul256_light_254.png diff --git a/docs/site/media/themes/seoul256_light_255.png b/docs/site/media/themes/seoul256_light_255.png Binary files differnew file mode 100644 index 00000000..06b1e3fc --- /dev/null +++ b/docs/site/media/themes/seoul256_light_255.png diff --git a/docs/site/media/themes/seoul256_light_256.png b/docs/site/media/themes/seoul256_light_256.png Binary files differnew file mode 100644 index 00000000..ce4ee4da --- /dev/null +++ b/docs/site/media/themes/seoul256_light_256.png diff --git a/docs/site/media/themes/seoulbones_dark.png b/docs/site/media/themes/seoulbones_dark.png Binary files differnew file mode 100644 index 00000000..74ea8ebc --- /dev/null +++ b/docs/site/media/themes/seoulbones_dark.png diff --git a/docs/site/media/themes/seoulbones_light.png b/docs/site/media/themes/seoulbones_light.png Binary files differnew file mode 100644 index 00000000..7591721a --- /dev/null +++ b/docs/site/media/themes/seoulbones_light.png diff --git a/docs/site/media/themes/solarium.png b/docs/site/media/themes/solarium.png Binary files differnew file mode 100644 index 00000000..f24a111e --- /dev/null +++ b/docs/site/media/themes/solarium.png diff --git a/docs/site/media/themes/solarized_dark.png b/docs/site/media/themes/solarized_dark.png Binary files differnew file mode 100644 index 00000000..7df0ef41 --- /dev/null +++ b/docs/site/media/themes/solarized_dark.png diff --git a/docs/site/media/themes/solarized_light.png b/docs/site/media/themes/solarized_light.png Binary files differnew file mode 100644 index 00000000..40b88ef3 --- /dev/null +++ b/docs/site/media/themes/solarized_light.png diff --git a/docs/site/media/themes/spectrum.png b/docs/site/media/themes/spectrum.png Binary files differnew file mode 100644 index 00000000..111f0913 --- /dev/null +++ b/docs/site/media/themes/spectrum.png diff --git a/docs/site/media/themes/themes.toml b/docs/site/media/themes/themes.toml new file mode 100644 index 00000000..ed45b075 --- /dev/null +++ b/docs/site/media/themes/themes.toml @@ -0,0 +1,418 @@ +# The Themes page gallery, in the order the Themes builtin walks them: +# media/themes/<file> for each, made by test/record_demos.py themes. +ready = true + +[[theme]] +name = "orchard" +file = "orchard.png" +kind = "dark" + +[[theme]] +name = "dusk" +file = "dusk.png" +kind = "dark" + +[[theme]] +name = "ink" +file = "ink.png" +kind = "dark" + +[[theme]] +name = "paper" +file = "paper.png" +kind = "light" + +[[theme]] +name = "daybreak" +file = "daybreak.png" +kind = "light" + +[[theme]] +name = "atelier" +file = "atelier.png" +kind = "light" + +[[theme]] +name = "forge" +file = "forge.png" +kind = "dark" + +[[theme]] +name = "lagoon" +file = "lagoon.png" +kind = "dark" + +[[theme]] +name = "solarium" +file = "solarium.png" +kind = "dark" + +[[theme]] +name = "spectrum" +file = "spectrum.png" +kind = "dark" + +[[theme]] +name = "harvest" +file = "harvest.png" +kind = "dark" + +[[theme]] +name = "clay" +file = "clay.png" +kind = "dark" + +[[theme]] +name = "forge_black" +file = "forge_black.png" +kind = "dark" + +[[theme]] +name = "forge_soft" +file = "forge_soft.png" +kind = "dark" + +[[theme]] +name = "orchard_black" +file = "orchard_black.png" +kind = "dark" + +[[theme]] +name = "acme" +file = "acme.png" +kind = "light" + +[[theme]] +name = "lapis" +file = "lapis.png" +kind = "dark" + +[[theme]] +name = "lapis_plain" +file = "lapis_plain.png" +kind = "dark" + +[[theme]] +name = "dark_plus" +file = "dark_plus.png" +kind = "dark" + +[[theme]] +name = "solarized_dark" +file = "solarized_dark.png" +kind = "dark" + +[[theme]] +name = "solarized_light" +file = "solarized_light.png" +kind = "light" + +[[theme]] +name = "dracula" +file = "dracula.png" +kind = "dark" + +[[theme]] +name = "dracula_soft" +file = "dracula_soft.png" +kind = "dark" + +[[theme]] +name = "alucard" +file = "alucard.png" +kind = "light" + +[[theme]] +name = "monokai" +file = "monokai.png" +kind = "dark" + +[[theme]] +name = "monokai_pro" +file = "monokai_pro.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_classic" +file = "monokai_pro_classic.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_machine" +file = "monokai_pro_machine.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_octagon" +file = "monokai_pro_octagon.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_ristretto" +file = "monokai_pro_ristretto.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_spectrum" +file = "monokai_pro_spectrum.png" +kind = "dark" + +[[theme]] +name = "monokai_pro_light" +file = "monokai_pro_light.png" +kind = "light" + +[[theme]] +name = "monokai_pro_light_sun" +file = "monokai_pro_light_sun.png" +kind = "light" + +[[theme]] +name = "tokyonight_night" +file = "tokyonight_night.png" +kind = "dark" + +[[theme]] +name = "tokyonight_storm" +file = "tokyonight_storm.png" +kind = "dark" + +[[theme]] +name = "tokyonight_moon" +file = "tokyonight_moon.png" +kind = "dark" + +[[theme]] +name = "tokyonight_day" +file = "tokyonight_day.png" +kind = "light" + +[[theme]] +name = "rose_pine" +file = "rose_pine.png" +kind = "dark" + +[[theme]] +name = "rose_pine_moon" +file = "rose_pine_moon.png" +kind = "dark" + +[[theme]] +name = "rose_pine_dawn" +file = "rose_pine_dawn.png" +kind = "light" + +[[theme]] +name = "catppuccin_latte" +file = "catppuccin_latte.png" +kind = "light" + +[[theme]] +name = "catppuccin_frappe" +file = "catppuccin_frappe.png" +kind = "dark" + +[[theme]] +name = "catppuccin_macchiato" +file = "catppuccin_macchiato.png" +kind = "dark" + +[[theme]] +name = "catppuccin_mocha" +file = "catppuccin_mocha.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_233" +file = "seoul256_dark_233.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_234" +file = "seoul256_dark_234.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_235" +file = "seoul256_dark_235.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_236" +file = "seoul256_dark_236.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_237" +file = "seoul256_dark_237.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_238" +file = "seoul256_dark_238.png" +kind = "dark" + +[[theme]] +name = "seoul256_dark_239" +file = "seoul256_dark_239.png" +kind = "dark" + +[[theme]] +name = "seoul256_light_252" +file = "seoul256_light_252.png" +kind = "light" + +[[theme]] +name = "seoul256_light_253" +file = "seoul256_light_253.png" +kind = "light" + +[[theme]] +name = "seoul256_light_254" +file = "seoul256_light_254.png" +kind = "light" + +[[theme]] +name = "seoul256_light_255" +file = "seoul256_light_255.png" +kind = "light" + +[[theme]] +name = "seoul256_light_256" +file = "seoul256_light_256.png" +kind = "light" + +[[theme]] +name = "zenbones_light" +file = "zenbones_light.png" +kind = "light" + +[[theme]] +name = "zenbones_dark" +file = "zenbones_dark.png" +kind = "dark" + +[[theme]] +name = "neobones_light" +file = "neobones_light.png" +kind = "light" + +[[theme]] +name = "neobones_dark" +file = "neobones_dark.png" +kind = "dark" + +[[theme]] +name = "vimbones" +file = "vimbones.png" +kind = "light" + +[[theme]] +name = "forestbones_light" +file = "forestbones_light.png" +kind = "light" + +[[theme]] +name = "forestbones_dark" +file = "forestbones_dark.png" +kind = "dark" + +[[theme]] +name = "nordbones" +file = "nordbones.png" +kind = "dark" + +[[theme]] +name = "rosebones_light" +file = "rosebones_light.png" +kind = "light" + +[[theme]] +name = "rosebones_dark" +file = "rosebones_dark.png" +kind = "dark" + +[[theme]] +name = "tokyobones_light" +file = "tokyobones_light.png" +kind = "light" + +[[theme]] +name = "tokyobones_dark" +file = "tokyobones_dark.png" +kind = "dark" + +[[theme]] +name = "seoulbones_light" +file = "seoulbones_light.png" +kind = "light" + +[[theme]] +name = "seoulbones_dark" +file = "seoulbones_dark.png" +kind = "dark" + +[[theme]] +name = "duckbones" +file = "duckbones.png" +kind = "dark" + +[[theme]] +name = "zenburned" +file = "zenburned.png" +kind = "dark" + +[[theme]] +name = "zenwritten_light" +file = "zenwritten_light.png" +kind = "light" + +[[theme]] +name = "zenwritten_dark" +file = "zenwritten_dark.png" +kind = "dark" + +[[theme]] +name = "kanagawabones" +file = "kanagawabones.png" +kind = "dark" + +[[theme]] +name = "nord" +file = "nord.png" +kind = "dark" + +[[theme]] +name = "ayu_dark" +file = "ayu_dark.png" +kind = "dark" + +[[theme]] +name = "ayu_mirage" +file = "ayu_mirage.png" +kind = "dark" + +[[theme]] +name = "ayu_light" +file = "ayu_light.png" +kind = "light" + +[[theme]] +name = "doom_one" +file = "doom_one.png" +kind = "dark" + +[[theme]] +name = "doom_one_light" +file = "doom_one_light.png" +kind = "light" + +[[theme]] +name = "helix" +file = "helix.png" +kind = "dark" + +[[theme]] +name = "dark" +file = "dark.png" +kind = "dark" diff --git a/docs/site/media/themes/tokyobones_dark.png b/docs/site/media/themes/tokyobones_dark.png Binary files differnew file mode 100644 index 00000000..f873726d --- /dev/null +++ b/docs/site/media/themes/tokyobones_dark.png diff --git a/docs/site/media/themes/tokyobones_light.png b/docs/site/media/themes/tokyobones_light.png Binary files differnew file mode 100644 index 00000000..211a30ff --- /dev/null +++ b/docs/site/media/themes/tokyobones_light.png diff --git a/docs/site/media/themes/tokyonight_day.png b/docs/site/media/themes/tokyonight_day.png Binary files differnew file mode 100644 index 00000000..cdbef103 --- /dev/null +++ b/docs/site/media/themes/tokyonight_day.png diff --git a/docs/site/media/themes/tokyonight_moon.png b/docs/site/media/themes/tokyonight_moon.png Binary files differnew file mode 100644 index 00000000..d35bf419 --- /dev/null +++ b/docs/site/media/themes/tokyonight_moon.png diff --git a/docs/site/media/themes/tokyonight_night.png b/docs/site/media/themes/tokyonight_night.png Binary files differnew file mode 100644 index 00000000..5497275b --- /dev/null +++ b/docs/site/media/themes/tokyonight_night.png diff --git a/docs/site/media/themes/tokyonight_storm.png b/docs/site/media/themes/tokyonight_storm.png Binary files differnew file mode 100644 index 00000000..5e62b9e2 --- /dev/null +++ b/docs/site/media/themes/tokyonight_storm.png diff --git a/docs/site/media/themes/vimbones.png b/docs/site/media/themes/vimbones.png Binary files differnew file mode 100644 index 00000000..134fd582 --- /dev/null +++ b/docs/site/media/themes/vimbones.png diff --git a/docs/site/media/themes/zenbones_dark.png b/docs/site/media/themes/zenbones_dark.png Binary files differnew file mode 100644 index 00000000..d7e8315c --- /dev/null +++ b/docs/site/media/themes/zenbones_dark.png diff --git a/docs/site/media/themes/zenbones_light.png b/docs/site/media/themes/zenbones_light.png Binary files differnew file mode 100644 index 00000000..22c2da48 --- /dev/null +++ b/docs/site/media/themes/zenbones_light.png diff --git a/docs/site/media/themes/zenburned.png b/docs/site/media/themes/zenburned.png Binary files differnew file mode 100644 index 00000000..3b97815b --- /dev/null +++ b/docs/site/media/themes/zenburned.png diff --git a/docs/site/media/themes/zenwritten_dark.png b/docs/site/media/themes/zenwritten_dark.png Binary files differnew file mode 100644 index 00000000..6421245f --- /dev/null +++ b/docs/site/media/themes/zenwritten_dark.png diff --git a/docs/site/media/themes/zenwritten_light.png b/docs/site/media/themes/zenwritten_light.png Binary files differnew file mode 100644 index 00000000..28f3a144 --- /dev/null +++ b/docs/site/media/themes/zenwritten_light.png diff --git a/docs/site/media/wait-editor.mp4 b/docs/site/media/wait-editor.mp4 Binary files differnew file mode 100644 index 00000000..49adadd6 --- /dev/null +++ b/docs/site/media/wait-editor.mp4 diff --git a/docs/site/media/wait-editor.png b/docs/site/media/wait-editor.png Binary files differnew file mode 100644 index 00000000..1d029f4c --- /dev/null +++ b/docs/site/media/wait-editor.png diff --git a/docs/site/media/wait-editor.webm b/docs/site/media/wait-editor.webm Binary files differnew file mode 100644 index 00000000..5afda502 --- /dev/null +++ b/docs/site/media/wait-editor.webm diff --git a/docs/site/media/where-commands-run.mp4 b/docs/site/media/where-commands-run.mp4 Binary files differnew file mode 100644 index 00000000..c4bd83fe --- /dev/null +++ b/docs/site/media/where-commands-run.mp4 diff --git a/docs/site/media/where-commands-run.png b/docs/site/media/where-commands-run.png Binary files differnew file mode 100644 index 00000000..5af438cc --- /dev/null +++ b/docs/site/media/where-commands-run.png diff --git a/docs/site/media/where-commands-run.webm b/docs/site/media/where-commands-run.webm Binary files differnew file mode 100644 index 00000000..c9d35176 --- /dev/null +++ b/docs/site/media/where-commands-run.webm diff --git a/docs/site/player/LICENSE-asciinema-player.txt b/docs/site/player/LICENSE-asciinema-player.txt new file mode 100644 index 00000000..15258081 --- /dev/null +++ b/docs/site/player/LICENSE-asciinema-player.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2011-2021 Marcin Kulik + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/site/player/VERSION b/docs/site/player/VERSION new file mode 100644 index 00000000..f4ca7569 --- /dev/null +++ b/docs/site/player/VERSION @@ -0,0 +1 @@ +asciinema-player 3.17.0 (npm), Apache-2.0 diff --git a/docs/site/player/asciinema-player.css b/docs/site/player/asciinema-player.css new file mode 100644 index 00000000..1857794d --- /dev/null +++ b/docs/site/player/asciinema-player.css @@ -0,0 +1,762 @@ +.ap-default-term-ff { + --term-font-family: "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace, "Symbols Nerd Font"; +} +div.ap-wrapper { + outline: none; + height: 100%; + display: flex; + justify-content: center; +} +div.ap-wrapper .title-bar { + display: none; + top: -78px; + transition: top 0.15s linear; + position: absolute; + left: 0; + right: 0; + box-sizing: content-box; + font-size: 20px; + line-height: 1em; + padding: 15px; + font-family: sans-serif; + color: white; + background-color: rgba(0, 0, 0, 0.8); +} +div.ap-wrapper .title-bar img { + vertical-align: middle; + height: 48px; + margin-right: 16px; +} +div.ap-wrapper .title-bar a { + color: white; + text-decoration: underline; +} +div.ap-wrapper .title-bar a:hover { + text-decoration: none; +} +div.ap-wrapper:fullscreen { + background-color: #000; + width: 100%; + align-items: center; +} +div.ap-wrapper:fullscreen .title-bar { + display: initial; +} +div.ap-wrapper:fullscreen.hud .title-bar { + top: 0; +} +div.ap-wrapper div.ap-player { + text-align: left; + display: inline-block; + padding: 0px; + position: relative; + box-sizing: content-box; + overflow: hidden; + max-width: 100%; + border-radius: 4px; + font-size: 15px; + background-color: var(--term-color-background); +} +.ap-player { + --term-color-foreground: #ffffff; + --term-color-background: #000000; + --term-color-0: var(--term-color-foreground); + --term-color-1: var(--term-color-foreground); + --term-color-2: var(--term-color-foreground); + --term-color-3: var(--term-color-foreground); + --term-color-4: var(--term-color-foreground); + --term-color-5: var(--term-color-foreground); + --term-color-6: var(--term-color-foreground); + --term-color-7: var(--term-color-foreground); + --term-color-8: var(--term-color-0); + --term-color-9: var(--term-color-1); + --term-color-10: var(--term-color-2); + --term-color-11: var(--term-color-3); + --term-color-12: var(--term-color-4); + --term-color-13: var(--term-color-5); + --term-color-14: var(--term-color-6); + --term-color-15: var(--term-color-7); +} +div.ap-term { + position: relative; + font-family: var(--term-font-family); + border-width: 0.75em; + border-radius: 0; + border-style: solid; + border-color: var(--term-color-background); + box-sizing: content-box; +} +div.ap-term canvas { + position: absolute; + inset: 0; + display: block; + width: 100%; + height: 100%; +} +div.ap-term svg.ap-term-symbols { + position: absolute; + inset: 0; + display: block; + width: 100%; + height: 100%; + overflow: hidden; + pointer-events: none; +} +div.ap-term svg.ap-term-symbols use { + color: var(--term-color-foreground); +} +div.ap-term svg.ap-term-symbols:not(.ap-blink) .ap-blink { + opacity: 0; +} +div.ap-term pre.ap-term-text { + position: absolute; + inset: 0; + box-sizing: content-box; + overflow: hidden; + padding: 0; + margin: 0px; + display: block; + white-space: pre; + word-wrap: normal; + word-break: normal; + cursor: text; + color: var(--term-color-foreground); + outline: none; + line-height: var(--term-line-height); + font-family: inherit; + font-size: inherit; + font-variant-ligatures: none; + border: 0; + border-radius: 0; + background-color: transparent !important; +} +pre.ap-term-text .ap-line { + display: block; + width: 100%; + height: var(--term-line-height); + position: absolute; + top: calc(100% * var(--row) / var(--term-rows)); + letter-spacing: normal; + overflow: hidden; +} +pre.ap-term-text .ap-line span { + position: absolute; + left: calc(100% * var(--offset) / var(--term-cols)); + padding: 0; + display: inline-block; + height: 100%; +} +pre.ap-term-text:not(.ap-blink) .ap-line .ap-blink { + color: transparent; + border-color: transparent; +} +pre.ap-term-text .ap-bold { + font-weight: bold; +} +pre.ap-term-text .ap-faint { + opacity: 0.5; +} +pre.ap-term-text .ap-underline { + text-decoration: underline; +} +pre.ap-term-text .ap-italic { + font-style: italic; +} +pre.ap-term-text .ap-strike { + text-decoration: line-through; +} +.ap-line span { + color: var(--term-color-foreground); +} +div.ap-player div.ap-control-bar { + width: 100%; + height: 32px; + display: flex; + justify-content: space-between; + align-items: stretch; + color: var(--term-color-foreground); + box-sizing: content-box; + line-height: 1; + position: absolute; + bottom: 0; + left: 0; + opacity: 0; + transition: opacity 0.15s linear; + user-select: none; + border-top: 2px solid color-mix(in oklab, var(--term-color-background) 80%, var(--term-color-foreground)); + z-index: 30; +} +div.ap-player div.ap-control-bar * { + box-sizing: inherit; +} +div.ap-control-bar svg.ap-icon path { + fill: var(--term-color-foreground); +} +div.ap-control-bar button.ap-button { + display: flex; + flex: 0 0 auto; + cursor: pointer; + appearance: none; + -webkit-appearance: none; + background: transparent; + border: 0; + margin: 0; + padding: 0; + color: inherit; + font: inherit; + line-height: inherit; +} +div.ap-control-bar button.ap-playback-button { + width: 12px; + height: 12px; + padding: 10px; + margin: 0 0 0 2px; +} +div.ap-control-bar button.ap-playback-button svg { + height: 12px; + width: 12px; +} +div.ap-control-bar span.ap-timer { + display: flex; + flex: 0 0 auto; + min-width: 50px; + margin: 0 10px; + height: 100%; + text-align: center; + font-size: 13px; + line-height: 100%; + cursor: default; +} +div.ap-control-bar span.ap-timer span { + font-family: var(--term-font-family); + font-size: inherit; + font-weight: 600; + margin: auto; +} +div.ap-control-bar span.ap-timer .ap-time-remaining { + display: none; +} +div.ap-control-bar span.ap-timer:hover .ap-time-elapsed { + display: none; +} +div.ap-control-bar span.ap-timer:hover .ap-time-remaining { + display: flex; +} +div.ap-control-bar .ap-progressbar { + display: block; + flex: 1 1 auto; + height: 100%; + padding: 0 10px; +} +div.ap-control-bar .ap-progressbar .ap-bar { + display: block; + position: relative; + cursor: default; + height: 100%; + font-size: 0; +} +div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter { + display: block; + position: absolute; + top: 15px; + left: 0; + right: 0; + height: 3px; +} +div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter-empty { + background-color: color-mix(in oklab, var(--term-color-foreground) 20%, var(--term-color-background)); +} +div.ap-control-bar .ap-progressbar .ap-bar .ap-gutter-full { + width: 100%; + transform-origin: left center; + background-color: var(--term-color-foreground); + border-radius: 3px; +} +div.ap-control-bar.ap-seekable .ap-progressbar .ap-bar { + cursor: pointer; +} +div.ap-control-bar button.ap-fullscreen-button { + width: 14px; + height: 14px; + padding: 9px; + margin: 0 2px 0 4px; +} +div.ap-control-bar button.ap-fullscreen-button svg { + width: 14px; + height: 14px; +} +div.ap-control-bar button.ap-fullscreen-button svg.ap-icon-fullscreen-on { + display: inline; +} +div.ap-control-bar button.ap-fullscreen-button svg.ap-icon-fullscreen-off { + display: none; +} +div.ap-control-bar button.ap-fullscreen-button .ap-tooltip { + right: 5px; + left: initial; + transform: none; +} +div.ap-control-bar button.ap-kbd-button { + height: 14px; + padding: 9px; + margin: 0 0 0 4px; +} +div.ap-control-bar button.ap-kbd-button svg { + width: 26px; + height: 14px; +} +div.ap-control-bar button.ap-kbd-button .ap-tooltip { + right: 5px; + left: initial; + transform: none; +} +div.ap-control-bar button.ap-speaker-button { + width: 19px; + padding: 6px 9px; + margin: 0 0 0 4px; + position: relative; +} +div.ap-control-bar button.ap-speaker-button svg { + width: 19px; +} +div.ap-control-bar button.ap-speaker-button .ap-tooltip { + left: -50%; + transform: none; +} +div.ap-wrapper.ap-hud .ap-control-bar { + opacity: 1; +} +div.ap-wrapper:fullscreen button.ap-fullscreen-button svg.ap-icon-fullscreen-on { + display: none; +} +div.ap-wrapper:fullscreen button.ap-fullscreen-button svg.ap-icon-fullscreen-off { + display: inline; +} +span.ap-progressbar span.ap-marker-container { + display: block; + top: 0; + bottom: 0; + width: 21px; + position: absolute; + margin-left: -10px; +} +span.ap-marker-container span.ap-marker { + display: block; + top: 13px; + bottom: 12px; + left: 7px; + right: 7px; + background-color: color-mix(in oklab, var(--term-color-foreground) 33%, var(--term-color-background)); + position: absolute; + transition: top 0.1s, bottom 0.1s, left 0.1s, right 0.1s, background-color 0.1s; + border-radius: 50%; +} +span.ap-marker-container span.ap-marker.ap-marker-past { + background-color: var(--term-color-foreground); +} +span.ap-marker-container span.ap-marker:hover, +span.ap-marker-container:hover span.ap-marker { + background-color: var(--term-color-foreground); + top: 11px; + bottom: 10px; + left: 5px; + right: 5px; +} +.ap-tooltip-container span.ap-tooltip { + visibility: hidden; + background-color: var(--term-color-foreground); + color: var(--term-color-background); + font-family: var(--term-font-family); + font-weight: bold; + text-align: center; + padding: 0 0.5em; + border-radius: 4px; + position: absolute; + z-index: 1; + white-space: nowrap; + /* Prevents the text from wrapping and makes sure the tooltip width adapts to the text length */ + font-size: 13px; + line-height: 2em; + bottom: 100%; + left: 50%; + transform: translateX(-50%); +} +.ap-tooltip-container:hover span.ap-tooltip { + visibility: visible; +} +.ap-player .ap-overlay { + z-index: 10; + background-repeat: no-repeat; + background-position: center; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; +} +.ap-player .ap-overlay-start { + cursor: pointer; +} +.ap-player .ap-overlay-start .ap-play-button { + font-size: 0px; + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + text-align: center; + color: white; + height: 80px; + max-height: 66%; + margin: auto; +} +.ap-player .ap-overlay-start .ap-play-button div { + height: 100%; +} +.ap-player .ap-overlay-start .ap-play-button div span { + height: 100%; + display: block; +} +.ap-player .ap-overlay-start .ap-play-button div span svg { + height: 100%; + display: inline-block; +} +.ap-player .ap-overlay-start .ap-play-button svg { + filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.4)); +} +.ap-player .ap-overlay-loading .ap-loader { + width: 48px; + height: 48px; + border-radius: 50%; + display: inline-block; + position: relative; + border: 10px solid; + border-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.5) rgba(255, 255, 255, 0.7) #ffffff; + border-color: color-mix(in srgb, var(--term-color-foreground) 30%, var(--term-color-background)) color-mix(in srgb, var(--term-color-foreground) 50%, var(--term-color-background)) color-mix(in srgb, var(--term-color-foreground) 70%, var(--term-color-background)) color-mix(in srgb, var(--term-color-foreground) 100%, var(--term-color-background)); + box-sizing: border-box; + animation: ap-loader-rotation 1s linear infinite; +} +.ap-player .ap-overlay-info { + background-color: var(--term-color-background); +} +.ap-player .ap-overlay-info span { + font-family: var(--term-font-family); + font-size: 2em; + font-weight: bold; + color: var(--term-color-background); + background-color: var(--term-color-foreground); + padding: 0.5em 0.75em; + text-transform: uppercase; +} +.ap-player .ap-overlay-keystrokes { + position: absolute; + top: auto; + left: auto; + right: 20px; + bottom: var(--ap-keystrokes-bottom); + z-index: 20; + width: auto; + height: auto; + font-size: 18px; + text-align: right; + padding: 0; + display: flex; + justify-content: flex-end; + align-items: center; + gap: 0.35em; + pointer-events: none; +} +.ap-player .ap-overlay-keystrokes .ap-keystroke-pill { + font-family: var(--term-font-family); + font-size: inherit; + opacity: 1; + transition: opacity 80ms ease; +} +.ap-player .ap-overlay-keystrokes .ap-keystroke-pill kbd { + display: inline-flex; + justify-content: center; + min-width: 1.2em; + color: var(--term-color-background); + background-color: var(--term-color-foreground); + padding: 0.3em 0.5em; + border-radius: 0.2em; + font-family: inherit; + font-size: 0.85em; + font-weight: 600; + border: none; + margin: 0; +} +.ap-player .ap-overlay-keystrokes .ap-keystroke-pill.fading { + opacity: 0; + transition: opacity 700ms ease; +} +.ap-player .ap-overlay-help { + background-color: rgba(0, 0, 0, 0.8); + container-type: inline-size; +} +.ap-player .ap-overlay-help > div { + font-family: var(--term-font-family); + max-width: 85%; + max-height: 85%; + font-size: 18px; + color: var(--term-color-foreground); + box-sizing: border-box; + margin-bottom: 32px; +} +.ap-player .ap-overlay-help > div div { + padding: calc(min(4cqw, 40px)); + font-size: calc(min(1.9cqw, 18px)); + background-color: var(--term-color-background); + border: 1px solid color-mix(in oklab, var(--term-color-background) 90%, var(--term-color-foreground)); + border-radius: 6px; +} +.ap-player .ap-overlay-help > div div p { + font-weight: bold; + margin: 0 0 2em 0; +} +.ap-player .ap-overlay-help > div div ul { + list-style: none; + padding: 0; +} +.ap-player .ap-overlay-help > div div ul li { + margin: 0 0 0.75em 0; +} +.ap-player .ap-overlay-help > div div kbd { + color: var(--term-color-background); + background-color: var(--term-color-foreground); + padding: 0.2em 0.5em; + border-radius: 0.2em; + font-family: inherit; + font-size: 0.85em; + border: none; + margin: 0; +} +.ap-player .ap-overlay-error span { + font-size: 8em; +} +.ap-player .slide-enter-active { + transition: opacity 0.2s; +} +.ap-player .slide-enter-active.ap-was-playing { + transition: top 0.2s ease-out, opacity 0.2s; +} +.ap-player .slide-exit-active { + transition: top 0.2s ease-in, opacity 0.2s; +} +.ap-player .slide-enter { + top: -50%; + opacity: 0; +} +.ap-player .slide-enter-to { + top: 0%; +} +.ap-player .slide-enter, +.ap-player .slide-enter-to, +.ap-player .slide-exit, +.ap-player .slide-exit-to { + bottom: auto; + height: 100%; +} +.ap-player .slide-exit { + top: 0%; +} +.ap-player .slide-exit-to { + top: -50%; + opacity: 0; +} +@keyframes ap-loader-rotation { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} +.asciinema-player-theme-asciinema { + --term-color-foreground: #cccccc; + --term-color-background: #121314; + --term-color-0: #000000; + --term-color-1: #dd3c69; + --term-color-2: #4ebf22; + --term-color-3: #ddaf3c; + --term-color-4: #26b0d7; + --term-color-5: #b954e1; + --term-color-6: #54e1b9; + --term-color-7: #d9d9d9; + --term-color-8: #4d4d4d; + --term-color-9: #dd3c69; + --term-color-10: #4ebf22; + --term-color-11: #ddaf3c; + --term-color-12: #26b0d7; + --term-color-13: #b954e1; + --term-color-14: #54e1b9; + --term-color-15: #ffffff; +} +/* + Based on Dracula: https://draculatheme.com + */ +.asciinema-player-theme-dracula { + --term-color-foreground: #f8f8f2; + --term-color-background: #282a36; + --term-color-0: #21222c; + --term-color-1: #ff5555; + --term-color-2: #50fa7b; + --term-color-3: #f1fa8c; + --term-color-4: #bd93f9; + --term-color-5: #ff79c6; + --term-color-6: #8be9fd; + --term-color-7: #f8f8f2; + --term-color-8: #6272a4; + --term-color-9: #ff6e6e; + --term-color-10: #69ff94; + --term-color-11: #ffffa5; + --term-color-12: #d6acff; + --term-color-13: #ff92df; + --term-color-14: #a4ffff; + --term-color-15: #ffffff; +} +/* Based on Monokai from base16 collection - https://github.com/chriskempson/base16 */ +.asciinema-player-theme-monokai { + --term-color-foreground: #f8f8f2; + --term-color-background: #272822; + --term-color-0: #272822; + --term-color-1: #f92672; + --term-color-2: #a6e22e; + --term-color-3: #f4bf75; + --term-color-4: #66d9ef; + --term-color-5: #ae81ff; + --term-color-6: #a1efe4; + --term-color-7: #f8f8f2; + --term-color-8: #75715e; + --term-color-15: #f9f8f5; +} +/* + Based on Nord: https://github.com/arcticicestudio/nord + Via: https://github.com/neilotoole/asciinema-theme-nord + */ +.asciinema-player-theme-nord { + --term-color-foreground: #eceff4; + --term-color-background: #2e3440; + --term-color-0: #3b4252; + --term-color-1: #bf616a; + --term-color-2: #a3be8c; + --term-color-3: #ebcb8b; + --term-color-4: #81a1c1; + --term-color-5: #b48ead; + --term-color-6: #88c0d0; + --term-color-7: #eceff4; +} +.asciinema-player-theme-seti { + --term-color-foreground: #cacecd; + --term-color-background: #111213; + --term-color-0: #323232; + --term-color-1: #c22832; + --term-color-2: #8ec43d; + --term-color-3: #e0c64f; + --term-color-4: #43a5d5; + --term-color-5: #8b57b5; + --term-color-6: #8ec43d; + --term-color-7: #eeeeee; + --term-color-15: #ffffff; +} +/* + Based on Solarized Dark: https://ethanschoonover.com/solarized/ + */ +.asciinema-player-theme-solarized-dark { + --term-color-foreground: #839496; + --term-color-background: #002b36; + --term-color-0: #073642; + --term-color-1: #dc322f; + --term-color-2: #859900; + --term-color-3: #b58900; + --term-color-4: #268bd2; + --term-color-5: #d33682; + --term-color-6: #2aa198; + --term-color-7: #eee8d5; + --term-color-8: #002b36; + --term-color-9: #cb4b16; + --term-color-10: #586e75; + --term-color-11: #657b83; + --term-color-12: #839496; + --term-color-13: #6c71c4; + --term-color-14: #93a1a1; + --term-color-15: #fdf6e3; +} +/* + Based on Solarized Light: https://ethanschoonover.com/solarized/ + */ +.asciinema-player-theme-solarized-light { + --term-color-foreground: #657b83; + --term-color-background: #fdf6e3; + --term-color-0: #073642; + --term-color-1: #dc322f; + --term-color-2: #859900; + --term-color-3: #b58900; + --term-color-4: #268bd2; + --term-color-5: #d33682; + --term-color-6: #2aa198; + --term-color-7: #eee8d5; + --term-color-8: #002b36; + --term-color-9: #cb4b16; + --term-color-10: #586e75; + --term-color-11: #657c83; + --term-color-12: #839496; + --term-color-13: #6c71c4; + --term-color-14: #93a1a1; + --term-color-15: #fdf6e3; +} +.asciinema-player-theme-solarized-light .ap-overlay-start .ap-play-button svg .ap-play-btn-fill { + fill: var(--term-color-1); +} +.asciinema-player-theme-solarized-light .ap-overlay-start .ap-play-button svg .ap-play-btn-stroke { + stroke: var(--term-color-1); +} +/* + Based on Tango: https://en.wikipedia.org/wiki/Tango_Desktop_Project + */ +.asciinema-player-theme-tango { + --term-color-foreground: #cccccc; + --term-color-background: #121314; + --term-color-0: #000000; + --term-color-1: #cc0000; + --term-color-2: #4e9a06; + --term-color-3: #c4a000; + --term-color-4: #3465a4; + --term-color-5: #75507b; + --term-color-6: #06989a; + --term-color-7: #d3d7cf; + --term-color-8: #555753; + --term-color-9: #ef2929; + --term-color-10: #8ae234; + --term-color-11: #fce94f; + --term-color-12: #729fcf; + --term-color-13: #ad7fa8; + --term-color-14: #34e2e2; + --term-color-15: #eeeeec; +} +/* + Based on gruvbox: https://github.com/morhetz/gruvbox + */ +.asciinema-player-theme-gruvbox-dark { + --term-color-foreground: #fbf1c7; + --term-color-background: #282828; + --term-color-0: #282828; + --term-color-1: #cc241d; + --term-color-2: #98971a; + --term-color-3: #d79921; + --term-color-4: #458588; + --term-color-5: #b16286; + --term-color-6: #689d6a; + --term-color-7: #a89984; + --term-color-8: #7c6f65; + --term-color-9: #fb4934; + --term-color-10: #b8bb26; + --term-color-11: #fabd2f; + --term-color-12: #83a598; + --term-color-13: #d3869b; + --term-color-14: #8ec07c; + --term-color-15: #fbf1c7; +} diff --git a/docs/site/player/asciinema-player.min.js b/docs/site/player/asciinema-player.min.js new file mode 100644 index 00000000..2d14ba0c --- /dev/null +++ b/docs/site/player/asciinema-player.min.js @@ -0,0 +1,3 @@ +/* @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0 */ +var AsciinemaPlayer=function(A){"use strict";function e(A){return"number"==typeof A?A:"string"==typeof A?A.split(":").reverse().map(parseFloat).reduce(((A,e,t)=>A+e*Math.pow(60,t))):void 0}function t(A){return{name:"string"==typeof A?.name?A.name:"Error",message:"string"==typeof A?.message?A.message:String(A)}}const V=/^#[0-9a-f]{6}$/,g=/^#[0-9a-f]{3}$/;function n(A,e=void 0){if("string"!=typeof A)return e;const t=A.trim().toLowerCase();return V.test(t)?t:g.test(t)?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:e}function r(A,e,t){return[e[0]+A*(t[0]-e[0]),e[1]+A*(t[1]-e[1]),e[2]+A*(t[2]-e[2])]}function i(A){const[e,t,V]=function(A){return[Number.parseInt(A.slice(1,3),16)/255,Number.parseInt(A.slice(3,5),16)/255,Number.parseInt(A.slice(5,7),16)/255]}(A).map(Q),g=.4122214708*e+.5363325363*t+.0514459929*V,n=.2119034982*e+.6806995451*t+.1073969566*V,r=.0883024619*e+.2817188376*t+.6299787005*V,i=Math.cbrt(g),o=Math.cbrt(n),I=Math.cbrt(r);return[.2104542553*i+.793617785*o-.0040720468*I,1.9779984951*i-2.428592205*o+.4505937099*I,.0259040371*i+.7827717662*o-.808675766*I]}function o(A){const e=I(A);if(E(e))return C(e);const[t,V,g]=function([A,e,t]){return[A,Math.hypot(e,t),Math.atan2(t,e)]}(A);let n=0,r=V,i=[t,0,g];for(let A=0;A<24;A+=1){const A=(n+r)/2,e=[t,A,g];E(I(B(e)))?(n=A,i=e):r=A}return C(I(B(i)))}function I(A){const e=c(A[0],0,1),t=A[1],V=A[2],g=(e+.3963377774*t+.2158037573*V)**3,n=(e-.1055613458*t-.0638541728*V)**3,r=(e-.0894841775*t-1.291485548*V)**3,i=-1.2684380046*g+2.6097574011*n-.3413193965*r,o=-.0041960863*g-.7034186147*n+1.707614701*r;return[a(4.0767416621*g-3.3077115913*n+.2309699292*r),a(i),a(o)]}function B([A,e,t]){return[A,e*Math.cos(t),e*Math.sin(t)]}function s(A,e,t){return`#${l(A)}${l(e)}${l(t)}`}function C(A){return s(255*A[0],255*A[1],255*A[2])}function Q(A){return A<=.04045?A/12.92:((A+.055)/1.055)**2.4}function a(A){return A<=.0031308?12.92*A:1.055*A**(1/2.4)-.055}function E([A,e,t]){return A>=0&&A<=1&&e>=0&&e<=1&&t>=0&&t<=1}function c(A,e,t){return Math.max(e,Math.min(t,A))}function l(A){return Math.round(c(A,0,255)).toString(16).padStart(2,"0")}class u{log(...A){}debug(...A){}info(...A){}warn(...A){}error(...A){}}class d{constructor(A,e){this.logger=A,this.prefix=e}log(A,...e){this.logger.log(`${this.prefix}${A}`,...e)}debug(A,...e){this.logger.debug(`${this.prefix}${A}`,...e)}info(A,...e){this.logger.info(`${this.prefix}${A}`,...e)}warn(A,...e){this.logger.warn(`${this.prefix}${A}`,...e)}error(A,...e){this.logger.error(`${this.prefix}${A}`,...e)}}class f{constructor(A=1){this.speed=A,this.startTime=performance.now()}getTime(){return this.speed*(performance.now()-this.startTime)}setTime(A){this.startTime=performance.now()-A/this.speed}}class w{constructor(){}getTime(A){}setTime(A){}}class h{constructor(A,e){this.input="function"==typeof A.next?A:A[Symbol.iterator](),this.xfs=e??[]}map(A){return this.transform(function(A){return e=>t=>{e(A(t))}}(A))}flatMap(A){return this.transform(function(A){return e=>t=>{A(t).forEach(e)}}(A))}filter(A){return this.transform(function(A){return e=>t=>{A(t)&&e(t)}}(A))}take(A){return this.transform(function(A){let e=0;return t=>V=>{e<A&&t(V),e+=1}}(A))}drop(A){return this.transform(function(A){let e=0;return t=>V=>{e+=1,e>A&&t(V)}}(A))}transform(A){return new h(this.input,this.xfs.concat([A]))}multiplex(A,e){return new h(new y(this[Symbol.iterator](),A[Symbol.iterator](),e))}toArray(){return Array.from(this)}[Symbol.iterator](){let A=0,e=[],t=!1;const V=(g=this.xfs,n=A=>e.push(A),g.reverse().reduce(((A,e)=>{const t=D(e(A.step));return{step:t.step,flush:()=>{t.flush(),A.flush()}}}),D(n)));var g,n;return{next:()=>{for(A===e.length&&(e=[],A=0);0===e.length;){const A=this.input.next();if(A.done)break;V.step(A.value)}return 0!==e.length||t||(V.flush(),t=!0),e.length>0?{done:!1,value:e[A++]}:{done:!0}}}}}function D(A){return"function"==typeof A?{step:A,flush:()=>{}}:A}class y{constructor(A,e,t){this.left=A,this.right=e,this.comparator=t}[Symbol.iterator](){let A,e;return{next:()=>{if(void 0===A&&void 0!==this.left){const e=this.left.next();e.done?this.left=void 0:A=e.value}if(void 0===e&&void 0!==this.right){const A=this.right.next();A.done?this.right=void 0:e=A.value}if(void 0===A&&void 0===e)return{done:!0};if(void 0===A){const A=e;return e=void 0,{done:!1,value:A}}if(void 0===e){const e=A;return A=void 0,{done:!1,value:e}}if(this.comparator(A,e)){const e=A;return A=void 0,{done:!1,value:e}}{const A=e;return e=void 0,{done:!1,value:A}}}}}}async function p(A,e){return function(A){const e={start:0},t=A.events.filter((A=>"m"===A[1])).map((A=>[A[0],A[2].label]));return{cols:A.cols,rows:A.rows,theme:A.theme,duration:A.duration,effectiveStartAt:A.effectiveStartAt,markers:t,segments:[e],async loadSegment(e){if(0!==e)throw new Error("unknown recording segment");return{snapshot:{cols:A.cols,rows:A.rows,init:""},events:A.events}}}}(function(A,{startAt:e=0,idleTimeLimit:t,inputOffset:V,markers:g}){let{events:n}=A;n instanceof h||(n=new h(n));e*=1e3,t=t??A.idleTimeLimit,t=void 0!==t?1e3*t:1/0,V=void 0!==V?1e3*V:void 0;const r={offset:0};n=n.map(function(A,e,t){let V=0,g=0;return function(n){const r=n[0]-V-A;return V=n[0],r>0&&(g+=r,n[0]<e&&(t.offset+=r)),[n[0]-g,n[1],n[2]]}}(t,e,r)),void 0!==g&&(g=new h(g).map(m),n=n.filter((A=>"m"!==A[1])).multiplex(g,((A,e)=>A[0]<e[0])));n=n.map(function(){let A=0;return function(e){return"m"===e[1]?[e[0],e[1],{index:A++,time:e[0],label:e[2]}]:e}}()),n=n.toArray(),void 0!==V&&(n=n.map((A=>"i"===A[1]?[A[0]+V,A[1],A[2]]:A)),n.sort(((A,e)=>A[0]-e[0])));if(0===n.length)throw new Error("recording is missing events");const i=n[n.length-1][0],o=e-r.offset;return{...A,events:n,duration:i,effectiveStartAt:o}}(await async function(A){const{parser:e,encoding:t="utf-8"}=A,V=await async function({url:A,data:e,fetchOpts:t={}}){if("string"==typeof A)return await k(A,t);if(Array.isArray(A))return await Promise.all(A.map((A=>k(A,t))));if(void 0!==e){"function"==typeof e&&(e=e()),e instanceof Promise||(e=Promise.resolve(e));const A=await e;return"string"==typeof A||A instanceof ArrayBuffer?new Response(A):A}throw new Error("failed fetching recording file: url/data missing in src")}(A);return await e(V,{encoding:t})}(A),e))}async function k(A,e){const t=await fetch(A,e);if(!t.ok)throw new Error(`failed fetching recording from ${A}: ${t.status} ${t.statusText}`);return t}function m(A){return"number"==typeof A?[1e3*A,"m",""]:[1e3*A[0],"m",A[1]]}function q(A){const e=n(A.foreground),t=n(A.background),V=A.palette;if(void 0===V)return;if(!e||!t||V.length<8)return;const g=[],r=Math.min(V.length,16);for(let A=0;A<r;A+=1){const e=n(V[A]);if(!e)return;g.push(e)}for(let A=g.length;A<16;A+=1)g.push(g[A-8]);return{foreground:e,background:t,palette:g}}function L(A,e={}){return function(A,{idleTimeLimit:e,markers:t}){if("string"!=typeof A.url)throw new Error("segmented recording source requires a URL");const V=[];void 0!==e&&V.push("idleTimeLimit");void 0!==t&&V.push("markers");for(const e of["inputOffset","parser","encoding"])Object.hasOwn(A,e)&&V.push(e);if(V.length>0)throw new Error(`segmented recordings do not support option: ${V.join(", ")}`)}(A,e),async function(A,{startAt:e=0}){const t=await F(A.url,A.fetchOpts??{});let V;try{V=await t.json()}catch(e){throw new Error(`failed parsing segmented recording index from ${A.url}: ${e.message}`)}!function(A){if(1!==A?.version)throw new Error(`unsupported segmented recording version: ${JSON.stringify(A?.version)}`);if(M(A.duration,"recording duration"),R(A.term,"recording terminal"),!Array.isArray(A.segments)||0===A.segments.length)throw new Error("segmented recording index is missing segments");let e=-1;if(A.segments.forEach(((t,V)=>{if(M(t?.start,`segment ${V} start`),"string"!=typeof t?.url||0===t.url.length)throw new Error(`segment ${V} is missing its URL`);if(0===V&&0!==t.start)throw new Error("first segment must start at 0");if(V>0&&(t.start<=e||t.start>=A.duration))throw new Error(`segment ${V} start must be strictly increasing and before duration`);e=t.start})),void 0!==A.markers&&!Array.isArray(A.markers))throw new Error("segmented recording markers must be an array");let t=-1;for(const[e,V]of(A.markers??[]).entries()){if(!Array.isArray(V)||2!==V.length||"string"!=typeof V[1])throw new Error(`invalid marker ${e} in segmented recording index`);if(M(V[0],`marker ${e} time`),V[0]<t||V[0]>A.duration)throw new Error(`marker ${e} time is out of order or range`);t=V[0]}}(V);const g=1e3*V.duration,n=(V.markers??[]).map((([A,e])=>[1e3*A,e])),r=V.segments.map((e=>({start:1e3*e.start,url:v(e.url,t.url||A.url)}))),i={cols:V.term.cols,rows:V.term.rows,theme:N(V.term.theme),duration:g,effectiveStartAt:Math.min(Math.max(1e3*e,0),g),markers:n,segments:r,async loadSegment(e){if(!Number.isInteger(e)||e<0||e>=r.length)throw new Error("unknown recording segment");const t=r[e],V=await F(t.url,A.fetchOpts??{});let g;try{g=await V.json()}catch(A){throw new Error(`failed parsing recording segment from ${t.url}: ${A.message}`)}return function(A,e,t){const V=t?.snapshot;if(R(V,`segment ${e} snapshot`),"string"!=typeof V.init)throw new Error(`segment ${e} snapshot init must be a string`);if(!Array.isArray(t.events)||0===t.events.length)throw new Error(`segment ${e} is missing events`);const g=A.segments[e].start,n=A.segments[e+1]?.start??A.duration;let r=-1,i=A.markers.findIndex((([A])=>A>=g));-1===i&&(i=A.markers.length);const o=t.events.map(((t,V)=>{if(!Array.isArray(t)||3!==t.length||"string"!=typeof t[1])throw new Error(`invalid event ${V} in segment ${e}`);const o=1e3*t[0];if(M(o,`event ${V} time in segment ${e}`,!0),o<r||o<g||(e+1<A.segments.length?o>=n:o>n))throw new Error(`event ${V} time is out of range in segment ${e}`);if(r=o,"m"===t[1]){if("string"!=typeof t[2])throw new Error(`marker event ${V} in segment ${e} must have a string label`);return[o,"m",{index:i++,time:o,label:t[2]}]}return[o,t[1],t[2]]}));if(e>0&&o[0][0]!==g)throw new Error(`segment ${e} first event must match its start`);if(e===A.segments.length-1&&o[o.length-1][0]!==A.duration)throw new Error("final segment event must match recording duration");return{snapshot:{cols:V.cols,rows:V.rows,init:V.init},events:o}}(i,e,g)}};return i}(A,e)}async function F(A,e){const t=await fetch(A,e);if(!t.ok)throw new Error(`failed fetching recording from ${A}: ${t.status} ${t.statusText}`);return t}function M(A,e,t=!1){if(!Number.isFinite(A)||A<0)throw new Error(`${e} must be a finite non-negative ${t?"millisecond":"second"} value`)}function R(A,e){if(!Number.isInteger(A?.cols)||A.cols<=0||!Number.isInteger(A?.rows)||A.rows<=0)throw new Error(`${e} must have positive integer cols and rows`)}function N(A){return q({foreground:A?.fg,background:A?.bg,palette:"string"==typeof A?.palette?A.palette.split(":"):void 0})}function v(A,e){return new URL(A,new URL(e,globalThis.location?.href??"http://localhost/")).href}function b(A,e){let t=0,V=A.segments.length;for(;t+1<V;){const g=Math.floor((t+V)/2);A.segments[g].start<=e?t=g:V=g}return t}async function G(A){if(A instanceof Response){const e=await A.text(),t=function(A){const e=A.split("\n");let t;try{t=JSON.parse(e[0])}catch(A){return}const V=new h(e).drop(1).filter((A=>"["===A[0])).map(JSON.parse);return{header:t,events:V}}(e);if(void 0!==t){const{header:A,events:e}=t;if(2===A.version)return S(A,e);if(3===A.version)return J(A,e);throw new Error(`asciicast v${A.version} format not supported`)}{const A=JSON.parse(e);if(1===A.version)return U(A)}}else{if("object"==typeof A&&1===A.version)return U(A);if(Array.isArray(A)){const e=A[0];if(2===e.version){return S(e,A.slice(1,A.length))}if(3===e.version){return J(e,A.slice(1,A.length))}throw new Error(`asciicast v${e.version} format not supported`)}}throw new Error("invalid data")}function U(A){let e=0;const t=new h(A.stdout).map((A=>(e+=1e3*A[0],[e,"o",A[1]])));return{cols:0===A.width?80:A.width,rows:0===A.height?24:A.height,events:t}}function S(A,e){return e instanceof h||(e=new h(e)),e=e.map((A=>[1e3*A[0],A[1],A[2]])),{cols:0===A.width?80:A.width,rows:0===A.height?24:A.height,theme:Y(A.theme),events:e,idleTimeLimit:A.idle_time_limit}}function J(A,e){e instanceof h||(e=new h(e));let t=0;return e=e.map((A=>(t+=1e3*A[0],[t,A[1],A[2]]))),{cols:0===A.term.cols?80:A.term.cols,rows:0===A.term.rows?24:A.term.rows,theme:Y(A.term?.theme),events:e,idleTimeLimit:A.idle_time_limit}}function Y(A){const e="string"==typeof A?.palette?A.palette.split(":"):void 0;return q({foreground:A?.fg,background:A?.bg,palette:e})}function T(A,e,t,V,g,n){const r=function(A){return function(e,t){"o"===e?A("output",t):"i"===e?A("input",{data:t}):"r"===e?A("resize",t):"m"===e&&A("marker",t)}}(e);if(0===A)return n.debug("using no buffer"),function(A){return{pushEvent(e){A(e[1],e[2])},pushText(e){A("o",e)},stop(){}}}(r);{let e;return"number"==typeof(A=A??{})?(n.debug(`using fixed time buffer (${A} ms)`),e=e=>A):"function"==typeof A?(n.debug("using custom dynamic buffer"),e=A({logger:n})):(n.debug("using adaptive buffer",A),e=function({logger:A}={},{minBufferTime:e=50,bufferLevelStep:t=100,maxBufferLevel:V=50,transitionDuration:g=500,peakHalfLifeUp:n=100,peakHalfLifeDown:r=1e4,floorHalfLifeUp:i=5e3,floorHalfLifeDown:o=100,idealHalfLifeUp:I=1e3,idealHalfLifeDown:B=5e3,safetyMultiplier:s=1.2,minImprovementDuration:C=3e3}={}){function Q(A){return 0===A?e:t*A}let a=1,E=Q(a),c=performance.now(),l=null,u=null,d=null,f=null,w=null,h=null;return function(D){const y=performance.now(),p=Math.max(0,y-c);if(c=y,null===l)l=D;else if(D>l){const A=1-Math.pow(2,-p/n);l+=A*(D-l)}else{const A=1-Math.pow(2,-p/r);l+=A*(D-l)}if(l=Math.max(l,0),null===u)u=D;else if(D>u){const A=1-Math.pow(2,-p/i);u+=A*(D-u)}else{const A=1-Math.pow(2,-p/o);u+=A*(D-u)}u=Math.max(u,0);const k=s*(l+(l-u));if(null===d)d=k;else if(k>d){const A=1-Math.pow(2,-p/I);d+=+A*(k-d)}else{const A=1-Math.pow(2,-p/B);d+=+A*(k-d)}let m;var q,L,F;return d<=e?m=0:(q=Math.ceil(d/t),L=1,F=V,m=Math.min(F,Math.max(L,q))),D>E&&A.debug("buffer underrun",{latency:D,bufferTime:E}),m>a?(D>E?a=Math.min(m,a+3):a+=1,w=Q(a),h=(w-E)/g,f=null,A.debug("raising buffer",{latency:D,bufferTime:E,targetBufferTime:w})):m<a?(null==f&&(f=y),y-f>=C&&(a-=1,w=Q(a),h=(w-E)/g,f=y,A.debug("lowering buffer",{latency:D,bufferTime:E,targetBufferTime:w}))):f=null,null!==w&&(E+=h*p,(h>=0&&E>w||h<0&&E<w)&&(E=w,w=null)),E}}({logger:n},A)),function(A,e,t,V,g,n=1/60){const r=1e3*n;let i,o=performance.now()-g,I=A(0),B=[],s=-r,C=!1;function Q(){return performance.now()-o}function a(A){B.push(A),void 0!==i&&(i(E()),i=void 0)}function E(){if(B.length>0){const A=B;return B=[],A}return new Promise((A=>{i=A}))}async function c(){for(;!C;){const A=await E();if(C)return;let e=0;for(;e<A.length;)e=await l(A,e)}}async function l(A,V){const g=A[V],n=g[3];if(n-s>=r){const e=n-Q();if(e>0&&(await(i=e,new Promise((A=>{setTimeout(A,i)}))),C))return A.length;t(g[0]),s=n}var i;return"o"===g[1]?u(A,V):(e(g[1],g[2]),V+1)}function u(A,t){const V=A[t],g=V[0]+r,n=[];let i=V;for(;void 0!==i&&"o"===i[1]&&i[0]<g;)n.push(i[2]),i=A[++t];return e("o",n),t}return queueMicrotask(c),{pushEvent(e){let t=Q()-e[0];t<0&&(V.debug(`correcting epoch by ${t} ms`),o+=t,t=0),I=A(t),a([e[0],e[1],e[2],e[0]+I])},pushText(A){const e=Q();a([e,"o",A,e+I])},stop(){C=!0,void 0!==i&&(i([]),i=void 0)}}}(e,r,t,n,V??0,g)}}const K=1e3,H=1e6;function O(A){const e=new TextDecoder,t=new TextDecoder;let V,g=function(A){const e=(new TextDecoder).decode(A);if("ALiS"!==e)throw new Error("not an ALiS v1 live stream");g=r},n=0;function r(A){const e=new $(new DataView(A)),t=e.getUint8();if(1!==t)throw new Error(`expected reset (0x01) frame, got ${t}`);return i(e,A)}function i(A,t){A.decodeVarUint();let r=A.decodeVarUint();V=r,r/=K,n=0;const i=A.decodeVarUint(),I=A.decodeVarUint(),B=A.getUint8();let s;if(8===B){const e=30;s=x(new Uint8Array(t,A.offset,e)),A.forward(e)}else if(16===B){const e=54;s=x(new Uint8Array(t,A.offset,e)),A.forward(e)}else if(0!==B)throw new Error(`alis: invalid theme format (${B})`);const C=A.decodeVarUint();let Q;return C>0&&(Q=e.decode(new Uint8Array(t,A.offset,C))),g=o,{time:r,term:{size:{cols:i,rows:I},theme:s,init:Q}}}function o(o){const I=new $(new DataView(o)),B=I.getUint8();return 1===B?i(I,o):111===B?function(A,t){A.decodeVarUint();const g=A.decodeVarUint();V+=g;const n=A.decodeVarUint(),r=e.decode(new Uint8Array(t,A.offset,n));return[V/K,"o",r]}(I,o):105===B?function(A,e){A.decodeVarUint();const g=A.decodeVarUint();V+=g;const n=A.decodeVarUint(),r=t.decode(new Uint8Array(e,A.offset,n));return[V/K,"i",r]}(I,o):114===B?function(A){A.decodeVarUint();const e=A.decodeVarUint();V+=e;const t=A.decodeVarUint(),g=A.decodeVarUint();return[V/K,"r",{cols:t,rows:g}]}(I):109===B?function(A,e){A.decodeVarUint();const t=A.decodeVarUint();V+=t;const g=A.decodeVarUint(),r=new TextDecoder,i=n++,o=V/K,I=V/H,B=r.decode(new Uint8Array(e,A.offset,g));return[o,"m",{index:i,time:I,label:B}]}(I,o):120===B?function(A){A.decodeVarUint();const e=A.decodeVarUint();V+=e;const t=A.decodeVarUint();return[V/K,"x",{status:t}]}(I):4===B?(g=r,!1):void A.debug(`alis: unknown frame type: ${B}`)}return function(A){return g(A)}}function x(A){const e=A.length/3,t=Z(A[0],A[1],A[2]),V=Z(A[3],A[4],A[5]),g=[];for(let t=2;t<e;t++)g.push(Z(A[3*t],A[3*t+1],A[3*t+2]));return q({foreground:t,background:V,palette:g})}function Z(A,e,t){return`#${W(A)}${W(e)}${W(t)}`}function W(A){return A.toString(16).padStart(2,"0")}class ${constructor(A,e=0){this.inner=A,this.offset=e}forward(A){this.offset+=A}getUint8(){const A=this.inner.getUint8(this.offset);return this.offset+=1,A}decodeVarUint(){let A=BigInt(0),e=BigInt(0),t=this.getUint8();for(;t>127;)t&=127,A+=BigInt(t)<<e,e+=BigInt(7),t=this.getUint8();return A+=BigInt(t)<<e,Number(A)}}function j(){const A=new TextDecoder;let e=function(V){const g=A.decode(V,{stream:!0}),[n,r]=function(A){const e=A.match(/\x1b\[8;(\d+);(\d+)t/);if(null!==e)return[parseInt(e[2],10),parseInt(e[1],10)]}(g)??function(A){const e=A.match(/\[.*COLUMNS="(\d{1,3})" LINES="(\d{1,3})".*\]/);if(null!==e)return[parseInt(e[1],10),parseInt(e[2],10)]}(g)??[80,24];return e=t,{time:0,term:{size:{cols:n,rows:r},init:g}}};function t(e){return A.decode(e,{stream:!0})}return function(A){return e(A)}}function z(A){const e=Math.min(500*Math.pow(2,A),1e4);return Math.random()*e}function X(A){if(A.length<13)return;const e=function(A){const e=P(A.subarray(0,4)),t=P(A.subarray(4,8));return e+t/1e6}(A.subarray(0,8)),t=P(A.subarray(8,12));return{time:e,data:A.subarray(12,12+t),len:t+12}}function P(A){return A[0]+256*A[1]+256*A[2]*256+256*A[3]*256*256}class _{constructor(A,t){this.logger=t.logger,this.driverFactory=function(A){if("function"==typeof A)return A;"string"==typeof A&&(A="ws://"==A.substring(0,5)||"wss://"==A.substring(0,6)?{driver:"websocket",url:A}:"clock:"==A.substring(0,6)?{driver:"clock"}:"random:"==A.substring(0,7)?{driver:"random"}:"benchmark:"==A.substring(0,10)?{driver:"benchmark",url:A.substring(10)}:{driver:"recording",url:A});void 0===A.driver&&(A.driver="recording");if("recording"==A.driver&&("segmented"!==A.format&&void 0===A.parser&&(A.parser="asciicast"),"string"==typeof A.parser)){if(!eA.has(A.parser))throw new Error(`unknown parser: ${A.parser}`);A.parser=eA.get(A.parser)}if(AA.has(A.driver)){const e=AA.get(A.driver);return(t,V)=>e(A,t,V)}throw new Error(`unsupported driver: ${JSON.stringify(A)}`)}(A),this.driver=null,this.cols=t.cols,this.rows=t.rows,this.speed=t.speed,this.loop=t.loop,this.autoPlay=t.autoPlay,this.idleTimeLimit=t.idleTimeLimit,this.preload=t.preload,this.startAt=e(t.startAt),this.poster=this._parsePoster(t.poster),this.markers=t.markers,this.pauseOnMarkers=t.pauseOnMarkers,this.audioUrl=t.audioUrl,this.initPromise=null,this.commandQueue=Promise.resolve(),this.startupPromise=new Promise((A=>{this.resolveStartup=A})),this.eventHandlers=new Map([["ended",[]],["error",[]],["input",[]],["loading",[]],["marker",[]],["metadata",[]],["muted",[]],["offline",[]],["output",[]],["pause",[]],["play",[]],["playing",[]],["reset",[]],["resize",[]],["ready",[]],["seeked",[]]])}init(){return null===this.initPromise&&(this.initPromise=this._init()),this.initPromise}terminalReady(){this.resolveStartup()}async _init(){await this.startupPromise,this.driver=this.driverFactory({dispatch:this._dispatchEvent.bind(this),logger:this.logger},{cols:this.cols,rows:this.rows,speed:this.speed,idleTimeLimit:this.idleTimeLimit,startAt:this.startAt,preload:this.preload,loop:this.loop,poster:this.autoPlay?void 0:this.poster,markers:this.markers,pauseOnMarkers:this.pauseOnMarkers,audioUrl:this.audioUrl});const A={isPausable:!!this.driver.pause,isSeekable:!!this.driver.seek};this._installDriverDefaults(),this.driver.init&&await this.driver.init(),this.autoPlay&&await this.driver.play(),this._dispatchEvent("ready",A)}_installDriverDefaults(){if(void 0===this.driver.stop&&(this.driver.stop=()=>{}),void 0===this.driver.pause&&(this.driver.pause=()=>{}),void 0===this.driver.seek&&(this.driver.seek=A=>!1),void 0===this.driver.step&&(this.driver.step=A=>{}),void 0===this.driver.mute&&(this.driver.mute=()=>{}),void 0===this.driver.unmute&&(this.driver.unmute=()=>{}),void 0===this.driver.getDuration&&(this.driver.getDuration=()=>{}),void 0===this.driver.getCurrentTime){const A=this.driver.play;let e=new w;this.driver.play=()=>(e=new f(this.speed),A()),this.driver.getCurrentTime=()=>{const A=e.getTime();return"number"==typeof A?A/1e3:A}}}_enqueue(A){const e=async()=>(await this.init(),A.call(this)),t=this.commandQueue.then(e,e);return this.commandQueue=t.catch((()=>{})),t}play(){return this._enqueue((function(){return this.driver.play()}))}pause(){return this._enqueue((function(){return this.driver.pause()}))}seek(A){return this._enqueue((function(){return this.driver.seek(A)}))}step(A){return this._enqueue((function(){return this.driver.step(A)}))}stop(){return this._enqueue((function(){return this.driver.stop()}))}mute(){return this._enqueue((function(){return this.driver.mute()}))}unmute(){return this._enqueue((function(){return this.driver.unmute()}))}getCurrentTime(){return this.driver?this.driver.getCurrentTime():0}getRemainingTime(){const A=this.getDuration();if("number"==typeof A)return A-Math.min(this.getCurrentTime(),A)}getProgress(){const A=this.getDuration();if("number"==typeof A)return Math.min(this.getCurrentTime(),A)/A}getDuration(){if(this.driver)return this.driver.getDuration()}addEventListener(A,e){this.eventHandlers.get(A).push(e)}removeEventListener(A,e){const t=this.eventHandlers.get(A);if(!t)return;const V=t.indexOf(e);-1!==V&&t.splice(V,1)}_dispatchEvent(A,e={}){for(const t of[...this.eventHandlers.get(A)])try{t(e)}catch(e){this.logger.error(`event handler for "${A}" failed`,e),"function"==typeof globalThis.reportError?globalThis.reportError(e):setTimeout((()=>{throw e}),0)}}_parsePoster(A){if("string"==typeof A)return"data:text/plain,"==A.substring(0,16)?{type:"text",value:A.substring(16)}:"npt:"==A.substring(0,4)?{type:"npt",value:e(A.substring(4))}:void 0}}const AA=new Map([["benchmark",function({url:A,iterations:e=10},{dispatch:t}){let V,g=0;return{async init(){const e=await G(await fetch(A)),{cols:n,rows:r,events:i}=e;V=Array.from(i).filter((([A,e,t])=>"o"===e)).map((([A,e,t])=>[A,t]));for(const[A,e]of V)g+=new Blob([e]).size;t("reset",{size:{cols:n,rows:r}})},play(){const A=performance.now();for(let A=0;A<e;A++){for(const[A,e]of V)t("output",e);t("output","c")}const n=(performance.now()-A)/1e3,r=g*e/n,i=g/1048576*e/n;return console.info("benchmark: result",{byteCount:g,iterations:e,duration:n,throughput:r,throughputMbs:i}),setTimeout((()=>{t("ended")}),0),!0}}}],["clock",function({hourColor:A=3,minuteColor:e=4,separatorColor:t=9},{dispatch:V},{cols:g=5,rows:n=1}){const r=Math.floor(n/2),i=Math.floor(g/2)-2,o=`[?25l[1m[${r}B`;let I;const B=()=>{(()=>{const V=new Date,g=V.getHours(),n=V.getMinutes(),r=[];r.push("\r");for(let A=0;A<i;A++)r.push(" ");return r.push(`[3${A}m`),g<10&&r.push("0"),r.push(`${g}`),r.push(`[3${t};5m:[25m`),r.push(`[3${e}m`),n<10&&r.push("0"),r.push(`${n}`),r})().forEach((A=>{V("output",A)}))};return{init:()=>{V("reset",{size:{cols:g,rows:n}}),V("output",o),B()},play:()=>(void 0!==I||(V("play"),V("playing"),V("output",o),B(),I=setInterval(B,1e3)),!0),stop:()=>{clearInterval(I)},getCurrentTime:()=>{const A=new Date;return 60*A.getHours()+A.getMinutes()}}}],["eventsource",function({url:A,bufferTime:e,minFrameTime:t},{dispatch:V,logger:g}){let n,r;g=new d(g,"eventsource: ");let i=new w;function o(A){void 0!==r&&r.stop(),r=T(e,V,(A=>i.setTime(A)),A,t,g)}return{play:()=>(n||(V("play"),n=new EventSource(A),n.addEventListener("open",(()=>{g.info("opened"),o()})),n.addEventListener("error",(A=>{g.info("errored"),g.debug({e:A}),V("loading")})),n.addEventListener("message",(A=>{const e=JSON.parse(A.data);if(Array.isArray(e))r.pushEvent([1e3*e[0],e[1],e[2]]);else if(void 0!==e.cols||void 0!==e.width){const A=e.cols??e.width,t=e.rows??e.height,n="number"==typeof e.time?1e3*e.time:void 0;g.debug(`vt reset (${A}x${t})`),o(n),V("reset",{size:{cols:A,rows:t},init:e.init??void 0}),i=new f,void 0!==n&&i.setTime(n),V("playing")}else"offline"===e.state&&(g.info("stream offline"),V("offline",{message:"Stream offline"}),i=new w)})),n.addEventListener("done",(()=>{g.info("closed"),n.close(),V("ended",{message:"Stream ended"})}))),!0),stop:()=>{void 0!==r&&r.stop(),void 0!==n&&n.close()},getCurrentTime:()=>{const A=i.getTime();return"number"==typeof A?A/1e3:A}}}],["random",function(A,{dispatch:e},{speed:t}){const V=" ".charCodeAt(0),g="~".charCodeAt(0)-V;let n;const r=()=>{const A=Math.pow(5,4*Math.random());n=setTimeout(i,A/t)},i=()=>{r();const A=String.fromCharCode(V+Math.floor(Math.random()*g));e("output",A)};return{play(){if(void 0!==n)return!0;e("play"),e("playing"),r()},stop(){clearInterval(n)}}}],["recording",function(A,{dispatch:e,logger:V},{speed:g,idleTimeLimit:n,startAt:r,preload:i,loop:o,poster:I,markers:B,pauseOnMarkers:s,cols:C,rows:Q,audioUrl:a}){const E="cold",c="loading",l="ready.initial",u="ready.paused",d="ready.starting",f="ready.playing",w="ready.buffering.whilePaused",h="ready.buffering.toResume",D="ready.ended",y="failed",k="stopped",m="initRequested",q="playRequested",F="deferredPlayReady",M="pauseRequested",R="seekRequested",N="stepRequested",v="stopRequested",G="loadSucceeded",U="loadFailed",S="playbackStartConfirmed",J="playbackStartRejected",Y="playbackEnded",T="audioWaiting",K="audioPlaying",H="segmentWaiting",O="segmentReady",x="markerReached",Z="play",W="seek",$=1e3*(A.minFrameTime??1/60);let j=()=>performance.now()*g,z=E,X=[],P=!1;const _={recording:void 0,segmentIndex:void 0,segment:void 0,segmentCache:new Map,positionGeneration:0,markers:void 0,duration:void 0,effectiveStartAt:void 0,recordingEventTimeoutId:void 0,nextEventIndex:0,lastEventTime:0,startTime:void 0,pauseElapsedTime:void 0,playCount:0,waitingTimeout:void 0,loadingTimeout:void 0,audioCtx:void 0,audioElement:void 0,audioSeekable:!1,loaded:void 0,posterVisible:!1,posterRenderableAfterLoad:void 0!==I,failureError:null,segmentWaiting:!1};function AA(A=z){return A===w||A===h}function eA(){return!0===o||"number"==typeof o&&_.playCount<o}function tA(t){return void 0===_.loaded&&(_.loaded=async function(t){const g=_.positionGeneration;_.loadingTimeout=setTimeout((()=>{e("loading")}),3e3);try{const e=function(A,e){if("segmented"===A.format)return L(A,e);return p(A,e)}(A,{idleTimeLimit:n,startAt:r,markers:B,inputOffset:A.inputOffset}),i=async function(A){if(!A)return!1;_.audioElement=await async function(A){const e=new Audio;let t,V;e.preload="metadata",e.loop=!1,e.crossOrigin="anonymous";const g=new Promise(((A,e)=>{t=A,V=e}));function n(){e.removeEventListener("canplay",r),e.removeEventListener("error",i),e.removeEventListener("abort",o)}function r(){n(),t()}function i(){n(),V(new Error(`failed loading audio from ${A}`))}function o(){n(),V(new Error(`audio loading aborted for ${A}`))}return e.addEventListener("canplay",r),e.addEventListener("error",i),e.addEventListener("abort",o),e.src=A,e.load(),await g,e}(A),_.audioSeekable=!Number.isNaN(_.audioElement.duration)&&_.audioElement.duration!==1/0&&_.audioElement.seekable.length>0&&_.audioElement.seekable.end(_.audioElement.seekable.length-1)===_.audioElement.duration,_.audioSeekable?(_.audioElement.addEventListener("playing",vA),_.audioElement.addEventListener("waiting",NA)):V.warn(`audio is not seekable - you must enable range request support on the server providing ${_.audioElement.src} for audio seeking to work`);return!0}(a).catch((A=>(V.warn(`audio load failed: ${A.message}`),!1))),o=await e;if(g!==_.positionGeneration)return!1;_.recording=o,_.duration=o.duration,_.effectiveStartAt=o.effectiveStartAt,_.markers=o.markers;const s=b(o,t??("npt"===I?.type?1e3*I.value:_.effectiveStartAt)??0),C=await aA(s,!0);if(g!==_.positionGeneration)return!1;QA(s,C);const Q=await i;if(g!==_.positionGeneration)return!1;IA(G,{hasAudio:Q})}catch(A){throw BA(U,{error:A}),A}finally{WA()}}(t),_.loaded.catch((()=>{}))),_.loaded}function VA(A,n,r={}){switch(n){case m:if(A===E){if(i||"npt"==I?.type)return{nextState:c,action:()=>tA()};if("text"==I?.type)return{nextState:A,action:()=>(sA(),void(_.posterRenderableAfterLoad=!1))}}return{nextState:A};case G:return A!==c?{nextState:A}:{nextState:l,action:()=>{e("metadata",{duration:_.duration/1e3,markers:_.markers.map((([A,e])=>[A/1e3,e])),hasAudio:r.hasAudio}),YA(_.segment),sA()}};case U:return A!==c?{nextState:A}:{nextState:y,action:()=>{_.failureError=r.error,e("error",t(r.error))}};case q:return A===E?{nextState:c,action:()=>(CA(),e("play"),tA().then((()=>IA(F))))}:A===l||A===u||A===D?{nextState:d,action:()=>(e("play"),CA(),HA(Z))}:A===w?{nextState:h,action:()=>(e("play"),!!_.segmentWaiting||(!_.audioElement||_.audioElement.play().catch((A=>{throw IA(J),A}))))}:A===h||A===f?{nextState:A,action:()=>(e("play"),!0)}:{nextState:A};case F:return A===l?{nextState:d,action:()=>(CA(),HA(Z))}:{nextState:A};case S:return A!==d?{nextState:A}:{nextState:f,action:()=>(qA(),r.reason===W?e("seeked"):e("playing"),!0)};case J:return A===d?{nextState:u}:A===h?{nextState:w}:{nextState:A};case Y:return A!==f?{nextState:A}:eA()?{nextState:f,action:jA}:{nextState:D,action:zA};case T:return A===f?{nextState:h,action:()=>{V.debug("pausing session playback"),kA(),xA()}}:A===w||A===h?{nextState:A,action:xA}:{nextState:A};case K:return _.segmentWaiting?{nextState:A}:A===h?{nextState:f,action:()=>{V.debug("resuming session playback"),ZA(),qA(),e("playing")}}:A===w?{nextState:u,action:()=>{ZA()}}:{nextState:A};case H:return A===f?{nextState:h,action:()=>{var A;_.segmentWaiting=!0,A=r.time,yA(),_.pauseElapsedTime=A,xA(),_.audioElement&&_.audioElement.pause()}}:{nextState:A};case O:return _.segmentWaiting=!1,A===h?{nextState:A,action:dA}:A===w?{nextState:u,action:ZA}:{nextState:A};case M:return A===f?{nextState:u,action:OA}:A===h?{nextState:w,action:()=>(_.audioElement&&_.audioElement.pause(),!0)}:{nextState:A,action:()=>!0};case R:{if(A===E)return{nextState:c,action:()=>tA("number"==typeof r.where?1e3*r.where:void 0).then((()=>LA(r.where)))};if(AA(A)&&!_.segmentWaiting)return{nextState:A,action:()=>!1};if(A!==l&&A!==u&&A!==D&&A!==f&&A!==w&&A!==h)return{nextState:A};const t=r.seekOperation;return t.noOp?{nextState:A,action:()=>!1}:{nextState:t.reachedEnd?D:A===f||A===h?d:u,action:()=>(CA(),async function(A,t){const V=t===f||t===h,g=++_.positionGeneration;t===f&&kA();_.segmentWaiting=!1,ZA(),_.audioElement&&_.audioElement.pause();if(!await KA(A.targetTime,g))return!1;if(g!==_.positionGeneration)return!1;if(A.reachedEnd)return e("seeked"),e("ended"),!0;if(V)return await HA(W);return e("seeked"),!0}(t,A))}}case N:return A===E?{nextState:c,action:()=>tA().then((()=>oA(N,r)))}:A===f||AA(A)||A!==l&&A!==u&&A!==D?{nextState:A}:{nextState:A,action:()=>async function(A=1){const t=++_.positionGeneration,V=await async function(A,e){let t,V=Math.abs(A),g=_.segmentIndex,n=A>0?_.nextEventIndex:_.nextEventIndex-2;for(;g>=0&&g<_.recording.segments.length;){if(e!==_.positionGeneration)return;cA([g-1,g,g+1]);const r=await EA(g,e);if(e!==_.positionGeneration)return;if(A>0){for(let A=Math.max(n,0);A<r.events.length;A++)if("o"===r.events[A][1]&&0===--V){t={time:r.events[A][0]};break}if(t)break;g++,n=0}else{for(let A=Math.min(n,r.events.length-1);A>=0;A--)if("o"===r.events[A][1]&&0===--V){t={time:r.events[A][0]};break}if(t)break;g--,n=Number.MAX_SAFE_INTEGER}}t&&(t.reachedEnd=t.time>=_.duration);return t}(A,t);if(void 0===V||t!==_.positionGeneration)return;if(CA(),!await KA(V.time,t,A<0))return;_.audioElement&&_.audioSeekable&&(_.audioElement.currentTime=V.time/1e3/g);V.reachedEnd?(z=D,e("ended")):z=u}(r.n)};case x:return A!==f?{nextState:A}:s?{nextState:u,action:()=>(GA(r.data),OA(r.time))}:{nextState:A,action:()=>GA(r.data)};case v:return{nextState:k,action:XA};default:return{nextState:A}}}function gA(A,e={}){X.push({event:A,payload:e})}function nA(A,e={}){const t=z,{nextState:V,action:g}=VA(t,A,e);return V!==z&&(z=V),g?.()}function rA(A){_.failureError||z===k||(X.length=0,_.segmentWaiting=!1,$A(),_.audioElement&&_.audioElement.pause(),_.failureError=A,z=y,e("error",t(A)))}function iA(){if(_.failureError)throw _.failureError;if(z===k)throw new Error("driver has been stopped")}function oA(A,e={}){return iA(),IA(A,e)}function IA(A,e={}){if(!_.failureError&&z!==k){if(P)throw new Error("re-entrant sendDriverEvent() is not allowed during queue processing");P=!0;try{const t=nA(A,e);for(;X.length>0;){const A=X.shift();nA(A.event,A.payload)}return t}catch(A){throw rA(A),A}finally{P=!1,X.length=0}}}function BA(A,e={}){return P?(gA(A,e),!0):IA(A,e)}function sA(){_.posterRenderableAfterLoad&&("npt"==I.type?TA(1e3*I.value,!1,!1):"text"==I.type&&bA(I.value),_.posterVisible=!0)}function CA(){_.posterVisible&&bA("c"),_.posterVisible=!1,_.posterRenderableAfterLoad=!1}function QA(A,e){_.segmentIndex=A,_.segment=e,_.nextEventIndex=0,_.lastEventTime=_.recording.segments[A].start}function aA(A,e=!1){let t=_.segmentCache.get(A);return void 0===t&&(t={},t.promise=_.recording.loadSegment(A).then((e=>(_.segmentCache.get(A)===t&&(t.data=e),e)),(g=>{throw _.segmentCache.get(A)===t&&_.segmentCache.delete(A),e||V.warn(`segment prefetch failed: ${g.message}`),g})),_.segmentCache.set(A,t),e||t.promise.catch((()=>{}))),t.promise}async function EA(A,e,t){void 0===_.segmentCache.get(A)?.data&&t?.();try{return await aA(A,!0)}catch(A){throw e===_.positionGeneration&&z!==k&&rA(A),A}}function cA(A){const e=new Set(A.filter((A=>A>=0)));for(const A of _.segmentCache.keys())e.has(A)||_.segmentCache.delete(A)}function lA(){const A=_.recording.segments.length-1,e=_.segmentIndex<A?_.segmentIndex+1:eA()?0:void 0;cA([_.segmentIndex-1,_.segmentIndex,e]),void 0!==e&&aA(e)}async function uA(){const A=_.segmentIndex+1,e=_.recording.segments[A].start,t=++_.positionGeneration;try{const V=await EA(A,t,(()=>{IA(H,{time:e})}));if(t!==_.positionGeneration||z===k)return;QA(A,V),lA(),z===h||z===w?await IA(O):z===f&&fA()}catch{}}function dA(){if(ZA(),_.audioElement)return _.audioElement.play().then((()=>IA(K)),(A=>(IA(J),V.warn(`audio resume failed: ${A.message}`),!1)));gA(K)}function fA(){const A=_.segment.events[_.nextEventIndex];if(A)_.recordingEventTimeoutId=wA(hA,A[0]);else if(_.segmentIndex<_.recording.segments.length-1){const A=_.recording.segments[_.segmentIndex+1].start;_.recordingEventTimeoutId=wA(uA,A)}else BA(Y)}function wA(A,e){let t=(e-(j()-_.startTime))/g;return t<0&&(t=0),setTimeout(A,t)}function hA(){for(;void 0!==_.segment.events[_.nextEventIndex];){if(DA())return;const A=_.segment.events[_.nextEventIndex];if(void 0===A)break;if(j()-_.startTime<=A[0])break}fA()}function DA(){const A=_.segment.events[_.nextEventIndex];return"o"===A[1]?(function(){const A=_.segment.events[_.nextEventIndex],e=A[0]+$,t=[];let V=A;for(;void 0!==V&&"o"===V[1]&&V[0]<e;)t.push(V[2]),_.lastEventTime=V[0],_.nextEventIndex++,V=_.segment.events[_.nextEventIndex];bA(t)}(),!1):(_.lastEventTime=A[0],_.nextEventIndex++,pA(A))}function yA(){clearTimeout(_.recordingEventTimeoutId),_.recordingEventTimeoutId=null}function pA(A){const[t,V,g]=A;if("o"===V)bA(g);else if("i"===V)e("input",{data:g});else if("r"===V){const[A,t]=g.split("x").map((A=>Number.parseInt(A,10)));e("resize",JA(A,t))}else if("m"===V)return!0===IA(x,{data:g,time:t});return!1}function kA(){yA(),_.pauseElapsedTime=j()-_.startTime}function mA(){_.audioElement&&!_.audioCtx&&function(){_.audioCtx=new AudioContext({latencyHint:"interactive"});const A=_.audioCtx.createMediaElementSource(_.audioElement);A.connect(_.audioCtx.destination),j=RA}()}function qA(){_.startTime=j()-_.pauseElapsedTime,_.pauseElapsedTime=null,fA()}function LA(A){return iA(),function(A){if("number"==typeof A){if(Number.isFinite(A))return}else if("string"==typeof A){if(function(A){return"<<"===A||">>"===A||"<<<"===A||">>>"===A}(A)||void 0!==UA(A))return}else if("object"==typeof A&&null!==A&&("prev"===A.marker||"next"===A.marker||Number.isInteger(A.marker)&&A.marker>=0))return;throw new Error(`invalid seek target: ${JSON.stringify(A)}`)}(A),IA(R,z===E?{where:A}:{seekOperation:SA(z,A)})}function FA(A){if(0==_.markers.length)return;let e,t=0,V=_.markers[t];for(;V&&V[0]<A;)e=V[0],V=_.markers[++t];return e}function MA(){return z===f?j()-_.startTime:_.pauseElapsedTime??0}function RA(){if(!_.audioCtx)throw new Error("audio context not started - can't tell time!");const{contextTime:A,performanceTime:e}=_.audioCtx.getOutputTimestamp();return 0===e?1e3*A:1e3*A+(performance.now()-e)}function NA(){V.debug("audio buffering"),IA(T)}function vA(){V.debug("audio resumed"),IA(K)}function bA(A){e("output",A)}function GA(A){e("marker",{...A,time:A.time/1e3})}function UA(A){if(!A.endsWith("%"))return;const e=Number(A.slice(0,-1));return Number.isFinite(e)?e:void 0}function SA(A,e){const t=MA(),V=A===f;let g=e;if("number"==typeof g)g*=1e3;else if("string"==typeof g)"<<"===g?g=t-5e3:">>"===g?g=t+5e3:"<<<"===g?g=t-.1*_.duration:">>>"===g?g=t+.1*_.duration:"%"===g[g.length-1]&&(g=UA(g)/100*_.duration);else if("object"==typeof g)if("prev"===g.marker)g=FA(t)??0,V&&t-g<1e3&&(g=FA(g)??0);else if("next"===g.marker)g=function(A){if(0==_.markers.length)return;let e,t=_.markers.length-1,V=_.markers[t];for(;V&&V[0]>A;)e=V[0],V=_.markers[--t];return e}(t)??_.duration;else if("number"==typeof g.marker){const A=_.markers[g.marker];if(void 0===A)throw new Error(`invalid marker index: ${g.marker}`);g=A[0]}const n=Math.min(Math.max(g,0),_.duration);return{targetTime:n,reachedEnd:n>=_.duration,noOp:n===_.pauseElapsedTime}}function JA(A,e){return{cols:C??A,rows:Q??e}}function YA(A,t=!1){t&&bA("c"),e("reset",{size:JA(A.snapshot.cols,A.snapshot.rows),init:A.snapshot.init,theme:_.recording.theme??null})}function TA(A,e=!0,t=!0){let V=_.segment.events[_.nextEventIndex],n=[];for(;V&&(t?V[0]<=A:V[0]<A);)"o"===V[1]?n.push(V[2]):"r"===V[1]&&(n.length>0&&(bA(n),n=[]),pA(V)),_.lastEventTime=V[0],V=_.segment.events[++_.nextEventIndex];n.length>0&&bA(n),_.pauseElapsedTime=A,e&&(_.effectiveStartAt=null),_.audioElement&&_.audioSeekable&&(_.audioElement.currentTime=A/1e3/g)}async function KA(A,e,t=!1){const V=b(_.recording,A);if(e!==_.positionGeneration)return!1;if(!t&&V===_.segmentIndex&&A>=_.lastEventTime)return TA(A),!0;cA([V-1,V,V+1]);const g=await EA(V,e);return e===_.positionGeneration&&(QA(V,g),YA(g,!0),TA(A),!0)}async function HA(A){const e=_.positionGeneration;if(_.segmentIndex===_.recording.segments.length-1&&void 0===_.segment.events[_.nextEventIndex]){if(!await KA(0,e,!0))return!1}else if(null!==_.effectiveStartAt&&!await KA(_.effectiveStartAt,e))return!1;if(e!==_.positionGeneration)return!1;if(lA(),mA(),_.audioElement)try{return await _.audioElement.play(),IA(S,{reason:A})}catch(A){throw IA(J),A}return BA(S,{reason:A})}function OA(A){return _.audioElement&&_.audioElement.pause(),kA(),void 0!==A&&(_.pauseElapsedTime=A),e("pause"),!0}function xA(){clearTimeout(_.waitingTimeout),_.waitingTimeout=setTimeout((()=>{e("loading")}),1e3)}function ZA(){clearTimeout(_.waitingTimeout),_.waitingTimeout=null}function WA(){clearTimeout(_.loadingTimeout),_.loadingTimeout=null}function $A(){WA(),ZA(),yA()}async function jA(){yA(),_.playCount++;const A=++_.positionGeneration;try{const e=await EA(0,A,(()=>{gA(H,{time:_.duration})}));if(A!==_.positionGeneration)return;QA(0,e),YA(e,!0),_.pauseElapsedTime=0,_.startTime=j(),lA(),_.audioElement&&_.audioSeekable&&(_.audioElement.currentTime=0),z===h||z===w?await IA(O):(_.pauseElapsedTime=null,fA())}catch{}}function zA(){yA(),_.playCount++,_.pauseElapsedTime=_.duration,_.audioElement&&_.audioElement.pause(),cA([_.segmentIndex-1,_.segmentIndex]),e("ended")}function XA(){return _.positionGeneration++,_.segmentCache.clear(),$A(),async function(){clearTimeout(_.waitingTimeout),_.audioElement&&(_.audioElement.removeEventListener("playing",vA),_.audioElement.removeEventListener("waiting",NA),_.audioElement.pause(),_.audioElement.src="",_.audioElement.load(),_.audioElement=void 0),_.audioCtx&&(await _.audioCtx.close(),_.audioCtx=void 0)}()}return{init:function(){return oA(m)},stop:function(){return oA(v)},getDuration:function(){return void 0===_.duration?void 0:_.duration/1e3},getCurrentTime:function(){return MA()/1e3},play:function(){return oA(q)},pause:function(){return oA(M)},seek:LA,step:function(A){return oA(N,{n:A})},mute:function(){if(_.audioElement)return _.audioElement.muted=!0,e("muted",!0),!0},unmute:function(){if(_.audioElement)return _.audioElement.muted=!1,e("muted",!1),!0}}}],["websocket",function({url:A,bufferTime:e,reconnectDelay:t=z,minFrameTime:V},{dispatch:g,logger:n},{audioUrl:r}){let i,o;n=new d(n,"websocket: ");let I,B,s,C=new w,Q=0,a=!1,E=!1,c=!1,l=!1;function u(){let e;i=new WebSocket(A,["v1.alis","v2.asciicast","v3.asciicast","raw"]),i.binaryType="arraybuffer",i.onopen=()=>{e=i.protocol||"raw",n.info("opened"),n.info(`activating ${e} protocol handler`),"v1.alis"===e?i.onmessage=h(O(n)):"v2.asciicast"===e?i.onmessage=h(function(){let A=function(t){const V=JSON.parse(t);if(2!==V.version)throw new Error("not an asciicast v2 stream");return A=e,{time:0,term:{size:{cols:V.width,rows:V.height}}}};function e(A){const e=JSON.parse(A),t=1e3*e[0];if("r"===e[1]){const[A,V]=e[2].split("x");return[t,"r",{cols:parseInt(A,10),rows:parseInt(V,10)}]}return[t,e[1],e[2]]}return function(e){return A(e)}}()):"v3.asciicast"===e?i.onmessage=h(function(){let A=function(e){const V=JSON.parse(e);if(3!==V.version)throw new Error("not an asciicast v3 stream");A=t;const g={size:{cols:V.term.cols,rows:V.term.rows}};if(V.term.theme){const A="string"==typeof V.term.theme.palette?V.term.theme.palette.split(":"):void 0,e=q({foreground:V.term.theme.fg,background:V.term.theme.bg,palette:A});e&&(g.theme=e)}return{time:0,term:g}},e=0;function t(A){const t=JSON.parse(A),[V,g,n]=t;if(e+=1e3*V,"r"===g){const[A,t]=n.split("x");return[e,"r",{cols:parseInt(A,10),rows:parseInt(t,10)}]}return[e,g,n]}return function(e){return A(e)}}()):"raw"===e&&(i.onmessage=h(j())),I=setTimeout((()=>{Q=0}),1e3)},i.onclose=A=>{if(clearTimeout(B),p(),a)return;let V=!1,r="Stream ended";if("v1.alis"===e?(l||A.code>=4e3&&A.code<=4100)&&(V=!0,r=A.reason||r):(c||1e3===A.code||1005===A.code)&&(V=!0),V)n.info("closed"),g("ended",{message:r});else if(1002===A.code)n.debug(`close reason: ${A.reason}`),g("ended",{message:"Err: Player not compatible with the server"});else{clearTimeout(I);const A=t(Q++);n.info(`unexpected close, reconnecting in ${A}...`),g("loading"),setTimeout(u,A)}},E=!1}function h(A){return B=setTimeout(y,5e3),function(e){try{const t=A(e.data);if(o)if(Array.isArray(t))o.pushEvent(t),"x"===t[1]&&(c=!0);else if("string"==typeof t)o.pushText(t);else if("object"!=typeof t||Array.isArray(t)){if(!1===t)y(),l=!0;else if(void 0!==t)throw new Error(`unexpected value from protocol handler: ${t}`)}else D(t);else if("object"!=typeof t||Array.isArray(t)){if(void 0!==t)throw clearTimeout(B),new Error(`unexpected value from protocol handler: ${t}`);clearTimeout(B),B=setTimeout(y,1e3)}else D(t),clearTimeout(B)}catch(A){throw i.close(),A}}}function D({time:A,term:t}){const{size:r,init:i,theme:I}=t,{cols:B,rows:s}=r;n.info(`stream reset (${B}x${s} @${A})`),p(),o=T(e,g,(A=>C.setTime(A)),A,V,n),g("reset",{size:{cols:B,rows:s},init:i,theme:I??null}),C=new f,E=!0,c=!1,l=!1,"number"==typeof A&&C.setTime(A),g("playing")}function y(){p(),E?(n.info("stream ended"),g("offline",{message:"Stream ended"})):(n.info("stream offline"),g("offline",{message:"Stream offline"})),C=new w}function p(){o&&o.stop(),o=null}return{init:()=>{g("metadata",{hasAudio:!!r})},play:()=>(i||(g("play"),u(),r&&(s=new Audio,s.preload="auto",s.crossOrigin="anonymous",s.src=r,s.play())),!0),stop:()=>{a=!0,p(),void 0!==i&&i.close(),s&&s.pause()},mute:function(){if(s)return s.muted=!0,!0},unmute:function(){if(s)return s.muted=!1,!0},getCurrentTime:()=>{const A=C.getTime();return"number"==typeof A?A/1e3:A}}}]]),eA=new Map([["asciicast",G],["typescript",async function(A,{encoding:e}){const t=new TextDecoder(e);let V,g,n=(await A[0].text()).split("\n").filter((A=>A.length>0)).map((A=>A.split(" ")));n[0].length<3&&(n=n.map((A=>["O",A[0],A[1]])));const r=await A[1].arrayBuffer(),i=new Uint8Array(r),o=i.findIndex((A=>10==A))+1,I=t.decode(i.subarray(0,o)).match(/COLUMNS="(\d+)" LINES="(\d+)"/);null!==I&&(V=parseInt(I[1],10),g=parseInt(I[2],10));const B={array:i,cursor:o};let s=B;if(void 0!==A[2]){const e=await A[2].arrayBuffer();s={array:new Uint8Array(e),cursor:o}}const C=[];let Q=0;for(const A of n)if(Q+=1e3*parseFloat(A[1]),"O"===A[0]){const e=parseInt(A[2],10),V=B.array.subarray(B.cursor,B.cursor+e),g=t.decode(V);C.push([Q,"o",g]),B.cursor+=e}else if("I"===A[0]){const e=parseInt(A[2],10),V=s.array.subarray(s.cursor,s.cursor+e),g=t.decode(V);C.push([Q,"i",g]),s.cursor+=e}else if("S"===A[0]&&"SIGWINCH"===A[2]){const e=parseInt(A[4].slice(5),10),t=parseInt(A[3].slice(5),10);C.push([Q,"r",`${e}x${t}`])}else"H"===A[0]&&"COLUMNS"===A[2]?V=parseInt(A[3],10):"H"===A[0]&&"LINES"===A[2]&&(g=parseInt(A[3],10));return V=V??80,g=g??24,{cols:V,rows:g,events:C}}],["ttyrec",async function(A,{encoding:e}){const t=new TextDecoder(e),V=await A.arrayBuffer(),g=new Uint8Array(V),n=X(g),r=n.time,i=t.decode(n.data).match(/\x1b\[8;(\d+);(\d+)t/),o=[];let I=80,B=24;null!==i&&(I=parseInt(i[2],10),B=parseInt(i[1],10));let s=0,C=X(g);for(;void 0!==C;){const A=1e3*(C.time-r),e=t.decode(C.data);o.push([A,"o",e]),s+=C.len,C=X(g.subarray(s))}return{cols:I,rows:B,events:o}}]]);const tA=Symbol("solid-track"),VA={equals:(A,e)=>A===e};let gA=RA;const nA=1,rA=2,iA={owned:null,cleanups:null,context:null,owner:null};var oA=null;let IA=null,BA=null,sA=null,CA=null,QA=0;function aA(A,e){const t=BA,V=oA,g=0===A.length,n=void 0===e?V:e,r=g?iA:{owned:null,cleanups:null,context:n?n.context:null,owner:n},i=g?A:()=>A((()=>fA((()=>GA(r)))));oA=r,BA=null;try{return MA(i,!0)}finally{BA=t,oA=V}}function EA(A,e){const t={value:A,observers:null,observerSlots:null,comparator:(e=e?Object.assign({},VA,e):VA).equals||void 0};return[kA.bind(t),A=>("function"==typeof A&&(A=A(t.value)),mA(t,A))]}function cA(A,e,t){qA(LA(A,e,!1,nA))}function lA(A,e,t){gA=NA;const V=LA(A,e,!1,nA);V.user=!0,CA?CA.push(V):qA(V)}function uA(A,e,t){t=t?Object.assign({},VA,t):VA;const V=LA(A,e,!0,0);return V.observers=null,V.observerSlots=null,V.comparator=t.equals||void 0,qA(V),kA.bind(V)}function dA(A){return MA(A,!1)}function fA(A){if(null===BA)return A();const e=BA;BA=null;try{return A()}finally{BA=e}}function wA(A){lA((()=>fA(A)))}function hA(A){return null===oA||(null===oA.cleanups?oA.cleanups=[A]:oA.cleanups.push(A)),A}function DA(A){const e=BA,t=oA;return Promise.resolve().then((()=>{BA=e,oA=t,MA(A,!1),BA=oA=null}))}const[yA]=EA(!1);function pA(A){const e=uA(A),t=uA((()=>SA(e())));return t.toArray=()=>{const A=t();return Array.isArray(A)?A:null!=A?[A]:[]},t}function kA(){if(this.sources&&this.state)if(this.state===nA)qA(this);else{const A=sA;sA=null,MA((()=>vA(this)),!1),sA=A}if(BA){const A=this.observers?this.observers.length:0;BA.sources?(BA.sources.push(this),BA.sourceSlots.push(A)):(BA.sources=[this],BA.sourceSlots=[A]),this.observers?(this.observers.push(BA),this.observerSlots.push(BA.sources.length-1)):(this.observers=[BA],this.observerSlots=[BA.sources.length-1])}return this.value}function mA(A,e,t){let V=A.value;return A.comparator&&A.comparator(V,e)||(A.value=e,A.observers&&A.observers.length&&MA((()=>{for(let e=0;e<A.observers.length;e+=1){const t=A.observers[e],V=IA&&IA.running;V&&IA.disposed.has(t),(V?t.tState:t.state)||(t.pure?sA.push(t):CA.push(t),t.observers&&bA(t)),V||(t.state=nA)}if(sA.length>1e6)throw sA=[],new Error}),!1)),e}function qA(A){if(!A.fn)return;GA(A);const e=QA;!function(A,e,t){let V;const g=oA,n=BA;BA=oA=A;try{V=A.fn(e)}catch(e){return A.pure&&(A.state=nA,A.owned&&A.owned.forEach(GA),A.owned=null),A.updatedAt=t+1,UA(e)}finally{BA=n,oA=g}(!A.updatedAt||A.updatedAt<=t)&&(null!=A.updatedAt&&"observers"in A?mA(A,V):A.value=V,A.updatedAt=t)}(A,A.value,e)}function LA(A,e,t,V=nA,g){const n={fn:A,state:V,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:oA,context:oA?oA.context:null,pure:t};return null===oA||oA!==iA&&(oA.owned?oA.owned.push(n):oA.owned=[n]),n}function FA(A){if(0===A.state)return;if(A.state===rA)return vA(A);if(A.suspense&&fA(A.suspense.inFallback))return A.suspense.effects.push(A);const e=[A];for(;(A=A.owner)&&(!A.updatedAt||A.updatedAt<QA);)A.state&&e.push(A);for(let t=e.length-1;t>=0;t--)if((A=e[t]).state===nA)qA(A);else if(A.state===rA){const t=sA;sA=null,MA((()=>vA(A,e[0])),!1),sA=t}}function MA(A,e){if(sA)return A();let t=!1;e||(sA=[]),CA?t=!0:CA=[],QA++;try{const e=A();return function(A){sA&&(RA(sA),sA=null);if(A)return;const e=CA;CA=null,e.length&&MA((()=>gA(e)),!1)}(t),e}catch(A){t||(CA=null),sA=null,UA(A)}}function RA(A){for(let e=0;e<A.length;e++)FA(A[e])}function NA(A){let e,t=0;for(e=0;e<A.length;e++){const V=A[e];V.user?A[t++]=V:FA(V)}for(e=0;e<t;e++)FA(A[e])}function vA(A,e){A.state=0;for(let t=0;t<A.sources.length;t+=1){const V=A.sources[t];if(V.sources){const A=V.state;A===nA?V!==e&&(!V.updatedAt||V.updatedAt<QA)&&FA(V):A===rA&&vA(V,e)}}}function bA(A){for(let e=0;e<A.observers.length;e+=1){const t=A.observers[e];t.state||(t.state=rA,t.pure?sA.push(t):CA.push(t),t.observers&&bA(t))}}function GA(A){let e;if(A.sources)for(;A.sources.length;){const e=A.sources.pop(),t=A.sourceSlots.pop(),V=e.observers;if(V&&V.length){const A=V.pop(),g=e.observerSlots.pop();t<V.length&&(A.sourceSlots[g]=t,V[t]=A,e.observerSlots[t]=g)}}if(A.tOwned){for(e=A.tOwned.length-1;e>=0;e--)GA(A.tOwned[e]);delete A.tOwned}if(A.owned){for(e=A.owned.length-1;e>=0;e--)GA(A.owned[e]);A.owned=null}if(A.cleanups){for(e=A.cleanups.length-1;e>=0;e--)A.cleanups[e]();A.cleanups=null}A.state=0}function UA(A,e=oA){const t=function(A){return A instanceof Error?A:new Error("string"==typeof A?A:"Unknown error",{cause:A})}(A);throw t}function SA(A){if("function"==typeof A&&!A.length)return SA(A());if(Array.isArray(A)){const e=[];for(let t=0;t<A.length;t++){const V=SA(A[t]);Array.isArray(V)?e.push.apply(e,V):e.push(V)}return e}return A}const JA=Symbol("fallback");function YA(A){for(let e=0;e<A.length;e++)A[e]()}function TA(A,e){return fA((()=>A(e||{})))}const KA=A=>`Stale read from <${A}>.`;function HA(A){const e="fallback"in A&&{fallback:()=>A.fallback};return uA(function(A,e,t={}){let V=[],g=[],n=[],r=0,i=e.length>1?[]:null;return hA((()=>YA(n))),()=>{let o,I,B=A()||[],s=B.length;return B[tA],fA((()=>{let A,e,Q,a,E,c,l,u,d;if(0===s)0!==r&&(YA(n),n=[],V=[],g=[],r=0,i&&(i=[])),t.fallback&&(V=[JA],g[0]=aA((A=>(n[0]=A,t.fallback()))),r=1);else if(0===r){for(g=new Array(s),I=0;I<s;I++)V[I]=B[I],g[I]=aA(C);r=s}else{for(Q=new Array(s),a=new Array(s),i&&(E=new Array(s)),c=0,l=Math.min(r,s);c<l&&V[c]===B[c];c++);for(l=r-1,u=s-1;l>=c&&u>=c&&V[l]===B[u];l--,u--)Q[u]=g[l],a[u]=n[l],i&&(E[u]=i[l]);for(A=new Map,e=new Array(u+1),I=u;I>=c;I--)d=B[I],o=A.get(d),e[I]=void 0===o?-1:o,A.set(d,I);for(o=c;o<=l;o++)d=V[o],I=A.get(d),void 0!==I&&-1!==I?(Q[I]=g[o],a[I]=n[o],i&&(E[I]=i[o]),I=e[I],A.set(d,I)):n[o]();for(I=c;I<s;I++)I in Q?(g[I]=Q[I],n[I]=a[I],i&&(i[I]=E[I],i[I](I))):g[I]=aA(C);g=g.slice(0,r=s),V=B.slice(0)}return g}));function C(A){if(n[I]=A,i){const[A,t]=EA(I);return i[I]=t,e(B[I],A)}return e(B[I])}}}((()=>A.each),A.children,e||void 0))}function OA(A){const e=A.keyed,t=uA((()=>A.when),void 0,void 0),V=e?t:uA(t,void 0,{equals:(A,e)=>!A==!e});return uA((()=>{const g=V();if(g){const n=A.children;return"function"==typeof n&&n.length>0?fA((()=>n(e?g:()=>{if(!fA(V))throw KA("Show");return t()}))):n}return A.fallback}),void 0,void 0)}function xA(A){const e=pA((()=>A.children)),t=uA((()=>{const A=e(),t=Array.isArray(A)?A:[A];let V=()=>{};for(let A=0;A<t.length;A++){const e=A,g=t[A],n=V,r=uA((()=>n()?void 0:g.when),void 0,void 0),i=g.keyed?r:uA(r,void 0,{equals:(A,e)=>!A==!e});V=()=>n()||(i()?[e,r,g]:void 0)}return V}));return uA((()=>{const e=t()();if(!e)return A.fallback;const[V,g,n]=e,r=n.children;return"function"==typeof r&&r.length>0?fA((()=>r(n.keyed?g():()=>{if(fA(t)()?.[0]!==V)throw KA("Match");return g()}))):r}),void 0,void 0)}function ZA(A){return A}const WA="_$DX_DELEGATE";function $A(A,e,t,V){let g;const n=()=>{const e=document.createElement("template");return e.innerHTML=A,e.content.firstChild},r=e?()=>fA((()=>document.importNode(g||(g=n()),!0))):()=>(g||(g=n())).cloneNode(!0);return r.cloneNode=r,r}function jA(A,e=window.document){const t=e[WA]||(e[WA]=new Set);for(let V=0,g=A.length;V<g;V++){const g=A[V];t.has(g)||(t.add(g),e.addEventListener(g,te))}}function zA(A,e,t){null==t?A.removeAttribute(e):A.setAttribute(e,t)}function XA(A,e){null==e?A.removeAttribute("class"):A.className=e}function PA(A,e,t,V){Array.isArray(t)?(A[`$$${e}`]=t[0],A[`$$${e}Data`]=t[1]):A[`$$${e}`]=t}function _A(A,e,t){if(!e)return t?zA(A,"style"):e;const V=A.style;if("string"==typeof e)return V.cssText=e;let g,n;for(n in"string"==typeof t&&(V.cssText=t=void 0),t||(t={}),e||(e={}),t)null==e[n]&&V.removeProperty(n),delete t[n];for(n in e)g=e[n],g!==t[n]&&(V.setProperty(n,g),t[n]=g);return t}function Ae(A,e,t){return fA((()=>A(e,t)))}function ee(A,e,t,V){if(void 0===t||V||(V=[]),"function"!=typeof e)return Ve(A,e,V,t);cA((V=>Ve(A,e(),V,t)),V)}function te(A){let e=A.target;const t=`$$${A.type}`,V=A.target,g=A.currentTarget,n=e=>Object.defineProperty(A,"target",{configurable:!0,value:e}),r=()=>{const V=e[t];if(V&&!e.disabled){const g=e[`${t}Data`];if(void 0!==g?V.call(e,g,A):V.call(e,A),A.cancelBubble)return}return e.host&&"string"!=typeof e.host&&!e.host._$host&&e.contains(A.target)&&n(e.host),!0},i=()=>{for(;r()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(A,"currentTarget",{configurable:!0,get:()=>e||document}),A.composedPath){const t=A.composedPath();n(t[0]);for(let A=0;A<t.length-2&&(e=t[A],r());A++){if(e._$host){e=e._$host,i();break}if(e.parentNode===g)break}}else i();n(V)}function Ve(A,e,t,V,g){for(;"function"==typeof t;)t=t();if(e===t)return t;const n=typeof e,r=void 0!==V;if(A=r&&t[0]&&t[0].parentNode||A,"string"===n||"number"===n){if("number"===n&&(e=e.toString())===t)return t;if(r){let g=t[0];g&&3===g.nodeType?g.data!==e&&(g.data=e):g=document.createTextNode(e),t=re(A,t,V,g)}else t=""!==t&&"string"==typeof t?A.firstChild.data=e:A.textContent=e}else if(null==e||"boolean"===n)t=re(A,t,V);else{if("function"===n)return cA((()=>{let g=e();for(;"function"==typeof g;)g=g();t=Ve(A,g,t,V)})),()=>t;if(Array.isArray(e)){const n=[],i=t&&Array.isArray(t);if(ge(n,e,t,g))return cA((()=>t=Ve(A,n,t,V,!0))),()=>t;if(0===n.length){if(t=re(A,t,V),r)return t}else i?0===t.length?ne(A,n,V):function(A,e,t){let V=t.length,g=e.length,n=V,r=0,i=0,o=e[g-1].nextSibling,I=null;for(;r<g||i<n;)if(e[r]!==t[i]){for(;e[g-1]===t[n-1];)g--,n--;if(g===r){const e=n<V?i?t[i-1].nextSibling:t[n-i]:o;for(;i<n;)A.insertBefore(t[i++],e)}else if(n===i)for(;r<g;)I&&I.has(e[r])||e[r].remove(),r++;else if(e[r]===t[n-1]&&t[i]===e[g-1]){const V=e[--g].nextSibling;A.insertBefore(t[i++],e[r++].nextSibling),A.insertBefore(t[--n],V),e[g]=t[n]}else{if(!I){I=new Map;let A=i;for(;A<n;)I.set(t[A],A++)}const V=I.get(e[r]);if(null!=V)if(i<V&&V<n){let o,B=r,s=1;for(;++B<g&&B<n&&null!=(o=I.get(e[B]))&&o===V+s;)s++;if(s>V-i){const g=e[r];for(;i<V;)A.insertBefore(t[i++],g)}else A.replaceChild(t[i++],e[r++])}else r++;else e[r++].remove()}}else r++,i++}(A,t,n):(t&&re(A),ne(A,n));t=n}else if(e.nodeType){if(Array.isArray(t)){if(r)return t=re(A,t,V,e);re(A,t,null,e)}else null!=t&&""!==t&&A.firstChild?A.replaceChild(e,A.firstChild):A.appendChild(e);t=e}}return t}function ge(A,e,t,V){let g=!1;for(let n=0,r=e.length;n<r;n++){let r,i=e[n],o=t&&t[A.length];if(null==i||!0===i||!1===i);else if("object"==(r=typeof i)&&i.nodeType)A.push(i);else if(Array.isArray(i))g=ge(A,i,o)||g;else if("function"===r)if(V){for(;"function"==typeof i;)i=i();g=ge(A,Array.isArray(i)?i:[i],Array.isArray(o)?o:[o])||g}else A.push(i),g=!0;else{const e=String(i);o&&3===o.nodeType&&o.data===e?A.push(o):A.push(document.createTextNode(e))}}return g}function ne(A,e,t=null){for(let V=0,g=e.length;V<g;V++)A.insertBefore(e[V],t)}function re(A,e,t,V){if(void 0===t)return A.textContent="";const g=V||document.createTextNode("");if(e.length){let V=!1;for(let n=e.length-1;n>=0;n--){const r=e[n];if(g!==r){const e=r.parentNode===A;V||n?e&&r.remove():e?A.replaceChild(g,r):A.insertBefore(g,t)}else V=!0}}else A.insertBefore(g,t);return[g]}const ie=()=>{},oe=(A,e)=>e();function Ie(A,e){const t=fA(A),V=t?[t]:[],{onEnter:g=oe,onExit:n=oe}=e,[r,i]=EA(e.appear?[]:V),[o]=[yA,DA];let I,B=!1;function s(A,e){if(!A)return e&&e();B=!0,n(A,(()=>{dA((()=>{B=!1,i((e=>e.filter((e=>e!==A)))),e&&e()}))}))}function C(A){const e=I;if(!e)return A&&A();I=void 0,i((A=>[e,...A])),g(e,A??ie)}const Q="out-in"===e.mode?A=>B||s(A,C):"in-out"===e.mode?A=>C((()=>s(A))):A=>{s(A),C()};var a,E;return a=e=>{const t=A();return fA(o)?(o(),e):(t!==e&&(I=t,dA((()=>fA((()=>Q(e)))))),t)},E=e.appear?void 0:t,qA(LA(a,E,!0,nA)),r}const Be=A=>A instanceof Element;function se(A,e){if(e(A))return A;if("function"==typeof A&&!A.length)return se(A(),e);if(Array.isArray(A))for(const t of A){const A=se(t,e);if(A)return A}return null}function Ce(A,e=Be,t=Be){const V=uA(A);return uA((()=>se(V(),e)))}function Qe(A){requestAnimationFrame((()=>requestAnimationFrame(A)))}var ae={inout:"in-out",outin:"out-in"},Ee=A=>{const e=function(A){return uA((()=>{const e=A.name||"s";return{enterActive:(A.enterActiveClass||e+"-enter-active").split(" "),enter:(A.enterClass||e+"-enter").split(" "),enterTo:(A.enterToClass||e+"-enter-to").split(" "),exitActive:(A.exitActiveClass||e+"-exit-active").split(" "),exit:(A.exitClass||e+"-exit").split(" "),exitTo:(A.exitToClass||e+"-exit-to").split(" "),move:(A.moveClass||e+"-move").split(" ")}}))}(A);return Ie(Ce((()=>A.children)),{mode:ae[A.mode],appear:A.appear,onEnter(t,V){!function(A,e,t,V){const{onBeforeEnter:g,onEnter:n,onAfterEnter:r}=e;function i(e){e&&e.target!==t||(V?.(),t.removeEventListener("transitionend",i),t.removeEventListener("animationend",i),t.classList.remove(...A.enterActive),t.classList.remove(...A.enterTo),r?.(t))}g?.(t),t.classList.add(...A.enter),t.classList.add(...A.enterActive),queueMicrotask((()=>{if(!t.parentNode)return V?.();n?.(t,(()=>i()))})),Qe((()=>{t.classList.remove(...A.enter),t.classList.add(...A.enterTo),(!n||n.length<2)&&(t.addEventListener("transitionend",i),t.addEventListener("animationend",i))}))}(e(),A,t,V)},onExit(t,V){!function(A,e,t,V){const{onBeforeExit:g,onExit:n,onAfterExit:r}=e;if(!t.parentNode)return V?.();function i(e){e&&e.target!==t||(V?.(),t.removeEventListener("transitionend",i),t.removeEventListener("animationend",i),t.classList.remove(...A.exitActive),t.classList.remove(...A.exitTo),r?.(t))}g?.(t),t.classList.add(...A.exit),t.classList.add(...A.exitActive),n?.(t,(()=>i())),Qe((()=>{t.classList.remove(...A.exit),t.classList.add(...A.exitTo),(!n||n.length<2)&&(t.addEventListener("transitionend",i),t.addEventListener("animationend",i))}))}(e(),A,t,V)}})};let ce;function le(A){qe===me.length&&me.push(me.length+1);const e=qe;return qe=me[e],me[e]=A,e}function ue(A){const e=typeof A;if("number"==e||"boolean"==e||null==A)return`${A}`;if("string"==e)return`"${A}"`;if("symbol"==e){const e=A.description;return null==e?"Symbol":`Symbol(${e})`}if("function"==e){const e=A.name;return"string"==typeof e&&e.length>0?`Function(${e})`:"Function"}if(Array.isArray(A)){const e=A.length;let t="[";e>0&&(t+=ue(A[0]));for(let V=1;V<e;V++)t+=", "+ue(A[V]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(A));let V;if(!(t&&t.length>1))return toString.call(A);if(V=t[1],"Object"==V)try{return"Object("+JSON.stringify(A)+")"}catch(A){return"Object"}return A instanceof Error?`${A.name}: ${A.message}\n${A.stack}`:V}function de(A,e){return A>>>=0,function(){null!==De&&0!==De.byteLength||(De=new Uint32Array(ce.memory.buffer));return De}().subarray(A/4,A/4+e)}let fe=null;function we(){return(null===fe||!0===fe.buffer.detached||void 0===fe.buffer.detached&&fe.buffer!==ce.memory.buffer)&&(fe=new DataView(ce.memory.buffer)),fe}function he(A,e){return function(A,e){Ne+=e,Ne>=Re&&(Me=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Me.decode(),Ne=e);return Me.decode(pe().subarray(A,A+e))}(A>>>=0,e)}let De=null;let ye=null;function pe(){return null!==ye&&0!==ye.byteLength||(ye=new Uint8Array(ce.memory.buffer)),ye}function ke(A){return me[A]}let me=new Array(128).fill(void 0);me.push(void 0,null,!0,!1);let qe=me.length;function Le(A,e,t){if(void 0===t){const t=ve.encode(A),V=e(t.length,1)>>>0;return pe().subarray(V,V+t.length).set(t),be=t.length,V}let V=A.length,g=e(V,1)>>>0;const n=pe();let r=0;for(;r<V;r++){const e=A.charCodeAt(r);if(e>127)break;n[g+r]=e}if(r!==V){0!==r&&(A=A.slice(r)),g=t(g,V,V=r+3*A.length,1)>>>0;const e=pe().subarray(g+r,g+V);r+=ve.encodeInto(A,e).written,g=t(g,V,r,1)>>>0}return be=r,g}function Fe(A){const e=ke(A);return function(A){A<132||(me[A]=qe,qe=A)}(A),e}let Me=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Me.decode();const Re=2146435072;let Ne=0;const ve=new TextEncoder;"encodeInto"in ve||(ve.encodeInto=function(A,e){const t=ve.encode(A);return e.set(t),{read:A.length,written:t.length}});let be=0;const Ge="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((A=>ce.__wbg_vt_free(A>>>0,1)));let Ue=class A{static __wrap(e){e>>>=0;const t=Object.create(A.prototype);return t.__wbg_ptr=e,Ge.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const A=this.__wbg_ptr;return this.__wbg_ptr=0,Ge.unregister(this),A}free(){const A=this.__destroy_into_raw();ce.__wbg_vt_free(A,0)}feed(A){const e=Le(A,ce.__wbindgen_export,ce.__wbindgen_export2),t=be;return Fe(ce.vt_feed(this.__wbg_ptr,e,t))}resize(A,e){return Fe(ce.vt_resize(this.__wbg_ptr,A,e))}getSize(){try{const V=ce.__wbindgen_add_to_stack_pointer(-16);ce.vt_getSize(V,this.__wbg_ptr);var A=we().getInt32(V+0,!0),e=we().getInt32(V+4,!0),t=de(A,e).slice();return ce.__wbindgen_export3(A,4*e,4),t}finally{ce.__wbindgen_add_to_stack_pointer(16)}}getLine(A,e){return Fe(ce.vt_getLine(this.__wbg_ptr,A,e))}getCursor(){return Fe(ce.vt_getCursor(this.__wbg_ptr))}};Symbol.dispose&&(Ue.prototype[Symbol.dispose]=Ue.prototype.free);const Se=new Set(["basic","cors","default"]);function Je(){const A={wbg:{}};return A.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6=function(A,e){const t=Le(ue(ke(e)),ce.__wbindgen_export,ce.__wbindgen_export2),V=be;we().setInt32(A+4,V,!0),we().setInt32(A+0,t,!0)},A.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e=function(A,e){throw new Error(he(A,e))},A.wbg.__wbg_new_13317ed16189158e=function(){return le(new Array)},A.wbg.__wbg_new_4ceb6a766bf78b04=function(){return le(new Object)},A.wbg.__wbg_set_3f1d0b984ed272ed=function(A,e,t){ke(A)[Fe(e)]=Fe(t)},A.wbg.__wbg_set_8b6a9a61e98a8881=function(A,e,t){ke(A)[e>>>0]=Fe(t)},A.wbg.__wbindgen_cast_2241b6af4c4b2941=function(A,e){return le(he(A,e))},A.wbg.__wbindgen_cast_4625c577ab2ec9ee=function(A){return le(BigInt.asUintN(64,A))},A.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(A){return le(A)},A.wbg.__wbindgen_object_clone_ref=function(A){return le(ke(A))},A.wbg.__wbindgen_object_drop_ref=function(A){Fe(A)},A}function Ye(A,e){return ce=A.exports,Te.__wbindgen_wasm_module=e,fe=null,De=null,ye=null,ce}async function Te(A){if(void 0!==ce)return ce;void 0!==A&&(Object.getPrototypeOf(A)===Object.prototype?({module_or_path:A}=A):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const e=Je();("string"==typeof A||"function"==typeof Request&&A instanceof Request||"function"==typeof URL&&A instanceof URL)&&(A=fetch(A));const{instance:t,module:V}=await async function(A,e){if("function"==typeof Response&&A instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,e)}catch(e){if(!A.ok||!Se.has(A.type)||"application/wasm"===A.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}const t=await A.arrayBuffer();return await WebAssembly.instantiate(t,e)}{const t=await WebAssembly.instantiate(A,e);return t instanceof WebAssembly.Instance?{instance:t,module:A}:t}}(await A,e);return Ye(t,V)}var Ke=Object.freeze({__proto__:null,Vt:Ue,create:function(A,e,t,V){const g=ce.create(A,e,t,V);return Ue.__wrap(g)},default:Te,initSync:function(A){if(void 0!==ce)return ce;void 0!==A&&(Object.getPrototypeOf(A)===Object.prototype?({module:A}=A):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const e=Je();return A instanceof WebAssembly.Module||(A=new WebAssembly.Module(A)),Ye(new WebAssembly.Instance(A,e),A)}});const He=[62,0,0,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,0,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];function Oe(A){return He[A-43]}var xe=function(A){let e,t=A.endsWith("==")?2:A.endsWith("=")?1:0,V=A.length,g=new Uint8Array(V/4*3);for(let t=0,n=0;t<V;t+=4,n+=3)e=Oe(A.charCodeAt(t))<<18|Oe(A.charCodeAt(t+1))<<12|Oe(A.charCodeAt(t+2))<<6|Oe(A.charCodeAt(t+3)),g[n]=e>>16,g[n+1]=e>>8&255,g[n+2]=255&e;return g.subarray(0,g.length-t)}("AGFzbQEAAAABnAEXYAJ/fwBgA39/fwBgAX8AYAF/AX9gBX9/f39/AGACf38Bf2ADf39/AX9gBH9/f38AYAR/f39/AX9gBn9/f39/fwBgAAF/YAV/f39/fwF/YAF8AX9gAX4Bf2AHf39/f39/fwBgA39/fgF/YAR/f39+AGADf35/AGAGf39/f39/AX9gBX9/fH9/AGAFf39+f38AYAV/f31/fwBgAAAC6wIKA3diZxpfX3diZ19uZXdfMTMzMTdlZDE2MTg5MTU4ZQAKA3diZxpfX3diZ19zZXRfOGI2YTlhNjFlOThhODg4MQABA3diZxpfX3diaW5kZ2VuX29iamVjdF9kcm9wX3JlZgACA3diZxtfX3diaW5kZ2VuX29iamVjdF9jbG9uZV9yZWYAAwN3YmcaX193Ymdfc2V0XzNmMWQwYjk4NGVkMjcyZWQAAQN3YmcaX193YmdfbmV3XzRjZWI2YTc2NmJmNzhiMDQACgN3YmcnX193YmdfX193YmluZGdlbl90aHJvd19kZDI0NDE3ZWQzNmZjNDZlAAADd2JnIF9fd2JpbmRnZW5fY2FzdF9kNmNkMTliODE1NjBmZDZlAAwDd2JnIF9fd2JpbmRnZW5fY2FzdF80NjI1YzU3N2FiMmVjOWVlAA0Dd2JnIF9fd2JpbmRnZW5fY2FzdF8yMjQxYjZhZjRjNGIyOTQxAAUDpgGkAQYABgEAAgELBQEGBQYBCA4EBgkEAAkBAAgBCQQBAQcBAgEHAwAGBQQAAQkHBwAAAQEAAAAPAAMBAQEAAwMCBQAHAAAAAQIDAwECAQAABAIABgEQAgAEAAEACQQCAAEAAAAAAgcFBREBBQIDBAEECAAAAAAAAQIAAgEAAAAIAQgSBBMLFBUDBwUCAgIBAgAAAgIAAQACAAAAAQEBAgMWAAACAAACBAUBcAElJQUDAQARBgkBfwFBgIDAAAsHxAEMBm1lbW9yeQIADV9fd2JnX3Z0X2ZyZWUANwZjcmVhdGUAGAd2dF9mZWVkAAoJdnRfcmVzaXplAC8KdnRfZ2V0U2l6ZQBeCnZ0X2dldExpbmUADAx2dF9nZXRDdXJzb3IALRFfX3diaW5kZ2VuX2V4cG9ydABuEl9fd2JpbmRnZW5fZXhwb3J0MgB4H19fd2JpbmRnZW5fYWRkX3RvX3N0YWNrX3BvaW50ZXIApgESX193YmluZGdlbl9leHBvcnQzAJwBCTsBAEEBCyQSBwgJEhISEowBiQE0igGMARaQAYoBigGOAYsBjQGsAakBqgESqwGfARJUrQFphQESVBYSEgwBIArQtAKkAa01ARB/IwBBoAFrIgQkACAEQTBqIAAQVSAEKAIwIQMgBEEoaiIAIAI2AgQgACABNgIAIANB3ABqIQsgA0HQAGohDCADQTBqIQ8gA0EkaiEQIANBDGohESADQbIBaiEHIANBxAFqIQkgBCgCKCINIAQoAiwiDmohEiANIQIDQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAIgEkYNAAJ/IAIsAAAiAEEATgRAIABB/wFxIQAgAkEBagwBCyACLQABQT9xIQUgAEEfcSEBIABBX00EQCABQQZ0IAVyIQAgAkECagwBCyACLQACQT9xIAVBBnRyIQUgAEFwSQRAIAUgAUEMdHIhACACQQNqDAELIAFBEnRBgIDwAHEgAi0AA0E/cSAFQQZ0cnIiAEGAgMQARg0BIAJBBGoLIQJBwQAgACAAQZ8BSxshAQJAAkACQCADLQDMBSIGDgUABAQEAQQLIAFBIGtB4ABJDQEMAwsgAUEwa0EMTw0CDCALIAQgADYCQCAEQSE6ADwMAgsgBEHwAGoiASADQeAAaigCACADQeQAaigCABAgIARBCGogAxAhIAQgBCkDCDcCfCAEIAQoAnQgBCgCeBBSIAQoAgQhACAEKAIAQQFxRQRAIAEQbCAOBEAgDSAOEDsLIAQoAjQgBCgCOBChASAEQaABaiQAIAAPCyAEIAA2AkwgBEHMAGpB3MLAABA8AAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUH/AXEiBUEbRwRAIAVB2wBGDQEgBg4NAwQFBgcOCA4ODgIOCQ4LIANBAToAzAUgCRAqDFQLIAYODQEjAwQFDQYNDQ0ADQcNCyABQSBrQd8ASQ1SDAsLAkAgAUEYSQ0AIAFBGUYNACABQfwBcUEcRw0LCyAEQTxqIAAQPwwyCyABQfABcUEgRg0GIAFBMGtBIEkNCCABQdEAa0EHSQ0IAkAgBUHZAGsOBQkJAAkfAAsgAUHgAGtBH08NCQwICyABQTBrQc8ATw0IIANBADoAzAUgBEE8aiAJIAAQKwwwCyABQS9LBEAgAUE7RyABQTpPcUUEQCADQQQ6AMwFDE8LIAFBQGpBP0kNBAsgAUH8AXFBPEcNByADIAA2AsQBIANBBDoAzAUMTgsgAUFAakE/SQ0EIAFB/AFxQTxHDQYMSwsgAUFAakE/Tw0FDEkLIAFBIGtB4ABJDUsCQCAFQRhrDgMHBgcACyAFQZkBa0ECSQ0GIAVB0ABGDUsgBUEHRg1IDAULIANBADoAzAUgBEE8aiAJIAAQDQwrCyADIAA2AsQBIANBAjoAzAUMSQsgA0EAOgDMBSAEQTxqIAkgABANDCkLIANBADoAzAUgBEE8aiAJIAAQKwwoCwJAIAVBGGsOAwIBAgALIAVBmQFrQQJJDQEgBUHQAEcNACAGQQFrDgoVAwgJCiQLDA0ORgsgAUHwAXEiCEGAAUYNACABQZEBa0EGSw0BCyADQQA6AMwFIARBPGogABA/DCULIAhBIEcNASAGQQRHDQEMPwsgAUHwAXEhCAwBCyAGQQFrDgoBAAMEBQ4GBwgJDgsgCEEgRw0BDDsLIAFBGE8NCgwLCwJAIAFBGEkNACABQRlGDQAgAUH8AXFBHEcNDAsgBEE8aiAAED8MHwsCQAJAIAFBGEkNACABQRlGDQAgAUH8AXFBHEcNAQsgBEE8aiAAED8MHwsgAUHwAXFBIEYNOQwKCwJAIAFBGEkNACABQRlGDQAgAUH8AXFBHEcNCgsgBEE8aiAAED8MHQsgAUFAakE/TwRAIAFB8AFxIghBIEYNNyAIQTBGDToMCQsgA0EAOgDMBSAEQTxqIAkgABANDBwLIAFB/AFxQTxGDQMgAUHwAXFBIEYNLyABQUBqQT9PDQcMBAsgAUEvTQ0GIAFBOkkNOCABQTtGDTggAUFAakE+TQ0DDAYLIAFBQGpBP0kNAgwFCyABQRhJDTcgAUEZRg03IAFB/AFxQRxGDTcMBAsgAyAANgLEASADQQg6AMwFDDYLIANBCjoAzAUMNQsgBUHYAGsiCEEHTUEAQQEgCHRBwQFxGw0FIAVBGUYNACABQfwBcUEcRw0BCyAEQTxqIAAQPwwUCyAFQZABaw4QAQUFBQUFBQUDBQUCLwADAwQLIANBDDoAzAUMMQsgA0EHOgDMBSAJECoMMAsgA0EDOgDMBSAJECoMLwsgA0ENOgDMBQwuCwJAIAVBOmsOAgQCAAsgBUEZRg0CCyAGQQNrDgcJLAMKBQsHLAsgBkEDaw4HCCsrCQUKBysLIAZBA2sOBwcqAggqCQYqCyAGQQNrDgcGKSkHCQgFKQsgAUEYSQ0AIAFB/AFxQRxHDSgLIARBPGogABA/DAgLIAFBMGtBCk8NJgsgA0EIOgDMBQwkCyABQfABcUEgRg0fCyABQfABcUEwRw0jDAMLIAFBOkcNIgwgCwJAIAFBGEkNACABQRlGDQAgAUH8AXFBHEcNIgsgBEE8aiAAED8MAgsgAUHwAXFBIEYNFSABQTpGDQAgAUH8AXFBPEcNIAsgA0ELOgDMBQwfCyAELQA8IgBBMkYNHwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEEBaw4xAgMEBQYHCAkKCwwNDg8lECYREhMUFRYXGBkaGxwdHh8AISIjJCUmJygpKissLTAxMgELIAQoAkAhAAwfCyADQX5BfyADKAJoIAMoApwBRhsQeww9CyAELwE+IQAgBCADKAJoNgJMIARBADoAfCAEIANB1ABqKAIAIgE2AnAgBCABIAMoAlhBAnRqNgJ0QQEgACAAQQFNGyEAIAQgBEHMAGo2AngDQCAAQQFrIgAEQCAEQfAAahBGDQEMNgsLIARB8ABqEEYiAEUNNCAAKAIADDULIANBASAELwE+IgAgAEEBTRtBAWsiACADKAKcASIBQQFrIAAgAUkbNgJoDDsLIANBASAELwE+IgAgAEEBTRsQLgw6CyADQQEgBC8BPiIAIABBAU0bEFYgA0EANgJoDDkLIANBASAELwE+IgAgAEEBTRsQWSADQQA2AmgMOAsgA0EANgJoDDcLAkAgBC0APUEBaw4CJgATCyADQQA2AlgMNgsgA0EBIAQvAT4iACAAQQFNGyIAQX9zQQAgAGsgAygCaCADKAKcAUYbEHsMNQsgA0EBIAQvAT4iACAAQQFNGxBWDDQLIANBASAELwE+IgAgAEEBTRsQewwzCyADQQEgBC8BQCIAIABBAU0bQQFrIgAgAygCnAEiAUEBayAAIAFJGzYCaCADQQEgBC8BPiIAIABBAU0bQQFrEEkMMgsgA0EBIAQvAT4iACAAQQFNGxBZDDELIAMoAmgiACADKAKcASIBTwRAIAMgAUEBayIANgJoC0EBIAQvAT4iASABQQFNGyIBIAMoAhggAGsiBSABIAVJGyEBIAMgAygCbEGwzcAAEFoiBSgCBCAFKAIIIABBqNnAABCGASgCBEUEQCAFKAIEIAUoAgggAEEBa0G42cAAEIYBIgZCoICAgBA3AgAgBiAHKQEANwEIIAZBEGogB0EIai8BADsBAAsgBEEYaiAFKAIEIAUoAgggAEHI2cAAEHUgBCgCGCAEKAIcIAEQfiAFKAIEIAUoAgggAEHY2cAAEIYBIgAoAgRFBEAgAEKggICAEDcCACAAIAcpAQA3AQggAEEQaiAHQQhqLwEAOwEACyAEQRBqIAUoAgQgBSgCCCIAIAAgAWtB6NnAABB1IAQoAhAhACAEKAIUIARB+ABqIAdBCGovAQA7AQAgBCAHKQEANwNwQRRsIQEDQCABBEAgAEKggICAEDcCACAAIAQpA3A3AgggAEEQaiAEQfgAai8BADsBACABQRRrIQEgAEEUaiEADAELCyAFQQA6AAwgA0HgAGooAgAgA0HkAGooAgAgAygCbBCHAQwwCyADKAKcASEFIAMoAqABIQZBACEBA0AgASAGRg0wQQAhAANAIAAgBUYEQCADQeAAaigCACADQeQAaigCACABEIcBIAFBAWohAQwCBSAEQQA7AHggBEECOgB0IARBAjoAcCADIAAgAUHFACAEQfAAahARGiAAQQFqIQAMAQsACwALAAsgBCgCSCEBIAQoAkQhACAEIAQoAkA2AnggBCAANgJwIAQgAUEBdCIBIABqIgU2AnwDQCABBEACQAJAAkACQAJAAkACQAJAAkACQCAALwEAIgZBAWsOBwExMTExAgMACyAGQZcIaw4DBAUGAwsgA0EAOgDBAQwHCyADQgA3AmggA0EAOgC+AQwGCyADQQA6AL8BDAULIANBADoAcAwECyADEGUMAgsgAxB/DAILIAMQZSADEH8LIAMQDwsgAEECaiEAIAFBAmshAQwBCwsgBCAFNgJ0IARB8ABqEJ4BDC4LIAQoAkghASAEKAJEIQAgBCAEKAJANgJ4IAQgADYCcCAEIAFBAXQiASAAaiIGNgJ8A0AgAQRAAkACQAJAAkACQAJAAkACQAJAIAAvAQAiBUEBaw4HAS8vLy8CAwALIAVBlwhrDgMGBAUDCyADQQE6AMEBDAYLIANBAToAvgEgA0EANgJoIAMgAygCqAE2AmwMBQsgA0EBOgC/AQwECyADQQE6AHAMAwsgAxBdDAILIAMQXQsjAEEwayIFJAAgAy0AvAFFBEAgA0EBOgC8ASADQfQAaiADQYgBahBqIAMgA0EkahBrIAVBDGoiCCADKAKcASADKAKgASIKQQFBACADQbIBahAcIANBDGoQlAEgAyAIQSQQFCIIKAJgIAgoAmRBACAKEEoLIAVBMGokACADEA8LIABBAmohACABQQJrIQEMAQsLIAQgBjYCdCAEQfAAahCeAQwtCwJAQQEgBC8BPiIAIABBAU0bQQFrIgAgBC8BQCIBIAMoAqABIgUgARtBAWsiAUkgASAFSXFFBEAgAygCqAEhAAwBCyADIAE2AqwBIAMgADYCqAELIANBADYCaCADIABBACADLQC+ARs2AmwMLAsgA0EBOgBwIANBADsAvQEgA0EAOwG6ASADQQI6ALYBIANBAjoAsgEgA0EAOwGwASADQgA3AqQBIANBgICACDYChAEgA0ECOgCAASADQQI6AHwgA0IANwJ0IAMgAygCoAFBAWs2AqwBDCsLIAMoAqABIAMoAqwBIgBBAWogACADKAJsIgBJGyEBIAMgACABQQEgBC8BPiIFIAVBAU0bIAcQGiADQeAAaigCACADQeQAaigCACAAIAEQSgwqCyADIAMoAmggAygCbCIAQQBBASAELwE+IgEgAUEBTRsgBxAfIANB4ABqKAIAIANB5ABqKAIAIAAQhwEMKQsCQAJAAkAgBC0APUEBaw4DAQIrAAsgAyADKAJoIAMoAmwiAEEBIAQgBxAfIANB4ABqKAIAIANB5ABqKAIAIAAgAygCoAEQSgwqCyADIAMoAmggAygCbCIAQQIgBCAHEB8gA0HgAGooAgAgA0HkAGooAgBBACAAQQFqEEoMKQsgA0EAIAMoAhwgBxAoIANB4ABqKAIAIANB5ABqKAIAQQAgAygCoAEQSgwoCyADIAMoAmggAygCbCIAIAQtAD1BBHIgBCAHEB8gA0HgAGooAgAgA0HkAGooAgAgABCHAQwnCyADIAQtAD06ALEBDCYLIAMgBC0APToAsAEMJQsgA0EBEC4MJAsjAEEQayIFJAACQAJAAkAgAygCaCIIRQ0AIAggAygCnAFPDQAgBUEIaiADKAJUIgAgAygCWCIBIAgQNSAFKAIIQQFHDQAgBSgCDCIGIAFLDQEgA0HQAGoiCigCACABRgR/IApBvOLAABBiIAMoAlQFIAALIAZBAnRqIQAgASAGSwRAIABBBGogACABIAZrQQJ0EBALIAAgCDYCACADIAFBAWo2AlgLIAVBEGokAAwBCyAGIAFBvOLAABBDAAsMIwsgAygCaCIAIAMoApwBIgVGBEAgAyAAQQFrIgA2AmgLIAMgACADKAJsIgFBASAELwE+IgYgBkEBTRsiBiAFIABrIgUgBSAGSxsiBSAHEB0gACAAIAVqIgUgACAFSxshBQNAIAAgBUcEQCADIAAgAUEgIAcQERogAEEBaiEADAELCyADQeAAaigCACADQeQAaigCACABEIcBDCILIAMoAqABIAMoAqwBIgBBAWogACADKAJsIgBJGyEBIAMgACABQQEgBC8BPiIFIAVBAU0bIAcQMSADQeAAaigCACADQeQAaigCACAAIAEQSgwhCyADEFMgAy0AwAFBAUcNICADQQA2AmgMIAsgAxBTIANBADYCaAwfCyADIAAQHgweCyADKAJoIgVFDR0gBC8BPiEAIAMoAmwhASAEQSBqIAMQZiAEKAIkIgYgAU0NEkEBIAAgAEEBTRshACAEKAIgIAFBBHRqIgFBBGooAgAgAUEIaigCACAFQQFrQbjlwAAQhgEoAgAhAQNAIABFDR4gAyABEB4gAEEBayEADAALAAsgAygCbCIAIAMoAqgBRg0SIABFDRwgAyAAQQFrEEkMHAsgBEHMAGoiACADKAKcASIFIAMoAqABIgEgAygCSCADKAJMQQAQHCAEQfAAaiIGIAUgAUEBQQBBABAcIBEQlAEgAyAAQSQQFCEAIA8QlAEgECAGQSQQFBogAEEAOgC8ASAEQZQBaiIGIAUQMiAAKAJQIABB1ABqKAIAQQQQlQEgDEEIaiAGQQhqIgUoAgA2AgAgDCAEKQKUATcCACAAQQA7AboBIABBAjoAtgEgAEECOgCyASAAQQE6AHAgAEIANwJoIABBADsBsAEgAEGAgAQ2AL0BIAAgAUEBazYCrAEgAEIANwKkASAAQYCAgAg2ApgBIABBAjoAlAEgAEECOgCQASAAQQA2AowBIABCgICACDcChAEgAEECOgCAASAAQQI6AHwgAEIANwJ0IAYgARBMIAAoAlwgAEHgAGooAgBBARCVASALQQhqIAUoAgA2AgAgCyAEKQKUATcCAAwbCyAEKAJIIQEgBCgCRCEAIAQgBCgCQDYCeCAEIAA2AnAgBCABQQF0IgEgAGoiBTYCfANAIAEEQAJAIAAvAQBBFEcEQCADQQA6AL0BDAELIANBADoAwAELIABBAmohACABQQJrIQEMAQsLIAQgBTYCdCAEQfAAahCeAQwaCyADEH8MGQsgAxBdDBgLIANBASAELwE+IgAgAEEBTRsQfAwXCyAEKAJIQQVsIQEgAy0AuwEhBSAEKAJAIAQoAkQiCiEAA0ACQCABRQ0AIAAoAAEhBgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAAtAABBAWsOEgECAwQFBgcICQoLDA0ODxAREwALQQAhBSADQQA7AboBIANBAjoAtgEgA0ECOgCyAQwRCyADQQE6ALoBDBALIANBAjoAugEMDwsgAyAFQQFyIgU6ALsBDA4LIAMgBUECciIFOgC7AQwNCyADIAVBCHIiBToAuwEMDAsgAyAFQRByIgU6ALsBDAsLIAMgBUEEciIFOgC7AQwKCyADQQA6ALoBDAkLIAMgBUH+AXEiBToAuwEMCAsgAyAFQf0BcSIFOgC7AQwHCyADIAVB9wFxIgU6ALsBDAYLIAMgBUHvAXEiBToAuwEMBQsgAyAFQfsBcSIFOgC7AQwECyAHIAY2AQAMAwsgB0ECOgAADAILIAMgBjYBtgEMAQsgA0ECOgC2AQsgAEEFaiEAIAFBBWshAQwBCwsgCkEFEJUBDBYLIANBADYCpAEMFQsgBCgCSCEBIAQoAkQhACAEIAQoAkA2AnggBCAANgJwIAQgAUEBdCIBIABqIgU2AnwDQCABBEACQCAALwEAQRRHBEAgA0EBOgC9AQwBCyADQQE6AMABCyAAQQJqIQAgAUECayEBDAELCyAEIAU2AnQgBEHwAGoQngEMFAsgA0EBNgKkAQwTCyADQQEgBC8BPiIAIABBAU0bEH0MEgsgBC0APQ0BCyMAQRBrIgAkACAAQQhqIAMoAlQiBiADKAJYIgEgAygCaBA1AkACQCAAKAIIRQRAIAAoAgwiBSABTw0BIAYgBUECdGoiBiAGQQRqIAEgBUF/c2pBAnQQECADIAFBAWs2AlgLIABBEGokAAwBCyMAQTBrIgAkACAAIAE2AgQgACAFNgIAIABBAzYCDCAAQcjFwAA2AgggAEICNwIUIAAgAEEEaq1CgICAgIABhDcDKCAAIACtQoCAgICAAYQ3AyAgACAAQSBqNgIQIABBCGpBzOLAABCAAQALDBALIANBADYCWAwPCyADQQEgBC8BPiIAIABBAU0bQQFrEEkMDgsgA0EBIAQvAT4iACAAQQFNGxBWDA0LIAMtAMIBQQFHDQwgAyAELwE+IgAgAygCnAEgABsgBC8BQCIAIAMoAqABIAAbECMMDAsgAyAANgLEASADQQk6AMwFDAoLIAEgBkG45cAAEEIACyADQQEQfAwJCwALQQALIgAgAygCnAEiAUEBayAAIAFJGzYCaAwGCyAJIAA2AgAMBAsgAyAANgLEASADQQU6AMwFDAMLIANBADoAzAUMAgsgA0EGOgDMBQwBCyAJKAKEBCEBAkACQAJAAkACQCAAQTprDgIBAAILIAlBHyABQQFqIgAgAEEgRhs2AoQEDAMLIAFBIEkNASABQSBB5NvAABBCAAsgAUEgTwRAIAFBIEH028AAEEIACyAJIAFBBHRqQQRqIgUoAgAiAUEGSQRAIAUgAUEBdGpBBGoiASABLwEAQQpsIABBMGtB/wFxajsBAAwCCyABQQZBtOHAABBCAAsgCSABQQR0akEEaiIBKAIAQQFqIQAgAUEFIAAgAEEFTxs2AgALCyAEQTI6ADwMAAsAC7oUAQZ/IwBBwAJrIgIkACABKAIEIQMDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMEQCACQbgCaiABKAIAEGAgAigCuAIhAyACKAK8AkEBaw4GAQUEBQIDBQsgAEESOgAADAsLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMvAQAiAw4eAAECAwQFDgYOBw4ODg4ODg4ODg4OCAgJCgsODA4NDgsgAkGoAWpBASABKAIAIAEoAgRB1NzAABB3IAEgAikDqAE3AgAgAEEAOgAADBgLIAJBsAFqQQEgASgCACABKAIEQeTcwAAQdyABIAIpA7ABNwIAIABBAToAAAwXCyACQbgBakEBIAEoAgAgASgCBEH03MAAEHcgASACKQO4ATcCACAAQQI6AAAMFgsgAkHAAWpBASABKAIAIAEoAgRBhN3AABB3IAEgAikDwAE3AgAgAEEDOgAADBULIAJByAFqQQEgASgCACABKAIEQZTdwAAQdyABIAIpA8gBNwIAIABBBDoAAAwUCyACQdABakEBIAEoAgAgASgCBEGk3cAAEHcgASACKQPQATcCACAAQQU6AAAMEwsgAkHYAWpBASABKAIAIAEoAgRBtN3AABB3IAEgAikD2AE3AgAgAEEGOgAADBILIAJB4AFqQQEgASgCACABKAIEQcTdwAAQdyABIAIpA+ABNwIAIABBBzoAAAwRCyACQegBakEBIAEoAgAgASgCBEHU3cAAEHcgASACKQPoATcCACAAQQg6AAAMEAsgAkHwAWpBASABKAIAIAEoAgRB5N3AABB3IAEgAikD8AE3AgAgAEEJOgAADA8LIAJB+AFqQQEgASgCACABKAIEQfTdwAAQdyABIAIpA/gBNwIAIABBCjoAAAwOCyACQYACakEBIAEoAgAgASgCBEGE3sAAEHcgASACKQOAAjcCACAAQQs6AAAMDQsgAkGIAmpBASABKAIAIAEoAgRBlN7AABB3IAEgAikDiAI3AgAgAEEMOgAADAwLIAJBkAJqQQEgASgCACABKAIEQaTewAAQdyABIAIpA5ACNwIAIABBDToAAAwLCwJAAkAgA0Eea0H//wNxQQhPBEAgA0Emaw4CAQgCCyACQQhqQQEgASgCACABKAIEQcTgwAAQdyABIAIpAwg3AgAgACADQR5rOgACIABBDjsAAAwMCwJAIAEoAgQiA0ECTwRAIAJBmAFqIAEoAgBBEGoQYCACKAKYASIDDQEgASgCBCEDCyACQegAakEBIAEoAgAgA0G03sAAEHcgAigCbCEDIAIoAmghBAwNCwJAAkACQCACKAKcAUEBRw0AIAMvAQBBAmsOBAEAAAIACyACQfAAakEBIAEoAgAgASgCBEGE38AAEHcgAigCdCEDIAIoAnAhBAwOCyABKAIAIQMgASgCBCIEQQVPBEAgAy0AJCEFIAMvATQhBiADLwFEIQcgAkGAAWpBBSADIARBxN7AABB3IAEgAikDgAE3AgAgAEEOOgAAIAAgBSAGQQh0QYD+A3EgB0EQdHJyQQh0QQFyNgABDA0LIAJB+ABqQQIgAyAEQdTewAAQdyACKAJ8IQMgAigCeCEEDA0LIAEoAgAhAyABKAIEIgRBA08EQCADLQAkIQUgAkGQAWpBAyADIARB5N7AABB3IAEgAikDkAE3AgAgACAFOgACIABBDjsAAAwMCyACQYgBakECIAMgBEH03sAAEHcgAigCjAEhAyACKAKIASEEDAwLAkACQCADQfj/A3FBKEcEQCADQTBrDgIBCQILIAJBEGpBASABKAIAIAEoAgRBtODAABB3IAEgAikDEDcCACAAIANBKGs6AAIgAEEQOwAADAwLAkAgASgCBCIDQQJPBEAgAkHYAGogASgCAEEQahBgIAIoAlgiAw0BIAEoAgQhAwsgAkEoakEBIAEoAgAgA0Gk38AAEHcgAigCLCEDIAIoAighBAwNCwJAAkACQCACKAJcQQFHDQAgAy8BAEECaw4EAQAAAgALIAJBMGpBASABKAIAIAEoAgRB9N/AABB3IAIoAjQhAyACKAIwIQQMDgsgASgCACEDIAEoAgQiBEEFTwRAIAMtACQhBSADLwE0IQYgAy8BRCEHIAJBQGtBBSADIARBtN/AABB3IAEgAikDQDcCACAAQRA6AAAgACAFIAZBCHRBgP4DcSAHQRB0cnJBCHRBAXI2AAEMDQsgAkE4akECIAMgBEHE38AAEHcgAigCPCEDIAIoAjghBAwNCyABKAIAIQMgASgCBCIEQQNPBEAgAy0AJCEFIAJB0ABqQQMgAyAEQdTfwAAQdyABIAIpA1A3AgAgACAFOgACIABBEDsAAAwMCyACQcgAakECIAMgBEHk38AAEHcgAigCTCEDIAIoAkghBAwMCyADQdoAa0H//wNxQQhJDQcgA0HkAGtB//8DcUEITw0DIAJBIGpBASABKAIAIAEoAgRBlODAABB3IAEgAikDIDcCACAAIANB3ABrOgACIABBEDsAAAwKCyADLwEAIgRBMEcEQCAEQSZHDQMgAy8BAkECRw0DQQghBEEGIQVBBCEGDAkLIAMvAQJBAkcNAkEIIQRBBiEFQQQhBgwHCyADLwEAIgRBMEcEQCAEQSZHDQIgAy8BAkECRw0CQQohBEEIIQVBBiEGDAgLIAMvAQJBAkcNAUEKIQRBCCEFQQYhBgwGCyADLwEAIgRBMEcEQCAEQSZHDQEgAy8BAkEFRw0BIAMtAAQhAyACQagCakEBIAEoAgAgASgCBEH04MAAEHcgASACKQOoAjcCACAAIAM6AAIgAEEOOwAADAgLIAMvAQJBBUYNAQsgAkEBIAEoAgAgASgCBEGU4cAAEHcgAigCBCEDIAIoAgAhBAwHCyADLQAEIQMgAkGwAmpBASABKAIAIAEoAgRBhOHAABB3IAEgAikDsAI3AgAgACADOgACIABBEDsAAAwFCyACQaABakEBIAEoAgAgASgCBEGU38AAEHcgASACKQOgATcCACAAQQ86AAAMBAsgAkHgAGpBASABKAIAIAEoAgRBhODAABB3IAEgAikDYDcCACAAQRE6AAAMAwsgAkEYakEBIAEoAgAgASgCBEGk4MAAEHcgASACKQMYNwIAIAAgA0HSAGs6AAIgAEEOOwAADAILIAMgBmotAAAhBiADIAVqLwEAIQUgAyAEai8BACEDIAJBoAJqQQEgASgCACABKAIEQeTgwAAQdyABIAIpA6ACNwIAIABBEDoAACAAIAYgBUEIdEGA/gNxIANBEHRyckEIdEEBcjYAAQwBCyACQZgCakEBIAEoAgAgASgCBEHU4MAAEHcgASACKQOYAjcCACADIAZqLQAAIQEgAyAFai8BACEFIAMgBGovAQAhAyAAQQ46AAAgACABIAVBCHRBgP4DcSADQRB0cnJBCHRBAXI2AAELIAJBwAJqJAAPCyABIAQ2AgAgASADNgIEDAALAAuXEwIkfwF+IwBB8ABrIgMkACADQTRqIAAQVSADKAI0IgVBADYCiAYgBUEANgL8BSAFQQA2AvAFIAVBADYC5AUgBUEANgLYBSAFLQBwQQFxBEAgBSgCbCABRiACQQBHcSEhIAUoAmghBgsgA0EoaiAFEGYgAygCLCIAIAFLBEAgBUGABmohHSAFQfwFaiEUIAVB9AVqIR4gBUHwBWohFSAFQegFaiEfIAVB3AVqIRYgBUHQBWohGCADKAIoIAFBBHRqIgEoAgQhACAAIAEoAghBFGxqISIgA0HWAGohIyADQdAAaiIBQQRyISQgBkH//wNxISUgAUEJaiEmQQUhAUEFIQkDQAJAAkACQCAAIgggIkcEQCAIQRRqIQAgCCgCBCIORQ0EIAgoAgAhBiAIQQhqISACQAJAIAMCfwJAICEgJSAPQf//A3EiGUZxIAhBEWoiEC0AAEEQcUEEdkcEQEEBICAoAAAiBEH/AXFBAkYNAhogBEEBcQ0BIARBgP4DcUEDcgwCCyADQQUgCCgADCICQYB+cUEEQQMgAkEBcRtyIAJB/wFxQQJGGyIENgJsQQAhCiAIKAAIIgdB/wFxQQJHDQJBACECDAcLIARBgH5xQQRyCyIENgJsQQIhAiAIKAAMIgdB/wFxQQJHDQFBACEKDAULIAdBCHYhCiAHQQFxDQNBAyECIAdBgPADcQ0EIAUtAIwGQQFHDQQMAgsgB0EIdiEKIAdBAXENAkEDIQIgB0GA8ANxDQMgBS0AjAYNAQwDCyAJQf8BcUEFRwRAIBggEa0gCa1C/wGDQiCGIBqtQiiGhIRB/MLAABBwCyABQf8BcUEFRwRAIAMgCzsAVyADQdkAaiALQRB2OgAAIAMgDDoAWiADIAE6AFYgAyANOwFUIAMgFzYCUCAWIANB0ABqQYzDwAAQWwsgBSgCiAYhASAFKAKEBiECIAUoAvwFIQQgBSgC+AUhCCAFKALwBSEUIAUoAuwFIRUgBSgC5AUhBiAFKALgBSEHIAUoAtgFIQkgBSgC1AUhBSADQQA2AmwgA0EgaiADQewAahAFIgBB38HAAEECIAUgCRAZAkACfyADKAIgBEAgAygCJAwBCyADQRhqIANB7ABqIABB4cHAAEEEIAcgBhAZIAMoAhgEQCADKAIcDAELIANBEGogA0HsAGogAEHlwcAAQQogAiABEBkgAygCEARAIAMoAhQMAQsgA0EIaiADQewAaiAAQe/BwABBDiAVIBQQGSADKAIIBEAgAygCDAwBCyADIANB7ABqIABB/cHAAEEOIAggBBAZIAMoAgBFDQEgAygCBAshASAAEJoBIAMgATYCbCADQewAakGcw8AAEDwACyADKAI4IAMoAjwQoQEgA0HwAGokACAADwsgCkEIciAKIAgtABBBAUYbIQoMAQtBBCECCyADIApBCHRBgP4DcSAHQYCAfHFyIgogAnIiBzYCQCADQQAgA0HsAGoiEiAEQf8BcUEFRiIEGzYCWCADIBGtIAmtQv8Bg0IghiAarUIohoSEIic3A1ACQCAJQf8BcUEFRgRAQQUhCSAEDQEgDkEQdCAZciERIBIQUCIJQQh2IRoMAQsgBEUEQCAkIANB7ABqIgQQSEUEQCAYICdBvMPAABBwIA5BEHQgGXIhESAEEFAiCUEIdiEaDAILIA5BEHQgEWohEQwBCyAYICdBrMPAABBwQQUhCQtBiMHAACAGEG8hBAJAAkACQAJAAn8CQCAGQaDLAEYNACAGQYPKAEYNACAGQf3//wBxQfnKAEYNACAEDQBBlMHAACAGEG8NAEHYwMAAIAYQbyEEAkAgBkGPzQBGDQAgBA0AQeTAwAAgBhBvDQBB8MDAACAGEG8NAEH8wMAAIAYQb0UNAwsgA0FAaxBQIRIgEC0AAEECdEH8AHFBAiAIQRBqLQAAIgRBAUYgBEECRhtyQf8BcSETIB4oAgAiGyAUKAIAIgdGBEAjAEEQayIEJAAgBEEIaiAeIBtBAUEEQRAQJCAEKAIIIhtBgYCAgHhHBEAgBCgCDBogG0HMw8AAEJ0BAAsgBEEQaiQACyAFKAL4BSAHQQR0aiIEIBM6AAwgBCASNgIIIAQgBjYCBCAEIA87AQAgFAwBCyADQUBrEFAhEiAfKAIAIhMgFSgCACIHRgRAIwBBEGsiBCQAIARBCGogHyATQQFBBEEMECQgBCgCCCITQYGAgIB4RwRAIAQoAgwaIBNB3MPAABCdAQALIARBEGokAAsgBSgC7AUgB0EMbGoiBCASNgIIIAQgBjYCBCAEIA87AQAgFQsgB0EBajYCAEEgIQYMAQsgBkGAAUkNACAOQf//A3FBAUsNASAGQf//A00EQCAGQQN2QcCAwABqLQAAIAZBB3F2QQFxRQ0BDAILQczAwAAgBhBvDQELIAMgCzsAVyAmIAtBEHYiBDoAACADICA2AlwgAyAMOgBaIAMgDTsBVCADIBc2AlAgAyABOgBWAkAgAUH/AXFBBUYNAAJAIANBQGsgIxBIBEAgEC0AAEECdEH8AHFBAiAIQRBqLQAAIgdBAUYgB0ECRhtyQb8BcSAMc0G/AXFFDQELAkAgBkEgRw0AIAxBCHFBA3YgEC0AACIHQQJxQQF2Rw0AIAxBEHFBBHYgB0EEcUECdkYNAQsgAyALOwBnIANB4ABqIgdBCWogBDoAACADIAw6AGogAyABOgBmIAMgDTsBZCADIBc2AmAgFiAHQezDwAAQWwwBCyANQQFqIQ0gASECDAILIBxBEHQgGXIhFyAQLQAAQQJ0QfwAcUECIAhBEGotAAAiAUEBRiABQQJGG3JB/wFxIQwgCkEIdiELQQEhDQwBCyABQf8BcUEFRwRAIAMgCzsASyADQcQAaiICQQlqIAtBEHY6AAAgAyAMOgBOIAMgAToASiADIA07AUggAyAXNgJEIBYgAkH8w8AAEFsLIBAtAAAhAiAIQRBqLQAAIQEgAyAHNgFWIANBATsBVCADIBw7AVIgAyAPOwFQIAMgAkECdEH8AHFBAiABQQFGIAFBAkYbcjoAWiAWIANB0ABqQYzEwAAQW0EFIQILIAUoAogGIgQgBSgCgAZGBEAjAEEQayIBJAAgAUEIaiAdIB0oAgBBAUEEQQQQJCABKAIIIghBgYCAgHhHBEAgASgCDBogCEGcxMAAEJ0BAAsgAUEQaiQACyAcQQFqIRwgBSgChAYgBEECdGogBjYCACAFIARBAWo2AogGIA4gD2ohDyACIQEMAAsACyABIABBmOXAABBCAAu5DgEDfyMAQeAAayIDJAAgAUEEaiEEAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABKAIAIgVBgIDEAEYEQCACQUBqDjYBAgMEBQYHCAkKCwwNDjc3Dzc3EBE3NxITNxQ3Nzc3NxUWFzcYGRobHDc3Nx0eNzc3Nx8gMiE3CwJAIAJB7ABrDgU1Nzc3MwALIAJB6ABGDTMMNgsgAEEdOgAAIAAgAS8BCDsBAgw2CyAAQQw6AAAgACABLwEIOwECDDULIABBCToAACAAIAEvAQg7AQIMNAsgAEEKOgAAIAAgAS8BCDsBAgwzCyAAQQg6AAAgACABLwEIOwECDDILIABBBDoAACAAIAEvAQg7AQIMMQsgAEEFOgAAIAAgAS8BCDsBAgwwCyAAQQI6AAAgACABLwEIOwECDC8LIABBCzoAACAAIAEvARg7AQQgACABLwEIOwECDC4LIABBAzoAACAAIAEvAQg7AQIMLQsgAS8BCA4EFxgZGhYLIAEvAQgOAxscHRoLIABBHjoAACAAIAEvAQg7AQIMKgsgAEEVOgAAIAAgAS8BCDsBAgwpCyAAQQ06AAAgACABLwEIOwECDCgLIABBLToAACAAIAEvAQg7AQIMJwsgAEEoOgAAIAAgAS8BCDsBAgwmCyABLwEIDgYZGBoYGBsYCyAAQRY6AAAgACABLwEIOwECDCQLIABBAToAACAAIAEvAQg7AQIMIwsgAEECOgAAIAAgAS8BCDsBAgwiCyAAQQo6AAAgACABLwEIOwECDCELIABBIjoAACAAIAEvAQg7AQIMIAsgAEEvOgAAIAAgAS8BCDsBAgwfCyAAQTA6AAAgACABLwEIOwECDB4LIABBCzoAACAAIAEvARg7AQQgACABLwEIOwECDB0LIAEvAQgOBBQTExUTCyADIAQgASgChARBhNzAABBtIANBQGsiASADKAIAIgIgAiADKAIEQQR0ahAmIANBO2ogAUEIaigCADYAACADIAMpAkA3ADMgAEErOgAAIAAgAykAMDcAASAAQQhqIANBN2opAAA3AAAMGwsgA0EIaiAEIAEoAoQEQZTcwAAQbSADQUBrIgEgAygCCCICIAIgAygCDEEEdGoQJiADQTtqIAFBCGooAgA2AAAgAyADKQJANwAzIABBJToAACAAIAMpADA3AAEgAEEIaiADQTdqKQAANwAADBoLIANBGGogBCABKAKEBEGk3MAAEG0gAyADKQMYNwJMIANB1gBqIANBzABqEAsCfyADLQBWQRJGBEBBACEBQQAhBEEBDAELIANBEGpBBEEBQQVBlMjAABBXIANB2gBqLQAAIQEgAygCECECIAMoAhQiBCADKABWNgAAIARBBGogAToAACADQQE2AjggAyAENgI0IAMgAjYCMCADIAMpAkw3AkBBBSECQQEhAQNAIANB2wBqIANBQGsQCyADLQBbQRJGRQRAIAMoAjAgAUYEQCADQTBqIAFBAUEBQQUQZCADKAI0IQQLIAIgBGoiBSADKABbNgAAIAVBBGogA0HfAGotAAA6AAAgAyABQQFqIgE2AjggAkEFaiECDAELCyADKAIwIQQgAygCNAshAiAAIAE2AgwgACACNgIIIAAgBDYCBCAAQSk6AAAMGQsgAEETOgAAIAAgAS8BGDsBBCAAIAEvAQg7AQIMGAsgAEEnOgAADBcLIABBJjoAAAwWCyAAQTI6AAAMFQsgAEEXOwEADBQLIABBlwI7AQAMEwsgAEGXBDsBAAwSCyAAQZcGOwEADBELIABBMjoAAAwQCyAAQRg7AQAMDwsgAEGYAjsBAAwOCyAAQZgEOwEADA0LIABBMjoAAAwMCyAAQQc7AQAMCwsgAEGHAjsBAAwKCyAAQYcEOwEADAkLIABBMjoAAAwICyAAQS47AQAMBwsgAEGuAjsBAAwGCyABLwEIQQhGDQMgAEEyOgAADAULIAVBIUcNAyAAQRQ6AAAMBAsgBUE/Rw0CIANBIGogBCABKAKEBEG03MAAEG0gA0FAayIBIAMoAiAiAiACIAMoAiRBBHRqECcgA0E7aiABQQhqKAIANgAAIAMgAykCQDcAMyAAQRI6AAAgACADKQAwNwABIABBCGogA0E3aikAADcAAAwDCyAFQT9HDQEgA0EoaiAEIAEoAoQEQcTcwAAQbSADQUBrIgEgAygCKCICIAIgAygCLEEEdGoQJyADQTtqIAFBCGooAgA2AAAgAyADKQJANwAzIABBEDoAACAAIAMpADA3AAEgAEEIaiADQTdqKQAANwAADAILIABBMToAACAAIAEvARg7AQQgACABLwEoOwECDAELIABBMjoAAAsgA0HgAGokAAvaCwIPfwJ+IwBB0ABrIgIkACABQQRqIQwgAkFAayENIAJBJWohDiACQRxqIQ8gASgCJCEFIAEoAhQhECABKAIQIQMCQAJAAn8CQANAIAEoAgAhBiABQYCAgIB4NgIAIAEoAgQhCwJAAkACQAJAAkAgBkGAgICAeEcEQCABKQIIIREgCyEHDAELAkAgAyAQRgRAQYCAgIB4IQYMAQsgASADQRBqIgg2AhAgAykCCCERIAMoAgQhByADKAIAIQYgCCEDC0GAgICAeCALEJgBIAZBgICAgHhGDQELIAIgBzYCDCACIAY2AgggAiARNwIQIBFCIIghEkF/IAUgEaciBEcgBCAFSxtB/wFxDgICAwELQYCAgIB4IAcQmAEgAEGAgICAeDYCACABQYCAgIB4NgIADAcLAkAgEqdBAXENACAFIAQgByAEEDBrIgMgAyAFSRsiAyAESw0AIAIgAzYCECADIQQLAn9BgICAgHggBCAFTQ0AGgJAAkAgByAEIAVBuNrAABCGASgCBEUEQCACQThqIgMgAkEIaiIIIAVBAWsQOSACQTBqIANBCGooAgA2AgAgAiACKQI4NwMoIAItABQhBCADQRBqIAIoAgwgAigCECIHIAdBAWtB2NrAABCGASIHQRBqLwEAOwEAIAJCoICAgBA3AjggAiAHKQIINwJAIAggA0Ho2sAAEE4gAiAEOgA0IAItABRBAXFFDQEMAgsgAkE4aiIDIAJBCGogBRA5IAJBMGogA0EIaigCADYCACACIAIpAjg3AyggAiACLQAUIgM6ADQgAw0BCyACQShqEIEBCyACKAIwBEAgAkFAayACQTRqKAIANgIAIAJBAToAFCACIAIpAiw3AzggAigCKAwBCyACKAIoIAIoAixBFBCVAUGAgICAeAshA0GAgICAeCALEJgBIAEgAzYCACAMIAIpAzg3AgAgDEEIaiACQUBrKAIANgIAIABBCGogAkEQaikCADcCACAAIAIpAgg3AgAMBgsgACARNwIIIAAgBzYCBCAAIAY2AgAMBQsCQCADIBBHBEAgASADQRBqIgg2AhAgAygCACIGQYCAgIB4Rw0BCyACQQA7AEAgAkECOgA8IAJBAjoAOCACQQhqIgEgBSACQThqEDogACACKQIINwIAIAJBADoAFCAAQQhqIAFBCGopAgA3AgAMBQsgA0EMaigCACEJIA8gAykCBDcCACAPQQhqIAk2AgAgAiAGNgIYIAUgBGsiCUUNASASp0EBcUUEQCACQQA7AEAgAkECOgA8IAJBAjoAOCACQQhqIAUgAkE4ahA6DAILIAItACRFBEAgAkEYahCBAQsgAigCHCEDIAIoAiAiCiAJTQRAIAJBCGoiBCADIAoQdgJAIAItACQiBg0AIAJBADoAFCACKAIQIAVPDQAgAkEAOwBAIAJBAjoAPCACQQI6ADggBCAFIAJBOGoQOgsgAigCGCADQRQQlQEgBkUNBEGAgICAeCALEJgBIAFBCGogAkEQaikCADcCACABIAIpAgg3AgBBgICAgHggAhCYASAIIQMMAQsLIAMgCiAJQfjZwAAQhgEoAgRFBEAgDUEIaiAHIAQgBEEBa0GI2sAAEIYBIghBEGovAQA7AQAgDSAIKQIINwIAIAJCoICAgBA3AjggAkEIaiACQThqQZjawAAQTiAJQQFrIQkLIAkgCk0EQCACQQhqIAMgCRB2IAIoAhghBiADIAogCRB+IAZBgICAgHhGDQMgCiAKIAlrIgggCCAKSxshBCACLQAkDAILIAkgCkGo2sAAEKIBAAsgAkEqaiAOQQJqLQAAOgAAIAIgDi8AADsBKCACKAIgIQQgAigCHCEDIAItACQLIQhBgICAgHggCxCYASABIAg6AAwgASAENgIIIAEgAzYCBCABIAY2AgAgASACLwEoOwANIAFBD2ogAkEqai0AADoAAAsgACACKQIINwIAIABBCGogAkEQaikCADcCAAsgAkHQAGokAAvjCgIQfwF+IwBBkAFrIgIkACAAKAJsIgUgACgCHCIGayIBQQAgASAAKAIUIgcgBmsgBWpNGyENIAUgB2ohAyAHQQR0IgEgACgCECIKaiEPIAAoAhghDCAAKAJoIQ4gACgCoAEhCyAAKAKcASEIIAohBANAAkAgAyAGRg0AIAFFDQAgCSAMakEAIAQtAAwiEBshCSADQQFrIQMgAUEQayEBIARBEGohBCANIBBBAXNqIQ0MAQsLIAggDEcEQEEAIQUgAEEANgIUIAIgCDYCOCACQQA2AjQgAiAHNgIwIAIgAEEMaiIMNgIsIAIgDzYCKCACIAo2AiQgAkGAgICAeDYCFCACQcgAaiACQRRqIgEQDgJ/IAIoAkhBgICAgHhGBEAgARCWAUEEIQRBAAwBCyACQQhqQQRBBEEQQZTIwAAQVyACQdAAaikCACERIAIoAgghASACKAIMIgQgAikCSDcCACAEQQhqIBE3AgAgAkEBNgJEIAIgBDYCQCACIAE2AjwgAkHYAGogAkEUakEoEBQaQRAhA0EBIQUDQCACQYABaiACQdgAahAOIAIoAoABQYCAgIB4RwRAIAIoAjwgBUYEQCACQTxqQQEQgwEgAigCQCEECyADIARqIgEgAikCgAE3AgAgAUEIaiACQYgBaikCADcCACACIAVBAWoiBTYCRCADQRBqIQMMAQsLQYCAgIB4IAIoAoQBEJgBIAJB2ABqEJYBIAIoAjwLIQcgCSAOaiEJIAVBBHQhAyAEIQECQANAIANFDQEgA0EQayEDIAEoAgghCiABQRBqIQEgCCAKRg0AC0Hwz8AAQTdBqNDAABBnAAsgDBCUASAAIAU2AhQgACAENgIQIAAgBzYCDCAFIAZJBEAgAkEAOwBgIAJBAjoAXCACQQI6AFggACAGIAVrIAggAkHYAGoQLCAAKAIUIQULIAVBAWshBEEAIQFBACEDA0ACQCABIA1PDQAgAyAETw0AIAEgACgCECAAKAIUIANBsM/AABCIAS0ADEEBc2ohASADQQFqIQMMAQsLAn8DQCAAKAIUIgEgCCAJSw0BGiAAKAIQIAEgA0Ggz8AAEIgBLQAMBEAgA0EBaiEDIAkgCGshCQwBCwsgACgCFAshByAJIAhBAWsiASABIAlLGyEOIAMgBiAFa2oiAUEATiEEIAFBACAEGyEFIAZBACABIAQbayEGCwJAAkACQEF/IAYgC0cgBiALSxtB/wFxDgICAAELIAcgBmsiAUEAIAEgB00bIgQgCyAGayIBIAEgBEsbIgNBACAFIAZJGyAFaiEFIAEgBE0NASACQQA7AGAgAkECOgBcIAJBAjoAWCAAIAEgA2sgCCACQdgAahAsDAELAkAgBiALayIKIAYgBUF/c2oiASABIApLGyIERQ0AIAAoAhAhAyAEIAdNBEAgACAHIARrIgE2AhQgAyABQQR0aiEDIAQhAQNAIAEEQCADKAIAIANBBGooAgBBFBCVASABQQFrIQEgA0EQaiEDDAELCyAAKAIUIQcgACgCECEDCwJAIAdFDQAgAyAHQQR0aiIBQRBGDQAgAUEEa0EAOgAADAELQZDPwAAQpQEACyAFIAprIARqIQULIAAgBTYCbCAAIA42AmggAEEBOgAgIAAgCzYCHCAAIAg2AhgCfyAAKAKgASIDIAAoAmQiAU0EQCAAIAM2AmQgAwwBCyAAQdwAaiADIAFrQQAQMyAAKAJkIQMgACgCoAELIQEgACgCYCADQQAgARBKIAAoApwBIgEgACgCdE0EQCAAIAFBAWs2AnQLIAAoAqABIgEgACgCeE0EQCAAIAFBAWs2AngLIAJBkAFqJAALuwkBB38CQAJAIAIgACABa0sEQCABIAJqIQUgACACaiEAIAJBEEkNAUEAIABBA3EiBmshBwJAIABBfHEiAyAATw0AIAZBAWsCQCAGRQRAIAUhBAwBCyAGIQggBSEEA0AgAEEBayIAIARBAWsiBC0AADoAACAIQQFrIggNAAsLQQNJDQAgBEEEayEEA0AgAEEBayAEQQNqLQAAOgAAIABBAmsgBEECai0AADoAACAAQQNrIARBAWotAAA6AAAgAEEEayIAIAQtAAA6AAAgBEEEayEEIAAgA0sNAAsLIAMgAiAGayIEQXxxIgJrIQBBACACayEGAkAgBSAHaiIFQQNxRQRAIAAgA08NASABIARqQQRrIQEDQCADQQRrIgMgASgCADYCACABQQRrIQEgACADSQ0ACwwBCyAAIANPDQAgBUEDdCICQRhxIQggBUF8cSIHQQRrIQFBACACa0EYcSEJIAcoAgAhAgNAIAIgCXQhByADQQRrIgMgByABKAIAIgIgCHZyNgIAIAFBBGshASAAIANJDQALCyAEQQNxIQIgBSAGaiEFDAELIAJBEE8EQAJAQQAgAGtBA3EiBiAAaiIEIABNDQAgBkEBayABIQMgBgRAIAYhBQNAIAAgAy0AADoAACADQQFqIQMgAEEBaiEAIAVBAWsiBQ0ACwtBB0kNAANAIAAgAy0AADoAACAAQQFqIANBAWotAAA6AAAgAEECaiADQQJqLQAAOgAAIABBA2ogA0EDai0AADoAACAAQQRqIANBBGotAAA6AAAgAEEFaiADQQVqLQAAOgAAIABBBmogA0EGai0AADoAACAAQQdqIANBB2otAAA6AAAgA0EIaiEDIAQgAEEIaiIARw0ACwsgAiAGayIDQXxxIgggBGohAAJAIAEgBmoiBUEDcUUEQCAAIARNDQEgBSEBA0AgBCABKAIANgIAIAFBBGohASAEQQRqIgQgAEkNAAsMAQsgACAETQ0AIAVBA3QiAkEYcSEGIAVBfHEiB0EEaiEBQQAgAmtBGHEhCSAHKAIAIQIDQCACIAZ2IQcgBCAHIAEoAgAiAiAJdHI2AgAgAUEEaiEBIARBBGoiBCAASQ0ACwsgA0EDcSECIAUgCGohAQsgACACaiIFIABNDQEgAkEBayACQQdxIgMEQANAIAAgAS0AADoAACABQQFqIQEgAEEBaiEAIANBAWsiAw0ACwtBB0kNAQNAIAAgAS0AADoAACAAQQFqIAFBAWotAAA6AAAgAEECaiABQQJqLQAAOgAAIABBA2ogAUEDai0AADoAACAAQQRqIAFBBGotAAA6AAAgAEEFaiABQQVqLQAAOgAAIABBBmogAUEGai0AADoAACAAQQdqIAFBB2otAAA6AAAgAUEIaiEBIAUgAEEIaiIARw0ACwwBCyAAIAJrIgQgAE8NACACQQFrIAJBA3EiAQRAA0AgAEEBayIAIAVBAWsiBS0AADoAACABQQFrIgENAAsLQQNJDQAgBUEEayEBA0AgAEEBayABQQNqLQAAOgAAIABBAmsgAUECai0AADoAACAAQQNrIAFBAWotAAA6AAAgAEEEayIAIAEtAAA6AAAgAUEEayEBIAAgBEsNAAsLC7gKAQV/IAAgAkGAzcAAEFoiAigCBCACKAIIIAFB0NXAABCGASgCBCEGQQEhBwJAAkACfwJAAkACQAJAAkACQAJAIANBoAFJDQAgA0ENdkGA7cAAai0AACIAQRVPDQEgA0EHdkE/cSAAQQZ0ckGA78AAai0AACIAQbQBTw0CAkACQCADQQJ2QR9xIABBBXRyQcD5wABqLQAAIANBAXRBBnF2QQNxQQJrDgIBAAILIANBjvwDa0ECSQ0BIANB3AtGDQEgA0HYL0YNASADQZA0Rg0BIANBg5gERg0BIANB/v//AHFB/MkCRg0BIANBogxrQeEESQ0BIANBgC9rQTBJDQEgA0Gx2gBrQT9JDQEgA0Hm4wdrQRpJDQELQQAhBwsgAigCCCIFIAFBf3NqIQACQAJAAkACQCAGDgMDAQIAC0Gg2MAAQShByNjAABBnAAsgAigCBCEGIAcNBwJAAkACQCAADgIAAQILIAYgBSABQfDVwAAQhgEiAkEgNgIAQQAhAEEBIQYMCwtBAiEAIAYgBSABQYDWwAAQhgEiBUECNgIEIAUgAzYCACAFIAQpAAA3AAggBUEQaiAEQQhqLwAAOwAAIAIoAgQgAigCCCABQQFqQZDWwAAQhgEiAkEgNgIADAcLQQIhACAGIAUgAUGg1sAAEIYBIgVBAjYCBCAFIAM2AgAgBSAEKQAANwAIIAVBEGogBEEIaiIDLwAAOwAAIAIoAgQgAigCCCABQQFqIgVBsNbAABCGASgCBEECRgRAIAIoAgQgAigCCCABQQJqQcDWwAAQhgEiAUKggICAEDcCACABIAQpAAA3AAggAUEQaiADLwAAOwAACyACKAIEIAIoAgggBUHQ1sAAEIYBIgJBIDYCAAwGC0EBIQYgAUEBaiEIIAIoAgQhCSAHDQRBAiEAIAkgBSABQYDXwAAQhgEiAUECNgIEIAEgAzYCACABIAQpAAA3AAggAUEQaiAEQQhqLwAAOwAAIAIoAgQgAigCCCAIQZDXwAAQhgEiAkEgNgIADAULIAcNAgJAAkAgAA4CCgABC0EBIQYgAigCBCAFIAFBAWpBwNfAABCGASICQSA2AgBBACEADAgLIAIoAgQgBSABQQFrQdDXwAAQhgEiAEKggICAEDcCACAAIAQpAAA3AAggAEEQaiAEQQhqIgcvAAA7AABBAiEAIAIoAgQgAigCCCABQeDXwAAQhgEiBUECNgIEIAUgAzYCACAFIAQpAAA3AAggBUEQaiAHLwAAOwAAIAIoAgQgAigCCCABQQFqIgNB8NfAABCGASgCBEECRgRAIAIoAgQgAigCCCABQQJqQYDYwAAQhgEiAUKggICAEDcCACABIAQpAAA3AAggAUEQaiAHLwAAOwAACyACKAIEIAIoAgggA0GQ2MAAEIYBIgJBIDYCAAwECyAAQRVB9MbAABBCAAsgAEG0AUGEx8AAEEIACyACKAIEIAUgAUEBa0Gg18AAEIYBIgBCoICAgBA3AgAgACAEKQAANwAIIABBEGogBEEIai8AADsAACACKAIEIAIoAgggAUGw18AAEIYBDAMLIAkgBSABQeDWwAAQhgEiAEEBNgIEIAAgAzYCACAAIAQpAAA3AAggAEEQaiAEQQhqLwAAOwAAIAIoAgQgAigCCCAIQfDWwAAQhgEiAkEgNgIAQQEhAAwDC0EAIQYMAgsgBiAFIAFB4NXAABCGAQsiAiADNgIAQQEhBkEBIQALIAIgBjYCBCACIAQpAAA3AAggAkEQaiAEQQhqLwAAOwAACyAACwMAAAvJBQIKfwF+IwBBkAFrIgQkAAJAAkACQANAQQAgAkEEdGshBQJAA0AgAkUNBSAARQ0FIAAgAmpBGEkNAyAAIAIgACACSSIDG0EJSQ0BIANFBEAgASEDA0AgAyAFaiIBIAMgAhBhIAEhAyACIAAgAmsiAE0NAAsMAQsLQQAgAEEEdCIDayEFA0AgASAFaiABIAAQYSABIANqIQEgAiAAayICIABPDQALDAELCyABIABBBHQiBWsiAyACQQR0IgZqIQcgACACSw0BIARBEGoiACADIAUQFBogAyABIAYQECAHIAAgBRAUGgwCCyAEQQhqIgcgASAAQQR0ayIGQQhqKQIANwMAIAQgBikCADcDACACQQR0IQggAiIFIQEDQCAGIAFBBHRqIQMDQCAEQRhqIgkgA0EIaiIKKQIANwMAIAQgAykCADcDECAHKQMAIQ0gAyAEKQMANwIAIAogDTcCACAHIAkpAwA3AwAgBCAEKQMQNwMAIAAgAUsEQCADIAhqIQMgASACaiEBDAELCyABIABrIgEEQCABIAUgASAFSRshBQwBBSAEKQMAIQ0gBkEIaiAEQQhqIgcpAwA3AgAgBiANNwIAQQEgBSAFQQFNGyEJQQEhAQNAIAEgCUYNBCAGIAFBBHRqIgUpAgAhDSAHIAVBCGoiCikCADcDACAEIA03AwAgASACaiEDA0AgBEEYaiILIAYgA0EEdGoiCEEIaiIMKQIANwMAIAQgCCkCADcDECAHKQMAIQ0gCCAEKQMANwIAIAwgDTcCACAHIAspAwA3AwAgBCAEKQMQNwMAIAAgA0sEQCACIANqIQMMAQsgAyAAayIDIAFHDQALIAQpAwAhDSAKIAcpAwA3AgAgBSANNwIAIAFBAWohAQwACwALAAsACyAEQRBqIgAgASAGEBQaIAcgAyAFEBAgAyAAIAYQFBoLIARBkAFqJAALkAUBCH8CQCACQRBJBEAgACEDDAELAkBBACAAa0EDcSIGIABqIgUgAE0NACAGQQFrIAAhAyABIQQgBgRAIAYhBwNAIAMgBC0AADoAACAEQQFqIQQgA0EBaiEDIAdBAWsiBw0ACwtBB0kNAANAIAMgBC0AADoAACADQQFqIARBAWotAAA6AAAgA0ECaiAEQQJqLQAAOgAAIANBA2ogBEEDai0AADoAACADQQRqIARBBGotAAA6AAAgA0EFaiAEQQVqLQAAOgAAIANBBmogBEEGai0AADoAACADQQdqIARBB2otAAA6AAAgBEEIaiEEIAUgA0EIaiIDRw0ACwsgAiAGayIHQXxxIgggBWohAwJAIAEgBmoiBEEDcUUEQCADIAVNDQEgBCEBA0AgBSABKAIANgIAIAFBBGohASAFQQRqIgUgA0kNAAsMAQsgAyAFTQ0AIARBA3QiAkEYcSEGIARBfHEiCUEEaiEBQQAgAmtBGHEhCiAJKAIAIQIDQCACIAZ2IQkgBSAJIAEoAgAiAiAKdHI2AgAgAUEEaiEBIAVBBGoiBSADSQ0ACwsgB0EDcSECIAQgCGohAQsCQCACIANqIgYgA00NACACQQFrIAJBB3EiBARAA0AgAyABLQAAOgAAIAFBAWohASADQQFqIQMgBEEBayIEDQALC0EHSQ0AA0AgAyABLQAAOgAAIANBAWogAUEBai0AADoAACADQQJqIAFBAmotAAA6AAAgA0EDaiABQQNqLQAAOgAAIANBBGogAUEEai0AADoAACADQQVqIAFBBWotAAA6AAAgA0EGaiABQQZqLQAAOgAAIANBB2ogAUEHai0AADoAACABQQhqIQEgBiADQQhqIgNHDQALCyAAC/QEAgt/BH4jAEEQayICJABCASABQXBxQRBqIgQgACAAIARJG0EBaxB0IgathiEOQn8gBkEBaq2GIQ8gAEEBayEHIAFBj4AEaiIBQYCAfHEhCSABQRB2IQogBkE9SyELIABBEUkhDAJAAn8DQAJAQbCqwQApAwAhDQJAIAtFBEAgDSAPg3oiEEI/WARAIBCnIQAgDARAQbiqwQAoAgAgAEECdGooAgAiASgCDCABEFggAUEBayIDIAMtAABBAnM6AAAgAWoMBgsDQCACQQRqIAAgBCAHEDYgAigCBEEBRg0EIABBP0kEQEGwqsEAKQMAQn8gAEEBaq2Gg3oiDachACANQsAAVA0BCwsgAkEEaiAGIAQgBxA2IAIoAgQNAwwCCyANIA6DUA0BIAJBBGogBiAEIAcQNiACKAIEQQFGDQIMAQsgDUIAWQ0AIAJBBGpBPyAEIAcQNiACKAIEQQFGDQELQQAhASAKQAAiAEF/Rg0DQX8gAEEQdCIAIAlqIgMgACADSxtBcHEhAwJAQbiqwQAoAgAEQCAAQSBqIgUgAEkNBSADIAVJDQUgAEEPakEHOgAAIABBEGohBQwBCyAAQQEgABtBA2pBhIB8cSIIQZACckGQgnxxIgUgCEkNBCADIAVJDQRBACEAQbiqwQAgCDYCACAFQQFrQQNBASADIAVLGzoAAANAIABBgAJGDQEgACAIakEANgIAIABBBGohAAwACwALIAMgBUsEQCAFIAMQOAsgAw0BDAMLCyACKAIIIQEgAigCDAsiACABIARqIgRGBH9BAQUgBCAAEDhBAwshACAEQQFrIAA6AAALIAJBEGokACABCwMAAAuhBAILfwJ+IwBB0ABrIQQCQCAARQ0AIAJFDQAgBEEIaiIDQRBqIgYgASAAQWxsaiILIgdBEGooAgA2AgAgA0EIaiIIIAdBCGopAgA3AwAgBCAHKQIANwMIIAJBFGwhCSACIgMhBQNAIAsgA0EUbGohAQNAIAEpAgAhDiABIAQpAwg3AgAgCCkDACEPIAggAUEIaiIKKQIANwMAIAogDzcCACAGKAIAIQogBiABQRBqIgwoAgA2AgAgDCAKNgIAIAQgDjcDCCAAIANNRQRAIAEgCWohASACIANqIQMMAQsLIAMgAGsiAwRAIAMgBSADIAVJGyEFDAEFIAcgBCkDCDcCACAHQRBqIARBCGoiAUEQaiIGKAIANgIAIAdBCGogAUEIaiIIKQMANwIAQQEgBSAFQQFNGyELQQEhAwNAIAMgC0YNAyAGIAcgA0EUbGoiBUEQaiIKKAIANgIAIAggBUEIaiIMKQIANwMAIAQgBSkCADcDCCACIANqIQEDQCAHIAFBFGxqIgkpAgAhDiAJIAQpAwg3AgAgCCkDACEPIAggCUEIaiINKQIANwMAIA0gDzcCACAGKAIAIQ0gBiAJQRBqIgkoAgA2AgAgCSANNgIAIAQgDjcDCCAAIAFLBEAgASACaiEBDAELIAMgASAAayIBRw0ACyAFIAQpAwg3AgAgCiAGKAIANgIAIAwgCCkDADcCACADQQFqIQMMAAsACwALAAsL0QQCA38EfiMAQdAGayIEJAAgBEH8AWpBAEGFBBAbGiAEQYCAxAA2AvgBIARBNGoiBSAAIAFBASACQQAQHCAEQdgAaiAAIAFBAUEAQQAQHCAEQcQGaiIGIAEQTCAEQYQBaiAAEDIgBEEAOgDwASAEIAE2AtQBIAQgADYC0AEgBEEAOwHuASAEQQI6AOoBIARBAjoA5gEgBEEBOgCkASAEQgA3ApwBIAQgAjYCgAEgBEEBNgJ8IARBADsB5AEgBEEAOgD1ASAEQYCABDYA8QEgBEIANwLYASAEIAFBAWs2AuABIARBAjoAsAEgBEECOgC0ASAEQQA2AsABIARBAjoAxAEgBEECOgDIASAEQYCAgAg2AswBIARCADcCqAEgBEKAgIAINwK4ASAEQZgBaiAGQQhqKAIANgIAIARBADoA9gEgBCAEKQLEBjcCkAEgBEEoaiAAQQJBCEGMwsAAEFcgBCkDKCEHIARBIGogAEECQQxBnMLAABBXIAQpAyAhCCAEQRhqIABBBEEMQazCwAAQVyAEKQMYIQkgBEEQaiAAQQRBEEG8wsAAEFcgBCkDECEKIARBCGogAEEEQQRBzMLAABBXIAQgA0EARzoAwAYgBEEANgK8BiAEQQA2ArAGIAQgCjcCqAYgBEEANgKkBiAEIAk3ApwGIARBADYCmAYgBCAINwKQBiAEQQA2AowGIAQgBzcChAYgBCAEKQMINwK0BkGcBhCPASIAQQA2AgggAEKBgICAEDcCACAAQQxqIAVBkAYQFBogBEHQBmokACAAQQhqC7sQAhF/BH4jAEEgayIMJAAQACEKIAxBADYCHCAMIAo2AhggDCABNgIUIAxBFGogBRB6IAwoAhwhASAGQf//A3G4EAchBSAMKAIYIhUgASAFEAEjAEEgayIGJAACQEG8qsEAKAIAIgUNAEHAqsEAQQA2AgBBvKrBAEEBNgIAQcSqwQAoAgAhAUHIqsEAKAIAIQhBxKrBAEHY68AAKQIAIhg3AgAgBkEIakHg68AAKQIAIhk3AwBB0KrBACgCACEKQcyqwQAgGTcCACAGIBg3AwAgBUUNACAIRQ0AAkAgCkUNACABQQhqIQkgASkDAEJ/hUKAgYKEiJCgwIB/gyEZQQEhCyABIQUDQCALRQ0BIBkhGANAIBhQBEAgBUHgAGshBSAJKQMAQn+FQoCBgoSIkKDAgH+DIRggCUEIaiEJDAELCyAYQgF9IBiDIRkgCkEBayIKIQsgBSAYeqdBA3ZBdGxqQQRrKAIAIgdBhAFJDQAgBxACDAALAAsgBkEUaiAIQQFqED0gASAGKAIcayAGKAIYEJsBCyAGQSBqJABBwKrBACgCAEUEQEHAqsEAQX82AgBByKrBACgCACIBIANxIQYgA60iGkIZiEKBgoSIkKDAgAF+IRtBxKrBACgCACEKA0AgBiAKaikAACIZIBuFIhhCgYKEiJCgwIABfSAYQn+Fg0KAgYKEiJCgwIB/gyEYAkACQANAIBhCAFIEQCADIAogGHqnQQN2IAZqIAFxQXRsaiIFQQxrKAIARgRAIAVBCGsoAgAgBEYNAwsgGEIBfSAYgyEYDAELCyAZIBlCAYaDQoCBgoSIkKDAgH+DUA0BQcyqwQAoAgBFBEAjAEEwayIIJAACQAJAAkBB0KrBACgCACIKQX9GDQBByKrBACgCACIJQQFqIgtBA3YhASAJIAFBB2wgCUEISRsiDkEBdiAKTQRAIAhBCGoCfyAKIA4gCiAOSxsiAUEHTwRAIAFB/v///wFLDQNBfyABQQN0QQhqQQduQQFrZ3ZBAWoMAQtBBEEIIAFBA0kbCyIBED0gCCgCCCIFRQ0BIAgoAhAhBiAIKAIMIgkEQEH4qsEALQAAGiAFIAkQFSEFCyAFRQ0CIAUgBmpB/wEgAUEIahAbIQsgCEEANgIgIAggAUEBayIHNgIYIAggCzYCFCAIQQg2AhAgCCAHIAFBA3ZBB2wgAUEJSRsiDjYCHCALQQxrIRFBxKrBACgCACIGKQMAQn+FQoCBgoSIkKDAgH+DIRggBiEBIAohCUEAIQUDQCAJBEADQCAYUARAIAVBCGohBSABKQMIQn+FQoCBgoSIkKDAgH+DIRggAUEIaiEBDAELCyAIIAsgByAGIBh6p0EDdiAFaiINQXRsaiIGQQxrKAIAIhAgBkEIaygCACAQG60QXCARIAgoAgBBdGxqIhBBxKrBACgCACIGIA1BdGxqQQxrIg0pAAA3AAAgEEEIaiANQQhqKAAANgAAIAlBAWshCSAYQgF9IBiDIRgMAQsLIAggCjYCICAIIA4gCms2AhxBACEBA0AgAUEQRwRAIAFBxKrBAGoiBSgCACEGIAUgASAIakEUaiIFKAIANgIAIAUgBjYCACABQQRqIQEMAQsLIAgoAhgiAUUNAyAIQSRqIAFBAWoQPSAIKAIUIAgoAixrIAgoAigQmwEMAwsgASALQQdxQQBHaiEFQcSqwQAoAgAiBiEBA0AgBQRAIAEgASkDACIYQn+FQgeIQoGChIiQoMCAAYMgGEL//v379+/fv/8AhHw3AwAgAUEIaiEBIAVBAWshBQwBBQJAIAtBCE8EQCAGIAtqIAYpAAA3AAAMAQsgBkEIaiAGIAsQEAsgBkEIaiERIAZBDGshECAGIQVBACEBA0ACQAJAIAEgC0cEQCABIAZqIhMtAABBgAFHDQIgAUF0bCIHIBBqIRQgBiAHaiIHQQhrIRYgB0EMayEXA0AgASAXKAIAIgcgFigCACAHGyIHIAlxIg9rIAYgCSAHrRA+Ig0gD2tzIAlxQQhJDQIgBiANaiIPLQAAIA8gB0EZdiIHOgAAIBEgDUEIayAJcWogBzoAACANQXRsIQdB/wFHBEAgBiAHaiENQXQhBwNAIAdFDQIgBSAHaiIPLQAAIRIgDyAHIA1qIg8tAAA6AAAgDyASOgAAIAdBAWohBwwACwALCyATQf8BOgAAIBEgAUEIayAJcWpB/wE6AAAgByAQaiIHQQhqIBRBCGooAAA2AAAgByAUKQAANwAADAILQcyqwQAgDiAKazYCAAwHCyATIAdBGXYiBzoAACARIAFBCGsgCXFqIAc6AAALIAFBAWohASAFQQxrIQUMAAsACwALAAsjAEEgayIAJAAgAEEANgIYIABBATYCDCAAQcjqwAA2AgggAEIENwIQIABBCGpB/OrAABCAAQALAAsgCEEwaiQACyADIAQQCSEBIAxBCGpBxKrBACgCAEHIqsEAKAIAIBoQXCAMKAIIIQUgDC0ADCEGQdCqwQBB0KrBACgCAEEBajYCAEHMqsEAQcyqwQAoAgAgBkEBcWs2AgBBxKrBACgCACAFQXRsaiIFQQRrIAE2AgAgBUEIayAENgIAIAVBDGsgAzYCAAsgBUEEaygCABADIQFBwKrBAEHAqsEAKAIAQQFqNgIAIAIgASAVEAQgAEEANgIAIAxBIGokAA8LIA5BCGoiDiAGaiABcSEGDAALAAsjAEEwayIAJAAgAEEBNgIMIABB6OXAADYCCCAAQgE3AhQgACAAQS9qrUKAgICA0ACENwMgIAAgAEEgajYCECAAQQhqQdDswAAQgAEAC/IDAQV/IwBBMGsiBiQAIAIgAWsiByADSyEJIAJBAWsiCCAAKAIcIgVBAWtJBEAgACAIQaDOwAAQWkEAOgAMCyADIAcgCRshAwJAAkAgAUUEQAJAIAIgBUcEQCAGQRBqIAAoAhggBBApIAVBBHQgAkEEdGshByAAQQxqIQkgACgCFCIBIAIgBWtqIQQgASECA0AgA0UEQCAGKAIQIAYoAhRBFBCVAQwFCyAGQSBqIAZBEGoQSyABIARJDQIgCSgCACIIIAJGBEAjAEEQayIFJAAgBUEIaiAJIAhBAUEEQRAQJCAFKAIIIghBgYCAgHhHBEAgBSgCDBogCEGwzsAAEJ0BAAsgBUEQaiQACyAAKAIQIARBBHRqIQUgAiAESwRAIAVBEGogBSAHEBALIAUgBikCIDcCACAAIAJBAWoiAjYCFCAFQQhqIAZBKGopAgA3AgAgA0EBayEDIAdBEGohBwwACwALIAAgAyAAKAIYIAQQLAwCCyAEIAJBsM7AABBDAAsgACABQQFrQcDOwAAQWkEAOgAMIAZBCGogACABIAJB0M7AABBfIAYoAgwiASADSQ0BIAMgBigCCCADQQR0aiABIANrEBMgACACIANrIAIgBBAoCyAAQQE6ACAgBkEwaiQADwtBpMjAAEEjQbzJwAAQZwALlAMBBX8CQCACQRBJBEAgACEDDAELAkBBACAAa0EDcSIFIABqIgQgAE0NACAFQQFrIAAhAyAFBEAgBSEGA0AgAyABOgAAIANBAWohAyAGQQFrIgYNAAsLQQdJDQADQCADIAE6AAAgA0EHaiABOgAAIANBBmogAToAACADQQVqIAE6AAAgA0EEaiABOgAAIANBA2ogAToAACADQQJqIAE6AAAgA0EBaiABOgAAIAQgA0EIaiIDRw0ACwsgBCACIAVrIgJBfHFqIgMgBEsEQCABQf8BcUGBgoQIbCEFA0AgBCAFNgIAIARBBGoiBCADSQ0ACwsgAkEDcSECCwJAIAIgA2oiBSADTQ0AIAJBAWsgAkEHcSIEBEADQCADIAE6AAAgA0EBaiEDIARBAWsiBA0ACwtBB0kNAANAIAMgAToAACADQQdqIAE6AAAgA0EGaiABOgAAIANBBWogAToAACADQQRqIAE6AAAgA0EDaiABOgAAIANBAmogAToAACADQQFqIAE6AAAgBSADQQhqIgNHDQALCyAAC68DAQV/IwBBQGoiBiQAIAZBADsAEiAGQQI6AA4gBkECOgAKIAZBMGoiB0EIaiIIIAUgBkEKaiAFGyIFQQhqLwAAOwEAIAYgBSkAADcDMCAGQRRqIAEgBxApIAYgAkEEQRBB8MzAABBXIAZBADYCLCAGIAYpAwA3AiQgBkEkaiACEIMBQQEgAiACQQFNGyIJQQFrIQcgBigCKCAGKAIsIgpBBHRqIQUCfwNAIAcEQCAGQTBqIAZBFGoQSyAFIAYpAjA3AgAgBUEIaiAIKQIANwIAIAdBAWshByAFQRBqIQUMAQUCQCAJIApqIQcCQCACRQRAIAYoAhQgBigCGEEUEJUBIAdBAWshBwwBCyAFIAYpAhQ3AgAgBUEIaiAGQRxqKQIANwIACyAGIAc2AiwgA0EBcUUNACAEBEAgBkEkaiAEEIMBCyAEQQpuIARqIQVBAQwDCwsLIAZBJGpB6AcQgwFBAAshAyAAIAYpAiQ3AgwgACACNgIcIAAgATYCGCAAQQA6ACAgACAFNgIIIAAgBDYCBCAAIAM2AgAgAEEUaiAGQSxqKAIANgIAIAZBQGskAAumAwEDfyMAQRBrIgYkACADIAAoAhggAWsiBSADIAVJGyEDIAEgACACQaDNwAAQWiIAKAIIIgJBAWsiBSABIAVJGyEBIAAoAgQgAiABQdjYwAAQhgEiBSgCBEUEQCAFQqCAgIAQNwIAIAUgBCkAADcACCAFQRBqIARBCGoiBy8AADsAACAAKAIEIAAoAgggAUEBa0Ho2MAAEIYBIgVCoICAgBA3AgAgBSAEKQAANwAIIAVBEGogBy8AADsAAAsgBkEIaiAAKAIEIAAoAgggAUH42MAAEHUCQCADIAYoAgwiBU0EQCAFIANrIgUgBigCCCAFQRRsaiADEBcgACgCBCAAKAIIIAFBiNnAABCGASIBKAIERQRAIAFCoICAgBA3AgAgASAEKQAANwAIIAFBEGogBEEIai8AADsAACACRQ0CIAAoAgQgAkEUbGoiAEEUayIBRQ0CIAFBIDYCACAAQRBrQQE2AgAgAEEMayIAIAQpAAA3AAAgAEEIaiAEQQhqLwAAOwAACyAGQRBqJAAPC0HMycAAQSFB8MnAABBnAAtBmNnAABClAQAL9QIBBH8CQCAAAn8CQAJAAkACQAJAIAAoAqQBIgJBAU0EQAJAIAFB/wBLDQAgACACakGwAWotAABBAXFFDQAgAUECdEG40MAAaigCACEBCyAAKAJoIgMgACgCnAEiBE8NAyAAKAJsIQIgAC0AvQENAQwCCyACQQJBqOXAABBCAAsgACADIAJBASAAQbIBahAdCyAAIAMgAiABIABBsgFqEBEiBQ0BCyAALQC/AQ0BIAAgA0EBayAAKAJsIgIgASAAQbIBaiIFEBFFBEAgACADQQJrIAIgASAFEBEaCyAEQQFrDAILIAAgAyAFaiIBNgJoIAEgBEcNAiAALQC/AQ0CIARBAWsMAQsCQCAAKAJsIgIgACgCrAFHBEAgAiAAKAKgAUEBa08NASAAIAIQoAEgACACQQFqIgI2AmwMAQsgACACEKABIABBARB9IAAoAmwhAgsgAEEAIAIgASAAQbIBahARCzYCaAsgACgCYCAAKAJkIAIQhwEL+gIAAkACQAJAAkACQAJAAkAgA0EBaw4GAAECAwQFBgsgACgCGCEEIAAgAkHQzcAAEFoiA0EAOgAMIAMoAgQgAygCCCABIAQgBRAlIAAgAkEBaiAAKAIcIAUQKA8LIAAoAhghAyAAIAJB4M3AABBaIgQoAgQgBCgCCEEAIAFBAWoiASADIAEgA0kbIAUQJSAAQQAgAiAFECgPCyAAQQAgACgCHCAFECgPCyAAKAIYIQMgACACQfDNwAAQWiIAKAIEIAAoAgggASADIAUQJSAAQQA6AAwPCyAAKAIYIQMgACACQYDOwAAQWiIAKAIEIAAoAghBACABQQFqIgAgAyAAIANJGyAFECUPCyAAKAIYIQEgACACQZDOwAAQWiIAKAIEIAAoAghBACABIAUQJSAAQQA6AAwPCyAAKAIYIQMgACACQcDNwAAQWiIAKAIEIAAoAgggASABIAQgAyABayIBIAEgBEsbaiIBIAUQJSABIANGBEAgAEEAOgAMCwvUAgEFfyMAQUBqIgMkACADQQA2AiAgAyABNgIYIAMgASACajYCHCADQRBqIANBGGoQRAJAIAMoAhBFBEAgAEEANgIIIABCgICAgMAANwIADAELIAMoAhQhBCADQQhqQQRBBEEEQZTIwAAQVyADKAIIIQUgAygCDCIGIAQ2AgAgA0EBNgIsIAMgBjYCKCADIAU2AiQgA0E4aiADQSBqKAIANgIAIAMgAykCGDcDMEEEIQVBASEEA0AgAyADQTBqEEQgAygCAEEBR0UEQCADKAIEIQcgAygCJCAERgRAIANBJGogBEEBQQRBBBBkIAMoAighBgsgBSAGaiAHNgIAIAMgBEEBaiIENgIsIAVBBGohBQwBCwsgACADKQIkNwIAIABBCGogA0EsaigCADYCAAsDQCACBEAgAUEAOgAAIAJBAWshAiABQQFqIQEMAQsLIANBQGskAAvKAgIFfwJ+IwBBIGsiAiQAIAACfwJAAkAgAS0AIEUEQAwBCyABQQA6ACACQCABKAIAQQFGBEAgASgCFCIFIAEoAhxrIgMgASgCCEsNAQsMAQsgBSADIAEoAgRrIgRPBEBBACEDIAFBADYCFCACIAFBDGo2AhQgAiABKAIQIgY2AgwgAiAENgIYIAIgBSAEazYCHCACIAYgBEEEdGo2AhAgAS0AvAENAkEUQQQQciEBIAJBDGoiA0EIaikCACEHIAIpAgwhCCABQRBqIANBEGooAgA2AgAgAUEIaiAHNwIAIAEgCDcCAEGg5MAADAMLIAQgBUH0y8AAEKIBAAsgAkEANgIMQQEhAyABLQC8AQ0AQQBBARByIQFBhOTAAAwBC0EAQQEQciEBIANFBEAgAkEMahBPC0GE5MAACzYCBCAAIAE2AgAgAkEgaiQAC4YCAQR/AkACQAJ/AkACQAJAQX8gASADRyABIANLG0H/AXEOAgUBAAsgA0FwcSICIAFBcHEiAUYNBCAAIAJqIgVBEGogACABaiICQRBqIQEgAkEPai0AAEECcQR/IAJBHGooAgAhAiABEFggASACagUgAQsQOAwBCyABQXBxIgUgA0FwcSIGRg0DIAAgBWoiBEEPai0AAEECcUUNAiAAIAZqIgVBEGoiBiAEQRBqIgcgBEEcaigCAGoiBEsNAiAHEFhBASAEIAZGDQEaIAYgBBA4C0EDCyEBIAVBD2ogAToAACAADwsgAiADEBUiAkUEQEEADwsgAiAAIAEQFCAAIAEQOyEACyAAC5ICAQV/AkACQAJAQX8gACgCnAEiAyABRyABIANJG0H/AXEOAgIBAAsgACAAKAJYIgMEfyAAKAJUIQUDQCADQQJJRQRAIANBAXYiBiAEaiIHIAQgBSAHQQJ0aigCACABSRshBCADIAZrIQMMAQsLIAQgBSAEQQJ0aigCACABSWoFQQALNgJYDAELQQAgASADQXhxQQhqIgRrIgNBACABIANPGyIDQQN2IANBB3FBAEdqayEDIABB0ABqIQUDQCADRQ0BIAUgBEHc4sAAEHEgA0EBaiEDIARBCGohBAwACwALIAIgACgCoAFHBEAgAEEANgKoASAAIAJBAWs2AqwBCyAAIAI2AqABIAAgATYCnAEgABAPC/IBAgR/AX4jAEEQayIGJAACQCACIAIgA2oiA0sEQEEAIQIMAQtBACECIAQgBWpBAWtBACAEa3GtQQhBBCAFQQFGGyIHIAEoAgAiCEEBdCIJIAMgAyAJSRsiAyADIAdJGyIHrX4iCkIgiKcNACAKpyIDQYCAgIB4IARrSw0AIAQhAgJ/IAgEQCAFRQRAIAZBCGogBCADEIIBIAYoAggMAgsgASgCBCAFIAhsIAQgAxAiDAELIAYgBCADEIIBIAYoAgALIgVFDQAgASAHNgIAIAEgBTYCBEGBgICAeCECCyAAIAM2AgQgACACNgIAIAZBEGokAAuZAgEDfwJAAkACQCABIAJGDQAgACABIAJBoNXAABCGASgCBEUEQCAAIAEgAkEBa0Gw1cAAEIYBIgVCoICAgBA3AgAgBSAEKQAANwAIIAVBEGogBEEIai8AADsAAAsgAiADSw0BIAEgA0kNAiADQRRsIgYgAkEUbCICayEFIAAgAmohAiAEQQhqIQcDQCAFBEAgAkKggICAEDcCACACIAQpAAA3AAggAkEQaiAHLwAAOwAAIAVBFGshBSACQRRqIQIMAQsLIAEgA00NACAAIAZqIgAoAgQNACAAQqCAgIAQNwIAIAAgBCkAADcACCAAQRBqIARBCGovAAA7AAALDwsgAiADQcDVwAAQpAEACyADIAFBwNXAABCiAQALiwIBA38jAEEwayIDJAAgAyACNgIYIAMgATYCFAJAIANBFGoQUSIBQf//A3FBA0YEQCAAQQA2AgggAEKAgICAIDcCAAwBCyADQQhqQQRBAkECQZTIwAAQVyADKAIIIQIgAygCDCIEIAE7AQAgA0EBNgIkIAMgBDYCICADIAI2AhwgAyADKQIUNwIoQQIhAUEBIQIDQCADQShqEFEiBUH//wNxQQNGRQRAIAMoAhwgAkYEQCADQRxqIAJBAUECQQIQZCADKAIgIQQLIAEgBGogBTsBACADIAJBAWoiAjYCJCABQQJqIQEMAQsLIAAgAykCHDcCACAAQQhqIANBJGooAgA2AgALIANBMGokAAuFAgEDfyMAQTBrIgMkACADIAI2AhggAyABNgIUAkAgA0EUahBFQf//A3EiAUUEQCAAQQA2AgggAEKAgICAIDcCAAwBCyADQQhqQQRBAkECQZTIwAAQVyADKAIIIQIgAygCDCIEIAE7AQAgA0EBNgIkIAMgBDYCICADIAI2AhwgAyADKQIUNwIoQQIhAUEBIQIDQCADQShqEEVB//8DcSIFBEAgAygCHCACRgRAIANBHGogAkEBQQJBAhBkIAMoAiAhBAsgASAEaiAFOwEAIAMgAkEBaiICNgIkIAFBAmohAQwBCwsgACADKQIcNwIAIABBCGogA0EkaigCADYCAAsgA0EwaiQAC/0BAQJ/IwBBMGsiBCQAIARBEGogACgCGCADECkgBEEIaiAAEGggBCABIAIgBCgCCCAEKAIMQeDPwAAQYwJAIAQoAgQiAEUEQCAEKAIQIAQoAhRBFBCVAQwBCyAAQQR0IgFBEGshAyABIAQoAgAiAGoiAkEQayEBA0AgAwRAIARBIGoiBSAEQRBqEEsgACgCACAAQQRqKAIAQRQQlQEgAEEIaiAFQQhqKQIANwIAIAAgBCkCIDcCACADQRBrIQMgAEEQaiEADAEFIAEoAgAgAkEMaygCAEEUEJUBIAFBCGogBEEYaikCADcCACABIAQpAhA3AgALCwsgBEEwaiQAC4ACAQZ/IwBBIGsiAyQAIANBCGogAUEEQRRBkNXAABBXIANBADYCHCADIAMpAwg3AhQgA0EUaiABEIQBQQEgASABQQFNGyIGQQFrIQUgAygCGCADKAIcIgdBFGxqIQQgAkEIaiEIAkADQCAFBEAgBEKggICAEDcCACAEIAIpAAA3AAggBEEQaiAILwAAOwAAIAVBAWshBSAEQRRqIQQMAQUCQCAGIAdqIQUgAQ0AIAVBAWshBQwDCwsLIARCoICAgBA3AgAgBCACKQAANwAIIARBEGogAkEIai8AADsAAAsgACADKQIUNwIAIABBCGogBTYCACAAQQA6AAwgA0EgaiQAC9QBAQV/AkAgACgChAQiAUF/RwRAIAFBAWohAyABQSBJDQEgA0EgQdTbwAAQogEAC0HU28AAEHMACyAAQQRqIgEgA0EEdGohBQNAIAEgBUZFBEACQCABKAIAIgJBf0cEQCACQQZJDQEgAkEBakEGQaThwAAQogEAC0Gk4cAAEHMACyABQQRqIQQgAUEQaiACQQF0QQJqIQIDQCACBEAgBEEAOwEAIAJBAmshAiAEQQJqIQQMAQsLIAFBADYCACEBDAELCyAAQYCAxAA2AgAgAEEANgKEBAvzAQEBfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgASgCACIDQYCAxABGBEAgAkHg//8AcUHAAEYNASACQTdrDgIDBAILIAJBMEYNBiACQThGDQUgA0Eoaw4CCQoNCyAAIAJBQGsQPw8LIAJB4wBGDQIMCwsgAEEROgAADwsgAEEPOgAADwsgAEEkOgAAIAFBADoAiAQPCyADQSNrDgcBBwcHBwMGBwsgA0Eoaw4CAQQGCyAAQQ46AAAPCyAAQZoCOwEADwsgAEEaOwEADwsgAkEwRw0BCyAAQZkCOwEADwsgAEEZOwEADwsgAEEyOgAAC8MBAQJ/IwBBMGsiBCQAIARBDGogAiADECkgBCABNgIcIABBDGogARCDASABBEAgACgCECAAKAIUIgJBBHRqIQMCQANAAkAgBEEgaiIFIARBDGoQSyAEKAIgQYCAgIB4Rg0AIAMgBCkCIDcCACADQQhqIAVBCGopAgA3AgAgA0EQaiEDIAJBAWohAiABQQFrIgENAQwCCwtBgICAgHggBCgCJBCYAQsgACACNgIUCyAEKAIMIAQoAhBBFBCVASAEQTBqJAALhQEBA38jAEEgayIBJAAgAUEEaiAAEE0gASgCBCIALQBwQQFxBH8gACgCbCEDIAAoAmghACABQQA2AhAQACECIAFBADYCHCABIAI2AhggASABQRBqNgIUIAFBFGoiAiAAEHogAiADEHogASgCGAVBgAELIAEoAgggASgCDBCXASABQSBqJAALpwEBAn8jAEEgayICJAAgAiAAKAJoNgIMIAJBADoAHCACIAAoAlQiAzYCECACIAMgACgCWEECdGo2AhQgAiACQQxqNgIYIAACfwJAAkADQCABQQFrIgEEQCACQRBqEEANAQwCCwsgAkEQahBAIgENAQsgACgCnAEiA0EBayIADAELIAAoApwBIgNBAWshACABKAIACyIBIAAgASADSRs2AmggAkEgaiQAC6MBAQF/IwBBQGoiAyQAIANBHGogABBVIAMoAhwiACABIAIQIyADQShqIABB4ABqKAIAIABB5ABqKAIAECAgA0EQaiAAECEgAyADKQMQNwI0IANBCGogAygCLCADKAIwEFIgAygCDCEAIAMoAghBAXEEQCADIAA2AjwgA0E8akHswsAAEDwACyADQShqEGwgAygCICADKAIkEKEBIANBQGskACAAC5kBAQN/IAFBbGwhAiABQf////8DcSEDIAAgAUEUbGohAUEAIQACQANAIAJFDQECQCABQRRrIgQoAgBBIEcNACABQRBrKAIAQQFHDQAgAUEMay0AAEECRw0AIAFBCGstAABBAkcNACABQQRrLQAADQAgAUEDay0AAEEfcQ0AIAJBFGohAiAAQQFqIQAgBCEBDAELCyAAIQMLIAMLoAEBA38jAEEQayIFJAAgBUEIaiAAIAEgAkHgzsAAEF8gBSgCDCIGIAMgAiABayIHIAMgB0kbIgNPBEAgBiADayIGIAUoAgggBkEEdGogAxATIAAgASABIANqIAQQKCABBEAgACABQQFrQfDOwAAQWkEAOgAMCyAAIAJBAWtBgM/AABBaQQA6AAwgBUEQaiQADwtBzMnAAEEhQfDJwAAQZwALiwEBAn8jAEEQayICJAAgAkKAgICAwAA3AgQgAkEANgIMIAFBCGsiA0EAIAEgA08bIgFBA3YgAUEHcUEAR2ohAUEIIQMDQCABBEAgAkEEaiADQaziwAAQcSABQQFrIQEgA0EIaiEDDAEFIAAgAikCBDcCACAAQQhqIAJBDGooAgA2AgAgAkEQaiQACwsLjQEBBH8gASAAKAIAIAAoAggiBGtLBEAgACAEIAFBAUEBEGQgACgCCCEECyAAKAIEIARqIQVBASABIAFBAU0bIgZBAWshAwJAA0AgAwRAIAUgAjoAACADQQFrIQMgBUEBaiEFDAEFAkAgBCAGaiEDIAENACADQQFrIQMMAwsLCyAFIAI6AAALIAAgAzYCCAsDAAALegECfwJ/IAJFBEBBAQwBCwNAIAJBAU0EQAJAIAEgBEECdGooAgAiASADRw0AQQAMAwsFIAQgAkEBdiIFIARqIgQgASAEQQJ0aigCACADSxshBCACIAVrIQIMAQsLIAQgASADSWohBEEBCyECIAAgBDYCBCAAIAI2AgALhwEBBH8gA0F/cyEGQbiqwQAoAgAgAUECdGohAQJAA0AgASgCACIBRQ0BIAEgASgCDGoiByABIANqIAZxIgQgAmpJDQALIAEQWAJAIAEgBEYEQCABQQFrIgEgAS0AAEECczoAAAwBCyABIAQQOAsgACAHNgIIIAAgBDYCBEEBIQULIAAgBTYCAAuLAQEDfyMAQZAGayIDJAAgABCZASAAQQhrIQICQAJAIAFFBEAgAigCAEEBRw0CIAMgAEEEakGQBhAUIAJBADYCAAJAIAJBf0YNACAAQQRrIgQoAgBBAWshACAEIAA2AgAgAA0AIAJBnAYQOwsQRwwBCyACEJIBCyADQZAGaiQADwtBoMHAAEE/EKgBAAuFAQEEfwJ/QbiqwQAoAgBBPyABIABrIgQQdCIDIANBP08bIgNBAnRqIgIoAgAiBUUEQEGwqsEAQbCqwQApAwBCASADrYaENwMAIAIMAQsgAiAANgIAIAVBBGoLIAA2AgAgACAENgIMIAAgAzYCCCAAIAI2AgQgACAFNgIAIAFBBGsgBDYCAAvfAQEEfyMAQRBrIgQkACABKAIIIgMgAk8EQCAEQQhqIAMgAmsiA0EEQRRByNrAABBXIAQoAgghBSAEKAIMIAEgAjYCCCABKAIEIAJBFGxqIANBFGwQFCEBIAAgAzYCCCAAIAE2AgQgACAFNgIAIARBEGokAA8LIwBBMGsiACQAIAAgAzYCBCAAIAI2AgAgAEEDNgIMIABB+MXAADYCCCAAQgI3AhQgACAAQQRqrUKAgICAgAGENwMoIAAgAK1CgICAgIABhDcDICAAIABBIGo2AhAgAEEIakHI2sAAEIABAAt/AQJ/IAAgASAAKAIIIgNrIgQQhAEgBARAIAMgAWshBCABIAAoAggiAWogA2shAyAAKAIEIAFBFGxqIQEDQCABQqCAgIAQNwIAIAFBCGogAikAADcAACABQRBqIAJBCGovAAA7AAAgAUEUaiEBIARBAWoiBA0ACyAAIAM2AggLC3ABA38gACABQXBxaiICQQ9qLQAAIQMCQCAAQQFrIgEtAAAiBEEBcUUEQCAAIABBBGsoAgBrIgAQWAwBCyABIARBAnI6AAALIAJBEGohASAAIANBAnEEfyACQRxqKAIAIQIgARBYIAEgAmoFIAELEDgLggEBAX8jAEFAaiICJAAgAkErNgIMIAJBkIDAADYCCCACQYCAwAA2AhQgAiAANgIQIAJBAjYCHCACQeTmwAA2AhggAkICNwIkIAIgAkEQaq1CgICAgOAAhDcDOCACIAJBCGqtQoCAgIDwAIQ3AzAgAiACQTBqNgIgIAJBGGogARCAAQALdgIBfwF+AkACQCABrUIMfiIDQiCIpw0AIAOnIgJBeEsNACACQQdqQXhxIgIgAUEIamohASABIAJJDQEgAUH4////B00EQCAAIAI2AgggACABNgIEIABBCDYCAA8LIABBADYCAA8LIABBADYCAA8LIABBADYCAAt2AQJ/IAKnIQNBCCEEA0AgASADcSIDIABqKQAAQoCBgoSIkKDAgH+DIgJCAFJFBEAgAyAEaiEDIARBCGohBAwBCwsgAnqnQQN2IANqIAFxIgEgAGosAABBAE4EfyAAKQMAQoCBgoSIkKDAgH+DeqdBA3YFIAELC4MBAQF/AkACQAJAAkACQAJAAkACQAJAAkACQCABQQhrDggBAgYGBgMEBQALQTIhAiABQYQBaw4KBQYJCQcJCQkJCAkLDAgLQRshAgwHC0EGIQIMBgtBLCECDAULQSohAgwEC0EfIQIMAwtBICECDAILQRwhAgwBC0EjIQILIAAgAjoAAAtrAQd/IAAoAgghAyAAKAIEIQQgAC0ADEEBcSEFIAAoAgAiAiEBAkADQCABIARGBEBBAA8LIAAgAUEEaiIGNgIAIAUNASABKAIAIQcgBiEBIAMoAgAgB08NAAsgAUEEayECCyAAQQE6AAwgAgt7AQJ/IwBBEGsiAyQAQdiqwQBB2KrBACgCACIEQQFqNgIAAkAgBEEASA0AAkBB4KrBAC0AAEUEQEHcqsEAQdyqwQAoAgBBAWo2AgBB1KrBACgCAEEATg0BDAILIANBCGogACABEQAAAAtB4KrBAEEAOgAAIAJFDQAACwALawEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQdDmwAA2AgggA0ICNwIUIAMgA61CgICAgIABhDcDKCADIANBBGqtQoCAgICAAYQ3AyAgAyADQSBqNgIQIANBCGogAhCAAQALawEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAzYCDCADQZzFwAA2AgggA0ICNwIUIAMgA0EEaq1CgICAgIABhDcDKCADIAOtQoCAgICAAYQ3AyAgAyADQSBqNgIQIANBCGogAhCAAQALZwEHfyABKAIIIQMgASgCACECIAEoAgQhBgNAAkAgAyEEIAIgBkYEQEEAIQUMAQtBASEFIAEgAkEBaiIHNgIAIAEgBEEBaiIDNgIIIAItAAAgByECRQ0BCwsgACAENgIEIAAgBTYCAAtlAQR/IAAoAgAhASAAKAIEIQMCQANAIAEgA0YEQEEADwsgACABQRBqIgQ2AgAgAS8BBCICQRlNQQBBASACdEHCgYAQcRsNASACQZcIa0EDSQ0BIAQhASACQS9HDQALQZcIDwsgAgtjAQV/IAAoAgRBBGshAiAAKAIIIQMgACgCACEEIAAtAAxBAXEhBQNAIAQgAiIBQQRqRgRAQQAPCyAAIAE2AgQgBUUEQCABQQRrIQIgAygCACABKAIATQ0BCwsgAEEBOgAMIAELggEAIAAQkwEgAEEkahCTASAAKAJQIAAoAlRBBBCVASAAKAJcIAAoAmBBARCVASAAKALQBSAAKALUBUEIEJUBIAAoAtwFIAAoAuAFQQwQlQEgACgC6AUgACgC7AVBDBCVASAAKAL0BSAAKAL4BUEQEJUBIAAoAoAGIAAoAoQGQQQQlQELaQECfwJAAkAgAC0AACIDIAEtAABHDQBBASECAkACQCADQQNrDgIBAAMLIAAtAAEgAS0AAUcNAUEAIQIgAC0AAiABLQACRw0CIAAtAAMgAS0AA0YPCyAALQABIAEtAAFGDwtBACECCyACC2IBAn8gACAAKAJoIgIgACgCnAFBAWsiAyACIANJGzYCaCAAIAEgACgCqAFBACAALQC+ASICGyIBaiIDIAEgASADSRsiASAAKAKsASAAKAKgAUEBayACGyIAIAAgAUsbNgJsC1wAAkAgAiADTQRAIAEgA0kNASADIAJrIQMgACACaiECA0AgAwRAIAJBAToAACADQQFrIQMgAkEBaiECDAELCw8LIAIgA0H048AAEKQBAAsgAyABQfTjwAAQogEAC2gBBH8jAEEQayICJAAgASgCBCEDIAJBCGogASgCCCIEQQRBFEHwysAAEFcgAigCCCEFIAIoAgwgAyAEQRRsEBQhAyAAIAQ2AgggACADNgIEIAAgBTYCACAAIAEtAAw6AAwgAkEQaiQAC2ABA38jAEEgayICJAAgAkEIaiABQQFBAUHU48AAEFcgAkEUaiIDQQhqIgRBADYCACACIAIpAwg3AhQgAyABQQEQMyAAQQhqIAQoAgA2AgAgACACKQIUNwIAIAJBIGokAAtbAQJ/IAEQmQEgAUEIayIDKAIAQQFqIQIgAyACNgIAAkAgAgRAIAEoAgAiAkF/Rg0BIAAgAzYCCCAAIAE2AgQgACABQQRqNgIAIAEgAkEBajYCAA8LAAsQpwEAC5UBAQN/IAAoAgAiBCAAKAIIIgVGBEAjAEEQayIDJAAgA0EIaiAAIARBAUEEQRQQJCADKAIIIgRBgYCAgHhHBEAgAygCDBogBCACEJ0BAAsgA0EQaiQACyAAIAVBAWo2AgggACgCBCAFQRRsaiIAIAEpAgA3AgAgAEEIaiABQQhqKQIANwIAIABBEGogAUEQaigCADYCAAurAQEFfyAAKAIEIQIgACgCACEBIABChICAgMAANwIAAkAgASACRg0AIAIgAWtBBHYhAgNAIAJFDQEgASgCACABQQRqKAIAQRQQlQEgAkEBayECIAFBEGohAQwACwALIAAoAhAiAQRAIAAoAggiAigCCCIDIAAoAgwiBEcEQCACKAIEIgUgA0EEdGogBSAEQQR0aiABQQR0EBAgACgCECEBCyACIAEgA2o2AggLC04BBH8CQAJAAkAgAC0AACIEQQNrDgIAAQILIAAtAAEhAwwBCyAALQACQRB0IQEgAC0AA0EYdCECIAAtAAEhAwsgASACciADQQh0ciAEcgtSAQR/IAAoAgAhASAAKAIEIQQDQCABIARGBEBBAw8LIAAgAUEQaiICNgIAIAEvAQQhAyACIQFBBEEUQQMgA0EURhsgA0EERhsiAkEDRg0ACyACC0wBAn8gAkECdCECEAAhBANAIAIEQCAEIAMgASgCAEEAEJEBEAEgAkEEayECIANBAWohAyABQQRqIQEMAQsLIAAgBDYCBCAAQQA2AgALUgEBfyAAKAJsIgEgACgCrAFHBEAgACgCoAFBAWsgAUsEQCAAIAFBAWo2AmwgACAAKAJoIgEgACgCnAFBAWsiACAAIAFLGzYCaAsPCyAAQQEQfQsDAAALUwECfyABEJkBIAFBCGsiAigCAEEBaiEDIAIgAzYCAAJAIAMEQCABKAIADQEgACACNgIIIAAgATYCBCABQX82AgAgACABQQRqNgIADwsACxCnAQALUQECfyAAIAAoAmgiAiAAKAKcAUEBayIDIAIgA0kbNgJoIAAgACgCoAFBAWsgACgCrAEiAiAAKAJsIgAgAksbIgIgACABaiIAIAAgAksbNgJsC+0BAgR/AX4jAEEQayIGJAAjAEEQayIHJAAgBkEEaiIFAn8CQCACIANqQQFrQQAgAmtxrSABrX4iCUIgiKcNACAJpyIDQYCAgIB4IAJrSw0AIANFBEAgBSACNgIIIAVBADYCBEEADAILIAdBCGogAiADEIIBIAcoAggiCARAIAUgCDYCCCAFIAE2AgRBAAwCCyAFIAM2AgggBSACNgIEQQEMAQsgBUEANgIEQQELNgIAIAdBEGokACAGKAIIIQEgBigCBEUEQCAAIAYoAgw2AgQgACABNgIAIAZBEGokAA8LIAYoAgwaIAEgBBCdAQALVQECfyAAKAIEIgIgACgCACIBNgIAIAEEQCABIAI2AgQLQbiqwQAoAgAgACgCCCIAQQJ0aigCAEUEQEGwqsEAQbCqwQApAwBCASAAQT9xrYaFNwMACwtKAQJ/IAAgACgCaCICIAAoApwBQQFrIgMgAiADSRs2AmggACAAKAKoASICQQAgACgCbCIAIAJPGyICIAAgAWsiACAAIAJIGzYCbAs/AQF/IwBBEGsiAyQAIANBCGogABBoIAEgAygCDCIASQRAIAMoAgggA0EQaiQAIAFBBHRqDwsgASAAIAIQQgALhQEBA38gACgCACIEIAAoAggiBUYEQCMAQRBrIgMkACADQQhqIAAgBEEBQQJBDBAkIAMoAggiBEGBgICAeEcEQCADKAIMGiAEIAIQnQEACyADQRBqJAALIAAgBUEBajYCCCAAKAIEIAVBDGxqIgAgASkBADcBACAAQQhqIAFBCGooAQA2AQALRgEDfyABIAIgAxA+IgUgAWoiBC0AACEGIAQgA6dBGXYiBDoAACABIAVBCGsgAnFqQQhqIAQ6AAAgACAGOgAEIAAgBTYCAAtUAQF/IAAgACgCbDYCeCAAIAApAbIBNwF8IAAgAC8BvgE7AYYBIABBhAFqIABBugFqLwEAOwEAIAAgACgCaCIBIAAoApwBQQFrIgAgACABSxs2AnQLUQIBfwF+IwBBEGsiAiQAIAJBBGogARBNIAIoAgQpApwBIQNBCBCPASIBIAM3AgAgAigCCCACKAIMEJcBIABBAjYCBCAAIAE2AgAgAkEQaiQAC0kBAX8jAEEQayIFJAAgBUEIaiABEGggBSACIAMgBSgCCCAFKAIMIAQQYyAFKAIEIQEgACAFKAIANgIAIAAgATYCBCAFQRBqJAALSAECfwJAIAEoAgAiAkF/RwRAIAJBAWohAyACQQZJDQEgA0EGQcThwAAQogEAC0HE4cAAEHMACyAAIAM2AgQgACABQQRqNgIAC0IBAX8gAkECdCECA0AgAgRAIAAoAgAhAyAAIAEoAgA2AgAgASADNgIAIAJBAWshAiABQQRqIQEgAEEEaiEADAELCwtIAQJ/IwBBEGsiAiQAIAJBCGogACAAKAIAQQFBBEEEECQgAigCCCIAQYGAgIB4RwRAIAIoAgwhAyAAIAEQnQEACyACQRBqJAALPwACQCABIAJNBEAgAiAETQ0BIAIgBCAFEKIBAAsgASACIAUQpAEACyAAIAIgAWs2AgQgACADIAFBBHRqNgIAC0gBAn8jAEEQayIFJAAgBUEIaiAAIAEgAiADIAQQJCAFKAIIIgBBgYCAgHhHBEAgBSgCDCEGIABBhMzAABCdAQALIAVBEGokAAtBACAALQC8AUEBRgRAIABBADoAvAEgAEH0AGogAEGIAWoQaiAAIABBJGoQayAAKAJgIAAoAmRBACAAKAKgARBKCwtBAQN/IAEoAhQiAiABKAIcIgNrIQQgAiADSQRAIAQgAkHAz8AAEKMBAAsgACADNgIEIAAgASgCECAEQQR0ajYCAAtCAQF/IwBBIGsiAyQAIANBADYCECADQQE2AgQgA0IENwIIIAMgATYCHCADIAA2AhggAyADQRhqNgIAIAMgAhCAAQALQQEDfyABKAIUIgIgASgCHCIDayEEIAIgA0kEQCAEIAJB0M/AABCjAQALIAAgAzYCBCAAIAEoAhAgBEEEdGo2AgALRAEBfyABKAIAIgIgASgCBEYEQCAAQYCAgIB4NgIADwsgASACQRBqNgIAIAAgAikCADcCACAAQQhqIAJBCGopAgA3AgALOwEDfwNAIAJBFEZFBEAgACACaiIDKAIAIQQgAyABIAJqIgMoAgA2AgAgAyAENgIAIAJBBGohAgwBCwsLOwEDfwNAIAJBJEZFBEAgACACaiIDKAIAIQQgAyABIAJqIgMoAgA2AgAgAyAENgIAIAJBBGohAgwBCwsLQAECfyAAKAIAIAAoAgRBBBCVASAAKAIMIQEgACgCECIAKAIAIgIEQCABIAIRAgALIAAoAgQiAARAIAEgABA7Cws6AQF/AkAgAkF/RwRAIAJBAWohBCACQSBJDQEgBEEgIAMQogEACyADEHMACyAAIAQ2AgQgACABNgIACzgAAkAgAWlBAUcNAEGAgICAeCABayAASQ0AIAAEQEH4qsEALQAAGiABIAAQFSIBRQ0BCyABDwsACy0BAX8gASAAKAIATwR/IAAoAgQhAiAALQAIRQRAIAEgAk0PCyABIAJJBUEACwtwAQN/IAAoAgAiBCAAKAIIIgVGBEAjAEEQayIDJAAgA0EIaiAAIARBAUECQQgQJCADKAIIIgRBgYCAgHhHBEAgAygCDBogBCACEJ0BAAsgA0EQaiQACyAAIAVBAWo2AgggACgCBCAFQQN0aiABNwEACzQBAX8gACgCCCIDIAAoAgBGBEAgACACEGILIAAgA0EBajYCCCAAKAIEIANBAnRqIAE2AgALLgEBfyMAQRBrIgIkACACQQhqIAEgABCCASACKAIIIgAEQCACQRBqJAAgAA8LAAs3AQF/IwBBIGsiASQAIAFBADYCGCABQQE2AgwgAUGM6cAANgIIIAFCBDcCECABQQhqIAAQgAEACyUAIABBgQJPBEAgAEEeIABnIgBrdiAAQQF0a0E8ag8LIABBBHYLKwAgAiADSQRAIAMgAiAEEKMBAAsgACACIANrNgIEIAAgASADQRRsajYCAAsvAQF/IAAgAhCEASAAKAIEIAAoAggiA0EUbGogASACQRRsEBQaIAAgAiADajYCCAsrACABIANLBEAgASADIAQQowEACyAAIAMgAWs2AgQgACACIAFBBHRqNgIACy8AAkACQCADaUEBRw0AQYCAgIB4IANrIAFJDQAgACABIAMgAhAiIgANAQsACyAACywAA0AgAQRAIAAoAgAgAEEEaigCAEEUEJUBIAFBAWshASAAQRBqIQAMAQsLCzIBAX8gACgCCCECIAEgACgCAEECai0AABCRASEBIAAoAgQgAiABEAEgACACQQFqNgIICyoAIAAgACgCaCABaiIBIAAoApwBIgBBAWsgACABSxtBACABQQBOGzYCaAszAQJ/IAAgACgCqAEiAiAAKAKsAUEBaiIDIAEgAEGyAWoQMSAAKAJgIAAoAmQgAiADEEoLMwECfyAAIAAoAqgBIgIgACgCrAFBAWoiAyABIABBsgFqEBogACgCYCAAKAJkIAIgAxBKCyoAIAEgAkkEQEGkyMAAQSNBvMnAABBnAAsgAiAAIAJBFGxqIAEgAmsQFws1ACAAIAApAnQ3AmggACAAKQF8NwGyASAAIAAvAYYBOwG+ASAAQboBaiAAQYQBai8BADsBAAvsAQICfwF+IwBBEGsiAiQAIAJBATsBDCACIAE2AgggAiAANgIEIwBBEGsiASQAIAJBBGoiACkCACEEIAEgADYCDCABIAQ3AgQjAEEQayIAJAAgAUEEaiIBKAIAIgIoAgwhAwJAAkACQAJAIAIoAgQOAgABAgsgAw0BQQEhAkEAIQMMAgsgAw0AIAIoAgAiAigCBCEDIAIoAgAhAgwBCyAAQYCAgIB4NgIAIAAgATYCDCABKAIIIgEtAAkaIABBFSABLQAIEEEACyAAIAM2AgQgACACNgIAIAEoAggiAS0ACRogAEEWIAEtAAgQQQALKwECfwJAIAAoAgQgACgCCCIBEDAiAkUNACABIAJJDQAgACABIAJrNgIICwsmACACBEBB+KrBAC0AABogASACEBUhAQsgACACNgIEIAAgATYCAAsjAQF/IAEgACgCACAAKAIIIgJrSwRAIAAgAiABQQRBEBBkCwsjAQF/IAEgACgCACAAKAIIIgJrSwRAIAAgAiABQQRBFBBkCwslACAAQQE2AgQgACABKAIEIAEoAgBrQQR2IgE2AgggACABNgIACxsAIAEgAk0EQCACIAEgAxBCAAsgACACQRRsagsgACABIAJNBEAgAiABQeTjwAAQQgALIAAgAmpBAToAAAsbACABIAJNBEAgAiABIAMQQgALIAAgAkEEdGoLAwAACwMAAAsDAAALAwAACwMAAAsDAAALGgBB+KrBAC0AABpBBCAAEBUiAARAIAAPCwALAwAACxYAIAFBAXFFBEAgALgQBw8LIACtEAgLRAEBfyAAIAAoAgBBAWsiATYCACABRQRAIABBDGoQRwJAIABBf0YNACAAIAAoAgRBAWsiATYCBCABDQAgAEGcBhA7CwsLHgEBfyAAKAIQIgEgACgCFBB5IAAoAgwgAUEQEJUBCx4BAX8gACgCBCIBIAAoAggQeSAAKAIAIAFBEBCVAQsQACAABEAgASAAIAJsEDsLCxYAIABBEGoQTyAAKAIAIAAoAgQQmAELFAAgACAAKAIAQQFrNgIAIAEQkgELFwAgAEGAgICAeEcEQCAAIAFBFBCVAQsLEwAgAARADwtBpKnBAEEbEKgBAAsPACAAQYQBTwRAIAAQAgsLDQAgAQRAIAAgARA7CwsNACABBEAgACABEDsLCzwAIABFBEAjAEEgayIAJAAgAEEANgIYIABBATYCDCAAQdDEwAA2AgggAEIENwIQIABBCGogARCAAQALAAsRACAAKAIIIAAoAgBBAhCVAQsUACAAQQA2AgggAEKAgICAEDcCAAsSACAAIAFBkM3AABBaQQE6AAwLDgAgAEEANgIAIAEQkgELawEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQejpwAA2AgggA0ICNwIUIAMgA0EEaq1CgICAgIABhDcDKCADIAOtQoCAgICAAYQ3AyAgAyADQSBqNgIQIANBCGogAhCAAQALawEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQcjpwAA2AgggA0ICNwIUIAMgA0EEaq1CgICAgIABhDcDKCADIAOtQoCAgICAAYQ3AyAgAyADQSBqNgIQIANBCGogAhCAAQALawEBfyMAQTBrIgMkACADIAE2AgQgAyAANgIAIANBAjYCDCADQZzqwAA2AgggA0ICNwIUIAMgA0EEaq1CgICAgIABhDcDKCADIAOtQoCAgICAAYQ3AyAgAyADQSBqNgIQIANBCGogAhCAAQALDgBB8OXAAEErIAAQZwALCwAgACMAaiQAIwALDgBBv6nBAEHPABCoAQALCQAgACABEAYACwwAIAAgASkCADcDAAsKACAAKAIAEJoBCw0AIABBgICAgHg2AgALCQAgAEEANgIACwYAIAAQTwsL0m0gAEGAgMAAC0AXAAAABAAAAAQAAAAYAAAAY2FsbGVkIGBSZXN1bHQ6OnVud3JhcCgpYCBvbiBhbiBgRXJyYCB2YWx1ZUVycm9yAEG/icAACwF4AEHgicAACxD/////////////////////AEGGisAACw8BAAAAAAAgAAAAAAAAAAIAQcCKwAALIP//////////////////////////////////////////AEGki8AACwgQAAAAAAAAAQBBwLjAAAsC/wcAQdS4wAALBw8A////9f8AQYC5wAALFv///////////////////////////wMAQaC5wAALHf////////////////////////////////////8PAEH/ucAACxj8//////////////////////////////8AQaC6wAALPv//////////////////////////////////////////////////////////////////////////////////AEGMu8AACzj/////////////////////////////////////////////////////////////////////////fwBB4LvAAAvRAf////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8DAEHAvcAACyf//////////////////////////////////////////////////w8AQcDAwAALwSNzcmMvbGliLnJzAAABAA8A8BoPAAAAAADiJQAA5SUAAAAAAACw4AAAv+AAAAAAAAA8+wEAafsBAAAAAABq+wEAbPsBAAAAAACAJQAAnyUAAAAAAAAA+wEAO/sBAAAAAABhdHRlbXB0ZWQgdG8gdGFrZSBvd25lcnNoaXAgb2YgUnVzdCB2YWx1ZSB3aGlsZSBpdCB3YXMgYm9ycm93ZWRiZ3RleHRjb2RlcG9pbnRzcmFzdGVyX3N5bWJvbHN2ZWN0b3Jfc3ltYm9scwBAIBAACgAAAGUAAAATAAAAQCAQAAoAAABmAAAAFQAAAEAgEAAKAAAAZwAAABkAAABAIBAACgAAAGgAAAAZAAAAQCAQAAoAAABpAAAAFQAAAEAgEAAKAAAAcQAAADYAAABAIBAACgAAAHYAAAA2AAAAQCAQAAoAAAD9AAAAGwAAAEAgEAAKAAAAAQEAAB0AAABAIBAACgAAABgBAAAtAAAAQCAQAAoAAACuAAAAIwAAAEAgEAAKAAAAuAAAACMAAABAIBAACgAAAM0AAAAlAAAAQCAQAAoAAADFAAAAJQAAAEAgEAAKAAAA8gAAACkAAABAIBAACgAAANkAAAAlAAAAQCAQAAoAAADdAAAAFgAAAEAgEAAKAAAA+AAAAB0AAABAIBAACgAAAB8BAAAvAAAAY2FwYWNpdHkgb3ZlcmZsb3cAAAA8IhAAEQAAACkgc2hvdWxkIGJlIDwgbGVuIChpcyBpbnNlcnRpb24gaW5kZXggKGlzICkgc2hvdWxkIGJlIDw9IGxlbiAoaXMgAAAAbiIQABQAAACCIhAAFwAAABZVEAABAAAAcmVtb3ZhbCBpbmRleCAoaXMgAAC0IhAAEgAAAFgiEAAWAAAAFlUQAAEAAABgYXRgIHNwbGl0IGluZGV4IChpcyAAAADgIhAAFQAAAIIiEAAXAAAAFlUQAAEAAAAvaG9tZS9ydW5uZXIvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi91bmljb2RlLXdpZHRoLTAuMS4xNC9zcmMvdGFibGVzLnJzECMQAGQAAACRAAAAFQAAABAjEABkAAAAlwAAABkAAAAvbml4L3N0b3JlLzI4aHl6ZmwzMzhrczRhbWhhN3ZwcG5sYnExczFucWF2LXJ1c3QtZGVmYXVsdC0xLjg1LjAvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9jb3JlL3NyYy9pdGVyL3RyYWl0cy9pdGVyYXRvci5ycwAAAJQjEAB9AAAAswcAAAkAAABhc3NlcnRpb24gZmFpbGVkOiBtaWQgPD0gc2VsZi5sZW4oKS9uaXgvc3RvcmUvMjhoeXpmbDMzOGtzNGFtaGE3dnBwbmxicTFzMW5xYXYtcnVzdC1kZWZhdWx0LTEuODUuMC9saWIvcnVzdGxpYi9zcmMvcnVzdC9saWJyYXJ5L2NvcmUvc3JjL3NsaWNlL21vZC5ycwAAAEckEAByAAAAoA0AAAkAAABhc3NlcnRpb24gZmFpbGVkOiBrIDw9IHNlbGYubGVuKCkAAABHJBAAcgAAAM0NAAAJAAAAL25peC9zdG9yZS8yOGh5emZsMzM4a3M0YW1oYTd2cHBubGJxMXMxbnFhdi1ydXN0LWRlZmF1bHQtMS44NS4wL2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3NsaWNlLnJzAAAlEABvAAAAoQAAABkAAAAvbml4L3N0b3JlLzI4aHl6ZmwzMzhrczRhbWhhN3ZwcG5sYnExczFucWF2LXJ1c3QtZGVmYXVsdC0xLjg1LjAvbGliL3J1c3RsaWIvc3JjL3J1c3QvbGlicmFyeS9hbGxvYy9zcmMvdmVjL21vZC5ycwAAAIAlEABxAAAAPwoAACQAAABAUxAAcQAAACgCAAARAAAAL2hvbWUvcnVubmVyLy5jYXJnby9yZWdpc3RyeS9zcmMvaW5kZXguY3JhdGVzLmlvLTE5NDljZjhjNmI1YjU1N2YvYXZ0LTAuMTYuMC9zcmMvYnVmZmVyLnJzAAAUJhAAWgAAAC0AAAAZAAAAFCYQAFoAAABaAAAADQAAABQmEABaAAAAXgAAAA0AAAAUJhAAWgAAAGMAAAANAAAAFCYQAFoAAABoAAAAHQAAABQmEABaAAAAdQAAACUAAAAUJhAAWgAAAH8AAAAlAAAAFCYQAFoAAACHAAAAFQAAABQmEABaAAAAkQAAACUAAAAUJhAAWgAAAJgAAAAVAAAAFCYQAFoAAACdAAAAJQAAABQmEABaAAAAqAAAABEAAAAUJhAAWgAAALMAAAAgAAAAFCYQAFoAAAC3AAAAEQAAABQmEABaAAAAuQAAABEAAAAUJhAAWgAAAMMAAAANAAAAFCYQAFoAAADHAAAAEQAAABQmEABaAAAAygAAAA0AAAAUJhAAWgAAAPQAAAArAAAAFCYQAFoAAAA5AQAALAAAABQmEABaAAAAMgEAABsAAAAUJhAAWgAAAEUBAAAUAAAAFCYQAFoAAABXAQAAGAAAABQmEABaAAAAXAEAABgAAABhc3NlcnRpb24gZmFpbGVkOiBsaW5lcy5pdGVyKCkuYWxsKHxsfCBsLmxlbigpID09IGNvbHMpABQmEABaAAAA9wEAAAUAAAAAAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAACAAAAAhAAAAIgAAACMAAAAkAAAAJQAAACYAAAAnAAAAKAAAACkAAAAqAAAAKwAAACwAAAAtAAAALgAAAC8AAAAwAAAAMQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAAAA5AAAAOgAAADsAAAA8AAAAPQAAAD4AAAA/AAAAQAAAAEEAAABCAAAAQwAAAEQAAABFAAAARgAAAEcAAABIAAAASQAAAEoAAABLAAAATAAAAE0AAABOAAAATwAAAFAAAABRAAAAUgAAAFMAAABUAAAAVQAAAFYAAABXAAAAWAAAAFkAAABaAAAAWwAAAFwAAABdAAAAXgAAAF8AAABmJgAAkiUAAAkkAAAMJAAADSQAAAokAACwAAAAsQAAACQkAAALJAAAGCUAABAlAAAMJQAAFCUAADwlAAC6IwAAuyMAAAAlAAC8IwAAvSMAABwlAAAkJQAANCUAACwlAAACJQAAZCIAAGUiAADAAwAAYCIAAKMAAADFIgAAfwAAAC9ob21lL3J1bm5lci8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2F2dC0wLjE2LjAvc3JjL2xpbmUucnM4KhAAWAAAABAAAAAUAAAAOCoQAFgAAAAdAAAAFgAAADgqEABYAAAAHgAAABcAAAA4KhAAWAAAACEAAAATAAAAOCoQAFgAAAArAAAAJAAAADgqEABYAAAAMQAAABsAAAA4KhAAWAAAADUAAAAbAAAAOCoQAFgAAAA8AAAAGwAAADgqEABYAAAAPQAAABsAAAA4KhAAWAAAAEEAAAAbAAAAOCoQAFgAAABDAAAAHgAAADgqEABYAAAARAAAAB8AAAA4KhAAWAAAAEcAAAAbAAAAOCoQAFgAAABOAAAAGwAAADgqEABYAAAATwAAABsAAAA4KhAAWAAAAFYAAAAbAAAAOCoQAFgAAABXAAAAGwAAADgqEABYAAAAXgAAABsAAAA4KhAAWAAAAF8AAAAbAAAAOCoQAFgAAABtAAAAGwAAADgqEABYAAAAdQAAABsAAAA4KhAAWAAAAHYAAAAbAAAAOCoQAFgAAAB4AAAAHgAAADgqEABYAAAAeQAAAB8AAAA4KhAAWAAAAHwAAAAbAAAAaW50ZXJuYWwgZXJyb3I6IGVudGVyZWQgdW5yZWFjaGFibGUgY29kZTgqEABYAAAAgAAAABEAAAA4KhAAWAAAAIkAAAAnAAAAOCoQAFgAAACNAAAAFwAAADgqEABYAAAAkAAAABMAAAA4KhAAWAAAAJIAAAAnAAAAOCoQAFgAAACWAAAAIwAAADgqEABYAAAAmwAAABYAAAA4KhAAWAAAAJwAAAAXAAAAOCoQAFgAAACfAAAAEwAAADgqEABYAAAAoQAAACcAAAA4KhAAWAAAAKgAAAATAAAAOCoQAFgAAAC9AAAAFQAAADgqEABYAAAAvwAAACUAAAA4KhAAWAAAAMAAAAAcAAAAOCoQAFgAAADDAAAAJQAAADgqEABYAAAA7QAAADAAAAA4KhAAWAAAAPQAAAAjAAAAOCoQAFgAAAD5AAAAJQAAADgqEABYAAAA+gAAABwAAAAvaG9tZS9ydW5uZXIvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9hdnQtMC4xNi4wL3NyYy9wYXJzZXIucnMAAHgtEABaAAAAxgEAACIAAAB4LRAAWgAAANoBAAANAAAAeC0QAFoAAADcAQAADQAAAHgtEABaAAAATQIAACYAAAB4LRAAWgAAAFICAAAmAAAAeC0QAFoAAABYAgAAGAAAAHgtEABaAAAAcAIAABMAAAB4LRAAWgAAAHQCAAATAAAAeC0QAFoAAAAFAwAAJwAAAHgtEABaAAAACwMAACcAAAB4LRAAWgAAABEDAAAnAAAAeC0QAFoAAAAXAwAAJwAAAHgtEABaAAAAHQMAACcAAAB4LRAAWgAAACMDAAAnAAAAeC0QAFoAAAApAwAAJwAAAHgtEABaAAAALwMAACcAAAB4LRAAWgAAADUDAAAnAAAAeC0QAFoAAAA7AwAAJwAAAHgtEABaAAAAQQMAACcAAAB4LRAAWgAAAEcDAAAnAAAAeC0QAFoAAABNAwAAJwAAAHgtEABaAAAAUwMAACcAAAB4LRAAWgAAAG4DAAArAAAAeC0QAFoAAAB3AwAALwAAAHgtEABaAAAAewMAAC8AAAB4LRAAWgAAAIMDAAAvAAAAeC0QAFoAAACHAwAALwAAAHgtEABaAAAAjAMAACsAAAB4LRAAWgAAAJEDAAAnAAAAeC0QAFoAAACtAwAAKwAAAHgtEABaAAAAtgMAAC8AAAB4LRAAWgAAALoDAAAvAAAAeC0QAFoAAADCAwAALwAAAHgtEABaAAAAxgMAAC8AAAB4LRAAWgAAAMsDAAArAAAAeC0QAFoAAADQAwAAJwAAAHgtEABaAAAA3gMAACcAAAB4LRAAWgAAANcDAAAnAAAAeC0QAFoAAACYAwAAJwAAAHgtEABaAAAAWgMAACcAAAB4LRAAWgAAAGADAAAnAAAAeC0QAFoAAACfAwAAJwAAAHgtEABaAAAAZwMAACcAAAB4LRAAWgAAAKYDAAAnAAAAeC0QAFoAAADkAwAAJwAAAHgtEABaAAAADgQAABMAAAB4LRAAWgAAABcEAAAbAAAAeC0QAFoAAAAgBAAAFAAAAC9ob21lL3J1bm5lci8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL2F2dC0wLjE2LjAvc3JjL3RhYnMucnPUMBAAWAAAAAkAAAASAAAA1DAQAFgAAAARAAAAFAAAANQwEABYAAAAFwAAABQAAADUMBAAWAAAAB8AAAAUAAAAL2hvbWUvcnVubmVyLy5jYXJnby9yZWdpc3RyeS9zcmMvaW5kZXguY3JhdGVzLmlvLTE5NDljZjhjNmI1YjU1N2YvYXZ0LTAuMTYuMC9zcmMvdGVybWluYWwvZGlydHlfbGluZXMucnNsMRAAaAAAAAgAAAAUAAAAbDEQAGgAAAAMAAAADwAAAGwxEABoAAAAEAAAAA8AQYzkwAALzwcBAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAUAAAABAAAAB4AAAAfAAAAIAAAACEAAAAvaG9tZS9ydW5uZXIvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi9hdnQtMC4xNi4wL3NyYy90ZXJtaW5hbC5yczwyEABcAAAAdQIAABUAAAA8MhAAXAAAALECAAAOAAAAPDIQAFwAAAAFBAAAIwAAAEJvcnJvd011dEVycm9yYWxyZWFkeSBib3Jyb3dlZDog1jIQABIAAABjYWxsZWQgYE9wdGlvbjo6dW53cmFwKClgIG9uIGEgYE5vbmVgIHZhbHVlaW5kZXggb3V0IG9mIGJvdW5kczogdGhlIGxlbiBpcyAgYnV0IHRoZSBpbmRleCBpcyAAAAAbMxAAIAAAADszEAASAAAAOiAAAAEAAAAAAAAAYDMQAAIAAAAAAAAADAAAAAQAAAAiAAAAIwAAACQAAAAgICAgLAooKAowMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OWF0dGVtcHRlZCB0byBpbmRleCBzbGljZSB1cCB0byBtYXhpbXVtIHVzaXplAAAAXTQQACwAAAByYW5nZSBzdGFydCBpbmRleCAgb3V0IG9mIHJhbmdlIGZvciBzbGljZSBvZiBsZW5ndGgglDQQABIAAACmNBAAIgAAAHJhbmdlIGVuZCBpbmRleCDYNBAAEAAAAKY0EAAiAAAAc2xpY2UgaW5kZXggc3RhcnRzIGF0ICBidXQgZW5kcyBhdCAA+DQQABYAAAAONRAADQAAAEhhc2ggdGFibGUgY2FwYWNpdHkgb3ZlcmZsb3csNRAAHAAAAC9ydXN0L2RlcHMvaGFzaGJyb3duLTAuMTUuMi9zcmMvcmF3L21vZC5ycwAAUDUQACoAAAAjAAAAKAAAALFTEABsAAAAIwEAAA4AAABjbG9zdXJlIGludm9rZWQgcmVjdXJzaXZlbHkgb3IgYWZ0ZXIgYmVpbmcgZHJvcHBlZAAA///////////QNRAAQejrwAALdS9ob21lL3J1bm5lci8uY2FyZ28vcmVnaXN0cnkvc3JjL2luZGV4LmNyYXRlcy5pby0xOTQ5Y2Y4YzZiNWI1NTdmL3NlcmRlLXdhc20tYmluZGdlbi0wLjYuNS9zcmMvbGliLnJzAAAA6DUQAGUAAAA1AAAADgBBge3AAAuHAQECAwMEBQYHCAkKCwwNDgMDAwMDAwMPAwMDAwMDAw8JCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCRAJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQBBge/AAAufCwECAgICAwICBAIFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdAgIeAgICAgICAh8gISIjAiQlJicoKQIqAgICAissAgICAi0uAgICLzAxMjMCAgICAgI0AgI1NjcCODk6Ozw9Pj85OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTlAOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OUECAkJDAgJERUZHSEkCSjk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OUsCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI5OTk5TAICAgICTU5PUAICAlECUlMCAgICAgICAgICAgICVFUCAlYCVwICWFlaW1xdXl9gYQJiYwJkZWZnAmgCaWprbAICbW5vcAJxcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICcwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnR1AgICAgICAnZ3OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTl4OTk5OTk5OTk5eXoCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAns5OXw5OX0CAgICAgICAgICAgICAgICAgICfgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAn8CAgKAgYICAgICAgICAgICAgICAgKDhAICAgICAgICAgKFhnUCAocCAgKIAgICAgICAomKAgICAgICAgICAgICAouMAo2OAo+QkZKTlJWWApcCApiZmpsCAgICAgICAgICOTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5nB0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAnQICAgKenwIEAgUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0CAh4CAgICAgICHyAhIiMCJCUmJygpAioCAgICoKGio6Slpi6nqKmqq6ytMwICAgICAq4CAjU2NwI4OTo7PD0+rzk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OTk5OUwCAgICArBOT7GFhnUCAocCAgKIAgICAgICAomKAgICAgICAgICAgICAouMsrOOAo+QkZKTlJWWApcCApiZmpsCAgICAgICAgICVVV1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAEG8+sAACylVVVVVFQBQVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAQBB7/rAAAvEARBBEFVVVVVVV1VVVVVVVVVVVVFVVQAAQFT13VVVVVVVVVVVFQAAAAAAVVVVVfxdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUFABQAFARQVVVVVVVVVRVRVVVVVVVVVQAAAAAAAEBVVVVVVVVVVVXVV1VVVVVVVVVVVVVVBQAAVFVVVVVVVVVVVVVVVVUVAABVVVFVVVVVVQUQAAABAVBVVVVVVVVVVVVVAVVVVVVV/////39VVVVQVQAAVVVVVVVVVVVVVQUAQcD8wAALmARAVVVVVVVVVVVVVVVVVUVUAQBUUQEAVVUFVVVVVVVVVVFVVVVVVVVVVVVVVVVVVUQBVFVRVRVVVQVVVVVVVVVFQVVVVVVVVVVVVVVVVVVVVEEVFFBRVVVVVVVVVVBRVVVBVVVVVVVVVVVVVVVVVVVUARBUUVVVVVUFVVVVVVUFAFFVVVVVVVVVVVVVVVVVVQQBVFVRVQFVVQVVVVVVVVVVRVVVVVVVVVVVVVVVVVVVRVRVVVFVFVVVVVVVVVVVVVVUVFVVVVVVVVVVVVVVVVUEVAUEUFVBVVUFVVVVVVVVVVFVVVVVVVVVVVVVVVVVVRREBQRQVUFVVQVVVVVVVVVVUFVVVVVVVVVVVVVVVVUVRAFUVUFVFVVVBVVVVVVVVVVRVVVVVVVVVVVVVVVVVVVVVVVFFQVEVRVVVVVVVVVVVVVVVVVVVVVVVVVVVVEAQFVVFQBAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUQAAVFVVAEBVVVVVVVVVVVVVVVVVVVVVVVVQVVVVVVVVEVFVVVVVVVVVVVVVVVVVAQAAQAAEVQEAAAEAAAAAAAAAAFRVRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUBBABBQVVVVVVVVVAFVFVVVQFUVVVFQVVRVVVVUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqgBBgIHBAAuQA1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAVVVVVVVVVVVVVVVVQVUVVVVVVVVBVVVVVVVVVUFVVVVVVVVVQVVVVV///33//3XX3fW1ddVEABQVUUBAABVV1FVVVVVVVVVVVVVFQBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUFVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAVVFVFVQFVVVVVVVVVVVVVVVVVVVVVVVVVVVVXFRRVVVVVVVVVVVVVVVVVVUUAQEQBAFQVAAAUVVVVVVVVVVVVVVVVAAAAAAAAAEBVVVVVVVVVVVVVVVUAVVVVVVVVVVVVVVVVAABQBVVVVVVVVVVVVRUAAFVVVVBVVVVVVVVVBVAQUFVVVVVVVVVVVVVVVVVFUBFQVVVVVVVVVVVVVVVVVVUAAAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAAAAAEAFRRVVRQVVVVVVVVVVVVVVVVVVVVVVUAQaCEwQALkwhVVRUAVVVVVVVVBUBVVVVVVVVVVVVVVVUAAAAAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAAAAAAAAAABUVVVVVVVVVVVV9VVVVWlVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf1X11VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV9VVVVVVVfVVVVVVVVVVVVVVVV////VVVVVVVVVVVVVdVVVVVV1VVVVV1V9VVVVVV9VV9VdVVXVVVVVXVV9V11XVVd9VVVVVVVVVVXVVVVVVVVVVV31d9VVVVVVVVVVVVVVVVVVVX9VVVVVVVVV1VV1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVXVV1VVVVVVVVVVVVVVVVddVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRVQVVVVVVVVVVVVVVVVVVVV/f///////////////19V1VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAAAAAAAAAAKqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqVVVVqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpaVVVVVVVVqqqqqqqqqqqqqqqqqqoKAKqqqmqpqqqqqqqqqqqqqqqqqqqqqqqqqqpqgaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpVqaqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqKqqqqqqqqqqqmqqqqqqqqqqqqqqqqqqqqqqqqqqqqpVVZWqqqqqqqqqqqqqqmqqqqqqqqqqqqqqVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqVVVVVVVVVVVVVVVVVVVVVaqqqlaqqqqqqqqqqqqqqqqqalVVVVVVVVVVVVVVVVVfVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFUAAAFBVVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVVUFVVVUVFFVVVVVVVVUFVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQVVVVVVVVAAAAAFBVRRVVVVVVVVVVVVUFAFBVVVVVVRUAAFBVVVWqqqqqqqqqVkBVVVVVVVVVVVVVVRUFUFBVVVVVVVVVVVVRVVVVVVVVVVVVVVVVVVVVVQFAQUFVVRVVVVRVVVVVVVVVVVVVVVRVVVVVVVVVVVVVVVUEFFQFUVVVVVVVVVVVVVVQVUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRVFFVVVVVqqqqqqqqqqqqVVVVAAAAAABAFQBBv4zBAAvhDFVVVVVVVVVVRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQAAAPCqqlpVAAAAAKqqqqqqqqqqaqqqqqpqqlVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRWpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpWVVVVVVVVVVVVVVVVVVUFVFVVVVVVVVVVVVVVVVVVVapqVVUAAFRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBUBVAUFVAFVVVVVVVVVVVVVAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQVVVVVVVVdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVRVVVVVVVVVVVVVVVVVVVVVVVVVAVVVVVVVVVVVVVVVVVVVVVVVBQAAVFVVVVVVVVVVVVVVBVBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRVVVVVVVVVVVVVVVVVQAAAEBVVVVVVVVVVVVVFFRVFVBVVVVVVVVVVVVVVRVAQVVFVVVVVVVVVVVVVVVVVVVVQFVVVVVVVVVVFQABAFRVVVVVVVVVVVVVVVVVVRVVVVVQVVVVVVVVVVVVVVVVBQBABVUBFFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVAEVUVRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUVFQBAVVVVVVVQVVVVVVVVVVVVVVVVVRVEVFVVVVUVVVVVBQBUAFRVVVVVVVVVVVVVVVVVVVVVAAAFRFVVVVVVRVVVVVVVVVVVVVVVVVVVVVVVVVVVFABEEQRVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRUFUFUQVFVVVVVVVVBVVVVVVVVVVVVVVVVVVVVVVVVVVRUAQBFUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRVRABBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAQUQAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFQAAQVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFUVBBFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUABVVUVVVVVVVVVQEAQFVVVVVVVVVVVRUABEBVFVVVAUABVVVVVVVVVVVVVQAAAABAUFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAQAAQVVVVVVVVVVVVVVVVVVVVVVVVVVUFAAAAAAAFAARBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAUBFEAAAVVVVVVVVVVVVVVVVVVVVVVVVUBFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUVVFVVQFVVVVVVVVVVVVVVVQVAVURVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBUAAABQVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAVFVVVVVVVVVVVVVVVVVVAEBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVRVAVVVVVVVVVVVVVVVVVVVVVVVVVapUVVVaVVVVqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqVVWqqqqqqqqqqqqqqqqqqqqqqqqqqqpaVVVVVVVVVVVVVaqqVlVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVaqpqmmqqqqqqqqqqmpVVVVlVVVVVVVVVWpZVVVVqlVVqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpVVVVVVVVVVUEAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUAQauZwQALdVAAAAAAAEBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVURUAUAAAAAQAEAVVVVVVVVVQVQVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBVRVVVVVVVVVVVVVVVVVVQBBrZrBAAsCQBUAQbuawQALxQZUVVFVVVVUVVVVVRUAAQAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVAEAAAAAAFAAQBEBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVUVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRVVVVVVVVVVVVVVVVVVVVQBVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQBAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAEBVVVVVVVVVVVVVVVVVVVdVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV1VVVVVVVVVVVVVVVVVVVVXX9/39VVVVVVVVVVVVVVVVVVVVVVVX1////////blVVVaqquqqqqqrq+r+/VaqqVlVfVVVVqlpVVVVVVVX//////////1dVVf3/3///////////////////////9///////VVVV/////////////3/V/1VVVf////9XV///////////////////////f/f/////////////////////////////////////////////////////////////1////////////////////19VVdV/////////VVVVVXVVVVVVVVV9VVVVV1VVVVVVVVVVVVVVVVVVVVVVVVVV1f///////////////////////////1VVVVVVVVVVVVVVVf//////////////////////X1VXf/1V/1VV1VdV//9XVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV////VVdVVVVVVVX//////////////3///9//////////////////////////////////////////////////////////////VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVf///1f//1dV///////////////f/19V9f///1X//1dV//9XVaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpaVVVVVVVVVVVZllVhqqVZqlVVVVVVlVVVVVVVVVWVVVUAQY6hwQALAQMAQZyhwQALiQlVVVVVVZVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVRUAlmpaWmqqBUCmWZVlVVVVVVVVVVUAAAAAVVZVValWVVVVVVVVVVVVVlVVVVVVVVVVAAAAAAAAAABUVVVVlVlZVVVlVVVpVVVVVVVVVVVVVVWVVpVqqqqqVaqqWlVVVVlVqqqqVVVVVWVVVVpVVVVVpWVWVVVVlVVVVVVVVaaWmpZZWWWplqqqZlWqVVpZVVpWZVVVVWqqpaVaVVVVpapaVVVZWVVVWVVVVVVVlVVVVVVVVVVVVVVVVVVVVVVVVVVVZVX1VVVVaVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqVaqqqqqqqqqqqlVVVaqqqqqlWlVVmqpaVaWlVVpapZalWlVVVaVaVZVVVVV9VWlZpVVfVWZVVVVVVVVVVWZV////VVVVmppqmlVVVdVVVVVV1VVVpV1V9VVVVVW9Va+quqqrqqqaVbqq+q66rlVd9VVVVVVVVVVXVVVVVVlVVVV31d9VVVVVVVVVpaqqVVVVVVVV1VdVVVVVVVVVVVVVVVVXrVpVVVVVVVVVVVWqqqqqqqqqaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqgAAAMCqqlpVAAAAAKqqqqqqqqqqaqqqqqpqqlVVVVVVVVVVVVVVVQVUVVVVVVVVVVVVVVVVVVVVqmpVVQAAVFmqqmpVqqqqqqqqqlqqqqqqqqqqqqqqqqqqqlpVqqqqqqqqqrr+/7+qqqqqVlVVVVVVVVVVVVVVVVX1////////L25peC9zdG9yZS8yOGh5emZsMzM4a3M0YW1oYTd2cHBubGJxMXMxbnFhdi1ydXN0LWRlZmF1bHQtMS44NS4wL2xpYi9ydXN0bGliL3NyYy9ydXN0L2xpYnJhcnkvYWxsb2Mvc3JjL3Jhd192ZWMucnMvaG9tZS9ydW5uZXIvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi93YXNtLWJpbmRnZW4tMC4yLjEwNi9zcmMvY29udmVydC9zbGljZXMucnMvaG9tZS9ydW5uZXIvLmNhcmdvL3JlZ2lzdHJ5L3NyYy9pbmRleC5jcmF0ZXMuaW8tMTk0OWNmOGM2YjViNTU3Zi93YXNtLWJpbmRnZW4tMC4yLjEwNi9zcmMvZXh0ZXJucmVmLnJzHVQQAGcAAAB/AAAAEQAAAB1UEABnAAAAjAAAABEAAABudWxsIHBvaW50ZXIgcGFzc2VkIHRvIHJ1c3RyZWN1cnNpdmUgdXNlIG9mIGFuIG9iamVjdCBkZXRlY3RlZCB3aGljaCB3b3VsZCBsZWFkIHRvIHVuc2FmZSBhbGlhc2luZyBpbiBydXN0SnNWYWx1ZSgpAA5VEAAIAAAAFlUQAAEAQaiqwQALAQQASAlwcm9kdWNlcnMBDHByb2Nlc3NlZC1ieQIGd2FscnVzBjAuMjQuNAx3YXNtLWJpbmRnZW4TMC4yLjEwNiAoMTE4MzFmYjg5KQ==");const Ze=async function(A){return await Te({module_or_path:await A.module,memory:A.memory}),Ke}({module:xe}),We=Ze.then((A=>A.default())).then((A=>A.memory));class $e{static async build(A,e,t,V){return new $e(await Ze,await We,V,A,e,t)}constructor(A,e,t,V,g,n){this.wasm=A,this.memory=e,this.logger=t,this.cols=V,this.rows=g,this.boldIsBright=n,this.vt=A.create(V,g,100,n)}feed(A){return this.vt.feed(A)}reset(A,e,t=void 0){return this.logger.debug(`vt: reset (${A}x${e})`),this.vt=this.wasm.create(A,e,100,this.boldIsBright),this.cols=A,this.rows=e,void 0!==t&&""!==t&&this.vt.feed(t),Array.from({length:e},((A,e)=>e))}resize(A,e){if(A===this.cols&&e===this.rows)return;this.logger.debug(`vt: resize (${A}x${e})`);const t=this.vt.resize(A,e);return this.cols=A,this.rows=e,t}getLine(A,e){return this.vt.getLine(A,e)}getDataView([A,e],t){return new DataView(this.memory.buffer,A,e*t)}getUint32Array([A,e]){return new Uint32Array(this.memory.buffer,A,e)}getCursor(){const A=this.vt.getCursor();return A?{col:A[0],row:A[1],visible:!0}:{col:0,row:0,visible:!1}}}const je=$A('<div class="ap-term"><canvas></canvas><svg class="ap-term-symbols" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none" width="100%" height="100%" aria-hidden="true"><defs></defs><g></g></svg><pre class="ap-term-text" aria-live="off" tabindex="0"></pre></div>',12),ze="http://www.w3.org/2000/svg",Xe=24;var Pe=A=>{const e=A.core,t=[],V=[],g=[],r=new Set,i=new Map,o=new Map,I=$e.build(A.cols,A.rows,A.boldIsBright,A.logger);let B;const[s,C]=EA({cols:A.cols,rows:A.rows},{equals:(A,e)=>A.cols===e.cols&&A.rows===e.rows}),[Q,a]=EA(_e(it,A.adaptivePalette)),E=()=>A.lineHeight??1.3333333333,[c,l]=EA(!0),u=uA((()=>"hidden"!==A.cursorMode&&("steady"===A.cursorMode||(c()||R)))),d=uA((()=>({width:`${s().cols}ch`,height:E()*s().rows+"em","font-size":100*(A.scale||1)+"%","--term-line-height":`${E()}em`,"--term-cols":s().cols,"--term-rows":s().rows})));let f,w,h,D,y,p,k,m,q,L,F={col:0,row:0,visible:!1},M={size:void 0,theme:void 0,rows:new Set},R=!1;function N({size:A,theme:e,init:t}){G({size:A,theme:e,changedRows:B.reset(A.cols,A.rows,t)})}function v(A){const e=B.resize(A.cols,A.rows);void 0!==e&&G({size:A,changedRows:e})}function b(A){let e;if(Array.isArray(A)){e=new Set;for(const t of A)for(const A of B.feed(t))e.add(A)}else e=B.feed(A);G({changedRows:e})}function G({size:e,theme:t,changedRows:V}){let g=!1;if(void 0!==V)for(const A of V)M.rows.add(A),R=!0,g=!0;if(void 0!==t&&A.preferEmbeddedTheme){M.theme=t;for(let A=0;A<s().rows;A++)M.rows.add(A)}const n=B.getCursor();if(n.visible==F.visible&&n.col==F.col&&n.row==F.row||(F.visible&&M.rows.add(F.row),n.visible&&M.rows.add(n.row),F=n,R=!0,g=!0),void 0!==e){M.size=e;for(const A of M.rows)A>=e.rows&&M.rows.delete(A)}g&&F.visible&&M.rows.add(F.row),S()}function U(){l((A=>(A||(R=!1),!A)))}function S(){void 0===m&&(m=requestAnimationFrame(J))}function J(){m=void 0;const{size:e,theme:t,rows:V}=M;dA((function(){void 0!==e&&(!function({cols:A,rows:e}){w.width=8*A,w.height=e*Xe,h.imageSmoothingEnabled=!1}(e),H(e.rows),O(e.rows),C(e)),void 0!==t&&(a(_e(null===t?L:t,A.adaptivePalette)),i.clear());const g=Q(),n=u();for(const A of V)Y(A,g,n)})),M.size=void 0,M.theme=void 0,M.rows.clear(),A.stats.renders+=1}function Y(A,e,t){const V=B.getLine(A,t);!function(A){h.clearRect(0,A*Xe,8*s().cols,Xe)}(A),function(A,e,t){const V=B.getDataView(e,8),g=A*Xe;let n=0;for(;n<V.byteLength;){const A=V.getUint16(n+0,!0),e=V.getUint16(n+2,!0),r=K(V,n+4,t);n+=8,h.fillStyle=r,h.fillRect(8*A,g,8*e,Xe)}}(A,V.bg,e),function(A,e,t){const V=B.getDataView(e,12),g=A*Xe;let n=0;for(;n<V.byteLength;){const A=V.getUint16(n+0,!0),e=V.getUint32(n+4,!0),r=K(V,n+8,t)||t.fg;n+=12,h.fillStyle=r,tt(h,e,8*A,g)}}(A,V.raster_symbols,e),function(A,e,t){const V=B.getDataView(e,16),n=document.createDocumentFragment(),r=k.children[A];let i=0;for(;i<V.byteLength;){const A=V.getUint16(i+0,!0),e=V.getUint32(i+4,!0),g=K(V,i+8,t),r=V.getUint8(i+12);i+=16;const o=W(e,A,g,!!(32&r));o&&n.appendChild(o)}(function(A){for(;A.firstChild;){const e=A.firstChild;A.removeChild(e),g.push(e)}})(r),r.replaceChildren(n)}(A,V.vector_symbols,e),function(A,e,t,V){const g=B.getDataView(e,12),n=B.getUint32Array(t),r=document.createDocumentFragment();let i=0;for(;i<g.byteLength;){const A=g.getUint16(i+0,!0),e=g.getUint16(i+2,!0),t=g.getUint16(i+4,!0),o=K(g,i+6,V),I=g.getUint8(i+10),B=String.fromCodePoint(...n.subarray(e,e+t));i+=12;const s=document.createElement("span"),C=s.style;C.setProperty("--offset",A),s.textContent=B,o&&(C.color=o);const Q=T(I);null!==Q&&(s.className=Q),r.appendChild(s)}D.children[A].replaceChildren(r)}(A,V.text,V.codepoints,e)}function T(A){let e=o.get(A);return void 0===e&&(e=function(A){let e="";1&A?e+="ap-bold ":2&A&&(e+="ap-faint ");4&A&&(e+="ap-italic ");8&A&&(e+="ap-underline ");16&A&&(e+="ap-strike ");32&A&&(e+="ap-blink ");return""===e?null:e}(A),o.set(A,e)),e}function K(A,e,t){const V=A.getUint8(e);if(0===V)return null;if(1===V)return t.fg;if(2===V)return t.bg;if(3===V)return t.palette[A.getUint8(e+1)];if(4===V){const t=A.getUint32(e,!0);let V=i.get(t);if(void 0===V){V="rgb("+A.getUint8(e+1)+","+A.getUint8(e+2)+","+A.getUint8(e+3)+")",i.set(t,V)}return V}throw new Error(`invalid color tag: ${V}`)}function H(A){let e=D.children.length;if(e<A){const t=document.createDocumentFragment();for(;e<A;){const A=x();A.style.setProperty("--row",e),t.appendChild(A),e+=1}D.appendChild(t)}for(;D.children.length>A;){const A=D.lastElementChild;D.removeChild(A),t.push(A)}}function O(A){let e=k.children.length;if(e<A){const t=document.createDocumentFragment();for(;e<A;){const A=Z();A.setAttribute("transform",`translate(0 ${e})`),t.appendChild(A),e+=1}k.appendChild(t)}for(;k.children.length>A;){const A=k.lastElementChild;k.removeChild(A),V.push(A)}}function x(){let A=t.pop();return void 0===A&&(A=document.createElement("span"),A.className="ap-line"),A}function Z(){let A=V.pop();return void 0===A&&(A=document.createElementNS(ze,"g"),A.setAttribute("class","ap-symbol-line")),A}function W(A,e,t,V){if(!function(A){const e=function(A){const e=`stroke="currentColor" stroke-width="${Vt}" stroke-linejoin="miter" stroke-linecap="square"`,t=`stroke="currentColor" stroke-width="${Vt}" stroke-linejoin="miter" stroke-linecap="butt"`,V=A=>`<path d="${A}" fill="none" ${e}/>`,g=1/3,n=2/3;switch(A){case 9698:return'<path d="M1,1 L1,0 L0,1 Z" fill="currentColor"/>'+V("M1,1 L1,0 L0,1 Z");case 9699:return'<path d="M0,1 L0,0 L1,1 Z" fill="currentColor"/>'+V("M0,1 L0,0 L1,1 Z");case 9700:return'<path d="M0,0 L1,0 L0,1 Z" fill="currentColor"/>'+V("M0,0 L1,0 L0,1 Z");case 9701:return'<path d="M1,0 L1,1 L0,0 Z" fill="currentColor"/>'+V("M1,0 L1,1 L0,0 Z");case 9871:{const A=.17,e=.15/2,t=.2/2,V=A=>.5+A*gt,g=.5-e,n=.5+e,r=1.02,i=V(-t-A),o=V(-t),I=V(t),B=V(t+A),s=(A,e,t,V)=>`M${A},${t} L${e},${t} L${e},${V} L${A},${V} Z`;return`<path d="${s(0,g,i,o)} ${s(n,r,i,o)} ${s(0,g,I,B)} ${s(n,r,I,B)}" fill="currentColor"/>`}case 129852:return`<path d="M0,${n} L0,1 L0.5,1 Z" fill="currentColor"/>`+V(`M0,${n} L0,1 L0.5,1 Z`);case 129853:return`<path d="M0,${n} L0,1 L1,1 Z" fill="currentColor"/>`+V(`M0,${n} L0,1 L1,1 Z`);case 129854:return`<path d="M0,${g} L0.5,1 L0,1 Z" fill="currentColor"/>`+V(`M0,${g} L0.5,1 L0,1 Z`);case 129855:return`<path d="M0,${g} L1,1 L0,1 Z" fill="currentColor"/>`+V(`M0,${g} L1,1 L0,1 Z`);case 129856:return'<path d="M0,0 L0.5,1 L0,1 Z" fill="currentColor"/>'+V("M0,0 L0.5,1 L0,1 Z");case 129857:return`<path d="M0,${g} L0,1 L1,1 L1,0 L0.5,0 Z" fill="currentColor"/>`+V(`M0,${g} L0,1 L1,1 L1,0 L0.5,0 Z`);case 129858:return`<path d="M0,${g} L0,1 L1,1 L1,0 Z" fill="currentColor"/>`+V(`M0,${g} L0,1 L1,1 L1,0 Z`);case 129859:return`<path d="M0,${n} L0,1 L1,1 L1,0 L0.5,0 Z" fill="currentColor"/>`+V(`M0,${n} L0,1 L1,1 L1,0 L0.5,0 Z`);case 129860:return`<path d="M0,${n} L0,1 L1,1 L1,0 Z" fill="currentColor"/>`+V(`M0,${n} L0,1 L1,1 L1,0 Z`);case 129861:return'<path d="M0.5,0 L1,0 L1,1 L0,1 Z" fill="currentColor"/>'+V("M0.5,0 L1,0 L1,1 L0,1 Z");case 129862:return`<path d="M0,${n} L0,1 L1,1 L1,${g} Z" fill="currentColor"/>`+V(`M0,${n} L0,1 L1,1 L1,${g} Z`);case 129863:return`<path d="M0.5,1 L1,1 L1,${n} Z" fill="currentColor"/>`+V(`M0.5,1 L1,1 L1,${n} Z`);case 129864:return`<path d="M0,1 L1,1 L1,${n} Z" fill="currentColor"/>`+V(`M0,1 L1,1 L1,${n} Z`);case 129865:return`<path d="M0.5,1 L1,1 L1,${g} Z" fill="currentColor"/>`+V(`M0.5,1 L1,1 L1,${g} Z`);case 129866:return`<path d="M0,1 L1,1 L1,${g} Z" fill="currentColor"/>`+V(`M0,1 L1,1 L1,${g} Z`);case 129867:return'<path d="M0.5,1 L1,0 L1,1 Z" fill="currentColor"/>'+V("M0.5,1 L1,0 L1,1 Z");case 129868:return`<path d="M0,0 L0.5,0 L1,${g} L1,1 L0,1 Z" fill="currentColor"/>`+V(`M0,0 L0.5,0 L1,${g} L1,1 L0,1 Z`);case 129869:return`<path d="M0,0 L0,1 L1,1 L1,${g} Z" fill="currentColor"/>`+V(`M0,0 L0,1 L1,1 L1,${g} Z`);case 129870:return`<path d="M0,0 L0.5,0 L1,${n} L1,1 L0,1 Z" fill="currentColor"/>`+V(`M0,0 L0.5,0 L1,${n} L1,1 L0,1 Z`);case 129871:return`<path d="M0,0 L1,${n} L1,1 L0,1 Z" fill="currentColor"/>`+V(`M0,0 L1,${n} L1,1 L0,1 Z`);case 129872:return'<path d="M0,0 L0.5,0 L1,1 L0,1 Z" fill="currentColor"/>'+V("M0,0 L0.5,0 L1,1 L0,1 Z");case 129873:return`<path d="M0,${g} L1,${n} L1,1 L0,1 Z" fill="currentColor"/>`+V(`M0,${g} L1,${n} L1,1 L0,1 Z`);case 129874:return`<path d="M0,${n} L0,0 L1,0 L1,1 L0.5,1 Z" fill="currentColor"/>`+V(`M0,${n} L0,0 L1,0 L1,1 L0.5,1 Z`);case 129875:return`<path d="M0,${n} L0,0 L1,0 L1,1 Z" fill="currentColor"/>`+V(`M0,${n} L0,0 L1,0 L1,1 Z`);case 129876:return`<path d="M0,${g} L0,0 L1,0 L1,1 L0.5,1 Z" fill="currentColor"/>`+V(`M0,${g} L0,0 L1,0 L1,1 L0.5,1 Z`);case 129877:return`<path d="M0,${g} L0,0 L1,0 L1,1 Z" fill="currentColor"/>`+V(`M0,${g} L0,0 L1,0 L1,1 Z`);case 129878:return'<path d="M0,0 L1,0 L1,1 L0.5,1 Z" fill="currentColor"/>'+V("M0,0 L1,0 L1,1 L0.5,1 Z");case 129879:return`<path d="M0,${g} L0.5,0 L0,0 Z" fill="currentColor"/>`+V(`M0,${g} L0.5,0 L0,0 Z`);case 129880:return`<path d="M0,0 L1,0 L0,${g} Z" fill="currentColor"/>`+V(`M0,0 L1,0 L0,${g} Z`);case 129881:return`<path d="M0,0 L0.5,0 L0,${n} Z" fill="currentColor"/>`+V(`M0,0 L0.5,0 L0,${n} Z`);case 129882:return`<path d="M0,0 L1,0 L0,${n} Z" fill="currentColor"/>`+V(`M0,0 L1,0 L0,${n} Z`);case 129883:return'<path d="M0,0 L0.5,0 L0,1 Z" fill="currentColor"/>'+V("M0,0 L0.5,0 L0,1 Z");case 129884:return`<path d="M0,0 L1,0 L1,${g} L0,${n} Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${g} L0,${n} Z`);case 129885:return`<path d="M0,0 L1,0 L1,${n} L0.5,1 L0,1 Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${n} L0.5,1 L0,1 Z`);case 129886:return`<path d="M0,0 L1,0 L1,${n} L0,1 Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${n} L0,1 Z`);case 129887:return`<path d="M0,0 L1,0 L1,${g} L0.5,1 L0,1 Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${g} L0.5,1 L0,1 Z`);case 129888:return`<path d="M0,0 L1,0 L1,${g} L0,1 Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${g} L0,1 Z`);case 129889:return'<path d="M0,0 L1,0 L0.5,1 L0,1 Z" fill="currentColor"/>'+V("M0,0 L1,0 L0.5,1 L0,1 Z");case 129890:return`<path d="M0.5,0 L1,0 L1,${g} Z" fill="currentColor"/>`+V(`M0.5,0 L1,0 L1,${g} Z`);case 129891:return`<path d="M0,0 L1,0 L1,${g} Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${g} Z`);case 129892:return`<path d="M0.5,0 L1,0 L1,${n} Z" fill="currentColor"/>`+V(`M0.5,0 L1,0 L1,${n} Z`);case 129893:return`<path d="M0,0 L1,0 L1,${n} Z" fill="currentColor"/>`+V(`M0,0 L1,0 L1,${n} Z`);case 129894:return'<path d="M0.5,0 L1,0 L1,1 Z" fill="currentColor"/>'+V("M0.5,0 L1,0 L1,1 Z");case 129895:return`<path d="M0,${g} L0,0 L1,0 L1,${n} Z" fill="currentColor"/>`+V(`M0,${g} L0,0 L1,0 L1,${n} Z`);case 129896:return`<path fill-rule="evenodd" d="M0,0 L1,0 L1,1 L0,1 Z M0,0 L0,1 L0.5,0.5 Z" fill="currentColor"/><path d="M0,0 L1,0 M0,1 L1,1 M1,0 L1,1" fill="none" ${e}/><path d="M0,0 L0.5,0.5 M0,1 L0.5,0.5" fill="none" ${t}/>`;case 129897:return`<path fill-rule="evenodd" d="M0,0 L1,0 L1,1 L0,1 Z M0,0 L1,0 L0.5,0.5 Z" fill="currentColor"/><path d="M0,0 L0,1 M1,0 L1,1 M0,1 L1,1" fill="none" ${e}/><path d="M0,0 L0.5,0.5 M1,0 L0.5,0.5" fill="none" ${t}/>`;case 129898:return`<path fill-rule="evenodd" d="M0,0 L1,0 L1,1 L0,1 Z M1,0 L1,1 L0.5,0.5 Z" fill="currentColor"/><path d="M0,0 L1,0 M0,1 L1,1 M0,0 L0,1" fill="none" ${e}/><path d="M1,0 L0.5,0.5 M1,1 L0.5,0.5" fill="none" ${t}/>`;case 129899:return`<path fill-rule="evenodd" d="M0,0 L1,0 L1,1 L0,1 Z M0,1 L1,1 L0.5,0.5 Z" fill="currentColor"/><path d="M0,0 L1,0 M0,0 L0,1 M1,0 L1,1" fill="none" ${e}/><path d="M0,1 L0.5,0.5 M1,1 L0.5,0.5" fill="none" ${t}/>`;case 129900:return'<path d="M0,0 L0,1 L0.5,0.5 Z" fill="currentColor"/>'+V("M0,0 L0,1 L0.5,0.5 Z");case 57520:return'<path d="M0,0 L1,0.5 L0,1 Z" fill="currentColor"/>';case 57521:return'<path d="M0,0 L1,0.5 L0,1" fill="none" stroke="currentColor" stroke-width="0.07" stroke-linejoin="miter"/>';case 57522:return'<path d="M1,0 L0,0.5 L1,1 Z" fill="currentColor"/>';case 57523:return'<path d="M1,0 L0,0.5 L1,1" fill="none" stroke="currentColor" stroke-width="0.07" stroke-linejoin="miter"/>';case 57524:return'<path d="M0,0 A1,0.5 0 0 1 0,1 Z" fill="currentColor"/>';case 57525:return'<path d="M0,0 A1,0.5 0 0 1 0,1" fill="none" stroke="currentColor" stroke-width="0.07"/>';case 57526:return'<path d="M1,0 A1,0.5 0 0 0 1,1 Z" fill="currentColor"/>';case 57527:return'<path d="M1,0 A1,0.5 0 0 0 1,1" fill="none" stroke="currentColor" stroke-width="0.07"/>';case 57528:return'<path d="M0,1 L0,0 L1,1 Z" fill="currentColor"/>';case 57529:case 57535:return'<path d="M0,0 L1,1" fill="none" stroke="currentColor" stroke-width="0.07"/>';case 57530:return'<path d="M1,1 L1,0 L0,1 Z" fill="currentColor"/>';case 57531:case 57533:return'<path d="M0,1 L1,0" fill="none" stroke="currentColor" stroke-width="0.07"/>';case 57532:return'<path d="M0,0 L1,0 L0,1 Z" fill="currentColor"/>';case 57534:return'<path d="M1,0 L1,1 L0,0 Z" fill="currentColor"/>';default:return null}}(A);if(!e)return!1;if(r.has(A))return!0;const t=`sym-${A}`,V=document.createElementNS(ze,"symbol");return V.setAttribute("id",t),V.setAttribute("viewBox","0 0 1 1"),V.setAttribute("preserveAspectRatio","none"),V.setAttribute("overflow","visible"),V.innerHTML=e,p.appendChild(V),r.add(A),!0}(A))return null;const n=nt.has(A),i=n?e-rt:e,o=n?1+2*rt:1,I=function(){let A=g.pop();void 0===A&&(A=document.createElementNS(ze,"use"));return A}();return I.setAttribute("href",`#sym-${A}`),I.setAttribute("x",i),I.setAttribute("y",0),I.setAttribute("width",o),I.setAttribute("height","1"),t?I.style.setProperty("color",t):I.style.removeProperty("color"),V?I.classList.add("ap-blink"):I.classList.remove("ap-blink"),I}return wA((()=>{!function(){if(h=w.getContext("2d"),!h)throw new Error("2D ctx not available");const{cols:A,rows:e}=s();w.width=8*A,w.height=e*Xe,w.style.imageRendering="pixelated",h.imageSmoothingEnabled=!1}(),L=function(A){const e=getComputedStyle(A),t=n(e.getPropertyValue("--term-color-foreground"),it.foreground),V=n(e.getPropertyValue("--term-color-background"),it.background),g=[];for(let A=0;A<16;A++){const t=A>=8?g[A-8]:it.palette[A];g[A]=n(e.getPropertyValue(`--term-color-${A}`),t)}return{foreground:t,background:V,palette:g}}(f),M.theme=L,H(s().rows),O(s().rows),I.then((t=>{B=t,e.addEventListener("reset",N),e.addEventListener("resize",v),e.addEventListener("output",b),A.onReady?.()}))})),hA((()=>{e.removeEventListener("reset",N),e.removeEventListener("resize",v),e.removeEventListener("output",b),clearInterval(q),cancelAnimationFrame(m)})),lA((()=>{A.blinking&&void 0===q?q=setInterval(U,600):(clearInterval(q),q=void 0,l(!0))})),lA((()=>{u(),F.visible&&(M.rows.add(F.row),S())})),(()=>{const A=je.cloneNode(!0),e=A.firstChild,t=e.nextSibling,V=t.firstChild,g=V.nextSibling,n=t.nextSibling;"function"==typeof f?Ae(f,A):f=A;"function"==typeof w?Ae(w,e):w=e;"function"==typeof y?Ae(y,t):y=t;"function"==typeof p?Ae(p,V):p=V;"function"==typeof k?Ae(k,g):k=g;return"function"==typeof D?Ae(D,n):D=n,cA((e=>{const V=d(),g=`0 0 ${s().cols} ${s().rows}`,r=!!c(),i=!!c();return e._v$=_A(A,V,e._v$),g!==e._v$2&&zA(t,"viewBox",e._v$2=g),r!==e._v$3&&t.classList.toggle("ap-blink",e._v$3=r),i!==e._v$4&&n.classList.toggle("ap-blink",e._v$4=i),e}),{_v$:void 0,_v$2:void 0,_v$3:void 0,_v$4:void 0}),A})()};function _e(A,e=!1){return{fg:A.foreground,bg:A.background,palette:e?At(A.palette,A.background,A.foreground):et(A.palette)}}function At(A,e,t){const V=i(e),g=i(t),n=i(A[1]),I=i(A[2]),B=i(A[3]),s=i(A[4]),C=i(A[5]),Q=i(A[6]),a=[...A];for(let A=0;A<6;A+=1){const e=A/5,t=r(e,V,n),i=r(e,I,B),E=r(e,s,C),c=r(e,Q,g);for(let A=0;A<6;A+=1){const e=A/5,V=r(e,t,i),g=r(e,E,c);for(let A=0;A<6;A+=1){const e=r(A/5,V,g);a.push(o(e))}}}for(let A=0;A<24;A+=1){const e=(A+1)/25;a.push(o(r(e,V,g)))}return a}function et(A){const e=[...A],t=[0,95,135,175,215,255];for(let A=0;A<6;A+=1)for(let V=0;V<6;V+=1)for(let g=0;g<6;g+=1)e.push(s(t[A],t[V],t[g]));for(let A=0;A<24;A+=1){const t=8+10*A;e.push(s(t,t,t))}return e}function tt(A,e,t,V){const g=12;switch(e){case 9475:A.fillRect(t+3,V,2,Xe);break;case 9593:A.fillRect(t+3,V,2,g);break;case 9595:A.fillRect(t+3,V+g,2,g);break;case 9600:A.fillRect(t,V,8,g);break;case 9601:A.fillRect(t,V+21,8,3);break;case 9602:A.fillRect(t,V+18,8,6);break;case 9603:A.fillRect(t,V+15,8,9);break;case 9604:A.fillRect(t,V+g,8,g);break;case 9605:A.fillRect(t,V+9,8,15);break;case 9606:A.fillRect(t,V+6,8,18);break;case 9607:A.fillRect(t,V+3,8,21);break;case 9608:A.fillRect(t,V,8,Xe);break;case 9632:A.fillRect(t,V+6,8,12);break;case 9609:A.fillRect(t,V,7,Xe);break;case 9610:A.fillRect(t,V,6,Xe);break;case 9611:A.fillRect(t,V,5,Xe);break;case 9612:A.fillRect(t,V,4,Xe);break;case 9613:A.fillRect(t,V,3,Xe);break;case 9614:A.fillRect(t,V,2,Xe);break;case 9615:A.fillRect(t,V,1,Xe);break;case 9616:A.fillRect(t+4,V,4,Xe);break;case 9617:A.save(),A.globalAlpha=.25,A.fillRect(t,V,8,Xe),A.restore();break;case 9618:A.save(),A.globalAlpha=.5,A.fillRect(t,V,8,Xe),A.restore();break;case 9619:A.save(),A.globalAlpha=.75,A.fillRect(t,V,8,Xe),A.restore();break;case 9620:A.fillRect(t,V,8,3);break;case 9621:A.fillRect(t+7,V,1,Xe);break;case 9622:A.fillRect(t,V+g,4,g);break;case 9623:A.fillRect(t+4,V+g,4,g);break;case 9624:A.fillRect(t,V,4,g);break;case 9625:A.fillRect(t,V,4,Xe),A.fillRect(t+4,V+g,4,g);break;case 9626:A.fillRect(t,V,4,g),A.fillRect(t+4,V+g,4,g);break;case 9627:A.fillRect(t,V,8,g),A.fillRect(t,V+g,4,g);break;case 9628:A.fillRect(t,V,8,g),A.fillRect(t+4,V+g,4,g);break;case 9629:A.fillRect(t+4,V,4,g);break;case 9630:A.fillRect(t+4,V,4,g),A.fillRect(t,V+g,4,g);break;case 9631:A.fillRect(t+4,V,4,Xe),A.fillRect(t,V+g,4,g);break;case 129792:A.fillRect(t,V,4,8);break;case 129793:A.fillRect(t+4,V,4,8);break;case 129794:A.fillRect(t,V,8,8);break;case 129795:A.fillRect(t,V+8,4,8);break;case 129796:A.fillRect(t,V,4,8),A.fillRect(t,V+8,4,8);break;case 129797:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,4,8);break;case 129798:A.fillRect(t,V,8,8),A.fillRect(t,V+8,4,8);break;case 129799:A.fillRect(t+4,V+8,4,8);break;case 129800:A.fillRect(t,V,4,8),A.fillRect(t+4,V+8,4,8);break;case 129801:A.fillRect(t+4,V,4,8),A.fillRect(t+4,V+8,4,8);break;case 129802:A.fillRect(t,V,8,8),A.fillRect(t+4,V+8,4,8);break;case 129803:A.fillRect(t,V+8,8,8);break;case 129804:A.fillRect(t,V,4,8),A.fillRect(t,V+8,8,8);break;case 129805:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,8,8);break;case 129806:A.fillRect(t,V,8,8),A.fillRect(t,V+8,8,8);break;case 129807:A.fillRect(t,V+16,4,8);break;case 129808:A.fillRect(t,V,4,8),A.fillRect(t,V+16,4,8);break;case 129809:A.fillRect(t+4,V,4,8),A.fillRect(t,V+16,4,8);break;case 129810:A.fillRect(t,V,8,8),A.fillRect(t,V+16,4,8);break;case 129811:A.fillRect(t,V+8,4,16);break;case 129812:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,4,16);break;case 129813:A.fillRect(t,V,8,8),A.fillRect(t,V+8,4,16);break;case 129814:A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,4,8);break;case 129815:A.fillRect(t,V,4,8),A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,4,8);break;case 129816:A.fillRect(t+4,V,4,16),A.fillRect(t,V+16,4,8);break;case 129817:A.fillRect(t,V,8,8),A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,4,8);break;case 129818:A.fillRect(t,V+8,8,8),A.fillRect(t,V+16,4,8);break;case 129819:A.fillRect(t,V,4,24),A.fillRect(t+4,V+8,4,8);break;case 129820:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,8,8),A.fillRect(t,V+16,4,8);break;case 129821:A.fillRect(t,V,8,16),A.fillRect(t,V+16,4,8);break;case 129822:A.fillRect(t+4,V+16,4,8);break;case 129823:A.fillRect(t,V,4,8),A.fillRect(t+4,V+16,4,8);break;case 129824:A.fillRect(t+4,V,4,8),A.fillRect(t+4,V+16,4,8);break;case 129825:A.fillRect(t,V,8,8),A.fillRect(t+4,V+16,4,8);break;case 129826:A.fillRect(t,V+8,4,8),A.fillRect(t+4,V+16,4,8);break;case 129827:A.fillRect(t,V,4,16),A.fillRect(t+4,V+16,4,8);break;case 129828:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,4,8),A.fillRect(t+4,V+16,4,8);break;case 129829:A.fillRect(t,V,8,8),A.fillRect(t,V+8,4,8),A.fillRect(t+4,V+16,4,8);break;case 129830:A.fillRect(t+4,V+8,4,16);break;case 129831:A.fillRect(t,V,4,8),A.fillRect(t+4,V+8,4,16);break;case 129832:A.fillRect(t,V,8,8),A.fillRect(t+4,V+8,4,16);break;case 129833:A.fillRect(t,V+8,8,8),A.fillRect(t+4,V+16,4,8);break;case 129834:A.fillRect(t,V,4,16),A.fillRect(t+4,V+8,4,16);break;case 129835:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,8,8),A.fillRect(t+4,V+16,4,8);break;case 129836:A.fillRect(t,V,8,16),A.fillRect(t+4,V+16,4,8);break;case 129837:A.fillRect(t,V+16,8,8);break;case 129838:A.fillRect(t,V,4,8),A.fillRect(t,V+16,8,8);break;case 129839:A.fillRect(t+4,V,4,8),A.fillRect(t,V+16,8,8);break;case 129840:A.fillRect(t,V,8,8),A.fillRect(t,V+16,8,8);break;case 129841:A.fillRect(t,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129842:A.fillRect(t,V,4,16),A.fillRect(t,V+16,8,8);break;case 129843:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129844:A.fillRect(t,V,8,8),A.fillRect(t,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129845:A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129846:A.fillRect(t,V,4,8),A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129847:A.fillRect(t+4,V,4,16),A.fillRect(t,V+16,8,8);break;case 129848:A.fillRect(t,V,8,8),A.fillRect(t+4,V+8,4,8),A.fillRect(t,V+16,8,8);break;case 129849:A.fillRect(t,V+8,8,16);break;case 129850:A.fillRect(t,V,4,24),A.fillRect(t+4,V+8,4,8),A.fillRect(t+4,V+16,4,8);break;case 129851:A.fillRect(t+4,V,4,8),A.fillRect(t,V+8,8,16)}}const Vt=.05,gt=9.0375/20;const nt=new Set([57520,57521,57522,57523,57524,57525,57526,57527,57528,57529,57530,57531,57532,57533,57534,57535]),rt=.02,it={foreground:"#000000",background:"#000000",palette:["#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000","#000000"]},ot=$A('<svg version="1.1" viewBox="0 0 12 12" class="ap-icon ap-icon-fullscreen-off" aria-hidden="true"><path d="M7,5 L7,0 L9,2 L11,0 L12,1 L10,3 L12,5 Z"></path><path d="M5,7 L0,7 L2,9 L0,11 L1,12 L3,10 L5,12 Z"></path></svg>',6);var It=A=>ot.cloneNode(!0);const Bt=$A('<svg version="1.1" viewBox="6 8 14 16" class="ap-icon" aria-hidden="true"><path d="M0.938 8.313h22.125c0.5 0 0.938 0.438 0.938 0.938v13.5c0 0.5-0.438 0.938-0.938 0.938h-22.125c-0.5 0-0.938-0.438-0.938-0.938v-13.5c0-0.5 0.438-0.938 0.938-0.938zM1.594 22.063h20.813v-12.156h-20.813v12.156zM3.844 11.188h1.906v1.938h-1.906v-1.938zM7.469 11.188h1.906v1.938h-1.906v-1.938zM11.031 11.188h1.938v1.938h-1.938v-1.938zM14.656 11.188h1.875v1.938h-1.875v-1.938zM18.25 11.188h1.906v1.938h-1.906v-1.938zM5.656 15.031h1.938v1.938h-1.938v-1.938zM9.281 16.969v-1.938h1.906v1.938h-1.906zM12.875 16.969v-1.938h1.906v1.938h-1.906zM18.406 16.969h-1.938v-1.938h1.938v1.938zM16.531 20.781h-9.063v-1.906h9.063v1.906z"></path></svg>',4);var st=A=>Bt.cloneNode(!0);const Ct=$A('<svg version="1.1" viewBox="0 0 12 12" class="ap-icon" aria-hidden="true"><path d="M1,0 L4,0 L4,12 L1,12 Z"></path><path d="M8,0 L11,0 L11,12 L8,12 Z"></path></svg>',6);var Qt=A=>Ct.cloneNode(!0);const at=$A('<svg version="1.1" viewBox="0 0 12 12" class="ap-icon" aria-hidden="true"><path d="M1,0 L11,6 L1,12 Z"></path></svg>',4);var Et=A=>at.cloneNode(!0);const ct=$A('<svg version="1.1" viewBox="0 0 12 12" class="ap-icon ap-icon-fullscreen-on" aria-hidden="true"><path d="M12,0 L7,0 L9,2 L7,4 L8,5 L10,3 L12,5 Z"></path><path d="M0,12 L0,7 L2,9 L4,7 L5,8 L3,10 L5,12 Z"></path></svg>',6);var lt=A=>ct.cloneNode(!0);const ut=$A('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path d="M10.5 3.75a.75.75 0 0 0-1.264-.546L5.203 7H2.667a.75.75 0 0 0-.7.48A6.985 6.985 0 0 0 1.5 10c0 .887.165 1.737.468 2.52.111.29.39.48.7.48h2.535l4.033 3.796a.75.75 0 0 0 1.264-.546V3.75ZM16.45 5.05a.75.75 0 0 0-1.06 1.061 5.5 5.5 0 0 1 0 7.778.75.75 0 0 0 1.06 1.06 7 7 0 0 0 0-9.899Z"></path><path d="M14.329 7.172a.75.75 0 0 0-1.061 1.06 2.5 2.5 0 0 1 0 3.536.75.75 0 0 0 1.06 1.06 4 4 0 0 0 0-5.656Z"></path></svg>',6);var dt=A=>ut.cloneNode(!0);const ft=$A('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="size-5" aria-hidden="true"><path d="M10.047 3.062a.75.75 0 0 1 .453.688v12.5a.75.75 0 0 1-1.264.546L5.203 13H2.667a.75.75 0 0 1-.7-.48A6.985 6.985 0 0 1 1.5 10c0-.887.165-1.737.468-2.52a.75.75 0 0 1 .7-.48h2.535l4.033-3.796a.75.75 0 0 1 .811-.142ZM13.78 7.22a.75.75 0 1 0-1.06 1.06L14.44 10l-1.72 1.72a.75.75 0 0 0 1.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 1 0 1.06-1.06L16.56 10l1.72-1.72a.75.75 0 0 0-1.06-1.06L15.5 8.94l-1.72-1.72Z"></path></svg>',4);var wt=A=>ft.cloneNode(!0);const ht=$A('<button class="ap-button ap-playback-button" type="button"></button>',2),Dt=$A('<span class="ap-bar"><span class="ap-gutter ap-gutter-empty"></span><span class="ap-gutter ap-gutter-full"></span></span>',6),yt=$A('<span class="ap-tooltip">Unmute (m)</span>',2),pt=$A('<span class="ap-tooltip">Mute (m)</span>',2),kt=$A('<button class="ap-button ap-speaker-button ap-tooltip-container" type="button" aria-label="Mute / unmute"></button>',2),mt=$A('<div class="ap-control-bar"><span class="ap-timer"><span class="ap-time-elapsed"></span><span class="ap-time-remaining"></span></span><span class="ap-progressbar"></span><button class="ap-button ap-kbd-button ap-tooltip-container" type="button" aria-label="Show keyboard shortcuts"><span class="ap-tooltip">Keyboard shortcuts (?)</span></button><button class="ap-button ap-fullscreen-button ap-tooltip-container" type="button" aria-label="Toggle fullscreen mode"><span class="ap-tooltip">Fullscreen (f)</span></button></div>',18),qt=$A('<span class="ap-marker-container ap-tooltip-container"><span class="ap-marker"></span><span class="ap-tooltip"></span></span>',6);function Lt(A){let e=Math.floor(A);const t=Math.floor(e/86400);e%=86400;const V=Math.floor(e/3600);e%=3600;const g=Math.floor(e/60);return e%=60,t>0?`${Ft(t)}:${Ft(V)}:${Ft(g)}:${Ft(e)}`:V>0?`${Ft(V)}:${Ft(g)}:${Ft(e)}`:`${Ft(g)}:${Ft(e)}`}function Ft(A){return A<10?`0${A}`:A.toString()}var Mt=A=>{const e=A=>e=>{e.preventDefault(),A(e)},t=()=>"number"==typeof A.currentTime?Lt(A.currentTime):"--:--",V=()=>"number"==typeof A.remainingTime?"-"+Lt(A.remainingTime):t(),g=uA((()=>"number"==typeof A.duration?A.markers.filter((e=>e[0]<A.duration)):[])),n=A=>{const e=A.currentTarget.offsetWidth,t=A.currentTarget.getBoundingClientRect(),V=A.clientX-t.left;return 100*Math.max(0,V/e)+"%"},[r,i]=EA(!1),o=function(A,e){let t=!0;return function(...V){t&&(t=!1,A.apply(this,V),setTimeout((()=>t=!0),e))}}(A.onSeekClick,50),I=e=>{e._marker||e.altKey||e.shiftKey||e.metaKey||e.ctrlKey||0!==e.button||(i(!0),A.onSeekClick(n(e)))},B=A=>{A.altKey||A.shiftKey||A.metaKey||A.ctrlKey||r()&&o(n(A))},s=()=>{i(!1)};return document.addEventListener("mouseup",s),hA((()=>{document.removeEventListener("mouseup",s)})),(()=>{const n=mt.cloneNode(!0),r=n.firstChild,i=r.firstChild,o=i.nextSibling,s=r.nextSibling,C=s.nextSibling,Q=C.firstChild,a=C.nextSibling,E=a.firstChild,c=A.ref;return"function"==typeof c?Ae(c,n):A.ref=n,ee(n,TA(OA,{get when(){return A.isPausable},get children(){const t=ht.cloneNode(!0);return PA(t,"click",e(A.onPlayClick)),ee(t,TA(xA,{get children(){return[TA(ZA,{get when(){return A.isPlaying},get children(){return TA(Qt,{})}}),TA(ZA,{when:!0,get children(){return TA(Et,{})}})]}})),cA((()=>zA(t,"aria-label",A.isPlaying?"Pause":"Play"))),t}}),r),ee(i,t),ee(o,V),ee(s,TA(OA,{get when(){return"number"==typeof A.progress||A.isSeekable},get children(){const t=Dt.cloneNode(!0),V=t.firstChild.nextSibling;return t.$$mousemove=B,t.$$mousedown=I,ee(t,TA(HA,{get each(){return g()},children:(t,V)=>(()=>{const g=qt.cloneNode(!0),n=g.firstChild,r=n.nextSibling;var i;return g.$$mousedown=A=>{A._marker=!0},PA(g,"click",(i=V(),e((()=>{A.onSeekClick({marker:i})})))),ee(r,(()=>(A=>""===A[1]?Lt(A[0]):`${Lt(A[0])} - ${A[1]}`)(t))),cA((e=>{const V=(e=>e[0]/A.duration*100+"%")(t),r=!!(e=>"number"==typeof A.currentTime&&e[0]<=A.currentTime)(t);return V!==e._v$&&g.style.setProperty("left",e._v$=V),r!==e._v$2&&n.classList.toggle("ap-marker-past",e._v$2=r),e}),{_v$:void 0,_v$2:void 0}),g})()}),null),cA((e=>_A(V,{transform:`scaleX(${A.progress||0}`},e))),t}})),ee(n,TA(OA,{get when(){return void 0!==A.isMuted},get children(){const t=kt.cloneNode(!0);return PA(t,"click",e(A.onMuteClick)),ee(t,TA(xA,{get children(){return[TA(ZA,{get when(){return!0===A.isMuted},get children(){return[TA(wt,{}),yt.cloneNode(!0)]}}),TA(ZA,{get when(){return!1===A.isMuted},get children(){return[TA(dt,{}),pt.cloneNode(!0)]}})]}})),t}}),C),PA(C,"click",e(A.onHelpClick)),ee(C,TA(st,{}),Q),PA(a,"click",e(A.onFullscreenClick)),ee(a,TA(lt,{}),E),ee(a,TA(It,{}),E),cA((()=>n.classList.toggle("ap-seekable",!!A.isSeekable))),n})()};jA(["click","mousedown","mousemove"]);const Rt=$A('<div class="ap-overlay ap-overlay-error"><span>💥</span></div>',4);var Nt=A=>Rt.cloneNode(!0);const vt=$A('<div class="ap-overlay ap-overlay-loading"><span class="ap-loader"></span></div>',4);var bt=A=>vt.cloneNode(!0);const Gt=$A('<div class="ap-overlay ap-overlay-info"><span></span></div>',4);var Ut=A=>(()=>{const e=Gt.cloneNode(!0);return ee(e.firstChild,(()=>A.message)),cA((()=>e.classList.toggle("ap-was-playing",!!A.wasPlaying))),e})();const St=$A('<div class="ap-overlay ap-overlay-start"><div class="ap-play-button"><div><span><svg version="1.1" viewBox="0 0 1000.0 1000.0" class="ap-icon"><defs><mask id="small-triangle-mask"><rect width="100%" height="100%" fill="white"></rect><polygon points="700.0 500.0, 400.00000000000006 326.7949192431122, 399.9999999999999 673.2050807568877" fill="black"></polygon></mask></defs><polygon points="1000.0 500.0, 250.0000000000001 66.98729810778059, 249.99999999999977 933.0127018922192" mask="url(#small-triangle-mask)" fill="white" class="ap-play-btn-fill"></polygon><polyline points="673.2050807568878 400.0, 326.7949192431123 600.0" stroke="white" stroke-width="90" class="ap-play-btn-stroke"></polyline></svg></span></div></div></div>',22);var Jt=A=>(()=>{const e=St.cloneNode(!0);var t;return PA(e,"click",(t=A.onClick,A=>{A.preventDefault(),t(A)})),e})();jA(["click"]);const Yt=$A("<li><kbd>space</kbd> - pause / resume</li>",4),Tt=$A("<li><kbd>←</kbd> / <kbd>→</kbd> - rewind / fast-forward by 5 seconds</li>",6),Kt=$A("<li><kbd>Shift</kbd> + <kbd>←</kbd> / <kbd>→</kbd> - rewind / fast-forward by 10%</li>",8),Ht=$A("<li><kbd>[</kbd> / <kbd>]</kbd> - jump to the previous / next marker</li>",6),Ot=$A("<li><kbd>0</kbd>, <kbd>1</kbd>, <kbd>2</kbd> ... <kbd>9</kbd> - jump to 0%, 10%, 20% ... 90%</li>",10),xt=$A("<li><kbd>,</kbd> / <kbd>.</kbd> - step back / forward, a frame at a time (when paused)</li>",6),Zt=$A("<li><kbd>m</kbd> - mute / unmute audio</li>",4),Wt=$A('<div class="ap-overlay ap-overlay-help"><div><div><p>Keyboard shortcuts</p><ul><li><kbd>f</kbd> - toggle fullscreen mode</li><li><kbd>k</kbd> - toggle keystroke overlay</li><li><kbd>?</kbd> - show this help popup</li></ul></div></div></div>',22);var $t=A=>(()=>{const e=Wt.cloneNode(!0),t=e.firstChild,V=t.firstChild.firstChild.nextSibling,g=V.firstChild,n=g.nextSibling.nextSibling;var r;return PA(e,"click",(r=A.onClose,A=>{A.preventDefault(),r(A)})),t.$$click=A=>{A.stopPropagation()},ee(V,TA(OA,{get when(){return A.isPausable},get children(){return Yt.cloneNode(!0)}}),g),ee(V,TA(OA,{get when(){return A.isSeekable},get children(){return[Tt.cloneNode(!0),Kt.cloneNode(!0),Ht.cloneNode(!0),Ot.cloneNode(!0),xt.cloneNode(!0)]}}),g),ee(V,TA(OA,{get when(){return A.hasAudio},get children(){return Zt.cloneNode(!0)}}),n),e})();jA(["click"]);const jt=$A("<div><kbd></kbd></div>",4),zt=$A('<div class="ap-overlay ap-overlay-keystrokes"></div>',2);function Xt(A){const[e,t]=EA(!1);return lA((()=>{const{id:e}=A.keystroke;A.keystroke.rev(),t(!1);const V=setTimeout((function(){t(!0)}),2e3),g=setTimeout((function(){A.onExpired(e)}),2700);hA((()=>{clearTimeout(V),clearTimeout(g)}))})),(()=>{const t=jt.cloneNode(!0);return ee(t.firstChild,(()=>A.keystroke.label())),cA((()=>XA(t,e()?"ap-keystroke-pill fading":"ap-keystroke-pill"))),t})()}var Pt=A=>(()=>{const e=zt.cloneNode(!0);return ee(e,TA(HA,{get each(){return A.keystrokes},children:e=>TA(Xt,{keystroke:e,get onExpired(){return A.onExpired}})})),cA((()=>e.style.setProperty("--ap-keystrokes-bottom",`${(A.bottomOffset??0)+12}px`))),e})();const _t={...Object.fromEntries(Array.from({length:26},((A,e)=>[String.fromCharCode(e+1),`C-${String.fromCharCode(97+e)}`]))),"\b":"Back","\r":"Ret","\t":"Tab","":"Esc","":"Back"},AV={" ":"Spc"},eV={57358:"Caps",57359:"Scroll",57360:"Num",57361:"Print",57362:"Pause",57363:"Menu",57414:"Enter",57421:"PgUp",57422:"PgDn"},tV={A:"↑",B:"↓",C:"→",D:"←",F:"End",H:"Home",P:"F1",Q:"F2",R:"F3",S:"F4"},VV={2:"Ins",3:"Del",5:"PgUp",6:"PgDn",15:"F5",17:"F6",18:"F7",19:"F8",20:"F9",21:"F10",23:"F11",24:"F12"};function gV(A,e){const t=Number.parseInt(e.split(":")[0],10);if(!Number.isFinite(t)||t<=1)return A;const V=t-1,g=[];return 4&V&&g.push("C"),2&V&&g.push("A"),1&V&&g.push("S"),0===g.length?A:`${g.join("-")}-${A}`}function nV(A){if(A in eV)return eV[A];const e=String.fromCodePoint(A);return e in _t?_t[e]:e in AV?AV[e]:e}function rV(A){const e=A.match(/^(\d+);;(\d+)u$/);if(null!==e)return`A-${nV(Number.parseInt(e[2],10))}`;const t=A.match(/^(\d+)(?:;([\d:]+))?u$/);if(null!==t){const A=nV(Number.parseInt(t[1],10));return void 0===t[2]?A:gV(A,t[2])}const V=A.match(/^O?([A-Z])$/);if(null!==V&&V[1]in tV)return tV[V[1]];const g=A.match(/^(\d+)~$/);if(null!==g&&g[1]in VV)return VV[g[1]];const n=A.match(/^27;([\d:]+);(\d+)~$/);if(null!==n){return gV(nV(Number.parseInt(n[2],10)),n[1])}const r=A.match(/^(?:1;)?([\d:]+)([A-Z])$/);if(null!==r&&r[2]in tV)return gV(tV[r[2]],r[1]);const i=A.match(/^(\d+);([\d:]+)~$/);return null!==i&&i[1]in VV?gV(VV[i[1]],i[2]):""}function iV(A){if(A in _t)return{kind:"special",label:_t[A]};if(1===A.length)return A in AV?{kind:"special",label:AV[A]}:{kind:"text",label:A};if(A.startsWith("")){const e=function(A){const e=A.slice(1);return 1===e.length?e in _t?"A-"+_t[e]:e in AV?"A-"+AV[e]:"A-"+e:e.startsWith("[")?rV(e.slice(1)):e.startsWith("O")?rV(e):""}(A);if(""!==e)return{kind:"special",label:e}}return null}const oV=$A('<div class="ap-wrapper" tabindex="-1"><div></div></div>',4);var IV=A=>{const e=A.logger,t=A.core,V=A.autoPlay,g=A.charW,n=A.charH,r=A.bordersW,i=A.bordersH,o=A.theme??"auto/asciinema",I="auto/"===o.slice(0,5),B=I?o.slice(5):o,[s,C]=(Q=A.cols,a=A.rows,EA({cols:Q,rows:a},{equals:(A,e)=>A.cols===e.cols&&A.rows===e.rows}));var Q,a;const[E,c]=EA({width:0,height:0},{equals:(A,e)=>A.width===e.width&&A.height===e.height}),[l,u]=EA(!0),[d,f]=EA(!0),[w,h]=EA(!1),[D,y]=EA(null),[p,k]=EA(null),[m,q]=EA(null),[L,F]=EA(!1),[M,R]=EA(void 0),[N,v]=EA(!1),[b,G]=EA(V?null:"start"),[U,S]=EA(null),[J,Y]=EA(!1),[T,K]=EA(null),[H,O]=EA([]),[x,Z]=EA(!1),[W,$]=EA(!1),[j,z]=EA(null),X=uA((()=>s().cols||80)),P=uA((()=>s().rows||24)),_=()=>!1===A.controls?0:32,[AA,eA]=EA(!1!==A.keystrokeOverlay),[tA,VA]=EA([]);let gA,nA,rA,iA,oA,IA,BA=1;function sA(){Y(!1),jA(),zA()}const CA=({isPausable:A,isSeekable:e})=>{dA((()=>{u(A),f(e)}))},QA=A=>{dA((()=>{void 0!==A.duration&&(K(A.duration),y(0),k(A.duration),q(0)),void 0!==A.markers&&O(A.markers),void 0!==A.hasAudio&&R(!A.hasAudio&&void 0)}))},aA=({size:A,theme:e})=>{dA((()=>{C(A),void 0!==e&&z(e)}))},lA=A=>{C(A)},fA=()=>{G(null)},DA=()=>{dA((()=>{F(!0),v(!0),G(null),Y(!0),$A()}))},yA=()=>{dA((()=>{F(!1),sA()}))},pA=()=>{dA((()=>{F(!1),sA(),G("loader"),NA()}))},kA=({message:A})=>{dA((()=>{F(!1),sA(),NA(),void 0!==A&&(S(A),G("info"))}))},mA=A=>{R(A)},qA={renders:0},LA=({message:A})=>{dA((()=>{F(!1),sA(),void 0!==A&&(S(A),G("info"))})),e.debug("stats",qA)},FA=()=>{NA(),G("error")},MA=({data:A})=>{if(!AA())return;const e=iV(A);if(null===e)return;const t=tA(),V=t[t.length-1];"text"!==V?.kind||"text"!==e.kind?"special"!==V?.kind||"special"!==e.kind||V.key!==e.label?VA([...t,bA(e)].slice(-4)):V.increment():V.append(e.label)},RA=()=>{zA(),NA()},NA=()=>{VA([])},vA=A=>{VA((e=>e.filter((e=>e.id!==A))))},bA=({kind:A,label:e})=>{const[t,V]=EA(e),[g,n]=EA(1),[r,i]=EA(0);return{id:BA++,kind:A,key:e,label:()=>1===g()?t():`${t()} × ${g()}`,rev:r,append:A=>{V((e=>(e+A).slice(-10))),i((A=>A+1))},increment:()=>{n((A=>A+1)),i((A=>A+1))}}};t.addEventListener("ready",CA),t.addEventListener("metadata",QA),t.addEventListener("play",fA),t.addEventListener("playing",DA),t.addEventListener("pause",yA),t.addEventListener("loading",pA),t.addEventListener("offline",kA),t.addEventListener("muted",mA),t.addEventListener("ended",LA),t.addEventListener("error",FA),t.addEventListener("input",MA),t.addEventListener("seeked",RA),t.addEventListener("reset",aA),t.addEventListener("resize",lA);const GA=()=>{IA=new ResizeObserver(function(A,e){let t;return function(...V){clearTimeout(t),t=setTimeout((()=>A.apply(this,V)),e)}}((A=>{c({width:rA.offsetWidth,height:rA.offsetHeight}),rA.dispatchEvent(new CustomEvent("resize",{detail:{el:iA}}))}),10)),IA.observe(rA)};wA((async()=>{e.info("view: mounted"),e.debug("view: font measurements",{charW:g,charH:n}),GA(),c({width:rA.offsetWidth,height:rA.offsetHeight})})),hA((()=>{t.removeEventListener("ready",CA),t.removeEventListener("metadata",QA),t.removeEventListener("play",fA),t.removeEventListener("playing",DA),t.removeEventListener("pause",yA),t.removeEventListener("loading",pA),t.removeEventListener("offline",kA),t.removeEventListener("muted",mA),t.removeEventListener("ended",LA),t.removeEventListener("error",FA),t.removeEventListener("input",MA),t.removeEventListener("seeked",RA),t.removeEventListener("reset",aA),t.removeEventListener("resize",lA),t.stop(),jA(),IA.disconnect()}));const UA=uA((()=>{const e=g*X()+r,t=n*P()+i;let V=A.fit??"width";const o=E();if("both"===V||w()){V=o.width/(o.height-_())>e/t?"height":"width"}if(!1===V||"none"===V)return{};if("width"===V){const A=o.width/e;return{scale:A,width:o.width,height:t*A+_()}}if("height"===V){const A=(o.height-_())/t;return{scale:A,width:e*A,height:o.height}}throw new Error(`unsupported fit mode: ${V}`)})),SA=()=>{h(document.fullscreenElement??document.webkitFullscreenElement)},JA=()=>{w()?(document.exitFullscreen??document.webkitExitFullscreen??(()=>{})).apply(document):(rA.requestFullscreen??rA.webkitRequestFullscreen??(()=>{})).apply(rA)},YA=()=>{W()?$(!1):(t.pause(),$(!0))},KA=A=>{if(!(A.altKey||A.metaKey||A.ctrlKey||(" "==A.key||"Enter"==A.key)&&A.target instanceof HTMLButtonElement)){if(" "==A.key)ge();else if(","==A.key)t.step(-1).then(zA);else if("."==A.key)t.step().then(zA);else if("f"==A.key)JA();else if("m"==A.key)ne();else if("["==A.key)t.seek({marker:"prev"});else if("]"==A.key)t.seek({marker:"next"});else if(A.key.charCodeAt(0)>=48&&A.key.charCodeAt(0)<=57){const e=(A.key.charCodeAt(0)-48)/10;t.seek(100*e+"%")}else if("?"==A.key)YA();else if("k"==A.key)AA()?(NA(),eA(!1)):eA(!0);else if("ArrowLeft"==A.key)A.shiftKey?t.seek("<<<"):t.seek("<<");else if("ArrowRight"==A.key)A.shiftKey?t.seek(">>>"):t.seek(">>");else{if("Escape"!=A.key)return;$(!1)}A.stopPropagation(),A.preventDefault()}},HA=()=>{w()&&PA(!0)},WA=()=>{w()||PA(!1)},$A=()=>{clearInterval(nA),nA=setInterval(zA,100)},jA=()=>{clearInterval(nA)},zA=async()=>{const A=await t.getCurrentTime(),e=await t.getRemainingTime(),V=await t.getProgress();dA((()=>{y(A),k(e),q(V)}))},PA=A=>{clearTimeout(gA),A&&(gA=setTimeout((()=>PA(!1)),2e3)),Z(A)},te=uA((()=>I?j():null)),Ve=()=>{t.play()},ge=()=>{L()?t.pause():t.play()},ne=()=>{!0===M()?t.unmute():t.mute()},re=A=>{t.seek(A)},ie=(()=>{const V=oV.cloneNode(!0),g=V.firstChild;"function"==typeof rA?Ae(rA,V):rA=V,V.addEventListener("webkitfullscreenchange",SA),V.addEventListener("fullscreenchange",SA),V.$$mousemove=HA,V.$$keydown=KA;return"function"==typeof iA?Ae(iA,g):iA=g,g.$$mousemove=()=>PA(!0),g.addEventListener("mouseleave",WA),ee(g,TA(Pe,{get cols(){return X()},get rows(){return P()},get scale(){return UA()?.scale},get blinking(){return J()},get cursorMode(){return A.cursorMode},get boldIsBright(){return A.boldIsBright},get adaptivePalette(){return A.adaptivePalette},get lineHeight(){return A.terminalLineHeight},preferEmbeddedTheme:I,core:t,logger:e,get onReady(){return A.onTerminalReady},get stats(){return qA}}),null),ee(g,TA(OA,{get when(){return!1!==A.controls},get children(){return TA(Mt,{get duration(){return T()},get currentTime(){return D()},get remainingTime(){return p()},get progress(){return m()},get markers(){return H()},get isPlaying(){return L()||"loader"==b()},get isPausable(){return l()},get isSeekable(){return d()},get isMuted(){return M()},onPlayClick:ge,onFullscreenClick:JA,onHelpClick:YA,onSeekClick:re,onMuteClick:ne,ref(A){"function"==typeof oA?oA(A):oA=A}})}}),null),ee(g,TA(OA,{get when(){return tA().length>0},get children(){return TA(Pt,{get bottomOffset(){return _()},get keystrokes(){return tA()},onExpired:vA})}}),null),ee(g,TA(xA,{get children(){return[TA(ZA,{get when(){return"start"==b()},get children(){return TA(Jt,{onClick:Ve})}}),TA(ZA,{get when(){return"loader"==b()},get children(){return TA(bt,{})}}),TA(ZA,{get when(){return"error"==b()},get children(){return TA(Nt,{})}})]}}),null),ee(g,TA(Ee,{name:"slide",get children(){return TA(OA,{get when(){return"info"==b()},get children(){return TA(Ut,{get message(){return U()},get wasPlaying(){return N()}})}})}}),null),ee(g,TA(OA,{get when(){return W()},get children(){return TA($t,{onClose:()=>$(!1),get isPausable(){return l()},get isSeekable(){return d()},get hasAudio(){return void 0!==M()}})}}),null),cA((e=>{const t=!!(!0===A.controls||"auto"===A.controls&&x()),n=`ap-player ap-default-term-ff asciinema-player-theme-${B}`,r=(()=>{const e={};!1!==A.fit&&"none"!==A.fit||void 0===A.terminalFontSize||("small"===A.terminalFontSize?e["font-size"]="12px":"medium"===A.terminalFontSize?e["font-size"]="18px":"big"===A.terminalFontSize?e["font-size"]="24px":e["font-size"]=A.terminalFontSize);const t=UA();void 0!==t.width&&(e.width=`${t.width}px`,e.height=`${t.height}px`),void 0!==A.terminalFontFamily&&(e["--term-font-family"]=A.terminalFontFamily);const V=te();return V&&(e["--term-color-foreground"]=V.foreground,e["--term-color-background"]=V.background),e})();return t!==e._v$&&V.classList.toggle("ap-hud",e._v$=t),n!==e._v$2&&XA(g,e._v$2=n),e._v$3=_A(g,r,e._v$3),e}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),V})();return ie};function BV(A,e,t={}){const V=function(A,e){const t=80,V=24,g=document.createElement("div");g.className="ap-default-term-ff",g.style.height="0px",g.style.overflow="hidden",g.style.fontSize="15px",void 0!==A&&g.style.setProperty("--term-font-family",A);const n=document.createElement("div");n.className="ap-term",n.style.width=`${t}ch`,n.style.height=V*(e??1.3333333333)+"em",n.style.fontSize="100%",g.appendChild(n),document.body.appendChild(g);const r={charW:n.clientWidth/t,charH:n.clientHeight/V,bordersW:n.offsetWidth-n.clientWidth,bordersH:n.offsetHeight-n.clientHeight};return document.body.removeChild(g),r}(t.terminalFontFamily,t.terminalLineHeight),g={core:A,logger:t.logger,cols:t.cols,rows:t.rows,fit:t.fit,controls:t.controls,cursorMode:t.cursorMode,keystrokeOverlay:t.keystrokeOverlay,autoPlay:t.autoPlay,boldIsBright:t.boldIsBright,adaptivePalette:t.adaptivePalette,terminalFontSize:t.terminalFontSize,terminalFontFamily:t.terminalFontFamily,terminalLineHeight:t.terminalLineHeight,theme:t.theme,onTerminalReady:t.onTerminalReady,...V};let n;const r=function(A,e,t,V={}){let g;return aA((V=>{g=V,e===document?A():ee(e,A(),e.firstChild?null:void 0,t)}),V.owner),()=>{g(),e.textContent=""}}((()=>(n=TA(IV,g),n)),e);return{el:n,dispose:r}}jA(["keydown","mousemove"]);const sV=["audioUrl","autoPlay","autoplay","cols","idleTimeLimit","loop","markers","pauseOnMarkers","poster","preload","rows","speed","startAt"],CV=["autoPlay","autoplay","boldIsBright","cols","adaptivePalette","controls","cursorMode","fit","keystrokeOverlay","rows","terminalFontFamily","terminalFontSize","terminalLineHeight","theme"];return A.create=function(A,e,t={}){const V=t.logger??new u,g=new _(A,function(A,e={}){const t=Object.fromEntries(Object.entries(A).filter((([A])=>sV.includes(A))));return t.autoPlay??=t.autoplay,t.speed??=1,{...t,...e}}(t,{logger:V})),{el:n,dispose:r}=BV(g,e,function(A,e={}){const t=Object.fromEntries(Object.entries(A).filter((([A])=>CV.includes(A))));if(t.autoPlay??=t.autoplay,t.adaptivePalette??=!1,t.controls??="auto",t.cursorMode??="blinking",t.keystrokeOverlay??=!1,!["blinking","steady","hidden"].includes(t.cursorMode))throw new Error(`unsupported cursor mode: ${t.cursorMode}`);if("boolean"!=typeof t.keystrokeOverlay)throw new Error(`unsupported keystroke overlay option: ${t.keystrokeOverlay}`);return{...t,...e}}(t,{logger:V,onTerminalReady:()=>g.terminalReady()}));g.init().catch((()=>{}));const i={el:n,dispose:r,getCurrentTime:()=>g.getCurrentTime(),getDuration:()=>g.getDuration(),play:()=>g.play(),pause:()=>g.pause(),seek:A=>g.seek(A),addEventListener:(A,e)=>g.addEventListener(A,e.bind(i))};return i},A}({}); +/* @license-end */ diff --git a/docs/site/site.css b/docs/site/site.css new file mode 100644 index 00000000..a0959d5e --- /dev/null +++ b/docs/site/site.css @@ -0,0 +1,224 @@ +/* pardes docs site. The 0x4200.cafe lapis layout (framed panels, hard + shadows, a tag-line trail, pixel headings over a book hand) in pardes's + orchard greens; light mode follows forestbones_light. Fonts are OFL and + shipped in fonts/. */ + +@font-face { font-family:"Crimson Pro"; src:url("fonts/CrimsonPro-VF-normal.woff2") format("woff2"); font-weight:200 900; font-display:swap; } +@font-face { font-family:"Crimson Pro"; src:url("fonts/CrimsonPro-VF-italic.woff2") format("woff2"); font-weight:200 900; font-style:italic; font-display:swap; } +@font-face { font-family:"Departure Mono"; src:url("fonts/DepartureMono-Regular.woff2") format("woff2"); font-display:swap; size-adjust:72%; } + +/* orchard: field, panel, ink, leaf, amber, plum */ +:root { + --field:#0d1410; --deep:#070c09; --panel:#121c16; --tag:#1d2824; --tag-hi:#26362d; + --ink:#e5eee5; --dim:#b2c3b8; --leaf:#add38a; --leaf-hi:#b9f480; --amber:#f4c086; --plum:#d3b0d9; + --rule:#486152; --shadow:#000c; --stripe:#3c614a; + --hand:"Crimson Pro", Georgia, serif; --pixel:"Departure Mono", ui-monospace, monospace; + --mono:ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace; +} +/* forestbones_light: paper, butter tags, green ink */ +@media (prefers-color-scheme: light) { + :root { + --field:#f3ead2; --deep:#e9dcb8; --panel:#faf3e1; --tag:#f3e2aa; --tag-hi:#e8d48e; + --ink:#2f3b33; --dim:#56645b; --leaf:#3c6b56; --leaf-hi:#2c7a3e; --amber:#9a5810; --plum:#6e4774; + --rule:#b1a26f; --shadow:#4f5b6233; --stripe:#cdd9b0; + } +} + +* { box-sizing:border-box; } +html { background:var(--deep); color:var(--ink); scrollbar-color:var(--leaf) var(--deep); } +body { margin:0; min-height:100vh; background:var(--field) radial-gradient(color-mix(in srgb, var(--leaf) 14%, transparent) 1px, transparent 1.5px) 0 0/22px 22px; } +.shell { max-width:980px; margin:0 auto; padding:24px 16px 40px; display:grid; gap:26px; } + +/* --- the trail: a pane's tag line ------------------------------------------- */ +.trail { + display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; padding:9px 14px; + background:var(--tag); border:2px solid var(--leaf); box-shadow:5px 5px 0 var(--amber); + font:20px/1.3 var(--pixel); +} +.trail .grip { width:.8em; height:.8em; background:var(--leaf); align-self:center; } +.trail a { color:var(--leaf); text-decoration:none; } +.trail a:hover, .trail a[aria-current] { color:var(--amber); } +.trail .home { color:var(--plum); } +.trail .sep { color:var(--amber); } +.trail .here { color:var(--dim); } +.trail .words { display:flex; flex-wrap:wrap; gap:4px 14px; margin-left:auto; font-size:17px; } + +/* --- the folio --------------------------------------------------------------- */ +.panel { min-width:0; padding:14px; background:repeating-linear-gradient(45deg, var(--stripe) 0 2px, var(--panel) 2px 7px); border:2px solid var(--leaf); box-shadow:6px 6px 0 var(--shadow); } +.content { + background:var(--panel); padding:22px clamp(14px, 4vw, 40px) 30px; + box-shadow:inset 0 0 0 2px var(--leaf), inset 0 0 0 5px var(--panel), inset 0 0 0 6px var(--amber); + font:420 20px/1.55 var(--hand); overflow-wrap:break-word; +} +.content p, .content li { hyphens:auto; text-wrap:pretty; } +.content a { color:var(--amber); } +.content a:hover { color:var(--leaf-hi); } +.content strong { color:var(--leaf); font-weight:640; } +.content h2, .content h1 { font:clamp(30px, 5vw, 44px)/1.1 var(--pixel); color:var(--leaf); text-transform:uppercase; margin:.3em 0 .6em; text-shadow:3px 3px 0 var(--shadow); } +.content h3 { font:26px/1.2 var(--pixel); color:var(--amber); text-transform:uppercase; border-bottom:2px dotted var(--leaf); padding-bottom:4px; margin:1.6em 0 .6em; } +.content h3::before { content:"¶ "; color:var(--leaf); } +.content h4 { font:italic 600 23px/1.25 var(--hand); color:var(--leaf); margin:1.3em 0 .4em; } +.content h5 { font:600 20px var(--hand); color:var(--dim); margin:1em 0 .3em; } + +/* code: a window on the machine, titled in stripes */ +.content code, .content pre, .content kbd, .tag { font-family:var(--mono); } +.content code { font-size:.82em; overflow-wrap:break-word; hyphens:none; } +.content pre:not(.ap-term-text) { + font-size:15px; line-height:1.45; padding:12px 14px; margin:1em 0; overflow-x:auto; + background:var(--deep); border:2px solid var(--leaf); border-top-width:8px; box-shadow:5px 5px 0 var(--shadow); +} +.content pre code { font-size:inherit; overflow-wrap:normal; } +/* Typst's code highlighting only: the cast player's terminal is a <pre> of coloured spans too */ +@media (prefers-color-scheme: dark) { .content pre:not(.ap-term-text) span { color:inherit !important; } } +.content pre.tutor { font-size:14px; } + +/* tables: rows on alternating tints, a pardes #pairs */ +.content table { width:100%; border-collapse:collapse; margin:1em 0; font-size:.92em; display:block; overflow-x:auto; } +.content tbody, .content thead { display:table; width:100%; } +.content td, .content th { padding:5px 9px; vertical-align:top; text-align:left; } +.content tr:nth-child(odd) td { background:color-mix(in srgb, var(--tag) 70%, transparent); } +.content th { font:17px var(--pixel); color:var(--leaf); } + +/* --- the semantic elements (docs/typ/style.typ) ------------------------------ */ +.key { display:inline-block; padding:0 .3em; border-radius:4px; background:color-mix(in srgb, var(--leaf) 20%, transparent); color:var(--ink); font-size:.82em; white-space:nowrap; line-height:1.4; } +.key .plus, .key .then { color:var(--leaf); opacity:.8; padding:0 .12em; } +/* a builtin or tag word: a chip to click, on the tag's ground over a rule + (Look and Exec in acme's look green and exec red) */ +:root { --look:#7fd07f; --exec:#ff8a7a; } +@media (prefers-color-scheme: light) { :root { --look:#006600; --exec:#aa0000; } } +.content code.word { font-size:.82em; color:var(--ink); background:var(--tag); padding:.05em .3em; border-radius:2px; border-bottom:2px solid var(--leaf); white-space:nowrap; } +.content code.word.look { border-bottom-color:var(--look); } +.content code.word.exec { border-bottom-color:var(--exec); } +.addr code { color:var(--plum); } +.file code { color:var(--leaf); } +.btn, .chord { display:inline-flex; align-items:center; gap:2px; vertical-align:-.38em; margin-block:-.3em; } +.mouse { width:1.15em; height:1.55em; } +.mouse .off { fill:none; stroke:var(--dim); stroke-width:8; } +.mouse .on { fill:var(--amber); stroke:var(--amber); stroke-width:8; } +.mouse .halo { fill:var(--panel); } +.mouse .wheel.off { fill:var(--panel); stroke-width:5; } +.mouse .wheel.on { stroke-width:5; } +.btn .shift { font-size:.9em; color:var(--amber); } +.chord .then { font-size:.9em; color:var(--dim); } +.tag { margin:.6em 0; padding:4px 8px; background:var(--tag); color:var(--dim); font-size:15px; line-height:1.5; } +.tag .grip { display:inline-block; width:.8em; height:.8em; background:var(--leaf); margin-right:.5em; vertical-align:-.05em; } +.tag .path { color:var(--plum); } +.tag code { font-size:inherit; } + +/* --- contents, landing, footer ---------------------------------------------- */ +.toc { margin:0 0 1.6em; border:2px solid var(--leaf); background:var(--deep); box-shadow:5px 5px 0 var(--amber); } +.toc-bar { padding:2px 10px; font:17px var(--pixel); color:var(--leaf); background:repeating-linear-gradient(0deg, var(--leaf) 0 2px, var(--tag) 2px 4px); } +.toc-bar span { background:var(--tag); padding:0 8px; } +.toc-bar, .toc ol { margin:0; } +.toc ol { padding:8px 14px 10px 2.4em; columns:2 14em; font-size:18px; } +.masthead { font:clamp(56px, 12vw, 104px)/1 var(--pixel) !important; text-shadow:5px 5px 0 var(--amber) !important; margin:.1em 0 .1em !important; } +.pitch { font-style:italic; font-size:22px; color:var(--dim); margin-top:0; } +.clips { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap:18px; margin:1em 0 1.4em; } +.clip { margin:0; border:2px solid var(--leaf); background:var(--deep); box-shadow:5px 5px 0 var(--shadow); } +.clip video, .clip img { display:block; width:100%; height:auto; aspect-ratio:960/700; background:var(--deep); } +.clip figcaption { padding:8px 12px; font-size:18px; color:var(--dim); border-top:2px solid var(--leaf); } +.lead { font-size:23px; line-height:1.5; hyphens:manual; margin:.2em 0 .5em; } +.pitch { font-style:italic; font-size:19px; hyphens:manual; color:var(--dim); margin:0 0 .3em; } +.runs { font-size:18px; color:var(--dim); margin:0 0 1.2em; } +.clip.hero { margin:0 0 1.4em; box-shadow:6px 6px 0 var(--shadow); } +.start { display:flex; flex-wrap:wrap; gap:14px; margin:0 0 .8em; } +.start .go { display:inline-block; padding:8px 16px; font:20px var(--pixel); text-decoration:none; color:var(--leaf); background:var(--tag); border:2px solid var(--leaf); box-shadow:4px 4px 0 var(--amber); } +.start .go:first-child { font-size:24px; color:var(--panel); background:var(--leaf); } +.start .go span { font-size:.75em; opacity:.85; } +.start .go:hover { color:var(--amber); } +.rest { display:flex; flex-wrap:wrap; gap:4px 16px; font:17px var(--pixel); margin:0 0 1.2em; } +.rest a { color:var(--leaf); } +.content h2.install { font-size:30px; } +.glossary { margin:1.4em 0; } +.glossary summary { cursor:pointer; list-style-position:inside; } +.glossary summary h3, .glossary summary p { display:inline; margin:0; } +.vh { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; } +.colophon { font:15px var(--pixel); color:var(--dim); text-align:center; } +.colophon a { color:var(--leaf); } +.colophon code { font:inherit; } + +@media (max-width:600px) { + .shell { padding:14px 10px 30px; gap:18px; } + .trail { font-size:17px; padding:8px 10px; } + .trail .words { margin-left:0; font-size:15px; } + .panel { padding:7px; } + .content { font-size:18px; } + .content pre { font-size:13px; } +} +/* a shell line wraps on a phone rather than hide its end */ +@media (max-width:600px) { .cmd pre { white-space:pre-wrap; overflow-wrap:anywhere; } } + +/* terminal recordings: the first across the page, the rest two by two */ +/* one per row at the page's full width: a terminal at half width is unreadable */ +.casts { display:grid; grid-template-columns:minmax(0, 1fr); gap:22px; margin:1em 0 1.4em; } +.cast .player { background:#121314; } +.cast figcaption strong { color:var(--leaf); } +.content h2.shelf { font-size:26px; margin:1.2em 0 .4em; } + +/* the Themes page gallery: thumbnails that open the full picture */ +.gallery { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap:12px; margin:1em 0 1.6em; } +.shot { margin:0; border:2px solid var(--leaf); background:var(--deep); box-shadow:4px 4px 0 var(--shadow); } +.shot img { display:block; width:100%; height:auto; aspect-ratio:960/700; object-fit:cover; } +.shot figcaption { padding:3px 8px; font:16px var(--pixel); color:var(--dim); border-top:2px solid var(--leaf); } +.shot.light figcaption::after { content:" · light"; color:var(--amber); } +.shot .pending { aspect-ratio:960/700; display:flex; align-items:center; justify-content:center; font:15px var(--pixel); color:var(--dim); } + +/* a builtin's chip that links to its glossary entry */ +.content a:has(> code.word) { text-decoration:none; } +.content a:hover > code.word { text-decoration:underline; text-underline-offset:3px; } +.credit { font-size:18px; color:var(--dim); margin:0 0 .3em; } +/* the glossary: each entry's name is a small heading over its line */ +main[data-page="builtins"] .content h4 { font:600 18px var(--mono); color:var(--leaf); margin:1.1em 0 .1em; } +main[data-page="builtins"] .content h4 + p { margin-top:0; } +.content pre.tutor .btn, .content pre.tutor .chord { vertical-align:-.3em; } +.all-words { line-height:2.1; } + +/* the virtual filesystem as a tree: names and connectors, descriptions + in a quiet column; on a phone a description wraps under its name */ +.content pre.fstree { font-size:15px; line-height:1.35; overflow-x:visible; } +.fstree .row { display:grid; grid-template-columns:var(--name) 1fr; align-items:baseline; } +.fstree .nl { display:none; } +.fstree .branch { color:var(--rule); } +.fstree .dir, .fstree .dir a { color:var(--leaf); font-weight:700; } +.fstree a { color:var(--amber); text-decoration:none; } +.fstree a:hover { text-decoration:underline; } +.fstree .desc { color:var(--dim); font-family:var(--hand); font-size:17px; white-space:normal; line-height:1.3; } +@media (max-width:600px) { + .content pre.fstree { font-size:13px; } + .fstree .row { display:block; } + .fstree .name { display:block; } + /* under the name: its prefix is --cols cells of the 13px mono font */ + .fstree .desc { display:block; padding-left:calc(var(--cols) * 7.8px); font-size:15px; margin-bottom:.15em; } +} + +/* what's in it: a row of linked chips under the lead */ +.inside { display:flex; flex-wrap:wrap; gap:8px 10px; margin:.2em 0 1.1em; padding:0; list-style:none; } +.inside a { display:inline-block; padding:2px 10px; font:17px var(--pixel); color:var(--leaf); background:var(--tag); border:2px solid var(--leaf); text-decoration:none; } +.inside a:hover { color:var(--amber); border-color:var(--amber); } + +/* a screenshot with numbered pins, their labels listed beside it */ +.annotated { margin:1.2em 0 1.6em; display:grid; grid-template-columns:minmax(0, 3fr) minmax(12em, 2fr); gap:14px 22px; align-items:center; } +.annotated .frame { position:relative; border:2px solid var(--leaf); box-shadow:5px 5px 0 var(--shadow); } +.annotated img { display:block; width:100%; height:auto; } +.annotated .pin { position:absolute; transform:translate(-50%, -50%); width:1.5em; height:1.5em; border-radius:50%; + display:flex; align-items:center; justify-content:center; font:700 14px var(--mono); background:var(--amber); color:#1b120a; box-shadow:0 0 0 2px var(--panel); } +.annotated .pins { margin:0; padding-left:1.8em; font-size:18px; } +.annotated .pins li { margin:.25em 0; } +.annotated .pins li::marker { font:700 15px var(--mono); color:var(--amber); } +@media (max-width:600px) { .annotated { grid-template-columns:minmax(0, 1fr); } } +.clip figcaption .more { font:15px var(--pixel); color:var(--leaf); margin-left:.3em; white-space:nowrap; } +.clip { scroll-margin-top:16px; } + +/* a pane's box: blank normal, ^ insert, $ raw; filled while unsaved */ +.mode-box { display:inline-flex; align-items:center; justify-content:center; width:1.15em; height:1.15em; vertical-align:-.15em; + font:700 .8em var(--mono); background:var(--tag); color:var(--ink); border:2px solid var(--leaf); border-radius:2px; } +.mode-box.unsaved { background:var(--amber); border-color:var(--amber); color:#1b120a; } +/* a recording inside a chapter */ +.content .clip.inline { margin:1.2em 0; max-width:640px; } +.clip.inline video { display:block; width:100%; height:auto; background:var(--deep); } +.content .clip.inline.wide { max-width:none; } +.glossary dl { margin:.6em 0 0; display:grid; grid-template-columns:minmax(8em, max-content) 1fr; } +.glossary dt, .glossary dd { margin:0; padding:5px 9px; } +.glossary dt { font-weight:600; color:var(--leaf); } +.glossary dt:nth-of-type(odd), .glossary dt:nth-of-type(odd) + dd { background:color-mix(in srgb, var(--tag) 70%, transparent); } +@media (max-width:600px) { .glossary dl { grid-template-columns:1fr; } .glossary dd { padding-top:0; } } diff --git a/docs/site/site.typ b/docs/site/site.typ new file mode 100644 index 00000000..47903d6e --- /dev/null +++ b/docs/site/site.typ @@ -0,0 +1,287 @@ +// The website: one Typst bundle run writes every page, the stylesheet, the +// fonts and the media. Pages come from `chapters` in ../typ/style.typ, so a +// new chapter is a new page; the only prose of its own is the landing page. +// typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT +// Every link is relative and every page sits at the top of OUT, so the site +// works from file:// and from any static server. +#import "../typ/style.typ": chapters, tutor-path, doc-links, project, btn, chord + +#let clips = toml("media/clips.toml").clip +#let casts = toml("casts/casts.toml").cast +#let themes = toml("media/themes/themes.toml") +/// The version, from build.zig.zon: 0.23.0 reads 0.23. +#let version = { + let v = read("/build.zig.zon").match(regex("\\.version\\s*=\\s*\"([^\"]+)\"")).captures.first() + if v.ends-with(".0") and v.split(".").len() == 3 { v.slice(0, -2) } else { v } +} + +// --- the landing page's own words: everything a visitor reads first ---------- +// Change the landing here; the rest of the site is the chapters. +#let landing = ( + lead: [pardes is a text environment, after acme and helix, where any text + is live: right-click `main.c:12` to open that line, middle-click `make` + to run it, in source, PDFs and terminals alike, in a terminal or in its + own window.], + credit: [It is built on ideas from #link("https://9p.io/plan9/")[Plan 9] from + Bell Labs: #link("https://9p.io/sys/doc/acme/acme.html")[acme]'s text as + the interface, and the 9P protocol.], + status: [Linux; macOS in progress. Version #version.], + // what's in it: a word each, linked to where it is told; no prose + // what's in it: each word jumps to its recording on this page when it + // has one, and that recording's caption links on to the docs + inside: ( + (name: "Terminals", rec: "terminals", docs: "guide.html#terminals"), + (name: "PDFs", rec: "pdf-navigation", docs: "builtins.html#builtin-PdfSections"), + (name: "Images", rec: "image-pane", docs: "reference.html#panes"), + (name: "Language servers", rec: none, docs: "setup.html#language-servers"), + (name: "Diff review", rec: "diff-review", docs: "guide.html#reviewing-diffs"), + (name: "Scripting", rec: "scripting-over-9p", docs: "scripting.html"), + (name: "Themes", rec: none, docs: "themes.html"), + ), + terminal: [In a terminal], + window: [In its own window], + start: ( + (id: "guide", label: [Start: the guide], note: [about 15 min]), + (id: "tutor", label: [Hands on: the tutor], note: [run `Tutor` inside pardes]), + ), + install: [Install], +) +#let pages = ( + (id: "index", title: "pardes"), + ..chapters.filter(c => c.file != none).map(c => (id: c.id, title: c.title, file: c.file)), + (id: "tutor", title: "The tutor"), +) +#let href(id) = id + ".html" + +// --- the files that are not pages -------------------------------------------- + +#asset("site.css", read("site.css", encoding: none)) +#for f in ("DepartureMono-Regular.woff2", "CrimsonPro-VF-normal.woff2", "CrimsonPro-VF-italic.woff2", + "LICENSE-DepartureMono.txt", "LICENSE-CrimsonPro.txt") { + asset("fonts/" + f, read("fonts/" + f, encoding: none)) +} +#asset("media/placeholder.svg", read("media/placeholder.svg", encoding: none)) +#for f in ("asciinema-player.min.js", "asciinema-player.css", "LICENSE-asciinema-player.txt") { + asset("player/" + f, read("player/" + f, encoding: none)) +} +#if themes.at("ready", default: true) { + for t in themes.theme { asset("media/themes/" + t.file, read("media/themes/" + t.file, encoding: none)) } +} +#for c in clips.filter(c => c.ready) { + for ext in ("webm", "mp4", "png") { + asset("media/" + c.name + "." + ext, read("media/" + c.name + "." + ext, encoding: none)) + } +} + +// --- the shell every page sits in --------------------------------------------- + +/// An HTML element: el("a", (href: "x.html"))[text], or el("li")[text]. +#let el(tag, ..args) = { + let p = args.pos() + html.elem(tag, attrs: if p.len() > 1 { p.first() } else { (:) }, p.last()) +} + +/// The running head: a tagline, the way a pane's tag reads, with the path +/// of this page and the chapters as its words. +#let trail(id, title) = el("header", (class: "trail"))[ + #el("span", (class: "grip", "aria-hidden": "true"))[] + #el("a", (class: "home", href: href("index")))[pardes] + #if id != "index" { + el("span", (class: "sep", "aria-hidden": "true"))[/] + el("span", (class: "here", "aria-current": "page"))[#title] + } + #el("nav", (class: "words", "aria-label": "Chapters"))[ + #for p in pages.slice(1) { + if p.id == id { el("a", (href: href(p.id), "aria-current": "page"))[#p.title] } + else { el("a", (href: href(p.id)))[#p.title] } + } + ] +] + +#let in-view-script = el("script")[#( + "(() => { if (!('IntersectionObserver' in window)) return; +" + + " const p = el => el.player || (el.tagName === 'VIDEO' ? el : null); +" + + " const io = new IntersectionObserver(es => { for (const e of es) { const r = p(e.target); if (!r) continue; +" + + " if (e.isIntersecting) Promise.resolve(r.play()).catch(() => {}); else r.pause(); } }, {threshold: 0.25}); +" + + " for (const el of document.querySelectorAll('.clip video, .cast .player')) io.observe(el); +" + + "})();" +)] + +#let shell(id, title, body) = html.html(lang: "en", { + html.head({ + html.meta(charset: "utf-8") + el("meta", (name: "viewport", content: "width=device-width, initial-scale=1"))[] + el("meta", (name: "color-scheme", content: "dark light"))[] + html.title(if id == "index" { "pardes" } else { title + " · pardes" }) + el("link", (rel: "stylesheet", href: "site.css"))[] + }) + html.body({ + el("div", (class: "shell"))[ + #trail(id, title) + #el("main", (class: "panel", "data-page": id))[ + #el("article", (class: "content"))[#body] + ] + #el("footer", (class: "colophon"))[ + pardes #version · + source: #project.mirrors.map(m => el("a", (href: m.web))[#m.name]).join(", ") · + #el("a", (href: project.changes))[changes] · + #if project.license != none [#project.license license · ] + built from `docs/typ` with Typst · + #el("a", (href: "fonts/LICENSE-DepartureMono.txt"))[fonts] (OFL) · + #el("a", (href: "player/LICENSE-asciinema-player.txt"))[asciinema-player] (Apache-2.0) + ] + ] + // after the page's own scripts (the landing's players), on every page + // that has a recording + in-view-script + }) +}) + +/// The headings of this page only, as a contents list, when there are +/// enough of them to need one. +#let toc(id) = context { + let hs = query(selector(heading.where(level: 2)).after(label("start-" + id)).before(label("end-" + id))) + if hs.len() >= 4 { + el("nav", (class: "toc", "aria-label": "On this page"))[ + #el("div", (class: "toc-bar"))[#el("span")[On this page]] + #el("ol")[#for h in hs { el("li")[#link(h.location(), h.body)] }] + ] + } +} + +// --- the pages ------------------------------------------------------------------ + +#doc-links.update(true) + +// Every recording plays by itself; the script below plays each only while +// it is on screen. Without the script, `autoplay` still plays them. +#let video(c) = el("video", (poster: "media/" + c.name + ".png", autoplay: "", muted: "", loop: "", playsinline: "", + controls: ""))[ + #el("source", (src: "media/" + c.name + ".webm", type: "video/webm"))[] + #el("source", (src: "media/" + c.name + ".mp4", type: "video/mp4"))[] +] +#let placeholder = el("img", (src: "media/placeholder.svg", alt: "", width: "640", height: "400"))[] + +/// A recording's caption: its text (which may hold #link markup), then the +/// docs of the "What's in it" word that jumps here, if any. +#let caption(c) = { + if c.caption.contains("#") { eval(c.caption, mode: "markup") } else { c.caption } + let to = landing.inside.find(i => i.rec == c.name) + if to != none [ #el("a", (class: "more", href: to.docs))[#to.name in the docs →]] +} + +/// A terminal recording: a box the player fills, its data inline (so it +/// plays from file://), its caption under it. +#let ready-casts = casts.filter(c => c.ready) +#let cast(c, i) = el("figure", (class: if i == 0 { "clip cast first" } else { "clip cast" }, id: "rec-" + c.name))[ + #if c.ready { el("div", (class: "player", id: "cast-" + c.name, "aria-label": c.title))[] } else { placeholder } + #el("figcaption")[#el("strong")[#c.title.] #caption(c)] +] +#let player-script = { + let list = ready-casts.enumerate().map(((i, c)) => ( + id: "cast-" + c.name, data: read("casts/" + c.name + ".cast"), + cols: c.cols, rows: c.rows, poster: "npt:0:" + str(c.at("poster_at", default: 2)), + )) + // "</" may not appear inside a script element + let data = json.encode(list, pretty: false).replace("</", "<\\/") + el("script", (src: "player/asciinema-player.min.js"))[] + el("script")[#("for (const c of " + data + ") { const el = document.getElementById(c.id); el.player = AsciinemaPlayer.create({data: c.data}, el, {cols: c.cols, rows: c.rows, autoPlay: false, loop: true, fit: 'width', poster: c.poster}); }")] +} + +/// Plays a recording while it is on screen and pauses it once it leaves. +/// The casts wait for it (autoPlay off) so each shows its poster frame +/// until then; the videos autoplay by themselves too. + +#document(href("index"), title: "pardes", shell("index", "pardes")[ + #el("h1", (class: "masthead"))[pardes] + #el("p", (class: "lead"))[#landing.lead] + #el("ul", (class: "inside", "aria-label": "What's in it"))[ + #for i in landing.inside { + let to = if i.rec != none { "#rec-" + i.rec } else { i.docs } + el("li")[#el("a", (href: to, title: if i.rec != none { "watch it here; the docs: " + i.docs } else { "the docs" }))[#i.name]] + } + ] + #el("p", (class: "credit"))[#landing.credit] + #el("p", (class: "runs"))[#landing.status] + #el("div", (class: "start"))[ + #for s in landing.start { + el("a", (class: "go", href: href(s.id)))[#s.label#if s.note != none [ #el("span")[(#s.note)]]] + } + ] + #el("p", (class: "rest"))[ + #for p in pages.slice(1).filter(p => p.id not in landing.start.map(s => s.id)) { + el("a", (href: href(p.id)))[#p.title] + } + ] + #el("h2", (class: "shelf"))[#landing.terminal] + #el("div", (class: "casts"))[#for (i, c) in casts.enumerate() { cast(c, i) }] + #el("h2", (class: "shelf"))[#landing.window] + #el("div", (class: "clips"))[ + #for c in clips.filter(c => c.at("landing", default: true)) { + el("figure", (class: "clip", id: "rec-" + c.name))[ + #if c.ready { video(c) } else { placeholder } + #el("figcaption")[#caption(c)] + ] + } + ] + #el("h2", (class: "install"))[#landing.install] + #include "../typ/install.typ" + #if ready-casts.len() > 0 { + el("link", (rel: "stylesheet", href: "player/asciinema-player.css"))[] + player-script + } +]) + +#for p in pages.slice(1, -1) { + document(href(p.id), title: p.title, shell(p.id, p.title)[ + #metadata(none) #label("start-" + p.id) + #heading(level: 1, p.title) #label("ch-" + p.id) + #toc(p.id) + #{ + set heading(offset: 1) + include "../typ/" + p.file + } + #metadata(none) #label("end-" + p.id) + ]) +} + +/// The tutor's text with its mouse buttons drawn: B1, B2, B3 and the +/// chords it writes 1-2 (hold 1, click 2) become the docs' mouse glyphs, +/// each with its hidden words, inside the preformatted block. +#let tutor-text(t) = { + // the guide's sections by title, for "-> Guide: Modes, Config" + let guide-sections = (:) + for m in read("../typ/guide.typ").matches(regex("(?m)^= (.+?) <([a-z0-9-]+)>$")) { + guide-sections.insert(m.captures.at(0), m.captures.at(1)) + } + let tokens = regex("\\bB([123])\\b|\\b([123])-([123])\\b|docs/typ/([a-z]+)\\.typ|(?m)(?:^ -> Guide: )(.+)$|https://[^\\s)]+") + let at = 0 + for m in t.matches(tokens) { + t.slice(at, m.start) + let (b, c1, c2, page, sections) = m.captures + if b != none { btn("B" + b) } + else if c1 != none { chord("B" + c1, "B" + c2) } + else if page != none { link(page + ".html", m.text) } + else if sections != none { + " -> Guide: " + sections.split(", ").map(name => { + let l = guide-sections.at(name, default: none) + if l != none { link("guide.html#" + l, name) } else { name } + }).join(", ") + } + else { link(m.text, m.text) } + at = m.end + } + t.slice(at) +} + +#document(href("tutor"), title: "The tutor", shell("tutor", "The tutor")[ + #heading(level: 1)[The tutor] <tutor> + The tutor as the editor shows it (#raw("Tutor"), or #raw("SPC h t")). + #el("pre", (class: "tutor"))[#tutor-text(read(tutor-path))] +]) diff --git a/docs/tags.md b/docs/tags.md deleted file mode 100644 index c4e93bc6..00000000 --- a/docs/tags.md +++ /dev/null @@ -1,102 +0,0 @@ -# Editable tags - -Pardes has three levels of command text: the workspace tag, one tag per -column, and each pane's tag. Column commands run in that column's active -pane (or its first pane when focus comes from another column). This makes -`New`, `Tty`, `Find`, and `Grep` available beside the work they act on. -`New` appears only in the column tag by default; pane tags keep their own -save, terminal, close, and collapse commands. `Tty` opens a new embedded terminal. -Pane and column command text leave a small gap after their aligned drag grips. -GUI pane mode symbols are centered by their visible ink; changing the font or -its size refreshes the cached measurements. -The column grip has a different -color from a pane grip. It stays blank and muted even when its column is active. -Drag it left or right to move the whole column; the -insertion line previews its destination. Only columns between the old and new -positions shift. Each column keeps its width, panes and command text. - -When Look opens the first document and its source column is too narrow for -a new column, it splits below the originating pane, just like `Tty`, instead -of inserting at the top of the leftmost column. The originating terminal is -kept. As with `Tty`, a tagline-only source uses a roomier split parent. - -`Collapse` reduces a pane to just its tagline, giving all its body space to -the nearest expanded pane above, or below if none is above. Other panes keep -their heights. Execute it again to reclaim its former height from that one -neighbor, as far as available space allows. If every pane is collapsed, the -unused area stays blank. -Its text and terminal process are kept; -the command stays available in the visible tag. Every default pane tag includes -`Collapse`, including file, terminal, image, and PDF panes. - -Left-click a tag to place its caret; drag to select text, then type to -replace it. Arrow keys, Home, End, Backspace and Delete edit the line. -Tags reveal the caret horizontally when text is wider than their column. -Escape returns to the body, keeping command-text edits. The existing Exec -and Look gestures still apply; the workspace tag is no longer an inert -left-click target. Pasted text goes to the focused tag, not to the file or -embedded shell beneath it. - -Keyboard entry returns to the tag's last cursor position. The first entry into -a pane tag starts at its commands; clicking always chooses a new position. -Each pane, column and workspace tag remembers its own position during the -session. Shortened text clamps the saved cursor to a valid character boundary. - -In normal mode, `h` and `l` move within the tag, `k` stays on the single line, -and `j` returns to the panel like Escape. Uppercase `HJKL` move between pane -tags. From the top pane's `:` tag, `K` reaches the column and another `K` reaches -the workspace; `J` walks back down. Enter or Tab on a header command in -normal mode executes it, as before. `i`/`a`/`I`/`A` switch to editing the -header. In insert mode, letters type normally, Enter is Look and Tab is Exec, -as in pane tags. - -Pane filenames and commands now have a single separator space rather than -generated right-alignment padding. Intentionally customized spacing is kept. - -## File names - -Editing a file pane's name creates a draft. Enter confirms the new buffer -name; Escape or leaving the tag cancels the draft. Confirmation changes the -buffer's save target and marks it unsaved. It does **not** rename, create or -overwrite a disk file. A subsequent explicit `Save` writes the buffer to its -committed name. Executing a pane-tag command confirms a valid name draft -first, so a visible draft cannot silently save to the previous name. - -Terminal working directories and generated image/PDF status remain managed -by their corresponding commands. Their command tails are editable just like -file command tails. - -PDF tags follow the same filename-first layout: `manual.pdf [1/12] Tty Del -PdfSections PdfTint Collapse`. Sections and tint commands remain in the editable -tail, without displaying the current tint state. `PdfFit` (`SPC t z`) remains -available, as do the shortcuts for `PdfTint` (`SPC t i`) and `PdfSections` -(`SPC t s`, or `f` on a PDF). - -Terminal tags include `Mode`, which cycles through raw terminal input, normal -editor mode, insert mode, and back to terminal input. On files and text output -panes, `Mode` cycles between normal and insert mode; it is available as a command -but does not appear in their default tags. Images and PDFs keep their normal mode. -Executing `Mode` from a tag leaves the tag and advances the parked body mode. - -Ctrl-B keeps its terminal/editor toggle. Existing custom tags can still use -`Togglettymode` for that two-way terminal toggle. Old default terminal tags -upgrade to `Mode`; customized command text is preserved. - -## Saved workspaces - -`Dump` and `Restore` preserve customized workspace and column tags, including -intentionally empty tags. New columns start with the standard column tag. -Closing a column keeps surviving columns' tags; `Joincol` keeps the destination -column's tag. Old dumps without these optional fields retain the defaults. -The automatic `Restore` shortcut does not overwrite a customized workspace -tag. - -The column row stays above panes with `TagBottom` enabled. On screens shorter -than three rows it is omitted so a pane still has room. SDL and TTY share the -same tag text, editing and layout; SDL additionally uses compact font sizing -and subtle pixel separators. - -`ColumnTags` toggles the column row (on by default) without deleting its text. -`FocusTint` controls active-column and active-pane emphasis. SDL also honors -the shared bold, underline, and strikethrough attributes, including diagnostic -underlines and the optional `SyntaxBold` keyword weight. diff --git a/docs/themes.md b/docs/themes.md deleted file mode 100644 index dac389f5..00000000 --- a/docs/themes.md +++ /dev/null @@ -1,138 +0,0 @@ -# Pardes themes - -Pardes ships fifteen native palettes: six originals, six classic-inspired -adaptations and three contrast variants, designed for tags, text, search, diagnostics and embedded -terminals together. `orchard` is the initial theme. -Execute `Theme <name>` anywhere, or open `ThemeSel` with `SPC t t` and select -a theme's command. Put the same command in your [startup configuration](config.md) -to keep a preference. `NextColor` cycles through the native themes first, -then the retained `helix`, `dark` and `acme` themes and imported palettes. -`ThemeSel` groups the new palettes under `Pardes themes`, followed by -`Legacy and imported themes`; its navigation skips the section headings. -See the [Agave visual review](ui-review.md) for the original six-palette gallery. - -| Theme | Character | Page | Accent | -| --- | --- | --- | --- | -| `orchard` | Near-black evergreen; bright leaf comments and plum syntax | `#0d1410` | `#adcc91` | -| `dusk` | Soft plum charcoal; copper comments and gentle text | `#39323b` | `#e4b39b` | -| `ink` | Pure black; bright, distinct signals and ice-blue comments | `#000000` | `#86d8ff` | -| `paper` | Neutral uncoated paper; graphite and teal | `#f5f3ed` | `#3c6b56` | -| `daybreak` | High contrast light; white and deep blue ink | `#ffffff` | `#075f91` | -| `atelier` | Acme homage; butter-yellow paper and blue-green tags | `#fffdeb` | `#3e7a68` | -| `forge` | Dark Plus-inspired near-black, blue and peach; slate-blue tags | `#0c0c0e` | `#a5c4ee` | -| `lagoon` | Softer Material-inspired slate; vivid sea-glass comments | `#34464c` | `#89c7b4` | -| `solarium` | Softer Solarized-inspired blue-green; golden comments and teal tags | `#173e45` | `#d5bc72` | -| `spectrum` | Monokai-inspired near-black and candy colors; golden comments | `#100e11` | `#ffd866` | -| `harvest` | Autumn-inspired near-black earth, ember and leaf green | `#100e0b` | `#cfba8b` | -| `clay` | Gruvbox-inspired near-black and earthy brights; amber comments | `#10100e` | `#8ec07c` | -| `forge_black` | Pure-black Forge; luminous text and cool slate tags | `#000000` | `#a5c4ee` | -| `forge_soft` | Neutral-slate Forge; gentler text, still vivid blue comments | `#35383e` | `#a5c4ee` | -| `orchard_black` | Pure-black Orchard; luminous garden ink and bright leaf comments | `#000000` | `#adcc91` | - -The six adaptations retain recognizable classic syntax identities, but are -not exact ports. Their Acme influence is deliberate: quiet command strips, -thin boundaries, and a search surface -distinct from selection. Forge uses cool-neutral chrome instead of green -tints. Active pane and column tags use a restrained tone-on-tone shift, not -a light/dark inversion: dark palettes keep dark tags, and light palettes -keep light tags. A slight text lift and the focus marker retain the cue -without turning the entire command strip into a highlight. -The filename at the end of a pane's path uses a distinct hue at the same -perceived brightness as the tag text. The directory and commands keep -their usual foreground. Filename text meets the same contrast threshold on -both normal and active tag backgrounds. -Column drag grips use a separate accent from pane grips, with matching geometry. -Comments are colorful first-class text, while line numbers stay quiet; -the current line number gets a small color emphasis and bold weight, never a bright tag-colored -block. These are appearance changes only; -tag editing, commands and terminal interaction are unchanged. - -Dark backgrounds make an explicit choice: near-black with bright text, or -the gentler slate/plum/blue-green of `forge_soft`, `dusk`, `lagoon` and -`solarium`. The softer group keeps body text around 5.5–6.7:1 contrast; the -near-black group exceeds 14:1. Try `Theme forge_black` and `Theme forge_soft` -back-to-back to compare the extremes without changing the syntax identity. -Light paper and the Acme homage remain available. - -Their local references are `vendor/themes/dark_plus.toml`, -`material_oceanic.toml` (and its `material_deep_ocean.toml` parent), -`solarized_dark.toml`, `monokai_pro.toml`, `autumn.toml`, and the Gruvbox Dark -entry in `gruvbox.json`. The original imported themes remain selectable under -their existing names; the adaptations have distinct Pardes names and do not -claim upstream affiliation. Existing vendor provenance and licenses remain -with those sources. - -All fifteen palettes specify their own ANSI colors, so indexed terminal output -belongs to the same palette as the editor. Explicit true-color output can -still carry an application's own colors; the existing terminal `Filter` -command projects those colors through the theme. The older `dark` palette -continues to inherit the surrounding terminal's default background and text. - -The native palettes keep normal text, syntax colors, comments, -diagnostics and ANSI foregrounds at a calculated sRGB contrast ratio of at -least 4.5:1 against the page. `ink` and `daybreak` raise that floor to 7:1. -Comments additionally stay above 5:1. Decorative line numbers sit between -2.5:1 and 4:1, with current numbers capped at 4.5:1; they deliberately do not -compete with source text. ANSI bright black is independent of the comment -color, so making comments vivid does not recolor gray terminal output. -Tag, active-tag, selection and search text are checked against their respective -surfaces at the same thresholds. Active/inactive tag backgrounds differ by -no more than 1.6:1, keeping focus changes quiet. ANSI black is exempt because applications -also use it as a background. These are palette checks, not a guarantee about -arbitrary terminal escape sequences, reversed colors or shader effects. - -## Make a theme your own - -Run `DumpThemes` to export complete `.zon` files below the configuration -directory's `themes/builtin/`. Copy a native file to `themes/mine.zon`, change -its `.name`, and run: - -```text -ThemeFile themes/mine.zon -``` - -On hosts with live document reload, saving a valid theme file updates it -immediately. An incomplete save keeps the last valid version. Selecting a -built-in theme stops the custom theme watch. - -Pardes roles extend the original editor palette with independent choices -for its UI. Each value is an RGB triple, for example -`.search_bg = .{ 0x57, 0x47, 0x2a }`. New roles are optional and accept `null`, -so existing exported themes remain valid. - -| Optional role | Purpose | When absent | -| --- | --- | --- | -| `tag_active_bg`, `tag_active_fg` | Focused pane tag surface and text | `tag_bg`, `tag_fg` | -| `tag_name_fg` | Filename or terminal `Tty` command tint | The corresponding normal or active tag foreground | -| `tag_active_name_fg` | Filename or terminal `Tty` tint in active tags | `tag_name_fg`, then the active tag foreground | -| `column_box` | Base accent for the column grip's fallback color | `num` | -| `column_box_dim` | Column drag grip in every focus state | Equal mix of `column_box` and `tag_bg` | -| `border` | Quiet separators | `scroll_track` | -| `lineno_active` | Restrained current line number foreground | `lineno` | -| `search_bg`, `search_fg` | Search matches, independent of selection | `sel_bg`, `sel_fg` | -| `diagnostic_error` | Error text | `fg`, or `tag_fg` for an inherited foreground | -| `diagnostic_warning` | Warning text | Same foreground fallback | -| `diagnostic_info` | Informational diagnostic text | Same foreground fallback | -| `diagnostic_hint` | Hint text | Same foreground fallback | - -Native palettes give filenames a distinct hue at approximately the same -brightness as the surrounding tag text. This also applies to output names -such as `+Search`. Terminal tags instead tint `Tty`, the first builtin after -the path. Directory paths and the other commands retain the regular tag color. - -These colors are shared by the GUI and TTY. Tags and their active tint retain -the same text, command execution, drag targets and focus behavior. Selection -and search have separate palette roles because they communicate different -states. Theme changes use the existing chrome transition; body and terminal -colors switch directly so syntax and ANSI content stay coherent. - -`FocusTint` toggles the focused pane's tag tint, which is on by default. -`SyntaxBold` toggles bold syntax keywords, which are off by default. Both -commands take no argument, work in GUI and TTY, and report their states in -`Config`. Use them in the startup configuration to reverse the defaults. - -The original required roles remain unchanged: nullable `bg` and `fg`, -`sel_bg`, `sel_fg`, `tag_bg`, `tag_fg`, `box`, `box_dim`, `kw`, `str`, `num`, -`comment`, `lineno`, `scroll_track`, `scroll_thumb`, and a nullable 16-entry -`palette`. `ThemeFile` loads a complete theme, with no inheritance or partial -override syntax. The exported native files are the easiest starting point. diff --git a/docs/typ/README b/docs/typ/README new file mode 100644 index 00000000..9d3913c0 --- /dev/null +++ b/docs/typ/README @@ -0,0 +1,126 @@ +docs/typ: the Typst documentation corpus + + style.typ every semantic function, the palette and the topic + ids; the only place they are defined. Each function + looks at target(): it draws itself for paged output + and emits HTML elements under --features html. + cheatsheet.typ content: facts as markup and the calls below, no + layout. Later topics (guide, scripting, reference, + building) go beside it as their own content files. + cheatsheet-a4.typ output wrapper: the one-page A4 cheatsheet. + book.typ output wrapper: an A4 book, title page, contents, + every chapter, then the tutor (src/tutor.txt). + ../site/site.typ output wrapper: the website, a page per chapter plus + the landing page and the tutor, in one Typst bundle + run (see docs/site/README). + Wrappers hold layout only, never facts. + +Chapters: `chapters` in style.typ lists them in reading order (guide, setup, +cheatsheet, scripting, reference, themes, building), each with its content file, +or none while it is not written (the outputs show a placeholder). To add +a topic, write docs/typ/<id>.typ and set its `file`. Wrappers include it +with heading offset 1, so its = headings sit under the chapter title, +which is labelled ch-<id>. Labels on headings must be unique across all +the topics, since the book and the HTML hold them all. + +Build (from the repo root): + + typst compile --ignore-system-fonts docs/typ/cheatsheet-a4.typ + zig build cheatsheet -Dplatform=tty --prefix DIR # DIR/share/doc/pardes/cheatsheet.pdf + typst compile --root . --ignore-system-fonts docs/typ/book.typ + typst compile --root . --format bundle --features bundle,html docs/site/site.typ OUT + zig build site -Dplatform=tty --prefix DIR # DIR/share/doc/pardes/site/ +(--root . because book and HTML read the tutor from src/tutor.txt.) + +The contract for content files +------------------------------ +Start a content file with + #import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, fstree, annotated, mode-box +(a content file does not import page setup; the same file goes into the +book, the HTML and, for the cheatsheet, the A4 page) +and use plain markup (= headings, - lists, `raw`, *strong*) plus these. +Never set page, fonts, colours or spacing in a content file; ask for a +new function instead. + + word(w) a builtin or tag word, drawn as a chip on the tag's + ground; a builtin links to its entry in the Builtins + chapter wherever that chapter is in the same output. + #word("Save") #word("Tty+bash") + key(k) one press, or a sequence of presses separated by + spaces, drawn as one pill (Ctrl + w, g › g). + Modifiers: Ctrl-, Alt-, Shift-. + #key("Ctrl-w") #key("g g") #key("SPC f c") + keys(..ks) alternatives listed together, each its own key. + #keys("h", "j", "k", "l") #keys("g d", "g r") + btn(b, shift:) a mouse button, B1 B2 (the wheel) or B3, drawn as a + mouse with that part filled; shift: true adds a ⇧. + #btn("B3") #btn("B1", shift: true) + chord(..bs) a chord: the first button held, each next clicked. + #chord("B2", "B1") #chord("B1", "B2", "B3") + tag(words, path:) + a whole default tagline; words must be a default tag. + #tag("Save Tty Collapse Del", path: "/home/me/notes.txt") + addr(a) a look address. #addr("file:12:5") + file(p) a 9P path. #file("pane/N/addr") + cmd(c) a shell line, as a block. #cmd("echo Save > $m/pane/$n/ctl") + doc(id, section:) + a pointer to a chapter, or a section of it by the label + on its heading. Ids: guide setup cheatsheet scripting + reference themes building (and the older tags fs + config keys detached, mapped in `topics`). A link in + the book and the HTML; on the A4 sheet, its name. + #doc("building", section: "listeners") + fstree(spec) a directory tree drawn as `tree` draws one, from a raw + block: two spaces of indent per level, the name (a + directory ends in /), two or more spaces, a one-line + description, an optional @label of the section that + documents it (a link where that section is in the + same output). reference.typ's tree is checked against + the files the session serves. + #fstree(``` + index a line per pane @rules + pane/ + new open: a new pane @panes + ```) + annotated(src, size, alt:, ..pins) + a screenshot with numbered pins, their labels as text + beside it. src from the repository root, size in + pixels, each pin ([label], x, y) in its pixels. + #annotated("/docs/site/media/themes/orchard.png", (640, 513), + alt: "a pardes window", ([the box], 8, 58)) + mode-box(mark, unsaved:) + a pane's box as it looks: " " normal, "^" insert, + "$" raw; unsaved: true fills it. + #mode-box("^") #mode-box(" ", unsaved: true) + theme-gallery() every theme as a picture, on the site's Themes page; + nothing on paper. + pairs(split:, ..cells) + a two-column table, a thing and its meaning, rows on + alternating tints; split: 2 sets it as two tables side + by side on paper. Cells alternate left, right. + #pairs(key("u"), [undo], keys("i", "a"), [insert]) + +Builtins +-------- +builtins-tty.json and builtins-gui.json are every builtin of the terminal +and the window build (name, leader, Help's other shortcuts, arg, scope, +setting, choices, doc), written by `zig build builtins-json -Dplatform=tty` +and `-Dplatform=gui` from the registry and the Help rows +(src/builtins_json.zig). style.typ merges them, marking each word "both", +"tty" or "gui". The doc steps refresh their build's file first, and each +build's unit-test fails when its file is stale. #word takes a name from +either file. builtins.typ draws it as the +glossary; `everyday`, `internals` and `builtin-groups` in style.typ say +in what order. + +The drift test +-------------- +The unit test "docs/typ names only words, keys and default tags that +exist" (src/config.zig) reads every .typ here and fails when a word(), +key(), keys() or tag() names a builtin, key binding or default tag that +pardes no longer has. Pass these functions string literals, so the test +can read them. + +Only embedded fonts (Libertinus Serif, DejaVu Sans Mono), so output is the +same on every machine. docs/typ/cheatsheet-a4.pdf is committed, as the +other docs PDFs are; re-render it when the content changes. diff --git a/docs/typ/book.typ b/docs/typ/book.typ new file mode 100644 index 00000000..b2245372 --- /dev/null +++ b/docs/typ/book.typ @@ -0,0 +1,56 @@ +// The book: every topic in reading order, then the tutor. Facts live in the +// content files named by `chapters` in style.typ; this is layout only. +// typst compile --root . --ignore-system-fonts docs/typ/book.typ +// (--root . because the tutor is read from src/tutor.txt.) +#import "style.typ": palette, mono, chapters, tutor-path, doc-links, tagline + +#set document(title: "pardes") +#doc-links.update(true) +#set page(paper: "a4", fill: palette.paper, margin: (x: 22mm, y: 24mm)) +#set text(font: "Libertinus Serif", size: 10pt, fill: palette.ink, lang: "en") +#set par(justify: true, leading: 0.62em, spacing: 1em) +#set list(spacing: 0.8em) +#show heading.where(level: 2): set block(above: 2em, below: 0.9em) +#show heading.where(level: 3): set block(above: 1.5em, below: 0.7em) +#show raw: set text(font: mono, size: 0.9em) +#show raw.where(block: true): it => block( + width: 100%, fill: palette.tag-bg.transparentize(50%), radius: 2pt, + inset: (x: 6pt, y: 5pt), above: 0.9em, below: 0.9em, it) +#show heading: set text(fill: palette.tag-name) +#show heading.where(level: 1): it => { + pagebreak(weak: true) + v(18mm) + text(size: 22pt, weight: "bold", it.body) + v(8mm) +} + +// title page +#page(numbering: none, { + v(1fr) + text(size: 34pt, weight: "bold", fill: palette.tag-name)[pardes] + v(4mm) + text(size: 13pt, style: "italic", fill: palette.tag-fg, tagline) + v(10mm) + text(size: 11pt, fill: palette.ink)[Built on ideas from #link("https://9p.io/plan9/")[Plan 9] from Bell + Labs: #link("https://9p.io/sys/doc/acme/acme.html")[acme]'s text as the interface, and the 9P + protocol.] + v(2fr) +}) + +#page(numbering: none, outline(depth: 2)) + +#set page(numbering: "1") +#counter(page).update(1) + +#for ch in chapters { + [#heading(level: 1, ch.title) #label("ch-" + ch.id)] + if ch.file == none { + text(style: "italic", fill: palette.tag-fg)[This chapter is not written yet.] + } else { + set heading(offset: 1) + include ch.file + } +} + += The tutor +#text(size: 8pt, raw(read(tutor-path), block: true)) diff --git a/docs/typ/building.typ b/docs/typ/building.typ new file mode 100644 index 00000000..d551c251 --- /dev/null +++ b/docs/typ/building.typ @@ -0,0 +1,315 @@ +// Building pardes, for contributors: platforms, options, tests, the +// release gates and sending patches, then how the pieces fit: the core +// and its shells, the threads, detached sessions, the 9P engine, the +// listeners and mounts. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs + +For contributors: how pardes is built, tested and released, and how its +pieces fit. To install it, see #doc("setup", section: "install"). + += Platforms + +Zig *0.17.0* (`build.zig.zon` pins `minimum_zig_version`). Dependencies are +fetched and pinned by the manifest; the terminal build needs no system +package. The SDL shell builds SDL3 and FreeType from source. PDF support +builds MuPDF and is on by default (`-Dmupdf=false` drops it). 9P over QUIC +(`-Dquic=true`) uses system OpenSSL 3.6+ and pkg-config. + +#pairs( + [`zig build`], [the terminal shell and the SDL window together, *installed into `~/.local/bin`* (`pardes`, `pardes-gui`, and `pardes-v9fs`, the #word("Tty9p") helper)], + [`zig build -Dplatform=tty`], [the terminal shell alone], + [`zig build -Dplatform=gui`], [the SDL3 window alone], + [`zig build web -Dplatform=web -Dtarget=wasm32-freestanding -Ddump=<dump.zon>`], [a freestanding wasm core plus vanilla JavaScript (`docs/web.md`)], + [`zig build -Dplatform=macos`], [an AppKit and CoreText app over a static `libpardes.a` (`docs/macos.md`)], + [`zig build -Dplatform=esp32p4`], [a freestanding riscv32 editor object for the ESP32-P4, with a 384 KiB heap], +) + +A bare `zig build` installs into the prefix (`zig-out`, or `--prefix +<dir>`) and copies the binaries into `~/.local/bin`; `-Dhome-install=false` +leaves that copy out. Zig 0.17 keeps the prefix from the build script, so +`--prefix` alone no longer stops it. With `-Dplatform` nothing is copied, +so always pass `-Dplatform` while developing. Test, benchmark and run steps build what they need +without installing. `pardes --version` prints `pardes <version>` (from +`build.zig.zon`), plus the commit for release builds and the `~/.local` +install; `pardes --help` lists every flag. + +The ESP32-P4 firmware is linked in the sibling `../05-zig-p4` toolchain, +which needs ESP-IDF register headers: after building the editor object +here, `zig build -Dpardes` there links `src/esp32p4/app.zig`. The separate +GPIO 9P image is `zig build -Dapp=../02-pardes-code/src/esp32p4_9p.zig` +there; its namespace is in `src/esp32p4_gpio.zig`. + +== Build options + +`zig build --help` lists the options for the selected platform. + +#pairs( + [`-Dplatform`], [`tty`, `gui`, `web`, `macos`, `esp32p4`; absent: the tty and SDL shells together, installed into `~/.local`], + [`-Dstatic`], [bool, `false`], + [`-Dquic`], [bool, `false`: 9P over QUIC with system OpenSSL 3.6+], + [`-Dmupdf`], [bool; on natively, off for web and esp32p4], + [`-Djpx`], [bool, `true`: JPEG 2000, and with it scanned PDFs], + [`-Dtree-sitter`], [`disabled`, `zig`, `minimal`, `full`; `full` natively, `zig` for web, `disabled` for esp32p4], + [`-Dembed-sources`], [bool, `false`: serve the sources under #file("/src")], + [`-Dhome-install`], [bool: a bare `zig build` also copies the binaries into `~/.local/bin`; default true], + [`-Dstamp-commit`], [bool: the git commit in `--version` and crash records; on for release builds and the `~/.local` install], + [`-Dtheme-animation`], [bool; on except for esp32p4], + [`-Dworkspace-tag`], [bool: draw the workspace tag row; on except for macOS, whose menu bar carries it], + [`-Dprebuilt-shaders`], [bool: embed the committed SPIR-V; on for a bare `zig build`, off with `-Dplatform`; `zig build shaders` refreshes it with glslc], + [`-Dtracy`], [path to a Tracy checkout; off], + [`-Dmacos-identity`], [codesigning identity for `pardes.app`; `-` (ad hoc)], + [`-Ddump`], [a `dump.zon` to embed in the web shell], + [`-Dtest-filter`], [run only tests whose name contains it; a filter that matches nothing fails], + [`-Dtest-rebuild`], [bool: fresh Zig test compilation], + [`-Dhelix-harness`], [reference executable for live differential tests; `HX_HARNESS`, else `hx-harness` on `PATH`], + [`-Desp32p4-cols`, `-Desp32p4-rows`], [the ESP32-P4's grid, 56 by 14], +) + += Tests + +``` +zig build unit-test module and shell unit tests (the perf gate runs with it) +zig build test-build compile the unit-test programs without running them +zig build core-test core tests without native shell tests +zig build pane-test pane, output, PDF and namespace integration tests +zig build kitty-test kitty graphics conformance of terminal panes, at the core +zig build kitty-harness kitty graphics through a pane end to end (a fake kitty + terminal outside on the tty, the GPU capture on the gui; + kitten icat and chafa too when installed) +zig build syntax-test tree-sitter tests without building the editor +zig build syntax deterministic per-byte highlighting snapshots +zig build fs-test real sessions and mounts over 9P (with a short 9P monkey) +zig build monkey-9p random 9P operations checking the documented rules +zig build agent-session-test interactive session driver checks over 9P +zig build 9p-test freestanding protocol tests +zig build 9p-io-test native 9P transports and client +zig build quic-test -Dquic=true optional QUIC transport tests +zig build v9fs-test a real kernel mount (needs sudo -v; fails, not skips, without it) +zig build snap scripted input traces against frozen golden grids +zig build monkey random snapshot scripts hunting panics (not a gate) +zig build hxdiff differential suite against helix's own behaviour +zig build hxparity file-pane vs pty-pane editing parity +zig build hxgolf every helix-golf example, step by step, against helix +zig build perf-gate a gesture on the 50k-line file over 3x its baseline fails +zig build mupdf-check compile, link, render and search docs/design.pdf +zig build web-snap browser highlighting and touch interactions +zig build web-e2e Chrome-driven DOM end-to-end suite +zig build cheatsheet render the cheatsheet PDF (needs typst) +``` + +- `-Dtest-filter=<text>` applies to every unit-test binary. A failed test's + printed trace can be stale: run it alone with the filter. +- `snap -- --record=DIR` writes snapshots without touching goldens, + `snap -- --update` replaces goldens (re-record one script by name, after + reading its diff, never all), `snap -- --no-retry` makes the first + failure decisive. Snapshot scripts can use `snap9p` to capture core cells + through 9P. +- `zig build monkey -Dplatform=tty -- <seeds> [steps] [--from=N] [--out=DIR] [--keep]` writes one random script per seed and keeps any + that panics; a seed always makes the same script. Each crash found gets a + fix and a regression script in `test/snapshots/`. +- The tutor's practice blocks (`# keys:`, `# before`, `# after` in + `src/tutor.txt`) are typed by hand; nothing runs them. What pins that + behaviour is `hxdiff`, which replays `test/hxcases` against goldens + recorded from a real helix, and `hxparity`, which runs each case in a + file pane and in a shell and demands they agree. +- `zig build hxdiff -- --strict cases.jsonl reference.jsonl [waivers.jsonl]` runs custom differential cases. `docs/helix-keys.md` + tracks helix parity key by key and names the reference helix build; + `docs/selections.md` is the selection model under normal mode. +- Benchmarks (`perf`, `pdf-bench`, `pdf-scroll-bench`, + `pdf-sections-bench`, `lspbench`, `fs-bench`) take `-- --json`; measure + with `-Doptimize=ReleaseFast`. `perf -- --base old.json` refuses reports + whose build metadata differs. +- `zig build history -- run 'ancestors(@, 2)' DIR -- zig build unit-test` + records a command's output and runtimes across revisions; `history -- compare a.json b.json 1.20` fails past that runtime ratio. +- `python3 -B test/agent_session.py <pardes> --ready 'text' --min-rows N -- command args` drives an interactive command in a private shell and checks + it through 9P. + +== Release gates + +A release passes all of these first: `unit-test` with `-Dplatform=tty` and +with `-Dplatform=gui`, `core-test`, `fs-test`, `snap`, the GUI goldens +(`python3 -B test/gui_golden.py <a Debug pardes-gui>`, a hidden window), +`web`, and the ReleaseSafe tty and ReleaseFast gui builds. The committed +`docs/typ/cheatsheet-a4.pdf` is rendered again when the docs change. + += Sending patches <patches> + +Mail patches to the list `~gbrls/[email protected]`; it is the preferred way to contribute: + +#cmd("git config format.subjectPrefix \"PATCH pardes\"\ngit send-email --to=~gbrls/[email protected] HEAD^") + +#link("https://git-send-email.io")[git-send-email.io] sets `git send-email` up. The mirrors (#doc("setup", section: "install")) are for cloning, as a GitHub one will be; pull requests are not the preferred route. + += The core and its shells + +One core, five shells (tty, gui, web, macos, esp32p4). The core owns +editing, layout, rendering and the virtual filesystem it serves over 9P; a shell turns native +input into `pardes.Event`, presents `pardes.Surface`, and performs host +effects such as spawning processes. + +- The core is a state machine: input arrives as an `Event` through + `update`; output leaves as a `Surface` from `render(arena)` and as a ring + of `Effect` values. Effects are fixed-size values with no lifetime ties + into the core; unbounded content is read off the core when an effect is + drained (`save_text` carries a path and the pane's serial, so a reused + slot writes nothing). `emit` refuses when the ring is full and never + evicts. +- Pty bytes leave as 64-byte `.write` effects; overflow parks in a per-pane + buffer that `nextEffect` drains in order. `postEvent` is a 64-entry value + queue for events that borrow no slices. +- `pump` runs: wait for input (the host owns the sleep), flush paused 9P + write batches, drain queued events, drain effects, settle the turn, then + render and present only when a frame is needed and someone is looking. +- `host_io.Host` is a context pointer and a vtable of optional callbacks; a + null method is not an error, and `Host{}` is a complete in-process pardes + that the tests use. Comptime decides what a build has (`pardes.platform`, + `hosted`, `can_attach`, `terminal_panes`, `pdf_enabled`); the vtable + decides who serves it. +- The root module is chosen by platform: `main.zig` (tty, gui), + `web.zig`, `macos.zig`, `esp32p4.zig`. The web and macOS shells are + libraries whose host owns `main()`. +- `memory.limits` is the one home for capacities that differ on the ESP32-P4 + (panes 16, columns 6, selections 64, the tag's 512 bytes). Each core + allocator is a thread-safe stack-fallback allocator, under a + DebugAllocator in Debug builds. + +Code map: `src/panes.zig` and the pane kinds it names (`src/File.zig`, +`src/Terminal.zig`, ...), `src/layout.zig`, `src/fs.zig` (host access, +mounts and resolution) and `src/pardes.zig` (input), with one file per +thing beside them (`edit.zig`, `normal.zig`, `look.zig`, `exec.zig`, +`mouse.zig`, ...). `src/ninep/` is the control tree, `src/detached/` the +wire, the detached core and the frontend client, `src/lsp/` the +language-server client; `test/` holds harnesses, goldens and helix cases, +`build/` the snapshot suite's build step. + +== Threads + +The core is single-threaded under a turn mutex, `pardes.turn`. The editor +thread holds the turn and lets go of it while it waits for input and while +it is out in a host syscall mid-step; a 9P connection task takes the turn +in those gaps to answer a request. While a step is out, a request that +would change a pane parks (`Status.again`) and is retried when the editor +rests. 9P requests are not events: they enter through `Pardes.serveFs`, and +only one that changes a pane costs a frame. Language-server and +selection-pipe workers post completions through a bounded mailbox; a +`host_io.Lsp.Job` owns copies of the source, path and arguments, never +reading the live core, and a request id, the pane's serial and (for an +edit) the file's revision reject a stale reply. A process that never calls +`turn.start` (the tests, the ESP32-P4, the browser) has no second thread. + +== Detached sessions + +One poll loop in `src/detached/server.zig` owns core mutation, frontend +connections, pty I/O and file watches. The frontend socket is +`pardes-detached-<name>.sock` beside the session's 9P socket; a second +session cannot take a live name. Up to 32 frontends attach; frames go to +every one, while clipboard reads, browser opens and #word("Detach") go to +the frontend that asked (else the first attached). Frames are full grids +or changes against what each frontend last received, never queued: a +frontend with unsent bytes skips that frame, and one that stops draining +past 1 MiB of control backlog is closed, its peers untouched. Frontends +never spawn shells, write session files or watch files. #word("Attach") +connects first and swaps second: only after the handshake does a shell +give up its own core. #word("Restore") builds the replacement core before touching +the current one. + +`src/detached/wire.zig` is the versioned protocol (version 10): fixed-width +little-endian fields, a 5-byte header (tag, then a u32 length), payloads up +to 16 MiB and grids up to 512 by 128. A comptime hash of `pardes.Chrome` +forces a version bump when that struct changes. + += 9P + +The wire format, the client and server connections, the file-server engine +and the Unix, TCP and QUIC transports are the `cloud9` package +(`git.sr.ht/~gbrls/cloud9`), pinned in `build.zig.zon` and fetched into +`zig-pkg/`. Re-pin with +`zig fetch --save=cloud9 git+https://git.sr.ht/~gbrls/cloud9#<commit>`, or +use `.cloud9 = .{ .path = "../cloud9" }` while editing both. cloud9's own +`zig build test`, `transport-test`, `quic-test -Dquic=true`, `fuzz` and +`differential` cover the shared code. + +- The engine (`fs.Server`) owns fids, permissions, directory reads, + flushes and what a hangup releases; it allocates nothing and makes no OS + calls. The control tree in `src/ninep/` is its backend: `tree.zig` + (nodes, dispatch), `pane.zig`, `ctl.zig`, `cols.zig`, `addr.zig`, + `pty.zig`, `events.zig` (event and log), `screen.zig`, `sources.zig`. + `src/9p.zig` names the editor's and the ESP32-P4's engine settings: msize + 65536, 256 fids, 128 held reads a connection, names up to 255 bytes; the + ESP32-P4 has 32 fids. +- A read, write, open, clunk, remove or truncating wstat can park; a walk, + attach, stat, create or rename cannot. Every Rread is clamped to the + count and the msize; Tflush answers the original request first. +- Unix and TCP listeners run on cloud9's `serve.Runner`: an accept task per + listener, a reader and a writer task per connection, 16 connections. QUIC + (`src/9p_quic.zig`) still runs on the editor's poll loop in + `src/9p_io.zig`. +- A body write takes only whole UTF-8 sequences and answers a short count + for the rest. Consecutive writes from one open at the end of the text are + held and applied as one edit, flushed by any other request, the open's + release, 64 MiB, or a 20 ms pause in the editor's step. + +== Writes through a mount <writes-through-a-mount> + +A mount cuts a big write into pieces of at most one message (msize 65536, +less the header), anywhere, and each command line runs once its newline +comes; nothing is read into a write's size. A last line with no newline +(`printf Save > exec`) runs when the file is closed, as does an #word("Edit") +block never ended, and its failure is then only in the log, as its `err` +record: the close reports no error, and the write that sent it had +already succeeded. So a script that needs a line's result ends it with a +newline. A line over 1 MiB is refused once, and the rest of it, through +its newline, is dropped. + +== Listeners <listeners> + +`--9p-tcp='tcp!127.0.0.1!5640'` adds TCP; `--9p-quic='quic!127.0.0.1!5641'` +adds QUIC (built with `-Dquic=true`; ALPN `pardes-9p`, an ephemeral TLS +identity, no peer verification). Addresses are numeric IPv4 or IPv6; port +0 picks one; #file("/listeners") reads them back. Every connection has full +session access, #file("/os") included, and TCP is unencrypted: use +loopback. Unix and TCP share 16 connection slots; a 17th client's Tversion +gets `too many connections` (and the log +`err - 9p: too many connections (N turned away)`). QUIC has 16 of its own. +plan9port and v9fs need a userspace bridge for QUIC. + +`$XDG_RUNTIME_DIR/9p` is the machine's `/srv`: servers post themselves +there by name, and `9ns --mntgen` mounts the whole registry. A pardes whose +socket is in the runtime directory posts +`$XDG_RUNTIME_DIR/9p/pardes/<name>`, a symlink to its socket, and unposts +it on a clean stop if it is still its own; one whose socket fell back to +`~/.local/state/pardes` posts nothing. Posting first sweeps the group: a +symlink whose socket refuses a connect is removed with its socket. pardes +binds its own socket rather than going through `cloud9.post`, which takes +only flat names. A reader of the registry must `stat` through the symlink. + +== Kernel mounts and Tty9p + +For Linux v9fs use `version=9p2000,cache=none,access=any`, `trans=unix` +(or `trans=tcp` with `port=`), `uname`, `dfltuid` and `dfltgid` for the +local user, and an empty `aname`. Linux follows `O_TRUNC` with a `Twstat` +of zero length and an `mtime` hint; pardes takes the truncation and drops +the hint. + +#word("Tty9p") starts the normal shell and queues a quoted helper command, +which bash and fish run at their first prompt as a foreground job, so +sudo has the terminal. The unprivileged launcher makes a private temporary +mountpoint and runs `sudo -E`; the elevated `pardes-v9fs` helper makes a +private mount namespace, mounts the session's socket with +`trans=unix,version=9p2000,cache=none,access=any,nosuid,nodev,noexec`, +drops every root id and capability, and runs the shell as the user (with +the caller's `PATH` again). The namespace and the mount go with its last +process. Nothing setuid and no passwordless sudo rule is installed; the +helper takes explicit paths and a command and is no restricted broker, so +never grant it passwordless sudo. The host finds the helper beside its own +executable, or at `PARDES_V9FS_HELPER`. Code: `src/linux/v9fs.zig`; +`zig build v9fs-terminal-test` and `v9fs-driver-test` need no privileges. + += Other notes + +`docs/` keeps the platform and design notes beside this book: +`web.md` and `macos.md` (the browser and macOS shells), `effects.md` and +`render-pipeline.md` (visual effects), `helix-keys.md` and `selections.md` (helix parity), +`lsp-evaluation.md`, `ui-review.md`, `divergences.md` (bookmarks off +`main`) and `open-questions.md`. `next-steps.txt` is a wishlist and +`transactions.txt` records one open structural gap against helix. diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json new file mode 100644 index 00000000..db1031a0 --- /dev/null +++ b/docs/typ/builtins-gui.json @@ -0,0 +1,163 @@ +[ + {"name": "Ascii", "leader": "SPC t a", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "add the printable ASCII bitmaps to the matcher's glyph set"}, + {"name": "Attach", "leader": "SPC s a", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Attach this terminal to a detached pardes session by name."}, + {"name": "Back", "leader": "SPC j o", "also": ["C-o"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-o: one step back into the history."}, + {"name": "Bloom", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The brightest ink glows a little: a level, 0 (off) through 3."}, + {"name": "BootShell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "keep, replace", "doc": "A document dropped where a lone untouched shell stands: keep the shell, or replace it."}, + {"name": "Callees", "leader": "SPC l C", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the functions the function under the cursor calls."}, + {"name": "Callers", "leader": "SPC l c", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the callers of the function under the cursor."}, + {"name": "Callstack", "leader": "SPC l b", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show outermost callers first, with signatures and call sites (gc)."}, + {"name": "CallstackCorners", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "rounded, square", "doc": "Callstack tree corners: rounded (the default) or square; bare, it switches styles. Applies to the next Callstack query."}, + {"name": "CallstackDepth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Caller levels collected by Callstack, 1 through 64; default 8. Bare, it says the current limit."}, + {"name": "CallstackLayout", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "inline, stacked", "doc": "Callstack snippets below their locations (stacked, the default) or beside them (inline); bare, it switches layouts. Applies to the next Callstack query."}, + {"name": "Changelog", "leader": "SPC h c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "This build's version and what changed to reach it, printed into an output buffer the same way Config prints the live settings."}, + {"name": "ChipShadow", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a notice chip casts a cell's shadow right and down, on or off."}, + {"name": "ClipPaste", "leader": "SPC p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Paste the system clipboard after the selection."}, + {"name": "ClipPasteBefore", "leader": "SPC P", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Paste the system clipboard before the selection."}, + {"name": "ClipReplace", "leader": "SPC R", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Replace the selection with the system clipboard."}, + {"name": "ClipYank", "leader": "SPC y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the selection to the system clipboard."}, + {"name": "ClipYankMain", "leader": "SPC Y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "helix `<space>Y`: the PRIMARY selection alone, where `SPC y` joins every cursor's."}, + {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor."}, + {"name": "Collapse", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Fold a pane to its tag, or restore its share of the column."}, + {"name": "Colors", "leader": "SPC t c", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Syntax colours in text panes, on or off."}, + {"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init`, in a pane: its pane when it is open, else the file, else a pane of that name for Save to make it and its directory."}, + {"name": "Crt", "leader": "SPC t r", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The bundled CRT post pass over the window, on or off."}, + {"name": "CursorBlink", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The cursor blinks, solid while typing, on or off."}, + {"name": "Debug", "leader": "SPC t d", "also": ["topbar"], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off."}, + {"name": "Def", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Go to the definition of the symbol under the cursor; with an argument (a 2-1 chord's selection), of that symbol, where it is nearest."}, + {"name": "Del", "leader": "SPC d", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane."}, + {"name": "DelAbove", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane above it."}, + {"name": "DelBelow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane below it."}, + {"name": "Delcol", "leader": "SPC c d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close this column and its panes, refusing once over unsaved text."}, + {"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal, leaving the session running."}, + {"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."}, + {"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."}, + {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."}, + {"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."}, + {"name": "Down", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."}, + {"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."}, + {"name": "DumpConfig", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the settings in effect, each a word to click, and the startup file's path."}, + {"name": "DumpDir", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The directory Dump writes to and a relative Restore reads from; bare, the default."}, + {"name": "DumpThemes", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the bundled themes into the config directory's themes, to edit."}, + {"name": "Edit", "leader": null, "also": [], "arg": true, "scope": "both", "setting": false, "choices": null, "doc": "acme's Edit: sam's command language over the open text panes, from a tag, a pane ctl or exec, starting in the pane's body."}, + {"name": "EffectCode", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Open the source of a panel transition or post shader, by name."}, + {"name": "Exec", "leader": null, "also": ["tab", "middle-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Execute its argument as a middle click on it would, a builtin or a shell command."}, + {"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."}, + {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."}, + {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."}, + {"name": "FocusTint", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The focused pane's and column's tags are tinted, on or off."}, + {"name": "Font", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The body font, by name or path, and its size."}, + {"name": "Fonts", "leader": "SPC t f", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the fonts in a pane, each a word to click."}, + {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, + {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, + {"name": "Grain", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The page takes a fine, still grain, like paper: a level, 0 (off) through 3."}, + {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, + {"name": "GripWidth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The grip and scrollbar width, as a percent of the theme's rail."}, + {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, + {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, + {"name": "HoverGlow", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A soft underline of light under the word a look-hover would open, on or off."}, + {"name": "InactiveDim", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off."}, + {"name": "Incl", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Incl, for the session: `Incl dir ...` adds directories a look at a name found nowhere else is tried in (`stdio.h`, `<foo.h>`), bare lists them, `Incl -` empties the list."}, + {"name": "Joincol", "leader": "SPC c j", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Fold the active pane's column into the one on its right, keeping its panes."}, + {"name": "JumpScope", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "file, all", "doc": "What Back and Forward keep to: file, the focused pane's file until it runs out that way, or all, every place in order."}, + {"name": "JumpTrail", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a jump of the cursor leaves a short trail that fades, on or off."}, + {"name": "Jumplist", "leader": "SPC j l", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the places jumped from, each a place to go."}, + {"name": "Kill", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Kill: stop the commands pardes started -- the lines it typed into a terminal, from an exec, a middle click or a pty/run, while their shell says they run (C mark to D)."}, + {"name": "Last", "leader": "SPC j j", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Go back to the last place jumped from in another pane."}, + {"name": "Left", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the left."}, + {"name": "Lift", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, shadow, rim, auto", "doc": "How the focused pane stands off the page: off, shadow, rim or auto."}, + {"name": "Ligatures", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A font's programming ligatures draw across their cells, on or off."}, + {"name": "LocationsConfig", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Set how location rows are drawn, or show how they are when bare."}, + {"name": "Look", "leader": null, "also": ["enter", "right-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Look at its argument: open the file or address it names, else find the word, as a right click does."}, + {"name": "LookNext", "leader": "SPC j n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the next Look location across panes; Enter opens it."}, + {"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous Look location across panes; Enter opens it."}, + {"name": "LookWord", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "search, list", "doc": "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search."}, + {"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which language servers serve this file and their state."}, + {"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain how the last language server request was answered, step by step."}, + {"name": "MessageAnimation", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A message falls into its row and dissolves out of it, on or off."}, + {"name": "MessageDissolve", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message takes to dissolve."}, + {"name": "MessageFall", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message takes to fall into its row."}, + {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message stays after what dismisses it."}, + {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the messages shown so far."}, + {"name": "Mini", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Open a minimap of the file in braille dots."}, + {"name": "Mode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Cycle the pane's input modes: terminals add raw tty mode to normal/insert."}, + {"name": "More", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "A query pane's Grep stopped at its 2000 lines goes on for 2000 more."}, + {"name": "Motion", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "off, crisp, smooth, bouncy, playful", "doc": "How animations move: off, crisp, smooth, bouncy or playful."}, + {"name": "Mount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Mount another pardes's 9P tree under /n/<name>, given its dial address."}, + {"name": "Msg", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show its argument on this pane's message row."}, + {"name": "New", "leader": "SPC f n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Open an empty scratch pane, <dir>/+New, in this pane's directory."}, + {"name": "Newcol", "leader": "SPC c n", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "An empty column right of the keyboard's, its tag taking the keyboard."}, + {"name": "NextColor", "leader": "SPC t n", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Switch to the next bundled theme."}, + {"name": "Occlusion", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Pane bodies darken faintly toward their edges, on or off."}, + {"name": "Pager", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pardes, off", "doc": "What a terminal's commands page through: pardes, a +Pager pane (pardes -), or off, the environment's own; for terminals started after it."}, + {"name": "PagerColor", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A +Pager keeps its program's colours, on or off; for the next text paged."}, + {"name": "Palette", "leader": "SPC t l", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "the C64 palette or the terminal's own 16"}, + {"name": "PanelAscii", "leader": "SPC a a", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close through a scatter of ASCII, on or off."}, + {"name": "PanelCurtain", "leader": "SPC a c", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close like a curtain, on or off."}, + {"name": "PanelDissolve", "leader": "SPC a d", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes dissolve in and out as they open and close, on or off."}, + {"name": "PanelEdges", "leader": "SPC a e", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close from their edges, on or off."}, + {"name": "PanelFall", "leader": "SPC a f", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes fall into place as they open, on or off."}, + {"name": "PanelScramble", "leader": "SPC a r", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close through scrambled text, on or off."}, + {"name": "PanelSlide", "leader": "SPC a s", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes slide in and out as they open and close, on or off."}, + {"name": "PanelType", "leader": "SPC a t", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes type themselves in as they open, on or off."}, + {"name": "PanelVertical", "leader": "SPC a v", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close with a vertical wipe, on or off."}, + {"name": "PanelWave", "leader": "SPC a w", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close in a wave, on or off."}, + {"name": "PanelZoom", "leader": "SPC a z", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes zoom in and out as they open and close, on or off."}, + {"name": "Panes", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Pick an open pane by its name in a query pane under this one (SPC b b)."}, + {"name": "Parallax", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A theme's page pattern moves with the text at a quarter of its speed, on or off."}, + {"name": "PdfFit", "leader": "SPC t z", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Fit the PDF page to the pane by width or by height, flipping between them (or to the one named, `width|height`)."}, + {"name": "PdfSections", "leader": "SPC t s", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the PDF's sections in a pane, each a place to go."}, + {"name": "PdfTint", "leader": "SPC t i", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Tint the PDF page to the theme, or show it as printed, stepping through them (or to the one named, `disabled|filtered|full`)."}, + {"name": "Pet", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "An optional SDL workspace-tag companion; never consumes input or text cells."}, + {"name": "Petscii", "leader": "SPC t p", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "glyph art over the host's pixels: an image pane's picture, or the kitty graphics a terminal's program placed (yazi's previews)"}, + {"name": "Placement", "leader": "SPC c p", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "acme, pardes", "doc": "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules."}, + {"name": "ProgramEsc", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them."}, + {"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."}, + {"name": "Recent", "leader": "SPC f r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."}, + {"name": "Redo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Redo the last undone edit."}, + {"name": "Refs", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the references to the symbol under the cursor; with an argument (a 2-1 chord's selection), to that symbol, where it is nearest."}, + {"name": "Rename", "leader": "SPC l r", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Rename the symbol under the cursor everywhere, to its argument."}, + {"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Binds this terminal as a language's REPL, so an exec on that language's files is typed into it instead of run."}, + {"name": "Restore", "leader": "SPC s r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Replace every pane with those of a dump file, the last one Dump wrote when bare."}, + {"name": "Right", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the right."}, + {"name": "Save", "leader": "SPC f s", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Write the pane's text to its file, or to the file its argument names."}, + {"name": "Search", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Search in a query pane under this pane, line 1 the argument (`Panes`, `Symbols lay`, `All needle`, `/re`, any of its words); bare, `/`."}, + {"name": "SearchPane", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "reuse, new", "doc": "A search from a pane that has a query pane: reuse it, or open a new one and leave the last where it is."}, + {"name": "SearchPlace", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "attached, column", "doc": "Where a query pane goes: attached, under the pane that asked, out of its rows alone, or column, in the finder column."}, + {"name": "SearchRows", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The rows a query pane is born with under its line 1, 1 through 100; default 8. It never resizes itself."}, + {"name": "SelectRefs", "leader": "SPC l h", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select every reference to the symbol under the cursor."}, + {"name": "SelectionGlow", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A soft halo of the selection's colour round it in the body, on or off."}, + {"name": "Shader", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "A Shadertoy file into the post chain, or out of it, compiled again when saved; off empties the chain."}, + {"name": "ShaderAnimation", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "off, on, always", "doc": "When the post chain animates on its own: off, on (while focused) or always."}, + {"name": "Shell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The shell new terminals run; bare, $SHELL if it is executable, else /bin/sh."}, + {"name": "Subtypes", "leader": "SPC l T", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the subtypes of the type under the cursor."}, + {"name": "Supertypes", "leader": "SPC l t", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the supertypes of the type under the cursor."}, + {"name": "Symbols", "leader": "SPC l s", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's symbols from the language server."}, + {"name": "SyntaxBold", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Keywords and the like are drawn bold, on or off."}, + {"name": "Tab", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "A tab's width in cells, 1 through 16, in every pane; bare, it says the width."}, + {"name": "Tagbottom", "leader": "SPC t b", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Each pane's tag goes at its foot rather than its head, on or off."}, + {"name": "TaglineSize", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Scale the tag font, a percentage."}, + {"name": "TermImages", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "real, petscii", "doc": "How a new terminal draws its program's kitty graphics: real, as pixels where it can, or petscii, as glyph art."}, + {"name": "Theme", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Switch to the named theme."}, + {"name": "ThemeFile", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Load a theme from a file."}, + {"name": "Themes", "leader": "SPC t t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the themes in a pane, each a word to click."}, + {"name": "ThumbFlash", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a pane's scroll thumb brightens as it scrolls and fades back, on or off."}, + {"name": "Togglettymode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Switch this terminal between raw program input and normal editor mode."}, + {"name": "TreeContext", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show the declarations enclosing the top row at the pane's head, on or off."}, + {"name": "TreeContextTagStyle", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A pane's TreeContext rows draw in the tag's style, on or off."}, + {"name": "Tty", "leader": "SPC n t", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "A shell in the calling pane's directory, raw from the first frame."}, + {"name": "Tty9p", "leader": "SPC n 9", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "A Linux terminal with the current session mounted through kernel v9fs."}, + {"name": "Tutor", "leader": "SPC h t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the tutor, a document to work through."}, + {"name": "Unattach", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Unattach a pane from the pane it answers for: it stays where it is, a pane of its own, and the next search from that pane opens another under it."}, + {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, + {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/<name>."}, + {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, + {"name": "Verbose", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A builtin says its own name on the message row as it runs, on or off."}, + {"name": "Vignette", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off, 0-3", "doc": "The window's corners fall into shade: a level, 0 (off) through 3."}, + {"name": "Window", "leader": "SPC w", "also": ["C-w"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Window mode: h/j/k/l move an outline between the panes; Enter or Esc focuses the outlined pane, `:` its tag, the letter shown on a pane that one; d is Del on it (then k or j between two), c Collapse."}, + {"name": "WindowOpacity", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The window's opacity, a percentage."}, + {"name": "Wrap", "leader": "SPC t w", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Long lines wrap onto the next row, on or off."}, + {"name": "WsDiagnostics", "leader": "SPC l D", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the workspace's diagnostics from the language server."}, + {"name": "WsSymbols", "leader": "SPC l S", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Search the workspace's symbols for its argument."}, + {"name": "Zerox", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Zerox: a second pane on this pane's file, the same text, undo and unsaved state, with a scroll and a cursor of its own (File.zerox)."} +] diff --git a/docs/typ/builtins-tty.json b/docs/typ/builtins-tty.json new file mode 100644 index 00000000..6bdca598 --- /dev/null +++ b/docs/typ/builtins-tty.json @@ -0,0 +1,144 @@ +[ + {"name": "Ascii", "leader": "SPC t a", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "add the printable ASCII bitmaps to the matcher's glyph set"}, + {"name": "Attach", "leader": "SPC s a", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Attach this terminal to a detached pardes session by name."}, + {"name": "Back", "leader": "SPC j o", "also": ["C-o"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-o: one step back into the history."}, + {"name": "BootShell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "keep, replace", "doc": "A document dropped where a lone untouched shell stands: keep the shell, or replace it."}, + {"name": "Callees", "leader": "SPC l C", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the functions the function under the cursor calls."}, + {"name": "Callers", "leader": "SPC l c", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the callers of the function under the cursor."}, + {"name": "Callstack", "leader": "SPC l b", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show outermost callers first, with signatures and call sites (gc)."}, + {"name": "CallstackCorners", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "rounded, square", "doc": "Callstack tree corners: rounded (the default) or square; bare, it switches styles. Applies to the next Callstack query."}, + {"name": "CallstackDepth", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Caller levels collected by Callstack, 1 through 64; default 8. Bare, it says the current limit."}, + {"name": "CallstackLayout", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "inline, stacked", "doc": "Callstack snippets below their locations (stacked, the default) or beside them (inline); bare, it switches layouts. Applies to the next Callstack query."}, + {"name": "Changelog", "leader": "SPC h c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "This build's version and what changed to reach it, printed into an output buffer the same way Config prints the live settings."}, + {"name": "ChipShadow", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a notice chip casts a cell's shadow right and down, on or off."}, + {"name": "ClipPaste", "leader": "SPC p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Paste the system clipboard after the selection."}, + {"name": "ClipPasteBefore", "leader": "SPC P", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Paste the system clipboard before the selection."}, + {"name": "ClipReplace", "leader": "SPC R", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Replace the selection with the system clipboard."}, + {"name": "ClipYank", "leader": "SPC y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Copy the selection to the system clipboard."}, + {"name": "ClipYankMain", "leader": "SPC Y", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "helix `<space>Y`: the PRIMARY selection alone, where `SPC y` joins every cursor's."}, + {"name": "CodeAction", "leader": "SPC l a", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the language server's code actions for the cursor."}, + {"name": "Collapse", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Fold a pane to its tag, or restore its share of the column."}, + {"name": "Colors", "leader": "SPC t c", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Syntax colours in text panes, on or off."}, + {"name": "Config", "leader": "SPC f c", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the startup file, `init`, in a pane: its pane when it is open, else the file, else a pane of that name for Save to make it and its directory."}, + {"name": "Debug", "leader": "SPC t d", "also": ["topbar"], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A small box of frame statistics at the top right, on or off."}, + {"name": "Def", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Go to the definition of the symbol under the cursor; with an argument (a 2-1 chord's selection), of that symbol, where it is nearest."}, + {"name": "Del", "leader": "SPC d", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane."}, + {"name": "DelAbove", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane above it."}, + {"name": "DelBelow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close the pane, giving its rows to the pane below it."}, + {"name": "Delcol", "leader": "SPC c d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Close this column and its panes, refusing once over unsaved text."}, + {"name": "Detach", "leader": "SPC s D", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Detach this pardes from its terminal, leaving the session running."}, + {"name": "Diagnostics", "leader": "SPC l d", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's diagnostics from the language server."}, + {"name": "Diff", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Stack a diff's hunks as a diff viewer shows them, each under its place and the declarations around it, in a +Diff; on a +Diff, show the diff itself as text."}, + {"name": "DiffLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "hunks, text", "doc": "A .diff or .patch looked at: hunks, a +Diff stacking its hunks, or text, the file itself; Diff goes from one to the other."}, + {"name": "DirLook", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pane, terminal", "doc": "A directory looked at: pane, a pane listing it as acme's directory window, or terminal, ls in a terminal there."}, + {"name": "Down", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane below, off a tag onto the pane under it."}, + {"name": "Dump", "leader": "SPC s d", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the session's panes and layout to a dump file, for Restore."}, + {"name": "DumpConfig", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the settings in effect, each a word to click, and the startup file's path."}, + {"name": "DumpDir", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The directory Dump writes to and a relative Restore reads from; bare, the default."}, + {"name": "DumpThemes", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Write the bundled themes into the config directory's themes, to edit."}, + {"name": "Edit", "leader": null, "also": [], "arg": true, "scope": "both", "setting": false, "choices": null, "doc": "acme's Edit: sam's command language over the open text panes, from a tag, a pane ctl or exec, starting in the pane's body."}, + {"name": "EffectCode", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Open the source of a panel transition or post shader, by name."}, + {"name": "Exec", "leader": null, "also": ["tab", "middle-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Execute its argument as a middle click on it would, a builtin or a shell command."}, + {"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."}, + {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."}, + {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."}, + {"name": "FocusTint", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "The focused pane's and column's tags are tinted, on or off."}, + {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, + {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, + {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, + {"name": "Help", "leader": "SPC ?", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the help: every key and every builtin."}, + {"name": "Hover", "leader": "SPC l k", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Ask the language server about the symbol under the cursor."}, + {"name": "InactiveDim", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Fade the unfocused panes' text by a percentage, 0 through 100, 0 off."}, + {"name": "Incl", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Incl, for the session: `Incl dir ...` adds directories a look at a name found nowhere else is tried in (`stdio.h`, `<foo.h>`), bare lists them, `Incl -` empties the list."}, + {"name": "Joincol", "leader": "SPC c j", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Fold the active pane's column into the one on its right, keeping its panes."}, + {"name": "JumpScope", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "file, all", "doc": "What Back and Forward keep to: file, the focused pane's file until it runs out that way, or all, every place in order."}, + {"name": "JumpTrail", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a jump of the cursor leaves a short trail that fades, on or off."}, + {"name": "Jumplist", "leader": "SPC j l", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the places jumped from, each a place to go."}, + {"name": "Kill", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "acme's Kill: stop the commands pardes started -- the lines it typed into a terminal, from an exec, a middle click or a pty/run, while their shell says they run (C mark to D)."}, + {"name": "Last", "leader": "SPC j j", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Go back to the last place jumped from in another pane."}, + {"name": "Left", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the left."}, + {"name": "LocationsConfig", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Set how location rows are drawn, or show how they are when bare."}, + {"name": "Look", "leader": null, "also": ["enter", "right-click"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Look at its argument: open the file or address it names, else find the word, as a right click does."}, + {"name": "LookNext", "leader": "SPC j n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the next Look location across panes; Enter opens it."}, + {"name": "LookPrev", "leader": "SPC j p", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select the previous Look location across panes; Enter opens it."}, + {"name": "LookWord", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "search, list", "doc": "A plain word looked at: search selects its next place in the pane, list lists every place in a +Search."}, + {"name": "Lspinfo", "leader": "SPC l i", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Show which language servers serve this file and their state."}, + {"name": "Lspwhy", "leader": "SPC l w", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Explain how the last language server request was answered, step by step."}, + {"name": "MessageAnimation", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A message falls into its row and dissolves out of it, on or off."}, + {"name": "MessageDissolve", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message takes to dissolve."}, + {"name": "MessageFall", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message takes to fall into its row."}, + {"name": "MessageLinger", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "How long, in milliseconds, a message stays after what dismisses it."}, + {"name": "Messages", "leader": "SPC h m", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the messages shown so far."}, + {"name": "Mini", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Open a minimap of the file in braille dots."}, + {"name": "Mode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Cycle the pane's input modes: terminals add raw tty mode to normal/insert."}, + {"name": "More", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "A query pane's Grep stopped at its 2000 lines goes on for 2000 more."}, + {"name": "Motion", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "off, crisp, smooth, bouncy, playful", "doc": "How animations move: off, crisp, smooth, bouncy or playful."}, + {"name": "Mount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Mount another pardes's 9P tree under /n/<name>, given its dial address."}, + {"name": "Msg", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show its argument on this pane's message row."}, + {"name": "New", "leader": "SPC f n", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Open an empty scratch pane, <dir>/+New, in this pane's directory."}, + {"name": "Newcol", "leader": "SPC c n", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "An empty column right of the keyboard's, its tag taking the keyboard."}, + {"name": "NextColor", "leader": "SPC t n", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Switch to the next bundled theme."}, + {"name": "Pager", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "pardes, off", "doc": "What a terminal's commands page through: pardes, a +Pager pane (pardes -), or off, the environment's own; for terminals started after it."}, + {"name": "PagerColor", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A +Pager keeps its program's colours, on or off; for the next text paged."}, + {"name": "Palette", "leader": "SPC t l", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "the C64 palette or the terminal's own 16"}, + {"name": "PanelAscii", "leader": "SPC a a", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close through a scatter of ASCII, on or off."}, + {"name": "PanelCurtain", "leader": "SPC a c", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close like a curtain, on or off."}, + {"name": "PanelDissolve", "leader": "SPC a d", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes dissolve in and out as they open and close, on or off."}, + {"name": "PanelEdges", "leader": "SPC a e", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close from their edges, on or off."}, + {"name": "PanelFall", "leader": "SPC a f", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes fall into place as they open, on or off."}, + {"name": "PanelScramble", "leader": "SPC a r", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close through scrambled text, on or off."}, + {"name": "PanelSlide", "leader": "SPC a s", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes slide in and out as they open and close, on or off."}, + {"name": "PanelType", "leader": "SPC a t", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes type themselves in as they open, on or off."}, + {"name": "PanelVertical", "leader": "SPC a v", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close with a vertical wipe, on or off."}, + {"name": "PanelWave", "leader": "SPC a w", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes open and close in a wave, on or off."}, + {"name": "PanelZoom", "leader": "SPC a z", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Panes zoom in and out as they open and close, on or off."}, + {"name": "Panes", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Pick an open pane by its name in a query pane under this one (SPC b b)."}, + {"name": "PdfFit", "leader": "SPC t z", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Fit the PDF page to the pane by width or by height, flipping between them (or to the one named, `width|height`)."}, + {"name": "PdfSections", "leader": "SPC t s", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the PDF's sections in a pane, each a place to go."}, + {"name": "PdfTint", "leader": "SPC t i", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Tint the PDF page to the theme, or show it as printed, stepping through them (or to the one named, `disabled|filtered|full`)."}, + {"name": "Petscii", "leader": "SPC t p", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "glyph art over the host's pixels: an image pane's picture, or the kitty graphics a terminal's program placed (yazi's previews)"}, + {"name": "Placement", "leader": "SPC c p", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "acme, pardes", "doc": "Where a new pane goes: acme, as makenewwindow does, or pardes, the older rules."}, + {"name": "ProgramEsc", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a raw terminal, Esc goes to the program and Shift-Esc backs out, on; off (the default) swaps them."}, + {"name": "Putall", "leader": null, "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "acme's Putall: every pane holding unsaved edits to a file is saved, each as its own Save; one that is refused (changed on disk since, a write that fails) says so and the rest are saved all the same."}, + {"name": "Recent", "leader": "SPC f r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "List the files opened lately, closed ones too, each a place to open again."}, + {"name": "Redo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Redo the last undone edit."}, + {"name": "Refs", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the references to the symbol under the cursor; with an argument (a 2-1 chord's selection), to that symbol, where it is nearest."}, + {"name": "Rename", "leader": "SPC l r", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Rename the symbol under the cursor everywhere, to its argument."}, + {"name": "Repl", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Binds this terminal as a language's REPL, so an exec on that language's files is typed into it instead of run."}, + {"name": "Restore", "leader": "SPC s r", "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Replace every pane with those of a dump file, the last one Dump wrote when bare."}, + {"name": "Right", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane, or column tag, to the right."}, + {"name": "Save", "leader": "SPC f s", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Write the pane's text to its file, or to the file its argument names."}, + {"name": "Search", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Search in a query pane under this pane, line 1 the argument (`Panes`, `Symbols lay`, `All needle`, `/re`, any of its words); bare, `/`."}, + {"name": "SearchPane", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "reuse, new", "doc": "A search from a pane that has a query pane: reuse it, or open a new one and leave the last where it is."}, + {"name": "SearchPlace", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "attached, column", "doc": "Where a query pane goes: attached, under the pane that asked, out of its rows alone, or column, in the finder column."}, + {"name": "SearchRows", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The rows a query pane is born with under its line 1, 1 through 100; default 8. It never resizes itself."}, + {"name": "SelectRefs", "leader": "SPC l h", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Select every reference to the symbol under the cursor."}, + {"name": "Shell", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The shell new terminals run; bare, $SHELL if it is executable, else /bin/sh."}, + {"name": "Subtypes", "leader": "SPC l T", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the subtypes of the type under the cursor."}, + {"name": "Supertypes", "leader": "SPC l t", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the supertypes of the type under the cursor."}, + {"name": "Symbols", "leader": "SPC l s", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the file's symbols from the language server."}, + {"name": "SyntaxBold", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Keywords and the like are drawn bold, on or off."}, + {"name": "Tab", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "A tab's width in cells, 1 through 16, in every pane; bare, it says the width."}, + {"name": "Tagbottom", "leader": "SPC t b", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Each pane's tag goes at its foot rather than its head, on or off."}, + {"name": "TermImages", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "real, petscii", "doc": "How a new terminal draws its program's kitty graphics: real, as pixels where it can, or petscii, as glyph art."}, + {"name": "Theme", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "Switch to the named theme."}, + {"name": "ThemeFile", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Load a theme from a file."}, + {"name": "Themes", "leader": "SPC t t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the themes in a pane, each a word to click."}, + {"name": "ThumbFlash", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "In a terminal, a pane's scroll thumb brightens as it scrolls and fades back, on or off."}, + {"name": "Togglettymode", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Switch this terminal between raw program input and normal editor mode."}, + {"name": "TreeContext", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Show the declarations enclosing the top row at the pane's head, on or off."}, + {"name": "TreeContextTagStyle", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A pane's TreeContext rows draw in the tag's style, on or off."}, + {"name": "Tty", "leader": "SPC n t", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "A shell in the calling pane's directory, raw from the first frame."}, + {"name": "Tty9p", "leader": "SPC n 9", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "A Linux terminal with the current session mounted through kernel v9fs."}, + {"name": "Tutor", "leader": "SPC h t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the tutor, a document to work through."}, + {"name": "Unattach", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Unattach a pane from the pane it answers for: it stays where it is, a pane of its own, and the next search from that pane opens another under it."}, + {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, + {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/<name>."}, + {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, + {"name": "Verbose", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "A builtin says its own name on the message row as it runs, on or off."}, + {"name": "Window", "leader": "SPC w", "also": ["C-w"], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Window mode: h/j/k/l move an outline between the panes; Enter or Esc focuses the outlined pane, `:` its tag, the letter shown on a pane that one; d is Del on it (then k or j between two), c Collapse."}, + {"name": "Wrap", "leader": "SPC t w", "also": [], "arg": true, "scope": "root", "setting": true, "choices": "on, off", "doc": "Long lines wrap onto the next row, on or off."}, + {"name": "WsDiagnostics", "leader": "SPC l D", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "List the workspace's diagnostics from the language server."}, + {"name": "WsSymbols", "leader": "SPC l S", "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Search the workspace's symbols for its argument."}, + {"name": "Zerox", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Zerox: a second pane on this pane's file, the same text, undo and unsaved state, with a scroll and a cursor of its own (File.zerox)."} +] diff --git a/docs/typ/builtins.typ b/docs/typ/builtins.typ new file mode 100644 index 00000000..8375d5de --- /dev/null +++ b/docs/typ/builtins.typ @@ -0,0 +1,12 @@ +// Every builtin: the words you click in a tag (Exec runs them) or type as +// commands. The entries come from docs/typ/builtins-tty.json and +// builtins-gui.json, which +// `zig build builtins-json` writes from the registry and the Help rows, +// so this chapter and Help cannot drift. +#import "style.typ": builtin-glossary, word + +These are the words you click in a tag (#word("Exec") runs them) or type +as a command, a line at a time. The everyday ones come first; the rest by +what they are for. + +#builtin-glossary() diff --git a/docs/typ/cheatsheet-a4.pdf b/docs/typ/cheatsheet-a4.pdf new file mode 100644 index 00000000..ca589759 --- /dev/null +++ b/docs/typ/cheatsheet-a4.pdf @@ -0,0 +1,2091 @@ +%PDF-1.7 +%���� + +1 0 obj +<</Type/Pages/Count 1/Kids[417 0 R]>> +endobj +2 0 obj +<</Parent 3 0 R/Title(Chords: hold the first, click the next)/Dest 381 0 R>> +endobj +3 0 obj +<</Parent 16 0 R/Next 4 0 R/First 2 0 R/Last 2 0 R/Count -1/Title(The mouse)/Dest 382 0 R>> +endobj +4 0 obj +<</Parent 16 0 R/Next 5 0 R/Prev 3 0 R/Title(Tags)/Dest 383 0 R>> +endobj +5 0 obj +<</Parent 16 0 R/Next 6 0 R/Prev 4 0 R/Title( addresses)/Dest 384 0 R>> +endobj +6 0 obj +<</Parent 16 0 R/Next 7 0 R/Prev 5 0 R/Title(Keys: normal mode)/Dest 385 0 R>> +endobj +7 0 obj +<</Parent 16 0 R/Next 8 0 R/Prev 6 0 R/Title(Keys: panes)/Dest 386 0 R>> +endobj +8 0 obj +<</Parent 16 0 R/Next 9 0 R/Prev 7 0 R/Title(The leader: in normal mode)/Dest 387 0 R>> +endobj +9 0 obj +<</Parent 16 0 R/Next 10 0 R/Prev 8 0 R/Title(Terminals and commands)/Dest 388 0 R>> +endobj +10 0 obj +<</Parent 16 0 R/Next 11 0 R/Prev 9 0 R/Title(Reviewing diffs)/Dest 389 0 R>> +endobj +11 0 obj +<</Parent 16 0 R/Next 12 0 R/Prev 10 0 R/Title(Finding things)/Dest 390 0 R>> +endobj +12 0 obj +<</Parent 16 0 R/Next 13 0 R/Prev 11 0 R/Title(Sessions)/Dest 391 0 R>> +endobj +13 0 obj +<</Parent 16 0 R/Next 14 0 R/Prev 12 0 R/Title(Config)/Dest 392 0 R>> +endobj +14 0 obj +<</Parent 16 0 R/Next 15 0 R/Prev 13 0 R/Title(Themes)/Dest 393 0 R>> +endobj +15 0 obj +<</Parent 16 0 R/Prev 14 0 R/Title(The virtual filesystem (9P))/Dest 394 0 R>> +endobj +16 0 obj +<</Type/Outlines/First 3 0 R/Last 15 0 R/Count 13>> +endobj +17 0 obj +<</Type/StructTreeRoot/RoleMap<</Datetime/Span/Terms/Part/Title/P/Strong/Span/Em/Span>>/K[378 0 R]/ParentTree<</Nums[0 104 0 R 1 18 0 R]>>/ParentTreeNextKey 2>> +endobj +18 0 obj +[19 0 R 19 0 R 20 0 R 22 0 R 22 0 R 25 0 R 25 0 R 25 0 R 28 0 R 28 0 R 28 0 R 28 0 R 28 0 R 28 0 R 30 0 R 31 0 R 31 0 R 31 0 R 31 0 R 31 0 R 31 0 R 31 0 R 31 0 R 33 0 R 34 0 R 34 0 R 34 0 R 34 0 R 37 0 R 38 0 R 39 0 R 39 0 R 41 0 R 42 0 R 44 0 R 44 0 R 45 0 R 45 0 R 45 0 R 47 0 R 48 0 R 48 0 R 48 0 R 48 0 R 48 0 R 48 0 R 48 0 R 50 0 R 51 0 R 51 0 R 51 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 54 0 R 55 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 56 0 R 57 0 R 59 0 R 59 0 R 59 0 R 59 0 R 59 0 R 58 0 R 59 0 R 61 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 62 0 R 65 0 R 65 0 R 66 0 R 66 0 R 66 0 R 66 0 R 67 0 R 68 0 R 70 0 R 71 0 R 73 0 R 75 0 R 75 0 R 74 0 R 75 0 R 77 0 R 80 0 R 80 0 R 78 0 R 80 0 R 79 0 R 80 0 R 82 0 R 84 0 R 84 0 R 84 0 R 84 0 R 84 0 R 83 0 R 86 0 R 87 0 R 87 0 R 89 0 R 91 0 R 90 0 R 91 0 R 91 0 R 99 0 R 94 0 R 99 0 R 95 0 R 99 0 R 96 0 R 99 0 R 97 0 R 99 0 R 98 0 R 99 0 R 99 0 R 99 0 R 100 0 R 105 0 R 101 0 R 105 0 R 105 0 R 102 0 R 105 0 R 103 0 R 105 0 R 105 0 R 104 0 R 105 0 R 106 0 R 106 0 R 106 0 R 106 0 R 106 0 R 106 0 R 106 0 R 106 0 R 107 0 R 109 0 R 109 0 R 109 0 R 109 0 R 109 0 R 109 0 R 110 0 R 112 0 R 112 0 R 112 0 R 112 0 R 112 0 R 112 0 R 112 0 R 113 0 R 113 0 R 115 0 R 115 0 R 115 0 R 116 0 R 118 0 R 119 0 R 121 0 R 121 0 R 121 0 R 122 0 R 124 0 R 124 0 R 124 0 R 125 0 R 127 0 R 127 0 R 128 0 R 130 0 R 130 0 R 130 0 R 130 0 R 130 0 R 130 0 R 131 0 R 131 0 R 131 0 R 133 0 R 133 0 R 134 0 R 134 0 R 136 0 R 136 0 R 137 0 R 137 0 R 139 0 R 139 0 R 139 0 R 140 0 R 142 0 R 142 0 R 142 0 R 142 0 R 142 0 R 142 0 R 143 0 R 143 0 R 145 0 R 146 0 R 146 0 R 148 0 R 148 0 R 148 0 R 148 0 R 148 0 R 148 0 R 149 0 R 149 0 R 151 0 R 151 0 R 151 0 R 151 0 R 151 0 R 151 0 R 152 0 R 154 0 R 154 0 R 155 0 R 155 0 R 155 0 R 155 0 R 155 0 R 155 0 R 155 0 R 157 0 R 158 0 R 161 0 R 162 0 R 163 0 R 163 0 R 163 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 165 0 R 164 0 R 165 0 R 167 0 R 168 0 R 168 0 R 170 0 R 170 0 R 170 0 R 171 0 R 171 0 R 171 0 R 171 0 R 171 0 R 171 0 R 173 0 R 173 0 R 173 0 R 173 0 R 173 0 R 173 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 174 0 R 176 0 R 176 0 R 176 0 R 177 0 R 179 0 R 179 0 R 179 0 R 180 0 R 180 0 R 183 0 R 183 0 R 183 0 R 184 0 R 184 0 R 184 0 R 185 0 R 185 0 R 185 0 R 185 0 R 187 0 R 187 0 R 187 0 R 187 0 R 187 0 R 188 0 R 190 0 R 190 0 R 190 0 R 190 0 R 190 0 R 191 0 R 193 0 R 193 0 R 193 0 R 193 0 R 193 0 R 194 0 R 196 0 R 196 0 R 196 0 R 196 0 R 196 0 R 197 0 R 199 0 R 199 0 R 199 0 R 199 0 R 199 0 R 200 0 R 202 0 R 202 0 R 202 0 R 202 0 R 202 0 R 203 0 R 205 0 R 205 0 R 205 0 R 206 0 R 208 0 R 208 0 R 208 0 R 208 0 R 208 0 R 209 0 R 211 0 R 211 0 R 211 0 R 211 0 R 211 0 R 212 0 R 214 0 R 214 0 R 214 0 R 215 0 R 217 0 R 217 0 R 217 0 R 217 0 R 217 0 R 218 0 R 220 0 R 220 0 R 220 0 R 220 0 R 220 0 R 221 0 R 223 0 R 223 0 R 223 0 R 224 0 R 228 0 R 228 0 R 228 0 R 229 0 R 231 0 R 231 0 R 231 0 R 231 0 R 231 0 R 232 0 R 234 0 R 234 0 R 234 0 R 234 0 R 234 0 R 235 0 R 237 0 R 237 0 R 237 0 R 237 0 R 237 0 R 238 0 R 240 0 R 240 0 R 240 0 R 240 0 R 240 0 R 241 0 R 243 0 R 243 0 R 243 0 R 243 0 R 243 0 R 244 0 R 246 0 R 246 0 R 246 0 R 246 0 R 246 0 R 247 0 R 249 0 R 249 0 R 249 0 R 249 0 R 249 0 R 250 0 R 252 0 R 252 0 R 252 0 R 252 0 R 252 0 R 253 0 R 255 0 R 255 0 R 255 0 R 255 0 R 255 0 R 256 0 R 258 0 R 258 0 R 258 0 R 258 0 R 258 0 R 259 0 R 261 0 R 261 0 R 261 0 R 261 0 R 261 0 R 262 0 R 264 0 R 264 0 R 264 0 R 265 0 R 270 0 R 271 0 R 273 0 R 273 0 R 273 0 R 273 0 R 272 0 R 273 0 R 273 0 R 273 0 R 273 0 R 273 0 R 273 0 R 273 0 R 273 0 R 275 0 R 277 0 R 276 0 R 276 0 R 277 0 R 278 0 R 278 0 R 278 0 R 280 0 R 284 0 R 284 0 R 281 0 R 284 0 R 284 0 R 284 0 R 284 0 R 284 0 R 282 0 R 284 0 R 283 0 R 284 0 R 287 0 R 288 0 R 292 0 R 292 0 R 289 0 R 292 0 R 292 0 R 290 0 R 292 0 R 291 0 R 292 0 R 292 0 R 292 0 R 293 0 R 294 0 R 298 0 R 298 0 R 295 0 R 298 0 R 298 0 R 298 0 R 296 0 R 298 0 R 297 0 R 298 0 R 298 0 R 298 0 R 298 0 R 298 0 R 298 0 R 298 0 R 298 0 R 301 0 R 302 0 R 305 0 R 303 0 R 305 0 R 305 0 R 305 0 R 304 0 R 305 0 R 305 0 R 305 0 R 305 0 R 305 0 R 306 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 307 0 R 309 0 R 309 0 R 309 0 R 309 0 R 308 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 309 0 R 310 0 R 313 0 R 313 0 R 313 0 R 313 0 R 311 0 R 313 0 R 313 0 R 313 0 R 313 0 R 313 0 R 312 0 R 313 0 R 313 0 R 314 0 R 318 0 R 315 0 R 318 0 R 316 0 R 318 0 R 318 0 R 317 0 R 318 0 R 318 0 R 319 0 R 319 0 R 319 0 R 320 0 R 323 0 R 323 0 R 325 0 R 327 0 R 327 0 R 329 0 R 329 0 R 331 0 R 331 0 R 333 0 R 333 0 R 335 0 R 335 0 R 337 0 R 339 0 R 339 0 R 342 0 R 342 0 R 344 0 R 346 0 R 346 0 R 349 0 R 349 0 R 351 0 R 353 0 R 353 0 R 355 0 R 355 0 R 355 0 R 355 0 R 355 0 R 357 0 R 357 0 R 359 0 R 361 0 R 361 0 R 363 0 R 365 0 R 365 0 R 367 0 R 367 0 R 367 0 R 369 0 R 369 0 R 371 0 R 371 0 R 371 0 R 374 0 R 374 0 R 374 0 R 374 0 R 374 0 R 374 0 R 374 0 R 375 0 R 377 0 R 376 0 R 376 0 R 377 0 R 377 0 R] +endobj +19 0 obj +<</Type/StructElem/S/Span/P 378 0 R/A[<</O/Layout/Placement/Block>>]/K[0 1]/Pg 417 0 R>> +endobj +20 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(The mouse)/K[2]/Pg 417 0 R>> +endobj +21 0 obj +<</Type/StructElem/S/TD/P 23 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[]>> +endobj +22 0 obj +<</Type/StructElem/S/TD/P 23 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[3 4]/Pg 417 0 R>> +endobj +23 0 obj +<</Type/StructElem/S/TR/P 36 0 R/K[21 0 R 22 0 R]>> +endobj +24 0 obj +<</Type/StructElem/S/TD/P 26 0 R/A[<</O/Table/Headers[]>>]/K[]>> +endobj +25 0 obj +<</Type/StructElem/S/TD/P 26 0 R/A[<</O/Table/Headers[]>>]/K[5 6 7]/Pg 417 0 R>> +endobj +26 0 obj +<</Type/StructElem/S/TR/P 36 0 R/K[24 0 R 25 0 R]>> +endobj +27 0 obj +<</Type/StructElem/S/TD/P 29 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[]>> +endobj +28 0 obj +<</Type/StructElem/S/TD/P 29 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[8 9 10 11 12 13]/Pg 417 0 R>> +endobj +29 0 obj +<</Type/StructElem/S/TR/P 36 0 R/K[27 0 R 28 0 R]>> +endobj +30 0 obj +<</Type/StructElem/S/TD/P 32 0 R/A[<</O/Table/Headers[]>>]/K[14]/Pg 417 0 R>> +endobj +31 0 obj +<</Type/StructElem/S/TD/P 32 0 R/A[<</O/Table/Headers[]>>]/K[15 16 17 18 19 20 21 22]/Pg 417 0 R>> +endobj +32 0 obj +<</Type/StructElem/S/TR/P 36 0 R/K[30 0 R 31 0 R]>> +endobj +33 0 obj +<</Type/StructElem/S/TD/P 35 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[23]/Pg 417 0 R>> +endobj +34 0 obj +<</Type/StructElem/S/TD/P 35 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[24 25 26 27]/Pg 417 0 R>> +endobj +35 0 obj +<</Type/StructElem/S/TR/P 36 0 R/K[33 0 R 34 0 R]>> +endobj +36 0 obj +<</Type/StructElem/S/Table/P 378 0 R/K[23 0 R 26 0 R 29 0 R 32 0 R 35 0 R]>> +endobj +37 0 obj +<</Type/StructElem/S/H3/P 378 0 R/T(Chords: hold the first, click the next)/K[28]/Pg 417 0 R>> +endobj +38 0 obj +<</Type/StructElem/S/TD/P 40 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[29]/Pg 417 0 R>> +endobj +39 0 obj +<</Type/StructElem/S/TD/P 40 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[30 31]/Pg 417 0 R>> +endobj +40 0 obj +<</Type/StructElem/S/TR/P 53 0 R/K[38 0 R 39 0 R]>> +endobj +41 0 obj +<</Type/StructElem/S/TD/P 43 0 R/A[<</O/Table/Headers[]>>]/K[32]/Pg 417 0 R>> +endobj +42 0 obj +<</Type/StructElem/S/TD/P 43 0 R/A[<</O/Table/Headers[]>>]/K[33]/Pg 417 0 R>> +endobj +43 0 obj +<</Type/StructElem/S/TR/P 53 0 R/K[41 0 R 42 0 R]>> +endobj +44 0 obj +<</Type/StructElem/S/TD/P 46 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[34 35]/Pg 417 0 R>> +endobj +45 0 obj +<</Type/StructElem/S/TD/P 46 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[36 37 38]/Pg 417 0 R>> +endobj +46 0 obj +<</Type/StructElem/S/TR/P 53 0 R/K[44 0 R 45 0 R]>> +endobj +47 0 obj +<</Type/StructElem/S/TD/P 49 0 R/A[<</O/Table/Headers[]>>]/K[39]/Pg 417 0 R>> +endobj +48 0 obj +<</Type/StructElem/S/TD/P 49 0 R/A[<</O/Table/Headers[]>>]/K[40 41 42 43 44 45 46]/Pg 417 0 R>> +endobj +49 0 obj +<</Type/StructElem/S/TR/P 53 0 R/K[47 0 R 48 0 R]>> +endobj +50 0 obj +<</Type/StructElem/S/TD/P 52 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[47]/Pg 417 0 R>> +endobj +51 0 obj +<</Type/StructElem/S/TD/P 52 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[48 49 50]/Pg 417 0 R>> +endobj +52 0 obj +<</Type/StructElem/S/TR/P 53 0 R/K[50 0 R 51 0 R]>> +endobj +53 0 obj +<</Type/StructElem/S/Table/P 378 0 R/K[40 0 R 43 0 R 46 0 R 49 0 R 52 0 R]>> +endobj +54 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[51 52 53 54 55 56 57 58 59 60 61]/Pg 417 0 R>> +endobj +55 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Tags)/K[62]/Pg 417 0 R>> +endobj +56 0 obj +<</Type/StructElem/S/Span/P 378 0 R/A[<</O/Layout/Placement/Block>>]/K[63 64 65 66 67 68 69 70 71 72 73 74 75]/Pg 417 0 R>> +endobj +57 0 obj +<</Type/StructElem/S/Lbl/P 60 0 R/K[76]/Pg 417 0 R>> +endobj +58 0 obj +<</Type/StructElem/S/Code/P 59 0 R/K[82]/Pg 417 0 R>> +endobj +59 0 obj +<</Type/StructElem/S/LBody/P 60 0 R/K[77 78 79 80 81 58 0 R 83]/Pg 417 0 R>> +endobj +60 0 obj +<</Type/StructElem/S/LI/P 64 0 R/K[57 0 R 59 0 R]>> +endobj +61 0 obj +<</Type/StructElem/S/Lbl/P 63 0 R/K[84]/Pg 417 0 R>> +endobj +62 0 obj +<</Type/StructElem/S/LBody/P 63 0 R/K[85 86 87 88 89 90 91 92 93 94]/Pg 417 0 R>> +endobj +63 0 obj +<</Type/StructElem/S/LI/P 64 0 R/K[61 0 R 62 0 R]>> +endobj +64 0 obj +<</Type/StructElem/S/L/P 378 0 R/A[<</O/List/ListNumbering/Circle>>]/K[60 0 R 63 0 R]>> +endobj +65 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T( addresses)/K[95 96]/Pg 417 0 R>> +endobj +66 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[97 98 99 100]/Pg 417 0 R>> +endobj +67 0 obj +<</Type/StructElem/S/TD/P 69 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[101]/Pg 417 0 R>> +endobj +68 0 obj +<</Type/StructElem/S/TD/P 69 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[102]/Pg 417 0 R>> +endobj +69 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[67 0 R 68 0 R]>> +endobj +70 0 obj +<</Type/StructElem/S/TD/P 72 0 R/A[<</O/Table/Headers[]>>]/K[103]/Pg 417 0 R>> +endobj +71 0 obj +<</Type/StructElem/S/TD/P 72 0 R/A[<</O/Table/Headers[]>>]/K[104]/Pg 417 0 R>> +endobj +72 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[70 0 R 71 0 R]>> +endobj +73 0 obj +<</Type/StructElem/S/TD/P 76 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[105]/Pg 417 0 R>> +endobj +74 0 obj +<</Type/StructElem/S/Code/P 75 0 R/K[108]/Pg 417 0 R>> +endobj +75 0 obj +<</Type/StructElem/S/TD/P 76 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[106 107 74 0 R 109]/Pg 417 0 R>> +endobj +76 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[73 0 R 75 0 R]>> +endobj +77 0 obj +<</Type/StructElem/S/TD/P 81 0 R/A[<</O/Table/Headers[]>>]/K[110]/Pg 417 0 R>> +endobj +78 0 obj +<</Type/StructElem/S/Code/P 80 0 R/K[113]/Pg 417 0 R>> +endobj +79 0 obj +<</Type/StructElem/S/Code/P 80 0 R/K[115]/Pg 417 0 R>> +endobj +80 0 obj +<</Type/StructElem/S/TD/P 81 0 R/A[<</O/Table/Headers[]>>]/K[111 112 78 0 R 114 79 0 R 116]/Pg 417 0 R>> +endobj +81 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[77 0 R 80 0 R]>> +endobj +82 0 obj +<</Type/StructElem/S/TD/P 85 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[117]/Pg 417 0 R>> +endobj +83 0 obj +<</Type/StructElem/S/Code/P 84 0 R/K[123]/Pg 417 0 R>> +endobj +84 0 obj +<</Type/StructElem/S/TD/P 85 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[118 119 120 121 122 83 0 R]/Pg 417 0 R>> +endobj +85 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[82 0 R 84 0 R]>> +endobj +86 0 obj +<</Type/StructElem/S/TD/P 88 0 R/A[<</O/Table/Headers[]>>]/K[124]/Pg 417 0 R>> +endobj +87 0 obj +<</Type/StructElem/S/TD/P 88 0 R/A[<</O/Table/Headers[]>>]/K[125 126]/Pg 417 0 R>> +endobj +88 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[86 0 R 87 0 R]>> +endobj +89 0 obj +<</Type/StructElem/S/TD/P 92 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[127]/Pg 417 0 R>> +endobj +90 0 obj +<</Type/StructElem/S/Code/P 91 0 R/K[129]/Pg 417 0 R>> +endobj +91 0 obj +<</Type/StructElem/S/TD/P 92 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[128 90 0 R 130 131]/Pg 417 0 R>> +endobj +92 0 obj +<</Type/StructElem/S/TR/P 93 0 R/K[89 0 R 91 0 R]>> +endobj +93 0 obj +<</Type/StructElem/S/Table/P 378 0 R/K[69 0 R 72 0 R 76 0 R 81 0 R 85 0 R 88 0 R 92 0 R]>> +endobj +94 0 obj +<</Type/StructElem/S/Code/P 99 0 R/K[133]/Pg 417 0 R>> +endobj +95 0 obj +<</Type/StructElem/S/Code/P 99 0 R/K[135]/Pg 417 0 R>> +endobj +96 0 obj +<</Type/StructElem/S/Code/P 99 0 R/K[137]/Pg 417 0 R>> +endobj +97 0 obj +<</Type/StructElem/S/Code/P 99 0 R/K[139]/Pg 417 0 R>> +endobj +98 0 obj +<</Type/StructElem/S/Code/P 99 0 R/K[141]/Pg 417 0 R>> +endobj +99 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[132 94 0 R 134 95 0 R 136 96 0 R 138 97 0 R 140 98 0 R 142 143 144]/Pg 417 0 R>> +endobj +100 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Keys: normal mode)/K[145]/Pg 417 0 R>> +endobj +101 0 obj +<</Type/StructElem/S/Strong/P 105 0 R/K[147]/Pg 417 0 R>> +endobj +102 0 obj +<</Type/StructElem/S/Code/P 105 0 R/K[150]/Pg 417 0 R>> +endobj +103 0 obj +<</Type/StructElem/S/Code/P 105 0 R/K[152]/Pg 417 0 R>> +endobj +104 0 obj +<</Type/StructElem/S/Link/P 105 0 R/K[155<</Type/OBJR/Pg 417 0 R/Obj 379 0 R>>]/Pg 417 0 R>> +endobj +105 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[146 101 0 R 148 149 102 0 R 151 103 0 R 153 154 104 0 R 156]/Pg 417 0 R>> +endobj +106 0 obj +<</Type/StructElem/S/TD/P 108 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[157 158 159 160 161 162 163 164]/Pg 417 0 R>> +endobj +107 0 obj +<</Type/StructElem/S/TD/P 108 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[165]/Pg 417 0 R>> +endobj +108 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[106 0 R 107 0 R]>> +endobj +109 0 obj +<</Type/StructElem/S/TD/P 111 0 R/A[<</O/Table/Headers[]>>]/K[166 167 168 169 170 171]/Pg 417 0 R>> +endobj +110 0 obj +<</Type/StructElem/S/TD/P 111 0 R/A[<</O/Table/Headers[]>>]/K[172]/Pg 417 0 R>> +endobj +111 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[109 0 R 110 0 R]>> +endobj +112 0 obj +<</Type/StructElem/S/TD/P 114 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[173 174 175 176 177 178 179]/Pg 417 0 R>> +endobj +113 0 obj +<</Type/StructElem/S/TD/P 114 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[180 181]/Pg 417 0 R>> +endobj +114 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[112 0 R 113 0 R]>> +endobj +115 0 obj +<</Type/StructElem/S/TD/P 117 0 R/A[<</O/Table/Headers[]>>]/K[182 183 184]/Pg 417 0 R>> +endobj +116 0 obj +<</Type/StructElem/S/TD/P 117 0 R/A[<</O/Table/Headers[]>>]/K[185]/Pg 417 0 R>> +endobj +117 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[115 0 R 116 0 R]>> +endobj +118 0 obj +<</Type/StructElem/S/TD/P 120 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[186]/Pg 417 0 R>> +endobj +119 0 obj +<</Type/StructElem/S/TD/P 120 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[187]/Pg 417 0 R>> +endobj +120 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[118 0 R 119 0 R]>> +endobj +121 0 obj +<</Type/StructElem/S/TD/P 123 0 R/A[<</O/Table/Headers[]>>]/K[188 189 190]/Pg 417 0 R>> +endobj +122 0 obj +<</Type/StructElem/S/TD/P 123 0 R/A[<</O/Table/Headers[]>>]/K[191]/Pg 417 0 R>> +endobj +123 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[121 0 R 122 0 R]>> +endobj +124 0 obj +<</Type/StructElem/S/TD/P 126 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[192 193 194]/Pg 417 0 R>> +endobj +125 0 obj +<</Type/StructElem/S/TD/P 126 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[195]/Pg 417 0 R>> +endobj +126 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[124 0 R 125 0 R]>> +endobj +127 0 obj +<</Type/StructElem/S/TD/P 129 0 R/A[<</O/Table/Headers[]>>]/K[196 197]/Pg 417 0 R>> +endobj +128 0 obj +<</Type/StructElem/S/TD/P 129 0 R/A[<</O/Table/Headers[]>>]/K[198]/Pg 417 0 R>> +endobj +129 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[127 0 R 128 0 R]>> +endobj +130 0 obj +<</Type/StructElem/S/TD/P 132 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[199 200 201 202 203 204]/Pg 417 0 R>> +endobj +131 0 obj +<</Type/StructElem/S/TD/P 132 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[205 206 207]/Pg 417 0 R>> +endobj +132 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[130 0 R 131 0 R]>> +endobj +133 0 obj +<</Type/StructElem/S/TD/P 135 0 R/A[<</O/Table/Headers[]>>]/K[208 209]/Pg 417 0 R>> +endobj +134 0 obj +<</Type/StructElem/S/TD/P 135 0 R/A[<</O/Table/Headers[]>>]/K[210 211]/Pg 417 0 R>> +endobj +135 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[133 0 R 134 0 R]>> +endobj +136 0 obj +<</Type/StructElem/S/TD/P 138 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[212 213]/Pg 417 0 R>> +endobj +137 0 obj +<</Type/StructElem/S/TD/P 138 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[214 215]/Pg 417 0 R>> +endobj +138 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[136 0 R 137 0 R]>> +endobj +139 0 obj +<</Type/StructElem/S/TD/P 141 0 R/A[<</O/Table/Headers[]>>]/K[216 217 218]/Pg 417 0 R>> +endobj +140 0 obj +<</Type/StructElem/S/TD/P 141 0 R/A[<</O/Table/Headers[]>>]/K[219]/Pg 417 0 R>> +endobj +141 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[139 0 R 140 0 R]>> +endobj +142 0 obj +<</Type/StructElem/S/TD/P 144 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[220 221 222 223 224 225]/Pg 417 0 R>> +endobj +143 0 obj +<</Type/StructElem/S/TD/P 144 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[226 227]/Pg 417 0 R>> +endobj +144 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[142 0 R 143 0 R]>> +endobj +145 0 obj +<</Type/StructElem/S/TD/P 147 0 R/A[<</O/Table/Headers[]>>]/K[228]/Pg 417 0 R>> +endobj +146 0 obj +<</Type/StructElem/S/TD/P 147 0 R/A[<</O/Table/Headers[]>>]/K[229 230]/Pg 417 0 R>> +endobj +147 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[145 0 R 146 0 R]>> +endobj +148 0 obj +<</Type/StructElem/S/TD/P 150 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[231 232 233 234 235 236]/Pg 417 0 R>> +endobj +149 0 obj +<</Type/StructElem/S/TD/P 150 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[237 238]/Pg 417 0 R>> +endobj +150 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[148 0 R 149 0 R]>> +endobj +151 0 obj +<</Type/StructElem/S/TD/P 153 0 R/A[<</O/Table/Headers[]>>]/K[239 240 241 242 243 244]/Pg 417 0 R>> +endobj +152 0 obj +<</Type/StructElem/S/TD/P 153 0 R/A[<</O/Table/Headers[]>>]/K[245]/Pg 417 0 R>> +endobj +153 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[151 0 R 152 0 R]>> +endobj +154 0 obj +<</Type/StructElem/S/TD/P 156 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[246 247]/Pg 417 0 R>> +endobj +155 0 obj +<</Type/StructElem/S/TD/P 156 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[248 249 250 251 252 253 254]/Pg 417 0 R>> +endobj +156 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[154 0 R 155 0 R]>> +endobj +157 0 obj +<</Type/StructElem/S/TD/P 159 0 R/A[<</O/Table/Headers[]>>]/K[255]/Pg 417 0 R>> +endobj +158 0 obj +<</Type/StructElem/S/TD/P 159 0 R/A[<</O/Table/Headers[]>>]/K[256]/Pg 417 0 R>> +endobj +159 0 obj +<</Type/StructElem/S/TR/P 160 0 R/K[157 0 R 158 0 R]>> +endobj +160 0 obj +<</Type/StructElem/S/Table/P 378 0 R/K[108 0 R 111 0 R 114 0 R 117 0 R 120 0 R 123 0 R 126 0 R 129 0 R 132 0 R 135 0 R 138 0 R 141 0 R 144 0 R 147 0 R 150 0 R 153 0 R 156 0 R 159 0 R]>> +endobj +161 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[257]/Pg 417 0 R>> +endobj +162 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Keys: panes)/K[258]/Pg 417 0 R>> +endobj +163 0 obj +<</Type/StructElem/S/TD/P 166 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[259 260 261]/Pg 417 0 R>> +endobj +164 0 obj +<</Type/StructElem/S/Code/P 165 0 R/K[274]/Pg 417 0 R>> +endobj +165 0 obj +<</Type/StructElem/S/TD/P 166 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[262 263 264 265 266 267 268 269 270 271 272 273 164 0 R 275]/Pg 417 0 R>> +endobj +166 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[163 0 R 165 0 R]>> +endobj +167 0 obj +<</Type/StructElem/S/TD/P 169 0 R/A[<</O/Table/Headers[]>>]/K[276]/Pg 417 0 R>> +endobj +168 0 obj +<</Type/StructElem/S/TD/P 169 0 R/A[<</O/Table/Headers[]>>]/K[277 278]/Pg 417 0 R>> +endobj +169 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[167 0 R 168 0 R]>> +endobj +170 0 obj +<</Type/StructElem/S/TD/P 172 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[279 280 281]/Pg 417 0 R>> +endobj +171 0 obj +<</Type/StructElem/S/TD/P 172 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[282 283 284 285 286 287]/Pg 417 0 R>> +endobj +172 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[170 0 R 171 0 R]>> +endobj +173 0 obj +<</Type/StructElem/S/TD/P 175 0 R/A[<</O/Table/Headers[]>>]/K[288 289 290 291 292 293]/Pg 417 0 R>> +endobj +174 0 obj +<</Type/StructElem/S/TD/P 175 0 R/A[<</O/Table/Headers[]>>]/K[294 295 296 297 298 299 300 301 302 303 304 305 306 307]/Pg 417 0 R>> +endobj +175 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[173 0 R 174 0 R]>> +endobj +176 0 obj +<</Type/StructElem/S/TD/P 178 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[308 309 310]/Pg 417 0 R>> +endobj +177 0 obj +<</Type/StructElem/S/TD/P 178 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[311]/Pg 417 0 R>> +endobj +178 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[176 0 R 177 0 R]>> +endobj +179 0 obj +<</Type/StructElem/S/TD/P 181 0 R/A[<</O/Table/Headers[]>>]/K[312 313 314]/Pg 417 0 R>> +endobj +180 0 obj +<</Type/StructElem/S/TD/P 181 0 R/A[<</O/Table/Headers[]>>]/K[315 316]/Pg 417 0 R>> +endobj +181 0 obj +<</Type/StructElem/S/TR/P 182 0 R/K[179 0 R 180 0 R]>> +endobj +182 0 obj +<</Type/StructElem/S/Table/P 378 0 R/K[166 0 R 169 0 R 172 0 R 175 0 R 178 0 R 181 0 R]>> +endobj +183 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(The leader: in normal mode)/K[317 318 319]/Pg 417 0 R>> +endobj +184 0 obj +<</Type/StructElem/S/TD/P 186 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[320 321 322]/Pg 417 0 R>> +endobj +185 0 obj +<</Type/StructElem/S/TD/P 186 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[323 324 325 326]/Pg 417 0 R>> +endobj +186 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[184 0 R 185 0 R]>> +endobj +187 0 obj +<</Type/StructElem/S/TD/P 189 0 R/A[<</O/Table/Headers[]>>]/K[327 328 329 330 331]/Pg 417 0 R>> +endobj +188 0 obj +<</Type/StructElem/S/TD/P 189 0 R/A[<</O/Table/Headers[]>>]/K[332]/Pg 417 0 R>> +endobj +189 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[187 0 R 188 0 R]>> +endobj +190 0 obj +<</Type/StructElem/S/TD/P 192 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[333 334 335 336 337]/Pg 417 0 R>> +endobj +191 0 obj +<</Type/StructElem/S/TD/P 192 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[338]/Pg 417 0 R>> +endobj +192 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[190 0 R 191 0 R]>> +endobj +193 0 obj +<</Type/StructElem/S/TD/P 195 0 R/A[<</O/Table/Headers[]>>]/K[339 340 341 342 343]/Pg 417 0 R>> +endobj +194 0 obj +<</Type/StructElem/S/TD/P 195 0 R/A[<</O/Table/Headers[]>>]/K[344]/Pg 417 0 R>> +endobj +195 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[193 0 R 194 0 R]>> +endobj +196 0 obj +<</Type/StructElem/S/TD/P 198 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[345 346 347 348 349]/Pg 417 0 R>> +endobj +197 0 obj +<</Type/StructElem/S/TD/P 198 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[350]/Pg 417 0 R>> +endobj +198 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[196 0 R 197 0 R]>> +endobj +199 0 obj +<</Type/StructElem/S/TD/P 201 0 R/A[<</O/Table/Headers[]>>]/K[351 352 353 354 355]/Pg 417 0 R>> +endobj +200 0 obj +<</Type/StructElem/S/TD/P 201 0 R/A[<</O/Table/Headers[]>>]/K[356]/Pg 417 0 R>> +endobj +201 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[199 0 R 200 0 R]>> +endobj +202 0 obj +<</Type/StructElem/S/TD/P 204 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[357 358 359 360 361]/Pg 417 0 R>> +endobj +203 0 obj +<</Type/StructElem/S/TD/P 204 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[362]/Pg 417 0 R>> +endobj +204 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[202 0 R 203 0 R]>> +endobj +205 0 obj +<</Type/StructElem/S/TD/P 207 0 R/A[<</O/Table/Headers[]>>]/K[363 364 365]/Pg 417 0 R>> +endobj +206 0 obj +<</Type/StructElem/S/TD/P 207 0 R/A[<</O/Table/Headers[]>>]/K[366]/Pg 417 0 R>> +endobj +207 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[205 0 R 206 0 R]>> +endobj +208 0 obj +<</Type/StructElem/S/TD/P 210 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[367 368 369 370 371]/Pg 417 0 R>> +endobj +209 0 obj +<</Type/StructElem/S/TD/P 210 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[372]/Pg 417 0 R>> +endobj +210 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[208 0 R 209 0 R]>> +endobj +211 0 obj +<</Type/StructElem/S/TD/P 213 0 R/A[<</O/Table/Headers[]>>]/K[373 374 375 376 377]/Pg 417 0 R>> +endobj +212 0 obj +<</Type/StructElem/S/TD/P 213 0 R/A[<</O/Table/Headers[]>>]/K[378]/Pg 417 0 R>> +endobj +213 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[211 0 R 212 0 R]>> +endobj +214 0 obj +<</Type/StructElem/S/TD/P 216 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[379 380 381]/Pg 417 0 R>> +endobj +215 0 obj +<</Type/StructElem/S/TD/P 216 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[382]/Pg 417 0 R>> +endobj +216 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[214 0 R 215 0 R]>> +endobj +217 0 obj +<</Type/StructElem/S/TD/P 219 0 R/A[<</O/Table/Headers[]>>]/K[383 384 385 386 387]/Pg 417 0 R>> +endobj +218 0 obj +<</Type/StructElem/S/TD/P 219 0 R/A[<</O/Table/Headers[]>>]/K[388]/Pg 417 0 R>> +endobj +219 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[217 0 R 218 0 R]>> +endobj +220 0 obj +<</Type/StructElem/S/TD/P 222 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[389 390 391 392 393]/Pg 417 0 R>> +endobj +221 0 obj +<</Type/StructElem/S/TD/P 222 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[394]/Pg 417 0 R>> +endobj +222 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[220 0 R 221 0 R]>> +endobj +223 0 obj +<</Type/StructElem/S/TD/P 225 0 R/A[<</O/Table/Headers[]>>]/K[395 396 397]/Pg 417 0 R>> +endobj +224 0 obj +<</Type/StructElem/S/TD/P 225 0 R/A[<</O/Table/Headers[]>>]/K[398]/Pg 417 0 R>> +endobj +225 0 obj +<</Type/StructElem/S/TR/P 226 0 R/K[223 0 R 224 0 R]>> +endobj +226 0 obj +<</Type/StructElem/S/Table/P 227 0 R/K[186 0 R 189 0 R 192 0 R 195 0 R 198 0 R 201 0 R 204 0 R 207 0 R 210 0 R 213 0 R 216 0 R 219 0 R 222 0 R 225 0 R]>> +endobj +227 0 obj +<</Type/StructElem/S/Div/P 269 0 R/K[226 0 R]>> +endobj +228 0 obj +<</Type/StructElem/S/TD/P 230 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[399 400 401]/Pg 417 0 R>> +endobj +229 0 obj +<</Type/StructElem/S/TD/P 230 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[402]/Pg 417 0 R>> +endobj +230 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[228 0 R 229 0 R]>> +endobj +231 0 obj +<</Type/StructElem/S/TD/P 233 0 R/A[<</O/Table/Headers[]>>]/K[403 404 405 406 407]/Pg 417 0 R>> +endobj +232 0 obj +<</Type/StructElem/S/TD/P 233 0 R/A[<</O/Table/Headers[]>>]/K[408]/Pg 417 0 R>> +endobj +233 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[231 0 R 232 0 R]>> +endobj +234 0 obj +<</Type/StructElem/S/TD/P 236 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[409 410 411 412 413]/Pg 417 0 R>> +endobj +235 0 obj +<</Type/StructElem/S/TD/P 236 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[414]/Pg 417 0 R>> +endobj +236 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[234 0 R 235 0 R]>> +endobj +237 0 obj +<</Type/StructElem/S/TD/P 239 0 R/A[<</O/Table/Headers[]>>]/K[415 416 417 418 419]/Pg 417 0 R>> +endobj +238 0 obj +<</Type/StructElem/S/TD/P 239 0 R/A[<</O/Table/Headers[]>>]/K[420]/Pg 417 0 R>> +endobj +239 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[237 0 R 238 0 R]>> +endobj +240 0 obj +<</Type/StructElem/S/TD/P 242 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[421 422 423 424 425]/Pg 417 0 R>> +endobj +241 0 obj +<</Type/StructElem/S/TD/P 242 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[426]/Pg 417 0 R>> +endobj +242 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[240 0 R 241 0 R]>> +endobj +243 0 obj +<</Type/StructElem/S/TD/P 245 0 R/A[<</O/Table/Headers[]>>]/K[427 428 429 430 431]/Pg 417 0 R>> +endobj +244 0 obj +<</Type/StructElem/S/TD/P 245 0 R/A[<</O/Table/Headers[]>>]/K[432]/Pg 417 0 R>> +endobj +245 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[243 0 R 244 0 R]>> +endobj +246 0 obj +<</Type/StructElem/S/TD/P 248 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[433 434 435 436 437]/Pg 417 0 R>> +endobj +247 0 obj +<</Type/StructElem/S/TD/P 248 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[438]/Pg 417 0 R>> +endobj +248 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[246 0 R 247 0 R]>> +endobj +249 0 obj +<</Type/StructElem/S/TD/P 251 0 R/A[<</O/Table/Headers[]>>]/K[439 440 441 442 443]/Pg 417 0 R>> +endobj +250 0 obj +<</Type/StructElem/S/TD/P 251 0 R/A[<</O/Table/Headers[]>>]/K[444]/Pg 417 0 R>> +endobj +251 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[249 0 R 250 0 R]>> +endobj +252 0 obj +<</Type/StructElem/S/TD/P 254 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[445 446 447 448 449]/Pg 417 0 R>> +endobj +253 0 obj +<</Type/StructElem/S/TD/P 254 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[450]/Pg 417 0 R>> +endobj +254 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[252 0 R 253 0 R]>> +endobj +255 0 obj +<</Type/StructElem/S/TD/P 257 0 R/A[<</O/Table/Headers[]>>]/K[451 452 453 454 455]/Pg 417 0 R>> +endobj +256 0 obj +<</Type/StructElem/S/TD/P 257 0 R/A[<</O/Table/Headers[]>>]/K[456]/Pg 417 0 R>> +endobj +257 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[255 0 R 256 0 R]>> +endobj +258 0 obj +<</Type/StructElem/S/TD/P 260 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[457 458 459 460 461]/Pg 417 0 R>> +endobj +259 0 obj +<</Type/StructElem/S/TD/P 260 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[462]/Pg 417 0 R>> +endobj +260 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[258 0 R 259 0 R]>> +endobj +261 0 obj +<</Type/StructElem/S/TD/P 263 0 R/A[<</O/Table/Headers[]>>]/K[463 464 465 466 467]/Pg 417 0 R>> +endobj +262 0 obj +<</Type/StructElem/S/TD/P 263 0 R/A[<</O/Table/Headers[]>>]/K[468]/Pg 417 0 R>> +endobj +263 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[261 0 R 262 0 R]>> +endobj +264 0 obj +<</Type/StructElem/S/TD/P 266 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[469 470 471]/Pg 417 0 R>> +endobj +265 0 obj +<</Type/StructElem/S/TD/P 266 0 R/A[<</O/Table/Headers[]>><</O/Layout/BackgroundColor[0.89411765 0.9411765 0.92941177]>>]/K[472]/Pg 417 0 R>> +endobj +266 0 obj +<</Type/StructElem/S/TR/P 267 0 R/K[264 0 R 265 0 R]>> +endobj +267 0 obj +<</Type/StructElem/S/Table/P 268 0 R/K[230 0 R 233 0 R 236 0 R 239 0 R 242 0 R 245 0 R 248 0 R 251 0 R 254 0 R 257 0 R 260 0 R 263 0 R 266 0 R]>> +endobj +268 0 obj +<</Type/StructElem/S/Div/P 269 0 R/K[267 0 R]>> +endobj +269 0 obj +<</Type/StructElem/S/Div/P 378 0 R/K[227 0 R 268 0 R]>> +endobj +270 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Terminals and commands)/K[473]/Pg 417 0 R>> +endobj +271 0 obj +<</Type/StructElem/S/Lbl/P 274 0 R/K[474]/Pg 417 0 R>> +endobj +272 0 obj +<</Type/StructElem/S/Code/P 273 0 R/K[479]/Pg 417 0 R>> +endobj +273 0 obj +<</Type/StructElem/S/LBody/P 274 0 R/K[475 476 477 478 272 0 R 480 481 482 483 484 485 486 487]/Pg 417 0 R>> +endobj +274 0 obj +<</Type/StructElem/S/LI/P 286 0 R/K[271 0 R 273 0 R]>> +endobj +275 0 obj +<</Type/StructElem/S/Lbl/P 279 0 R/K[488]/Pg 417 0 R>> +endobj +276 0 obj +<</Type/StructElem/S/Strong/P 277 0 R/K[490 491]/Pg 417 0 R>> +endobj +277 0 obj +<</Type/StructElem/S/P/P 278 0 R/K[489 276 0 R 492]/Pg 417 0 R>> +endobj +278 0 obj +<</Type/StructElem/S/LBody/P 279 0 R/K[277 0 R 493 494 495]/Pg 417 0 R>> +endobj +279 0 obj +<</Type/StructElem/S/LI/P 286 0 R/K[275 0 R 278 0 R]>> +endobj +280 0 obj +<</Type/StructElem/S/Lbl/P 285 0 R/K[496]/Pg 417 0 R>> +endobj +281 0 obj +<</Type/StructElem/S/Code/P 284 0 R/K[499]/Pg 417 0 R>> +endobj +282 0 obj +<</Type/StructElem/S/Code/P 284 0 R/K[505]/Pg 417 0 R>> +endobj +283 0 obj +<</Type/StructElem/S/Code/P 284 0 R/K[507]/Pg 417 0 R>> +endobj +284 0 obj +<</Type/StructElem/S/LBody/P 285 0 R/K[497 498 281 0 R 500 501 502 503 504 282 0 R 506 283 0 R 508]/Pg 417 0 R>> +endobj +285 0 obj +<</Type/StructElem/S/LI/P 286 0 R/K[280 0 R 284 0 R]>> +endobj +286 0 obj +<</Type/StructElem/S/L/P 378 0 R/A[<</O/List/ListNumbering/Circle>>]/K[274 0 R 279 0 R 285 0 R]>> +endobj +287 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Reviewing diffs)/K[509]/Pg 417 0 R>> +endobj +288 0 obj +<</Type/StructElem/S/Code/P 292 0 R/K[510]/Pg 417 0 R>> +endobj +289 0 obj +<</Type/StructElem/S/Code/P 292 0 R/K[513]/Pg 417 0 R>> +endobj +290 0 obj +<</Type/StructElem/S/Code/P 292 0 R/K[516]/Pg 417 0 R>> +endobj +291 0 obj +<</Type/StructElem/S/Code/P 292 0 R/K[518]/Pg 417 0 R>> +endobj +292 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[288 0 R 511 512 289 0 R 514 515 290 0 R 517 291 0 R 519 520 521]/Pg 417 0 R>> +endobj +293 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Finding things)/K[522]/Pg 417 0 R>> +endobj +294 0 obj +<</Type/StructElem/S/Lbl/P 299 0 R/K[523]/Pg 417 0 R>> +endobj +295 0 obj +<</Type/StructElem/S/Code/P 298 0 R/K[526]/Pg 417 0 R>> +endobj +296 0 obj +<</Type/StructElem/S/Code/P 298 0 R/K[530]/Pg 417 0 R>> +endobj +297 0 obj +<</Type/StructElem/S/Code/P 298 0 R/K[532]/Pg 417 0 R>> +endobj +298 0 obj +<</Type/StructElem/S/LBody/P 299 0 R/K[524 525 295 0 R 527 528 529 296 0 R 531 297 0 R 533 534 535 536 537 538 539 540]/Pg 417 0 R>> +endobj +299 0 obj +<</Type/StructElem/S/LI/P 300 0 R/K[294 0 R 298 0 R]>> +endobj +300 0 obj +<</Type/StructElem/S/L/P 378 0 R/A[<</O/List/ListNumbering/Circle>>]/K[299 0 R]>> +endobj +301 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Sessions)/K[541]/Pg 417 0 R>> +endobj +302 0 obj +<</Type/StructElem/S/Code/P 305 0 R/K[542]/Pg 417 0 R>> +endobj +303 0 obj +<</Type/StructElem/S/Code/P 305 0 R/K[544]/Pg 417 0 R>> +endobj +304 0 obj +<</Type/StructElem/S/Code/P 305 0 R/K[548]/Pg 417 0 R>> +endobj +305 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[302 0 R 543 303 0 R 545 546 547 304 0 R 549 550 551 552 553]/Pg 417 0 R>> +endobj +306 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Config)/K[554]/Pg 417 0 R>> +endobj +307 0 obj +<</Type/StructElem/S/Code/P 309 0 R/K[563]/Pg 417 0 R>> +endobj +308 0 obj +<</Type/StructElem/S/Code/P 309 0 R/K[568]/Pg 417 0 R>> +endobj +309 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[555 556 557 558 559 560 561 562 307 0 R 564 565 566 567 308 0 R 569 570 571 572 573 574 575 576 577]/Pg 417 0 R>> +endobj +310 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(Themes)/K[578]/Pg 417 0 R>> +endobj +311 0 obj +<</Type/StructElem/S/Code/P 313 0 R/K[583]/Pg 417 0 R>> +endobj +312 0 obj +<</Type/StructElem/S/Code/P 313 0 R/K[589]/Pg 417 0 R>> +endobj +313 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[579 580 581 582 311 0 R 584 585 586 587 588 312 0 R 590 591]/Pg 417 0 R>> +endobj +314 0 obj +<</Type/StructElem/S/H2/P 378 0 R/T(The virtual filesystem (9P))/K[592]/Pg 417 0 R>> +endobj +315 0 obj +<</Type/StructElem/S/Code/P 318 0 R/K[594]/Pg 417 0 R>> +endobj +316 0 obj +<</Type/StructElem/S/Code/P 318 0 R/K[596]/Pg 417 0 R>> +endobj +317 0 obj +<</Type/StructElem/S/Code/P 318 0 R/K[599]/Pg 417 0 R>> +endobj +318 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[593 315 0 R 595 316 0 R 597 598 317 0 R 600 601]/Pg 417 0 R>> +endobj +319 0 obj +<</Type/StructElem/S/Span/P 378 0 R/A[<</O/Layout/Placement/Block>>]/K[602 603 604]/Pg 417 0 R>> +endobj +320 0 obj +<</Type/StructElem/S/Span/P 321 0 R/A[<</O/Layout/Placement/Block>>]/K[605]/Pg 417 0 R>> +endobj +321 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[320 0 R]>> +endobj +322 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[]>> +endobj +323 0 obj +<</Type/StructElem/S/Span/P 324 0 R/A[<</O/Layout/Placement/Block>>]/K[606 607]/Pg 417 0 R>> +endobj +324 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[323 0 R]>> +endobj +325 0 obj +<</Type/StructElem/S/Span/P 326 0 R/A[<</O/Layout/Placement/Block>>]/K[608]/Pg 417 0 R>> +endobj +326 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[325 0 R]>> +endobj +327 0 obj +<</Type/StructElem/S/Span/P 328 0 R/A[<</O/Layout/Placement/Block>>]/K[609 610]/Pg 417 0 R>> +endobj +328 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[327 0 R]>> +endobj +329 0 obj +<</Type/StructElem/S/Span/P 330 0 R/A[<</O/Layout/Placement/Block>>]/K[611 612]/Pg 417 0 R>> +endobj +330 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[329 0 R]>> +endobj +331 0 obj +<</Type/StructElem/S/Span/P 332 0 R/A[<</O/Layout/Placement/Block>>]/K[613 614]/Pg 417 0 R>> +endobj +332 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[331 0 R]>> +endobj +333 0 obj +<</Type/StructElem/S/Span/P 334 0 R/A[<</O/Layout/Placement/Block>>]/K[615 616]/Pg 417 0 R>> +endobj +334 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[333 0 R]>> +endobj +335 0 obj +<</Type/StructElem/S/Span/P 336 0 R/A[<</O/Layout/Placement/Block>>]/K[617 618]/Pg 417 0 R>> +endobj +336 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[335 0 R]>> +endobj +337 0 obj +<</Type/StructElem/S/Span/P 338 0 R/A[<</O/Layout/Placement/Block>>]/K[619]/Pg 417 0 R>> +endobj +338 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[337 0 R]>> +endobj +339 0 obj +<</Type/StructElem/S/Span/P 340 0 R/A[<</O/Layout/Placement/Block>>]/K[620 621]/Pg 417 0 R>> +endobj +340 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[339 0 R]>> +endobj +341 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[]>> +endobj +342 0 obj +<</Type/StructElem/S/Span/P 343 0 R/A[<</O/Layout/Placement/Block>>]/K[622 623]/Pg 417 0 R>> +endobj +343 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[342 0 R]>> +endobj +344 0 obj +<</Type/StructElem/S/Span/P 345 0 R/A[<</O/Layout/Placement/Block>>]/K[624]/Pg 417 0 R>> +endobj +345 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[344 0 R]>> +endobj +346 0 obj +<</Type/StructElem/S/Span/P 347 0 R/A[<</O/Layout/Placement/Block>>]/K[625 626]/Pg 417 0 R>> +endobj +347 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[346 0 R]>> +endobj +348 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[]>> +endobj +349 0 obj +<</Type/StructElem/S/Span/P 350 0 R/A[<</O/Layout/Placement/Block>>]/K[627 628]/Pg 417 0 R>> +endobj +350 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[349 0 R]>> +endobj +351 0 obj +<</Type/StructElem/S/Span/P 352 0 R/A[<</O/Layout/Placement/Block>>]/K[629]/Pg 417 0 R>> +endobj +352 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[351 0 R]>> +endobj +353 0 obj +<</Type/StructElem/S/Span/P 354 0 R/A[<</O/Layout/Placement/Block>>]/K[630 631]/Pg 417 0 R>> +endobj +354 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[353 0 R]>> +endobj +355 0 obj +<</Type/StructElem/S/Span/P 356 0 R/A[<</O/Layout/Placement/Block>>]/K[632 633 634 635 636]/Pg 417 0 R>> +endobj +356 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[355 0 R]>> +endobj +357 0 obj +<</Type/StructElem/S/Span/P 358 0 R/A[<</O/Layout/Placement/Block>>]/K[637 638]/Pg 417 0 R>> +endobj +358 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[357 0 R]>> +endobj +359 0 obj +<</Type/StructElem/S/Span/P 360 0 R/A[<</O/Layout/Placement/Block>>]/K[639]/Pg 417 0 R>> +endobj +360 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[359 0 R]>> +endobj +361 0 obj +<</Type/StructElem/S/Span/P 362 0 R/A[<</O/Layout/Placement/Block>>]/K[640 641]/Pg 417 0 R>> +endobj +362 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[361 0 R]>> +endobj +363 0 obj +<</Type/StructElem/S/Span/P 364 0 R/A[<</O/Layout/Placement/Block>>]/K[642]/Pg 417 0 R>> +endobj +364 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[363 0 R]>> +endobj +365 0 obj +<</Type/StructElem/S/Span/P 366 0 R/A[<</O/Layout/Placement/Block>>]/K[643 644]/Pg 417 0 R>> +endobj +366 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[365 0 R]>> +endobj +367 0 obj +<</Type/StructElem/S/Span/P 368 0 R/A[<</O/Layout/Placement/Block>>]/K[645 646 647]/Pg 417 0 R>> +endobj +368 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[367 0 R]>> +endobj +369 0 obj +<</Type/StructElem/S/Span/P 370 0 R/A[<</O/Layout/Placement/Block>>]/K[648 649]/Pg 417 0 R>> +endobj +370 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[369 0 R]>> +endobj +371 0 obj +<</Type/StructElem/S/Span/P 372 0 R/A[<</O/Layout/Placement/Block>>]/K[650 651 652]/Pg 417 0 R>> +endobj +372 0 obj +<</Type/StructElem/S/Div/P 373 0 R/K[371 0 R]>> +endobj +373 0 obj +<</Type/StructElem/S/Div/P 378 0 R/K[321 0 R 322 0 R 324 0 R 326 0 R 328 0 R 330 0 R 332 0 R 334 0 R 336 0 R 338 0 R 340 0 R 341 0 R 343 0 R 345 0 R 347 0 R 348 0 R 350 0 R 352 0 R 354 0 R 356 0 R 358 0 R 360 0 R 362 0 R 364 0 R 366 0 R 368 0 R 370 0 R 372 0 R]>> +endobj +374 0 obj +<</Type/StructElem/S/Span/P 378 0 R/A[<</O/Layout/Placement/Block>>]/K[653 654 655 656 657 658 659]/Pg 417 0 R>> +endobj +375 0 obj +<</Type/StructElem/S/Code/P 377 0 R/K[660]/Pg 417 0 R>> +endobj +376 0 obj +<</Type/StructElem/S/Code/P 377 0 R/K[662 663]/Pg 417 0 R>> +endobj +377 0 obj +<</Type/StructElem/S/P/P 378 0 R/K[375 0 R 661 376 0 R 664 665]/Pg 417 0 R>> +endobj +378 0 obj +<</Type/StructElem/S/Document/P 17 0 R/K[19 0 R 20 0 R 36 0 R 37 0 R 53 0 R 54 0 R 55 0 R 56 0 R 64 0 R 65 0 R 66 0 R 93 0 R 99 0 R 100 0 R 105 0 R 160 0 R 161 0 R 162 0 R 182 0 R 183 0 R 269 0 R 270 0 R 286 0 R 287 0 R 292 0 R 293 0 R 300 0 R 301 0 R 305 0 R 306 0 R 309 0 R 310 0 R 313 0 R 314 0 R 318 0 R 319 0 R 373 0 R 374 0 R 377 0 R]>> +endobj +379 0 obj +<</Type/Annot/Subtype/Link/Rect[133.98361 58.145325 172.33961 67.41614]/Border[0 0 0]/A<</Type/Action/S/URI/URI(https://docs.helix-editor.com/keymap.html)>>/F 4/StructParent 0/Contents(https://docs.helix-editor.com/keymap.html)>> +endobj +380 0 obj +[/ICCBased 437 0 R] +endobj +381 0 obj +[417 0 R/XYZ 25.51181 645.8511 0] +endobj +382 0 obj +[417 0 R/XYZ 25.51181 804.6376 0] +endobj +383 0 obj +[417 0 R/XYZ 25.51181 463.1918 0] +endobj +384 0 obj +[417 0 R/XYZ 25.51181 276.91058 0] +endobj +385 0 obj +[417 0 R/XYZ 25.51181 110.019775 0] +endobj +386 0 obj +[417 0 R/XYZ 211.1811 571.6865 0] +endobj +387 0 obj +[417 0 R/XYZ 211.1811 362.6673 0] +endobj +388 0 obj +[417 0 R/XYZ 211.1811 191.56 0] +endobj +389 0 obj +[417 0 R/XYZ 211.1811 84.62604 0] +endobj +390 0 obj +[417 0 R/XYZ 396.8504 804.6376 0] +endobj +391 0 obj +[417 0 R/XYZ 396.8504 765.3951 0] +endobj +392 0 obj +[417 0 R/XYZ 396.8504 717.2342 0] +endobj +393 0 obj +[417 0 R/XYZ 396.8504 659.0976 0] +endobj +394 0 obj +[417 0 R/XYZ 396.8504 619.8551 0] +endobj +395 0 obj +<</Type/ExtGState/ca 0.6509804>> +endobj +396 0 obj +<</Type/ExtGState/ca 0.16078432>> +endobj +397 0 obj +<</Type/ExtGState/ca 0.7490196>> +endobj +398 0 obj +<</ProcSet[/PDF/Text/ImageC/ImageB]/ColorSpace<</c0 380 0 R>>/ExtGState<</g0 395 0 R/g1 396 0 R/g2 397 0 R>>/Font<</f0 399 0 R/f1 402 0 R/f2 405 0 R/f3 408 0 R/f4 411 0 R/f5 414 0 R>>>> +endobj +399 0 obj +<</Type/Font/Subtype/Type0/BaseFont/FVNFXV+LibertinusSerif-Bold-Identity-H/Encoding/Identity-H/DescendantFonts[400 0 R]/ToUnicode 419 0 R>> +endobj +400 0 obj +<</Type/Font/Subtype/CIDFontType0/BaseFont/FVNFXV+LibertinusSerif-Bold/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 401 0 R/DW 0/W[0 0 500 1 1 581 2 2 505.99997 3 3 428 4 4 561 5 5 489 6 6 427 7 7 652 8 8 619 9 9 250 10 10 905 11 11 551 12 12 598 13 13 706 14 14 256 15 15 325 16 16 358 17 17 641 18 18 244 19 19 456 20 20 322 21 21 613 22 22 616 23 23 561 24 24 521 25 25 736 26 26 558 27 27 716 28 28 529 29 29 777 30 30 716 31 31 545 32 32 504 33 33 315 34 34 514 35 35 614 36 36 315]>> +endobj +401 0 obj +<</Type/FontDescriptor/FontName/FVNFXV+LibertinusSerif-Bold/Flags 131078/FontBBox[0 -238 893 720]/ItalicAngle 0/Ascent 894/Descent -246/CapHeight 645/StemV 168.6/CIDSet 418 0 R/FontFile3 420 0 R>> +endobj +402 0 obj +<</Type/Font/Subtype/Type0/BaseFont/QUEAPS+LibertinusSerif-Italic-Identity-H/Encoding/Identity-H/DescendantFonts[403 0 R]/ToUnicode 422 0 R>> +endobj +403 0 obj +<</Type/Font/Subtype/CIDFontType0/BaseFont/QUEAPS+LibertinusSerif-Italic/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 404 0 R/DW 0/W[0 0 500 1 1 486 2 2 389 3 3 783 4 4 401 5 5 190 6 6 353 7 7 250 8 8 307 9 9 477 10 10 518 11 11 489 12 12 519 13 13 357 14 14 478 15 15 521 16 16 447 17 17 219 18 18 266 19 19 276 20 20 475 21 21 486 22 22 503.00003 23 23 489 24 24 472 25 25 564 26 26 444 27 27 499]>> +endobj +404 0 obj +<</Type/FontDescriptor/FontName/QUEAPS+LibertinusSerif-Italic/Flags 131142/FontBBox[-78 -238 786 700]/ItalicAngle -12/Ascent 894/Descent -246/CapHeight 645/StemV 95.4/CIDSet 421 0 R/FontFile3 423 0 R>> +endobj +405 0 obj +<</Type/Font/Subtype/Type0/BaseFont/URHWUA+LibertinusSerif-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[406 0 R]/ToUnicode 425 0 R>> +endobj +406 0 obj +<</Type/Font/Subtype/CIDFontType0/BaseFont/URHWUA+LibertinusSerif-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 407 0 R/DW 0/W[0 0 500 1 1 390 2 2 447 3 3 264 4 4 428 5 5 316 6 6 220 7 7 250 8 8 457 9 9 542 10 10 505.99997 11 11 310 12 12 504 13 13 531 14 14 538 15 15 519 16 16 220 17 17 702 18 18 500 19 19 236 20 20 515 21 21 372 22 22 747 23 23 271 24 24 493 25 25 560 26 26 661 27 27 587 28 28 528 29 29 268 30 30 490 31 31 512 32 32 596 33 33 323 34 34 424 35 35 790 36 36 497 37 37 695 38 38 363 39 40 298 41 41 485 42 42 338 43 43 646 44 44 236 45 45 1130 46 46 685 47 47 597 48 53 465 54 54 730 55 55 839 56 56 557 57 57 272 58 58 297 59 59 503.00003 60 60 582 61 61 541 62 62 749 63 63 550]>> +endobj +407 0 obj +<</Type/FontDescriptor/FontName/URHWUA+LibertinusSerif-Regular/Flags 131078/FontBBox[-48 -238 1072 708]/ItalicAngle 0/Ascent 894/Descent -246/CapHeight 658/StemV 95.4/CIDSet 424 0 R/FontFile3 426 0 R>> +endobj +408 0 obj +<</Type/Font/Subtype/Type0/BaseFont/DYDMIL+DejaVuSansMono/Encoding/Identity-H/DescendantFonts[409 0 R]/ToUnicode 428 0 R>> +endobj +409 0 obj +<</Type/Font/Subtype/CIDFontType2/BaseFont/DYDMIL+DejaVuSansMono/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 410 0 R/DW 0/CIDToGIDMap/Identity/W[0 85 602.0508]>> +endobj +410 0 obj +<</Type/FontDescriptor/FontName/DYDMIL+DejaVuSansMono/Flags 131077/FontBBox[-9.765625 -250 611.8164 937.9883]/ItalicAngle 0/Ascent 759.7656/Descent -240.23438/CapHeight 759.7656/StemV 95.4/CIDSet 427 0 R/FontFile2 429 0 R>> +endobj +411 0 obj +<</Type/Font/Subtype/Type0/BaseFont/OTVRNR+NewCMMath-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[412 0 R]/ToUnicode 431 0 R>> +endobj +412 0 obj +<</Type/Font/Subtype/CIDFontType0/BaseFont/OTVRNR+NewCMMath-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 413 0 R/DW 0/W[0 0 280 1 1 652 2 2 626]>> +endobj +413 0 obj +<</Type/FontDescriptor/FontName/OTVRNR+NewCMMath-Regular/Flags 131076/FontBBox[56 -213 596 725]/ItalicAngle 0/Ascent 806/Descent -194/CapHeight 683/StemV 95.4/CIDSet 430 0 R/FontFile3 432 0 R>> +endobj +414 0 obj +<</Type/Font/Subtype/Type0/BaseFont/RDRXIL+DejaVuSansMono-Bold/Encoding/Identity-H/DescendantFonts[415 0 R]/ToUnicode 434 0 R>> +endobj +415 0 obj +<</Type/Font/Subtype/CIDFontType2/BaseFont/RDRXIL+DejaVuSansMono-Bold/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement 0>>/FontDescriptor 416 0 R/DW 0/CIDToGIDMap/Identity/W[0 13 602.0508]>> +endobj +416 0 obj +<</Type/FontDescriptor/FontName/RDRXIL+DejaVuSansMono-Bold/Flags 131077/FontBBox[42.96875 -208.00781 584.96094 759.7656]/ItalicAngle 0/Ascent 759.7656/Descent -240.23438/CapHeight 759.7656/StemV 168.6/CIDSet 433 0 R/FontFile2 435 0 R>> +endobj +417 0 obj +<</Type/Page/Resources 398 0 R/MediaBox[0 0 595.2756 841.8898]/StructParents 1/Tabs/S/Parent 1 0 R/Contents 436 0 R/Annots[379 0 R]>> +endobj +418 0 obj +<</Length 13/Filter/FlateDecode>> +stream +x������ +endstream +endobj +419 0 obj +<</Length 515/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�m�M��0����C$�@�8�,!A ��вj�!h$bGNr��W�k�U�A�g���?ޏӍ2'�&?}pg[�4)� w���+�bu�vKj��:�)?���0<��:(���/e˗Z%�5(��4A~����4����X�u#���/�]m��� �Z����נ�ݚ��=�k���D��nKRu�{rߪ)[��x�zn�l(A�Z�ID}��z{��k��y��m�/4�7�-x���c�$�*k���Q��l�"/�X��-}�Z�D�_��C�+��kˊm�/��bM��(��X�x�b��\�)�K�״"kG�Q��$h��4�A)2P�h�3���Z8����h*@9��v�f���Q�ؗ;��"C�~i*D�� +�φc�sc��3���t�c��;f�z�����3�8ǝ��1�1���u���$<��\�S� �5%�s G�p�'a��E<f��eݻ�q��Z��e��w��{���=�[�2�+ +endstream +endobj +420 0 obj +<</Length 4399/Filter/FlateDecode/Subtype/CIDFontType0C>> +stream +x��Wy|Su�O(ͽ@'h/)�^��*� +�CV��Pj�J��I�ІnY�&m���lMҦ�6�WڦK����vQѺ0�#���{�(��F߉��{�>a�������sN������o���3y|>_�RF�$7?#� �In�t��C���A*��9�>��g����1{�%�������x��s���s�����?#��G����W����|���
��ɖTIv~F�z���:7#-=?��ٲ���l�˞��O�����#W�)��l(�O���-��f���G�<�M��Z�t�zTފѳgcE���e��38��@�;�W�1Q����x���jg6s���{:t��=J���_?�1�dX��ؙ���>�[�z�g�����Z>+֙٫��?�?��WDŽֹ�����gdl���87oż3���c�+c|�Xp�X�yf��㎫F�'�C�`8ar�_�E�3��Bp^{~� +CI0!B��B lG +�����(����/��� +l�ƴ]O�t��pnbb�=���07��v��z��Y���A�L���|�M)Υ0�黏�Je'������nl4�5l����j_.�-7�,J��Ի+�H�BF�0��� [;��&j��n4kE��g5���\F��=��{�e �D< +3`6�#��Ԩ(��M}��h��3�!S��Y�ĵ�Z��*�Ս2X�u�z�<�E^S0����lg��6�Mn���5Ǩ@��fE81�p��dl���w��9X'Bј27�HM(���[��ob���z���_CT��A�W}�s�v;]UG(Wu���TTy+�����@kVgZ�$k�>� 0u�Gͤ��p�PIe�J�T�t����Ǒ��{+�Щ=�4Jh~�� �x��Ȓg)4�e�S_K��gk�]��gr� v��ߑ�]q�m��L�*m崴l�f��Xƕ���7�v6�DQ�C�gϦ���p�`GC쨄����LQmN�60���BŮ�2jw�̚p��w1m��Tk�1��A,Va.�*h�����A �~�1@A\ n��`J�FB�?�w�k����I�4۽���=�WFK��
ۏ�2��E�S���~8�x�uZU�"�k����G���T�?g��\j21B�� +�߄�?v +�l{�IN ���h���W��{*��[y���}>\�-�� ���;z{d�[�:c5������t�,�O�ڭ�ɘ�|��0�U�W���2&�;K�AuuZ)�N�;�.�V�E\���'8=�TFB���'`�(x����G7 +~�]�e��9��!��#�qv�L�&��(L��B �:4�n�0&��e��]�����ek(b��P�yjT�wK�3W le�~��&{F�q����-����/����� ~t!�|Q������'���H[.�$M��!
#�܅+�[\��[YT���O�an�T��=h-v]"� �8VSG
����[QT�rGT7wj��Q����"ק�M ��kp��_C,���� +`�`�gaQ�ٳ"Iw��`Ow���S,ΐ��pz��� ��^���C��B�s���'��`FL�� ѫ���c�+�/� ����ƊJ�
�R&�s��~[`ZĢy��tWF��V5��7S�o�������MkKsC��;ƌ���-�w����b�0�Ѣ���h��� ��c1��UO_TJ5�ELae����,7^C +�R�F���P���`{H�,$.����]��c+�L���p7z7��#F�lSf���QB�u٦��'�����c
�)GhYMK����h�Su�2u���j[Bq��ٗ,9����2,CZ\�b�6c=���~ւq�^�;Cr���|��B�B�#��6������TQ@�$nJ.��������8��ގ�������J��Oj?�/BCH�W.�1�kh�8C�M���D@X���H�����)����3��f?�4z|kS܀����O��L�3BTT��)�y��B����ݮ�\����kF��YD�E�͙�í}���}��eY��~;�{�rS�C�V⛻��� ��V�,[���'���X�f�2�S�R�#���9��n6[z��X�͈T[�1k��|������&���{�z?r��Y����H�8�M�x�p�<[\�U��T��}�Y|����ym7��Xh��̘P����A_�/l���Ic�ś�K�ic�����=+����Dz�7�7� -�%�ex�Cѹ�mv�ժ_pj�W�5��������&�ϱ��٤����30?Z�4[�����n����ܗo(�Clfj +������>�S��NXm��͆�䏢}K��F�����#d�wX��\F��`6�*� re�5Y��Ȉi��u?yN\V�9�p�����%(��~P�NGV��o����e'�&�iAZ�~��_��!ٿ33'�!�'�j�%�:pP[�ɤ�NM$�t�:�C#�KI��e�b�8�*�����9�� +Ií6}x���aC|Ӡ=.n�[SѓU(�a��Qw����64�]14q������h���SrF;�v�sS�*��ʔ��-��4|u���qWZQJ��QJ4I�-ɣ�{�M�>����(bx08/zJ^������um'}�ki!�h� ~�ï��1���6�/�]}[)7�i��\����np�v0b��an�:�x��v��D���H�/�B��}9�rKn�6��Mp�����&d� +�9�H5х�R����j��4��=�\p�W�l:�.N�$7[~Fg8�;?${�%3�u�\���av��6i�o��Y�x'�Xx�ݰ��Q��c��GaO�����EA��h��h�����O ax0�������ksY5+Oϸ=�8q��ح/J[���Y��ei�̱z H�Y��q�z��{�~#��}�M˸��'�ʶ�@�F��z��j𨫋u%y�чJ��r�أ6�J(IA���Z��0���Cy:m�Z�X��no���BX�
�*�? +ע�
�*c�Km��쬭�_W;u��bvOz��>�^iQ�v�|4]���<��gip1� ��
{�'�7�T�����;|��Bȿ�
��� +�T�:Uv�L�Y�Yeyy������Y+ka�%��;�z�M�)��>�h:ZU�1y(w�����
�_!K������^����\x�{��?uB5�#=p熱���Dˢ
e:��u��ف��ى���ġj���n���V��0M�����E���Pc��V�WE�\��}Ա��m�N>��Ja��!��A�w������*N��$�n\K�������>+���g��J׃W�Y,o�:�C�9��.�0��o�6e�w�����El�^�le�.�Á�z͝Md��u�:�!�N��囩� 4{[�����@l#Sc�X�v��h<Q�5��-,g��+�� +6�Bc�#�n���g��W�W�M������.��=�@<�<9���IW�8G�W�/��w�dd�Y�}{H�{oS=��R��,|D6,~��s c�����P҄��Qd(6�,˲�z�j)M�Ϊ�zc��?��uu��#�z��ѩ�_�J��bߦ�ߑS==��ܾnK]kh1W�� �P����x���>p���� +endstream +endobj +421 0 obj +<</Length 12/Filter/FlateDecode>> +stream +x����� +endstream +endobj +422 0 obj +<</Length 463/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�m�Mo�0����ك����@mEjH�8�CM�{&�$�l˘C���'�V{ +�ׯ�I�j1
���Dy��K0V����U�Kk�8O�1���W� +endstream +endobj +423 0 obj +<</Length 3652/Filter/FlateDecode/Subtype/CIDFontType0C>> +stream +x���{XW��q *W�YuFgl_��}m�j�ꪈ�w��"��@�%�I&��r�@H��&wP�x�^i��n�־]}���'�q���j�����3s�yf��~?��9L�ĉ&�9}sr<7K��!����J�-� <����Џ�gB1��P6��ϯ�!�����f��-�f3����f0�ӧ�f0��C�t���
�@蛌 &3��)"��ݐ��&s#���Yɇ��s^���h��w-��+�;���l��p�s"D�$~V�Bc��@�.�j���a�5W�3�V�ȋ�?��h�}69�Ǔ�N2�N�<4���`2Ƭ��^3��r3]�� c� +||c�9aÄ� �A�����h��C���!�\g�Y�&Oʝ̞<:�"t��_U�+�N��e8���I���� �D?��mO��;��8`%����z�?� �����gc�S[Ns��x�^M��FUN���l�/��1g�� ��M:���Z���}_��&��D +�9"� �/uv����M��2%�J)MŎ�:��{n�+�6�(<����XX��Nx���R�d���1���� +R��
��Y�06��� +�Q�,9��Aџ(�����`�3�R09a�50,~t�`�W���S��irTY��Pi�u�;�N���٦#���L���4|?����v��!0勎�#��I�+��4N`$����W"9YɅ���f�b8t�U�r�����FWh����E8�S� +�DI79�]z��>�����=XNp���o�R��]��طc��Z��O��m8���5���<{��҃�g��ӌ�1��`����*}�l�� �bUT����|Y�E/+�}�^�Њ��h��j>�ǹ�bH���� �"iCoo��lvPj�Md�(IY�q8�a�(��ؑ�qP+8��vr����G�k�`qH���J��{�O���J���F��� ����ST�ʨ�`�:�eW��<���� }p�<���Ρg����]%����S':����!Nx̎u�h*y�����n�ޓ$��(#g�^����߆y`� ' ���gR�Ӥ:�*��R�<���R<���G{į��]UЫ����U�̧�W2�y�L����"1x��n�����C�.�����> +-��&� +�_WX���@E��"A������r7~��i6��r�7�-��S�8�ThJ���J�T +TI��T�n�dL�*�UjwQ��g(�6�։�x|�ՙ��})ykc�}��{Щ<�/F��p�5�Qa��U���&w9�rRJ+OSXT���\{5q +�i�b���9����j�������f�Z�R�l�l��F*��'�h�� +o6�Z���>�P�%$.��� +�� +g夥t+�N�x|gG��q�Lc|�A +��5z5����tk�nm���3`&���LZ#&1�V{��n��/�ϫGo��<ݍ��Z{}���w{y��L,��s��|�ݎ$�sQA��^�_=����ӎ^w���ًb?4j� �o�м
��$)�P*o�)۷E'��
a'���ں�r/�����c4�ٝ9%h��]����{K�Yp}y����a����w/����J,�9p��38b&yMa�_��C���*IJT��9ոK)�P�R�'�ʾ~���Ո��e6oͭ�`]Л�f�]���:7(����G||��_�!; +^dGYa
��B/� �����f�K��;n��c��]��Ȝ�'۠I@�e��5���#"v�KK�v�O[.Y�����W�t*�+'���bz����C�n�ɦ'�뀰�k`�i� +endstream +endobj +424 0 obj +<</Length 11/Filter/FlateDecode>> +stream +x��� +endstream +endobj +425 0 obj +<</Length 633/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�m�Io�0���Ӄ�䐚��$$���qОq� +�)A���� �����qf8��L�mn]��7���wک��f��4]��t`?�0;v��pO]����X/�4]��kr|��_��I=h1
c{H��������@��������4���д��t��+��!������[��i�x�K'�}m�5�(*�ևm�7�a����Z��rS'�DD�w�7���*�&�;D^{�}��tu2�-���IRq����g�e{`� �yU(I_�>����ϭ;
�u�x�5�[���A)���PUU5��e���϶��zNJ�v���ȡ,�*���uT���JAݢNC�A���d�'�jUA-�O�����C?��A
��h�+��g��W�A ��_)u�+$S�$S��K�9�k0�
�sӁф-�c F
��)*��]�8
8
8K�9�%�pb��N�Ns���s�Nw�9�F#��I�V�GF}~�s5`�Ad�h�̂Ϣ�b�V�Q�2(|
|^,�1�_�|��)�IX�e`��+ř|���1S�o5�ф�FF���S�a���=:��������g �����]��.Tſ� ��֠^���~u� +endstream +endobj +426 0 obj +<</Length 6832/Filter/FlateDecode/Subtype/CIDFontType0C>> +stream +x��Y x��nY�2�3��."��\�MV�)�R��/I�$m��dm��Mi隮)�;X@PQvIJ/*"�O����O +]������&�9_�w����gX^#Fx�X,�"C�#��ք�G���:$,)r[��n���v4�~f�9ҋ�jᅫ�=�M�<�Cܽ�y��˫{�3^^���?�����'x.�<�9Ͽ��'z�Y,�`�������!щ�)�bbS�#���
��2��)�M�<�qk�C�
�5ne|�����qs��c�&yy=���%������ k}n����l<r$����G��G5���g���G��byyyy���� F�e<�������k�g�e^WYKX� ~$��"�4�����ϱpg���y���?�ޣ #Ǐ������Ǣ�UP9F8�,}|�7���w/��K��(|R�'�{R��O=y�ן��Y��<v��:�5\K�$>~:��g.��ɯ���"��������mK��~����V�Y~O�=�暈0�0�9���n���|�T0�ǹg�M�W�f��7�4M�Ԉ�/;�b��0�l{'�B�F��m��je�Vc6i5fJ^Q�j$��\��э���V�bgP~/�Ұ���`�۹�IQL|̦o�52N>Va����#�,�_:�yvu1�X�o���XMpR�MF%��Q��� +S2�P��d]�����K���~�0$4:m���I�����8k8v��v)�+D��8�Ыk�|�!TP]G�I����(�Ua�0|����)>n)#��D�d��RJ�Z�EwX�b�}X�M�I��դB���z��q��h���L&�Ca�/�K�q�6v���%�*}/����d��L +�A�I= oY���d5^a�'|-TY�
YkD@R +y�,�����)x�fV̝>�wu�]���ȑk��I�i�
��mk��HE�Z��ɩ"��Ju�����W���!K +8:X&D>�L�<[A��"c�
I��6G��bJ )���Ջ����>��N�pW��(� +��+4�J+s5}6#��Z��Q��t +��J�r��x�e��|T3.�媦���(3\�a;��s,dcS[i3Q��L�SV�.6 +G�z�S�J�Vd�,R˸\
�E�&�Ci�1J=����Uu&����p;�qM���_�!���aKu���W �����B���c�|}BN��Q����(-��?l6��� +�1��wo�
�s��z�VO�Q۴���<�F#'U��ۉ�[�B������sp4��7���*�K\]���0Y��!!w��H�'|�|���s�;�������<3���K��#qR��O7����]�@�<�p�z�¤�2gu�$<�Lɱe8��2GI��HT@���C�w&�E������P2C�4��j(������<����".� �w��g�\�vlN<�80�Ӯ��:�mO�'��_V�c�ž��dX@�p� +�U�mց����貄���������脄hR +�-��)9����/o���n�4R�N�o��۬����9��3�����Ϻ���vx
f�{�<���������s����^Q�;���� +��Hb� +�2Lj��"rOr��0�g�0�
[��V���鰐X&n`�J���O�/|2L9 ++a�1����1��K�& +���-��=���ItTԶ���Qɢ3��A�>�x�6�1b|�;t�}�������C*{t�S�������:�v�L�d +:�c��X�^l֊���b�~x���Ş����>�6|�%
J}6#
�t�ҪX�i�z�`+����V�Y�O=X�dw�0�,�����Q&��%1gBLB%X.�S��Ԟ*��"�`�0�M + +��<�v�&�%ݦ��u�Uf�*;a2Y-9�ݤ�e�wV+ꉟ`�
xo�y+ $5&�2G +wT��缌����)*-S��9�\)0���\1(뼿��>�{�'@a<���?@ +����K���pm8��Yw�hk�40��`u������owNڼ6�?�ڶ1k�L<}���瞪/V�����mX4�dw�B^M�x=�6x��v����f�q���7Y����u�2��ņ����|�Y=��M�F:88� ��C�B�4��P +���_Ŭۗ��ғ���F�����#��2�T'���CW�'>���P�)����パ�Bo�C�6
��=c�0u� +�xB�q_@�͜�ϒh�J\���'�X8�����5w�5($: �5fDǯ%��c�X��o�7>���_��1��^N*c4�Z��!1�)H���}������X̂����Ai����Tw5�ĸ\5���Rd;_�4�Kj��ʄE�˛���U
���~�I� +�
�,����i�h;���-��h*MZD����2����{�۵�m��s���~�Z�Pj,����Z?b�_Ħm֥T*䴝/X=���(�tO~�2ID��E�}҂�ڴ����'�Se�g~���t8�}{�P��OaN+YO�c>�&�"���M�f +��g�{l���C
Q�=�����8!t�{�������z��&rr�&Ca܃h�="D���F��ini��
��N�>擕+�$���3nY�b��.��T�t���&CA� @�$�[
�O`瘸ߢr� +ŢE�����7���e�
>���Z�ߋ�)L�:�ھ��ڟ9 &�WU� +��k�������\
|��2m�.�F�t6�f�ҕv�o]Z��U�t�l�{C�e���ۛ�����,�鈛UH�����������ht4�SG ���T.�8�4�C(�FCS�-2?�?_e��v;v��}�gD�����'��J3{�.��q5��݃d9���L�8ݧ�,;ˆOS��sX�K5Z�6b]���:�AfQ���KM�D�>!�B}�i��Z�.�����l���[D�����{��9gf_��װ#���BQq�����4GcҘI�Ƭ����N5�Ŀ�4�o� +r�\v����W��]- ��-���z��V3u2
~jj|�p;�5�oq�����7��KbG{���`���w��bo8y�'a���
��,/I'3S�EDrr�8�r��ǵo��֢�hD@h�<�*�Uc������Z(�l�Q����P��U�#B�t�p*�pJ�5�#=�Ey"�;܄�e_��s!F8
ڸ��f]��qvp�J�RE}0����ѳ�t�)�����C����e\L{s];܍����//��nU��zZ�����\8#�}�L�ջ;�Y�W!�*�e³�� �>��փT}ܶj_����H�q��TLe]F3ap_(�v�&��=�㯫?�XONOژ�BL��{W�>��F=Xݻ�,�r�5�G��>)lu�-ݰj�qGWX��%�N�!;%6|}��" �'˴� �(9-�R�!u�,� +�g��Tj��Ш�9j +[����h���Zc��L�l>�,��d� +I�j�@��<�(+s
�S����~>V����q!�^G�7e����c�0_Hr���������İ�e{�z�:��p2,�|H��)ZPJ�56�����([ҿ���u4�&����l:�@9ܨ�����i<�8 ���<��Ry������L]��?O��=��2 +:(���wY��EO���ħwѕu�g�]�ؚDZ���V��|��z���}wp���S=3"��И
�L�YNZe��$B*�D7d;��k���ʓ� +�7�j���|��)V�XK�?|���Ţ;���k��&:x�Ff��h��44t�m� ����=)En^�^�]���3�=b{$�y��H}�.��lR�"[�Mbg2STjI�dG�e�o��|&}���U8M�B +kݙkЉ��aI�!=�ΠT^ +�̔���X:�X��nx�ݧ�QXku�$��T�L_�R��U�{FG�p��?�1�}���TG���e)%�b%�Z�+��������9����EPح��-u3��8�DD-�> ��ܿ�$9=s�ںa��ِy���iR���{��Z����n�����¬0:X�!�u4��TL�s������x%�XĻ�N�0%��8�P��=I7�[��K�=����Uܙ��{�x��2u=Kza�参C˨��� ;�7,��[��s�FX�_�رD�!/��/���RR +endstream +endobj +427 0 obj +<</Length 13/Filter/FlateDecode>> +stream +x���� +� +endstream +endobj +428 0 obj +<</Length 714/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�m�Ko�0����E�v�!~%mU!�P$}�T3k&Rq�<���}����}~�:&�w퇿�?��v�k�x�vY�/�z:�0>{�;Y�[��m=�Q,��uh�,�ס���?��������k��4��!���f����D�I��c3Eq���/�Mn����1�E{��
ٌ5��o�Ů �g%��fR ��#U���.o����k����:z +!����a��"5v)�����;�7a/.N�~3n�����IQ��>��;���ۃ3���RȯG���3���S�NB�źu~趵�aﳻ�(���[�V�y�����"�cW����]��]Q;OJ%U]C�J�����[@����*��kxVP7���� +�x>B-`c�9Y�1)Ÿ�q +����'�4�5��4f����| +�N��"�:� >�>��13���L���Cu��������Y�?�OC>���C/�|ؑ���x>Ad�?vF>����c�ȧ�D�6�)[`�6�)+1O��a���D|�Y���t��Z���7h=��c���u��&���ߵ]�J���q���e� ��: +endstream +endobj +429 0 obj +<</Length 13125/Filter/FlateDecode>> +stream +x�ݼ xT��0�;۽�e��d&�u��0 1d'�@0C �����,��@@���5�h�� +E�ai@*�R$Q����h��6����{ν�pi������y���9sﹿ�۷s +{ +�G/Iv +n +��"8RчHPiS�F)�m��f�-;;
�K�m��+����-ۚ��n�=$#�O�Ì<1`U #�&'#O�$�b���/�(�{�~��b���]#}b��} +�:Iz����/'&�l�L��?>���;��[����0H�*�N(Pv"��(U�&Rl3�T��7���ަ��+ʵ+��N,��!N��F +i�9�gX��{�l��5����!��gln�����<��Q����\@0��E:�]�(����!���F�Ԓ�M�Z}
�sE��L�'8]�t)�6��Y��P��+VU��@BB���L7}��e�oF>5u���<}����f%�m_9|$�E�h!���snd!?���gxk�=�W�4���+� +�|��l$`%��&�I� I��)-�m�B���Z +t|^�Xc �XS!e(�V�� �g
��he��6i�n�X3����']����}�N>�n�>dE�=��q�N�p����?h���8���_${x��^�k2סS�d��f� ����5���*�5;;�۵���q�w\�š�'ו����o̮CW7�߰eˆ��v���c'�W�W���t��>lm���W�� +z(�E�#,�R�� ��c�����VH5�Y�WJ�iK�h)=#^c:���8'�p��W��K�<�?"B�8� �Bi��J%��57�fX���D��?u��k��Aߺ�Hߺ�"�z�N���`��@6
�Q=cTr�:�9)��d�$�&�S��a�#�4�LF�^�Er�)ojf֞#
J���Y�^LPfQ�D�QO����p8��a,Ra7F�� %�8� %�]/S6�ò�l9C�c�����L�u�� Ɖ��x.�M�y�Y�e�������$�!G�hƢ
цD�������P�D�<<��V��d]Ma�0�6�NAS�H�C#�:U��ݧ�^<x�N�/�yMd��z<�c�&�z +��l�ʘ�QU=D�Bi�� ��P�q�=J{[���ʛ/��S��ٶl�-;�����N���zT��
���!�������p�nY^fV@W�2{��2�D4S�.��<��G<�:|���k~���~�6l�z��G�+O���-����k��<���'�6��ӻ1>~̘�m�<��� +2�I� +v���,��IA�.b�r%�&T�ቕ�P�b3�3~�H���n +������93��)�|uQ�h��WDo@��jғ*���Qgi��6ېP�$�w�����y�z ��f��MZ�b������ْ���F�H���c����5?=a�V��BP��ӵtؠޗ�4�tۈ�&Q�Z�6�)N��ê��,N�9(O ��J>e5��*� ��Mg+4��@�V��ꅲ�m?ٗ���۾6QF�Se��uV�-�g����Zm�S` +�d,�Q"�!HT�dR�[&?Yv��!|�)4
9�J+����m��L��O��O�}+�f�V �3b�� +�t!�T�a���~?J���a�*����
P��� +�7:ڕ�Zr�h6�֊^�gi���Z�ӥO\D�9�.gǦ�T�"X�a<Z +�Y�G��,�'��dLd���2'�ݜ�R����'�Z���y������_�Vi]C��r}2���~����f�zB���S�II�rѲ�������;� +��p�dRZr�:!0D,Ւ���3����m|p�4�c�`< +.}�]��4�QY������T�Dd��ꯪ~�s+�^��0�u�7XJǹ'ׯ߶�������s��'�d� �B__d�ҡCDi6� 'u�lF�c��`֑��hI����j(vIs����S�ڋ��_M���h'�W߬:ua�*�w�5�n�u�`� >��"}mh��6�,.kvA��-T6-{
$�N�c ቯBd%�mgM���'<춘��.�k�7�aP~?<�<�7�M 럓�?l�r�_��+������i�բ��Z!"a���^'��%�0/�$O�� �Q���m2Rf
�K�@�i&��tjM�\��(�<�ZE�g�:Lm-m�l�{ۡu�7.���d$�eUE'u�_�p�ٿ�r�+gQ�u$=��=�X���{�^^�V<3�c3k���'��Wݰv3`->�xu�'��w�>�[b(� +��Q�U
EYX~?���y�� +�2�2>����`څw�]t�%�w�v�wv��~��'��~�_�/�����7�7���8>N����t\>�;�?n8n,�)dK���A�A�A݃z��O�1MAj.�%����U���76�ő}����w�����[��|������J���Y}�F���/�����>(����Z�(mB�D��ص�bߜ��V�y�hD����< F��!�I�Lp�d1�0+~��=�$.�Q�9tF:=r��8Ԡ�?� �=�W��v�c#��M��g��;Q�q��Ũ�� &��8�
�̴>���H0�G*j��ş�"���d���Kt�K�8E�LW�5���9���jlf�0�c锂���B��u���}!�OH43d
+����>.�(k)A���(9;��7./A�v�����o��̋�Ғ)sΣ_�ESǗ�<��Xr�K��a�F���_5�5s��!1����On���^��h��R�}q#�-�EQ �z�M5�LE� F�����D)��Z�Z��C�st3k B}Bl� b���7ӳSճ
�_A��O�_D��֎��W�$���JVPH�31�}2C��"�P�� (��Ghj�(�_�>u�z��8$� +���W�_����b�궿�|dg �#���o�ƹE#�/Q4wc�ߒ���#7�C=Ԗ�w�5r���#�ol��HJJ;�ac#�-�7���Fm<����4w���Q�4�{����9r�����S��*n8ܨ�M�4�����T��3 +QH��J��ů�6�}�����Mq���2y��r>@%u���6�'vh��Pqɐ�7)-�[,�< +4�[bg� +�>R�-3����Ίt�P��nc�y�����o��]G������˨��/�˼���P!��A�D��F�����m< +7IQ@��2�?Q�Xk$)�7�� ܴO��t���a����@ŷ���KP�{%����R+�F���y�%��c�.S\X�W�_jS���[E�U��Tx�=����fU�92{�2bl"_�����n۶væ���>6��锆���Ϗ����]�$�9�gϑ?����x����G���Fz����|I4t�۫���|����=5��h���+���ڶ�W۶�v۶駶��?�m�m�������z�6SŶz�Adډ���5L��i���/����%��8S&�G2i?�_�O����4ơI��L������}�q�i��Դ�,�+�ˌ�)еO�>�����Or���Y���$��m��H��� ��|���՞o�/����d��8v2J������;���twk��M*��ظ~�����o��Iu��\��Çq�h��~�Aǖ�Q���o���]WcK��TH6�h�E� ;�A2��q& ];� ;�6�'N�L�X�n����'���l�x�/>�����N}� jn�&�oI|'\Y���Q��f4+-~u��3t��v,{��2{c4Y�Y�~�:���s>���}�^�x �ڹ�|F�s�>�Ϋ���JL;\/�V���ʉΆ��#��T����0�.�����|?��+֗�G� +�J�De�Ťx�KJ��t�H!"
� X�T,O��'���e�]��6��˿�8�Ƿ��b�?���Vܶ�C�J�'���CP�)}e��Q�onT����u{ +�@��aU���4��Π SR/��(���g����Ҳ�A^�I/!&[҂B!���i��X���Uc����'�%�6�hV�;�g��M�u=m�]��ls�U>jk�7+�jɠ��Մ0Г{���+�-�5���-�n;R�9!���!2|�'^�\����#��Z'h��,�A��q�6���h�y��/�T������� +��ʟ��_�����ɽ"< +��8�VSS �?����� +��77U2tː�B�/�{�����N�}-�iqi�xj�kϙ�=hɹ�Z�p�d����7�t ֤Ge���|A.�Q">��r�Κ�h����P +�a��S�l�6���A�8)(N�A�SpV�f��S�VB +��u�ʠN�+P +��e��(���\���$8
G`T��P
�a6C����Є��P��h�/T`�f3j@�a3p��1���[m8��Š�8o ��~���x~�D�yT�94�.�{��LbE�v�}/-�ޑ��^�l�^�۩{_���пjl�b8d1�5��?6��ƙ�APl�"so�b�AK�e�冲P�b5Y��c�����������\��=�>Ծ����[��Q�X�x�q���}Ǘ!��!�B�t��c$�|� +Xsa��R���0 �!R!b`��ȃ����RX�`:�A/��BX3!b` ,�c�`-Q�͂%0�2�%��`L��P10Ja:,�9�������b`T�X +E@ ��!ʡ��xu�%0W�.(K�Ⱥ��Χ;���l��F�� +H�%P�f�,���*uɰf�R(����N�����࠘5f�(�吠���N +�~te�s�!���5H�����ohb̿�yn��B�⊐���b�1P��-.���*�2�m�`���f蚣�"�,�pf�wgu��IX�&q)��.T�_�sm�r�K�9Zf8� s��ŝ:>f���`Q +����IG�_n����.�R�ʏ�ѫ����Ĩ�5{�`�
p�N��<՝�Ӱ��L��N��M�r�e�� +��0[��j:�A�"()W�Y�rb̂�*<mNw=^�� +�v�c �S�s\��0�U�p[�}�m���x!� +-[r��N[Y��>��s�*aۚ����S�4nh�|���S@����}��y��'�X ++T|g�^@�N��S?���Ɋ.����;=��]���+����T +yv��%V��U�o�)� +�� h�F�X�RS�����i�,�Z�n�,��4u�q%wh����1�yL�\�n����+ J~ګkR���;�v^Yҥ��vsw��w��+-W�*Q������E��O���Q7���i�3�8#��ŦN\�6,�&�ePs�c��a�Ϛ�N�E�(ń��h��Dw�k8���9�{�sI +�C!�|��e�zGU�q�G��*,
��1*l���߆C!�`��|(V�ȇ�*�Q0F�=F�(T��r�"#�~����٨�^�R?���*.��`T�U��J@ۅ�Hȇ10���<(T� ���긨ς +to�� +�c��Qm?
&�( �#�>H�!�q0�0Ȃb� +}`"�!�;8�0�B&DA(���B@�X���8�����à �`�ɠ@L�<�O�� +��D�^7� �ojjj�nlAZj`��. +V� �DN8'�������H'�:J�_E��^ž�������z���^k�c�&�k>�G��m +��
�m +�oN�r�tr�N��!m_am��5�:�E�B��\¾�!�Kȗ�����wN�� �sri>���%�}�>�A>
#�Ԑ�9�'}�`q�|PC�������������*�n?Һ��Z��N.�c`8y�@�s�N�m��s����'o��^v��789�����k������A���S����NNl5�vr�D��|�5q��cS؟��?��ǎzٱ)䘏��#��!���˜��� ��^���r����L��~N^��N�q�{i�������t�<��ʞ�I�Z���$�߭"{��o9���3��� +c�%d�o�+��F!�6������vp�=��=���8y:��Vd�5�橣������:J�ZC�|�˞�B���m����'��'��ǽ���˪�Ƕ�cv��H�*����Tn��J/�b%�9���FN6���
�������:N��Gǒ���y����*���_�"�\���4�G8Y��2N*��X��T4"�}@����t��,��Ŝ<��"N��e�5daYO�p,)�Ip2?���dn:)�A�%�9��I '3g��LNf��f��tN�q� 'S'�T3�RB&�N�dd��$#��I��L�d<'�G�����8N�r2���V�ќ���"NF�$6��G��dXa(�E +�Xa(�ʆr2d��
)!����(�%����,2(���ȠF���i�@˳��F>=�3��2����/��|f�kDk|z�kҳ\�mD>_ ���(�
�Ar8�ߓ��$ۚDzKHߴp�w8��O����$s8��z'��,��tkK�$-����Ij8II���P��a�GIR�`�d'I�X,�K��^���@��&��e��ܣa�xI��8��I<'q�
�c�|��B<��Z,,�wLs�"1I$z8qY(N"#�X$'���0�I'��8C�8�XHq��H"v����f�c6N�(�Y�b�0�J�w��Y,Ģ��d`f1k�2�Y��5"�KԤ'&�[Y�ȉA���C�N!2'Jb'�N���
�Q����$ +A��d�V������F���[�� +endstream +endobj +430 0 obj +<</Length 9/Filter/FlateDecode>> +stream +x�{ +endstream +endobj +431 0 obj +<</Length 352/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�mQ�j�0��+�ArH��%C���C4�=;��Ē����H��Rz�����̮���x�ꊋ�shUg.�}� �[ź�; r�S֮@�,:��m)�#����:��?�!�yg�j ��n����� J�� �C<'�~��B�$�ҝ�j�9K�Q��Q�j!����uI�̍(ܬ�t(>��a[�Z�r`�N�L +�!!�t��� +'�����y�* +endstream +endobj +432 0 obj +<</Length 550/Filter/FlateDecode/Subtype/CIDFontType0C>> +stream +x�%�OhA�gM���4Ő��3H=$i��J/5$Rh#بH��i�wew��E��2��$Ĉ �^z"�jO9z(=�(Eؕ
V�\����{��N�0�?�뙵�"����r�Z�4gΛa +�f��zA�ҩB����0<w�=vE +�P�p���P�$T�Lj�����(���%,"R������ <A��#�K��I� +!Oo$��VNb9�%�DJV�%)i����B|u%�ͯg�A[��J���� +��
- +endstream +endobj +433 0 obj +<</Length 10/Filter/FlateDecode>> +stream +x��� +endstream +endobj +434 0 obj +<</Length 407/Type/CMap/Filter/FlateDecode/WMode 0>> +stream +x�m�Mo� �������5��v7�"5N,��5��فI)�����i�ڃ�����w +@��DT��+���+�WP���l�����=�|sF0�Ii�r'8ƾE� +endstream +endobj +435 0 obj +<</Length 4907/Filter/FlateDecode>> +stream +x��X
pSו��;�ʖ%Y����l���ن�*�`��
1)$ؖllKX6ء4�����q�lK�7!)����n�d�
�m�di�N��Y +i�3.�t�6q��ν�I����vw���zz���|�;�{�� +��V�_�<�����b�UM`yx[�Y[�G͠�X+�a��<h,O��E���aXM��h�A<Eo��r�}��r +F��~�8���Fq��1�W��-�1V���>V�γ8V�6z�x#x +?b`O1�*�y���xW�y�8F�y~���]L0�4f���� +b��
���⣭�5v^6u(O(����{/�+�Ve��.���I�c�c�� ��6�A��:|�7!^��$U�#���Y,��畕�+X��q����gcFLI�$�^~o"�~?��UR +��Q�]��nlq�x���p�W�%�9����!���TC��ŷ��y��U�y?n�bQẆ��+5�j����uM-��[|���r�T�1at��G��v���=�|��Pފ�,�E���6��S � ӛ����,��)*JΜ_ +˹�s�)V�����*&Ô5��6����L��pP������M��AIV�0�d�_����eV��e��({��?�h��v��%5��E<Ґ�M1RH>�ڗnv؊ɑ�(�29>)8\�:n�R�rM�vG�gYEy����y�P]��];�=�2~�eh���{�wt�O?�d�R{U�@�@{���)@=e�#^�+��M<��ݱ\!z�q�X�����bT$G<ִʥ(�e�rZe麦��Z�%��-�).+s����X]���mg�Z{E{I{ç��d�<��iw]�UIخ5�.����X��w�#UI�/���d���S����q��]�̸�`b�ԛٷpA����|GZ��1�rZ&όO�_��*+++u��T�u�j��$�fM�4>��bVQ�_�q�Y�Y��3�e�T���-X`�f�����1�^��7��g���kz���Oj��|'��Bw�`C�rt��c?}��X���k67�ڸ���?�w*������-���E�G +RU{��GT�s��U���TV�ԡ�w)���.:�]����=9Ύ�{g��������B`�2�J�`�Eu��ʢc��q��#�%q +_����u��וLeX�9-��7�%) X?LP`�W0��X>8D���@`��ˀq����Ƶ�X�ڸ&,�o�ku�5G:��&���u,rY�q�,d\'����u��a5�a}�B'�юEpR��N�aN܊.�#�~���V��NԢ�(�U�F7�h�b��7?����ňC5�Vl� +�;��U�hCPV��̬E� +\_ ��!pE��g͍��
k��u�+���H�:?;�t5�J�z�x +d�^��������ibя!ɷCV�]<K����E��Bs��#Mpy���3�F��u��KX��@��6�X+��4�P���қ�q�oF
��L�Qs� �O3k�oV� Oo���Lfۛ�ˍ8�*�JK���z����gn�N8���}3���N0���Gz��sop.�F���B̏���3�M�;us���~6E��l�������1(uֳ�!��SL�~q�DV̌����;F�Q��ϰ�QعY���ݨ���9k�¹7�Wrg���g�F����ӻ.��D��=q.���\D��;�*�d�\������E��x��NKWQ��Q�nC����h�v6`
�q��(�j�'Ј
،ZT��2.UrD����xj%�l�X:F#�$�8%��T��u�E=����H5h���(�ףu��6���Q�M���ke7�۫��)毗\t���0��lV�)�l=jЈո����x����F^�Gy�1�VI���\�M�����MhD6�I�)��
��҇5h4|���H�Vc�E�X���,YK��L�Y�#"�^Z]'���6Q��(�9@��y�7G-7I��P'��6I5���(n$w�J�[Wc��O� +1&Tz�Eg6Έ��i���`.�O�"M7�$�6;:7ʎ��%�&�����Ѐ��H�=k���
muL=������D|�ed7b�1CǛ녾C�i/�T�W��l:�Qp���,��zU��L�,��[D�c"J:s}��6"q�d�gd����7��"�>M�б"�gGP�)t�ꕤ�S�굫��s-|��=�{��Jg���3j��N@��k�ܞ9����Y?���yf�p7:�"OɅs��H���n��hf��}����]�~~�������!��"���2�y/,��鶮���K1O����7;��>! +.B#��G^�ߒ�U�s��{�<�>|�D|�$��ݰ<EE/�%�d���}>��D(����3'���'�V\ׇ +
:g0�wz�!� +a3�/�}�D�](���A�.<��9��
_����;�_|g�� +ud��> +�So�iޫQO�6�s�z���]n����Ν����w��.�<�Ύl����wd��B>��5jӨum��.m���o���v��C[�l|��Ztl��6{h�F�M��BM�Ը���ic��otP��6hT����i���4Z����)��a�M��&h���G5�)�fU���t�J��yh��Vޒ�Wjt�g��-I��xZQ��WS�g�yeU�W?O��˗����iY��/K���t^�����<����Y��=>ZZd�Kө�$����T�N�E6^�ME�V^d��1��5��K�y�� +�x���I|I2-c�x��bS_�D���~��u�0�����t^�O��t�^G����tʳS�<;����Y�]�� w�SN���dRv��gk4�����<;ee��,;e��aV33�<3�2uN��<�J��j���֑6����d_N),��L��CV��['��x(9��'�$�xR%�&��lJ�O� ��Lq��ؘ�L���1�8�@1�C�j�fn�#��>�r3�1o��)���II$g��1�;x�-���_������x +endstream +endobj +436 0 obj +<</Length 22148/Filter/FlateDecode>> +stream +x���[��6���_�-�E_�+���=�؞q�x��>���UgJ�{J�ޚ�3���'xD2I�c���"�e2��@�/����O������t��?}���w�7q�7���������oފ���?��(�8×��������~��'@K�&n�Ex��������x�������7#���7�����/���/�����?���� PH@R:ys�J4lPJk�e Ix'��� +��)� +�#Ɂp��8'y�.z��L����m�x?��%�Lj���[ �z�a��Z�2θg�9#�S����i���x���) +����P���kv��� +����WjR]%��oR�d?�V,iP[A�u��M�y����l�Ea�!T�I%�[p
v��V�7���~�it=�����!�b������R�3���N*a�=���u�ݣԅ&m�k��H�&A�6c;��Ah!֩��Z�\�䥺��O
���Kq}Rŕ���p��T/r@k���Z�Qw)��Һ�;i?�Ɇ�Jp��`@�G+NJ�Ο�\� M�3����?O�/�z�|��'���������%���1hu��%n�C/�f�%@g���j�+�4�F�.WqS�$�y!r��M��?�C����x�*>w�_�![#u�������(�QY6���r +Z|1��!6��Efr��b�/�R�cɼ���7r�`����~IQ�z�|�[0n�����,�7��:Knܿb�o���� �,��HrDӟ��I&u��b̰�����R��ju�-�Qz�W��pߏ��w#E6�q�����Exnj��4x�+%�4�t�gK�1�߷� +����*�7�5+Z���o�dnlR�-L��|�*���.�}="5xkF� +��q�=Y����*�GPr<�ʵc^2� +*��r܊�K�ZԹ�y�ނ�=_G���)�Fy������z���:��Wb"�INR +Ph��?��D���H~f���Q�}fb���*�x8O��Z�p$_�L7d�,��b�{=�:K�ʓ��W��m�^
k��6����
_�ŦM%�0��[��0�/BU�Y�UT�Y�`�d)Wc�b-B����!�!Z�����ɩ�B(1n�<�//��r+��b'���?b��)�ѻN�
��`+[T
� l�7����ٞ��,�1�M +s�.B��/��H�-�ɷ�Ƶ_�8�n�������W�1S�1�~߲]����7�ڄ˅����G�^�uS@{dX<�uV�C�����ʞ� +b
�=R�֢l +z7�x����`��s��`����z�� �u�t�$ΘΎڽײ+@vf�;��s��/�yЦO�����(��$p�%�=}��Ǡ��}��+ +��>�l��\1����'��+�@�;�L��[x7c�.EqYQ��(��@&c�wG�Ķ�]��YQ�~���y�rR���|^J�F�/�*Gd7��I�ҩԩ"�t�'ש�o�4�����5LC +����I� +����0��+�t�K;N����Ǟ\s�[G�R��a�I=`�rq��K[���I�^���ձ����^n$�i^ȳ�gۀ���J +�^�࣡�K< +w�"���Z�T0�]�դ�n6E!�O[.(̫��}�;���<t�m@_����ݿt����/e�5v�3��� Ö�����@1�0�l]J�V�]Z֦ۢ��w�>g���Qm�Ҩ�`�B�� v)T���Ҩ�����v`�.ujQ�����NHi�3�Sځ�H���jЗ>5s�" i����?=��K\y�.U��UA@JL��W�L�Tf��o��]��2h*ђ2ؠ�t�k�·YŬ�h^xjV�&m[� +��n���υ��k۠�C�<�3Rq7B}�sDv�����4ŵ�y��Ϯ*J2@��KW|g���R��ݥ).j����Hp�w�������f}�C�kP�[�+WSy��ێ���mؙ�g��{��x)`[��A䥀��N Қ�H�ԯ�Ȃ���h�.��^�%Ы��R�*����E���A���L:��i����ϒw�S�$�]�T�$�K���r�.}��<�K�:u�6kSkcȑ+�@jk�rrr����}��d��z��S���S�c'PR�#���Ns��@��Ƈ��yp��6m��fBq�A���1�mP_*�<~�`�xx�/-y^J��+��$)���?�2#q������"����&J�~EUow[��1m]klCd@h��=��$�2�o�|�{���t���6�T8�[ +���>��v����[�s�Z{)<��9!i���DJ>Th~^�&уs[�|��TH,�a����� +�)�ڀ�W7@ħ��c��΄����( �2϶e�<���>[I�ʁ5���<{Ҕ�@��e��K�� +�j +�.�l�8���E�0#�g�h�t���CSM�/�� +��T�;X�R�%�\Zգ��Ru�.�jQ���6�����O/��V�A��)"��aR̿�}�y�v'�Ú}~:�v�/-o��ԼgW�$x�Vx�y�Pf�H(K��+�a+�.MoQӛ�I�c�:,>��L*
��v5ǤT�g�\m�ҭV��K�zz�J 9��K�Z�2R�|h��R��T+��4I͐r�hs'Z�{��ƀ��Oq=P�_��?/pB�V����n=ʗ7R��\�%ʍ.���i�|J��$����㓳I�����w'X�x&�� ��g��(��&}I�g����V���3�l���6�^p��]�x� +I�PZ䎽��x�d�d�[2Y�-VX��i����T�m��2� +��]���\YK�N�t��e�<��B�w�2�͕3��rc�7Ƥ�e�� ވ��ZY�V�;�c��ֺ�"Y����#���>���
�dz^{i`��݂��3.
�0
,��K{v�;v�'�R��`��0�*`��x�.�kQ����J��S��WR���[|Ͻ��t�-NZ�2I]hC���.�?�'���f�a�S>s*FߧҴ�_e�p��_$(����m~�)�*k���q�+��|� +oEޥ�-�u��Qܿ�[�h'�TWk��=^�-ʋ
������-UGO�͛�����pY�9��������;�n�GC����e�!kys��<=�{Y��)�U�Uƻ����<r�+^I�F�Wҵ��jnt����C�K�C�<O�ZI�(v���@��k{K��_)����l'9ƫ=,5�|�g +�ו���ؙ� +��{6�h�C8q�[\�q0�t���:��03=���>M%���!����i=���&��ǵ̅E��=�� &�!�C#����e(�6 ���%�N�)$x�,�
������<w��x�Kk�i�9�� +���W昳�T��Y�>�x`1�w�ѯrĞ�t#��/WfzM���i��z��R���Q��P��@�A�~w�z���)1�/+7}��T%��U�� �*��T3 �Ү���/cI�9���� +�¤'�(����(R!>{ߌG��F��/����܀�8z�j��� +7 �2h����X.;w�xd�c�5�U��g�בj7j��Q�����7�,�xb�IX������n2l��|,��̂x:Ƣ4X���f,�i�m[�Rq+(4��-2��]̌[L�G��>��g���zJk�r���W�]�tu�儠2Z���~Wz�_���r�s�:�� +&*洒�r3�6�(�k�e�L��u_��$h2N#Hc�c'8��,���ޖ� +WQ�MIn�C�0B^��#W���� +N��M7w��e���-oz;_S�6m�xG��"�-f���u}�>&�����7��f#�ƈw8�Y�p +>NA�ԩ�H�9��^~*�B쬲y�r$�}VZ�V)�"�q+���nd�yc��1�Q>J<��Oɠ�`�ʟ��D4\m�tNbPnn㹮���v$>�.c陀57��1���ڸB�ٛe�����4�9CȪ���r�[ K3P��ׁB(1��T����SΓt�e���?��T�B/A)4�)')߁��Iʎ�U���� 5;�XQ�0E��j/%��m���w�r�K���J��y.��
��nN�ߤ6�*2�[ +�s�{Z2u�@�켴�D:�0��CۘF�-N�� b�}��0�}�!|R2��������;p�J�~n&HaA��6���PM�L�X�i���d:k^b�,k*煇ln]����\*/�j���`H�m��I�7r45��\쁊]K�����"yӹ�a��,�ҋ�$i�`�v!��k����=��E���R���Y��s +X�³�����{<[G�)�l���F �#i~`� �\�7��,M"�����+�����=iR�@O�j���S�`�2U5o`T9Xp�k������8㵄�=�8 ��`9yN+�����:�`�p����@���=�4l`����e4���+�\��v��\��9Q��!�|{�m��̴�;��X��Z�b���$��bj#�ޥ�o,Rm;�� l����UFw~N��V��?�4��
��R+0p3ݦ��Nj��|;�dq�B
���,xe�>UǺJ�fl��A[U���"u�^ޑ�)͢���%d�)��u�
��f�ȼi�i?9XA���FA}� +9^�{7���`�d�*(�%%l;ʹ��A��C9]�sfj#���;-f<2����LmS��z�}H�������0H�a�L�+Ϭ%�R�"�-�ˢ�6�ͤ ������j �� V����֮TqU�O�Ea����FHT�y�,�-���@�\�����=�e�#���j�rL9�ߡ�ςЂ|% +�Ʀ���2K�5HE�< �t�U�@Zˮ���8������jp|ƃ^���\Sh,uAް������נ�4a�dy����C7o�,�j��N�A�1�9� +č�>�W��)�[K�Z��]��㰤�J�3w���b��/jKi��QM�SGSp��:زI|� ���T%[�v\+�j����zn��d�r:~�`9g����6��WO:Z�L���?��Ï_�ˇ�y�ہC����hi���6��7m��>��2�Q��im����O��i�SR����j'�*1��cc< �l����R�&e���0cJ��SG�0%!O��2�Ӽ(쫺��TP���y�{��^���z*(͆��dVNX��MT�]P���H��v4kϚ�f�^ᒤ�JM�=-5�HƧ*4t��I��[j^���*"�-s
|��m�?�x��klC�p����(�/Xpiq%��-_p�뻧,�;bs����8%��.��b3O���?Tnq(��]���xy\�h����t�Y�4��#�����5�?��[\"q�t����G�Z����%"�<#o�v=O�)�˝�foiHm����\��q�禕r`�����ٲ�ڀW�um��M�ۃځb���Y���ۀ!�D�v}ˮ���H����o���
3������n��tE6<H��#�E��qnTn1L$��-{n
������{^H��;����ۦ��Z����{>�9ҿ�z�%�/��������Ֆ;L6J���:Z�ww��/�-��R��
nM\x'��)-�4�,ٮ�i7M;��� ߚ��٘V���Z�(}�ݖ��T�n�@y����9�Rpi +C"5K]���mO��i��W�+�,j���cn���@0Q�unv����Aw?|�)̷g'��Oph +C�
���۶G[M��q�X����wzv�-�4d�CÏ?w�h���p�,
fh�ud�᨞�Nc�y�h��v�@?Hg�pK���'9����L��X��ӟ(�<O��k:�P� ��n����+����h�X'A �O�#�G!6�����F�6�����*��y뫂������c_��|����k��=��J5�4���B~�B����Ru�ue�1� �ȥ�T +�96r��+�n�\{�m˄A�� +��r��]����URg�>6�--�#>�g86s,vNN���q[:��)F�?3?���-Օ����x�+���HשAv�u�d�h�:��p�<!yJZ��'���e�)��5�r��O�@ +'�5&�W�lt��*�5�����;��Ɓ�aL71{D6sXü�|Ӟ� Ԁ=N�n�����FXo�߸�;Mi�zj����"ܩ"���M7�~< +j��
j�B�Ƅ��ȼ�� +z�*��I�1~���]��4��_.KoY+��<����R$J;�3a�-�z�w��rc�y�)äb�ĪA!(k�"B��}za"�!�h�NI����OX�d%e�x��pm�s�S\��m�k)�w��*r@/�'��5���8��ƛ%��Xʕ-�+1Ӵ�2�<b_����8Ç�bG +�P���ђ�%��T���O����Z +�0���m)Ya"J�kЩ�E�5%��eK����o;yL�ufv�]�PN=4T�PN?4�b�4Fۧ +X5][! ��p=�c�v:Z +v�Z��L7�1�ȧ�r7S}��G��� r6�l�����i+�RC����6d��ռ(ʘ���(����J@�hňс1F��k�a0��[̄�"���f��ቁ��lɀ+��F�n�F���16�TDl+GD�Z)0J��v\����O���,�,6��>U�ņ����� +�1��� +���eM���\H!���H
��+&i;��AI��u�<��4hp�ȝ]�x��h�A
FZ�q��G�=qC��5�c�2�b�2ݝ�Kx��_��d0�� ����Զh�♴��m��%���9i���ti����W��0P���m�0�P �x���kǏ�Gʊ�G2����h�eVZL�˛�����_��� �=F�E������]�5h$ኛ�ʣ$�o%�����8�cvk��zn\(��Yg� �M7;K>x��'��;p��?�w� �涙�� +}.ŖjE�4�הܗP�}�mB~XԬ� \fy����<O�[7��o=���ݞ�qM��R8��V��1 �'I����M�zS�
f+���~����o�+���j]ş��� +�d��pd����+
\��Lh�z=��ve���7�=AL�ۯ���G.�c�����[<Rܸ �H�1��dzzۂ��`�7 �؋Udu�B��a�oI��C _��'u�8\��ԯ���8a�
w����W�>�#p��4q�&Y+Ӳ�dߠ�~ +���c�����T >��!>����2���C`ɚ�ʞ^�����JB:)Ǫ�z�tZSKH��=%�����as(�UJ7#� ��Ƴ�^y�Io�w/o:����-��<�J��m�:~�F�)�O�d�iM�75�V�ӌ?מo��+�kZ:����7�6�4�� ];�m��(El� +��s�i��2�M]��o����C����|�?Vt�¤+��q�t�2-�p������CmT�Q[�5�+=�i�E�wo.
$ݦ�i�����u����Ok!�_�����袥n[Hb���1�bjsj:��)�hñ��K�UI�(��Ҁ.M�1逑EO2���go�R' ���n�ܚ���b]Y����C���k�R�s#8n�}���C���w�M>��y$(�M��w��D���Ȼ��Y��CRý��cC�G�gL�_�~Y;��rnNwR^��e��<1ouq��9}��Z{�Ʂ����aXɴo]�e�������/k�R�6�۷m +0�<�a��ǁ�����1C +1��G#{�x+��h
��eJj��5�c�3�b�3�
�bzl`%���?������iѵb@��" "=�*k � +��w��լ��-�4I���Z0�B��@�0=����2�H�Ɔ�\õY6d�J�M6Z��E���N�4\��p���8������(7}RW�RY�c�
�j��%a*!�Y����R�,P�s��VsatL�-����R��G�'�&�A�Rs��ك��'�U��I'�:� �� �
gyzl8���dj��;��V��a�)���%x߅M�<c��� +E��H
�X�:I�*h}Z�a{� �VR��iB5G��Q����������^��}i2�Չ��2僇{]>xX%���n�><v2G��d;�r�2�Ү�&�% +^Xt�T.�3Dɒ��;��HϏ�@&�*� +
��[h��?S�.Eb_�F]J��F]}��WMueDK1����2 ����0\��M4I�%Ѷz��w�w.:��ɮ-�5������[V�G�w-79ٖ4��~�����V/Y�cb�:������-RQA��D��=�4Xo@w�k,vkK!-��V|�Z|�ԙW9Hi5j��9����T�Q?;�${�|��m��4�n�i�L�Ƚ�3E�m��{p��š���k�k��泀�p?x!?X�U��d?`р�$� +�Ĺ��6@�1��u@=�o��ǰ�ׁ���:�ôZ��>e��C�v.��q��8��l��g��-���ܥg�.=z���K=HNJ��1K,8�я��S�oX��*=z��a�/7�{#�$>
��fCW�\q����UX�2���-�Ҧ:�7�D^�?�����ٲs�3�w�ݢÅ�D�Q����vYK��{^H������ +�x�j>mj�(���jk���H"W�D����Qs�m+���<�t�D��D%8ϕD$j����G +��dbH��)�,�̋.�A��� ���4�SEaMEP��JI�DP3�A�k"�t�QM5�ۧ��r��T��BJ3�%�Z��+�bT@��]��Pa�@�di +i�K4rl�L2���IˤJ�������y�P�e,$`��]k
��B,�ƮOb�t̕�Or�9����Y�A�}F�T +;]�EGbh��vZhI�V8�'�Jc�#!t6Ҫ�m���;e��@���*rQwȰh!�JP���&�&�h��G���AG�g���V��bg(9T5C���2$��w��l(�~�ާ�L�Q6I�?�O?N8��0�a��BĆX���E.W�]�K@sZ��t��4�U�����Q�ށQ�5�p\�� +�y Vk0����O,@��yR�zU����Hh�1|�U`=�m���p�ׁ���:�ó^�CXVKP���k@�v�k�TA(˸}� Z̝�JZP������{"'�������?�S���H�~ʙX2�T��w�d�M-h�����Z���֜����q��s8�8D;,���S��-���7wm)ŮW���#n�"5�XYקI��Byjj�sǡҚ��uv_aכd����*�'Lk�S4Ih��ΗhzX4U�W)�:_2ɪ�Ay +�UյW�%�5�t6�TU,5F۶~�����9��ܾ��m-uU*�7�e+�0��/�������>�T��%��S�jrJH �>,�89ejr*���kkr���)W�S�����Tc�m*K��?���8��d��<5 X��Fr���ץ|J~� �n:�+�w��)L��O�Q�O�҅)Ó�I�<����N�!ˍ�R��� +��#9�y +G-��Q;,��D����$:q�t���4/+��<��F���g�#�UIT�s��5�L��ITI�Ҿ��5짙
�v�'�@//��I>� G���}�ֹ�㐀y��%94���T�rx����#7���8�A���g�/�yn��0R8�P��?PB�M*�B&^��Ýi�<J�z��r�K6=(� +c�#٤
�3�|�T4ɦ�SXla�p$��aq�l*��d����&@�Gܦ����}�>}
SΓeS5���-獵O��us��m⩚�,Kʝ/��y1��p�j"D;,�@E<FO��t�&G�9���vc�I�f=�8�;p�:FfG⩴�m��duL�T,��eI]i��Ra�p$�Ђ3Z�o*���R�9������k�R-��|�US�#N�N���-)��)z%(�L�+���Ri�H�Y�6�l��8�wZ�F]گ�e�ʩj^�t`�郜ua q$�b0Oa���đ�j�����ky����?{�Y �s�� +�#~[��c�Ō��0�̿�#�:�s��M�-�E�R)?��WR��R��
݀ü +� +�p(1ޟl��Vg�����oN +���I���:Q)�|��Ҏ�ML-\WȧR�b +oy��N��S+~]Q+J3�4c�DgWi,7a3���Ft�d��T������0��"k���������-������A��U��3���U��-X���m�B�vD����K�SC��y��Z���Pu���������#Y��=ս��يȣ��ł�?��1�JQP�8��� �;հ�*z du+4�=�Ӌ$�O� e�-�qf�^k�BЂ6��眽]������b�Ai��Tv�튩��1a
�[퐔�5(�W8%��x��ҁ2V�}�xa5o���d[�x��������~�h��*��͙�{�5C�0lZih�kH��QU�U,x�8���I-xm@kJ�F�8!��Wt�J`O� +T�q�L����~���c[07<�قs7 ��x�s<`��m +N<4`����4p�KL�t��c�]�6I����ZNm��S�_���X��S�}�0�m���*����/~��_>����Nqw���s?ͪٛ^.��$�Ѱ�4R7z��ce|�Z�{�P��u�r�#͋M �J��-o�O�F��C<:�PzM��<�b��Ѓ)=X�"3�;l��.���/��__�J{~KK�����
tx���2#�1�+�QY��ƥǪ�����{�=%��?�ߘ�d�\��s�$���TXr�8���� ���
���9<UHR(0F�j��/���U���j���C�(ɟ�Uaբ��,{+���*����v"���4!�:�熸�]�8(�y�C[#ς3MK���2}(�E�a!���Ck������E>��K*�E�h\���I�0���.K���ٿ����<;��y*���a�mf�1�X����\�q���A�Jd��&�(��1���}w�N�w�<��K=�,�䝶�pO4Ri�0Y�d�u�&�0v8(CA#Zd�
'�C�,F�2�e
���F��kOv¿>O�a)�р����_Eh�Y�wt 4�V�ј�%�����jI��d�Gʰ��9;G����j0�)�OZK��9|�� �0t7T/]JK���z�Y���� ���u�?���ӂ +}��J���!j>��q����5FV��Ɲ1V���z(1N.����Ύ���/�b�n��:{_m�:C����ķv%j<���`�>�Ɂ������PMׁ�d��pd��S:�4�.P(ƫW�J2Yy�x�"m1|e�<U� �R1�p�U$��,�E��f��Fah-ή<� +��D��D�ϛ0��u���iҒg5*w�F^���G��YS�'c���W��;���A��c�����W�����/-�Iʃ4��MxXI4�3sq2#joVpK)ފ#^�^��r�-ɒ7J�u��v8��E�R�P�3�=���X)p�#^��$:���ۯ��`g��^��s6��H0P��ހ�� +��[�0^+&d�\�dڍ��%����XP�'�ߞ�s_Ȣ�<w ��[f�6����=�<&$��Ï{�Is���*����$,%ɴ>(Q^�P�tWg+L�'t �m/ +��x�2g[���#e�`�:Q� +S�I) �؞X�'��][O�ѣu;n^�^��C�����i��f�v�jYq�rr����C����<�}��%��+[���[���T���Sf���?��>�8����$�;-��vzni�@B܍������ +����Z��;��ƨ-�ݍ�bO]?�M7cm���VI0\��6^�s�<]hp�`.j�����s�S��rt�F˛���j���D0��� �}���!������XeΫ������ɏ�s�?��$�"l|���>Nߠ�2���N��;O]�4���Q�˃-����>m�h*�ֵ�l�9�O!��V�p�����
My=}X���4�vo:���ǧ�� ���Hz�z4����=*�c�>�h�o��G�Ơ~n=��ɂ���X���cY���lʠs�H_�TT����n���Nd�pƴ��s�LT0e�J`6�s���ITNN1JyƀL��C�C��!Ot0SP�� +��!О5��X�X!�ײ���M��#�E +3صu���d7��X�:���*�xO�o>�?�r!7T����s�F�a���x+���V�h?������Hpw4l^YRu������@jV�1[��8�)(|�r�5S$�&q��R�(����]n���N� +�ka4���Swõ&�;��$�����)*L'�c"�o�}�J*r L��=���p�H=�VfU�\� b���n�a�y�$<h�`n� t��A��p��[hߩ�5��T������v[�,�^r�FFzy#)O�ZrP�kd�v�d�x���q��'�!��I���xrej{��^;��(۟5��J��@;��Ѭ2ܲ��;)����*�k|�L��5��E��qk�u�%�o��My:� +e�0��$7�U܂�1!��K�BhЌ� K��s���[��O"�8�'� [o��͓M�x8��=����F��Ϸ��Ӝ��q�� +�3�G��Ni�;w\q�Yo�=,W�ܰ����Z@�R�����G�:Q��^�e��Rݺ64_�re8b��eיh����y���B.V���C}矊�i(e<�R���F�a����'oA�#�j���b"���zך���$
x����8�� +�=�y,]X�ݫ��f�|�4X>��� +9��'����<@.6'(��>�.�rk� �h^�?<�=!��FZ��y2-ۊ�'-PV[v����:?��ϥl�!"��b�%�J�����võB�E���� +��o���J6��!|a��xJ�^,�;�!f��?[�j +���'�qNs"I�g�2��](~�����$9)���`�=����'t�a3tD���z��K�7���ƮHd�������F!q!��t�.hѦ4<��6 +qO5���;�m�����$LM�E���H��#�g��"H����������N�� �G��D�LiNo�!�o�/s��F��J6��si�BxJ�y��(�j�z��pZO�f��78)��%�-"z�I�0;���lT������jkD�0lt�vx��|tf.?g���A�v����'�*,��\�Uu���0�L�jJe�z������-��/)R�Sj �Gi����/�(@��뀗<Ij���5 � +�ޑG�:T�������_!7A �K�@�Fn�I���@=�����b��dY#2����q��l�J@w�w��н��Brr5�.}ҋ�y ��s:�+�� �ƈԸ�R�Q�9�0�4�iͿ6dz7��;��,��a� �Lo��8���#-\͜�-$]��r�O<5��/t�_A=V<�:<��5���1�7�7 N���b���R�\����IG
L���o۳�B�ǩ������-^�$�8�W�>�p5�Q����Q��3�Ɉ�p,*Վe,��}*ygSO���� +?��G��2�R��)�Q�(�0�5"��� ��$X +��O� +endstream +endobj +437 0 obj +<</Length 314/N 3/Range[0 1 0 1 0 1]/Filter/FlateDecode>> +stream +x�}��Kq�?�U�X
94%MQKS��N�#Ԧ��Q�v��B�ˡ�h�Fk ������! +��ՠ����ZP��~xx^ޗ��Q�����x"��^P��� c�!��H0 + ��0l+��ߣ�y7���;����;Q�?V.�_�tF��3L�E�K�)y ��z�80e�IP���k��T�/%[�p +endstream +endobj +438 0 obj +<</Creator(Typst 0.15.1)/ModDate(D:20261022095214-03'00)/CreationDate(D:20261022095214-03'00)>> +endobj +439 0 obj +<</Length 996/Type/Metadata/Subtype/XML>> +stream +<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-10-22T09:52:14-03:00</xmp:ModifyDate><xmp:CreateDate>2026-10-22T09:52:14-03:00</xmp:CreateDate><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>lFJVixS5GtCfr2tu1oSzmQ==</xmpMM:InstanceID><xmpMM:DocumentID>lFJVixS5GtCfr2tu1oSzmQ==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?> +endstream +endobj +440 0 obj +<</Type/Catalog/Pages 1 0 R/Metadata 439 0 R/Lang(en)/StructTreeRoot 17 0 R/MarkInfo<</Marked true/Suspects false>>/ViewerPreferences<</Direction/L2R>>/Outlines 16 0 R>> +endobj +xref +0 441 +0000000000 65535 f
+0000000016 00000 n
+0000000069 00000 n
+0000000161 00000 n
+0000000268 00000 n
+0000000349 00000 n
+0000000436 00000 n
+0000000530 00000 n
+0000000618 00000 n
+0000000722 00000 n
+0000000822 00000 n
+0000000916 00000 n
+0000001010 00000 n
+0000001098 00000 n
+0000001184 00000 n
+0000001270 00000 n
+0000001365 00000 n
+0000001433 00000 n
+0000001610 00000 n
+0000006811 00000 n
+0000006916 00000 n
+0000006997 00000 n
+0000007140 00000 n
+0000007297 00000 n
+0000007365 00000 n
+0000007446 00000 n
+0000007543 00000 n
+0000007611 00000 n
+0000007754 00000 n
+0000007923 00000 n
+0000007991 00000 n
+0000008085 00000 n
+0000008200 00000 n
+0000008268 00000 n
+0000008424 00000 n
+0000008589 00000 n
+0000008657 00000 n
+0000008750 00000 n
+0000008861 00000 n
+0000009017 00000 n
+0000009176 00000 n
+0000009244 00000 n
+0000009338 00000 n
+0000009432 00000 n
+0000009500 00000 n
+0000009659 00000 n
+0000009821 00000 n
+0000009889 00000 n
+0000009983 00000 n
+0000010095 00000 n
+0000010163 00000 n
+0000010319 00000 n
+0000010481 00000 n
+0000010549 00000 n
+0000010642 00000 n
+0000010740 00000 n
+0000010817 00000 n
+0000010957 00000 n
+0000011026 00000 n
+0000011096 00000 n
+0000011189 00000 n
+0000011257 00000 n
+0000011326 00000 n
+0000011424 00000 n
+0000011492 00000 n
+0000011596 00000 n
+0000011682 00000 n
+0000011760 00000 n
+0000011917 00000 n
+0000012074 00000 n
+0000012142 00000 n
+0000012237 00000 n
+0000012332 00000 n
+0000012400 00000 n
+0000012557 00000 n
+0000012628 00000 n
+0000012800 00000 n
+0000012868 00000 n
+0000012963 00000 n
+0000013034 00000 n
+0000013105 00000 n
+0000013226 00000 n
+0000013294 00000 n
+0000013451 00000 n
+0000013522 00000 n
+0000013702 00000 n
+0000013770 00000 n
+0000013865 00000 n
+0000013964 00000 n
+0000014032 00000 n
+0000014189 00000 n
+0000014260 00000 n
+0000014432 00000 n
+0000014500 00000 n
+0000014607 00000 n
+0000014678 00000 n
+0000014749 00000 n
+0000014820 00000 n
+0000014891 00000 n
+0000014962 00000 n
+0000015094 00000 n
+0000015186 00000 n
+0000015261 00000 n
+0000015334 00000 n
+0000015407 00000 n
+0000015517 00000 n
+0000015643 00000 n
+0000015830 00000 n
+0000015989 00000 n
+0000016061 00000 n
+0000016178 00000 n
+0000016275 00000 n
+0000016347 00000 n
+0000016530 00000 n
+0000016693 00000 n
+0000016765 00000 n
+0000016870 00000 n
+0000016967 00000 n
+0000017039 00000 n
+0000017198 00000 n
+0000017357 00000 n
+0000017429 00000 n
+0000017534 00000 n
+0000017631 00000 n
+0000017703 00000 n
+0000017870 00000 n
+0000018029 00000 n
+0000018101 00000 n
+0000018202 00000 n
+0000018299 00000 n
+0000018371 00000 n
+0000018550 00000 n
+0000018717 00000 n
+0000018789 00000 n
+0000018890 00000 n
+0000018991 00000 n
+0000019063 00000 n
+0000019226 00000 n
+0000019389 00000 n
+0000019461 00000 n
+0000019566 00000 n
+0000019663 00000 n
+0000019735 00000 n
+0000019914 00000 n
+0000020077 00000 n
+0000020149 00000 n
+0000020246 00000 n
+0000020347 00000 n
+0000020419 00000 n
+0000020598 00000 n
+0000020761 00000 n
+0000020833 00000 n
+0000020950 00000 n
+0000021047 00000 n
+0000021119 00000 n
+0000021282 00000 n
+0000021465 00000 n
+0000021537 00000 n
+0000021634 00000 n
+0000021731 00000 n
+0000021803 00000 n
+0000022006 00000 n
+0000022076 00000 n
+0000022162 00000 n
+0000022329 00000 n
+0000022402 00000 n
+0000022617 00000 n
+0000022689 00000 n
+0000022786 00000 n
+0000022887 00000 n
+0000022959 00000 n
+0000023126 00000 n
+0000023305 00000 n
+0000023377 00000 n
+0000023494 00000 n
+0000023643 00000 n
+0000023715 00000 n
+0000023882 00000 n
+0000024041 00000 n
+0000024113 00000 n
+0000024218 00000 n
+0000024319 00000 n
+0000024391 00000 n
+0000024498 00000 n
+0000024608 00000 n
+0000024775 00000 n
+0000024946 00000 n
+0000025018 00000 n
+0000025131 00000 n
+0000025228 00000 n
+0000025300 00000 n
+0000025475 00000 n
+0000025634 00000 n
+0000025706 00000 n
+0000025819 00000 n
+0000025916 00000 n
+0000025988 00000 n
+0000026163 00000 n
+0000026322 00000 n
+0000026394 00000 n
+0000026507 00000 n
+0000026604 00000 n
+0000026676 00000 n
+0000026851 00000 n
+0000027010 00000 n
+0000027082 00000 n
+0000027187 00000 n
+0000027284 00000 n
+0000027356 00000 n
+0000027531 00000 n
+0000027690 00000 n
+0000027762 00000 n
+0000027875 00000 n
+0000027972 00000 n
+0000028044 00000 n
+0000028211 00000 n
+0000028370 00000 n
+0000028442 00000 n
+0000028555 00000 n
+0000028652 00000 n
+0000028724 00000 n
+0000028899 00000 n
+0000029058 00000 n
+0000029130 00000 n
+0000029235 00000 n
+0000029332 00000 n
+0000029404 00000 n
+0000029575 00000 n
+0000029640 00000 n
+0000029807 00000 n
+0000029966 00000 n
+0000030038 00000 n
+0000030151 00000 n
+0000030248 00000 n
+0000030320 00000 n
+0000030495 00000 n
+0000030654 00000 n
+0000030726 00000 n
+0000030839 00000 n
+0000030936 00000 n
+0000031008 00000 n
+0000031183 00000 n
+0000031342 00000 n
+0000031414 00000 n
+0000031527 00000 n
+0000031624 00000 n
+0000031696 00000 n
+0000031871 00000 n
+0000032030 00000 n
+0000032102 00000 n
+0000032215 00000 n
+0000032312 00000 n
+0000032384 00000 n
+0000032559 00000 n
+0000032718 00000 n
+0000032790 00000 n
+0000032903 00000 n
+0000033000 00000 n
+0000033072 00000 n
+0000033247 00000 n
+0000033406 00000 n
+0000033478 00000 n
+0000033591 00000 n
+0000033688 00000 n
+0000033760 00000 n
+0000033927 00000 n
+0000034086 00000 n
+0000034158 00000 n
+0000034321 00000 n
+0000034386 00000 n
+0000034459 00000 n
+0000034556 00000 n
+0000034628 00000 n
+0000034701 00000 n
+0000034827 00000 n
+0000034899 00000 n
+0000034971 00000 n
+0000035050 00000 n
+0000035132 00000 n
+0000035222 00000 n
+0000035294 00000 n
+0000035366 00000 n
+0000035439 00000 n
+0000035512 00000 n
+0000035585 00000 n
+0000035715 00000 n
+0000035787 00000 n
+0000035902 00000 n
+0000035992 00000 n
+0000036065 00000 n
+0000036138 00000 n
+0000036211 00000 n
+0000036284 00000 n
+0000036414 00000 n
+0000036503 00000 n
+0000036575 00000 n
+0000036648 00000 n
+0000036721 00000 n
+0000036794 00000 n
+0000036944 00000 n
+0000037016 00000 n
+0000037115 00000 n
+0000037198 00000 n
+0000037271 00000 n
+0000037344 00000 n
+0000037417 00000 n
+0000037543 00000 n
+0000037624 00000 n
+0000037697 00000 n
+0000037770 00000 n
+0000037936 00000 n
+0000038017 00000 n
+0000038090 00000 n
+0000038163 00000 n
+0000038289 00000 n
+0000038391 00000 n
+0000038464 00000 n
+0000038537 00000 n
+0000038610 00000 n
+0000038724 00000 n
+0000038838 00000 n
+0000038944 00000 n
+0000039009 00000 n
+0000039067 00000 n
+0000039177 00000 n
+0000039242 00000 n
+0000039348 00000 n
+0000039413 00000 n
+0000039523 00000 n
+0000039588 00000 n
+0000039698 00000 n
+0000039763 00000 n
+0000039873 00000 n
+0000039938 00000 n
+0000040048 00000 n
+0000040113 00000 n
+0000040223 00000 n
+0000040288 00000 n
+0000040394 00000 n
+0000040459 00000 n
+0000040569 00000 n
+0000040634 00000 n
+0000040692 00000 n
+0000040802 00000 n
+0000040867 00000 n
+0000040973 00000 n
+0000041038 00000 n
+0000041148 00000 n
+0000041213 00000 n
+0000041271 00000 n
+0000041381 00000 n
+0000041446 00000 n
+0000041552 00000 n
+0000041617 00000 n
+0000041727 00000 n
+0000041792 00000 n
+0000041914 00000 n
+0000041979 00000 n
+0000042089 00000 n
+0000042154 00000 n
+0000042260 00000 n
+0000042325 00000 n
+0000042435 00000 n
+0000042500 00000 n
+0000042606 00000 n
+0000042671 00000 n
+0000042781 00000 n
+0000042846 00000 n
+0000042960 00000 n
+0000043025 00000 n
+0000043135 00000 n
+0000043200 00000 n
+0000043314 00000 n
+0000043379 00000 n
+0000043660 00000 n
+0000043790 00000 n
+0000043863 00000 n
+0000043940 00000 n
+0000044034 00000 n
+0000044394 00000 n
+0000044641 00000 n
+0000044678 00000 n
+0000044729 00000 n
+0000044780 00000 n
+0000044831 00000 n
+0000044883 00000 n
+0000044936 00000 n
+0000044987 00000 n
+0000045038 00000 n
+0000045087 00000 n
+0000045138 00000 n
+0000045189 00000 n
+0000045240 00000 n
+0000045291 00000 n
+0000045342 00000 n
+0000045393 00000 n
+0000045443 00000 n
+0000045494 00000 n
+0000045544 00000 n
+0000045747 00000 n
+0000045904 00000 n
+0000046447 00000 n
+0000046661 00000 n
+0000046820 00000 n
+0000047275 00000 n
+0000047494 00000 n
+0000047654 00000 n
+0000048417 00000 n
+0000048636 00000 n
+0000048776 00000 n
+0000048992 00000 n
+0000049233 00000 n
+0000049387 00000 n
+0000049595 00000 n
+0000049806 00000 n
+0000049951 00000 n
+0000050172 00000 n
+0000050425 00000 n
+0000050576 00000 n
+0000050658 00000 n
+0000051261 00000 n
+0000055753 00000 n
+0000055834 00000 n
+0000056385 00000 n
+0000060130 00000 n
+0000060210 00000 n
+0000060931 00000 n
+0000067856 00000 n
+0000067938 00000 n
+0000068740 00000 n
+0000081937 00000 n
+0000082014 00000 n
+0000082454 00000 n
+0000083096 00000 n
+0000083175 00000 n
+0000083670 00000 n
+0000088648 00000 n
+0000110868 00000 n
+0000111275 00000 n
+0000111388 00000 n
+0000112461 00000 n
+trailer +<</Size 441/Root 440 0 R/Info 438 0 R/ID[(lFJVixS5GtCfr2tu1oSzmQ==)(lFJVixS5GtCfr2tu1oSzmQ==)]>> +startxref +112648 +%%EOF
\ No newline at end of file diff --git a/docs/typ/cheatsheet-a4.typ b/docs/typ/cheatsheet-a4.typ new file mode 100644 index 00000000..7694382f --- /dev/null +++ b/docs/typ/cheatsheet-a4.typ @@ -0,0 +1,40 @@ +// The printable cheatsheet: one A4 side, three columns. The facts are in +// cheatsheet.typ and the elements' look in style.typ; this is page, +// type and headings only. +// typst compile --ignore-system-fonts docs/typ/cheatsheet-a4.typ +#import "style.typ": palette, mono, density, tagline + +#set page(paper: "a4", fill: palette.paper, margin: (x: 9mm, y: 8mm), columns: 3) +#set columns(gutter: 4.5mm) +#set text(font: "Libertinus Serif", size: 8.6pt, fill: palette.ink, lang: "en") +#set par(leading: 0.42em, spacing: 0.55em, justify: false) +#set list(indent: 0pt, body-indent: 3pt, spacing: 0.42em, marker: text(fill: palette.grip)[▸]) +#set terms(separator: h(0.5em), spacing: 0.42em, hanging-indent: 0.8em) +#set table(stroke: none, inset: (x: 1.5pt, y: 1.6pt)) +#show raw: set text(font: mono, size: 0.92em) +#show strong: set text(fill: palette.tag-name) + +// The title is the page's, not the content's: a level-1 heading in the +// content is not drawn here. +#show heading.where(level: 1): none +#place(top + left, float: true, scope: "parent", + block(width: 100%, inset: (bottom: 2pt), stroke: (bottom: 0.6pt + palette.grip), { + text(size: 15pt, weight: "bold", fill: palette.tag-name)[pardes] + h(1fr) + text(size: 9pt, style: "italic", fill: palette.tag-fg, tagline) + })) +#show heading.where(level: 2): it => block( + width: 100%, fill: palette.tag-bg, inset: (x: 2pt, y: 2pt), above: 0.75em, below: 0.4em, + sticky: true, + { + box(fill: palette.col-grip, width: 0.55em, height: 0.75em, baseline: 0.1em) + h(3pt) + text(size: 9pt, weight: "bold", fill: palette.tag-name, it.body) + }, +) + +#show heading.where(level: 3): it => block(above: 0.6em, below: 0.35em, sticky: true, + text(size: 8.4pt, weight: "bold", fill: palette.grip, it.body)) + +#density.update("tight") +#include "cheatsheet.typ" diff --git a/docs/typ/cheatsheet.typ b/docs/typ/cheatsheet.typ new file mode 100644 index 00000000..43162f52 --- /dev/null +++ b/docs/typ/cheatsheet.typ @@ -0,0 +1,159 @@ +// The pardes cheatsheet: the facts only, an index into the docs, not a copy. +// cheatsheet-a4.typ lays it out; style.typ says how each element looks. +// config.zig's "docs/typ" test checks every #word, #key and #tag here +// against the registry, the keymap and the default tags. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, fstree + +== The mouse +#pairs( + btn("B1"), [select, and focus the pane. On a tag: type there.], + btn("B2"), [#word("Exec") the word or selection: a builtin, else a shell line.], + btn("B3"), [#word("Look"): open the file, address, directory or URL, else find the word's next place. Resting the pointer tints what #btn("B3") would take.], + [sweep], [drag #btn("B2") or #btn("B3") to #word("Exec") or #word("Look") exactly what you swept.], + [grip], [drag the box left of a tag: up/down resizes, onto another column moves the pane. A column's right edge drags its width.], +) +=== Chords: hold the first, click the next +#pairs( + chord("B1", "B2"), [cut the #btn("B1") selection], + chord("B1", "B3"), [paste over it], + chord("B1", "B2", "B3"), [copy: cut, then paste back, #btn("B1") still down], + chord("B2", "B1"), [#word("Exec") the word with the #btn("B1") selection as argument (#word("Grep") on a selected name)], + chord("B2", "B3"), [cancel the sweep (#chord("B3", "B2") too)], +) +Over a program that takes the mouse, Shift swaps: #btn("B1", shift: true) selects, #btn("B2", shift: true) goes to the program. +One button: Alt/Option-click is #btn("B2"), Cmd/Super-click #btn("B3"), sweeps too (a terminal passes only Alt); Ctrl-click is a definition; a program that takes the mouse gets the plain click. + +== Tags +#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit") +#tag("New Tty Find Grep Joincol Delcol") +#tag("Save Tty Collapse Del", path: "/home/me/notes.txt") +#tag("Tty+bash Save Mode Filter Collapse Del", path: "/home/me/src") +#tag("Tty PdfSections PdfTint PdfFit Collapse Del", path: "manual.pdf [1/12]") +- #word("Del") over unsaved text refuses once; again discards. #word("Del") `j`: rows below. #key("SPC d") between two panes takes #key("k") (rows above) or #key("j") (below), asking only if you pause. +- #word("Undo") #word("Redo") #word("Edit") #word("Mode") work typed anywhere. #doc("tags") + +== #word("Look") addresses +Typed anywhere, then #btn("B3") or #key("Enter"): +#pairs( + addr("file:12"), [line 12], + addr("file:12:5"), [line 12, byte column 5], + addr("file:/re/"), [next match after the selection (`file:0/re/`: first)], + addr(":40"), [the pane looked from, line 40 (`:40:5`, any address after `:`)], + addr("~/x"), [home; also in #word("Save"), #word("Restore"), `pardes ~/x`], + addr("@p3:12"), [pane 3 by serial, a terminal's lines too], + addr("src/"), [a directory: a pane listing it; `Get` reads it again], +) +Addresses are sam's: `#n`, `/re/`, `?re?`, `$`, `a,b`. #doc("fs", section: "look-and-exec") + +== Keys: normal mode +Helix-style: motions *select*, then an edit acts on the selection. Mode box: blank normal, `^` insert, `$` raw terminal. Every helix key: #link("https://docs.helix-editor.com/keymap.html")[its keymap]. +#pairs( + [#keys("h", "j", "k", "l") #keys("w", "b", "e")], [move; words select], + [#keys("g g", "g e")], [first line, last line], + [#keys("g h", "g l", "^")], [line start, end, first non-blank], + [#keys("x", "v", "%")], [line, character select, all], + [#key(";")], [collapse to the cursor], + [#keys("d", "c", "y")], [delete, change, yank], + [#keys("p", "P", "R")], [paste after, before, replace], + [#keys("u", "U")], [undo, redo], + [#keys("i", "a", "I", "A", "o", "O")], [insert; #key("Esc") back to normal], + [#keys("s", "S")], [regex: a cursor per match, split], + [#keys("C", ",")], [cursor on next line; keep primary], + [#keys("/", "n", "N")], [search (a query pane), next, previous], + [#keys("m i", "m m")], [textobject, matching bracket], + [#key("|")], [pipe each selection through the shell], + [#keys("g d", "g r")], [definition, references (language server)], + [#keys("Ctrl-d", "Ctrl-u")], [half page down, up], + [#keys("Enter", "Tab")], [#word("Look"), #word("Exec") the selection (like #btn("B3"), #btn("B2"))], + [#key(":")], [to the pane's tag and back], +) +#doc("keys") + +== Keys: panes +#pairs( + [#key("Ctrl-w")], [window mode: #keys("h", "j", "k", "l") move the outline, #key("d") deletes it (then #key("k")/#key("j") between two), #key("c") collapses it, #key("Enter")/#key("Esc") or a pane's letter focuses (not in insert or raw `$`)], + [#key("Esc")], [back to the previous pane (insert: to normal)], + [#key("Shift-Esc")], [back to the previous pane from any mode but raw, where it is the program's Esc; needs the kitty keyboard protocol or the GUI, elsewhere a plain Esc], + [#keys("Ctrl-o", "Ctrl-i")], [jump history back, forward; this file first. #key("Ctrl-i") is #key("Tab") without the kitty protocol: #key("SPC j i")], + [#key("Alt-n")], [new terminal below], + [#key("Alt-c")], [move the pane to a new column], +) + +== The leader: #key("SPC") in normal mode +#pairs(split: 2, + key("SPC ?"), [#word("Help"): every builtin], + key("SPC f s"), word("Save"), + key("SPC f n"), word("New"), + key("SPC f f"), word("Find"), + key("SPC f g"), word("Grep"), + key("SPC f r"), word("Recent"), + key("SPC b b"), word("Panes"), + key("SPC s s"), [declarations], + key("SPC f c"), word("Config"), + key("SPC d"), word("Del"), + key("SPC n t"), word("Tty"), + key("SPC n 9"), word("Tty9p"), + key("SPC w"), word("Window"), + key("SPC j j"), word("Last"), + key("SPC j l"), word("Jumplist"), + key("SPC y"), [clip yank], + key("SPC p"), [clip paste], + key("SPC t t"), word("Themes"), + key("SPC t n"), word("NextColor"), + key("SPC t w"), word("Wrap"), + key("SPC c n"), word("Newcol"), + key("SPC c p"), word("Placement"), + key("SPC s d"), word("Dump"), + key("SPC s r"), word("Restore"), + key("SPC s a"), word("Attach"), + key("SPC s D"), word("Detach"), + key("SPC h t"), word("Tutor"), + key("SPC h m"), word("Messages"), + key("SPC q"), word("Exit"), +) + +== Terminals and commands +- #key("Ctrl-b"): raw (`$`) or normal. #word("Mode") cycles raw, normal, insert. #word("Filter"), #word("Tty+bash"). +- #btn("B2") on a non-builtin line runs it in a *command pane*: #tag("Kill Save Collapse Del", path: "/home/me/src (make) exit 0") +- #word("Kill") `make` stops it; #word("Exit") quits. #word("Repl") `python`: `.py` clicks go to it. + +== Reviewing diffs +`git diff` output is a diff: #btn("B3") on a file line, an `@@` or a line's `+`/`-` jumps there. #doc("tags", section: "reviewing-diffs") + +== Finding things +- A query pane under the pane: line 1 the query, its first word the source: `/pat`, `Find name` (fuzzy), `Grep text` (literal), `Recent`, `Panes`, `Symbols`, `All`. #keys("Ctrl-n", "Ctrl-p") step, #key("Enter") lands and keeps the rows, #key("Esc") puts things back. #word("Help"), #word("Tutor"). + +== Sessions +`pardes --detach=work`; `--attach=work` or #word("Attach") `work`; #word("Detach") leaves it running. #doc("detached") + +== Config +#word("Config") (#key("SPC f c")): `~/.config/pardes/init`, a builtin a line (#word("Theme") `atelier`). #word("DumpConfig"): every setting. #word("Dump") / #word("Restore"): the workspace. #doc("config") + +== Themes +#word("Themes") lists them; #word("Theme") `name`; #word("NextColor"); #word("ThemeFile") `x.zon`. #doc("themes") + +== The virtual filesystem (9P) +Pane shells get `$PARDES_9P` (the socket) and `$PARDES_PANE` (their own pane); a command clicked in a pane also gets `$winid`, the pane it was clicked in. +#cmd("9ns --mntgen # then m=$PARDES_MOUNT in every pane") +#cmd("9p -a \"unix!$PARDES_9P\" read index") +#fstree(``` +index a line per pane @rules +look write: a #word("Look") @look-and-exec +exec write: an #word("Exec") @look-and-exec +log events; follow waits @log +pane/ + new open: a new pane @panes + <n>/ + addr where data reads, writes @addresses + ctl builtins: #word("Save"), #word("Edit") … @panes + body its text (>> appends) @panes + data the text at addr @addresses + look a #word("Look") here @look-and-exec + exec an #word("Exec") here @look-and-exec +```) +#cmd("echo notes.txt:12 > $m/pane/$n/look") +#cmd("echo /foo/ > $m/pane/$n/addr; printf bar > $m/pane/$n/data") +#cmd("echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl") +#cmd("exec 3<>$m/log; echo follow >&3; cat <&3") +`pardes FILE` opens it here; `EDITOR='pardes --wait'`. #doc("fs") + diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ new file mode 100644 index 00000000..58e5d907 --- /dev/null +++ b/docs/typ/guide.typ @@ -0,0 +1,383 @@ +// The guide: pardes day to day, the path a newcomer reads once. Edge cases +// live in the reference, the pager and the language servers in setup, the +// keys on the cheatsheet. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, glossary, annotated, clip, mode-box + +#word("Look") (right-click) opens `src/bar.c:12`; #word("Exec") (middle-click) runs `make`. + +#annotated("/docs/site/media/themes/orchard.png", (640, 513), + alt: "a pardes window: workspace tag, column tag, a file pane, a terminal and a diff", + ([the workspace tag: words for the whole session], -22, 11), + ([a column's tag], 400, 34), + ([a pane's tag: its path, then its words], 560, 58), + ([the box: the pane's mode, and the handle to drag it], 8, 58), + ([the body: here a file, below it a terminal], 200, 104), + ([the scrollbar: how much of the body is in view], 8, 160), +) + +#glossary("Words you'll see", <words>, + [the pane with the keyboard], [where your keys go; one pane at a time], + [the session's directory], [where pardes started, or the directory `pardes DIR` named; workspace and column tags run there], + [active column], [where the next new pane goes (below)], + [command pane], [a terminal that runs one command line and shows its output], + [`+` names], [panes pardes makes, named in their directory: `+New` a scratch (text with no file yet), `+Search` a query pane or a listing of places, `+Pager` paged text, `+Errors` output, `+Unsaved` the panes holding unsaved text], + [serial], [a pane's number, never reused: the `3` in `@p3:12` and in 9P paths], + [message row], [the line where pardes says what happened, and asks: answer a prompt (#key("s")'s regex, #word("Save")'s path) with #key("Enter"), cancel it with #key("Esc")], +) + += Modes <modes> + +Each pane keeps its own mode. The box left of its tag shows it. + +#pairs( + [#mode-box(" ") normal], [keys move and select; an edit acts on the selection. File and PDF panes start here, and so does a terminal from #key("Alt-n").], + [#mode-box("^") insert], [keys type. #keys("i", "a", "o") and the rest enter it.], + [#mode-box("$") raw, terminals only], [keys go to the program. A terminal from #word("Tty"), the shell a bare `pardes` starts with, and a command pane start here.], +) + +#key("Ctrl-b") switches a terminal between raw and normal. In normal, +its text is a page to move over and copy from. #word("Mode") in the tag +steps raw, normal, insert. + +#pairs( + [#mode-box(" ") normal], [#key("Esc"): back to the previous pane (#word("Last")), unlike helix. #key("Shift-Esc"): the same.], + [#mode-box("^") insert], [#key("Esc"): back to normal. #key("Shift-Esc"): out of insert and back to the previous pane.], + [#mode-box("$") raw], [#key("Esc"): back to the previous pane. #key("Shift-Esc"): an Esc to the program. Either way the terminal stays raw. #word("ProgramEsc") `on` swaps them back: #key("Esc") goes to the program, except at a shell prompt with nothing typed on it, and #key("Shift-Esc") always goes back.], + [a PDF], [#key("Esc"): clears the selection and the search highlights. #key("Shift-Esc"): back to the previous pane.], +) + +In acme, Esc selects the text typed since the last click; here it leaves +insert mode, or goes back a pane. + +#key("Shift-Esc") needs the kitty keyboard protocol or the GUI. Elsewhere +it is a plain Esc. The previous pane is the last one you jumped from, else +the next pane down the column. + +#pairs( + [#key("Ctrl-w") or #key("SPC w")], [window mode (#word("Window")): each pane's tag box shows a letter instead of its mode, and the focused pane's tag is outlined; #keys("h", "j", "k", "l") move the outline, #key("Enter") or #key("Esc") gives that pane the keyboard, #key(":") its tag, a pane's letter gives it that one. #key("k") past a column's top pane goes on to its tag. #key("d") is #word("Del") on the outlined pane (between two panes it waits for #key("k") or #key("j"), as #key("SPC d") does) and the outline moves to the pane that took its rows; #key("c") is #word("Collapse"). The mode stays on for the next key], + [#keys("Ctrl-o", "Ctrl-i")], [back and forward through the places you jumped to (the jump list), this file's first: another file's only once it has none left that way (#word("JumpScope") `all`: every place in order). #key("Ctrl-i") needs the kitty keyboard protocol or the GUI, being #key("Tab") elsewhere: there use #key("SPC j i") and #key("SPC j o"), or the mouse's side buttons], +) + +Raw mode sends almost every key to the program. Leave it (#key("Ctrl-b")) +before #key("Ctrl-w") or #key("Alt-n"). + += The mouse <mouse> + +#pairs( + btn("B1"), [select; a click puts the cursor there and gives the pane the keyboard. In a tag it starts typing, in insert mode. A double click selects the word; at a line's start or end, the line; just inside a bracket or quote, up to its match.], + btn("B2"), [#word("Exec"): a builtin word runs, anything else is a shell line.], + btn("B3"), [#word("Look"): open the file, address, directory or URL, else find the word's next place.], + chord("B1", "B2"), [cut the selection], + chord("B1", "B3"), [paste over it], + chord("B1", "B2", "B3"), [copy], + [Alt-click (Option)], [#btn("B2"), sweeps too, for one button or a trackpad; in a terminal too], + [Super-click (Cmd)], [#btn("B3"); not in a terminal, which never passes Super], + [Ctrl-click], [the language server's definition], +) +#clip("chords") + +A program that takes the mouse gets the plain click. + +#btn("B3") on `src/bar.c:12:5:` in a compiler's error opens `src/bar.c` at +line 12, column 5. A click takes the word under it: letters, digits and +`. - + / : @ _ ~`, less a trailing `:`. Drag to take exactly what you +swept. In normal mode #key("Enter") is #word("Look") and #key("Tab") is +#word("Exec"). + +A builtin's argument: sweep `Find conf` with #btn("B2"), or select `conf`, +then #chord("B2", "B1") on `Find`. + +#key("x") #key("y") then #key("p") copies a line below. Every pane shares +the registers. #key("SPC y") and #key("SPC p") use the system clipboard. + += Tags <tags> + +#tag("Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config Debug Exit") +#tag("New Tty Find Grep Joincol Delcol") +#tag("Save Tty Collapse Del", path: "/home/me/notes.txt") + +A tag is text with undo. Type `make` into one and #word("Exec") it, or +delete the words you never use. Any word runs from any tag: #word("Exit") +in a pane's tag quits too. + +#pairs( + [#key(":")], [the keyboard to the tag, on #word("Save") the first time; #key("Tab") runs it, #key(":") comes back], + [edit the path, #key("Enter")], [renames: the next #word("Save") writes there; the typed path survives #key("Esc"), pending, and a second #key("Esc") drops it], + [#word("Collapse")], [folds the pane to its tag], + [drag the box], [up or down resizes; onto another column moves the pane], +) + += Where commands run and panes go <command-panes> + +#btn("B2") on `make` runs it with the #word("Shell") setting's `-c`. +Where it runs depends on where you clicked: + +#clip("where-commands-run") + +#pairs( + [a terminal's text or tag, at a prompt with nothing typed], [typed into that shell, in its current directory], + [any other pane's text or tag], [a command pane in that pane's directory, in the last column], + [a column's tag], [a command pane in the session's directory, in that column], + [the workspace tag], [a command pane in the session's directory, in the last column], +) + +A file's text and tag run in its directory: `make` from `README` at the +project root is right, from `src/main.c` it is not. The keyboard stays +where it was. The command pane's tag ends in `running`, then `exit N`: + +#tag("Kill Save Collapse Del", path: "/home/me/src (make) exit 0") + +Click into the command pane: #key("n") selects the next `file:line`, +#key("Enter") opens it, and #key("n") from there goes on to the next error. +A finished command pane is in normal mode, so #key("x") #key("y") copy from +it at once. The next command for that directory reuses it. +#word("Kill") `make` stops the commands pardes started with `make`. +#word("Save") or #word("Del") in a column tag acts on that column's pane +with the keyboard, else its first. + +Every other new pane goes into the *active column*: where you last typed +or left-clicked, or where the last new pane went. The new pane takes the +keyboard. A listing is the exception: it opens below the pane that asked, +which keeps the keyboard, so #keys("n", "N") walk the listing. #btn("B3") +on a file open in another column jumps there, but the next new pane still +lands in the old column. #word("Placement") `pardes` picks other rules +(#doc("reference", section: "placement")). + +To open beside: #word("Newcol"), then #word("Look") a file name typed in +its tag opens it there; #key("Alt-c") moves a pane into a new column. +#clip("columns", wide: true) + +Closing a column's last pane leaves it empty; #word("Delcol") and +#word("Joincol") take columns away. Closing the session's last pane quits +pardes. + += Look <looking> + +#pairs( + addr("notes.txt"), [opens it, or goes to the pane already showing it], + addr("notes.txt:12"), [line 12], + addr("notes.txt:/TODO/"), [the next match of `TODO`], + addr("src/"), [a pane listing it, as acme's directory window: a #word("Look") at an entry opens it, `..` goes up, `Get` reads it again (#word("DirLook") `terminal`: `ls` in a terminal there)], + addr("https://ziglang.org"), [the browser, through `xdg-open` (`open` on macOS); there is no plumber], +) + +#key("Enter") does the same from the keyboard; the other address forms are +on the cheatsheet. A relative path is found in the directory of the pane +the #word("Look") came from, then of each pane on the jump list, most +recent first. + += Search <search> + +#key("/") opens a query pane under the pane: a `+Search` whose first line +is the query, typed into, and whose rows are what it finds, made again at +each key. It takes its rows from the pane it searches and from no other, +is born #word("SearchRows") rows tall and never resizes itself; nothing +found is a count of `0` in its tag, not an exit. + +#pairs( + [#key("/") `vw`], [every match in the text tinted and ticked on its scroll rail, the first after the cursor selected; the rows under line 1 are the lines holding it, each its place as text first (`file:line:col`, the shortest path a #word("Look") from the pane resolves), then the line coloured as the file is, under the declaration it is in], + [#keys("Ctrl-n", "Ctrl-p")], [the next or previous match, typing; the text follows it], + [#key("Enter")], [the keyboard on the match, the pattern in `/`, the rows kept as text (#word("Save") keeps them as a file)], + [#keys("n", "N")], [the next or previous match in the text, round the end without a word], + [#key("Esc")], [typing: the text as it was, the query pane closed], + [#key("*")], [the selection as line 1, the keyboard staying in the text], +) + +Line 1's first word names what it searches, and editing the word changes it: + +#pairs( + [`/pat`], [the pane's own text: a regex, any case unless it has a capital (#key("/"))], + [`Find name`], [the files below the pane's directory, by a fuzzy match of their names (#key("SPC f f"), #word("Find"))], + [`Grep text`], [the lines of those files holding `text`, literally (#key("SPC f g"), #word("Grep")); past 2000 lines #word("More") goes on], + [`Recent name`], [the files opened lately, in any window (#key("SPC f r"), #word("Recent"))], + [`Panes name`], [the open panes, then the ones closed this session, `(closed)` and dimmer: #key("Enter") (or a #word("Look") at its `@pN`) brings one back where it was, its text with it (#key("SPC b b"), #word("Panes"))], + [`Symbols name`], [the text's declarations (#key("SPC s s"))], + [`All pat`], [every open pane's text, its rows under each pane (#key("SPC /"))], + [`Refs`, `Def`, `Impl`, `Diagnostics`], [the language server's lists (#key("g r"), #key("g d"), #key("g i"), #key("SPC l d")): one answer is a jump, none a message; several open the list with the keyboard on its current row in normal mode (#keys("j", "k", "n", "N") step it, #key("Enter") lands, #key("Esc") goes back), the diagnostics' keeping it in the text for `]d`; their places in the text tinted as a `/`'s are], +) + +A row in a file no pane shows is shown in a `+Preview` under the query +pane. The current row follows the keyboard only (#keys("Ctrl-n", "Ctrl-p") +typing, #keys("n", "N") and #keys("j", "k") in the pane's normal mode); +#btn("B1") on the rows places the caret and selects, as in any pane, and +moves nothing else. #key("Enter") lands the current row, making the +preview that file's pane where it stands. +The preview colours the file as its own pane does, and the query's hits +in it are its places, tinted and ticked, the current one selected. +#btn("B3") on a row's place goes there, as on any address; the rows kept +as text (#word("Save")) are a list of places that still work. +#btn("B2") on line 1 runs it again. The next search from the same pane reuses its query pane, +its kept rows back on #key("Esc") (#word("SearchPane") `new`: a pane each; +#word("SearchPlace") `column`: in a finder column at the right). A PDF's +and a terminal's #key("/") still ask on the message row and list a +`+Search`. +#clip("search") + += Unsaved panes <unsaved-panes> + +#word("Del") on a pane with unsaved text, its box filled +(#mode-box(" ", unsaved: true); a `*` in a terminal), refuses once, saying `1 unsaved pane — Del again to discard`, and lists the pane +in `+Unsaved`; #word("Del") again discards it. +#word("Exit") (or #key("SPC q")), #word("Restore") and #word("Delcol") +refuse once the same way. #key("SPC d") between two panes also asks which +takes the rows: #key("k") above, #key("j") below. Typed straight on, +#key("SPC d") then #key("j") just closes the pane; the question shows on its notice band +only if no answer has come after a moment, a hint for a Del that seemed to +do nothing. + += Terminals <terminals> + +#tag("Tty+bash Save Mode Filter Collapse Del", path: "/home/me/src") + +- #word("Tty") opens a terminal in the pane's directory, #key("Alt-n") one in + the session's directory; #word("Tty+bash") picks the shell. +- #word("Del") closes a terminal and its shell at once, running or not, and + a shell that exits closes its pane. +- #word("Save") writes the scrollback to a path it asks for. +- #word("Filter") maps the program's colours through the theme. +- #word("Petscii") draws a program's images as glyph art instead of pixels. +- In raw mode Ctrl-V types what you yanked, Ctrl-Shift-V the clipboard. +- In normal mode, editing a terminal's text edits a copy, and the first + edit says so: #key("Tab") or #btn("B2") runs it, and the program's next + drawing replaces it. +- A program that tracks the mouse gets #btn("B1") and the wheel; + #btn("B2") and #btn("B3") stay pardes's. Hold Shift to swap. +- #word("Repl") `python` in its tag makes #btn("B2") on a `.py` pane send the text + to that REPL. +- `git log` and `man` open in a `+Pager` pane (#doc("setup", section: "pager")). + += Reviewing diffs <reviewing-diffs> + +`git diff` run as a command, or a `.diff` or `.patch` shown as text (below), +is drawn as a diff, each hunk in its file's language. #btn("B3") on: + +#pairs( + [`diff --git`, `---`, `+++`], [the file], + [`@@ -3,7 +3,8 @@`], [the hunk's first new line], + [a line's `+`, `-` or space], [that line in the new file], +) + +A `.diff` or `.patch` looked at, and a diff paged (`git show`), opens as +a `+Diff`, stacked as delta shows one: each hunk under its `path:line` +(`Space j n`/`Space j p` step through them, #btn("B3") opens it) and the declarations +around it, a `+`/`-` before each line, the words a changed line changed +tinted and a line added or removed whole faintly. A mailed patch keeps its +message and diffstat above. The files are found from the diff's directory +or one above it. #word("Diff") on a `+Diff` shows the diff itself as +text (a paged one's `+Pager` is closed once stacked), and on the text stacks +it again; #word("DiffLook") `text` in the startup file opens the text +first. + += Call hierarchy <callstack> + +Put the cursor on a function and run #word("Callstack") (#key("g c") or #key("SPC l b")). +`+Callstack` starts at the outermost callers and follows calls down toward +the selected function, with shared callers grouped and vertical guides +joining the levels with rounded corners. Each caller has a clickable location and its function +signature, extracted by the same tree-sitter context mechanism as other +location results. Signatures and call-site snippets use source syntax colors; +only calls to the selected function receive background emphasis. Guides +continue alongside every line of a multiline signature and through screen +wrapping. Cross-directory Look paths are shortened when possible. +#btn("B3") or #key("Enter") on a location opens and reveals that source +pane. #word("LookNext") / #word("LookPrev") (#keys("SPC j n", "SPC j p")) +select locations without opening them. The view follows the language +server's static call hierarchy; recursive paths are marked `↻`, and a +hierarchy deeper than the limit invites continuing from another function. +Every caller is listed: the walk runs as long as the server keeps answering, +says how many callers it has found on the message row once it takes more +than a second, and shows what it found if the server stops answering. +Asking anything else stops it. A tree too big for one page (about 100,000 +rows, the memory one query may use) ends in a row saying so: running +#word("Callstack") in `+Callstack` shows the next page, from where this +one stopped, with that caller's own callers above it again. +At each level, callers whose function or file name contains "test" come +after the rest. +#word("CallstackDepth") reports the current caller depth; +`CallstackDepth 16` changes it for subsequent queries. The default is 8 +levels, and the accepted range is 1–64. + +`CallstackLayout stacked` (the default) puts each signature and call snippet below its +location, aligned with the location text; `CallstackLayout inline` puts it +beside the location again. A bare #word("CallstackLayout") switches modes. +`CallstackCorners rounded` (the default) uses rounded tree guides; +`CallstackCorners square` restores sharp corners. Bare #word("CallstackCorners") +switches styles. Layout and corner changes apply to the next query. These settings are retained +by #word("Dump") / #word("Restore"). + += `pardes FILE` and `--wait` <editor> + +In a pane's shell: + +``` +pardes notes.txt open it here and return at once (acme's B) +pardes --wait notes.txt return when that pane closes (acme's E) +``` + +A file not there yet opens empty, and #word("Save") creates it. +`--wait` makes pardes an `EDITOR` (#doc("setup", section: "editor-setup")); +refusals and `--nested` are in the reference. + += Keys <keys> + +#pairs( + [#key("w") #key("d")], [select a word, delete it: motions select, edits act on the selection], + [#key("x"), #key("v"), #key(";")], [select the line; extend; collapse to the cursor], + [#key("s")], [a cursor per regex match; every edit acts at each], + [#key("/"), #keys("n", "N")], [search the text in a query pane (#link(<search>)[Search]); step its matches, round the ends], + [#keys("SPC j n", "SPC j p")], [#word("LookNext") / #word("LookPrev"): select locations across panes; #key("Enter") opens one], + [#key("g l")], [line end], + [`12G`], [line 12; a bare #key("G") does nothing], + [#key("SPC ?")], [#word("Help"): every builtin, with its leader path and keys; `SPC w ?` only the paths under `SPC w`; #word("Tutor") (#key("SPC h t")) practises them], + [#keys("g d", "g r"), `SPC l`], [the language keys, once a server is installed (#doc("setup", section: "language-servers"))], +) + +The keys are helix's, and helix's +#link("https://docs.helix-editor.com/keymap.html")[keymap] is their full +reference. Where pardes differs (#key("Esc") leaving the pane, the +#key("SPC") paths, #key("Ctrl-w"), #key("Ctrl-b")), this guide and the +cheatsheet (#doc("cheatsheet")) say so. + += Sessions <sessions> + +``` +pardes --detach=work & a session with no screen of its own +pardes --attach=work show it here +``` + +The session owns the panes, shells and files; frontends come and go, and +all of them see the same screen. #word("Attach") `work` (#key("SPC s a")) +switches this window to it; #word("Detach") (#key("SPC s D")) leaves it +running. + += Config <config> + +#word("Config") (#key("SPC f c")) opens the startup file, +`~/.config/pardes/init`: one builtin a line, run at start, `#` a comment. + +``` +Theme atelier +Shell zsh +# Placement acme is the default; Placement pardes picks the other rules +``` + +#word("DumpConfig") opens every live setting as the line that sets it. +#word("Dump") saves the workspace and #word("Restore") brings it back +(what a dump keeps is in the reference). Keys are compile-time, in +`src/config.zig`. + += Questions <questions> + +/ Why not helix and tmux, or acme?: helix and tmux edit and run shells + well, but their text is inert. acme makes text the interface and is + modeless by design, with win for shells and page and the plumber for + documents. pardes keeps acme's text as the interface and trades the rest + for helix's modal keys, a VT terminal and PDFs in a pane. What changes + for acme users and scripts is in #doc("reference", section: "from-acme"). +/ Does it run inside tmux?: Yes, as in any terminal. Where tmux does not + pass kitty's protocols, #key("Shift-Esc") is a plain Esc and images draw + as glyph art. +/ Does my helix config carry over?: No. The keys are compiled in + (`src/config.zig`); `~/.config/helix` is not read. +/ How do I quit?: #key("SPC q"), or #word("Exit") in any tag. +/ What does "pardes" mean?: The name of the four levels of reading a text in rabbinical exegesis (#link("https://en.wikipedia.org/wiki/Pardes_(exegesis)")[Wikipedia]). diff --git a/docs/typ/install.typ b/docs/typ/install.typ new file mode 100644 index 00000000..d97d30f7 --- /dev/null +++ b/docs/typ/install.typ @@ -0,0 +1,25 @@ +// Installing pardes: the downloads, else the clone and the build, included +// by setup.typ and by the site's landing page, so it is written once. The +// downloads and the mirrors come from `project` in style.typ. +#import "style.typ": cmd, project + +#if project.download != none { + let d = project.download + for f in d.files { + let name = f.url.split("/").last() + [pardes #d.version, #f.what (#str(calc.round(f.bytes / 1000000)) MB):] + cmd("curl -LO " + f.url + "\necho '" + f.sha256 + " " + name + "' | sha256sum -c\nchmod +x " + name + " && mv " + name + " ~/.local/bin/" + f.program) + } + [The checksums are also in #link(d.sums)[`SHA256SUMS`].] + parbreak() + [Or build it from source:] +} + +#let first = project.mirrors.first() +#cmd("git clone " + first.clone + " && cd pardes") + +With Zig 0.17 (the build fetches everything else; once that is +downloaded, a first build from a clean cache took 62 seconds on 16 cores): +#cmd("# pardes, in a terminal\nzig build -Dplatform=tty --prefix ~/.local") +#cmd("# pardes-gui, its own window\nzig build -Dplatform=gui --prefix ~/.local") +Then run `pardes` or `pardes FILE`. diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ new file mode 100644 index 00000000..b83b4a83 --- /dev/null +++ b/docs/typ/reference.typ @@ -0,0 +1,1146 @@ +// The reference: every file the virtual filesystem serves over 9P, what it +// does, how it fails, and the limits. How pardes behaves on screen is the +// guide's; recipes and traps are scripting's; how a mount cuts writes and +// the listeners are building's. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, fstree + +Every native session is a virtual filesystem, served as 9P2000 (not .u, +not .L) and modelled on acme's (#doc("reference", section: "from-acme")): +panes, columns, tags and the session are files. Paths here are the served ones (#file("/pane/2/body")); through a +mount they sit under the session's directory (`$m`; #doc("scripting", section: "find-the-session") +says how to find it). The served #file("/README") is a +one-screen summary of this page. Two builtins: #word("Look") (right-click): open what the +text names, or else find it; #word("Exec") (middle-click): run the builtin +it names, or else run it as a shell line. The files #file("look") and +#file("exec") take a line each, as those clicks would. + += The tree <tree> + +#fstree(``` +README the one-screen summary (src/fs-help.txt) @other-files +index a line per pane: serial kind dirty name column @rules +status pid, version, panes @other-files +look write a line: a #word("Look") at the pane with the keyboard; read: the serials touched @look-and-exec +exec write a line: an #word("Exec") there; read: the serials touched @look-and-exec +pager write a directory: a new +Pager there; read: its serial @pardes-stdin +log the event log; write follow to wait for more @log +screen the rendered screen as JSON @on-screen +listeners dial addresses @other-files +focus the serial of the pane with the keyboard; write one to move it @columns-and-tags +ctl settings and session builtins @root-ctl +commands every builtin, one a line @other-files +recent files opened lately: open|closed <path> @other-files +layout a line per column, then active <serial> @columns-and-tags +tag the workspace tag @columns-and-tags +tagexec a word clicked in the workspace tag @columns-and-tags +col/ the columns @columns-and-tags + <n>/ column <n>; rmdir closes it when empty @columns-and-tags + tag its tag + ctl its builtins (Delcol Joincol New Tty) + exec a word clicked in its tag +pane/ the panes @panes + new open it to make a pane; read answers the serial @panes + <n>/ pane <n>; rmdir closes it @panes + name the file name; write to rename @panes + body the text; a write appends, > replaces @panes + tag its path, then its words; a write replaces the words @panes + ctl builtins and ctl words, a line each @panes + addr the address data and xdata work on @addresses + dot the selection, as an address @addresses + limit where a forward search stops @addresses + data the text at addr; a write replaces it @addresses + xdata the text in addr's range only @addresses + sel the selected text; a write replaces it @panes + dirty 1 while the text differs from its file @flags + mark 0 or 1; a write marks an undo point @flags + scroll 0 or 1; a write scrolls the pane @flags + errors write-only: text for the directory's +Errors @panes + event the pane's clicks and keys, as acme's event file @event + look a #word("Look") at this pane @look-and-exec + exec an #word("Exec") at this pane @look-and-exec + tagexec a word clicked in this pane's tag @look-and-exec + pty/ terminals only @pty + ctl winsize, sig, exec @pty + status cols rows busy @pty + data the live stream: bytes in as typed, output out @pty + run write a command line; read: exit N, then its output @pty +os/ the host filesystem @mounts +src/ the editor's sources (only with -Dembed-sources=true) @mounts +```) + +Panes and columns are named by serials the editor gives: stable while they +live, never reused (so they can have gaps). Nothing is created by a listing, stat, walk or read: +only an open of #file("/pane/new") makes a pane (so `ls -l` and `find` are +safe), only `rmdir` of #file("/pane/<n>") or an empty #file("/col/<n>") +removes. Tcreate is refused everywhere. + +#file("/index") rows are `serial kind dirty name column`, kind `text`, +`term` (a shell), `cmd` (a command's pane, no shell to type into), `pdf` or +`image`, the name `<dir>/+New` for an unnamed scratch. +Names may hold blanks, so split `head, col = row.rsplit(maxsplit=1)`, then +`serial, kind, dirty, name = head.split(maxsplit=3)`. Names in +#file("/index"), the log and a terminal's tag are escaped: a newline `\n`, a +backslash `\\`, and any other control byte, DEL, a C1 control or a byte that +is not UTF-8 `\xNN`, so a name decodes to the bytes it is. + += Rules for every file <rules> + +*Failure.* A write fails whenever what it asked for fails, and logs one +`err <serial|-> <file>: <why>` record, with no `msg`; a write that succeeds +logs none. A refused write says why in the log's last `err` record, found +with `grep '^err' log | tail -1`: after a refused #word("Del"), #word("Exit") or #word("Restore") the +newest line may be `new N .../+Unsaved`. Only writes log: a +refused open or truncation (an OTRUNC open such as `> data` after a failed +`addr`), create or remove answers its error alone, as do a write to +#file("pane/new") (`permission denied`) and a write on a read-only fid +(`bad use of fid`). Errors are words (Plan 9's where pardes has none of its +own), never a C library string; a bad setting value is quoted, the value +itself (`bad value in control message; takes on, off "maybe"`); a ctl +refusal quotes the offending word alone (`wrong #args in control message "Newcol"`). Through 9ns the kernel sees an errno 9ns reads +from those words (cloud9's `fs.enameErrno`): the first of these that the +words hold, case aside, wins, and anything else is EIO (`Modified`, a +sam command pardes's #word("Edit") leaves out, `B <cmd`): + +#pairs( + [`control message`], [EINVAL], + [`interrupt`], [EINTR], + [`shut down`], [EIO], + [`not exist`, `not found`, `no such`], [ENOENT], + [`exists`], [EEXIST], + [`not empty`], [ENOTEMPTY], + [`not a dir`], [ENOTDIR], + [`is a dir`], [EISDIR], + [`permission`, `denied`], [EACCES], + [`read-only`, `read only`, `readonly`], [EROFS], + [`no space`], [ENOSPC], + [`not allowed`, `not permitted`, `cannot`], [EPERM], + [`fid`], [EBADF], + [`bad offset`, `invalid`, `bad `], [EINVAL], + [`busy`, `in use`], [EBUSY], + [`too long`], [ENAMETOOLONG], + [`too many open files`], [EMFILE], + [`not supported`, `unsupported`], [EOPNOTSUPP], + [acme's address and argument words: `no match for regexp`, `no previous regular expression`, `address out of range`, `addresses out of order`, `past end of body`, `written to addr failed`, `not locked by this open`, `too small for the panes`, `owns the size`, `no question asked`, `answer takes`], [EINVAL], +) + +A file pardes reads (#word("Get"), #word("Look"), #word("Edit")'s `e` and `r`) that is a directory where a file is wanted says `is a directory` (EISDIR), an unreadable one `permission denied` (EACCES), and a device (`/dev/zero`, a tty) `not a regular file` (EIO), never read to the stream limit; #word("Incl") of a file says `not a directory` (ENOTDIR). + +The `err` record has the words; a shell sees only the errno. + +Not failures: a #word("Look") that finds nothing (it answers nothing and logs one +`err`), an #word("Edit") `x` that matches nothing, #word("Undo") with nothing to +undo (a `msg`), and a command pane's command, which ends in its own time +with an `exit` record. + +*Command lines.* #file("look"), #file("exec"), #file("tagexec"), the three +kinds of #file("ctl") and a column's #file("exec") take one command a line. +The whole write is checked first (a control character other than a tab +fails it all, EINVAL); then lines run in order, and a failing line fails +the write after the lines before it took effect, as acme's ctl does. Blank +lines are skipped. A line runs at its newline; the last one, unended, runs +after its open is closed, the close answered first, so its failure is only +its `err` in the log: end a write with a newline when its result matters +(#doc("building", section: "writes-through-a-mount")). `> exec` (a +truncating open) is fine through a mount. An #word("Edit") whose `{` or `a`/`c`/`i` text is still +open waits for the next write on that open. A line or #word("Edit") block over +1 MiB is refused once (EINVAL), and the rest of it, through its newline, +is dropped. + +*Answers.* Reading #file("look"), #file("exec") or #file("tagexec") answers +the serials the last command made, or else the pane it acted on or +focused, one a line; nothing when it did none of these (#word("Newcol") at +#file("/tagexec")). A read answers the panes touched by this open's last +write. An open that never wrote reads the session's last answer, from +whichever client wrote it, so read on the open you wrote. A read is a stream: once read, +the next read on that fid is EOF until the next write (or seek to 0). With +other clients about, write and read on one open: +#cmd("exec 3<>$m/pane/$n/look; echo x >&3; cat <&3; exec 3<&-") + +*Snapshots.* #file("/index"), #file("/layout"), #file("/recent"), +#file("/commands"), #file("/status"), #file("/listeners"), a read-only +#file("ctl"), #file("/log"), #file("/screen") and a terminal's +#file("body") freeze at the open, so one read in several chunks never +splices two moments; open again for now. + +*Open records.* A session holds 64 open records, shared by every client. +An open that keeps state takes one: such a snapshot, a #file("run"), +#file("event") or #file("pty/data") open, a write open of #file("data"), +#file("xdata"), #file("sel") or a text pane's #file("body"), and every +write open of a command file (#file("look"), #file("exec"), +#file("tagexec"), a #file("ctl")). A plain read of a pane's text takes +none. Past 64 an open is refused `too many open files`, which a mount +reports as EMFILE. Close what you open: a shell's `exec 3>$m/exec` holds +its record until fd 3 is closed. + +*Held reads.* A read with nothing to give yet (a followed #file("log"), +#file("event"), #file("pty/data"), #file("pty/run") before its answer) +waits in the editor and is answered when news comes. A second read on that +open meanwhile fails `file in use`. A read the client flushed is dropped. +One connection holds at most 128 reads at once; the next is refused `too many reads waiting: 128`. Every held read is on an open that keeps state, +and those are 64 in the session (above), so 64 is the real cap on reads +held at once, through one connection or many. A mount (9ns) is one +connection, and it keeps answering everything else beside its held reads. + +*Stats.* A file whose text is kept has its real length: a pane's +#file("body"), #file("tag"), #file("name"), #file("ctl"), #file("sel") and +the range and flag files, the workspace's #file("tag"), the root +#file("ctl"), #file("status"), #file("commands"), #file("README"), the +#file("look")/#file("exec") answers, #file("focus"); #file("event") and +#file("pty/data") the next record's, zero when none waits. A stream and a +view generated by each read stat 0, as acme's do: #file("log"), #file("screen"), #file("data"), #file("xdata"), #file("index"), +#file("layout"), #file("recent"), #file("listeners"), #file("pane/new"). +Read those to the end rather than trust a length (`cat` does). The qid +version of #file("body"), #file("data") and #file("xdata") is the pane's +revision, so a stat sees an edit land. Modes are 0644/0666, 0444 +read-only, 0222 write-only. + += look and exec <look-and-exec> + +A line written to #file("look") is #word("Look") on it, on the line as +written: its leading blanks are its own (` return x` finds that +indented line, and a diff's blank context line ` ` is a #word("Look") too); only its +newline and `\r` go. An #file("exec") line's blanks at either end are +trimmed. The guide says what #word("Look") opens and where it finds a relative path (#doc("tags", section: "looking")); here is what is particular to the +files. + +- `file:12` selects line 12, newline included; `file:12:5` puts the caret + at line 12, byte column 5; `file:<addr>` takes any address (below), + *evaluated from the file's dot*: `file:/re/` finds the next match after + the selection, `file:0/re/` the first. A bare `:N` or `:N:M` (or any `:addr`) addresses the pane the #word("Look") came from. + `@p<serial>:<addr>` addresses a pane by serial, a terminal's logical + lines too. +- A leading `~` is the home directory (`$HOME`, else the passwd entry's; + `~user` that user's) here and wherever a path is typed (#file("name"), + #word("Save"), #word("ThemeFile"), #word("DumpDir"), #word("Restore"), + `pardes '~/x'`), even beside a file named `~`: write `./~` for that. +- A path to no file is a miss, as a search that finds nothing is: said on + the message row and logged as an `err`, the write still answered. A file + that is there but will not open fails the write and is named: + `look: <path>: permission denied`. A zero column is refused, `file:0:0` + included: columns count from 1. +- A whole line of a diff pane written to #file("look") is the #word("Look") on its first column. The line is matched in the + pane from its cursor row on, wrapping, and the first match wins. +- On a PDF pane `:P:H` is hit H of the pane's search on page P, as + `file.pdf:P:H` is; a hit not there, or any H with no search active, is a + miss, `has no search hit H on page P`. Only a `+PdfSections` row's + second number is a section, + `file.pdf:PAGE:SECTION`, and only such rows are checked against the + outline: a section not there, or not on that page, is a miss. +- A plain word selects its next place after dot, wrapping. #word("LookWord") `list` + on the root ctl lists a row per line holding it in a `+Search` pane + instead; the next word given to #word("Look") in that directory refills it. In a + terminal a word is always listed, rows spelled `@p3:12:5-9`. + +A miss logs `err <serial> look: ...` (`no match for "zzq:#3"` quoting what +was written when nothing by that name exists; `<path>:99 has no line 99` +for a line past a file's end, `<path> has no page 99` for a PDF's page; +`<path>: no match for regexp` or `<path>: address out of range` when an +address fails), opens nothing, and leaves #file("look") reading empty; the +write succeeds. A `./x` or `../x` that is not there is such a miss too +(`look: ./x: no such file`). A #word("Look") whose address fails says so and leaves open no file +it opened. A #word("Look") of `file:12:` reads as `file:12`: a trailing colon is +dropped, as a click leaves it off. A path too long to repeat whole gives up +its middle to `…`. + +A line written to #file("exec") is #word("Exec"): + +- A builtin word runs (#file("/commands") lists them). A builtin that needs + its argument (#word("Msg"), #word("Mount"), #word("Find")) written bare is + `wrong #args in control message "Msg"`, and so is one that takes none + written with one (#word("Config") `extra`). +- A line starting with `#` is a comment, as in a shell: it runs as nothing, + silently, here and in every ctl. +- The language server's words ask about a file pane's text at its cursor + (set it with #file("addr") and `dot=addr` first): #word("Hover") fills + `+Hover`; #word("Def") and #word("Refs"), in the tag of a file a server + speaks for, are `gd` and `gr`, and given a symbol (a 2-1 chord's + selection) ask at its occurrence nearest the cursor; #word("Rename") `new` renames the symbol in the file and says how many + ranges it changed (on the message row, and so in the log) without listing + them, and fails when there is nothing to rename. One that reaches other + files applies nothing: it opens a `+Search` preview of the edits, which + is the pane the write answers, and says how many it lists. So does one + the server answers in this file alone while another open file of its + language still holds the old name, a row per such file (zls renaming at + a declaration; from a use it reaches every file); + #word("Callstack") (#key("g c") or #key("SPC l b")) opens and focuses `+Callstack`, + with static caller ancestry, tree-sitter signatures and Look locations + for callers and call sites, test callers after the rest at each level; run + in `+Callstack` itself, it shows the next page of a tree too big for one. + #word("CallstackDepth") reports or sets the + runtime depth (1–64, default 8) for subsequent queries. + `CallstackLayout stacked` (the default) aligns snippets below their locations; + `CallstackLayout inline` places the snippets beside them. + `CallstackCorners rounded` (the default) or `CallstackCorners square` + selects the tree corner style for the next query; bare, it switches styles. + #word("Callers") and #word("Callees") keep their short + lists and single-result jumps. + #word("Diagnostics") and #word("Symbols") list the file's in `+Search`; + #word("Lspinfo") fills `+Lsp`, the pane its write answers, with which + server serves the file and its state (`not started yet` until its first + query starts it, `<server> failed recently; retry in Ns` while it backs + off); + #word("Lspwhy") narrates the last query step by step (in `+Lsp`). The + write returns once the answer is in; a pane with no file is refused. +- acme's words run as pardes's where it has one (`Put` is #word("Save"), + `Load` is #word("Restore"), `Delete` a #word("Del") that does not ask); + `Get`, `Putall`, `Zerox`, `Tab` and `Incl` are builtins of their own; the + rest (`Snarf`, `Cut`, `Paste`, `Sort`, `ID`, `Send`, `Indent`, `Local`, + `Abort`) are refused, `invalid: acme's Snarf is not a pardes builtin: ...`, + never run as commands. So is a GUI-only builtin (#word("Fonts")) on + another frontend. +- Anything else is a command line (a typo ends `exit 127`), at most 1024 bytes, run as the guide + says (#doc("tags", section: "command-panes")): typed into a terminal idle + at an empty prompt, else run in a command pane. #file("exec") reads back + the command pane's serial, and while that open stays open the pane is its +own: another client's command in the same directory gets a pane of its +own. The log says `run <serial> <line>` and `exit <serial> <N|?>`. A +reused pane's #file("body") keeps every earlier run + above a `% <line>` row naming each command, so to take only the last + run's output read from after the last `% ` row, leaving out its `exit N`: + #cmd("awk '/^% /{out=\"\"; next} /^exit [0-9?]+/{next} {out = out $0 \"\\n\"} END {printf \"%s\", out}' body") + From a pane whose directory is gone nothing runs: `exec: <dir>: no such directory` (ENOENT). + +The root's #file("look") and #file("exec") act at the pane with the keyboard and log as +that pane's (with no pane at all, in the session's directory: a #word("Look") opens its file, making a column as #word("New") does, and an exec runs its +command there); #file("/pane/<n>/look") and #file("exec") at pane n; +#file("/tagexec") and #file("/col/<n>/exec") click in the workspace's or +that column's tag, run commands in the session's directory, and log as +`-`. A pane's word (#word("Undo"), #word("Msg"), #word("Save")) is refused +at #file("/tagexec") and a column's exec: `not a session control message "Undo": write it to pane/<n>/ctl`. + +A background job (`&`) outlives a command that exits on its own; its +output goes on below `exit N` until it lets go of the pty. #word("Kill") +(root ctl) stops the commands pardes started: bare, all; #word("Kill") `make ls`, +those whose line starts with one of the words. For a command pane it +signals the whole line, `&` jobs included; for a line typed into a shell +only the foreground job (SIGTERM), and the shell decides the rest. With +nothing running, named or not, it says `Kill: nothing running` and the +write succeeds; words that name none of what runs fail it (`Kill: no running command has that first word`). #word("Kill") does not reach a +REPL's code: use `sig INT` on its #file("pty/ctl"). + +== Paths and mounts <mounts> + +#word("Look") resolves the OS filesystem first, then the editor's own tree. +Explicit paths skip that search: + +#pairs( + [`/n/os/proc/self`], [the host filesystem, served as #file("/os/proc/self")], + [`/n/self/pane/2/body`, `/virtual/pane/2/body`], [this session's tree, #file("/pane/2/body")], + [`/virtual/src/pardes.zig`], [sources embedded with `-Dembed-sources=true`, #file("/src/pardes.zig")], + [`/n/peer/pane/2/body`], [a mounted session: the peer's #file("/pane/2/body")], +) + +`--mount=peer=work` or #word("Mount") `peer <dial>` mounts a dial: `unix!/path`, +`/path`, `tcp!<numeric-ip>!<port>`, a session name, or with `-Dquic` +`quic!…`; a missing socket is ENOENT, `no such socket`; +#word("Unmount") `peer` removes it. #word("Mount") dials at once and fails if +nothing answers (`dial failed: no answer`, `timed out`, `hung up`); with no +dial it is `wrong #args`, and any other `x!y` `bad dial address`, both +EINVAL. There are eight named mounts; `os` and `self` are reserved. +#word("Unmount") refuses a mount a pane, a working directory or a pending +#word("Save") still uses. Mounts are dumped. + +A session may open its own tree through a mount (a #word("Look") of `$m/pane/2/body` +from the editor serving `$m`): requests are answered on the connection's +task while the editor waits in its syscall. Through QUIC that still hangs. + += The root ctl <root-ctl> + +Reading #file("/ctl") gives every setting, one a line, in the words a write +takes (#word("Theme") `orchard`, #word("Verbose") `on`, #word("Placement") `acme`, #word("DumpDir") `<dir>`, +#word("Shell") `/bin/bash`, ...), so writing back what it reads changes nothing. +Writes take settings and session builtins (`scope = .session` in +`src/builtins.zig`), acting at the pane with the keyboard: + +- A setting written bare steps to its next value (a switch flips; so do + #word("Placement"), #word("BootShell"), #word("Crt")). A value it does not + take is `bad value in control message; ...` naming what it takes; + #file("/commands") lists them. A setting the frontend cannot show is + refused (`Lift is GUI-only, invalid here`). +- #word("Newcol") makes an empty column right of the keyboard's, halving + it. #word("Joincol") folds the keyboard's column into the one on its + right (its panes go below that column's), `Joincol: no column to the right`. +- #word("Exit") quits. While panes hold unsaved text it refuses once + (#doc("tags", section: "unsaved-panes")): one `unsaved <serial> <name>` + record per pane, then the write fails `<name>: Modified (Exit again to discard)` or `4 unsaved panes: Modified (Exit again to discard)` (EIO), + and the list stays in a `+Unsaved` pane (in the directory of the pane with the keyboard, + or the session's when that directory is not on disk). #word("Restore"), #word("Del"), + #word("Delcol") and a pane's `get` refuse the same way with their own + word, except that #word("Delcol") opens no `+Unsaved` pane: it names the + panes only in its `unsaved` records and its notice. +- #word("Dump") writes `pardes-<date>-<time>.zon` (UTC) in #word("DumpDir"), + logs `dump <path>`, and adds a #word("Restore") `<path>` word naming it to the + workspace tag (the last dump's, replacing an earlier one's). + #word("Restore") `[path]` replaces every pane (bare: the last dump this session + wrote). The #word("Restore") write is answered, then *every connection is hung + up*: dial again, and restart a 9ns mount. The new log has a `new` per + pane, `restore <path>`, then `restored <old> <new>` per pane and + `restoredcol <old> <new>` per column. A dump keeps an unsaved pane's + text and the hash of the file it was read against; a clean file pane's + text is read from disk at #word("Restore"), so a file changed since comes back as + it is now. An unsaved one whose file changed comes back with its own + text, marked changed on disk, and its first #word("Save") asks before + overwriting. A PDF's fit and tint are kept too. A #word("Restore") that fails says why in + the parser's words, a ZON error with its line (`line 3: expected ','`), + so the errno a mount gives depends on them (usually EIO): read the `err` + record for why. A #word("ThemeFile") the dump names that fails to load changes + nothing. +- #word("Kill") `[word...]` (above), #word("Mount") `name dial`, #word("Unmount") `name`, #word("Theme") `x`. +- `size C R` sizes a `--detach` session no frontend is attached to (160x50 + until then): from 20x6 to 4096x4096, else `invalid size`; refused while a + frontend owns the size, and when a column would lose its panes' minimum + rows (`size: too small for the panes, each its tag and 2 rows`). A bad + `size` is refused quoting the value it got (`"5 2"`). + +A word that takes its argument after a `+` (#word("Tty+bash")) works on a ctl as +in a tag. A write is refused whole, before anything runs, in Plan 9's +words: +`unknown control message "X"`, `wrong #args in control message "X"`, `bad value in control message ...`, or a word of the other ctl: `not a session control message "Undo": write it to pane/<n>/ctl`, `... "Delcol": write it to col/<serial>/ctl`, `not a window control message "X": write it to /ctl`. A builtin that would open a prompt (#word("Save") on a scratch) +fails `control message needs its argument "Save"`. A line that fails as it +runs fails with the editor's words (`Mount: already mounted`, `Save /root/x: access denied`), changing nothing. + +== Settings <settings> + +A setting that chooses among words (`on`/`off` switches, +#word("Placement"), #word("BootShell"), #word("Crt"), #word("Bloom"), +#word("Vignette"), #word("Grain"), #word("Lift"), #word("Motion"), +#word("ShaderAnimation")) steps to its next value when given bare, as its +word clicked in a tag does. The same lines go in the startup file +(#doc("config")). + +#pairs( + [#word("Theme") `<name>`], [`orchard`; names as #word("Themes") lists them, #word("NextColor") steps to the next in that list (#doc("themes"))], + [#word("ThemeFile") `<path>`], [a `.zon` theme, relative to the config directory; reloads live when saved], + [#word("FocusTint")], [on: tint the focused pane's and column's tags], + [#word("SyntaxBold")], [off: bold syntax keywords], + [#word("Verbose")], [on: a builtin announces its name on the message row], + [#word("MessageAnimation")], [on: messages ease in and dissolve], + [#word("MessageLinger"), #word("MessageFall"), #word("MessageDissolve")], [800, 180, 150 milliseconds, at most 60000], + [#word("PagerColor")], [on: the next paged text keeps its colours], + [#word("ProgramEsc")], [off: in a raw terminal #key("Esc") goes back a pane and #key("Shift-Esc") is the program's Esc; on swaps them, and #key("Esc") goes back only at an empty shell prompt], + [#word("Pager") `pardes|off`], [`pardes`: what a terminal's commands page through, `pardes -`; `off` leaves `PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` as the environment has them (#doc("fs", section: "pardes-stdin")). It applies to terminals started after it], + [#word("Placement") `acme|pardes`], [`acme`: where new panes go (#doc("fs", section: "placement"))], + [#word("BootShell") `keep|replace`], [`keep`; `replace` closes the untouched lone shell a dragged document lands beside], + [#word("LookWord") `search|list`], [`search`: a word given to #word("Look") selects its next place, or lists all in `+Search`], + [#word("DirLook") `pane|terminal`], [`pane`: #word("Look") on a directory opens a pane listing it, as acme's directory window (#doc("reference", section: "from-acme")); `terminal` types `ls` into a terminal idle there, else opens one], + [#word("JumpScope") `file|all`], [`file`: #word("Back") and #word("Forward") keep to the focused pane's file, that pane's places first, then the file's in another pane, and go to another file only when the file has no place left that way; from a terminal or a pane with no file they step through every place; `all`: every place, in the order it was jumped to], + [#word("TermImages") `real|petscii`], [`real`: a new terminal draws its program's kitty graphics (yazi's previews) as pixels where the shell can; #word("Petscii") flips one terminal; a tty under a terminal without kitty graphics draws them as glyph art either way], + [#word("Shell") `<name or path>`], [`$SHELL` when it is executable, else `/bin/sh`: the shell the next terminal and command pane run; a bare name is searched for in the usual bin directories, not `$PATH`; bare #word("Shell"): `$SHELL` if it is executable, else `/bin/sh`], + [#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: where #word("Dump") writes, an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default], + [#word("TreeContext")], [off: sticky declaration headers in a source pane (per pane, dumped)], + [#word("TreeContextTagStyle")], [on: draw those headers in the tagline style], + [#word("LocationsConfig") `...`], [the layout of #word("Grep"), search and language-server results (below)], + [#word("Wrap"), #word("Colors"), #word("Tagbottom"), #word("Debug")], [toggles], + [#word("Font") `<name>[:<size>]`, #word("Fonts")], [SDL and macOS only; size 8-72 (pixels in SDL, points on macOS)], + [#word("TaglineSize") `<1-100>`], [82: tagline face, percent; SDL and macOS], + [#word("WindowOpacity") `<0-100>`], [100; SDL only: everything but text and the cursor], + [#word("Ligatures")], [on; SDL only, macOS draws CoreText's own], + [#word("Pet") `cat|frog|off`], [off; SDL only: a sprite in the workspace tag's blank space], +) + +#word("LocationsConfig") with no argument prints the current settings as a line +that can be run again; with fields it changes only those: +#word("LocationsConfig") `context:5 tscontext:on tslocations:off layout:stacked`. +`context` (0) is the source lines shown above and below each match; +`tscontext` (off) includes the enclosing tree-sitter declaration headers; +`tslocations` (on) shows a location on each declaration header; `layout` +(`stacked`) puts the location on its own line, `inline` beside the source, +padded in groups of eight matches. An invalid field rejects the whole line; +a repeated field's last value wins. The settings survive #word("Dump") and #word("Restore"). +Source analysis is cached for 64 files and 64 MiB. + +*Effects.* Panel transitions, one at a time, running the active one again +turning it off: #word("PanelSlide"), #word("PanelZoom"), +#word("PanelDissolve"), #word("PanelAscii"), #word("PanelVertical"), +#word("PanelEdges"), #word("PanelFall"), #word("PanelWave"), +#word("PanelCurtain"), #word("PanelScramble"), #word("PanelType"); all +start off, and the web shell has none. Scene passes (the SDL window, and +one attached to a detached session), each at a level 0-3 (`on` is 2), all +off: #word("Crt"), #word("Bloom"), #word("Vignette"), #word("Grain"). +#word("Shader") `<file.glsl>` adds a Shadertoy file written for ghostty to the +chain (#word("Shader") `off` removes it; it recompiles when saved); +#word("ShaderAnimation") `off|on|always` says when the chain animates by itself. The +focused pane can stand off the page: #word("Lift") `shadow|rim|auto|off`, +#word("InactiveDim") `<percent>`, #word("Motion") `off|crisp|smooth|bouncy|playful` (default +`smooth`), #word("SelectionGlow"), #word("HoverGlow"), #word("Occlusion"), +#word("Parallax"), #word("JumpTrail"), #word("ChipShadow"), +#word("ThumbFlash"), #word("CursorBlink"), #word("GripWidth") `<50-300>`. Most are +the GUI's; #word("InactiveDim") works everywhere, and #word("JumpTrail"), +#word("ChipShadow") and #word("ThumbFlash") are the terminal's. No effect +may lower the contrast of text, the selection or a focus indicator. +#word("EffectCode") `<effect>` lists that effect's sources under `/virtual` when the +build embeds them. + +Resting the pointer on text for about 32 ms (`look_preview_delay_frames`, +2 frames, in `src/config.zig`; `null` turns it off) tints what #word("Look") would take, with no other effect. A terminal's or a `+Pager`'s +#word("Filter") keeps each foreground at least `tty_filter_min_contrast` +(WCAG 1.5, `src/config.zig`) against its background. + += Columns and tags <columns-and-tags> + +#file("/layout") has a line per column, left to right: `serial index x width current|notcurrent empty|full pane-serials...`, then `active <serial>` (the active column: where #file("pane/new") and a look put the +next pane; `-` when none). `current` is the column with the keyboard now, +which may differ from the active one (#doc("tags", section: "command-panes")). +#file("/index")'s last field is each pane's column serial. + +A session holds 16 columns (`no space for a column: 16 max`, ENOSPC), each +at least 10 cells wide, so 16 wants a window 160 cells wide or more. +#word("Newcol") halves the column it is run from, and one under 20 cells +does not split (`this one is too narrow to split`): reach 16 by writing +#word("Newcol") to the widest column's #file("exec") each time, not to the +root's, which keeps halving the one just made. #word("Newcol") is refused +as well when a narrower column would wrap its panes' tags onto more rows +and leave one under its tag and two rows (`Newcol: no space for a column: the panes' tags would not fit`); a refused #word("Newcol") logs its `err` +alone and uses up no column serial. + +#file("/col/<n>/ctl") takes #word("Delcol"), #word("Joincol"), +#word("New") and #word("Tty") for that column; #file("/col/<n>/exec") is +a click in its tag; `rmdir /col/<n>` closes an empty column (one with +panes: ENOTEMPTY). Closing a column's last pane leaves it empty (the +keyboard goes to its tag, #file("focus") reads empty, the log says only +`del`); closing the session's last pane quits pardes. The log says +`newcol <serial>` and `delcol <serial>`. + +#file("tag") files (#file("/tag"), #file("/col/<n>/tag"), +#file("/pane/<n>/tag")) read the whole tag, with no newline after it. A +pane's starts with its computed path (an image's with its mode words, a +PDF's with its page), then the editable text. `>` replaces the editable +text (the default words too: `echo Make > tag` leaves only `Make`) and +drops the one newline that ends it; `>>` appends, so +`printf ' Make' >> tag` (the blank matters; `echo` would start a second +line). A pane tag may hold several lines; a column or workspace tag is +one, a newline written into it becoming a space. Control characters other +than tab, DEL, C1 controls and non-UTF-8 bytes are refused (`invalid tag text`). The editable text is at most 4096 bytes (`no space: over 4096 bytes`, ENOSPC; the log says `err <serial> tag: no space: ...`). All +three kinds take the same checks, whole or not at all, and a `>` whose +write is refused changes nothing: its truncation is done with the write +that fits, or at the close (or a read) when none came. Each write stands +on its own: in a `>` cut into several writes, those taken before a refused +one stay in the tag; only the refused write changes nothing. A clear is an +ordinary edit and #key("u") in the tag undoes it. + += Panes <panes> + +*Making and closing.* Opening #file("/pane/new") makes a scratch +`<dir>/+New` (the session's directory), and reading that open answers its +serial: `n=$(cat $m/pane/new)`. *Each open makes another pane*; two reads +of one open answer the same serial. It goes where a #word("New") from a +tag would (#doc("fs", section: "placement")): in the active column, +filling it if empty, else the bottom half of its last pane. A session +holds 64 panes (`no space for a pane: 64 max`), and every pane keeps its +tag and 2 rows (`no space for a pane in that column: each keeps its tag and 2 rows`); both are ENOSPC, for this open and for #word("Look"), #word("Exec"), +#word("New") or #word("Tty") alike. A #file("pane/new") whose column is +full takes its rows from a pane in another column that has them, last +column first, as acme does, and is refused only when no pane anywhere can +give them. `rmdir /pane/<n>` closes the pane, unsaved or not. + +*#file("name")* reads the file name (a terminal's directory); a write +renames the buffer (relative to the pane's directory) and marks nothing +dirty; #word("Save") then writes under the new name. A name takes any byte +a file name can hold, blanks, control bytes and bytes not UTF-8 included, +so what #file("name") reads writes back as it was; refused (EINVAL) are +an empty name, a NUL (`bad character in file name: an +empty name`, `...: a NUL`) and a second line, by the write that brings it (`invalid file name: one name a write, on one line`). Up to +255 bytes a component. A name that can never be valid (a terminal's, a +component over 255 bytes, a path too long) is refused by the write that +holds it. The ctl word `name x` takes all after its one +blank; a second blank there is refused rather than read as the name's +first byte. A directory (`/`, `~`, `foo/`) is no file name: refused, +EISDIR (`name: /home/u is a directory, not a file`). + +*#file("body")* reads the text; a write appends; `>` (OTRUNC) replaces it +all. A terminal's body is its history as plain text in logical lines +(wrapped rows joined), frozen per open; writing it sends input to the +child as typed keys, never a paste: no bracketed-paste marks around it, +even when the program asked for them, so a newline in it is Enter. A PDF's +body is the text layer of the page shown, each line of the page's text a +line of the body, read-only: it is no text of the +pane's, so #file("addr"), #file("data"), #file("dot") and a `file:<addr>` #word("Look") do not address it (a PDF's `:<n>` is its page); images and PDFs take +no write (`this pane has no text`). + +*Image panes.* An image pane's tag reads `img petscii:on|off +palette:commodore|terminal ascii:on|off <path>`. `petscii` says what is +drawn: glyph art (`on`) or pixels (`off`). With no graphics it is always +`on`; #word("Petscii") `on|off` chooses for when graphics are there. `palette` is which 16 +colours the glyph art uses, the C64's (`commodore`) or the terminal +theme's own 16 (#word("Palette") toggles it); `ascii` is whether the +printable ASCII bitmaps join the glyph set the matcher picks from +(#word("Ascii") toggles it). #word("Palette") and ascii only change the glyph art. +#word("Petscii") and #word("Ascii") (`on|off`) and #word("Palette") +(`commodore|terminal`) take the value their tag word shows and set it, as +a PDF's #word("PdfFit") (`width|height`) and #word("PdfTint") +(`disabled|filtered|full`) take the value its ctl read shows; bare, they +step to the next. +A terminal pane showing kitty graphics shows `petscii:on|off` after its +directory in its tag, saying the same, and #word("Petscii") chooses there +too. A terminal with no images shows the word only while #word("Petscii") +is on. + +*#file("sel")* reads the selected text; a write replaces it and leaves +the written text selected, and one open's writes run on from the last. +*#file("errors")* is write-only: text appended to the directory's +`+Errors` pane (logged as `msg` records when no column has room). + +*#file("focus")* (root): a serial written gives that pane the keyboard and +makes its column the active one (a folded pane stays folded); `no such pane`, or `ill-formed control message` for a non-number. It reads empty +while a column or workspace tag has the keyboard. + +*Pane ctl.* Reading it gives acme's status line: serial, tag length, body +length, isdir (1 for a directory pane, else 0), dirty, width in cells, font, tab width, undo available, +redo available, then `current`/`notcurrent`, a REPL's id if bound, +`collapsed` when it is, and for a PDF `fit:width|height +tint:disabled|filtered|full`. Each field ends in a blank and the line has +no newline, as acme's has none (`cat ctl; echo`). It +takes: + +- the pane builtins: #word("Del") (from the keyboard between two panes it + asks which takes the rows, the question on the notice band after 400 ms + and in the log at once as `ask`; a click, a ctl write or an `init` line never + asks and gives them to the pane above; #word("Del") `k`/#word("Del") `j`, or + #word("DelAbove")/#word("DelBelow"), give its rows to the pane above or + below), #word("Save") `[path]` (bare, on a `+`-named pane that is no output, + such as `+Tutor`, it asks for a path; making the directories the file goes in first, + whichever name it writes), #word("Collapse"), #word("Undo")/#word("Redo") + (256 steps each), #word("Find") `pat`, #word("Edit") `...`, #word("Tty") `[shell]` (a new terminal + in its directory), #word("Delcol") for its column, and + #word("Left")/#word("Right")/#word("Up")/#word("Down"), which give the + keyboard to the pane beside it that way, up from a column's top pane to + its tag; #word("Window") (#key("Ctrl-w"), #key("SPC w")) picks the pane + first: #keys("h", "j", "k", "l") move an outline, #key("Enter") or + #key("Esc") or a pane's letter focuses, #key("d") is #word("Del") and + #key("c") #word("Collapse") on the outlined pane. +- `get`: reload from the file (refused once over unsaved edits, `<name>: Modified (get again to discard)`). It is an undo step, so #word("Undo") brings back what was there: the sure way back to the file on disk. +- `lock`/`unlock` (acme's). The lock binds only clients that take it and + belongs to the open that wrote it: `exec 3>$pane/ctl; echo lock >&3; ...; exec 3>&-`. A `lock` another open holds fails at once, `file in use` + (EBUSY): retry. +- `answer <choice>` to the question the pane asks on its message row, + logged `ask <serial> <what> <choices>` (`ask 4 del k j`, `ask 4 repl a b`, `ask 4 save path`); `answer -` takes it back. +- acme's lowercase ctl words, done by what replaces each: `name x`, `put` + (#word("Save")), `clean`/`dirty`, `del`, `delete` (no asking), `dot=addr`, + `addr=dot`, `limit=addr`, `mark`/`nomark`, `show`, `cleartag`. `dump`, + `dumpdir`, `font`, `menu`, `nomenu` are refused, EINVAL. These lowercase + words are ctl-only: written to an #file("exec"), `del` is a command line. + +A file changed on disk reloads by itself only when the buffer has no +unsaved edits; otherwise it stays dirty, says `<name> changed on disk (get reloads it, Save overwrites it)`, logs `changed <serial>`, and its next +#word("Save") warns once. A file whose disk text is what the pane was read or saved as is no change: an #word("Undo") back across #word("Get") `file` or `e` to unsaved edits says nothing changed, and #word("Save") writes it. + +== Addresses and data <addresses> + +#file("addr"), #file("dot") and #file("limit") read the pair of byte +offsets they take, so copying one onto another (`cp $p/addr $p/dot`) is +acme's `dot=addr`. A write is a pair or an address expression; a pair is +checked as an address is, `addresses out of order` (`5 2`) or `address out of range` (past the text), never clamped. #file("addr") names where +#file("data") reads (to the end of text) and the range #file("xdata") +reads; #file("dot") is the selection (moving it scrolls the pane there); +#file("limit") bounds the end of a forward search and reads empty until +set. Truncating #file("dot") empties it, truncating #file("limit") lifts +it. + +- A write to #file("data") or #file("xdata") *replaces* the #file("addr") + range (`>` and `>>` alike); `: > data` deletes it. Truncating + #file("data") is pardes's own (acme ignores OTRUNC there); only + truncating #file("body") empties the buffer. +- A write leaves #file("addr") just past what it wrote, so a second + `echo x > data` inserts after the first: write #file("addr") before each + replacement. A read of #file("data")/#file("xdata") moves #file("addr") + past what it read. +- #file("addr") belongs to the pane, not the client, and neither an open + nor a truncation resets it (acme resets on first open): each + `echo /re/ > addr` searches on from the last, so a find loop advances. + Write `0` to start at the top; searches wrap, so stop a loop when the + address comes back or set #file("limit"). +- A failed address leaves *no address*: #file("addr") reads empty and + #file("data")/#file("xdata") refuse (`no address: the last one written to addr failed`) until a standalone address (`2`, `#0`, `/re/`) is written, + so a missed target is never written at the old one. + +Addresses are sam's: `#n`, a line number, `/re/`, `?re?`, `-/re/`, `$`, +`.`, `0`, ranges `a,b` and `a;b`, `+`/`-`. They are evaluated from the +current address (the last written to #file("addr"), or just past the last +#file("data") write), not from the selection. pardes adds `12:5`: line 12, +*byte* column 5 from 1, clamped to the line's end (`12:0` is `address out of range: a column counts from 1`); it composes (`12:5,14:1`). A tool's +character column matches only on an ASCII line; elsewhere use `12/name/` +or `#n`. A row of #word("Recent"), `+Search` or the #word("Jumplist") +spells a range `12:5-14:2` (through 14:2 inclusive) and #file("addr") +takes it as such. + +Offsets and counts are bytes everywhere (acme counts runes), but every +address lands on a rune boundary: `#n` or `L:C` inside a rune snaps to its +start, a match covers the runes it touches, and a combining mark or a +CRLF's `\r` is addressable alone. + +Refusals: `invalid address: this pane has no text to address` (#file("addr"), #file("dot") +and #file("limit") on a terminal, an image or a PDF), `bad address syntax`, `no match for regexp`, `address out of range`, `addresses out of order` (`#100,#50`), `bad regular expression`. + +sam details kept: `$-1` is the last line when the text ends in a newline, +else the one before; with a final newline the empty place after it is a +line (`1` of an empty text is `#0,#0`, so #word("Edit") `1i/x/` works on an empty +file); `2,1` is an empty range at line 2's start; `/^/` finds the empty +place after a final newline; a pattern that can match empty (`^`) passes +over the match where the search starts. + +== Regular expressions <regexp> + +Patterns are mvzr's (classes, `\d\w\s`, `{m,n}`, lazy `*?`), searched as +sam searches, line by line: `^` and `$` match at any line's start and end, +`.` and `[^...]` never match a newline. The same code (`src/regexp.zig`) +serves addresses, #word("Edit"), and normal mode's #key("s") and #key("S"). The +ceiling: + +- The leftmost match wins, but among alternatives the first that matches, + not sam's longest (`/gam|gamma/` finds `gam`). mvzr keeps no submatches, + so #word("Edit")'s `s` has no `\1`-`\9`. +- A pattern holding `\n` runs over the whole text: there `^` may only come + first and `$` only just before a `\n`, else it is refused. +- An alternation must anchor every branch with `^` or none (`^def|^ ` + works, `^def|x` is refused: `an alternation anchors every branch with ^ or none`). A `$` does not count: `foo$|bar` is fine. +- A class may hold non-ASCII runes (`[éa-z]`, a range up to 256 runes); a + wider range or a negated class with one (`[^é]`) is refused. +- At most 512 operations (about 512 characters, counted after that + rewriting): `bad regular expression: longer than mvzr's 512 operations (about 512 pattern characters)`. +- Each search has a step budget (about 300 ms; each search of an #word("Edit") `x` + its own): `regular expression search took too much time, gave up`. What + runs out is exponential backtracking (`a?` twenty times then twenty + `a`s) or a quadratic pattern over a very long line. + +== Edit <edit> + +#word("Edit") `<sam commands>` on a pane's #file("ctl") or #file("exec") (or the +root's, at the pane with the keyboard) runs acme's #word("Edit") over the open text +panes, from that pane's body. Addresses are as above, and `"re"` is the one +open file whose line matches. Commands: + +- `x y g v c a i d s p = m t u` and `{ }`. +- `X`/`Y` run a command in each open file whose line (` +. /path`, `'` when + edited) matches, or does not, in the order the panes were opened (as + #file("index") lists them): `X/'/w` writes every edited file. +- `b` makes a file current; `B` opens files, every name checked before any + opens; `D` closes panes (an edited one on the second asking, as + #word("Del")). +- `e` loads a file over the whole text as #word("Get") `file` does, once the + rest of the Edit is done: the pane takes its name and is clean, one undo + step puts both back, and unsaved edits are asked about once (a scratch + under 100 bytes is not); the file + takes no other command in that Edit. `r` reads a file over dot. `w` writes + all of it, or the address, to its file or a name; all of it to its own + name leaves it clean. A `w` to its own file changed on disk since it was + read is refused once, as #word("Save") is (`modified on disk since read (w + again to overwrite)`), and the next `w` writes it; in an `X` the other + files are written, and the refusal names those it left. `f` names the pane and prints its line. File names + are relative to the file's directory, and `~` is the home directory. +- `<cmd` replaces dot with what `cmd` writes, `|cmd` pipes dot through it, + `>cmd` sends dot to it and prints what it writes. + +Each command runs in its file's directory through #word("Shell"), off the +loop, so the editor goes on, with what a pane's command is given: +`$PARDES_MOUNT`, `$PARDES_9P`, `$PARDES_PID`, and `$winid` the Edit's pane. The write that ran the Edit is held and +answered when they are done, its connection serving other requests +meanwhile (a command may read the session through its mount). A command +that writes the #file("ctl") its Edit came by needs `<>` on both sides, the +Edit's write (`exec 3<>$p/ctl; echo 'Edit ...' >&3`) and its own (`1<>`): +with `>` or `>>` on either, the kernel holds the second write until the +first is answered, the command is stopped at its 10-second limit, and the +Edit fails (EIO), changing nothing. For the same reason a second Edit written +with `>` to that #file("ctl") waits for the first to finish rather than being +refused; through its own `<>` open, or another pane's #file("ctl"), it is +refused `busy` (EBUSY) at once. A flush of the Edit's write (an interrupted +writer) kills the commands and changes nothing. +Such an Edit is a write of its own: one with other lines is refused before +any runs. One Edit's commands run at a time in a session, at most 1024 of +them. While they run, an Edit with no commands runs as usual unless it +would change, undo, rename, close or write a file the running one changes; +that, and a second Edit with commands, is refused `busy` (EBUSY), as are +#word("Del") (acme's `delete`), `rmdir`, #word("Undo"), #word("Redo"), #word("Get") and #word("Zerox") on a pane +it changes or runs a command on; a session that ends lets the commands go. A command that fails (an exit status, 10 seconds, 1 MiB of output) +fails the Edit, its stderr in `+Errors`. Each file's changes are one undo step, applied only if +every command succeeds; a failure changes nothing and fails the write with +acme's words (`Edit: no substitution`), as does a file edited while the +commands ran. An `x` that finds nothing succeeds silently. `p`, `=` and `>` +print to the directory's `+Errors`. Not there: `B <cmd`, `D <cmd`, the `'` +address, `\1`-`\9`. In `s`, `&` is the match (`\&` a literal); in `c`, `a`, +`i` it is a literal. `y` yields the stretch before the first match too. +Braces take a command a line, so a block goes on one open, in one write or +several: +#cmd("printf 'Edit ,x/foo/{\\ni/</\\na/>/\\n}\\n' > $p/ctl") + +== Flags and undo <flags> + +#file("dirty"), #file("mark") and #file("scroll") read and take `0` or +`1`: the buffer differs from its file (a file deleted on disk counts); a +write pushes an undo point (writing `1` pushes one now); a write scrolls +the pane. #file("/index")'s dirty flag is #file("dirty"); a `+New` scratch +reads 1 but holds up nothing under 100 bytes. + +The writes of one open of #file("data"), #file("xdata") or #file("body") +are one undo step (so a multi-line `printf` is one), as long as no other +client or keystroke edits the pane between them: such an edit ends the +step, and the open's next write starts another. To make a loop of opens +one step: `echo 1 > mark` (a point now), `echo 0 > mark`, the writes, +`echo 1 > mark`. + +== event <event> + +Holding #file("event") open takes the pane's #word("Look") and #word("Exec") clicks: they +come to the reader as records instead of acting, as do lines written to +the pane's own #file("look")/#file("exec") (or the root's while it has the +keyboard). A record is acme's `<origin><action><q0> <q1> <flag> <n> <text>\n`; read `n` *bytes* of text, which may hold newlines. Reads may be shorter +than a record: a record arrives in pieces across reads, so a shell's +`read` loop works. One open +reads a pane's #file("event") at a time, as acme's is one window's: a +second open for reading fails `file in use` (EBUSY) until the first is +closed. A reader whose pane has closed reads EOF. + +- origin: `E` a 9P write to body or tag, `F` other files and the editor's + own lines, `K` keyboard, `M` mouse. +- action: `X`/`L` #word("Exec")/#word("Look") in the body, `x`/`l` in the tag (offsets + into the whole tag, path included), `I`/`D` body text inserted/deleted, + `i`/`d` the tag's. +- flag: 1 the text's first word is a builtin, 4 (#word("Look")) a file name or + address, 8 (exec) chorded: two records follow, the argument and where it + came from. pardes never sends flag 2. +- A written line, or a click in a terminal's body, has no place: `0 0` + with its text (`FX0 0 1 6 Msg hi`). + +Write a record back to have it done as the click would: `<o><a><q0> <q1>\n` acts on that range (the last record of a write needs no newline), +and an empty one (`MX12 12`) on the word or file name a click there expands +to; the whole record as read acts on its text (the only way for `0 0`). A +chorded record with its two follow-ups, in one write or three, runs once +with its argument. A record written back that runs a builtin which fails +(a refused #word("Del")) fails the write, EIO with its `err`, as an +#file("exec") write would. `I`, `D`, `i`, `d` are refused; the origin must be `E`, `F`, `K` or `M`, +and a number larger than a range can hold is refused `bad number`, +EINVAL. A helper holding +#file("event") that writes its own pane's #file("exec") gets its command +back as a record: run it through #file("ctl") instead. + +== REPLs <repls> + +#word("Repl") `python` on a terminal's #file("ctl") (or in its tag) binds it as +that language's REPL: #word("Exec") (or #key("Tab")) on a `.py` body +then types the text into the REPL instead of running it; builtin words, +tag words, #word("Exec") `<text>` and #raw("@`cmd`") words still run. #word("Repl") +takes the languages a code fence names (ada, bash, c, c_sharp, clojure, +cpp, css, elixir, erlang, fortran, go, haskell, html, java, javascript, +json, kotlin, ocaml, markdown, pascal, php, powershell, python, ruby, rust, +scala, typst, zig) and aliases such as `py` and `sh`. Its tag and +#file("ctl") line show its id, `python-a`. #word("Repl") `-` unbinds, bare +#word("Repl") says the binding. With several bound, the pane asks (`ask <serial> repl a b`). Bindings are not dumped. + +A 9P #file("exec") is never sent to a REPL. A script either writes the +event record `MX<q0> <q1>` to the `.py` pane's #file("event") (sent as the +click would be), or writes the REPL's #file("pty/data") itself: multi-line +code as a bracketed paste, `\e[200~<code>\e[201~`, then `\r` in a separate +write once the REPL has echoed the paste; a paste of more than one line +not ending in a newline needs a second `\r`. Line by line, a blank line +ends a Python block and Python 3.14 auto-indents each line. + += Terminals <pty> + +Terminal panes also have #file("pty/"): + +- #file("pty/data"): write bytes as typed (`printf 'ls\r'`, `\x03` is + Ctrl-C); read the live output stream (a consuming queue shared by + readers, not a replay). +- #file("pty/status"): one line, `cols rows busy`; busy is 1 while a + command runs or text is typed at the prompt. A terminal whose program was + killed on the alternate screen is at its prompt once the shell draws one + there: busy is 0, and the next #file("pty/run") reads its output whole. +- #file("pty/ctl"): `winsize C R` (at least 2 rows, fewer refused `invalid winsize: at least 2 rows`; at most 4096 a side), `sig INT|TERM|HUP|QUIT|KILL`, `exec` (restart the shell in its directory: + refused on a command pane, `a command pane does not restart`; `exec: <dir>: no such directory` if it is gone; a shell that cannot start fails + and leaves the old one running). +- #file("pty/run"): one line a write (two lines in one write are refused + whole; through a mount a shell's `printf` of two lines arrives as two + writes, so the first runs and the second is refused EINVAL), at the + shell's prompt, answered on the same + open: #cmd("exec 3<>$m/pane/$n/pty/run; echo make >&3; cat <&3; exec 3<&-") + The answer's first line is the header: `exit N` then the command's output + (as the screen showed it: no colour, tabs expanded to blanks, `\r` + progress collapsed, trailing blanks dropped; a paging command's text + goes to a `+Pager` pane through the terminal's `pardes -` pager; the last 64 KiB, `exit N cut M` when M bytes were left + out, bare `cut` only when the start of that output scrolled out of the + scrollback; after a `clear`, the answer is what the command printed from + the clear onward). Or: `busy: <program> is running` (bare `busy` when text is typed at the prompt, `busy alternate screen` on the alternate screen with no prompt drawn), + `exit ?` (no status reported, not a success), `error not run` (the shell + refused the line, e.g. a fish syntax error), `error shell gone`, `error no prompt marks`, and on a command pane `error a command runs here, not a shell` (`error command done; not a shell` once it ended). A line written + before a fresh terminal's first prompt waits for it. One line per run; a + second line before the answer is refused. + +#file("pty/run") relies on the OSC 133 marks pardes injects into bash and +fish; `exec zsh` or a continuation prompt never reports an end, so cancel +the read. A program on the alternate screen (vim, less) leaves no output. +A program holding the terminal (a REPL, `less`) takes no run: write to +#file("pty/data"). + += The log <log> + +One 64 KiB ring, one record a line, kept whether or not anyone reads it. +An open freezes it and reads to EOF. Write `follow` to that open to then +wait for each new record (`follow new` skips the history, as `tail -n0 -f`); `tail -f` never writes `follow`, so it sees nothing new. A follower +the 64 KiB ring outran (it keeps only the newest records) reads `lost N` first. A #word("Restore") hangs the follower up: dial +again and read from `restore <path>`. A follower's read held when the +#word("Restore") comes takes every queued record that fits first, so records written +just before the #word("Restore") are not lost. + +#pairs( + [`new <serial> <name>`, `del`, `rename`, `save`], [a pane made, closed, renamed (a terminal's too, as its shell changes directory), saved (#word("Save") `path` of a copy: `save <serial> <path>`, the path written)], + [`newcol <serial>`, `delcol <serial>`], [a column made or closed], + [`msg <serial|-> <text>`], [the editor said something (not a builtin's own name under #word("Verbose"))], + [`err <serial|-> <file>: <why>`], [a write was refused or failed], + [`run <serial> <line>`, `exit <serial> <N|?>`], [a command pane's command started and ended; also a terminal whose shell exited, before its `del`], + [`send <from> <to> <repl-id>`], [text went to a REPL], + [`ask <serial> <what> <choices>`, `answer <serial> <choice|->`], [a pane asked, and was answered (`-`: taken back, or the pane closed)], + [`changed <serial> [reloaded|deleted]`], [its file changed on disk (bare: under unsaved edits)], + [`unsaved <serial> <name>`], [a pane an #word("Exit"), #word("Restore"), #word("Del") or #word("Delcol") refused over, before the `err`], + [`dump <path>`, `restore <path>`], [a #word("Dump") written; a #word("Restore"), after its panes' `new`s], + [`restored <old> <new>`, `restoredcol <old> <new>`], [serial maps after a #word("Restore")], +) + +The serial is the pane the line ran at (the pane with the keyboard for the root's +#file("look")/#file("exec")), `-` for the root #file("ctl"), +#file("/tagexec") and column files. A record said again straight after +itself is counted, `err 3 addr: no match for regexp (x4)`; a follower sees +each count as a new line. A `msg` is cut at 256 bytes and an `err` reason +at 200, ending in `…`. Control characters become spaces. + += Other files <other-files> + +- #file("/screen"): JSON `cols`, `rows`, `cursor`, `styles`, and row-major + `cells` of `[grapheme, style_index]`; one frame per open. Compare a + cell's style through `styles`, not the index. +- #file("/commands"): `Word [arg] root|pane|both [values] -- sentence`, one + a line, generated from the builtin registry (`both`: #word("Edit"), at the active + pane from the root). +- #file("/recent"): up to 200 files, PDFs and images, most recent first, + `open <path>` or `closed <path>` (open in this window or not), every + window's: kept in `$XDG_STATE_HOME/pardes/store`, shared by every pardes + process, each reading what the others wrote when it is next read. + #word("Recent") lists them in a query pane (line 1 `Recent`, the rest + narrowing them by a fuzzy match), an open one at its dot now and a + closed one at its last (a PDF's is its page); a #word("Look") of a row reopens it + there. +- #file("/status"): `pid`, `version`, `panes`. +- #file("/pager"): write a directory, `~` expanded and resolved (an empty + line is the session's; one not there is refused ENOENT, a relative one + EINVAL, one you may not write `permission denied`, a regular file `not + a directory`, ENOTDIR), one line; what follows that line, on the same open, is the text to + page, escapes and all. A read of that open answers the serial of a new + `+Pager` in the directory, once the text is in. This is what + `pardes -` uses; from a directory you may not write, it pages into a + `+Pager` of the session's. +- #file("/listeners"): the session's dial addresses, a line each + (#doc("building", section: "listeners")). +- #file("/os/"): existing regular files take read, write and truncation to + zero; create, remove, rename and mode changes are refused as not + permitted (`permission denied`, EACCES through a mount); ownership is + synthetic. Linux v9fs's truncation `mtime` hint is accepted and dropped. +- #file("/src/") (and #file("/shaders") on GUI builds) with + `-Dembed-sources=true`; #word("EffectCode") `<effect>` lists an effect's files + under `/virtual`. + += The pardes command <command-line> + +In a pane's shell (`PARDES_PID`, `PARDES_9P` and `PARDES_PANE` set), +`pardes FILE` writes FILE to that pane's #file("look") and returns at once; +a FILE not there yet opens an empty pane that #word("Save") creates, making +its directories. What the session refuses (a bad name; a name under a +directory you may not search or write, `permission denied`) is printed and +the exit is 1. `--` ends the options (`pardes -- -name`). +`pardes --wait FILE` (`-w`; bare, it says it needs a FILE) returns 0 when the pane showing FILE is +deleted, 1 when the session goes away (against a dead `$PARDES_9P` it +says the session is gone); with +`PARDES_9P` set but no pane of its own it opens FILE in that session and +waits there. Bare `pardes` in a pane refuses and names `--nested`, which +starts a separate session whose shells do not forward to it. + += Placement <placement> + +#word("Placement") `acme` (the default) puts a new pane in the column whose tag +asked, else the active column (last typed or left-clicked in, +dropped into, its tag given the keyboard, or given the last new pane), +never a new column. An empty column it takes whole; #word("New") and +#file("pane/new") take the bottom half of the column's last pane; a pane +opened from a pane's text (#word("Look"), #word("Tty"), #key("Alt-n")) goes under +the pane with the most blank rows, or halves the biggest. #word("New") in a +pane's tag names its `+New` in that pane's directory and column; from a +column tag, in that column and the session's directory. A command pane +goes to the last column, or the column whose tag ran it, under either +placement. #word("Placement") `pardes` fills an empty column whose tag asked or has +the keyboard, puts a scratch or a shell under the pane that asked, and a +document beside the last one read (or in a column of its own on a wide +screen). No pane is made shorter than its tag and two rows; with no room +the pane is refused. + +A command pane runs in the directory it started in, whatever its command +does with `cd`, and a relative #word("Look") in it resolves there. The next command +for that directory reuses a finished one (from a column tag, only one in +that column); one still running, one a background job still prints to, or +one a #file("exec") open still holds is never reused. In a command pane, #key("n") walks that pane's own `file:line` places first (make's errors), whichever pane was walked last, then on through the others. + += Find and Grep <find-grep> + +Both fill the asking pane's query pane (#doc("guide", section: "search")), +line 1 `Find name` or `Grep text`, and run on a worker thread, never on +the loop that draws: `rg` when it is on `PATH` (`rg --files` and `rg --json +--fixed-strings --smart-case`, so `.gitignore` is honoured and hidden files +are passed over), else pardes's own walk, sorted, 16 deep, passing over +dot-directories, `.git`, `.jj`, `target`, `node_modules`, `.venv`, +`__pycache__`, `.zig-cache` and `zig-out`. #word("Find") lists the files once +and matches their names fuzzily at each key (the best first, 200 shown); +#word("Grep") matches the text of lines literally, any case unless the text +has a capital, once the typing pauses (80 ms), and stops at 2000 lines: +#word("More") (in the query pane's tag) goes on for 2000 more. A directory the +walk could not open is said under the rows: `N directories skipped: +permission denied`. A new query cancels the last; rows of a query no +longer asked never land. Written to #file("exec") (a script) the search runs +to its end before the write is answered, and one that finds nothing fails, +`Grep: text not found`, `Find: name not found`, its query pane's count `0`. + += On screen <on-screen> + +- *Esc at a prompt* (with #word("ProgramEsc") on). pardes knows a shell prompt with nothing typed on it + from the OSC 133 marks it injects into bash and fish (marks a shell sends + itself do not count); for other shells, from no program holding the + terminal, typed text or not. +- *A program's mouse.* A program that tracks the mouse (htop, vim with + `mouse=a`) gets the left button's clicks and drags and the wheel over its + grid; Shift-#btn("B1") selects and Shift-wheel scrolls pardes's + scrollback, while Shift-#btn("B2") and Shift-#btn("B3") go to the program. + A full-screen program that does not track the mouse gets the wheel as + arrow keys. Tags, grips and gutters stay pardes's. +- *Diffs.* A `---` line opens the old file unless the `+++` under it names + another; a removed line's `-` goes to the line now standing where it was. + git's `a/` `b/` (and `c/ i/ w/ o/`) prefixes are dropped; a + `--no-prefix` diff's paths are kept. +- *Sessions.* Bare `--detach` names the session after its pid; bare + `--attach` needs exactly one session; a second `--detach=NAME` while NAME + runs (a plain session is named by its pid) says so in words and exits 1. Frontends share the smallest common size. With + none attached, `size C R` sets the screen, messages clear by the clock, + and a pty reports its size in pixels at the last frontend's cell size + (8×16 before any), as CSI 14, 16 and 18 t do. +- *Config.* The startup file is `$XDG_CONFIG_HOME/pardes/init` when that is + absolute, else `~/.config/pardes/init` (macOS: + `~/Library/Application Support/pardes/init`). A line that fails is a + notice and `err - init file line N: why`, and the rest still run; a + setting only the other frontend has (#word("Font") in a terminal) is skipped; + text that is no builtin is not run; saving the init file in a pane + applies its settings again and says a bad line as startup does + (`err - init file line N: why`), its commands not run again. A dump keeps panes, columns, tags, + selections, the theme and changed settings, but not a picture or a PDF + that is on disk (#word("Restore") reads it from there); a terminal + comes back with its last MiB of output and a new shell in its old + directory; undo history and REPL bindings are not kept. A crash appends + two lines (build, time, platform, pid; the panic message) to `crashes` + beside `init`. + += pardes - <pardes-stdin> + +`pardes -` reads stdin to its end and shows it in a new `+Pager` pane of +the directory, left clean, opening at its top, with no line numbers; a +`+Pager` already there keeps its page. The session parses the text with +ghostty-vt: SGR colours become the `+Pager`'s own display, never part of +its body or any read (#word("PagerColor") `off` pages plain), mapped +through the theme as a terminal's are until its #word("Filter") shows them +as sent; every other escape is dropped; a carriage return keeps a progress line's last state, +and CRLF becomes LF. Empty stdin shows nothing. Inside a pardes pane it returns at once; a text the session cannot +take is printed to stderr with why, and the exit is 1. From a directory +whose name holds a newline or control byte, the pane is the session +directory's. Outside a pardes pane it starts a new editor whose first pane +the text is. Stdin up to a file's limit (256 MiB) arrives whole; past that +it is cut, with a note saying so. + +With #word("Pager") `pardes`, a terminal's shell gets `PAGER`, `GIT_PAGER` and +`SYSTEMD_PAGER` set to this pardes plus ` -` (the path quoted only when it +needs it), and `SYSTEMD_PAGERSECURE=0` (it has no shell escape), each only +where your environment does not set it. `man` pages through `MANPAGER` +first, then `PAGER`; your own `MANPAGER` wins. + += Other ways in <other-clients> + +A session listens on `$XDG_RUNTIME_DIR/pardes-9p-<name>.sock` (else under +`~/.local/state/pardes`), `<name>` the pid, the `--detach=NAME` or +`--9p=NAME`, and posts it in the 9P registry as +`$XDG_RUNTIME_DIR/9p/pardes/<name>`. Its pane shells get `PARDES_PID`, +`PARDES_9P` and `PARDES_PANE`. A dead session's registry entry stays +listed and answers `Input/output error`: name the session, never glob. +Under `9ns --mntgen` (which sets `NINE_MNTGEN=1`) a session is at +`$NINE_MOUNT/<service>/<name>`, pardes's `$NINE_MOUNT/pardes/<name>`, and +every pane pardes spawns gets it as `$PARDES_MOUNT`. Under `9ns --unix SOCK +-- cmd` the session is `$NINE_MOUNT` itself, and `$PARDES_MOUNT` is unset. +plan9port's `9p write` opens with OTRUNC, so on #file("body") it replaces +the whole text. To append, use `>>` through a mount. Through a FUSE mount +bash's `read -t` cannot time out: wrap a follow loop in `timeout`. The +scripting chapter's rule (a mount, else `9p`) covers most uses. Two more: + +- #word("Tty9p") (#key("SPC n 9")) opens a terminal with the session + kernel-mounted (Linux v9fs): it asks for your sudo password in the pane, + mounts the socket in a private mount namespace and starts your shell as + you, with `PARDES_MOUNT` naming the mount. Only that shell sees it, and + each takes one of the session's 16 connections. It needs the `9p` and + `9pnet_fd` kernel modules and the `pardes-v9fs` helper the build installs + beside `pardes`. +- `test/ninep.py` is a Python 9P client that exists only in the source tree + (it is not installed). It is for when nothing is mounted and `9p` is not + there, or when a fid must stay open (#file("event"), #file("pty/data"), a + followed #file("log")). Its paths are the served root: + +```python +import sys +from ninep import Client # PYTHONPATH=test +with Client(sys.argv[1]) as c: # a socket path, or (ip, port) + print(c.read('/index').decode(), end='') + n = int(c.read('/pane/new')) + fid = c.open(f'/pane/{n}/event', 0) # hold event: clicks come here + c.write(f'/pane/{n}/exec', b'Msg hi\n') + print(c.read_fid(fid, 0, 4096)) # b'FX0 0 1 6 Msg hi\n' + c.close(fid) + c.remove(f'/pane/{n}') +``` + +`client.screen()` returns the parsed #file("/screen"). + += Coming from acme <from-acme> + +#pairs( + [`$NAMESPACE/acme`], [not posted there: a session is `$XDG_RUNTIME_DIR/9p/pardes/<name>`; reach it with `9p -a "unix!$PARDES_9P"` or a `9ns --mntgen` mount (#doc("fs", section: "other-clients"))], + [`N/`], [#file("pane/N/"), N the pane's serial], + [`new/ctl`], [read #file("pane/new"): it makes a pane and answers its serial; `rmdir pane/N` closes it], + [`index`], [#file("index") lines are serial, kind, dirty, name, column (acme: id, tag and body lengths, isdir, dirty, tag)], + [rune offsets], [bytes everywhere, event offsets and counts included; addresses snap to rune boundaries], + [`addr` reset on first open], [#file("addr") is the pane's; no open resets it (write `0`)], + [OTRUNC on `data` ignored], [`: > data` deletes the addressed text; OTRUNC on #file("body") (`9p write`) replaces it all], + [event flags 1, 2, 4, 8], [1, 4 and 8; never 2, so no expansion record follows], + [`Get`], [#word("Get") reads the file again, refusing unsaved edits once (a scratch under 100 bytes unasked, as #word("Del") closes it; a file not there, or a directory, is said first); `Get file` loads that file into the pane, which takes its name, and one that fails changes nothing; #word("Undo") after it, or after #word("Edit")'s `e`, puts the old name back with the old text and its saved state; in a directory pane #word("Get") reads the directory again and `Get file` is refused (#word("Look") opens the file) (also `get` on #file("ctl"))], + [`Put`, `Delete`, `Load`], [#word("Save"); a #word("Del") that does not ask; #word("Restore")], + [`Putall`], [#word("Putall"): every pane with unsaved edits to a file is saved, a #word("Zerox") pair once, a refused one said; with a refusal, its write is answered once the other saves have landed], + [`Zerox`], [#word("Zerox"): a second pane on the buffer, one text, undo and unsaved state, its own scroll and cursor; an event reader on one hears no edit made through the other; the twins are kept across #word("Dump") and #word("Restore")], + [`Tab`], [#word("Tab") `N`, 1-16: for every pane, not per window; bare, it says the width, from the root's #file("ctl") as from a pane's #file("exec")], + [`Incl`], [#word("Incl"): for the session, not per window, seeded with `/usr/include` and `/usr/local/include`; it takes absolute (or `~`) directories that exist, and `Incl -` alone clears the list; a name found nowhere else (`stdio.h`, `<stdio.h>`) is tried there], + [`Indent`], [always on: #key("Enter"), #key("o") and #key("O") keep the line's indent as it is], + [`Snarf`, `Cut`, `Paste`], [refused: the chords, #key("y"), #key("p")], + [`Font`, `Send`, `ID`], [#word("Font"); #word("Repl") and #word("Exec"); `$winid`], + [acme's other builtins], [refused: `Sort`, `Local`, `Abort` (plan9port's debugging word)], + [Edit], [every acme command but `B <cmd`, `D <cmd` and the `'` address; no `\1`-`\9`, and an alternation takes the first branch that matches, not the longest; a failing `< | >` command changes nothing, where acme puts in what it wrote (#doc("fs", section: "edit"))], + [`win`], [#word("Tty") is a VT terminal pane; #file("pty/run") runs a line at its prompt and answers `exit N` and the output; with #word("Repl") bound, #word("Exec") on a source pane types the text into it], + [a directory window], [as acme's: a text pane named `dir/` (#file("index") kind `text`, #file("ctl") isdir 1), its entries in columns sorted bytewise, dotfiles shown, a directory's marked `/`; blanks pad the columns where acme's tabs do; a #word("Look") at an entry is from that directory, `Get` or a look at it again reads it again, and an edit is kept until then rather than lost to a resize; never dirty, #word("Save") refuses it; #word("DirLook") `terminal` types `ls` into a terminal there instead], + [the plumber], [none: #word("Look") on an `http://` or `https://` URL runs `xdg-open` (`open` on macOS); files, addresses and directories follow built-in rules], + [#key("Esc") selects what was typed], [#key("Esc") leaves insert mode, or goes back a pane (#doc("tags", section: "modes"))], +) + += Limits <limits> + +#pairs( + [panes], [64], + [columns], [16, each at least 10 cells wide], + [rows a pane keeps], [its tag and 2], + [msize], [65536 (64 KiB) offered], + [connections], [16 Unix and TCP, 16 QUIC], + [open records], [64 a session, every client's together], + [held reads a connection], [128], + [named mounts], [8], + [command line], [1024 bytes; a held line or #word("Edit") block 1 MiB], + [tag text], [4096 bytes], + [regular expression], [512 operations; a step budget per search (about 300 ms)], + [undo], [256 steps], + [log], [64 KiB ring; `msg` 256 bytes, `err` reason 200], + [`pty/run` output], [64 KiB], + [file name component], [255 bytes], +) diff --git a/docs/typ/scripting.typ b/docs/typ/scripting.typ new file mode 100644 index 00000000..590d71ac --- /dev/null +++ b/docs/typ/scripting.typ @@ -0,0 +1,162 @@ +// Scripting pardes over 9P: finding the session, a first tag word, the +// recipes, and the traps. Every file's full semantics are in the +// reference. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs + +Every session is a virtual filesystem, served over 9P and modelled on +acme's (#doc("reference", section: "from-acme")), so a program that opens +files is an extension: + +``` +$ ls $m +README col commands ctl exec focus index layout listeners log +look os pager pane recent screen status tag tagexec +$ cat $m/index +1 term 0 /home/me/src 1 +2 text 0 /home/me/src/+New 1 +``` + +The reference (#doc("fs")) has every file. + += Finding the session <find-the-session> + +#pairs( + [`PARDES_9P`], [the session's socket, in every shell and command pane], + [`PARDES_PANE`], [the serial of the pane the shell runs in], + [`$winid`], [the serial of the pane a command was clicked in, as in acme (unset from a column's or the workspace's tag)], + [`PARDES_MOUNT`], [the session as a directory, under `9ns --mntgen` (#doc("setup", section: "ninens"))], +) + +Every recipe here starts from this line: +#cmd("m=${PARDES_MOUNT:-}\ncat \"$m/index\"") +When it is empty (no mount), plan9port's `9p` talks to the socket instead: +`cat $m/x` is `9p -a "unix!$PARDES_9P" read x`, and `echo y > $m/x` is +`echo y | 9p -a "unix!$PARDES_9P" write x`. + += Your first tag word <first-tag-word> + +A script on `PATH` is a word you can click. This `Fmt` finds its pane +through `$winid` (`PARDES_PANE` is the command pane it runs in): + +```sh +#!/bin/sh +# Fmt: gofmt the Go file whose tag it was clicked in, then reload it +n=${winid:?Fmt: click me in a pane tag} +m=${PARDES_MOUNT:-} +if [ -n "$m" ]; then + rd() { cat "$m/$1"; }; wr() { cat > "$m/$1"; } +else + rd() { 9p -a "unix!$PARDES_9P" read "$1"; } + wr() { 9p -a "unix!$PARDES_9P" write "$1"; } +fi +f=$(rd pane/$n/name) # the file it shows +case $f in *.go) ;; *) echo "Fmt: $f is not Go" >&2; exit 1 ;; esac +echo Save | wr pane/$n/ctl && gofmt -w "$f" && echo get | wr pane/$n/ctl # get: reload +``` + +Type `Fmt` into a Go pane's tag and #word("Exec") it (middle-click: run +the builtin a word names, or else run it as a shell line); its output +shows in a command pane. To have `Fmt` in every Go file's tag, follow the +log and add it to each new `.go` pane (with a mount): + +```sh +#!/bin/sh +# fmt-tags: put Fmt in the tag of every Go file opened from now on +m=${PARDES_MOUNT:?fmt-tags: needs 9ns --mntgen} +exec 3<>$m/log; echo 'follow new' >&3 +while read -r what serial name <&3; do + case $what:$name in new:*.go) printf ' Fmt' >> $m/pane/$serial/tag ;; esac +done +``` + += Recipes + +Each recipe starts after the session line above and this one, which makes +a pane of your own: reading #file("pane/new") makes a pane and answers its +serial, and `rmdir $p` closes it. Work through that pane's #file("look") +and #file("exec"), not the root's: +#cmd("n=$(cat $m/pane/new); p=$m/pane/$n") + +#pairs( + [look around], [#cmd("cat $m/index\ncat $m/layout\ncat $m/focus\ncat $m/commands")], + [open a file at a place], [#cmd("exec 3<>$p/look; echo \"$PWD/main.zig:120\" >&3; f=$(cat <&3); exec 3<&- # its pane\necho \"$PWD/main.zig:0/fn main/\" > $p/look # the first match")], + [fill, name, save, close], [#cmd("printf 'hello\\n' > $p/body # > replaces, >> appends\necho \"$PWD/notes.txt\" > $p/name\necho Save > $p/ctl\nrmdir $p")], + [say something], [#cmd("echo 'Msg hello' > $p/exec")], + [replace everywhere], [#cmd("echo 'Edit ,x/foo/c/bar/' > $p/ctl\ngrep -c foo $p/body # 0: none left")], + [insert after a match], [#cmd("echo 'Edit /old/a/ text/' > $p/ctl # from dot; one undo step")], + [replace one match], [#cmd("echo /old/ > $p/addr && printf new > $p/data")], + [delete line 3], [#cmd("echo 3 > $p/addr; : > $p/data")], + [select line 3, read it], [#cmd("echo 3 > $p/addr; cp $p/addr $p/dot; cat $p/sel")], + [run a command], [#cmd("exec 3<>$p/exec; echo \"cd '$PWD' && make test\" >&3; c=$(cat <&3) # its pane\nuntil grep -q ') exit ' $m/pane/$c/tag; do sleep 0.2; done\ncat $m/pane/$c/body; exec 3<&- # read it before letting go")], + [run at a prompt], [#cmd("t=$(awk '$2==\"term\"{print $1; exit}' $m/index)\nexec 3<>$m/pane/$t/pty/run; echo ls >&3; cat <&3; exec 3<&-")], + [type, interrupt], [#cmd("t=$(awk '$2==\"term\"{print $1; exit}' $m/index)\nprintf 'q' > $m/pane/$t/pty/data # \\r Enter, \\x03 Ctrl-C\necho 'sig INT' > $m/pane/$t/pty/ctl")], + [ask the language server], [#cmd("exec 3<>$p/look; echo \"$PWD/main.zig\" >&3; q=$m/pane/$(cat <&3); exec 3<&-\necho /myFunc/ > $q/addr; echo dot=addr > $q/ctl\necho Hover > $q/exec # also Rename new, Symbols")], + [follow what happens], [#cmd("exec 3<>$m/log; echo 'follow new' >&3\ntimeout 30 cat <&3; exec 3<&-")], +) + +A command pane your #file("exec") open was answered is yours while that +open stays open: read its #file("body") before you close it. In +#file("index") a `term` is a shell, a `cmd` a command's pane. + +== Event helpers + +Holding a pane's #file("event") open takes its #word("Exec") and #word("Look") clicks (right-click: open what +the text names, or else find it): they arrive as acme's records instead of acting, and writing a +record back has pardes do it. A record is a line, `MX31 36 1 5 Upper`: who +(`M` mouse, `K` keyboard, `E` or `F` a write to a file), what (`X` #word("Exec") or `L` #word("Look") +in the body, `x` `l` in the tag), the range, a flag, the text's length and +the text (#doc("fs", section: "event")). This helper owns the tag words +`Upper` and `Done` in pane `$1` and writes every other click back: + +```bash +#!/bin/bash +# upper PANE: own the tag words Upper and Done in pane PANE +m=${PARDES_MOUNT:?upper: needs 9ns --mntgen}; p=$m/pane/$1 +grep -q ' Upper Done' $p/tag || printf ' Upper Done' >> $p/tag +exec 3<>$p/event # hold event on fd 3, this shell's own +while IFS= read -r rec <&3; do + read -r head q1 flag n text <<< "$rec" # e.g. Mx31 36 1 5 Upper + case $head$text in + [EFKM][Xx]*Upper) sel=$(cat $p/sel; echo x); sel=${sel%x}; printf %s "${sel^^}" > $p/sel ;; + [EFKM][Xx]*Done) break ;; + [EFKM][XxLl]*) printf '%s\n' "$rec" >&3 ;; # not ours: do what it would + esac # I D i d report edits: nothing to do +done +exec 3<&- # let event go: clicks act again +``` + += Traps <traps> + +- A refused write says only `Invalid argument` or `Input/output error`; + its reason is `grep '^err' $m/log | tail -1`, not the log's last line, + which after a refused #word("Del") may be `+Unsaved`'s `new`. A write that + succeeds adds no record, so check its status first. +- The root #file("look") and #file("exec") act at the pane with the + keyboard, which another client, an idle shell or an event helper may + own. Use a pane's own. +- Read #file("look"), #file("exec") or #file("pager") on the open you + wrote (`exec 3<>…`): a fresh open reads the session's last answer, from + whichever client wrote it. +- #file("addr") is the pane's and moves on: each `/re/` searches from the + last address, and a #file("data") write leaves it past the text. Write + #file("addr") before each replacement; a failed one leaves none. +- An #word("Edit") `x` that matches nothing succeeds: check the text. +- Through a mount, `printf 'a\nb\n' > ctl` arrives one write per line: + send a block as one write, ending in a newline. +- Read #file("event") on a descriptor your shell owns, never + `cat $p/event | while read`: the `cat` outlives the loop, holds + #file("event") and swallows the next click. +- `head` through 9ns says `Illegal seek` on #file("index"), + #file("layout"), #file("log") and #file("recent"): use `sed -n 1p`. + += An isolated session + +Never experiment on a session someone is using. Under `9ns --mntgen`, +start one with an empty environment and home, and quit it when done: + +``` +env -i PATH="$PATH" HOME="$(mktemp -d)" XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" pardes --detach=try & +m=$NINE_MOUNT/pardes/try +cat $m/index +echo Exit > $m/exec +``` diff --git a/docs/typ/setup.typ b/docs/typ/setup.typ new file mode 100644 index 00000000..f49c9075 --- /dev/null +++ b/docs/typ/setup.typ @@ -0,0 +1,136 @@ +// Setting up your environment: what to put outside pardes (the shell's +// startup files, a desktop launcher, other programs' configs) so that it +// works best. Each snippet says in one line why it is there. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs + += Install <install> +#include "install.typ" + += A 9P mount: 9ns <ninens> + +`9ns`, from cloud9 (`git.sr.ht/~gbrls/cloud9`, whose `zig build` builds it +on Linux; it needs `/dev/fuse`), mounts 9P trees through FUSE as a plain +user. With `--mntgen` it mounts every posted session at `/mnt/9p` and +exports `$NINE_MOUNT`; a pardes session is `$NINE_MOUNT/pardes/<pid or +name>`. Run pardes inside one, and everything it starts sees the session's +virtual filesystem as files: + +#cmd("9ns --mntgen -- pardes-gui") + +A desktop launcher that still starts pardes without 9ns or `/dev/fuse` +(absolute paths: the `Exec=` line takes a `$` only escaped, and a desktop `PATH` may +lack `~/.local/bin`): + +``` +[Desktop Entry] +Type=Application +Name=pardes +Exec=/bin/sh -c "if [ -x /home/me/.local/bin/9ns ] && [ -e /dev/fuse ]; then exec /home/me/.local/bin/9ns --mntgen -- /home/me/.local/bin/pardes-gui; else exec /home/me/.local/bin/pardes-gui; fi" +Terminal=false +``` + +Or let every interactive shell wrap itself, once. fish, in `config.fish`: + +``` +if status is-interactive; and not set -q NINE_MOUNT + and test -e /dev/fuse; and type -q 9ns + exec 9ns --mntgen -- fish +end +``` + +bash, in `~/.bashrc`: + +``` +if [[ $- == *i* && -z $NINE_MOUNT && -e /dev/fuse ]] && command -v 9ns >/dev/null; then + exec 9ns --mntgen -- bash +fi +``` + += pardes as your editor <editor-setup> + +`pardes --wait FILE` opens FILE as a pane and returns when you close it +(outside pardes, it starts an editor that returns when you are done): + +#cmd("set -gx VISUAL 'pardes --wait'; set -gx EDITOR 'pardes --wait' # fish") +#cmd("export VISUAL='pardes --wait' EDITOR='pardes --wait' # bash, zsh") + +`git commit`, `crontab -e` and fish's `edit_command_buffer` (Alt-E) read +`VISUAL` before `EDITOR`, so set both. + += A pager <pager> + +#cmd("ls --color=always | pardes - # into a new +Pager there, colours kept") + +With #word("Pager") `pardes` (the default) a terminal's shell gets +`PAGER`, `GIT_PAGER` and `SYSTEMD_PAGER` set to it (and +`SYSTEMD_PAGERSECURE=0`) wherever your environment leaves them unset, so +`git log`, `journalctl` and `man` arrive as a pane, a diff drawn as one; +command panes page through `cat`. `man` reads `MANPAGER` first, which +pardes never sets. #word("Pager") `off` in the startup file leaves them all +yours, for terminals started after it; #word("PagerColor") `off` makes the +text plain. + += yazi in a terminal pane <yazi> + +In `~/.config/yazi/yazi.toml` (yazi 26), an opener that forwards files to +the session as panes: + +``` +[opener] +pardes = [ + { run = 'pardes %s', desc = "Open in pardes", for = "unix" }, +] + +[open] +prepend_rules = [ + { mime = "text/*", use = "pardes" }, +] +``` + +yazi's own `edit` opener runs `$EDITOR` and waits, so `EDITOR='pardes +--wait'` already opens a pane there. Without a file manager, #btn("B3") on +a path does the same. + += Shells and PATH <shells> + +pardes injects OSC 133 prompt marks into bash and fish (after your own +`~/.bashrc` and `config.fish`); they make #key("Esc") at an empty prompt +and #file("pty/run") work. Other shells, or `exec zsh` inside a bash pane, +get none: #file("pty/run") answers `error no prompt marks`. Terminals and +command panes inherit pardes's environment, its `PATH` included, so a +script on that `PATH` is a word you can click. + += Language servers <language-servers> + +pardes starts a language server for a file it knows, from `PATH`: + +#pairs( + [`.zig`], [`zls` (`PARDES_LSP_ZIG`)], + [`.rs`], [`rust-analyzer` (`PARDES_LSP_RS`)], + [`.c .h .cc .cpp .hpp .cxx .hxx`], [`clangd` (`PARDES_LSP_C`)], + [`.go`], [`gopls` (`PARDES_LSP_GO`)], + [`.ts .tsx .js .jsx .mjs .cjs`], [`typescript-language-server --stdio` (`PARDES_LSP_TS`)], + [`.py`], [`pyright-langserver --stdio` (`PARDES_LSP_PY`)], +) + +#cmd("PARDES_LSP_ZIG=$HOME/src/zls/zig-out/bin/zls pardes # another zls\nPARDES_LSP_PY= pardes # none for .py") + +#word("Lspinfo") (#key("SPC l i")) says what is running. + += Fonts and themes <fonts-and-themes> + +The terminal build uses your terminal's font. The SDL window carries +Adwaita Mono and finds others in `/usr/share/fonts`, +`/usr/local/share/fonts`, `~/.local/share/fonts` and `~/.fonts`; #word("Font") +`Iosevka:16` picks one. #word("Theme") `<name>` and #word("ThemeFile") are in the themes +chapter (#doc("themes")). + += plan9port <plan9port> + +Without a mount, plan9port's `9p` reads and writes a session: + +#cmd("9p -a \"unix!$PARDES_9P\" read index") + +acme habits carry over: `pardes FILE` is acme's `B`, `pardes --wait` its +`E`, the files have acme's names, and a program holding a pane's +#file("event") takes its clicks, as `win` does. diff --git a/docs/typ/style.typ b/docs/typ/style.typ new file mode 100644 index 00000000..b5c2ff85 --- /dev/null +++ b/docs/typ/style.typ @@ -0,0 +1,614 @@ +// The semantic elements every docs/typ topic uses, and the one place they +// are defined. Content files call them ("this is a key", "this is a +// builtin"); how each looks is decided here, per output: paged outputs +// (the A4 cheatsheet, later the book) draw them, HTML export gives them +// elements and classes for a stylesheet. Page geometry and fonts belong to +// the output wrappers beside this file. + +/// The `atelier` theme (src/themes/atelier.zig): pardes's acme homage, +/// butter paper and blue-green tags. +#let palette = ( + paper: rgb("#fffdeb"), + ink: rgb("#293f35"), + tag-bg: rgb("#e4f0ed"), + tag-fg: rgb("#3d6055"), + tag-name: rgb("#6e4774"), + grip: rgb("#36826b"), + col-grip: rgb("#955815"), + str: rgb("#34743d"), + num: rgb("#9a5810"), + rule: rgb("#95baa2"), + mouse: rgb("#8a3a00"), +) +#let mono = "DejaVu Sans Mono" + +/// Topic ids for #doc: each names a chapter (an id in `chapters`) and, +/// optionally, the label of a section in it. Old ids stay so older calls +/// keep working. +#let topics = ( + guide: ("guide", none), + setup: ("setup", none), + cheatsheet: ("cheatsheet", none), + scripting: ("scripting", none), + reference: ("reference", none), + themes: ("themes", none), + building: ("building", none), + builtins: ("builtins", none), + tags: ("guide", none), + fs: ("reference", none), + config: ("guide", "config"), + keys: ("guide", "keys"), + detached: ("guide", "sessions"), +) + +/// Set by a wrapper that holds every chapter (the book, the HTML): #doc +/// then links to the chapter or section. Alone (the A4 sheet) it names it. +#let doc-links = state("doc-links", false) + +/// The book's and the HTML's reading order. `file` is the content file +/// in docs/typ, or none while the topic is not written yet (the outputs +/// then show a placeholder). Wrappers include each with heading offset 1, +/// so a file's `=` headings sit under its chapter title, labelled +/// `ch-<id>`. +#let chapters = ( + (id: "guide", title: "Guide", file: "guide.typ"), + (id: "setup", title: "Setting up your environment", file: "setup.typ"), + (id: "cheatsheet", title: "Cheatsheet", file: "cheatsheet.typ"), + (id: "scripting", title: "Scripting", file: "scripting.typ"), + (id: "reference", title: "Reference", file: "reference.typ"), + (id: "builtins", title: "Builtins", file: "builtins.typ"), + (id: "themes", title: "Themes", file: "themes.typ"), + (id: "building", title: "Building, for contributors", file: "building.typ"), +) + +/// The one-line pitch: the A4 sheet's header and the book's title page. +#let tagline = "acme's tags and three buttons, helix's keys, terminals as panes, the editor as a virtual filesystem over 9P" + +/// The tutor, shown as it is in the editor (`Tutor`), from the repo root. +#let tutor-path = "/src/tutor.txt" + +/// How much room tables and shell lines get: "roomy" (the book, the HTML) +/// or "tight" (the A4 sheet sets it). +#let density = state("density", "roomy") + +#let html-out() = target() == "html" +#let span(class, body) = html.elem("span", attrs: (class: class), body) +#let m(s, fill: palette.ink) = text(font: mono, size: 0.92em, fill: fill, s) + +/// A key: one press (`x`, `Ctrl-w`, `Shift-Esc`), or a sequence pressed one +/// after another, written space-separated (`g g`, `SPC f c`). Either is ONE +/// pill: a combination's parts joined by a muted +, a sequence's steps by a +/// muted › (`Ctrl-w h` reads Ctrl + w › h). +#let key(k) = context if html-out() { + let sep(c, cls) = html.elem("span", attrs: (class: cls, "aria-hidden": "true"), c) + let press(t) = (if t.len() > 1 and t.contains("-") { t.split("-") } else { (t,) }).join(sep("+", "plus")) + html.elem("kbd", attrs: (class: "key"), k.split(" ").map(press).join(sep("›", "then"))) +} else { + let muted(c) = text(fill: palette.grip.transparentize(25%), size: 0.85em, c) + let press(t) = (if t.len() > 1 and t.contains("-") { t.split("-") } else { (t,) }).join(muted[+]) + box( + fill: palette.grip.transparentize(84%), radius: 2pt, + inset: (x: 1.4pt, y: 0pt), outset: (y: 1.5pt), + text(font: mono, size: 0.92em, fill: palette.ink, + k.split(" ").map(press).join(muted[#h(1pt)›#h(1pt)])), + ) +} + +/// Alternatives: separate keys listed together, each its own command. +#let keys(..ks) = context ks.pos().map(key).join(if html-out() [ ] else { h(0.25em) }) + +#let button-names = ("B1": "left button", "B2": "wheel", "B3": "right button") +#let click-names = ("B1": "left", "B2": "middle", "B3": "right") +/// Text that is read and copied but not shown, beside a drawn glyph. +#let hidden(t) = html.elem("span", attrs: (class: "vh"), t) + +/// A mouse, about cap height: left button, wheel, right button. The parts +/// in `pressed` ("B1", "B2", "B3") are filled. +#let mouse(pressed) = { + let (w, h, top) = (0.84em, 1.2em, 0.56em) + let ink = palette.mouse + let s = 0.7pt + ink + let on(b) = if b in pressed { ink } else { none } + box(width: w, height: h, baseline: 0.24em, { + place(rect(width: w / 2, height: top, radius: (top-left: w / 2), fill: on("B1"), stroke: s)) + place(dx: w / 2, rect(width: w / 2, height: top, radius: (top-right: w / 2), fill: on("B3"), stroke: s)) + place(dy: top, rect(width: w, height: h - top, radius: (bottom: w / 2), stroke: s)) + // the wheel: a narrow tall slot over the buttons' seam, on a paper + // halo so a filled wheel stands apart from the button outlines + let (ww, wh, halo) = (0.26em, 0.44em, 0.07em) + let (wx, wy) = ((w - ww) / 2, 0.06em) + place(dx: wx - halo, dy: wy - halo / 2, rect( + width: ww + 2 * halo, height: wh + halo, radius: ww, fill: palette.paper)) + place(dx: wx, dy: wy, rect( + width: ww, height: wh, radius: ww / 2, stroke: 0.5pt + ink, + fill: if "B2" in pressed { ink } else { palette.paper }, + )) + }) +} + +/// The same mouse as inline SVG for HTML. Each part is classed `on` +/// (pressed) or `off`, and the stylesheet colours them: the pressed part +/// filled in the accent, the rest outlined and muted. +#let mouse-svg(pressed) = { + let cls(b) = if b in pressed { "on" } else { "off" } + let part(d, b) = html.elem("path", attrs: (class: cls(b), d: d)) + html.elem("svg", attrs: (class: "mouse", viewBox: "-6 -6 96 132", "aria-hidden": "true"), { + // taller buttons and a slimmer wheel than on paper, so a pressed + // button shows as a solid block at body size + part("M0 64H84V78A42 42 0 0 1 0 78Z", none) + part("M0 64V42A42 42 0 0 1 42 0V64Z", "B1") + part("M42 0A42 42 0 0 1 84 42V64H42Z", "B3") + // a pressed wheel is drawn wider, so it reads as pressed, not as a seam + let (hx, hw, wx, ww) = if "B2" in pressed { ("27", "30", "31", "22") } else { ("31", "22", "35", "14") } + html.elem("rect", attrs: (class: "halo", x: hx, y: "4", width: hw, height: "48", rx: "13")) + html.elem("rect", attrs: (class: "wheel " + cls("B2"), x: wx, y: "8", width: ww, height: "40", rx: "9")) + }) +} + +/// A mouse button; `shift: true` for the button with Shift held. +#let btn(b, shift: false) = context if html-out() { + let label = (if shift { "shift " } else { "" }) + button-names.at(b) + html.elem("span", attrs: (class: "btn", title: label), { + if shift { html.elem("span", attrs: (class: "shift", "aria-hidden": "true"), "⇧") } + mouse-svg((b,)) + hidden((if shift { "Shift-" } else { "" }) + click-names.at(b) + "-click") + }) +} else { + if shift { text(size: 0.8em, fill: palette.col-grip)[⇧] } + mouse((b,)) +} + +/// A chord: the first button held, each next one clicked while it is. +/// Drawn as the held button, then for each click the held one and that one +/// down, with arrows between. +#let chord(..bs) = context if html-out() { + let label = bs.pos().map(b => button-names.at(b)).join(" then ") + let (held, ..clicks) = bs.pos() + let arrow = html.elem("span", attrs: (class: "then", "aria-hidden": "true"), "›") + let said = "hold " + click-names.at(held) + ", click " + clicks.map(c => click-names.at(c)).join(", then ") + html.elem("span", attrs: (class: "chord", title: label), { + ((mouse-svg((held,)),) + clicks.map(c => mouse-svg((held, c)))).join(arrow) + hidden(said) + }) +} else { + let (held, ..clicks) = bs.pos() + let arrow = text(size: 0.75em, fill: palette.col-grip)[#h(0.5pt)›#h(0.5pt)] + ((mouse((held,)),) + clicks.map(c => mouse((held, c)))).join(arrow) +} + +/// A tag word or builtin, drawn as a thing to click: the tag's ground and +/// ink in the tag's monospace, over a rule. Look and Exec take acme's look +/// and exec sweep colours (green and red, src/themes/acme.zig) for the +/// rule; every other word the tag's box colour. In HTML a <code +/// class="word">, so a text browser still shows the plain word. +#let word-accent = (Look: rgb("#006600"), Exec: rgb("#aa0000")) + +/// Every builtin of either build, written by `zig build builtins-json` +/// from the registry and the Help rows (src/builtins_json.zig), a file per +/// build: name, leader, also (Help's other shortcuts), arg, scope, setting, +/// choices, doc. Merged here, each with `platforms`: "both", "tty" (the +/// terminal only) or "gui" (the window only). +#let builtin-data = { + let tty = json("builtins-tty.json") + let gui = json("builtins-gui.json") + let in-tty = tty.map(b => b.name) + let in-gui = gui.map(b => b.name) + let all = (tty + gui.filter(b => b.name not in in-tty)).sorted(key: b => b.name) + all.map(b => { + b.insert("platforms", if b.name in in-tty and b.name in in-gui { "both" } else if b.name in in-tty { "tty" } else { "gui" }) + b + }) +} +#let builtin-names = builtin-data.map(b => b.name) + +#let word-chip(w) = context if html-out() { + let base = w.split("+").first() + let kind = if base == "Look" { " look" } else if base == "Exec" { " exec" } else { "" } + html.elem("code", attrs: (class: "word" + kind), w) +} else { + let rule = word-accent.at(w.split("+").first(), default: palette.grip) + box( + fill: palette.tag-bg, inset: (x: 1.4pt, y: 0pt), outset: (y: 1.4pt), + stroke: (bottom: 0.6pt + rule), + m(w, fill: palette.tag-fg), + ) +} + +/// A builtin's word links to its glossary entry wherever the glossary is +/// part of the same output (the book, the site); elsewhere it is the chip. +#let word(w) = context { + let base = w.split("+").first() + let target = label("builtin-" + base) + if doc-links.get() and base in builtin-names and query(target).len() > 0 { + link(target, word-chip(w)) + } else { word-chip(w) } +} + +/// A whole tagline: its grip, the path, then its words. +#let tag(words, path: none) = context if html-out() { + html.elem("div", attrs: (class: "tag"), { + html.elem("span", attrs: (class: "grip", "aria-hidden": "true"))[] + if path != none { span("path", path); [ ] } + raw(words) + }) +} else { + block(width: 100%, fill: palette.tag-bg, inset: (x: 2pt, y: 2.4pt), spacing: 0.5em, { + box(fill: palette.grip, width: 0.55em, height: 0.75em, baseline: 0.1em) + h(3pt) + if path != none { m(path, fill: palette.tag-name); h(0.6em) } + m(words, fill: palette.tag-fg) + }) +} + +/// A look address. +#let addr(a) = context if html-out() { span("addr", raw(a)) } else { m(a, fill: palette.tag-name) } + +/// A 9P path. +#let file(p) = context if html-out() { span("file", raw(p)) } else { m(p, fill: palette.str) } + +/// A shell line. +#let cmd(c) = context if html-out() { html.elem("div", attrs: (class: "cmd"), raw(c, block: true, lang: "sh")) } else { + let tight = density.get() == "tight" + block( + width: 100%, spacing: if tight { 0.4em } else { 0.9em }, + inset: if tight { (left: 3pt, y: 1.2pt) } else { (left: 6pt, y: 3pt) }, + stroke: (left: (if tight { 1pt } else { 1.5pt }) + palette.rule), + fill: if tight { none } else { palette.tag-bg.transparentize(50%) }, + text(font: mono, size: 0.85em, fill: palette.ink, c), + ) +} + +/// Where the full story is: a topic id from `topics`, and a section label +/// in it. A link where the wrapper holds the chapters, else its name. +#let doc(id, section: none) = { + let (chapter, default) = topics.at(id) + let section = if section != none { section } else { default } + let title = chapters.find(c => c.id == chapter).title + let to = label(if section != none { section } else { "ch-" + chapter }) + let named = title + if section != none { ": " + section.replace("-", " ") } else { "" } + context { + if doc-links.get() { + let found = query(to) + let shown = if found.len() > 0 and found.first().func() == heading { + if section != none [#title: #found.first().body] else [#title] + } else [#named] + link(to, text(fill: palette.num)[→ #shown]) + } else { + text(fill: palette.num)[→ #named] + } + } +} + +/// Pairs: a thing and what it means, as a two-column table, key column +/// first, rows on alternating tints. `split: 2` sets the rows as that many +/// tables side by side (on paper; HTML gets one table). +#let pairs(split: 1, ..cells) = { + let rows = cells.pos().chunks(2) + context { + let tight = density.get() == "tight" + let one(rows) = table( + columns: (auto, 1fr), stroke: none, + inset: if tight { (x: 2pt, y: 1.6pt) } else { (x: 7pt, y: 4pt) }, + fill: (_, y) => if calc.even(y) { palette.tag-bg.transparentize(35%) }, + ..rows.flatten(), + ) + if html-out() or split == 1 { one(rows) } else { + let n = calc.ceil(rows.len() / split) + grid(columns: (1fr,) * split, column-gutter: if tight { 2pt } else { 10pt }, ..rows.chunks(n).map(one)) + } + } +} + +/// Where pardes lives and under what licence: install.typ, the site's +/// landing and its footer all read it. Every mirror holds the same tree; +/// the first is the one the install line clones. A new mirror is one line. +#let project = ( + mirrors: ( + (name: "sourcehut", web: "https://git.sr.ht/~gbrls/pardes", clone: "https://git.sr.ht/~gbrls/pardes"), + (name: "git.0x4200.cafe", web: "https://git.0x4200.cafe/pardes", clone: "https://git.0x4200.cafe/pardes.git"), + ), + license: "ISC", + changes: "https://git.sr.ht/~gbrls/pardes/tree/main/item/src/CHANGELOG.md", + // built binaries to download: the version they are, where the + // checksums are, and a file per program (install.typ shows them) + download: ( + version: "0.23", + sums: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/SHA256SUMS", + files: ( + (program: "pardes", what: "the terminal build, static, any x86_64 Linux", + url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-x86_64-linux-static", bytes: 62223912, + sha256: "740992b18bdcfefc4db449dcbdb12423b4505eb2b3fb360aaa6dc57cc2fdda9f"), + (program: "pardes-gui", what: "the window, x86_64 Linux with glibc 2.29 or later; it loads Wayland or X11 and GL or Vulkan from the system", + url: "https://pub-66384ba880784f119ce95123b92fa5c6.r2.dev/pardes-gui-x86_64-linux", bytes: 66786824, + sha256: "a1c68b347d424b8077fb5af4050dd8455dc849adb0c1e2fc325b1646f5a255e5"), + ), + ), +) + +/// A glossary: like #pairs, under its own heading. On paper the heading +/// and the table; in HTML a <details> that starts closed, its summary the +/// heading and the count, so a reader who knows the words skips them. +#let glossary(title, lbl, ..cells) = context if html-out() { + // a real definition list, so a text browser reads term, then meaning + html.elem("details", attrs: (class: "glossary"), { + html.elem("summary", [#heading(title) #lbl]) + html.elem("dl", for (term, meaning) in cells.pos().chunks(2) { + html.elem("dt", term) + html.elem("dd", meaning) + }) + }) +} else { + [#heading(title) #lbl] + pairs(..cells) +} + +/// Every theme as a picture, on the site's Themes page; nothing on paper, +/// where forty-odd screenshots would only add weight. Reads +/// docs/site/media/themes/themes.toml: `ready` (absent means true) and a +/// [[theme]] per theme, in NextColor's order, with `name`, `file` (under +/// media/themes/) and `kind` ("light" or "dark"). +#let theme-gallery() = context if html-out() { + let g = toml("../site/media/themes/themes.toml") + let ready = g.at("ready", default: true) + heading[Every theme] + html.elem("div", attrs: (class: "gallery"), for t in g.theme { + let src = "media/themes/" + t.file + html.elem("figure", attrs: (class: "shot " + t.kind), { + if ready { + html.elem("a", attrs: (href: src), html.elem("img", attrs: (src: src, alt: t.name + " (" + t.kind + ")", loading: "lazy"))) + } else { + html.elem("div", attrs: (class: "pending"), "screenshot to come") + } + html.elem("figcaption", raw(t.name)) + }) + }) +} + +/// The newcomer's words, first in the glossary; every other builtin goes +/// under its group below. Each must be in builtins.json. +#let everyday = ("Look", "Exec", "Save", "Undo", "Redo", "New", "Newcol", "Del", "Delcol", + "Tty", "Kill", "Find", "Grep", "Recent", "Dump", "Restore", "Exit", "Help", "Tutor", "Themes", "Config") +/// Debugging and developer words, last whatever their leader path. +#let internals = ("Debug", "EffectCode", "Lspwhy", "Messages", "DumpConfig", "DumpThemes") + +/// The glossary's groups, in order: by the leader path's first key, the +/// way Help groups them, then settings, the words with no path, internals. +#let builtin-groups = ( + (title: "Files", keys: ("f",)), + (title: "Panes and columns", keys: ("c", "d")), + (title: "Moving and jumps", keys: ("w", "j")), + (title: "Terminals", keys: ("n",)), + (title: "Language server", keys: ("l",)), + (title: "Sessions", keys: ("s", "q")), + (title: "Help", keys: ("h", "?")), + (title: "Clipboard", keys: ("y", "Y", "p", "P", "R")), + (title: "Toggles", keys: ("t",)), + (title: "Settings and themes", keys: "setting"), + (title: "Animations", keys: ("a",)), + (title: "Other words", keys: "none"), +) + +#let group-of(b) = { + if b.name in internals { return "internals" } + if b.setting { return "setting" } + if b.leader == none { return "none" } + b.leader.split(" ").at(1) +} + +/// Help spells a shortcut its own way (C-w left, right-click, topbar); +/// this draws it as the docs do. +#let shortcut(s) = { + if s == "topbar" { return [in the workspace tag] } + if s == "middle-click" { return btn("B2") } + if s == "right-click" { return btn("B3") } + if s == "left-click" { return btn("B1") } + let names = (enter: "Enter", tab: "Tab", escape: "Esc", left: "Left", right: "Right", up: "Up", down: "Down", + home: "Home", end: "End", backspace: "Backspace", delete: "Delete", page_up: "PgUp", page_down: "PgDn") + key(s.split(" ").map(t => { + let mods = "" + while t.len() > 2 and t.at(1) == "-" and t.at(0) in ("C", "A", "S") { + mods += (C: "Ctrl-", A: "Alt-", S: "Shift-").at(t.at(0)) + t = t.slice(2) + } + mods + names.at(t, default: t) + }).join(" ")) +} + +/// A doc comment's text, its `code` spans set as code. +#let prose(t) = t.split("`").enumerate().map(((i, part)) => if calc.odd(i) { raw(part) } else { part }).join() + +#let builtin-entry(b) = [ + #heading(depth: 2, raw(b.name)) #label("builtin-" + b.name) + #let keys = (if b.leader != none { (key(b.leader),) } else { () }) + b.also.map(shortcut) + #if b.platforms != "both" [#emph(if b.platforms == "gui" [window only] else [terminal only]) · ] + #if keys.len() > 0 [#keys.join([, ]) · ] + #if b.choices != none [#raw(b.choices.replace(", ", "|")) · ] else if b.arg [takes an argument · ] + #prose(b.doc) +] + +/// The glossary: everyday words first, then the groups, then internals, +/// each alphabetical. A level-1 heading per group in the content file. +#let builtin-glossary() = { + let by-name = (:) + for b in builtin-data { by-name.insert(b.name, b) } + [= Everyday <builtins-everyday>] + for n in everyday.sorted() { builtin-entry(by-name.at(n)) } + let rest = builtin-data.filter(b => b.name not in everyday) + for g in builtin-groups { + let members = rest.filter(b => { + let k = group-of(b) + if type(g.keys) == str { k == g.keys } else { k in g.keys } + }) + if members.len() > 0 { + heading(depth: 1, g.title) + for b in members { builtin-entry(b) } + } + } + let inner = rest.filter(b => group-of(b) == "internals") + if inner.len() > 0 { + [= Debugging and internals] + for b in inner { builtin-entry(b) } + } + // a builtin no group took is a bug in builtin-groups, not a silent drop + let placed = everyday + rest.filter(b => { + let k = group-of(b) + k == "internals" or builtin-groups.any(g => if type(g.keys) == str { k == g.keys } else { k in g.keys }) + }).map(b => b.name) + for b in builtin-data { assert(b.name in placed, message: "builtin " + b.name + " is in no glossary group") } + // last, every word at once, A to Z, each a link to its entry + [= All builtins, A–Z <builtins-a-z>] + context if html-out() { + html.elem("p", attrs: (class: "all-words"), + builtin-data.map(b => link(label("builtin-" + b.name), word-chip(b.name))).join(" ")) + } else { + par(builtin-data.map(b => link(label("builtin-" + b.name), word-chip(b.name))).join(h(0.4em))) + } +} + +/// A directory tree drawn as `tree` draws one. `spec` is a raw block, a +/// line per file: two spaces of indent per level, the name (a directory +/// ends in `/`), two or more spaces, a one-line description, and an +/// optional `@label` naming the section that documents it, which becomes +/// a link wherever that section is in the same output. A description may +/// call #word, #key, #keys or #btn. src/config.zig's +/// test reads the same block in reference.typ against the served tree. +#let fstree(spec, root: "/") = { + // a description is text, unless it calls #word, #key or #btn + let said(d) = if d.contains("#") { eval(d, mode: "markup", scope: (word: word, key: key, keys: keys, btn: btn)) } else { d } + let rows = spec.text.split("\n").filter(l => l.trim() != "").map(l => { + let depth = calc.quo(l.len() - l.trim(at: start).len(), 2) + let m = l.trim().match(regex("^(\S+)(?:\s{2,}(.*?))?(?:\s+@([a-z0-9-]+))?$")) + (depth: depth, name: m.captures.at(0), desc: m.captures.at(1), anchor: m.captures.at(2)) + }) + // the connector for each row: is each ancestor, and the row itself, the + // last among its siblings? + let last(i) = { + let d = rows.at(i).depth + for j in range(i + 1, rows.len()) { + if rows.at(j).depth < d { return true } + if rows.at(j).depth == d { return false } + } + true + } + let lasts = range(rows.len()).map(last) + let prefix(i) = { + let d = rows.at(i).depth + let out = "" + // for each ancestor depth, the nearest row above at that depth + for k in range(d) { + let a = range(i).rev().find(j => rows.at(j).depth == k) + out += if lasts.at(a) { " " } else { "│ " } + } + out + if lasts.at(i) { "└── " } else { "├── " } + } + let named(r) = context { + let t = if r.anchor != none { label(r.anchor) } else { none } + if t != none and query(t).len() > 0 { link(t, r.name) } else { r.name } + } + let width = calc.max(..range(rows.len()).map(i => prefix(i).len() + rows.at(i).name.len())) + context if html-out() { + let nl = html.elem("span", attrs: (class: "nl"), "\n") + html.elem("pre", attrs: (class: "fstree", style: "--name:" + str(width + 2) + "ch"), { + html.elem("span", attrs: (class: "row root"), [#html.elem("span", attrs: (class: "name dir"), root)#nl]) + for (i, r) in rows.enumerate() { + let pad = " " * (width - prefix(i).clusters().len() - r.name.len() + 2) + html.elem("span", attrs: (class: "row"), { + html.elem("span", attrs: (class: if r.name.ends-with("/") { "name dir" } else { "name" }), + [#html.elem("span", attrs: (class: "branch"), prefix(i))#named(r)#pad]) + if r.desc != none { + html.elem("span", attrs: (class: "desc", style: "--cols:" + str(prefix(i).clusters().len())), said(r.desc)) + } + nl + }) + } + }) + } else { + set text(font: mono, size: 0.82em) + block(width: 100%, grid(columns: (auto, 1fr), column-gutter: 1.2em, row-gutter: 0pt, inset: (y: 0.12em), + text(weight: "bold", fill: palette.grip, root), [], + ..rows.enumerate().map(((i, r)) => ( + [#text(fill: palette.rule, prefix(i))#text(fill: if r.name.ends-with("/") { palette.grip } else { palette.ink }, + weight: if r.name.ends-with("/") { "bold" } else { "regular" }, named(r))], + text(font: "Libertinus Serif", size: 1.2em, fill: palette.tag-fg, if r.desc == none { [] } else { said(r.desc) }), + )).flatten())) + } +} + +/// A screenshot with numbered pins on it and their labels as text beside +/// it, so the labels read, search and translate as text. `src` is from +/// the repository root (the site serves it from the same path under +/// docs/site/); `size` is its pixel (width, height); each pin is (label, +/// x, y) in pixels of that image. +#let annotated(src, size, alt: "", ..pins) = { + let (w, h) = size + let pins = pins.pos() + context if html-out() { + let web = src.trim("/docs/site/", at: start) + html.elem("figure", attrs: (class: "annotated"), { + html.elem("div", attrs: (class: "frame"), { + html.elem("img", attrs: (src: web, alt: alt, width: str(w), height: str(h))) + for (i, (label, x, y)) in pins.enumerate() { + html.elem("span", attrs: (class: "pin", "aria-hidden": "true", + // repr, not str: str writes a negative with U+2212, which CSS rejects + style: "left:" + repr(calc.round(100 * x / w, digits: 2)) + "%;top:" + repr(calc.round(100 * y / h, digits: 2)) + "%"), str(i + 1)) + } + }) + html.elem("ol", attrs: (class: "pins"), for (label, x, y) in pins { html.elem("li", label) }) + }) + } else { + let width = 11cm + let k = width / w + let pin(n) = box(width: 1.25em, height: 1.25em, radius: 50%, fill: palette.mouse, + align(center + horizon, text(size: 0.75em, weight: "bold", fill: white, str(n)))) + block(breakable: false, grid(columns: (width, 1fr), column-gutter: 1.2em, align: horizon, + box(width: width, height: h * k, { + place(top + left, image(src, width: width, alt: alt)) + for (i, (label, x, y)) in pins.enumerate() { + place(top + left, dx: x * k - 0.625em, dy: y * k - 0.625em, pin(i + 1)) + } + }), + enum(..pins.map(p => p.at(0)), spacing: 0.7em), + )) + } +} + +/// A pane's box as it looks: blank in normal mode, `^` in insert, `$` raw +/// (a terminal's own input); `unsaved: true` fills it, as an unsaved +/// file's is. In HTML a span the stylesheet draws, its mode said in words. +#let mode-box(mark, unsaved: false) = { + let mode = if mark == "^" { "insert" } else if mark == "$" { "raw" } else { "normal" } + context if html-out() { + html.elem("span", attrs: (class: "mode-box" + if unsaved { " unsaved" } else { "" }, + role: "img", "aria-label": mode + " mode box" + if unsaved { ", unsaved" } else { "" }), mark) + } else { + box(width: 1.05em, height: 1.05em, baseline: 0.15em, radius: 1pt, + fill: if unsaved { palette.col-grip } else { palette.tag-bg }, + stroke: 0.7pt + palette.grip, + align(center + horizon, text(font: mono, size: 0.8em, weight: "bold", + fill: if unsaved { white } else { palette.ink }, mark))) + } +} + +/// A recording from docs/site/media/clips.toml, by name. On the site the +/// same video as the landing's (poster, autoplay muted loop, played while +/// in view) and its caption; in print its poster, small, and the caption. +/// `wide: true` lets it take the page's full width (a recording of many +/// narrow columns). +#let clip(name, wide: false) = { + let c = toml("../site/media/clips.toml").clip.find(c => c.name == name) + assert(c != none, message: "no clip named " + name + " in clips.toml") + let said = if c.caption.contains("#") { eval(c.caption, mode: "markup") } else { c.caption } + context if html-out() { + html.elem("figure", attrs: (class: "clip inline" + if wide { " wide" } else { "" }, id: "rec-" + c.name), { + html.elem("video", attrs: (poster: "media/" + c.name + ".png", autoplay: "", muted: "", loop: "", + playsinline: "", controls: ""), { + html.elem("source", attrs: (src: "media/" + c.name + ".webm", type: "video/webm")) + html.elem("source", attrs: (src: "media/" + c.name + ".mp4", type: "video/mp4")) + }) + html.elem("figcaption", said) + }) + } else { + figure(image("/docs/site/media/" + c.name + ".png", width: if wide { 11cm } else { 7cm }, alt: c.caption), + caption: text(size: 0.9em, said), numbering: none, kind: "clip", supplement: none) + } +} diff --git a/docs/typ/themes.typ b/docs/typ/themes.typ new file mode 100644 index 00000000..edfaa7ad --- /dev/null +++ b/docs/typ/themes.typ @@ -0,0 +1,127 @@ +// Themes: choosing one, the native palettes and the faithful ports, and +// the roles a theme file sets. +#import "style.typ": key, keys, btn, chord, word, tag, addr, file, cmd, doc, pairs, theme-gallery + +#word("Themes") (#key("SPC t t")) lists every theme as a word to click; +#word("Theme") `<name>` sets one anywhere, and the same line in the startup file +keeps it. #word("NextColor") steps through the themes in this order: the native themes first, then +`acme`, `lapis` and `lapis_plain`, the faithful ports, the legacy `helix` +and `dark`, and the palettes imported from helix and zed. `orchard` is the +default. `lapis` draws its ornament in the GUI; `lapis_plain` is the same +theme on flat grounds, keeping its framed and shadowed tags and its +file-name shadow. + +#theme-gallery() + += The native themes + +#pairs( + [`orchard`], [near-black evergreen; bright leaf comments and plum syntax], + [`dusk`], [soft plum charcoal; copper comments and gentle text], + [`ink`], [pure black; bright, distinct signals and ice-blue comments], + [`paper`], [neutral uncoated paper; graphite and teal], + [`daybreak`], [high-contrast light; white and deep blue ink], + [`atelier`], [acme homage; butter-yellow paper and blue-green tags], + [`forge`], [Dark Plus-inspired near-black, blue and peach; slate-blue tags], + [`lagoon`], [softer Material-inspired slate; vivid sea-glass comments], + [`solarium`], [softer Solarized-inspired blue-green; golden comments and teal tags], + [`spectrum`], [Monokai-inspired near-black and candy colours; golden comments], + [`harvest`], [autumn-inspired near-black earth, ember and leaf green], + [`clay`], [Gruvbox-inspired near-black and earthy brights; amber comments], + [`forge_black`], [pure-black Forge; luminous text and cool slate tags], + [`forge_soft`], [neutral-slate Forge; gentler text, still vivid blue comments], + [`orchard_black`], [pure-black Orchard; luminous garden ink and bright leaf comments], +) + +The six classic-inspired ones (`forge` to `clay`) keep a recognisable +syntax identity but are not exact ports; their sources are in +`vendor/themes/`, and they claim no upstream affiliation. The focused +pane's and column's tags shift tone on tone rather than invert: dark +palettes keep dark tags, light ones light tags. The file name in a pane's +path, and `+Search` and the like, take a distinct hue at the same +brightness as the tag text; a terminal's tag tints its #word("Tty") word +instead. + +Every native palette sets its own ANSI colours, so a terminal's indexed +colours belong to it; #word("Filter") maps a program's true colours through +the theme too. Normal text, syntax, comments, diagnostics and ANSI +foregrounds keep a contrast of at least 4.5:1 against the page (7:1 in +`ink` and `daybreak`), comments above 5:1; line numbers sit quieter, +between 2.5:1 and 4:1. Tag, focused-tag, selection and search text are held +to the same floors on their own grounds. ANSI black is exempt, since +programs use it as a background. These are checks of the palettes, not a +promise about a program's own escape sequences or the scene effects. +#word("FocusTint") (on) and #word("SyntaxBold") (off) toggle the focused +tag's tint and bold keywords. + += Faithful ports + +Well-known themes taken as close to their originals as pardes can draw +them: every colour the original has (page, text, selection, syntax, line +numbers, diagnostics, terminal ANSI) is its own, read out of its files, +and each theme file cites the file and line of every value. pardes has one +colour each for keywords, strings, numbers and comments, so a theme that +splits a kind keeps its main one. A pane's tag is the original's window +bar (vim's `StatusLine`, emacs's `mode-line`) or, in a tabbed editor, its +tab. Where a chrome colour misses one of pardes's floors (rules 1.5:1 off +the page, the focused tag 1.5:1 off the unfocused one on a dark page and +1.25:1 on a light one, tag text 4.5:1), only that colour moves, just far +enough, and the file's header says so; text, syntax and ANSI never move. +helix's own copy of a theme ported here is not imported, except the +three other helix themes build on: `monokai_helix`, `ayu_dark_helix` and +`nord_helix`. + +#pairs( + [Visual Studio Code], [`dark_plus`], + [Solarized], [`solarized_dark`, `solarized_light`], + [Dracula], [`dracula`, `dracula_soft`, `alucard`], + [Monokai], [`monokai`], + [Monokai Pro], [`monokai_pro`, `monokai_pro_classic`, `monokai_pro_machine`, `monokai_pro_octagon`, `monokai_pro_ristretto`, `monokai_pro_spectrum`, `monokai_pro_light`, `monokai_pro_light_sun`], + [Tokyo Night], [`tokyonight_night`, `tokyonight_storm`, `tokyonight_moon`, `tokyonight_day`], + [Rosé Pine], [`rose_pine`, `rose_pine_moon`, `rose_pine_dawn`], + [Catppuccin], [`catppuccin_latte`, `catppuccin_frappe`, `catppuccin_macchiato`, `catppuccin_mocha`], + [Seoul256], [`seoul256_dark_233` to `seoul256_dark_239`, `seoul256_light_252` to `seoul256_light_256`], + [Zenbones], [`zenbones_light`, `zenbones_dark`, `neobones_light`, `neobones_dark`, `vimbones`, `forestbones_light`, `forestbones_dark`, `nordbones`, `rosebones_light`, `rosebones_dark`, `tokyobones_light`, `tokyobones_dark`, `seoulbones_light`, `seoulbones_dark`, `duckbones`, `zenburned`, `zenwritten_light`, `zenwritten_dark`, `kanagawabones`], + [Nord], [`nord`], + [Ayu], [`ayu_dark`, `ayu_mirage`, `ayu_light`], + [Doom One], [`doom_one`, `doom_one_light`], +) + += Making your own <theme-files> + +#word("DumpThemes") writes every compiled theme to +`<config dir>/themes/builtin/<name>.zon`. Copy one to `themes/mine.zon`, +change its `.name`, and run #word("ThemeFile") `themes/mine.zon` (relative to the +config directory). Where the host reloads files, saving it updates the +theme at once; a malformed save keeps the last good version, and +#word("Theme") `<name>` stops the watch. A #word("ThemeFile") that fails to load says why +in words, a ZON error with its line (`line 3: expected ','`), and changes +nothing: the theme shown stays, and #file("/ctl") and #word("DumpConfig") +still name the file that last loaded, or none. #word("Restore") and +`pardes -l` load a dump's #word("ThemeFile") again, as a #file("/ctl") write of it +does, and one that fails there changes nothing either. The format is `pardes.Theme` as +`std.zon.stringify` writes it, a complete theme with no inheritance. + +The required roles: nullable `bg` and `fg`, `sel_bg`, `sel_fg`, `tag_bg`, +`tag_fg`, `box`, `box_dim`, `kw`, `str`, `num`, `comment`, `lineno`, +`scroll_track`, `scroll_thumb`, and a nullable 16-entry `palette`. Each is +an RGB triple (`.search_bg = .{ 0x57, 0x47, 0x2a }`). The optional roles +take `null`, so older files stay valid: + +#pairs( + [`tag_active_bg`, `tag_active_fg`], [the focused pane's tag; a ground closer than 1.25:1 to `tag_bg` is pushed further the way it leans, as far as its text keeps its contrast. Absent: `tag_bg`, `tag_fg`], + [`tag_name_fg`, `tag_active_name_fg`], [the file name's or a terminal's #word("Tty") tint, in normal and focused tags. Absent: the tag's foreground], + [`column_box`, `column_box_dim`], [a column's grip held (and its drag rail), and at rest. Absent: `num`; a mix of `column_box` and `tag_bg`], + [`border`], [quiet separators, lifted to 1.6:1 when under 1.5:1 off the page. Absent: `scroll_track`], + [`empty_col`], [a column with no pane, under its tag (acme: white). Absent: `border`], + [`lineno_active`], [the current line number. Absent: `lineno`], + [`search_bg`, `search_fg`], [search matches, apart from the selection. Absent: `sel_bg`, `sel_fg`], + [`diagnostic_error`, `diagnostic_warning`, `diagnostic_info`, `diagnostic_hint`], [diagnostic text. Absent: `fg`, or `tag_fg` for an inherited foreground], + [`tag_sel_bg`], [a tag's selection ground. Absent: `sel_bg`], + [`sweep_bg`, `sweep_fg`], [three triples each: the select, #word("Exec") and #word("Look") sweeps. Absent: `sel_bg` tinted toward `kw`, `str` and `num`, in `sel_fg`], + [`tag_rule`], [the one-pixel rule between a pane's tag and its body. Absent: halfway between `tag_bg` and the page], + [`rule_px`], [pixel shells: the width of the rules between columns and panes and under the column and workspace tags, in logical pixels. Absent: 2], + [`box_border`, `box_dirty`], [the grip as acme's button: a ring of `box_border` when unfocused, filled with `box_dirty` while unsaved. Absent: `box_dim`; `diagnostic_warning`, then `num`], + [`rail_px`], [pixel shells: the scroll column's width at a 17px tagline, scaled with it. Absent: 12, acme's Scrollwid], + [`decor`], [pixel shells: a theme's ornament (lapis's): `page_dots`, `rail_checker`, `tag_border`, `tag_shadow`, `tag_stripe`, `title_shadow`, with their sizes; none of it touches a focus indicator. Absent: none], +) diff --git a/docs/ui-review.md b/docs/ui-review.md index 2438f2ef..2d785ed8 100644 --- a/docs/ui-review.md +++ b/docs/ui-review.md @@ -12,7 +12,7 @@ and silver-blue chrome. `forge_black` and `orchard_black` use pure black; `forge_soft` joins `dusk`, `lagoon` and `solarium` as deliberately softer alternatives. Light and Acme-inspired choices remain available. -`ThemeSel` opens with the native collection, followed by a separate legacy +`Themes` opens with the native collection, followed by a separate legacy and imported section. Keyboard navigation skips both section headings. `Collapse` now transfers all released rows to one expanded pane, preferring @@ -36,7 +36,7 @@ sent to the user's session. - [Six contrast studies, OS screenshot crops](screenshots/theme-preferences.png) - [Neutral Forge, full workspace](screenshots/theme-preferences-forge.png) -- [Native-first ThemeSel, full workspace](screenshots/theme-selector.png) +- [Native-first Themes, full workspace](screenshots/theme-selector.png) ## Compact rails, classic palettes and workspace pets @@ -55,7 +55,7 @@ Pointer targets and the TTY grid are unchanged. `test/font_size.py` checks startup sizing, fractional sizing, retaining the size when omitted, and rejecting invalid requests without partial changes. -Six [classic-inspired themes](themes.md) add `forge`, `lagoon`, `solarium`, +Six [classic-inspired themes](typ/themes.typ) add `forge`, `lagoon`, `solarium`, `spectrum`, `harvest` and `clay`. ANSI colors retain their terminal meanings instead of borrowing a similarly positioned syntax color. Optional SDL `Pet cat` and `Pet frog` companions walk, idle and reverse in the unused @@ -83,7 +83,7 @@ the native contrast tests. ## PDF and terminal tag cleanup -PDFs now use `filename.pdf [page/total] Tty Del PdfSections PdfTint Collapse`, +PDFs now use `filename.pdf [page/total] Tty Del PdfSections PdfTint PdfFit Collapse`, keeping sections and tint commands visible without the long generated control/status prefix. Terminal tags include `Mode`, which cycles the body mode even when invoked from an edited tag. Ctrl-B keeps its two-way toggle. @@ -98,8 +98,7 @@ tests and 797 SDL tests; SDL image/PDF and Kitty PDF rendering harnesses pass. ## Column and editable-tag follow-up The follow-up adds editable workspace and column command rows, compact pane -tags, staged buffer-name edits, caret reveal for long tags, and `ColumnTags` -to reclaim the extra row when needed. See [editable tags](tags.md) for the +tags, staged buffer-name edits, and caret reveal for long tags. See [editable tags](typ/guide.typ) for the exact interaction and save-target rules. `test/column_tags.py` exercises isolated SDL and TTY sessions against the same @@ -198,7 +197,7 @@ Review artifacts from this pass: ## Regression checks Both native binaries built in ReleaseFast. The full TTY and SDL unit suites -passed with the inherited nesting variables `PARDES_FORWARD_LOOK`, `PARDES_9P` +passed with the inherited nesting variables `PARDES_PID`, `PARDES_9P` and `PARDES_PANE` removed from the test process. Those variables exposed an existing environment-ownership issue in native subprocess tests: libc's environment was changed while the Zig test I/O retained the old slice. This @@ -207,7 +206,7 @@ pass does not change that environment code or skip the affected tests. The appearance checks cover native palette contrast, old ThemeFile documents, wrapped search matches, selection precedence, immediate body colors during theme fades, light-theme carets and both quiet and bold syntax preferences. -The 9P walkthrough also verifies `FocusTint` and `SyntaxBold` through `Config`. +The 9P walkthrough also verifies `FocusTint` and `SyntaxBold` through `DumpConfig`. All 97 terminal snapshot scripts passed without retries after reviewing and refreshing 32 appearance goldens. Of those, 27 preserve identical visible text, diff --git a/docs/v9fs.md b/docs/v9fs.md deleted file mode 100644 index 6cb4e998..00000000 --- a/docs/v9fs.md +++ /dev/null @@ -1,107 +0,0 @@ -# Linux terminals with a kernel 9P mount - -Execute `Tty9p`, or press `SPC n 9` in editor mode, to open a terminal below -this pane with the current Pardes session mounted through Linux v9fs. - -The new pane asks for your sudo password when needed. After mounting, it starts -your configured shell as your normal user, with your account's supplementary -groups. The shell receives `PARDES_MOUNT`, the absolute mountpoint: - -```sh -ls "$PARDES_MOUNT/pane" -cat "$PARDES_MOUNT/index" -cat "$PARDES_MOUNT/README" -cat "$PARDES_MOUNT/pane/$PARDES_PANE/body" -echo 'exec Msg hello' > "$PARDES_MOUNT/ctl" -``` - -The mount belongs to that pane's subprocess tree. Other panes and the editor -core keep their original mount namespace. It works in native Linux TTY and SDL -sessions, including detached sessions. A frontend attaching from elsewhere does -not perform the mount; the session host starts the new terminal. - -## Build and setup - -The normal Linux build installs the ordinary `pardes-v9fs` executable beside -`pardes` and `pardes-gui`: - -```sh -zig build -``` - -Start an updated editor to get the builtin. An already running core retains -its old code. The host resolves the helper beside its own executable; -`PARDES_V9FS_HELPER=/absolute/path/to/pardes-v9fs` overrides this for development -builds whose editor and helper live in different build-cache directories. - -Linux must support `9p` and its Unix transport (`9pnet_fd`). v9fs mounting needs -`CAP_SYS_ADMIN` in the initial user namespace, which sudo supplies. The launcher -uses `sudo -E` to retain the shell environment; local sudo policy must allow -that. It restores the caller's PATH after dropping privileges because sudo's -`secure_path` can replace it even with `-E`. - -No setuid installation, passwordless sudo policy, system group, or FUSE is -installed. The helper currently accepts explicit mount paths and a command; -it is not a restricted privilege broker. Do not grant it blanket passwordless -access. A group-authorized helper would require a separate restricted design. - -## Runtime organization - -`src/linux/v9fs.zig` builds `pardes-v9fs` and provides helper discovery to the -native host. `Tty9p` marks the new pane for a mounted shell; `host_io.forkShell` -starts the normal interactive shell and queues a quoted helper command. For -bash and fish, the command waits for the shell's prompt-ready mark. The helper -runs as a foreground shell job, so sudo uses the terminal like a manually run -command. Authentication failure or cancellation returns to the original shell; -exiting the mounted shell also returns there. - -The unprivileged launcher creates a private temporary mountpoint and invokes -sudo inside the new PTY. The elevated helper creates a private mount namespace, -makes propagation recursively private, and mounts the session's Unix socket -with `version=9p2000,cache=none,access=any,nosuid,nodev,noexec`. It restores the -calling user's account groups, drops all real/effective/saved root IDs and -mount capabilities, and executes the shell. Ordinary commands such as sudo -remain available for subsequent explicit authentication. The launcher waits for sudo, -forwards termination signals, and removes its empty temporary directory on exit. -Namespace destruction releases the mount when its last process exits. - -The core stays outside the mount namespace because its event loop serves 9P. -A blocking filesystem operation through its own mount could wait for a request -that the blocked event loop must service. Even pathname resolution may do this. - -Each `Tty9p` currently creates its own mount and consumes a server connection; -the session has four application connection slots across all transports. This -is the explicit per-pane version. A shared launcher for all pane shells remains -future work. Detached sessions retain the running mounted pane when frontends -leave; Dump/Restore does not reconstruct mounted-shell namespaces. Descendants -that deliberately outlive the terminal may retain their namespace until exit. - -## Tests - -```sh -zig build v9fs-terminal-test -Dplatform=tty -zig build v9fs-driver-test -Dplatform=tty -zig build 9p-test -Dplatform=tty -sudo -v -zig build v9fs-test -Dplatform=tty -``` - -`v9fs-terminal-test` exercises the builtin, real launcher, PTY input, session -environment, quoted helper paths, hidden password input, and core responsiveness -using an unprivileged sudo stand-in. It checks that authentication failure and -interruption clean up the temporary mountpoint and leave the original shell usable. It does not claim kernel-mount coverage. - -`v9fs-test` mounts through the same runtime helper. Its driver keeps the editor -unprivileged and uses `sudo -n`, retaining the calling terminal's authorization. -Missing authorization or kernel support fails the test instead of skipping it. -It checks mount isolation, privilege dropping, inherited access, directory -refresh, body reads and truncation, independent wire updates, addressed edits, -shell redirection to name, Exec dispatch, rendered screen JSON, and OS-file reads. - -Linux follows `O_TRUNC` with a `Twstat` carrying zero length and an `mtime` hint. -Pardes accepts this truncation without storing caller-selected timestamps; -standalone timestamp, permission, and ownership changes remain unsupported. - -The initial kernel probe passed on this host on 2026-09-14. The broader -`fs-test` has an existing syntax-bold assertion failure at `test/fs.py:459`, -also reproduced on the cached editor binary preceding the truncation fix. diff --git a/docs/web.md b/docs/web.md index 3a68f958..0a9783c9 100644 --- a/docs/web.md +++ b/docs/web.md @@ -42,7 +42,7 @@ shells, and two comptime capability flags say so once each. It exposes no `PanelAscii`, `PanelVertical`, `PanelEdges`, `PanelFall`, `PanelWave`, `PanelCurtain`, `PanelScramble`, `PanelType`) because `capabilities.panel_transitions` is `pardes.hosted`, and no -`Crt`/`Ripple`/`Glitch` because `capabilities.scene_shaders` is +`Crt` or `Shader` because `capabilities.scene_shaders` is `platform == .gui or platform == .macos` (`builtins.capabilities`; the words themselves carry those availabilities in `config.Runtime.settings`). Applying either faithfully would require a second canvas renderer and give up @@ -80,7 +80,7 @@ What is genuinely absent is narrower than "no IO". The module has no threads and no host filesystem, so there is no startup config directory, init file, ThemeFile, or DumpThemes; LOOK resolves against the build-generated source archive rather than disk, and no language -BACKEND is compiled in (`zls_backend` is off for wasm — which also means +BACKEND is compiled in (there is none for wasm — which also means `lsp.supports` is empty, so the core never even raises a language query there, and the host leaves `lsp` null). @@ -114,7 +114,7 @@ land in the per-instance fallback, so a pane with no child is SILENT rather than synthetic; `tty_taken` is never taken; any save the page declines resolves against the core's virtual filesystem, which is also where every read comes from — the core reads files itself and never asks a host; `watch_file` records -the request; `lsp` answers an empty row set at once (`zls_backend` is off for +the request; `lsp` answers an empty row set at once (no backend is built for wasm, so the core never raises a query there anyway) and `pipe` answers failure; `wait_input` is null because wasm must never block, and `watch_theme` and `dump_themes` are not reachable without a config directory. Of the |
