From 3a66e0c7c783bba8f81aabd9d471db6bb5fc1b05 Mon Sep 17 00:00:00 2001 From: Tamas Csikel Date: Tue, 3 Nov 2026 17:23:34 +0100 Subject: [PATCH] Spotify for Fennec OS: native TV client Rust + Slint on sf-ui's Liquid Glass, with the page engine of Netflex TV. librespot plays (GStreamer on the TV) and makes the TV a Spotify Connect device; the Web API (token from the session) feeds the pages. - Sign-in with the phone: a pairing code / QR code (spotify.com/pair, OAuth device flow) or picking the TV in the Spotify app (zeroconf). - Home, search, library, playlist / album / liked songs / podcast pages, artist pages, settings; the user's picture top right. - Now playing: seek, shuffle, repeat, like, synced lyrics, queue. - package.sh builds x86-64 and aarch64 (Raspberry Pi); the Gitea CI releases both on a tag. - tools/mock_server.py and SPOTIFY_MOCK for work without an account. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/release.yml | 80 + .gitignore | 5 + AGENTS.md | 55 + Cargo.lock | 9207 ++++++++++++++++++++++++++++++++++ Cargo.toml | 46 + README.md | 49 + app.toml | 20 + build.rs | 7 + icon.png | Bin 0 -> 20263 bytes package.sh | 73 + src/api.rs | 643 +++ src/app.rs | 1052 ++++ src/config.rs | 123 + src/format.rs | 104 + src/main.rs | 58 + src/nowplaying.rs | 524 ++ src/page.rs | 1020 ++++ src/screens/artist.rs | 146 + src/screens/collection.rs | 343 ++ src/screens/home.rs | 154 + src/screens/library.rs | 151 + src/screens/mod.rs | 283 ++ src/screens/search.rs | 101 + src/screens/settings.rs | 96 + src/spotify.rs | 690 +++ src/task.rs | 40 + tools/mock_server.py | 171 + ui/app.slint | 195 + ui/icons.slint | 37 + ui/nowplaying.slint | 405 ++ ui/overlays.slint | 66 + ui/page.slint | 804 +++ ui/signin.slint | 244 + ui/types.slint | 91 + 34 files changed, 17083 insertions(+) create mode 100644 .gitea/workflows/release.yml create mode 100644 .gitignore create mode 100644 AGENTS.md create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 app.toml create mode 100644 build.rs create mode 100644 icon.png create mode 100755 package.sh create mode 100644 src/api.rs create mode 100644 src/app.rs create mode 100644 src/config.rs create mode 100644 src/format.rs create mode 100644 src/main.rs create mode 100644 src/nowplaying.rs create mode 100644 src/page.rs create mode 100644 src/screens/artist.rs create mode 100644 src/screens/collection.rs create mode 100644 src/screens/home.rs create mode 100644 src/screens/library.rs create mode 100644 src/screens/mod.rs create mode 100644 src/screens/search.rs create mode 100644 src/screens/settings.rs create mode 100644 src/spotify.rs create mode 100644 src/task.rs create mode 100755 tools/mock_server.py create mode 100644 ui/app.slint create mode 100644 ui/icons.slint create mode 100644 ui/nowplaying.slint create mode 100644 ui/overlays.slint create mode 100644 ui/page.slint create mode 100644 ui/signin.slint create mode 100644 ui/types.slint diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..cdd4ecb --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,80 @@ +# On a tag (v1.2.3): build the app and publish a release with the store +# assets: app.toml, the x86-64 package and the aarch64 one (Raspberry Pi, +# docs/store.md in Fennec OS). sf-ui and sf-pack come from the Fennec SDK (public). +# +# Runner hygiene (shared host, little disk): runs in the runner image that is +# already on the host (no image pull), uses no `uses:` actions (no action +# cache), and deletes everything it made at the end. The image is Ubuntu +# 24.04: its glibc is older than the TV's (Debian trixie), so the binary runs. +name: release +on: + push: + tags: ["v*"] +jobs: + release: + runs-on: build + container: + image: docker.gitea.com/runner-images:ubuntu-latest + env: + W: /tmp/fennec-spotify + CARGO_HOME: /tmp/fennec-spotify/cargo + RUSTUP_HOME: /tmp/fennec-spotify/rustup + CARGO_TARGET_DIR: /tmp/fennec-spotify/target + CARGO_INCREMENTAL: "0" + SDK_GIT: https://gitea.bluefox.support/fennec/sdk + SDK_TAG: v0.1.2 + steps: + - name: Checkout + run: | + mkdir -p "$W" + git clone --depth 1 --branch "$GITHUB_REF_NAME" \ + "${GITHUB_SERVER_URL%%://*}://oauth2:${{ secrets.GITHUB_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git" "$W/src" + v=$(sed -n 's/^version *= *"\(.*\)".*/\1/p' "$W/src/app.toml" | head -1) + [ "v$v" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME, but app.toml says $v" >&2; exit 1; } + - name: Toolchain + run: | + export DEBIAN_FRONTEND=noninteractive + # arm64 libraries for the Raspberry Pi build (package.sh --arm): + # Ubuntu serves them from ports.ubuntu.com, the main mirror is amd64 only. + . /etc/os-release + dpkg --add-architecture arm64 + if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then + sed -i '/^Architectures:/d; /^Types:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources + fi + [ -f /etc/apt/sources.list ] && sed -i 's/^deb \(http\)/deb [arch=amd64] \1/' /etc/apt/sources.list + printf 'Types: deb\nURIs: http://ports.ubuntu.com/ubuntu-ports/\nSuites: %s %s-updates %s-security\nComponents: main universe\nArchitectures: arm64\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\n' \ + "$VERSION_CODENAME" "$VERSION_CODENAME" "$VERSION_CODENAME" >/etc/apt/sources.list.d/arm64-ports.sources + apt-get update -qq + # Multiarch dev packages for both architectures; for arm64 only the + # GStreamer runtime libraries: its dev packages can't be installed for + # two architectures at once (package.sh --arm links the libraries). + libs="libfontconfig1-dev libfreetype-dev libxkbcommon-dev libglib2.0-dev" + apt-get install -y -qq --no-install-recommends build-essential pkg-config \ + gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross \ + $libs $(for l in $libs; do printf '%s:arm64 ' "$l"; done) \ + libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \ + libgstreamer1.0-0:arm64 libgstreamer-plugins-base1.0-0:arm64 + rm -rf /var/lib/apt/lists/* + curl -sSf https://sh.rustup.rs | sh -s -- -y -q --profile minimal --no-modify-path --target aarch64-unknown-linux-gnu + "$CARGO_HOME/bin/cargo" install -q --locked --git "$SDK_GIT" --tag "$SDK_TAG" sf-pack + - name: Build + run: | + export PATH="$CARGO_HOME/bin:$PATH" + "$W/src/package.sh" + "$W/src/package.sh" --arm + - name: Release + env: + TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + api="$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/releases" + id=$(curl -fsS -H "Authorization: token $TOKEN" -H "Content-Type: application/json" \ + -d "{\"tag_name\":\"$GITHUB_REF_NAME\",\"name\":\"$GITHUB_REF_NAME\"}" "$api" \ + | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) + for f in "$W"/src/dist/*; do + curl -fsS -H "Authorization: token $TOKEN" -F "attachment=@$f" "$api/$id/assets?name=$(basename "$f")" >/dev/null + done + - name: Clean up + if: always() + run: | + rm -rf "$W" + df -h / | tail -1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c66486 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/target +/pkg +/dist +/dist-arm +/.cargo diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1061a48 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,55 @@ +# Notes for AI agents working on Spotify for Fennec OS + +Read first (Fennec SDK, https://gitea.bluefox.support/fennec/sdk): +- `docs/store-app-guide.md`: what a Fennec OS store app must be (manifest, sandbox, remote, packaging, release). +- `docs/sf-ui.md`: the UI kit. Liquid Glass model, components, focus, dev tools, pitfalls. + +The page engine and the controller come from Netflex TV (`fennec/netflex`); keep them close to it. + +## Layout + +``` +app.toml store manifest (id support.bluefox.spotify; permissions network, gpu, audio) +src/main.rs window, glass layer (lists every exported [GlassRect]), images, controller +src/spotify.rs librespot: session, Spotify Connect (Spirc), sign-in (zeroconf + pairing code), player; Cmd in, Event out +src/api.rs Spotify Web API (browsing, library, search, queue), token from the session; short GET cache, 429 retry +src/app.rs Controller: screen stack, keys, input/picker/toast, backdrop, sign-in screen, engine events, avatar +src/nowplaying.rs Most szól: playback state, controls, seek, lyrics, queue +src/page.rs the line-based page engine: lines (L) and chips (Ch) -> layout, focus, scroll, lazy images +src/screens/mod.rs sections of the top nav, cards, track rows, the track "+" menu, opening a card id +src/screens/home.rs Kezdőlap: recently played, playlists (+ liked), top artists/tracks, saved albums, new releases +src/screens/search.rs Keresés: embedded keyboard, songs, artists, albums, playlists, podcasts +src/screens/library.rs Könyvtár: tabs, grid, paging (artists by cursor) +src/screens/collection.rs playlist / album / liked songs / podcast: header, Lejátszás/Keverés/Mentés, track rows, paging +src/screens/artist.rs artist: header, popular tracks, albums, singles, appearances +src/screens/settings.rs Beállítások: account, Connect name, quality, normalisation, autoplay, look +src/config.rs config.toml: device id/name, bitrate, normalise, autoplay, glass +src/format.rs Hungarian texts: times, counts, dates +src/task.rs blocking work on a thread, result on the UI thread +ui/app.slint root: screen fades, one FocusScope -> Rust `key`, glass exports +ui/page.slint LinePage: draws the lines Rust lays out (nav, now playing capsule, avatar, keyboard) +ui/nowplaying.slint the now playing screen and its panel (lyrics / queue) +ui/signin.slint ConnectScreen (QR code + Spotify app), InputScreen, MessageScreen +ui/icons.slint SpIcon: shuffle, repeat, heart, lyrics, queue, devices (+ sf-ui's icons) +tools/mock_server.py stand-in Web API with made-up data (with SPOTIFY_MOCK=1: no librespot) +``` + +## Rules of this codebase + +- **Rust owns state and focus.** Slint only draws. Every key goes to `Controller::key`, except while an on-screen keyboard has the focus. +- **Engine thread:** librespot runs on its own tokio runtime. Talk to it with `Engine::send(Cmd)`; its `Event`s reach the UI thread through `slint::invoke_from_event_loop`. Blocking calls (`Engine::token`, `Engine::lyrics`, every `Api` method) only off the UI thread (`task::spawn`, `Cx::spawn`). +- **Playback is Spirc's:** play a context (`Cmd::Context`) whenever possible, so next/previous, shuffle and the phone's view work. `Cx::play` also opens Most szól. +- **Short borrows:** never hold `state.borrow_mut()` while calling `images.load*`; a cached picture calls back at once. +- **Glass:** new glass elements need their `glass` listed in a root `out property <[GlassRect]>`, and that array added in `main.rs`. Nothing Slint draws may sit under a glass pane. +- **Slint names:** a property may not be called `focus` (a function) or `cover` (an ImageFit value). +- **Texts are Hungarian.** +- **Testing on the developer's PC:** never open windows on the primary monitor. Use `SPOTIFY_WINDOW_POS` to put the window on another monitor, or run headless. + +## Check your change + +```sh +cargo test +python3 tools/mock_server.py --port 7890 & +SPOTIFY_MOCK=1 SPOTIFY_API=http://127.0.0.1:7890/v1 SF_UI_SIZE=1600x900 \ + SF_UI_KEYS="wait wait down enter wait wait" SF_UI_SNAPSHOT=/tmp/shot.png cargo run # then look at /tmp/shot.png +``` diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..2da5884 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,9207 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "ab_glyph" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01c0457472c38ea5bd1c3b5ada5e368271cb550be7a4ca4a0b4634e9913f6cc2" +dependencies = [ + "ab_glyph_rasterizer", + "owned_ttf_parser", +] + +[[package]] +name = "ab_glyph_rasterizer" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618" + +[[package]] +name = "accesskit" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320" +dependencies = [ + "uuid", +] + +[[package]] +name = "accesskit_atspi_common" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "023da0e5097f46df7092d5280b02efb9bbf8d93298daeced42652463e357d636" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "phf", + "serde", + "zvariant", +] + +[[package]] +name = "accesskit_consumer" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + +[[package]] +name = "accesskit_ios" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "750c4e9f6ce888dfe8a10c0f1b5ceb646a7854fd46579d74919219d1bb314083" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.16.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", +] + +[[package]] +name = "accesskit_macos" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.16.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "accesskit_unix" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e156ed3802e35eefe894ef2671bc6c889303d8a7e110b5e1b48f504b91362f" +dependencies = [ + "accesskit", + "accesskit_atspi_common", + "async-channel", + "async-executor", + "async-task", + "atspi", + "futures-lite", + "futures-util", + "serde", + "zbus", +] + +[[package]] +name = "accesskit_windows" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106c2b961215864d1c2e703ee63269c25c4e80a577ffb2c1017b9c17dcdf83a1" +dependencies = [ + "accesskit", + "accesskit_consumer", + "hashbrown 0.16.1", + "static_assertions", + "windows 0.62.2", + "windows-core 0.62.2", +] + +[[package]] +name = "accesskit_winit" +version = "0.33.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5b41e63a69f36d9f1f41e70464c7e5f72eee485ef26aab19f0b4f86e6c0a84c" +dependencies = [ + "accesskit", + "accesskit_ios", + "accesskit_macos", + "accesskit_unix", + "accesskit_windows", + "raw-window-handle", + "winit", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "alsa" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" +dependencies = [ + "alsa-sys", + "bitflags 2.13.2", + "cfg-if", + "libc", +] + +[[package]] +name = "alsa-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db8fee663d06c4e303404ef5f40488a53e062f89ba8bfed81f42325aafad1527" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "android-activity" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" +dependencies = [ + "android-properties", + "bitflags 2.13.2", + "cc", + "jni 0.22.4", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "num_enum", + "thiserror 2.0.21", +] + +[[package]] +name = "android-properties" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "annotate-snippets" +version = "0.12.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a5b0a5ab8561c603f16c3b78c24a386b1f70e7fc1b1b1e8c15738828e4a176" +dependencies = [ + "anstyle", + "memchr", + "unicode-width", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" + +[[package]] +name = "arboard" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb9553e62312c8756a5979254fc6d7da8bbeb5986a1e17037fab932f7037917" +dependencies = [ + "clipboard-win", + "log", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "parking_lot", + "percent-encoding", + "windows-sys 0.61.2", + "wl-clipboard-rs", + "x11rb", +] + +[[package]] +name = "arc-swap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "380962b3d93b99642e50b9febf72c071e97e8b32d86eae9cf4ef582bb960ae6e" +dependencies = [ + "rustversion", +] + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" + +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix 1.1.6", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix 1.1.6", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 1.1.6", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "atomic_refcell" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e4227379beff4205943696e6c3e0cd809bacdf3f0edd6e3dd153e2269571a4" + +[[package]] +name = "atspi" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d" +dependencies = [ + "atspi-common", + "atspi-proxies", +] + +[[package]] +name = "atspi-common" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d" +dependencies = [ + "enumflags2", + "serde", + "static_assertions", + "zbus", + "zbus-lockstep", + "zbus-lockstep-macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "atspi-proxies" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc" +dependencies = [ + "atspi-common", + "serde", + "zbus", +] + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey 0.1.1", + "rayon", + "thiserror 2.0.21", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom 8.0.0", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "base64ct" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" + +[[package]] +name = "bincode" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" +dependencies = [ + "serde", + "unty", +] + +[[package]] +name = "bindgen" +version = "0.72.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" +dependencies = [ + "bitflags 2.13.2", + "cexpr", + "clang-sys", + "itertools 0.13.0", + "log", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash 2.1.3", + "shlex 1.3.0", + "syn 2.0.119", +] + +[[package]] +name = "bit-set" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51" + +[[package]] +name = "bit_field" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e4b40c7323adcfc0a41c4b88143ed58346ff65a288fc144329c5c45e05d70c6" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "bitstream-io" +version = "4.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" +dependencies = [ + "no_std_io2", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2 0.5.3", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2 0.6.5", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "borsh" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "553c5d846a6ba5150c65e3b1b8ec073bcf1abc20f9b7220de384a4443ea4e20a" +dependencies = [ + "bytes", + "cfg_aliases", +] + +[[package]] +name = "built" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "by_address" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" + +[[package]] +name = "calloop" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" +dependencies = [ + "bitflags 2.13.2", + "log", + "polling", + "rustix 0.38.44", + "slab", + "thiserror 1.0.69", +] + +[[package]] +name = "calloop" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e" +dependencies = [ + "bitflags 2.13.2", + "polling", + "rustix 1.1.6", + "tracing", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" +dependencies = [ + "calloop 0.13.0", + "rustix 0.38.44", + "wayland-backend", + "wayland-client", +] + +[[package]] +name = "cc" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex 2.0.1", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom 7.1.3", +] + +[[package]] +name = "cfg-expr" +version = "0.20.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba9e9ec16c447027685b1f897b720e18e9a8afd00bd7332c483537e38086c9f" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "cfg_aliases" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "cgl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" +dependencies = [ + "libc", +] + +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-link 0.2.1", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] +name = "clang-sys" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a" +dependencies = [ + "glob", + "libc", + "libloading", +] + +[[package]] +name = "clipboard-win" +version = "5.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052af7878466feccda12ba7a6a67d019d712f296809559b47c12c8cc196d3a9a" +dependencies = [ + "error-code", +] + +[[package]] +name = "clru" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197fd99cb113a8d5d9b6376f3aa817f32c1078f2343b714fff7d2ca44fdf67d5" +dependencies = [ + "hashbrown 0.16.1", +] + +[[package]] +name = "codespan-reporting" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-field-offset" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d535c69e75b4e3c69e17205b5b37a91936c54086cecd339b70071500786acb9c" +dependencies = [ + "const-field-offset-macro", + "field-offset", +] + +[[package]] +name = "const-field-offset-macro" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d5848843a221ac268cfdd6bfd14e68d5d3dfa79d52c880aafab93f9517fb74" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "cookie" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +dependencies = [ + "percent-encoding", + "time", + "version_check", +] + +[[package]] +name = "cookie_store" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15b2c103cf610ec6cae3da84a766285b42fd16aad564758459e6ecf128c75206" +dependencies = [ + "cookie", + "document-features", + "idna", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "time", + "url", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "core_detect" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48" + +[[package]] +name = "coreaudio-rs" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aae284fbaf7d27aa0e292f7677dfbe26503b0d555026f702940805a630eac17" +dependencies = [ + "bitflags 1.3.2", + "libc", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "countme" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" + +[[package]] +name = "cpal" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbd307f43cc2a697e2d1f8bc7a1d824b5269e052209e28883e5bc04d095aaa3f" +dependencies = [ + "alsa", + "coreaudio-rs", + "dasp_sample", + "jni 0.21.1", + "js-sys", + "libc", + "mach2", + "ndk", + "ndk-context", + "num-derive", + "num-traits", + "objc2-audio-toolbox", + "objc2-core-audio", + "objc2-core-audio-types", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows 0.54.0", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e8bd762f7479489c70ed6c768ddca99d7296857de437a68dcb2a94365b3fae" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctor" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83cf0d42651b16c6dfe68685716d18480d18a9c39c62d76e8cf3eb6ed5d8bcbf" +dependencies = [ + "dtor", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "cursor-icon" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dasp_sample" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" + +[[package]] +name = "data-encoding" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" + +[[package]] +name = "data-url" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" + +[[package]] +name = "defmt" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "defmt-parser" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.119", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", + "unicode-xid", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] +name = "dispatch" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dlib" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a" +dependencies = [ + "libloading", +] + +[[package]] +name = "document-features" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61" +dependencies = [ + "litrs", +] + +[[package]] +name = "downcast-rs" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" + +[[package]] +name = "drm" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bc8c5c6c2941f70a55c15f8d9f00f9710ebda3ffda98075f996a0e6c92756f" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "drm-ffi", + "drm-fourcc", + "libc", + "rustix 0.38.44", +] + +[[package]] +name = "drm-ffi" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51a91c9b32ac4e8105dec255e849e0d66e27d7c34d184364fb93e469db08f690" +dependencies = [ + "drm-sys", + "rustix 1.1.6", +] + +[[package]] +name = "drm-fourcc" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aafbcdb8afc29c1a7ee5fbe53b5d62f4565b35a042a662ca9fecd0b54dae6f4" + +[[package]] +name = "drm-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8e1361066d91f5ffccff060a3c3be9c3ecde15be2959c1937595f7a82a9f8" +dependencies = [ + "libc", + "linux-raw-sys 0.9.4", +] + +[[package]] +name = "dtor" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edf234dd1594d6dd434a8fb8cada51ddbbc593e40e4a01556a0b31c62da2775b" + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "encoding_rs" +version = "0.8.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89253175e704ab869b04f9db224d38630e0211a53841a79181deae0889e169f5" +dependencies = [ + "cfg-if", + "core_detect", + "multiversion_no_op", + "rustversion", + "scopeguard", + "simdutf8", +] + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "env_filter" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217" +dependencies = [ + "log", + "regex", +] + +[[package]] +name = "env_logger" +version = "0.11.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6" +dependencies = [ + "anstream", + "anstyle", + "env_filter", + "jiff", + "log", +] + +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "error-code" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7" + +[[package]] +name = "euclid" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06" +dependencies = [ + "num-traits", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "exr" +version = "1.74.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711fe42c9964295e01ee3fba3f9fe0e1d24b98886950d68efe81b1c76e21adf3" +dependencies = [ + "bit_field", + "half", + "lebe", + "miniz_oxide 0.8.9", + "num-complex", + "pulp", + "smallvec", + "zune-inflate", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "femtovg" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31eebf3ab1b76359ccd5f850c07a7c6b2722c64d9127c40e02358e83f3ff9b1a" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "fnv", + "glow 0.18.0", + "imgref", + "itertools 0.15.0", + "log", + "rgb", + "slotmap", + "swash", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "filetime" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c287a33c7f0a620c38e641e7f60827713987b3c0f26e8ddc9462cc69cf75759" +dependencies = [ + "cfg-if", + "libc", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "fixed_decimal" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2214fb00f669ee96bee5bb29dfb1ddabe058b2bc426817efc79afa03c9bc55ae" +dependencies = [ + "displaydoc", + "smallvec", + "writeable", +] + +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "font-types" +version = "0.12.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "fontdb" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2660c5e9157bf76d2db1294e4a9feba604ef610819a3b591088d0d8392a3290f" +dependencies = [ + "log", + "slotmap", + "tinyvec", +] + +[[package]] +name = "fontique" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6688bc1294fe7117d788937b6c53480169b29c566954af490830d4c09da9516a" +dependencies = [ + "hashbrown 0.17.1", + "linebender_resource_handle", + "memmap2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-text", + "objc2-foundation 0.3.2", + "parlance", + "read-fonts", + "roxmltree", + "smallvec", + "windows 0.62.2", + "windows-core 0.62.2", + "yeslogic-fontconfig-sys", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-timer" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gbm" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce852e998d3ca5e4a97014fb31c940dc5ef344ec7d364984525fd11e8a547e6a" +dependencies = [ + "bitflags 2.13.2", + "drm", + "drm-fourcc", + "gbm-sys", + "libc", +] + +[[package]] +name = "gbm-sys" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13a5f2acc785d8fb6bf6b7ab6bfb0ef5dad4f4d97e8e70bb8e470722312f76f" +dependencies = [ + "libc", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" +dependencies = [ + "rustix 1.1.6", + "windows-link 0.2.1", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasm-bindgen", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gio-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0071fe88dba8e40086c8ff9bbb62622999f49628344b1d1bf490a48a29d80f22" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "windows-sys 0.61.2", +] + +[[package]] +name = "gl_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] + +[[package]] +name = "glib" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16de123c2e6c90ce3b573b7330de19be649080ec612033d397d72da265f1bd8b" +dependencies = [ + "bitflags 2.13.2", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "smallvec", +] + +[[package]] +name = "glib-macros" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf59b675301228a696fe01c3073974643365080a76cc3ed5bc2cbc466ad87f17" +dependencies = [ + "heck", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d95e1a3a19ae464a7286e14af9a90683c64d70c02532d88d87ce95056af3e6c" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "glow" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glow" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "263218b0ba2b0715c3370fb04674f5f8aa331594b521c94ff0a8e4a8472d1386" +dependencies = [ + "js-sys", + "slotmap", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "glutin" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" +dependencies = [ + "bitflags 2.13.2", + "cfg_aliases", + "cgl", + "dispatch2", + "glutin_egl_sys", + "glutin_glx_sys", + "glutin_wgl_sys", + "libloading", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "raw-window-handle", + "wayland-sys", + "windows-sys 0.52.0", + "x11-dl", +] + +[[package]] +name = "glutin-winit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f" +dependencies = [ + "cfg_aliases", + "glutin", + "raw-window-handle", + "winit", +] + +[[package]] +name = "glutin_egl_sys" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2" +dependencies = [ + "gl_generator", + "windows-sys 0.52.0", +] + +[[package]] +name = "glutin_glx_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185" +dependencies = [ + "gl_generator", + "x11-dl", +] + +[[package]] +name = "glutin_wgl_sys" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" +dependencies = [ + "gl_generator", +] + +[[package]] +name = "gobject-sys" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dca35da0d19a18f4575f3cb99fe1c9e029a2941af5662f326f738a21edaf294" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "governor" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9efcab3c1958580ff1f25a2a41be1668f7603d849bb63af523b208a3cc1223b8" +dependencies = [ + "cfg-if", + "futures-sink", + "futures-timer", + "futures-util", + "hashbrown 0.16.1", + "nonzero_ext", + "parking_lot", + "portable-atomic", + "smallvec", + "spinning_top", + "web-time", +] + +[[package]] +name = "gpu-allocator" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795" +dependencies = [ + "ash", + "hashbrown 0.16.1", + "log", + "presser", + "thiserror 2.0.21", + "windows 0.62.2", +] + +[[package]] +name = "grid" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b40ca9252762c466af32d0b1002e91e4e1bc5398f77455e55474deb466355ff5" + +[[package]] +name = "gstreamer" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e8251db223ca38d9aefaf3d19f6f11581a9123cd12dacebd8b9e182da965023" +dependencies = [ + "cfg-if", + "futures-channel", + "futures-core", + "futures-util", + "glib", + "gstreamer-sys", + "itertools 0.14.0", + "kstring", + "libc", + "muldiv", + "num-integer", + "num-rational", + "option-operations", + "pastey 0.2.3", + "pin-project-lite", + "smallvec", + "thiserror 2.0.21", +] + +[[package]] +name = "gstreamer-app" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3da7017b2a2fa5cdf9123b1603947ea24174f6d8cea0ea673411df824c811921" +dependencies = [ + "futures-core", + "futures-sink", + "glib", + "gstreamer", + "gstreamer-app-sys", + "gstreamer-base", + "libc", +] + +[[package]] +name = "gstreamer-app-sys" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa9f1b12b546aea543c15a0fdbc5a53617902a74f6d357a32b6a9fb4bc4725c" +dependencies = [ + "glib-sys", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-audio" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76c058cce8d32bfb6dd578a3d6d1d874b855a638b738d8bb34cd7aedd65aeddd" +dependencies = [ + "cfg-if", + "glib", + "gstreamer", + "gstreamer-audio-sys", + "gstreamer-base", + "libc", + "smallvec", +] + +[[package]] +name = "gstreamer-audio-sys" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "807e476f555c4e7409d8c8fe4fd10fa9989b8e8f2898762d9551e1adfde98a2d" +dependencies = [ + "glib-sys", + "gobject-sys", + "gstreamer-base-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-base" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9375f9a12120a8ee17b765c816c9b23861ce258def77b0ee40a05acb00c74972" +dependencies = [ + "atomic_refcell", + "cfg-if", + "glib", + "gstreamer", + "gstreamer-base-sys", + "libc", +] + +[[package]] +name = "gstreamer-base-sys" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b844f3559b6ab0379b4b771261643783ae4e0ffa71d5f5f46e33b7acf66b752" +dependencies = [ + "glib-sys", + "gobject-sys", + "gstreamer-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gstreamer-sys" +version = "0.24.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5d37c1a599ae57b8186948bd5699f2dbfc044baea9d400228b489a85bcf2759" +dependencies = [ + "cfg-if", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "h2" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "num-traits", + "zerocopy", +] + +[[package]] +name = "harfrust" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "read-fonts", + "smallvec", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "foldhash 0.2.0", +] + +[[package]] +name = "headers" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2700e3fe555c3310aa7286cac6167449f2c87e0eb58769c9208a1c58a1d106" +dependencies = [ + "base64 0.22.1", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] + +[[package]] +name = "home" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if", + "libc", + "windows-link 0.2.1", +] + +[[package]] +name = "htmlparser" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48ce8546b993eaf241d69ded33b1be6d205dd9857ec879d9d18bd05d3676e144" + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-proxy2" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9043b7b23fb0bc4a1c7014c27b50a4fc42cc76206f71d34fc0dfe5b28ddc3faf" +dependencies = [ + "bytes", + "futures-util", + "headers", + "http", + "hyper", + "hyper-rustls 0.26.0", + "hyper-util", + "pin-project-lite", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", + "webpki", + "webpki-roots 0.26.11", +] + +[[package]] +name = "hyper-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "log", + "rustls 0.22.4", + "rustls-native-certs", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.25.0", + "tower-service", + "webpki-roots 0.26.11", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls 0.23.46", + "tokio", + "tokio-rustls 0.26.6", + "tower-service", + "webpki-roots 1.0.11", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "i-slint-backend-linuxkms" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f519a8611a4982921e46e391015e5e40ceac5cc63813333ef91ada77df180d8" +dependencies = [ + "bytemuck", + "calloop 0.14.5", + "cfg_aliases", + "drm", + "gbm", + "glutin", + "i-slint-common", + "i-slint-core", + "i-slint-renderer-femtovg", + "i-slint-renderer-software", + "input", + "libseat", + "memmap2", + "nix", + "raw-window-handle", + "xkbcommon", +] + +[[package]] +name = "i-slint-backend-selector" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb974705d61ba56034f6129ff61f3e6282a2c0c07752f25e6cb417d81c0f0958" +dependencies = [ + "cfg-if", + "cfg_aliases", + "i-slint-backend-linuxkms", + "i-slint-backend-testing", + "i-slint-backend-winit", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "i-slint-renderer-femtovg", +] + +[[package]] +name = "i-slint-backend-testing" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01943d6c5ea5bc913d497bdaa423c309e7627afff47a6794bfd13be5c564209f" +dependencies = [ + "cfg_aliases", + "i-slint-common", + "i-slint-core", + "i-slint-renderer-software", + "vtable", +] + +[[package]] +name = "i-slint-backend-winit" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dae4fcf1b19e9cb109984d2af87d2b9485388c619265bff71dd523133888bee2" +dependencies = [ + "accesskit", + "accesskit_winit", + "arboard", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "futures", + "glutin", + "glutin-winit", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "i-slint-renderer-femtovg", + "i-slint-renderer-skia", + "i-slint-renderer-software", + "imgref", + "lyon_path", + "muda", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", + "objc2-ui-kit 0.3.2", + "pin-weak", + "raw-window-handle", + "rgb", + "scoped-tls-hkt", + "scopeguard", + "softbuffer", + "strum", + "vtable", + "wasm-bindgen", + "web-sys", + "webbrowser", + "windows 0.62.2", + "winit", + "zbus", +] + +[[package]] +name = "i-slint-common" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a578f3e4b681b2b9cbd326d3be19716e2fac51d00a8a5b00c0ef4ae923b5e6" +dependencies = [ + "derive_more", + "fontique", + "htmlparser", + "icu_decimal", + "icu_locale_core", + "icu_provider", + "pulldown-cmark", + "resvg", + "skrifa", +] + +[[package]] +name = "i-slint-compiler" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55d48ebef05e2bf09ba5a1fc67bcb11033b9e12a2a50ed3105c7d25e2b539d0" +dependencies = [ + "annotate-snippets", + "by_address", + "data-url", + "derive_more", + "i-slint-common", + "icu_normalizer", + "icu_properties", + "image", + "indexmap", + "itertools 0.15.0", + "lyon_extra", + "lyon_path", + "num_enum", + "proc-macro2", + "quote", + "rayon", + "resvg", + "rowan", + "rspolib", + "skrifa", + "smol_str 0.3.7", + "strum", + "swash", + "typed-index-collections", + "unicode-segmentation", + "url", +] + +[[package]] +name = "i-slint-core" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2ea15059d70bc31b1a8b1eb4c34f2c5df04cb7e53f36179b43c0261231d646" +dependencies = [ + "accesskit", + "async-channel", + "bitflags 2.13.2", + "cfg-if", + "chrono", + "clru", + "const-field-offset", + "derive_more", + "euclid", + "i-slint-common", + "i-slint-core-macros", + "icu_normalizer", + "image", + "js-sys", + "ksni", + "lyon_algorithms", + "lyon_extra", + "lyon_geom", + "lyon_path", + "num-traits", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "once_cell", + "parley", + "pin-project", + "pin-weak", + "portable-atomic", + "raw-window-handle", + "resvg", + "rgb", + "scopeguard", + "skrifa", + "slab", + "strum", + "swash", + "sys-locale", + "taffy", + "unicode-linebreak", + "unicode-script", + "unicode-segmentation", + "vtable", + "wasm-bindgen", + "web-sys", + "web-time", + "wgpu", + "windows 0.62.2", +] + +[[package]] +name = "i-slint-core-macros" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f5a8a076de52f53be80caa826599ed2107b54c9d4a421e66dc06cf893a984c" +dependencies = [ + "quote", + "serde_json", + "syn 3.0.9", +] + +[[package]] +name = "i-slint-renderer-femtovg" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb0de504d57cdadf80c2abf7bcb8b7135a3716aee1f41b6ebb90ea93e3649d7c" +dependencies = [ + "cfg-if", + "const-field-offset", + "femtovg", + "glow 0.18.0", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "imgref", + "lyon_path", + "pin-weak", + "rgb", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "i-slint-renderer-skia" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc9c1cf02385f1d26fc1f423544e52390a8e5c2d89420a8042aa94b4fe109d1f" +dependencies = [ + "bytemuck", + "cfg-if", + "cfg_aliases", + "clru", + "const-field-offset", + "glow 0.18.0", + "glutin", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "lyon_path", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "pin-weak", + "raw-window-handle", + "read-fonts", + "scoped-tls-hkt", + "skia-safe", + "softbuffer", + "spin_on", + "unicode-segmentation", + "vtable", + "wgpu", + "wgpu-hal", + "windows 0.62.2", + "windows-core 0.62.2", + "write-fonts", +] + +[[package]] +name = "i-slint-renderer-software" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f8c641e138a2cc96537cac4481f5c7c8bb8dcc66d09acaed269329c8738628a" +dependencies = [ + "bytemuck", + "clru", + "derive_more", + "euclid", + "i-slint-common", + "i-slint-core", + "lyon_path", + "num-traits", + "skrifa", + "swash", + "zeno", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core 0.62.2", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_decimal" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1150ad5e272740670464934ee76facda43ef2e11f85c27b7ba76ccb33edf2d05" +dependencies = [ + "displaydoc", + "fixed_decimal", + "icu_decimal_data", + "icu_locale_core", + "icu_locale_fallback", + "icu_plurals", + "icu_provider", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_decimal_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5595ab78370d48abd24a062f3db115d5108dd0b65634352036cae532aebb0df8" + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "serde", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locale_fallback" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "406e9ae5b95d8aa37db6293405931b766a6172d1848daee22d70eb44aa78a43c" +dependencies = [ + "icu_locale_core", + "icu_locale_fallback_data", + "icu_provider", + "potential_utf", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locale_fallback_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3632ebbd0c5c3637ba1a40bdf8288f2cb9d2268e73441a69d5fc73d7cfbaa87c" + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_plurals" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ef046647b445acf95ce0f8083fa292467d3df649959fa9a20f3f8abfd957c5d" +dependencies = [ + "fixed_decimal", + "icu_locale_fallback", + "icu_plurals_data", + "icu_provider", + "zerovec", +] + +[[package]] +name = "icu_plurals_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d43ff7df2c1a1d41588a6ddcba354d513d4a3e10eec22c06fe56d13c12a848ea" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "serde", + "stable_deref_trait", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_segmenter" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61b195dc605f81aa181bec9b3bd14e26cc71b903e4644f6af578ca9772c7a710" +dependencies = [ + "icu_collections", + "icu_locale_fallback", + "icu_provider", + "icu_segmenter_data", + "potential_utf", + "smallvec", + "utf8_iter", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_segmenter_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "913a7d294ad056474749152107309fdee3ec17d2482d1ab70fdc61a81c64b9a3" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "if-addrs" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf39cc0423ee66021dc5eccface85580e4a001e0c5288bae8bea7ecb69225e90" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "exr", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png", + "qoi", + "ravif", + "rgb", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525e9ff3e1a4be2fbea1fdf0e98686a6d98b4d8f937e1bf7402245af1909e8c3" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "imagesize" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65b27460c2c92b037f3f94c538ed9a3342f3fdf923606781629ccb35f82d042a" + +[[package]] +name = "imgref" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "input" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9793345a65d71317763a33066b5d8351f8760dde8d4930fe9e39b5f14a7959d" +dependencies = [ + "bitflags 2.13.2", + "input-sys", + "libc", + "log", + "udev", +] + +[[package]] +name = "input-sys" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eee07d8e02bd95bf52b2e642cf13d33701b94c6e4b04fbf1d1fb07e9cb19e7" + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "io-lifetimes" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +dependencies = [ + "hermit-abi 0.3.9", + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "jiff" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b005715dcbeb0089a3c0dab99f2ff1cc3b2525323552703d648585d342a383" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", +] + +[[package]] +name = "jiff-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c" +dependencies = [ + "defmt", + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cc9817253cf7c7ee4684451bd327e88d6f3658014e54a29198625590650695c" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys 0.4.1", + "log", + "simd_cesu8", + "thiserror 2.0.21", + "walkdir", + "windows-link 0.2.1", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "keyboard-types" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a" +dependencies = [ + "bitflags 2.13.2", + "serde", + "unicode-segmentation", +] + +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + +[[package]] +name = "ksni" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bcc1cb43797140f74b711f1c4a49f48a7a7429f211c5fb78264e7bcd1e99caf" +dependencies = [ + "arc-swap", + "async-executor", + "async-io", + "async-lock", + "crossbeam-queue", + "futures-channel", + "futures-lite", + "futures-util", + "pastey 0.2.3", + "serde", + "task-local", + "zbus", +] + +[[package]] +name = "kstring" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a09b82a7f771ed02dc0dd9b27130a0fa5499fa15ed3027116c1e5e4e591bd9e" +dependencies = [ + "static_assertions", +] + +[[package]] +name = "kurbo" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" +dependencies = [ + "arrayvec", + "euclid", + "polycool", + "smallvec", +] + +[[package]] +name = "lazy_static" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb" +dependencies = [ + "spin", +] + +[[package]] +name = "lebe" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + +[[package]] +name = "libmdns" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dbe871d2cf9df13f68d152b949fca8cafc854b60ffd259fc6df6e8663d8d7" +dependencies = [ + "byteorder", + "futures-util", + "hostname", + "if-addrs", + "log", + "multimap", + "rand 0.9.5", + "socket2", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "bitflags 2.13.2", + "libc", + "plain", + "redox_syscall 0.9.5", +] + +[[package]] +name = "librespot-audio" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3fe76acb49f58165484303edf0e7bd778f0e6d96f5c59e9d6b6fde1a90d36ff" +dependencies = [ + "aes", + "bytes", + "ctr", + "futures-util", + "http-body-util", + "hyper", + "hyper-util", + "librespot-core", + "log", + "tempfile", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "librespot-connect" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b2a21e9e19b906c6676b1a515fc5529d5414f69049f5a167dfb2ea3206e5a27" +dependencies = [ + "futures-util", + "librespot-core", + "librespot-playback", + "librespot-protocol", + "log", + "protobuf", + "rand 0.9.5", + "serde_json", + "thiserror 2.0.21", + "tokio", + "tokio-stream", + "uuid", +] + +[[package]] +name = "librespot-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168bbe1c416980ddd9a969ebd6b50fb6c924eb1a3ded194285fa8ec0e2b1c68b" +dependencies = [ + "aes", + "base64 0.22.1", + "byteorder", + "bytes", + "data-encoding", + "flate2", + "form_urlencoded", + "futures-core", + "futures-util", + "governor", + "hmac", + "http", + "http-body-util", + "httparse", + "hyper", + "hyper-proxy2", + "hyper-rustls 0.27.10", + "hyper-util", + "librespot-oauth", + "librespot-protocol", + "log", + "nonzero_ext", + "num-bigint", + "num-derive", + "num-integer", + "num-traits", + "pbkdf2", + "pin-project-lite", + "priority-queue", + "protobuf", + "protobuf-json-mapping", + "quick-xml 0.38.4", + "rand 0.9.5", + "rand_distr", + "rsa", + "serde", + "serde_json", + "sha1", + "shannon", + "sysinfo", + "thiserror 2.0.21", + "time", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tokio-util", + "url", + "uuid", + "vergen-gitcl", +] + +[[package]] +name = "librespot-discovery" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19be30e529532de833cad024d27ad9462f3acb02a3cf1953fbc314527691e0f5" +dependencies = [ + "aes", + "base64 0.22.1", + "bytes", + "ctr", + "form_urlencoded", + "futures-core", + "futures-util", + "hmac", + "http-body-util", + "hyper", + "hyper-util", + "libmdns", + "librespot-core", + "log", + "rand 0.9.5", + "serde_json", + "serde_repr", + "sha1", + "thiserror 2.0.21", + "tokio", +] + +[[package]] +name = "librespot-metadata" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a9c688aa2acd3ed2498e31a95d6f2be49c0f18128db8958450ffd628aa88532" +dependencies = [ + "async-trait", + "bytes", + "librespot-core", + "librespot-protocol", + "log", + "protobuf", + "serde", + "serde_json", + "thiserror 2.0.21", + "uuid", +] + +[[package]] +name = "librespot-oauth" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686417d49c9d2c363392ffe28d6e469daca20a82dc414740930e078f5829661" +dependencies = [ + "log", + "oauth2", + "open", + "reqwest", + "thiserror 2.0.21", + "url", +] + +[[package]] +name = "librespot-playback" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88258620bf3e6808ea1fadd11639648d77c06280b9f5a4c9d14ea79f6f998af6" +dependencies = [ + "cpal", + "form_urlencoded", + "futures-util", + "gstreamer", + "gstreamer-app", + "gstreamer-audio", + "librespot-audio", + "librespot-core", + "librespot-metadata", + "log", + "portable-atomic", + "rand 0.9.5", + "rand_distr", + "rodio", + "shell-words", + "symphonia", + "thiserror 2.0.21", + "tokio", + "zerocopy", +] + +[[package]] +name = "librespot-protocol" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e01f0b2d39f83fa162eb91d4a16313bcf99e77daf258abe8f7b7bcb1160b084" +dependencies = [ + "protobuf", + "protobuf-codegen", +] + +[[package]] +name = "libseat" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6656c69b6e0366ffb83faa232f3e4fda5fc91161722d140f2c95ce2e90b1ef31" +dependencies = [ + "errno", + "libseat-sys", + "log", +] + +[[package]] +name = "libseat-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a484fa48be5f62a8d3ffed767779d0ab808cfead91de98ef4362d469097dfb" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libudev-sys" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "linebender_resource_handle" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "litrs" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "lru-slab" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" + +[[package]] +name = "lyon_algorithms" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a6b9d4e8b48acd531fbf1241ad9b270df6e60b6b92bdea1469f4f40899d805" +dependencies = [ + "lyon_path", + "num-traits", +] + +[[package]] +name = "lyon_extra" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7755f08423275157ad1680aaecc9ccb7e0cc633da3240fea2d1522935cc15c72" +dependencies = [ + "lyon_path", + "thiserror 2.0.21", +] + +[[package]] +name = "lyon_geom" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d82dd26aa4dc0b5b70b9115de59824842bcb43cf4a28e1b1e6d0ad148c93f93e" +dependencies = [ + "arrayvec", + "euclid", + "num-traits", +] + +[[package]] +name = "lyon_path" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c463f9c428b7fc5ec885dcd39ce4aa61e29111d0e33483f6f98c74e89d8621e" +dependencies = [ + "lyon_geom", + "num-traits", +] + +[[package]] +name = "mach2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" +dependencies = [ + "libc", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memmap2" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.19.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878" +dependencies = [ + "crossbeam-channel", + "dpi", + "keyboard-types", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "once_cell", + "png", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "muldiv" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0" + +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + +[[package]] +name = "multiversion_no_op" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d" + +[[package]] +name = "naga" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130" +dependencies = [ + "arrayvec", + "bit-set", + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "codespan-reporting", + "half", + "hashbrown 0.17.1", + "indexmap", + "libm", + "log", + "naga-types", + "num-traits", + "once_cell", + "rustc-hash 1.1.0", + "spirv", + "thiserror 2.0.21", + "unicode-ident", +] + +[[package]] +name = "naga-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49" +dependencies = [ + "hashbrown 0.17.1", + "indexmap", + "rustc-hash 1.1.0", + "thiserror 2.0.21", +] + +[[package]] +name = "natord" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags 2.13.2", + "cfg-if", + "cfg_aliases", + "libc", +] + +[[package]] +name = "no_std_io2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +dependencies = [ + "memchr", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "nonzero_ext" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "ntapi" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" +dependencies = [ + "winapi", +] + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.8", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "bytemuck", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num_threads" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cabcc654086861f9e1bc5115258de62ef92c79b20f4615a1b0cc57c4e82027d4" +dependencies = [ + "libc", +] + +[[package]] +name = "oauth2" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" +dependencies = [ + "base64 0.22.1", + "chrono", + "getrandom 0.2.17", + "http", + "rand 0.8.8", + "reqwest", + "serde", + "serde_json", + "serde_path_to_error", + "sha2", + "thiserror 1.0.69", + "url", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "libc", + "objc2 0.5.3", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation 0.2.2", + "objc2-quartz-core 0.2.2", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-audio-toolbox" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6948501a91121d6399b79abaa33a8aa4ea7857fe019f341b8c23ad6e81b79b08" +dependencies = [ + "bitflags 2.13.2", + "libc", + "objc2 0.6.5", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" +dependencies = [ + "dispatch2", + "objc2 0.6.5", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-contacts", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "dispatch", + "libc", + "objc2 0.5.3", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" +dependencies = [ + "libc", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-metal" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-foundation 0.3.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", + "objc2-metal 0.2.2", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation 0.2.2", + "objc2-link-presentation", + "objc2-quartz-core 0.2.2", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "block2 0.6.2", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2 0.5.1", + "objc2 0.5.3", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.13.2", + "block2 0.5.1", + "objc2 0.5.3", + "objc2-core-location", + "objc2-foundation 0.2.2", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "open" +version = "5.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" +dependencies = [ + "is-wsl", + "libc", +] + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "option-operations" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aca39cf52b03268400c16eeb9b56382ea3c3353409309b63f5c8f0b1faf42754" +dependencies = [ + "pastey 0.2.3", +] + +[[package]] +name = "orbclient" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747" +dependencies = [ + "libc", + "libredox", +] + +[[package]] +name = "ordered-float" +version = "5.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f59006ce1e204c30956638535b74d317bca99477b9356dfaec54c37f6f600ab" +dependencies = [ + "num-traits", +] + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "os_pipe" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "owned_ttf_parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36820e9051aca1014ddc75770aab4d68bc1e9e632f0f5627c4086bc216fb583b" +dependencies = [ + "ttf-parser", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.5.18", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "parlance" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73072a9470554c8e794778acece2312661218aaabb635600957d952cf01c716e" + +[[package]] +name = "parley" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22d2ff88bd3f7d68d1d9b09c7e6209f9a8e8c05088295140a2bcf2e9b17038c5" +dependencies = [ + "accesskit", + "fontique", + "harfrust", + "hashbrown 0.17.1", + "icu_normalizer", + "icu_properties", + "icu_segmenter", + "linebender_resource_handle", + "parlance", + "parley_data", + "skrifa", +] + +[[package]] +name = "parley_data" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1567535334d6ba2d3cde19221ba9a7bd0fabb3cbd99046ddfb10ae061cfcc889" +dependencies = [ + "icu_properties", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest", + "hmac", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", +] + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13bee6c73da26345c729282832b60b0363cf3dd9f4bfd81d8551b7a1c889a113" + +[[package]] +name = "pin-weak" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b330c9d1b92dfe68442ca20b009c717d5f0b1e3cf4965e62f704c3c6e95a1305" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.5.3", + "pin-project-lite", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" +dependencies = [ + "critical-section", +] + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "serde_core", + "writeable", + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.119", +] + +[[package]] +name = "priority-queue" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93980406f12d9f8140ed5abe7155acb10bb1e69ea55c88960b9c2f117445ef96" +dependencies = [ + "equivalent", + "indexmap", + "serde", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "protobuf" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65a1d4ddae7d8b5de68153b48f6aa3bba8cb002b243dbdbc55a5afbc98f99f4" +dependencies = [ + "once_cell", + "protobuf-support", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-codegen" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3976825c0014bbd2f3b34f0001876604fe87e0c86cd8fa54251530f1544ace" +dependencies = [ + "anyhow", + "once_cell", + "protobuf", + "protobuf-parse", + "regex", + "tempfile", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-json-mapping" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0d6e4be637b310d8a5c02fa195243328e2d97fa7df1127a27281ef1187fcb1d" +dependencies = [ + "protobuf", + "protobuf-support", + "thiserror 1.0.69", +] + +[[package]] +name = "protobuf-parse" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4aeaa1f2460f1d348eeaeed86aea999ce98c1bded6f089ff8514c9d9dbdc973" +dependencies = [ + "anyhow", + "indexmap", + "log", + "protobuf", + "protobuf-support", + "tempfile", + "thiserror 1.0.69", + "which", +] + +[[package]] +name = "protobuf-support" +version = "3.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e36c2f31e0a47f9280fb347ef5e461ffcd2c52dd520d8e216b52f93b0b0d7d6" +dependencies = [ + "thiserror 1.0.69", +] + +[[package]] +name = "pulldown-cmark" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db2be46835f013dd3f4fa7f5f7402c537787b54ebb6fe2b94bbdd7e2669bb7b" +dependencies = [ + "bitflags 2.13.2", + "memchr", + "unicase", +] + +[[package]] +name = "pulp" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" +dependencies = [ + "bytemuck", + "cfg-if", + "libm", + "num-complex", + "paste", + "pulp-wasm-simd-flag", + "raw-cpuid", + "reborrow", + "version_check", +] + +[[package]] +name = "pulp-wasm-simd-flag" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "qoi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "qrcode" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d68782463e408eb1e668cf6152704bd856c78c5b6417adaee3203d8f4c1fc9ec" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quick-xml" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1" +dependencies = [ + "memchr", +] + +[[package]] +name = "quinn" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash 2.1.3", + "rustls 0.23.46", + "socket2", + "thiserror 2.0.21", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" +dependencies = [ + "bytes", + "getrandom 0.4.3", + "lru-slab", + "rand 0.10.3", + "rand_pcg", + "ring", + "rustc-hash 2.1.3", + "rustls 0.23.46", + "rustls-pki-types", + "slab", + "thiserror 2.0.21", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.61.2", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_distr" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" +dependencies = [ + "num-traits", + "rand 0.9.5", +] + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + +[[package]] +name = "range-alloc" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" + +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cfg-if", + "interpolate_name", + "itertools 0.14.0", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand 0.9.5", + "rand_chacha 0.9.0", + "simd_helpers", + "thiserror 2.0.21", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rgb", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "raw-window-metal" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135" +dependencies = [ + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", +] + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "read-fonts" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" +dependencies = [ + "bytemuck", + "font-types", + "once_cell", +] + +[[package]] +name = "reborrow" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_syscall" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "renderdoc-sys" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls 0.27.10", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.46", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls 0.26.6", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 1.0.11", +] + +[[package]] +name = "resvg" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e3803f97b999e80cbf7c6ecdd07a8102204d92e1633cf48783720c521196bd" +dependencies = [ + "bytemuck", + "gif", + "image-webp", + "log", + "pico-args", + "rgb", + "svgtypes", + "tiny-skia 0.12.0", + "usvg", + "zune-jpeg", +] + +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rodio" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e40ecf59e742e03336be6a3d53755e789fd05a059fa22dfa0ed624722319e183" +dependencies = [ + "cpal", + "dasp_sample", + "num-rational", +] + +[[package]] +name = "rowan" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b574c58582fa59fa43a2feb6608b8744184659f08a2e0117e4b8224d95ed61" +dependencies = [ + "countme", + "hashbrown 0.14.5", + "memoffset", + "rustc-hash 1.1.0", + "text-size", +] + +[[package]] +name = "roxmltree" +version = "0.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9da7f59328b09405b181fee1018925fad50f157afb43c0c0f5c522c256dd5907" +dependencies = [ + "memchr", +] + +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rspolib" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fda9a7796aff63a7b1b39ccc93fffaaf65e20042984b4843041a49ca4677535" +dependencies = [ + "lazy_static", + "natord", + "snafu", + "unicode-linebreak", + "unicode-width", +] + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags 2.13.2", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls" +version = "0.23.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.103.16", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cb23c424d8ee841bb4d813677ca237e2a610067d594fec130f87d6093495ab5" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scoped-tls-hkt" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9603871ffe5df3ac39cb624790c296dbd47a400d202f56bf3e414045099524d" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sctk-adwaita" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" +dependencies = [ + "ab_glyph", + "log", + "memmap2", + "smithay-client-toolkit", + "tiny-skia 0.11.4", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_path_to_error" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" +dependencies = [ + "itoa", + "serde", + "serde_core", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sf-ui" +version = "0.1.1" +source = "git+https://gitea.bluefox.support/fennec/sdk?tag=v0.1.1#25fecb8daee77232333c6f289410d2fd3eb40bfc" +dependencies = [ + "anyhow", + "glow 0.16.0", + "image", + "log", + "png", + "slint", + "ureq", +] + +[[package]] +name = "sha1" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest", +] + +[[package]] +name = "shannon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea5b41c9427b56caa7b808cb548a04fb50bb5b9e98590b53f28064ff4174561" +dependencies = [ + "byteorder", +] + +[[package]] +name = "shell-words" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simd_helpers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6" +dependencies = [ + "quote", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "simplecss" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c" +dependencies = [ + "log", +] + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "skia-bindings" +version = "0.153.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb325787c91b3f6c34a7c6f2b8a2297b20292d733ca53a08c233e5028aec49af" +dependencies = [ + "bindgen", + "cc", + "flate2", + "heck", + "pkg-config", + "regex", + "serde_json", + "tar", + "toml 1.1.8+spec-1.1.0", +] + +[[package]] +name = "skia-safe" +version = "0.153.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61cb643dac43067f3eb76c866635a74377ac0abca0ff2590674e1e295514c3d" +dependencies = [ + "bitflags 2.13.2", + "skia-bindings", + "windows 0.62.2", +] + +[[package]] +name = "skrifa" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" +dependencies = [ + "bytemuck", + "read-fonts", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "slint" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e477d5ff6fec20909100ff8f7062432ebfbda7a62a0f37d0252aa126f38c83" +dependencies = [ + "const-field-offset", + "i-slint-backend-linuxkms", + "i-slint-backend-selector", + "i-slint-common", + "i-slint-core", + "i-slint-core-macros", + "i-slint-renderer-femtovg", + "i-slint-renderer-software", + "num-traits", + "once_cell", + "pin-weak", + "slint-macros", + "unicode-segmentation", + "vtable", +] + +[[package]] +name = "slint-build" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ea28d4e1ad47d829b91e227f17037fac07a8001668a93fee47ac04f88718ebc" +dependencies = [ + "derive_more", + "fontique", + "i-slint-compiler", + "spin_on", + "toml_edit", +] + +[[package]] +name = "slint-macros" +version = "1.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e74b13d20884dc480ce37d0fabbf02cb4bc0df2a595434feac96ca7c2a0f15" +dependencies = [ + "i-slint-compiler", + "proc-macro2", + "quote", + "spin_on", +] + +[[package]] +name = "slotmap" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038" +dependencies = [ + "version_check", +] + +[[package]] +name = "smallvec" +version = "1.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" + +[[package]] +name = "smithay-client-toolkit" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" +dependencies = [ + "bitflags 2.13.2", + "calloop 0.13.0", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2", + "rustix 0.38.44", + "thiserror 1.0.69", + "wayland-backend", + "wayland-client", + "wayland-csd-frame", + "wayland-cursor", + "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", +] + +[[package]] +name = "smol_str" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeb7109d23f319619d4cc0de5464613c8b7b1a09db2774a58101459cf6be2f10" +dependencies = [ + "borsh", + "serde_core", +] + +[[package]] +name = "snafu" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" +dependencies = [ + "snafu-derive", +] + +[[package]] +name = "snafu-derive" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "as-raw-xcb-connection", + "bytemuck", + "fastrand", + "js-sys", + "memmap2", + "ndk", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-quartz-core 0.3.2", + "raw-window-handle", + "redox_syscall 0.5.18", + "rustix 1.1.6", + "tiny-xlib", + "tracing", + "wasm-bindgen", + "wayland-backend", + "wayland-client", + "wayland-sys", + "web-sys", + "windows-sys 0.61.2", + "x11rb", +] + +[[package]] +name = "spin" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" + +[[package]] +name = "spin_on" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "076e103ed41b9864aa838287efe5f4e3a7a0362dd00671ae62a212e5e4612da2" +dependencies = [ + "pin-utils", +] + +[[package]] +name = "spinning_top" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf02766a1eb909bc7653557c66b384e44edc3ad979e6257c6173c65ea51bc7d" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spirv" +version = "0.4.0+sdk-1.4.341.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spotify-tv" +version = "0.1.0" +dependencies = [ + "anyhow", + "env_logger", + "futures-util", + "librespot-connect", + "librespot-core", + "librespot-discovery", + "librespot-metadata", + "librespot-playback", + "log", + "qrcode", + "serde", + "serde_json", + "sf-ui", + "slint", + "slint-build", + "tokio", + "toml 0.9.12+spec-1.1.0", + "ureq", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strict-num" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +dependencies = [ + "float-cmp", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "svgtypes" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "695b5790b3131dafa99b3bbfd25a216edb3d216dad9ca208d4657bfb8f2abc3d" +dependencies = [ + "kurbo", + "siphasher", +] + +[[package]] +name = "swash" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2499c2d826531388872b2268718aed907a39bd785ab0dcfe57fab26283f92e" +dependencies = [ + "skrifa", + "yazi", + "zeno", +] + +[[package]] +name = "symphonia" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5773a4c030a19d9bfaa090f49746ff35c75dfddfa700df7a5939d5e076a57039" +dependencies = [ + "lazy_static", + "symphonia-bundle-flac", + "symphonia-bundle-mp3", + "symphonia-codec-vorbis", + "symphonia-core", + "symphonia-format-ogg", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-bundle-flac" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91565e180aea25d9b80a910c546802526ffd0072d0b8974e3ebe59b686c9976" +dependencies = [ + "log", + "symphonia-core", + "symphonia-metadata", + "symphonia-utils-xiph", +] + +[[package]] +name = "symphonia-bundle-mp3" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4872dd6bb56bf5eac799e3e957aa1981086c3e613b27e0ac23b176054f7c57ed" +dependencies = [ + "lazy_static", + "log", + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-codec-vorbis" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f025837c309cd69ffef572750b4a2257b59552c5399a5e49707cc5b1b85d1c73" +dependencies = [ + "log", + "symphonia-core", + "symphonia-utils-xiph", +] + +[[package]] +name = "symphonia-core" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea00cc4f79b7f6bb7ff87eddc065a1066f3a43fe1875979056672c9ef948c2af" +dependencies = [ + "arrayvec", + "bitflags 1.3.2", + "bytemuck", + "lazy_static", + "log", +] + +[[package]] +name = "symphonia-format-ogg" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b4955c67c1ed3aa8ae8428d04ca8397fbef6a19b2b051e73b5da8b1435639cb" +dependencies = [ + "log", + "symphonia-core", + "symphonia-metadata", + "symphonia-utils-xiph", +] + +[[package]] +name = "symphonia-metadata" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36306ff42b9ffe6e5afc99d49e121e0bd62fe79b9db7b9681d48e29fa19e6b16" +dependencies = [ + "encoding_rs", + "lazy_static", + "log", + "symphonia-core", +] + +[[package]] +name = "symphonia-utils-xiph" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27c85ab799a338446b68eec77abf42e1a6f1bb490656e121c6e27bfbab9f16" +dependencies = [ + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "sys-locale" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eab9a99a024a169fe8a903cf9d4a3b3601109bcc13bd9e3c6fff259138626c4" +dependencies = [ + "js-sys", + "libc", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "sysinfo" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.61.3", +] + +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "system-deps" +version = "7.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396a35feb67335377e0251fcbc1092fc85c484bd4e3a7a54319399da127796e7" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml 1.1.8+spec-1.1.0", + "version-compare", +] + +[[package]] +name = "taffy" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aea22054047c16c3f34d3ac473a2170be1424b1115b2a3adcf28cfb067c88859" +dependencies = [ + "arrayvec", + "grid", + "serde", + "slotmap", +] + +[[package]] +name = "tar" +version = "0.4.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" +dependencies = [ + "filetime", + "libc", + "xattr", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "task-local" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2972044a9e5e448a506a7ff6f0d03b566d8ef4cd6918a58fc59835a0f8666626" +dependencies = [ + "pin-project-lite", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix 1.1.6", + "windows-sys 0.61.2", +] + +[[package]] +name = "text-size" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "libc", + "num-conv", + "num_threads", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tiny-skia" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "tiny-skia-path 0.11.4", +] + +[[package]] +name = "tiny-skia" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47ffee5eaaf5527f630fb0e356b90ebdec84d5d18d937c5e440350f88c5a91ea" +dependencies = [ + "arrayref", + "arrayvec", + "bytemuck", + "cfg-if", + "log", + "png", + "tiny-skia-path 0.12.0", +] + +[[package]] +name = "tiny-skia-path" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tiny-skia-path" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca365c3faccca67d06593c5980fa6c57687de727a03131735bb85f01fdeeb9" +dependencies = [ + "arrayref", + "bytemuck", + "strict-num", +] + +[[package]] +name = "tiny-xlib" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a90a0ca3ee6a69f2ad28fd11621a4c3f03b371f366be500b64df260c4ffbafb4" +dependencies = [ + "as-raw-xcb-connection", + "ctor", + "libloading", + "pkg-config", + "tracing", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "serde_core", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.4", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" +dependencies = [ + "rustls 0.23.46", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" +dependencies = [ + "futures-util", + "log", + "rustls 0.23.46", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.6", + "tungstenite", + "webpki-roots 0.26.11", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "libc", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.9.12+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime 0.7.5+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 0.7.15", +] + +[[package]] +name = "toml" +version = "1.1.8+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_datetime" +version = "0.7.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.17+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +dependencies = [ + "indexmap", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.4", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow 1.0.4", +] + +[[package]] +name = "toml_writer" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.2", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tree_magic_mini" +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8765b90061cba6c22b5831f675da109ae5561588290f9fa2317adab2714d5a6" +dependencies = [ + "memchr", + "nom 8.0.0", + "petgraph", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "ttf-parser" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31" + +[[package]] +name = "tungstenite" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" +dependencies = [ + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.9.5", + "rustls 0.23.46", + "rustls-pki-types", + "sha1", + "thiserror 2.0.21", + "utf-8", +] + +[[package]] +name = "typed-index-collections" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "898160f1dfd383b4e92e17f0512a7d62f3c51c44937b23b6ffc3a1614a8eaccd" +dependencies = [ + "bincode", + "serde", +] + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "udev" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4e37e9ea4401fc841ff54b9ddfc9be1079b1e89434c1a6a865dd68980f7e9f" +dependencies = [ + "io-lifetimes", + "libc", + "libudev-sys", + "pkg-config", +] + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-script" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "unicode-vo" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d386ff53b415b7fe27b50bb44679e2cc4660272694b7b6f3326d8480823a94" + +[[package]] +name = "unicode-width" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca718471876992059f251e33aafc334346ada08042b7661dd1fe313a9bced557" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "unty" +version = "0.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d49784317cd0d1ee7ec5c716dd598ec5b4483ea832a2dced265471cc0f690ae" + +[[package]] +name = "ureq" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde93ff05758a36a851a398a772b0b79a82fbe3c186a46f2696baaeaf84c966b" +dependencies = [ + "base64 0.23.1", + "cookie_store", + "flate2", + "log", + "percent-encoding", + "rustls 0.23.46", + "rustls-pki-types", + "serde", + "serde_json", + "ureq-proto", + "utf8-zero", + "webpki-roots 1.0.11", +] + +[[package]] +name = "ureq-proto" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841583fc36089d7d59419568ae157f43a5a03a2e5a81ba87c77d1596ef46e922" +dependencies = [ + "base64 0.23.1", + "http", + "httparse", + "log", +] + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "usvg" +version = "0.48.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "977d0a4abdef933f424a99fe09f95576e089b90aebc6f016a3bc813762493e91" +dependencies = [ + "base64 0.23.1", + "data-url", + "flate2", + "fontdb", + "harfrust", + "imagesize", + "kurbo", + "log", + "pico-args", + "roxmltree", + "simplecss", + "siphasher", + "skrifa", + "strict-num", + "svgtypes", + "tiny-skia-path 0.12.0", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", +] + +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[package]] +name = "utf8-zero" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8c0a043c9540bae7c578c88f91dda8bd82e59ae27c21baca69c8b191aaf5a6e" + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "uuid" +version = "1.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + +[[package]] +name = "vergen" +version = "9.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b2bf58be11fc9414104c6d3a2e464163db5ef74b12296bda593cac37b6e4777" +dependencies = [ + "anyhow", + "derive_builder", + "rustversion", + "time", + "vergen-lib", +] + +[[package]] +name = "vergen-gitcl" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2f89d70a58a4506a6079cedf575c64cf51649ccbb4e02a63dac539b264b7711" +dependencies = [ + "anyhow", + "derive_builder", + "rustversion", + "time", + "vergen", + "vergen-lib", +] + +[[package]] +name = "vergen-lib" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b07e6010c0f3e59fcb164e0163834597da68d1f864e2b8ca49f74de01e9c166" +dependencies = [ + "anyhow", + "derive_builder", + "rustversion", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vtable" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "515a4b5b1399cc46fb0dc4081436cb40a3852a2d3e94fd1fa50bb68a334896eb" +dependencies = [ + "const-field-offset", + "portable-atomic", + "stable_deref_trait", + "vtable-macro", +] + +[[package]] +name = "vtable-macro" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8191d73ececf73fc94e65809bf0e667525a0bcff9aeeb8d042a4173a508332a1" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wayland-backend" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" +dependencies = [ + "cc", + "downcast-rs", + "rustix 1.1.6", + "scoped-tls", + "smallvec", + "wayland-sys", +] + +[[package]] +name = "wayland-client" +version = "0.31.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" +dependencies = [ + "bitflags 2.13.2", + "rustix 1.1.6", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.13.2", + "cursor-icon", + "wayland-backend", +] + +[[package]] +name = "wayland-cursor" +version = "0.31.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d" +dependencies = [ + "rustix 1.1.6", + "wayland-client", + "xcursor", +] + +[[package]] +name = "wayland-protocols" +version = "0.32.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" +dependencies = [ + "bitflags 2.13.2", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-scanner" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0" +dependencies = [ + "proc-macro2", + "quick-xml 0.41.0", + "quote", +] + +[[package]] +name = "wayland-sys" +version = "0.31.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be" +dependencies = [ + "dlib", + "log", + "once_cell", + "pkg-config", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webbrowser" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe8d20d0214027baf11b8b0cc307c1da7657d8f4db9aa956f7de27a6fb1acbd5" +dependencies = [ + "jni 0.22.4", + "log", + "ndk-context", + "objc2 0.6.5", + "objc2-app-kit 0.3.2", + "objc2-foundation 0.3.2", + "url", + "web-sys", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.11", +] + +[[package]] +name = "webpki-roots" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "wgpu" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e" +dependencies = [ + "arrayvec", + "bitflags 2.13.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "log", + "portable-atomic", + "profiling", + "raw-window-handle", + "smallvec", + "static_assertions", + "wgpu-core", + "wgpu-hal", + "wgpu-types", +] + +[[package]] +name = "wgpu-core" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14" +dependencies = [ + "arrayvec", + "bit-set", + "bit-vec", + "bitflags 2.13.2", + "bytemuck", + "cfg_aliases", + "document-features", + "hashbrown 0.17.1", + "indexmap", + "log", + "naga", + "naga-types", + "once_cell", + "parking_lot", + "portable-atomic", + "profiling", + "raw-window-handle", + "rustc-hash 1.1.0", + "smallvec", + "thiserror 2.0.21", + "wgpu-core-deps-apple", + "wgpu-core-deps-windows-linux-android", + "wgpu-hal", + "wgpu-naga-bridge", + "wgpu-types", +] + +[[package]] +name = "wgpu-core-deps-apple" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-hal" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58" +dependencies = [ + "android_system_properties", + "arrayvec", + "ash", + "bit-set", + "bitflags 2.13.2", + "block2 0.6.2", + "bytemuck", + "cfg-if", + "cfg_aliases", + "gpu-allocator", + "hashbrown 0.17.1", + "libc", + "libloading", + "log", + "naga", + "naga-types", + "objc2 0.6.5", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation 0.3.2", + "objc2-metal 0.3.2", + "objc2-quartz-core 0.3.2", + "once_cell", + "ordered-float", + "parking_lot", + "portable-atomic", + "portable-atomic-util", + "profiling", + "range-alloc", + "raw-window-handle", + "raw-window-metal", + "renderdoc-sys", + "smallvec", + "static_assertions", + "thiserror 2.0.21", + "wgpu-naga-bridge", + "wgpu-types", + "windows 0.62.2", + "windows-core 0.62.2", +] + +[[package]] +name = "wgpu-naga-bridge" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081" +dependencies = [ + "naga", + "wgpu-types", +] + +[[package]] +name = "wgpu-types" +version = "30.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286" +dependencies = [ + "bitflags 2.13.2", + "bytemuck", + "log", + "naga-types", + "raw-window-handle", + "static_assertions", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.44", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core 0.54.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections 0.2.0", + "windows-core 0.61.2", + "windows-future 0.2.1", + "windows-link 0.1.3", + "windows-numerics 0.2.0", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result 0.1.2", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading 0.1.0", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winit" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d" +dependencies = [ + "ahash", + "android-activity", + "atomic-waker", + "bitflags 2.13.2", + "block2 0.5.1", + "bytemuck", + "calloop 0.13.0", + "cfg_aliases", + "concurrent-queue", + "core-foundation", + "core-graphics", + "cursor-icon", + "dpi", + "js-sys", + "libc", + "memmap2", + "ndk", + "objc2 0.5.3", + "objc2-app-kit 0.2.2", + "objc2-foundation 0.2.2", + "objc2-ui-kit 0.2.2", + "orbclient", + "percent-encoding", + "pin-project", + "raw-window-handle", + "redox_syscall 0.4.1", + "rustix 0.38.44", + "sctk-adwaita", + "smithay-client-toolkit", + "smol_str 0.2.2", + "tracing", + "unicode-segmentation", + "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-plasma", + "web-sys", + "web-time", + "windows-sys 0.52.0", + "x11-dl", + "x11rb", + "xkbcommon-dl", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" + +[[package]] +name = "winnow" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wl-clipboard-rs" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "959c7ac3b8afde864f7a7448ac16f29b2b83350b7eccbf77fb781c3999aa6848" +dependencies = [ + "libc", + "log", + "os_pipe", + "rustix 1.1.6", + "thiserror 2.0.21", + "tree_magic_mini", + "wayland-backend", + "wayland-client", + "wayland-protocols", + "wayland-protocols-wlr", +] + +[[package]] +name = "write-fonts" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cae90d1d9f6d1d36ef116b0b1e651a6d7c12ba925439d4d06ff9adc94662a3d8" +dependencies = [ + "font-types", + "indexmap", + "kurbo", + "log", + "read-fonts", +] + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "x11rb" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading", + "once_cell", + "rustix 1.1.6", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" + +[[package]] +name = "xattr" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "963d6fab92d5504b971dc8bd90ca743c2575e590bc8071ea5bc571598667ae08" +dependencies = [ + "libc", + "rustix 1.1.6", +] + +[[package]] +name = "xcursor" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" + +[[package]] +name = "xkbcommon" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d" +dependencies = [ + "libc", + "memmap2", + "xkeysym", +] + +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.13.2", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + +[[package]] +name = "xml-rs" +version = "0.8.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7" + +[[package]] +name = "xmlwriter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" + +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + +[[package]] +name = "yazi" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac366ea532fa8ee6a992cec9dea525b1dc284e69702f36c2ab5fbebadc81ec86" + +[[package]] +name = "yeslogic-fontconfig-sys" +version = "6.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76" +dependencies = [ + "dlib", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix 1.1.6", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow 1.0.4", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus-lockstep" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863" +dependencies = [ + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus-lockstep-macros" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", + "zbus-lockstep", + "zbus_xml", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +dependencies = [ + "serde", + "winnow 1.0.4", + "zvariant", +] + +[[package]] +name = "zbus_xml" +version = "5.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a" +dependencies = [ + "serde", + "winnow 1.0.4", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zcheapstr" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "939f186d9ecebe044315a5cb6d6f78568bbc21152adc954d5a0c2f58bdbc9920" +dependencies = [ + "serde", +] + +[[package]] +name = "zeno" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" + +[[package]] +name = "zerocopy" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "serde", + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zune-core" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b" + +[[package]] +name = "zune-inflate" +version = "0.2.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow 1.0.4", + "zcheapstr", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.9", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.9", + "winnow 1.0.4", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9c3fd10 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,46 @@ +[package] +name = "spotify-tv" +description = "Spotify for Fennec OS: native TV client with Liquid Glass, Spotify Connect and librespot playback" +version = "0.1.0" +edition = "2024" +# sf-ui (and Slint) are GPL-3.0 on a TV box; librespot is MIT. +license = "GPL-3.0-only" +publish = false + +[dependencies] +# The Fennec OS UI kit (Fennec SDK): Liquid Glass, TV components, images. +sf-ui = { git = "https://gitea.bluefox.support/fennec/sdk", tag = "v0.1.1" } +slint = "1.18" +anyhow = "1" +log = "0.4" +env_logger = "0.11" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +toml = "0.9" +ureq = { version = "3", features = ["json"] } +tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "signal"] } +futures-util = { version = "0.3", default-features = false } +# The pairing QR code on the sign-in screen. +qrcode = { version = "0.14", default-features = false } +# Spotify: session, Connect (Spirc), zeroconf sign-in, playback. +librespot-core = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] } +librespot-connect = { version = "0.8", default-features = false, features = ["rustls-tls-webpki-roots"] } +librespot-discovery = { version = "0.8", default-features = false, features = ["with-libmdns"] } +librespot-metadata = { version = "0.8", default-features = false } + +# Sound: GStreamer on the TV (PipeWire), rodio elsewhere (UI work on Windows). +[target.'cfg(target_os = "linux")'.dependencies] +librespot-playback = { version = "0.8", default-features = false, features = ["gstreamer-backend", "rustls-tls-webpki-roots"] } + +[target.'cfg(not(target_os = "linux"))'.dependencies] +librespot-playback = { version = "0.8", default-features = false, features = ["rodio-backend", "rustls-tls-webpki-roots"] } + +[build-dependencies] +slint-build = "1.18" + +[profile.release] +lto = "thin" +strip = true + +# Its own workspace (not part of any checkout around it). +[workspace] diff --git a/README.md b/README.md new file mode 100644 index 0000000..436fd87 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +# Spotify for Fennec OS + +Natív Spotify kliens Fennec OS-re (store app, `support.bluefox.spotify`). Spotify Premium fiók kell hozzá. + +- **Felület:** Rust + Slint az sf-ui Liquid Glass-ával, ugyanazzal a lapmotorral, mint a Netflex TV. +- **Lejátszás:** [librespot](https://github.com/librespot-org/librespot) (Rust), GStreamerrel (PipeWire). A TV teljes értékű **Spotify Connect** eszköz: a telefonról is irányítható, és a lejátszás átvihető rá vagy róla. +- **Bejelentkezés a telefonnal**, kétféleképpen: + - **QR-kód / párosítókód:** a TV QR-kódot és rövid kódot mutat. A telefonon a `spotify.com/pair` oldalon kell bejelentkezni, a TV magától belép. Nem kell hozzá ugyanaz a hálózat. + - **A Spotify appból:** ugyanazon a Wi-Fin a TV megjelenik a telefon eszközlistájában (zeroconf). Kiválasztva bejelentkezik. + + A belépés megmarad (`$HOME/.cache/spotify-tv`). +- **Képernyők:** Kezdőlap (legutóbb játszott, lejátszási listák a Kedvelt dalokkal, kedvenc előadók és dalok, elmentett albumok, új megjelenések), Keresés képernyő-billentyűzettel (dalok, előadók, albumok, listák, podcastok), Könyvtár (listák, albumok, előadók, podcastok), lejátszási lista / album / Kedvelt dalok / podcast oldal, előadó oldal, Beállítások. Jobb fent a bejelentkezett felhasználó képe. +- **Most szól:** nagy borító, tekerés, keverés, ismétlés (lista / szám), kedvelés, szinkronizált dalszöveg, lejátszási sor. A dalsorok „+” gombja: sorba tétel, kedvelés, album, előadó. +- **Beállítások:** kijelentkezés, a TV neve (Connect), hangminőség (96 / 160 / 320 kbit/s), hangerő-kiegyenlítés, automatikus lejátszás, megjelenés (üveg / matt). + +Böngészéshez a Spotify Web API-t használja, a librespot munkamenetéből kapott tokennel. A Spotify szerint ez nem hivatalos kliens. Ha változtatnak a protokollon, a librespot frissítéséig leállhat. + +## Fejlesztés + +Az sf-ui a [Fennec SDK](https://gitea.bluefox.support/fennec/sdk)-ból jön, git-függőségként (tag). Ha az sf-ui-t is fejleszted mellette, tedd a `.cargo/config.toml` fájlba (ne commitold): +```toml +[patch."https://gitea.bluefox.support/fennec/sdk"] +sf-ui = { path = "../sdk/sf-ui" } +``` + +Fiók nélkül, kitalált adatokkal (mock): +```sh +python3 tools/mock_server.py --port 7890 +SPOTIFY_MOCK=1 SPOTIFY_API=http://127.0.0.1:7890/v1 SPOTIFY_WINDOWED=1 cargo run +# SPOTIFY_MOCK=signin: a bejelentkező képernyő egy mintakóddal +``` + +- **Windowson** is fordul és fut (a hang ott rodio-val szól), a TV-n GStreamer. +- **Linuxon** (Debian trixie / WSL) kell még: `libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libfontconfig1-dev libxkbcommon-dev`. +- **Pillanatkép ember nélkül:** `SF_UI_SIZE=1600x900 SF_UI_KEYS="wait down enter" SF_UI_SNAPSHOT=out.png cargo run` (az SDK `docs/sf-ui.md` 11. fejezete). `SPOTIFY_WINDOW_POS=x,y`: hol nyíljon az ablak (például egy másik monitoron). + +## Kiadás + +1. Emeld a `version` értékét az `app.toml`-ban és a `Cargo.toml`-ban. +2. `git tag v0.1.1 && git push --tags`. +3. A Gitea CI (`.gitea/workflows/release.yml`) megépíti x86-64-re és aarch64-re (Raspberry Pi), és release-t csinál a store-fájlokkal. Secret nem kell hozzá. + +Helyben: `./package.sh`, illetve `./package.sh --arm` (kell hozzá az `sf-pack`, lásd a szkript fejlécét). + +A TV-n: Store → Források → a repó címe. + +## Licenc + +GPL-3.0 (az sf-ui és a Slint miatt). A librespot MIT licencű. diff --git a/app.toml b/app.toml new file mode 100644 index 0000000..d8c9ee4 --- /dev/null +++ b/app.toml @@ -0,0 +1,20 @@ +# Fennec OS store app manifest (store-app-guide.md in the Fennec SDK). +id = "support.bluefox.spotify" +name = "Spotify" +# Release versions only (1.2.3). Bump it (and Cargo.toml) for every release. +version = "0.1.0" +kind = "exec" +category = "Zene" +description = "Zene és podcastok natívan, Spotify Connecttel: a telefonról is irányítható. Spotify Premium fiók kell hozzá." +author = "Bluefox" +license = "GPL-3.0-only" +homepage = "https://gitea.bluefox.support/fennec/spotify" +exec = ["bin/spotify-tv"] +icon = "icon.png" +accent = "#1ED760" +palette = ["#1ed760", "#0d5c2b", "#060a07"] + +[sandbox] +# network: Spotify and Spotify Connect (zeroconf on the local network); +# gpu: the glass UI; audio: sound. +permissions = ["network", "gpu", "audio"] diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..36ca78c --- /dev/null +++ b/build.rs @@ -0,0 +1,7 @@ +fn main() { + // sf-ui's build script publishes where its Slint library is ("@sf-ui"). + let sf_ui = std::env::var("DEP_SF_UI_UI_DIR").expect("sf-ui must be a direct dependency"); + let config = slint_build::CompilerConfiguration::new() + .with_library_paths(std::collections::HashMap::from([("sf-ui".to_string(), sf_ui.into())])); + slint_build::compile_with_config("ui/app.slint", config).expect("compiling ui/app.slint"); +} diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..bf636309b435124115f5ff9bcff1a62d38662b6b GIT binary patch literal 20263 zcmZ^KXH=6-*X|uUD4-x+K)QnTrcxC|k*d-Wf`s0c-a@c|l!$=zUX>2gYfvBx(ve<5 zk=|>7Kyq%LXT9Hf*E-+%6Ig5Jp4t1Fz4u&u&rF!E_9JR4Rw@7hsMQ~V3(;)VKLlA}`RZfHmh?p%zuEi5ho? zF);^vhbH~{@hEEHP1}M%$9|7((o0;iQ+{>l$VNxY>VbQoc=gIjOOo%^9H?zkSdU+Z z?|I{nCnOVS3X9w=$Y6|~=AKD0u?mpHMSqyGbr`A3Z@g=gaQ$e1Yrv!KXr)w(o;+jT zG07P&Kd7`Z*7E!Jn3urPaar0Oagyla%f}KfHDO~zRtXrF8pl?pu86ZoGPq{)+C-Dh z2aer$U9t|TVBP97$HMbgZ`s4w?{zuTp<8@`eY9|Ej!No=b2HJj)<6?YU;0d zEfaeW>Zl$A+U>`6?2Yq3+^B0)et)DoX2R`8A1JSLUvlOA#Uw(c;; z^zfO0;{JS!{c%~Y$Ym!?={4r&RV@Bj-!EqW2T@FbUk{GQTNv%bNfpmEW;Z57XA0xy z$!Cnf8(OltI8A9jclD!*5XUCAo7*-`@y~ms1q8gOocNdG;Su6N`oAP-olu;`%v zE3!$g_%7xnFL%boo&rslx*gB{K@u-S9RmhU6J zT4$PX;PjL%t+Hz=*<^6Em(lfLEB&q?up+#jCOcncU}4GjkjGa?UuHT{qM})Ca3e@2 zCKeCJ7H}piHoTErsuBq1?7PYf{Osj9A5)z;>3<(Z=yl{tIL|i1#d_UT)KH4=k?F7% zaWvc$CJh9Pcoe0s)LmKRVSAWUz4Nm6lj7~(b9bAZzHRw)+Lpn zP=Oe8I0Bz(Tos*ug^r8zj%RR5xb$&tl~t9P?bjZ}ZP-$MrNdvzCpzjclja(HrnD?$ z%QQ(ugOb=md}Wy(M;tH=WM%l*k$Sj-oGV4j?rIVfZnfiHji9Z(Au-P3o^~$OX zE8*W1XiD~d_WidaG&hS}%!%3YF%Ie|i4#J1^^JQTCa1W(YdpWQl{7?-*u!4-+07Cx zZxM0HA2`s)Pdwa0ZONZU?X5zTT&!^-l6KT@-^KzS@u5|6r=orvZxc)wFajgyg>r`0 zL)4qnTGhWl(-JiJRWExq-=Yo##3+z&XI8s}8?#(IFpS%0!!6^dE1R}~8*D#Q zxJwHK1pu3FsI{E;nJ9dxRwTw`v)QsoG^u?p;L}#)Ix?D%&5#%%dykD-6?AEAaS7C@ zj{8XH@DEy-+K$CYNBe$Zf8sDcchYpX zota1pP;SB|$y`=T2|=3LNe3ZCF{ zX#@D^$imRKf)E?;BqMNu**g>B+!MM?qmQw^0w^e9Fj%SaBrU^v@fn7y0~anQB3x6GG6g;yRibxDzb4&@|Kx&FSHhNpYUqG{u|A zW#Aq`6=cZbp4!tRz+GbICI6tiOGCiIim^c8n9)9)-%hEiT^>5or-YLe$h_BtEnt6Q z*<5na8{~I1_m;C^n;|1@qn-O!)*c_QuwYQy|44C;ar^YqUL$@7yD>u!tdN$~CT%*j zPQ^GNTz}?;y>`B#S4fiC%rA-Q+@8ZmP4W(Eh>Xj7p92WIK5_OOuU@j5P~-f^O1$0t z7_&ZEo;vVgs3S@%SG0*RZHulxg{rNuxl((d&jA!mrw|~plq}Ip+9H2%NRRHV3W zdLlTN0sQ19E9VjI zlZDtv^G>hl&>jtkM~xykU7*TyKkRL_7T^2B*W1Imm7tlN^#n&B4m_q~5T+D+NQECbov=0II4faRfI|R8%>Imq zRT{f`cCoTLLRfDn!`V894pf!FGIC%nUtAlOhL%SLvJ#ITye#qEK`moYJQHIr`=hh2 z_50+2-lu)@c`rVTZ@wp`?xQty79)zs0wh5|E5Hvak=7zQO$R)*H5z8qu}wS^cT{)C zfy-`mKKbIHTita^>@sndcotoyx8QA*`yv3HleP|NyWW_vm@ zr#&rk_O`q!poNenV0(F^A3M?1CynTAPMmgbW7mPK83AB(;R-Zhy(~T6**qvzYoh>M zHg-G!dxu-^= z21^Ru_#*xkmV7zY^ZxscW3Y`il|( z7<9>PXGga;7}N+jjwNiu=YAFcdZ%WlMLPngvPg*xJ;aaH;Gb8)AHPNQ;wpPY0YE_c zLI`9DE36FwyD+k%I9ZMW2SlrQu{Mu_A-hGV9tz-g`fL zYMbUhae^}5 zr4Nzp(S((uXX%ru#Dp4g*u8A>Am`^J*Johdl>@SATTi>=LCg-4nOq%4aNRm;)hEKW zN?6HIl{?$ts4NVD2rEZhB0Gf&h&&Ey(dTv3 zB9qe*TW38b`5Y+86#M=|(1KWtsVKzjI8e`F-_SP5f$0EbsiJSfi?7&IMTY%JFzDd^ zxMOJnWfY4z>sx6?N6nG3>y{pdP|Nx=BVHSSuYppm)BgIrYu!nFugYIJyf_2^lnEX- zIHZ-=ovV_uEvp|dDc0xE7bWcTHQX`Td9$as z>SlDTG-Jo)0AhY;UPVi(MmWVqlcP{7Cuu_<8Ep9jWo}KDmUOUTsQj&R;W@l9OZzuPzqlX&;51jW(L;)6k+tp;QqHWD&>}gKC?Ppe}~tdhOr)L z&j+(C3D*DsA#F}~XY_!zQ92})zx9g|-SM^O0Bnw6W+PIoQo%s@!vZeV%`2kXuv+v^ zp7^xkWpmxv5g|cTbV5`i;*!CKMQfRXc}NHt#|=D9b^ug zBC&X6+ngy2n|ZYWf@}PKGH_W%Q%MjliVu9$C{=#A1PzL3(cY3mKgW{;nFm9FO;=xS zFD7s|L%zX-)k2-r;`Z6Nz>@xeUGevftsnsCdg6clJmY<0dZM8)^3Y+I7Pg5bDi&Ab zQ5z!G*#-@RkI}MT+}8<8x1J$Iy7R^#p2H~J?F?pEeWJO3$9+Q_d=#L~c1K7y2+cn5 z^ESYWwqU1pWTVoFb`}hjt_asLjr$!Cp+2qMhJ5D)5E7D>()o@~qs*LdQ0TK>HRVaw zVlQ$(7}OPv%_6x4SNA;xNQnRh-Oh~dfG(Xa^5BsB^>cxx(AyTF8*875YgSp_Ecw`i z>x>v2NGz=|gPjc~W^6OqMF#Dbprj|tk<&FCN~V2uG?z$0H$O=r9^qMFUFGpK#Q05W zC@B_IU_Sn4;Odv{`C(wH(|hBX7|^Y53zjGoH-|ODAHz`1`O_3DX-(}TIluga{%GF^ z{dP*KCX{*mFW+ek8t=2T)SN|RVTpTYCX~o@Y2-8u6juM*5iv!DxvJFBWC~%odt*LD zM5hT`=B+h-7PSb1tQUs%LhiDzOD{QY(AJ*WV)jx}LNrei1s!Yw5zoQU@bv|cg(cE8 z|M?|FMO<*g`R<$;0UA+R*`q5z|NITO3d8bDt-i=Z*8M}3mzA9Bf33Z~GJd(VpCrEY zb^i?nP?lzep(*qE=2V!&TF`L0Cg1&XA5@2|WDo6QaOeNZ z3wuzEg-3uO*tqY#sPIyi=p$1G$BJV-l^!vb%dWsA|4O%yv1_*#(Y#W8xIhd53MN#E zcLx&7Dlqq=wVIC=K{OMkj!cF21Y=h$fi|v-&y!!V?n@t;in@pdM6zGZQ{z=UI>s3h zUGfr-k!uqK`v`X9`pGjZFyUC!juSV%D_|$F3pAQB4rz%?CQ2Lt(67XbgDnK!0T7Jf z7-VnJ_%Z*xP}WT|pcB;Us~9YRXJ`}AH;P1zgq{Em7xUc95r@K1)RRQu5`K^Nbsfhu z0SE}Jy}b%_STP?y!kd!r*%4JKC#`)xOd))n5x(}y`v<$EK(36{oLReeaD55 zEY~VNNYAqs)OCjBN>ZzHrc-fVs!-UcOS{KC(8*&tI{YJLujlp|+W_(bPY>P5sXD|+ zOAkN@+GCnSZ@3_169aVWu53y%lNCa-_p_*y8@C z_DCGeOXhmvZ#|oQ9g}Fn>(Y=Uz>rJ=OR#_xY=|w*cXrzmJsVL}>9PAh4 zae3~SfG%{Z_Ygsg2>6`XmpV4b3x?j=jMJ3Kwjk+GlhM4iM}D=Or;rKM)=yjs^xkrr zgs4jkU(CINjG#iNV~l9bfJW^H7WH;5Syk@o$JdmNliXc-A;1%jw}kwc_FH#vhT@O? zCA_CqxPFD+0+78XEO(->L5oQJbXQ(z1PH}Wj6Ap6C+s`0_%4iRW!!L;xUy-u3$_Y#5qtAC-w5n;-bO^vGwP!YDE#d%%!{`MPZ3W#Sfd2VDn zRYjKV`rL_r%ZbuHIzJli=#lPlx!y%ga3BxLgG##3`6p)?(VVX$zilfJZoAa5%+ON5 z0iL`ECo}8IpmfKPEBcjO$479!dyNXqxsvH$s*q=)!x~@j$oVM{b;$5aQcJw;l`9=B zpr8W6RlHH=J*5-ycT(bf#f#)rCYXjU)bKouf-*<9y`^svc)~lg5_1`|RB8gy!ADfK-5S zfP~^&YWj%miMRI$Y|B`)=foGW15E1izSom%1se)-mf0%7}lhdwe+)hEfO2`+bGE-%XLH7BP)}3shxsjh%$33QdB$=0oFIlvnu7KNHM?1KJS6QxN9_RUPL!!qR-KPmde1Npjc+T^e zm^Uk*uSPQ#K@izl6gk8RI@fUv)H71ev<*`_AQSl|t zGytj!Aj&Uw!Aj;6V%u?;jd2lED{uoO#}+^|80^FlD_|2^)VFBRz2L__MDSf8fcR1H zteuw_2oJvn_8_}L3H}m;-UWtDRr(vcQu;~wGD{6&T`n+85pf$3tw?_)CZj48R0m`U z%HmJ|GxkHhxXB>kJ%hWptghJH-=-r|zBK}apQ7@6P@4al{$kHzR(2vGxu!KN(_1hB zity&*xaU6;f?>TC2v15R4$prQyVPRYNB)&283@iUc-F*=Cw|`n62|}ZZGY9Od|%(0 z3{bB4cZLgN(;9Y3xDFaepVC4M58&Fp^Gw|bW58{P*&K+tN+H$(FvN;Q@- zk2Reh7GKS<;Vy07)=W`%I+j&*pHE48{Cg4F7SF}z_xWXf(VmvkfR1IR>Wx}TK@OIu!;Zt;ct11xnF1J-Q z*Y|<4KG2HbfhY$Pqv#7dEJH0jX?lKdd<6HQ)6l%b9F-VFMWL1~Z@dV}*;y(6m)X*p zCvC_LSBGd-0cwqaBeeq5f#yYYrc-ikKK>Jyp|h{r%Gk^e07X&!%GaW1b|1-1eg6{G z({+HE5pjoNc*bXvbRlAgH>Y|W-Jnx0c;*OwxWGI=+hE=5Q{%e1t4Z|^UoM|VEdOfA z2+aD^t8kb1stE(d@Z0RKgO>p|2;}`kQlKNoS3D=IZZ$*`-@z_{jr0F8-NF*yQCze* zbe0B3XzR2}h9MJk8Doern$|}d+wmu^7|}M@fb?R{M&+1gXBv!a#mg%I89)hyXR-g@ z%x{o#3Dl$s-1D=a_SW5KF!@UIZWSoGTzudtYRq6E`$r{P9H-+QTJT0|yUs{0=v4ld zyKr>3I3Hkf;}c-9Y40?WvYlm=Up8^;dC)73m6=)r>Sc&A#^8Cp05MmEo%QRTg;6lr zoPXQhGkj>n(dBO;$?RB62tL{F}4G-XF0# zef`~?;Psmxb$-}Hr5nK%`|e418*%Hac6j~%*H#C|vT512u|mzYUG{3Q}Q!%QoZ7_Fr@nJP=Q^h!E0$ z+tONQPC{o(I8u$v^{8IAE?OmBP2g!Tj1-k`f4q(4qg9&5)ir3+S< z2rM^}9XVRJ4)(ZrHHqH0jm;Nyb|TTEU;qwK2TC!&HkiCMz({DR7Gp^olt(Kd@$&BM z0hCbw_h}tKb+kbG3AFJb;`==zY3EBVeot z<>Ir4+8v4d*PkfMlC#I%Up~=WxdqWzCItdFDWG-ux!0cW)~g;W#4HK>^T|z7=tmC9 zdjUSIyugYAbz%jj24N6K8%pf`#66TPUxXW^LF%VFxrw=|QS3!3K~p9tcaKUm!*07> zzxZHVrC*0LEyf8YL$JRhJn+7j+eI;Mq?vq@veiWC#=&PY@3izaP3+2?UYoiRWwrv> z9EvB5+1V1=J&@5irX1#WUCd7h`ly83n@}1ZHcX{#kbS94bZz9ZW8e229ZD;G<@ytt z%F8#)rwjLbOT(BpK|h4I^(W zJPxmTLu4tSd|*xyul7w~DFSmsxE861Cw8BE2!C3Z{v^(;SLjq5;Wt!DT_`Q&Wu^t5 z04FydX{>J%4^ExG%ca#)m#M!2uVIl1G0|i!rVNJ4R)=Ra-;ZHRfA?7#i06 zKF|wi#i>X?A||+L4gR#TI?`yg#!ryv9_F;2q&10Wb#tPN4ahu3yR;V{(TCQ@=SpgU zv_0lzTj3h|u?PAdi{GZZmCxjUp4Uw0ylK+$`!mOr z`wHf8!Gtdv43^#JLkbdSA(hq#wlyJZh!l-|Gf|vpI!XEERPS&_J5)^kd4~=sYW0yq z<1gv`7$qj^dG%{s8=j$$s7EFe9YSNz^t$?gjk>J)^J~Pul_?=wi5@)Nwne>;0?iiA z;`{rO)p=j@9la|LID=(qh)9)b0lzZkGJ-(lF|^z9NK%{e| z#(Js1-&qC>RT|!FK^NZoTq#$?^@h{kyJunBVLEA%Et~SM8Y+2*AVw-+zE>!8eLeL$ zCEnehBNE4OmLN|vfJa2D@+$?Z9QXgyNfUw>s?#B)+pYl!hryxiq1>GuN%3##NB@3T zx;^(IXV2f?_P!Po7^dIe-tf6mtlB?AVjm(aKhG$wPVz|NUFj zWpg`mqoHWIN)cmRJ+_zsfl7rYeia!b?^>y9TlyPIbrUDZ@|lJKECw{;IMuDzP}73Q zNeWO=X9W)enb>_qe~aEGo3x6x5rzQb;DOnk6t$^_MM1+k$oAc#agS# zUrBJY9Sf-wqog7uV}oST7D|w3j!{@Fjuu1rdID_lc$IvNz%3asb6yCA85{O=Oxozfuq(2%I87g5==FZF47nB#=C> z!X0|-J{Of?{*2V9ZuhFV3ZGB+*UKQ2Z0O&PbFv;CO(D2Bx%2LiDl*eduU_wZ?&H_S z`A`D20B3>kGwx2sXX!9I0EOSfkJSWA=mSLjpLKtn%wL;k+cptGx$bM zTg$1$0{BIN+ZK5@q zca1O5?OEioi}J0-Yig&*9xJ5%Id3(v*LCknL9&$!_bh7|wGh@QufW?xpYgiv3g2}F z^?(Oi|HHFE4*xHS289BNYceq4ukT=IDbN}R71h?g-OEfoMh=`m%`=qB9`7nM78OS$ zT*N^(+zQO!u{hAu-y#g0ORtZ57X9e^Le&RZyl`Y!d(WD`xT*tZvQ~A^gGSdk;$*ik z{r`!vUzwmOa8riJANzPq_T zvhLc>Ox$q)zt}zZe`ObAlvkR6mU;;_nlsoXU%o?K?lXER^CAbZumqEg|KtPV{ta1_ znT)c%1+7Nw3u?-Fs259#>%;p<1T#!o_A3CalzbDAP=5Gt!t^iL7j)fYKP38HCqhX{bRP9RIa-O#rPT>fae92T z^C!AB{cgpVk54?hKB#^vi(M%`oI}}|2?q$HJ}p5jFNZ0U9_(ZDHc%;PS62mhUYv$G zzK6f0%ESZ*@lpn9Z!6tKZY%JXG}1n9@K!tX$O&9_-D^CD5lRfmiWwxYhmzcYz-Q7MutUGQyndw?IjWlTb`_z34WhDm5)V?i8>gJ;fG)~Bem8v%AJ!lvyy(nf+5 zfRQR~tAkkDx1igr3Y)V^8Q}$w9Nn?g#;@;O<5VY_@%VV0v^2pB(NFHPQfwR>Ev8z5 zC})U~ma|sHDpkzeBugA7v32xR?aiX%_qR8DgPiG7@n<00@D#DuE|*J76tyNfEg%f7526 zKNhV2?fvF^+ZMMJr{hDzC0ojO$Tz2PBzm{zENC))MjcnN1w>0gKc^-nb!EFC z9-omITQ9mvqd{nAxOvQ3DUr219r`0gHRAVG2tXXc-%3wioFkn?7@VG`>5jAPOfwL4 zU`mTesX#LQuK@<|W;>#baQ78R1*h&k0{?~UI@KpSaL z6M#sczcWjpY+Ba&WAy05q%51)oY3iXP|J$}(0sQN{^r@by{#a+PCj*hIB!!^2fO?h z$$^LqM;?#cjQL~!WP8~Lvc$xzf{Zg%QCbWz5k6KX_mltU^Eg#I8TGI2X%KH^Aqq(y);6`7N2h;}2ufN5Y1=_Z?40 zqhdE3INhZnjO%`f&wQpHY2P-xCc`y6-8u62>D-+$atppl8kYp}0l3H)D0Pcjvya=e zGff^0^J9M|zf%q4CBsTsG~_naR`)QcyPeroa&FMOS3ve;2{sbaGw?CSch_&I;y_i8 zo%^K@T`?&QvB}()AG{`R`;=*2zTxx6uIZ~#M&3y!q22M6_Aj?k?|_CO%K7S>N(jvb zAE8U8S-ARmE1XS~ri88e#u8TrTj&oeUWIBYySuwR9u*Q{cy5RhWr_gc(%@eAQ53U~ zp_3pF2UhmV#iw<{y#AnEg__p1{0*psT?XD?~5Znwd?k=u&5OC~v(zWhY4V;=E~o|_Kg zn{sqC4~MkWX+_`h3@w^sL;KWg(r+J*rt(!Arn1!NkERIG1>-Y`%Cnyz9nduJwXFWQ z+M4&`$#NiE9%SqcFB&<{-Hi8oO*fr*s9USU% z5(bgzi7&Bhg1q!Uxm7l!8s($yW=@U1l3g}yc(_&u2akH*sVcjc_e+9ClxJP|ElTT& zGZ60^|AFJC46fGu9fDmj%P$mD$}i$?IIvKBh2l9SH(2!Jlgwx|W-OiI;Yl#NS)Gu^ z1<#KQQbfK{0E>oz&o}KHJek7d4Y1z-gSLa+oWlB4`7Pc-PjI61?ZCNSi0WYI7ppaT zOl)+mYg}|KN;hCl^#I8hum1@A`i@DXRas+dFaFSZ?uz(%r2&y&&0@Va`-=La%1PDQ z6rt|@No?JnjyZ+ol0yDfam#d2JJPQ*5|pWJjWa|m)kQcTqgihkYx z*wip~95s1sAKK`;sdIOj*TRhMh&d5|fZdO>-zj^LZU|f_m!CcL&3O7AGcG6}3Wr5{ z1~reoa~Y{@;Rkog+xyUZ!wnO1LXH8~pScJc~8~EhIh2>{nkrnifHi1@=(eteY#P7BXAyulh9@W%X&Iq1V0hhlWxxhi? zYmXtri>9=q0l45#6f0a0rq0W*Uo;o;c@s_e79HOOM0`x*e z6uty`C2PqJ2Pgu&}8fg*4;0O%L2f*dMGbfa+eF2f*#a71*i>xpwXd5hg=IekA^?#B8ap_nW z{gRPCQOnQb)~h`>udM@(jV_VmXd_YmMd^IhSD;um4s9Hlt`VoVy8J9}`5B-7X}#WR z{lQgGA`@W6i7>uRR`ShN?g{-YXw%FveO4I5e^<}{n_pY%45@lgAo=6!oKC_r=aBl& zzniQAortXd(a3Fp8Ack&UUUP57R*dQMr0B<*bSeS(O)@=L~dU4`Ny+^+vq_bFAM_- zIatX@BFGfR|JvmICw>s2jl|20N&o-Z4tf1}d)aq;g!QAhBVA=out@QdbxdbrQ||#K z4)7>(;3>&)tSUlWzDRr%m|vSZlx6Gu0oZ1h{1g_fj? zG85OUCG_iD&U%YCk`FJzoWw3#&D-&DFF}$2lS5>aXPW94N+0_FV|af2|FuMO()m$i z6ki?nS?$mLMD**;!|e>3)~gS2dJtH#&uCHd|0WB~sRzB5b4RmzWW_~tAchY2?GgO& zFGiqy{Ab$m4oUk#hGz4$+Hdt@MI^(%XYrf=wvT^;Uj6HQs^R+o z33|Fy;s$*GW?)VvQY&oQqJ7M;pMW3nj=-{}%z0q*mj#CGHl4 zz_n6^&lT0WN}yWw7ecduOA+GIPcl{_D4l#euqU^m1m`%io}mFMqYWZS1-q;XrfOn| z;OWah#$K$)K$E_Lox5eNRGf#geh$uEYMdmFCfl}c30Z-xBwx+&6Bmg3z@nvUBBGPi zB}H~vp{BOMvi?v4lX0Tv$afFcoa?Q~l?OYp-D*#lPbG98Caa5rf)qPmI6&Mf>*+hH z)+bix-MY8)Il}5FB=A_Y0M&|c0 z1SmW|vHi$3)Eqq)F2Z_Y7K=RK?m45ewOrIYDDG9 zqB0L{5=bh0+D^#S@-d@bA2LMM2dkuB`W?o+E5N8bWXy(49 z`%EWYMo{>1y@4XTuGHzLAzPmAEo(KC4 z7t0Y@G2is@#G&~q#E820cRxyA6neFPTW;NYpqh~Mhp=b>92Sdy1o78;_O3moJ zO}AwXm0Tw^;fKcF&#@%5Ij+5O`ejC#g0-p|e9@Y_K~~wF`mM9S$WyFZe=aXb@aJt! zP8N*U|5*reboj}=rQhdjq!ykzkKx#3*WQGQ^>iNiw`lS!m1N%dA?mQ+86Vy{#tPXi zh0&ISS0U(hxPbPl@8k#qFC#tQUkLgf%v-cJOTDJWY*wHd zqSdlWN>WYlsl89HY95FfxEg&)dAX1r4TY~xV2nitj0c`Pl%wnqZ=Fx8T^+)@dehSq zCL{J{m4_4EZYQdFk0LVKNKp>awpa>bai3&5e(7jSqB3uy2QF$ZF}2Jvq!& z*IeOnpP^>F%Fm#uZ^xfa&}T9r#trJsOE@=rYA=7R*3qvlG@m-exqT@k=dmAG^6L%R zIoEgvQh@0TGjO{`hcKu5@{4aCOs(DrH9Z<^O#db7r(o{%%mmq5=6&opRm!3Bg0Sko z@9Zf3>3v`HUjO=4Q}K$pB~M!Q{S+lS?>a6u9pM*9)z+%ABr^Pask7@bhKd?%N)>!M zid81h-!1jHh@l()wUF0KpOx~7`ZdgZG`?B{gNzGSC1NPn=m$M}Y&H=DYBJo>6Tc%;Y+tO`e|H{ikoT8tY_czD!eAwA^9fqP~VaAfzQ z^|=?r{ip*Z)T^PLDLtNCllttmp6iomcJ?jI;UHm6I!vq1W~;R+7c8Q$(qh9V<%Cn6RwAfKHFdwyfxdLA^p$`^FQ4*tN15>EHKaMd`snS9(E3 z$g}`>33(aJfk{OjKDQa&+LC z^-^1BSkg8!>eSEK#hk34CU+r^zR55d!wDGgwRCz&xN{)nD_gd)4c=Uy#q0GZU?_m?$ zEfg*LA!+K@lMtUd89XB!b&_?P`sinTF%x}QIP|!KX_e1=JF7w`;a+}(??86%GP{2* z>R`Vxpav1oF+_ikw(hkwW&LX3Rr7mZo+R-XeiK>2VHp`mCI=zmD5|lY@-h121U;#NdtZ9@YhKL%h^o@NLMD z%5o&e85ujx#qM?u{Q9dD^3X3JJa)PQYt#NN=g-8?V(`vlcvn;$cu~?{2t#X|zbsHl z3?RCweiJ;IGPg~6wsuUEuK#;2vIGk+)0uwJc=eMyI8|Y%WAP|>BU33pUfzydNuYu~ zx;u0UY|s_=i{NB~NkM-7z3*=a-*1w&i5gIVR7-+wdY`cWUSF*RUt`|l#{KXGE*P4w z{@iuMm3@I4S(RlJLr|!yfrl-k8twtYL@tGXBolRVk1dn1+%e_cM8B(DOTN}o3qt4E z>CdCMLE?e6B)Y;9q%qR{>?(Z)4ai&tB}QZ`^#rr}!uyUL3TuAX*I zqeDT-r;74(@c@?<~-;kCjI@S@jDc?FhsRG3b7eP&Ros_4S`Cw)k>d z#EWv#ZXBDf*N5n!xNVAG@*voGU&N=YU}rIj83KUei+L-{&|Gw&fQz+uQ5*C(KIRZ_h%`Rw zDU)jd<;hP;3S69{baj7l{CTkcAac|QbCgRRl$t2Im;(8BVU3IVTV1W z=}hZ=R#CUzsCJJJz4l$%1H3P*tH#=fL`s1-xuLAygl{=HX zG@*1031`D}4bS>NaGvBi+x`jsX4>v_WqCgewD)K11flsatohZRTjz2d>+Q!2hQP!S za2loGc39C^INp~DD15KyXsEsgDg zFB%{e8E(Typ9#c-sI0gBA2{g2h!EcUc*MLD8^sk5jpM|-Z+ua>3o-h^w`Z&_DKMXL zv=6HG)TgLIu6^gr?jK3qgxC%GZv{t7>pi*$RG7zU%sFPkpap+u>eE!Hfpayky6vx* zU1ecP`h~?Sjl4<*xw2R1~0}w>o1*?w2-FDK~Dq zP9N9AE@WAKVRkRHQcUIf^ZO_0R0d;bOsj)IC?zvHvpbR%3(Ecs8QY~qSB^-=82dCg zd@P5y3CGYB&uZ*xy}{{$J~054+w=sfyxOo$4l1cIh1Dgpv(`qfvn1oZ?8aNi#_&v- z$0;U8cfS1quVG(PZCOJ_%ShWSGvKeZSzA*gdO0JJ<8KLb>)ub+2No{YJ4jDSrwk;*)umHi#hPnAjF%@kSQ^3Ntis@iB7u0 zX#j>-1b2VpM)N!766+x3`0w&2lG$&YNd^#prDLRH08caePwZpKkMx1v05Gd6i&w8Y z*=9u!WLcJp`?JKOI$Q;E#I~rmU&Py9F9ypvncMev4HM2o6E{jJIH60^sI}6>GIFXH zH42l*bDRVr$(XYYc&R%01PpNW#40_DID4^<(t@v~p!&lGexEN-v+qfI-Tx()x%i>dHY$-@53uKFerkvhPG>r07~ayBN5xK`|EyC&im5?yIlT!LyYp7h zoM6BI1|9d#?d*zpudbF7^`DSU{@nOWj&lDcN8oxM;XKA(KJ=;ezu%h-HagCxq0N!s zFT^Ud0^h|>S35GyhQG>rMCSTole&fxH6{B@0PT^X3xd2jFbj<;am-grd@^11P~_F? zj(1RXqVjKu63k5}nkt^^-X{ND7$}kVM1@TIOc=ZUhYq1gln@Fwnnz}cd>Hx@?Y%VMGJBg=Gr9me+cyq5o5D#Cg9@3Ayy=Mu|vFiIa}AD})3s=-RoQ}nma zy^DJ%&U^J*r-pM@(OIUNRyD^q=t58kZB?T^CgY3~h26hDe$zyz{+|Gq3TpLu>Az!j zmhH7y1swR;cc&$D?-XNJ<-q{}Fwl(NVjHiqHN@Bx==y*1mtIX;mYCR)ZXDlsg;`f0 z_j9fEg!>Et02oZE8A)P4)0mi?*l|TC#;(>EU;XWSJ0}MI#~=HesmGW4`4%Sz0szqM zNq@tMF8RB9^7p>=mJ?m_cRZ_qcfNCbI59AtH$NYl^oJ7L()#?Z32?-|#&VJ;Zk4rQAc@tTkuh0a5o&W#+0Tbq zswe$vY+Yr&JHf9#SFwJ4+q>=h`X~KNvn587o_#+60Lsow%dD#4_bmTJ3rN zrFwgWZ~K97nArAtGgA8nKix{j(i8{)z>_#h&H5zvbIre+8sG7Yy$t@nPXOBc1Dq*e z9-4_ZTw`PVO5aFn3IqV)*rvaF9J$opxGtNzWUst!VYSx#Kb77#=7k47A$uooo^z86 zZ}X|!Z)%Yq8no(j82|v3k_(&tL>ePCR%*=D*xBp-bb8;JpEm_YvmgK7K3PcL=Dj~4 ziGEv>006+C^G;)8h>Z*B+d{0=C4W6=`a4#Cmgcq33z+)DYrk(=?%$d?vSDW<{T~1T zgUIK*{Ao zpZt$IKG*A}zhm`3@OE|zBnbcj3?hG=;NOFt{+>zycjxOIAFNM!p>=s^3bf*M0;KPc z1pt74(pVRQe{}Snf1iWDTD#KwQPTm@XMHncIsgDL0C)aTBn#P^l>L`l+qw6pNkE+> z001xm!N0Ng!C%(=fF6C~o#}u^wq!bh)d2v2itxn?{!)k&`kpcgV4na0K*@RUiWvM= zahBh;FUY#z+x8Bt(*Z3fk~$~WtbLLK06@2N*W1`ylUQ+$?DClc1^;3t080-K`p_HR z>f`8djWwG?bD%NNT0b-Z0J_@SU$^&l{*Xzte>e5vYrk5g;9tB1;HV_vjj!}^^hIOM znZA*xVobc&4-Ei-XXJfq>T&Fy-)qwB?NcBA_Kigg{>4lHRQp1W{Pr8pjFRY!W+;B8 zpKX!^004>~{6}lCUr2AvTG`v@{_xtpMGXGMO#sx`SR~uGXD7e!wd)(BwNKf4^viy( zm4zdQO#zx00RZUm;`H=BGm=EEk^Mz|w)yS@AN%ffCzeS86*mD;<6=7}BCQ|a_HGl| zPkI-c1L+F@02G7wnZ!0S){4*Ed!{FLeCpU3Rz$_VlhzBTcl_hyHeAqF`V-=1uNg`r zaXww#Er3mg0Ra8tm;BfHG{ht?do@OdST#OwL+mPW@GpJ^;HmloV*8h-9>3Mk=~_WA zVpu8&0O%vHd({{*BZ>8m^s8CweyPaw{pC&o)RNPZHvHZj$0f2?X#DrBj0QmfK>r&3 zk|+)lG;>!>{l{-l92=v`pj-(+XHG@NMJ6WPhTnd}Tcu{Nlq5RO&!toY004cs>yNFp zvb&|}-Zk}yy1swh>YR1aOaA3g06N-bmdziycw;)W{=>$~Z%_>Y0QCB<-#htqyfFQt zLm$0)vP>oa>LdVa$?^)_Jy49jQfgEK002F>>u+Xvi+Aq|yZRjygUYDbs{o#fUih#| zU|Xy|kf<^9D&KIQHZ^NaEwW*0hWD%y004Byd*9y9*J@1B*rG9JaZ6u~JtYqQ<*xuN zwImZ8{m|>*6dC&mQj1>g8<{p~=)M8AQqLCv&_rJF_4D&Nr%X z*S}QN0-}+t#%$=qy!_&1!x`&-)r^7~Vd z&HR~s_U2Z*!(W^HDpOUiS_1IoYQXrvIL)}^cg4s%O%m1oe5wlv9f<${U@`EEv1T|n zzLhn_%b$DO`u*97@9nGFU4QixfMcrxnh1Pw+eIew?-gr)$wWr{LK^mM7U8I202oX@ z^pTmN*!s-tu6}>%GxLerkLhNKw7@gyfb&g*$r|(_ujsMu}hrfOG;vN6a?Y?Xq z`mEI81v<^_E;#Z7UjI99c&)ecE8@-1nR;CFjWl015Eg!N#sC16TDaR6pLg}g;u~pG zjQ?xn+V|B+AD75{!MDs`Eza@#qo;@m4WUf;aNf0RG4mV! z;E$hflI&-^^S@|BUTYGo%RxlaEFU2B3IITX=k`S;j-t+Mw-@=YvF7u>6@6*;Bj0@d zNG13JuV>2003!i7>X4yrcIlqZIz8ZwXd>{FCbnnk$9&U?xG+UPG5`QY3HsJXrj~DR z>r?lz7x`!F<@1YWex*D3$qqLtbNtVQ1mIXhT6`8(oqN=yF0UrsP{I13=Mv4c;N>o5i4SLWzG$jJd{n_dka>`oBN$f$vTqwIqD3 z`d$6qA^~_hS|%D3S$e+n@c6c~;xxO|i}_a}8K^}Y!r;@>h+8i2G7Z<&XwLu%0RWtM zz}LW?@7t1CV`3XVWUaCDtkUA=dA z8Zp<4HDAsm^ZlcOzV>uoxXV;|^Pbg20yynb_Y+HHwVbfGi$9Mj5P;fWHIp~w1X*`{4CRSo2;=H zJLkO-IY%P%d`UypH{QrrW6XL@llj>JC=fkT$9V6jjhEfw{n!}E{ExiIebyS|yt~=g z>|xVPAB}43ADx=`+QFyzT1LjV<#+h`%@p(b(i{Ij`KouA(VDsw00000NkvXXu0mjf DnM6$Q literal 0 HcmV?d00001 diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..d030239 --- /dev/null +++ b/package.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# Builds the store release assets into dist/: +# +# ./package.sh app.toml and support.bluefox.spotify-.tar.zst +# (x86-64; dist/ is emptied first) +# ./package.sh --arm adds support.bluefox.spotify--aarch64.tar.zst +# (Raspberry Pi, cross-compiled) +# +# Build on Debian trixie or older (the TV's glibc), with the GStreamer dev +# packages (libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev) and +# sf-pack from the Fennec SDK: +# cargo install --locked --git https://gitea.bluefox.support/fennec/sdk --tag v0.1.1 sf-pack +# --arm also needs gcc-aarch64-linux-gnu, the arm64 (multiarch) dev packages +# of fontconfig, freetype, xkbcommon and glib, and the arm64 GStreamer +# runtime libraries (libgstreamer1.0-0:arm64 libgstreamer-plugins-base1.0-0:arm64). +# Not necessarily the GStreamer dev packages: they can't be installed for two +# architectures at once, so the build links the runtime libraries directly. +set -euo pipefail +cd "$(dirname "$0")" + +target="${CARGO_TARGET_DIR:-target}" +id=$(sed -n 's/^id *= *"\(.*\)".*/\1/p' app.toml | head -1) +version=$(sed -n 's/^version *= *"\(.*\)".*/\1/p' app.toml | head -1) +bin=spotify-tv + +# pack : the package with this binary. +pack() { + rm -rf pkg + mkdir -p pkg/bin + cp app.toml icon.png pkg/ + install -m755 "$1" pkg/bin/$bin + sf-pack build pkg "$2" + sf-pack verify "$2" + rm -rf pkg +} + +if [ "${1:-}" != --arm ]; then + cargo build --release --locked + rm -rf dist + pack "$target/release/$bin" dist +else + t=aarch64-unknown-linux-gnu + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc + export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ + export AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar + export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/ + export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/share/pkgconfig + rustup target list --installed | grep -qx "$t" || rustup target add "$t" + # GStreamer without pkg-config (system-deps): link the runtime libraries + # through a folder of unversioned names. librespot plays through + # appsrc -> audioconvert -> autoaudiosink: core, base, app, audio. + mkdir -p "$target" + gst="$(cd "$target" && pwd)/arm-gstreamer" + rm -rf "$gst" && mkdir -p "$gst" + # system-deps key (the pkg-config name) and the library it stands for. + for pair in GSTREAMER_1_0:gstreamer-1.0 GSTREAMER_BASE_1_0:gstbase-1.0 \ + GSTREAMER_APP_1_0:gstapp-1.0 GSTREAMER_AUDIO_1_0:gstaudio-1.0; do + key=${pair%%:*} lib=${pair#*:} + so=/usr/lib/aarch64-linux-gnu/lib$lib.so.0 + [ -e "$so" ] || { echo "missing $so (install the arm64 GStreamer runtime libraries)" >&2; exit 1; } + ln -s "$so" "$gst/lib$lib.so" + export "SYSTEM_DEPS_${key}_NO_PKG_CONFIG=1" "SYSTEM_DEPS_${key}_LIB=$lib" "SYSTEM_DEPS_${key}_SEARCH_NATIVE=$gst" + done + cargo build --release --locked --target "$t" + rm -rf dist-arm + pack "$target/$t/release/$bin" dist-arm + # Fennec OS on ARM looks for --aarch64.tar.zst (docs/store.md). + mkdir -p dist + mv "dist-arm/$id-$version.tar.zst" "dist/$id-$version-aarch64.tar.zst" + [ -f dist/app.toml ] || mv dist-arm/app.toml dist/ + rm -rf dist-arm +fi +ls -l dist diff --git a/src/api.rs b/src/api.rs new file mode 100644 index 0000000..f669f5d --- /dev/null +++ b/src/api.rs @@ -0,0 +1,643 @@ +//! Spotify Web API (api.spotify.com/v1): browsing, the library, search, the +//! queue. The access token comes from the librespot session (spotify::Engine). +//! +//! Every answer is parsed leniently (missing fields default), since Spotify's +//! objects differ a bit between endpoints. GET answers are cached for a short +//! while: a TV jumps back and forth between the same pages, and Spotify +//! rate-limits busy clients (429 + Retry-After, honoured once). + +use std::collections::HashMap; +use std::io::Read; +use std::sync::{Arc, Mutex}; +use std::time::{Duration, Instant}; + +use anyhow::{Context, Result}; +use serde::Deserialize; +use serde::de::DeserializeOwned; + +use crate::spotify::Engine; + +pub const API: &str = "https://api.spotify.com/v1"; +const CACHE_FOR: Duration = Duration::from_secs(90); + +// ---------------------------------------------------------------------------- objects + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Image { + pub url: String, + pub width: Option, +} + +/// The picture closest to `want` px wide (Spotify lists them largest first). +pub fn pick(images: &[Image], want: u32) -> String { + let mut best: Option<&Image> = None; + for i in images { + let w = i.width.unwrap_or(640); + best = match best { + None => Some(i), + Some(b) => { + let bw = b.width.unwrap_or(640); + // Prefer the smallest that is still big enough. + let better = if w >= want && bw >= want { w < bw } else { w > bw }; + Some(if better { i } else { b }) + } + }; + } + best.map(|i| i.url.clone()).unwrap_or_default() +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Named { + pub id: String, + pub name: String, + pub uri: String, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Album { + pub id: String, + pub name: String, + pub uri: String, + pub images: Vec, + pub artists: Vec, + pub release_date: String, + pub total_tracks: u32, + pub album_type: String, + pub label: String, + pub tracks: Option>, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Track { + pub id: String, + pub name: String, + pub uri: String, + /// "track" | "episode" + #[serde(rename = "type")] + pub kind: String, + pub duration_ms: u32, + pub explicit: bool, + pub artists: Vec, + pub album: Option, + pub track_number: u32, + pub is_playable: Option, + // episodes + pub images: Vec, + pub show: Option, + pub release_date: String, + pub description: String, + pub resume_point: Option, +} + +impl Track { + pub fn artist_names(&self) -> String { + if let Some(s) = &self.show { + return s.name.clone(); + } + self.artists.iter().map(|a| a.name.as_str()).collect::>().join(", ") + } + pub fn image(&self, want: u32) -> String { + if !self.images.is_empty() { + return pick(&self.images, want); + } + self.album.as_ref().map(|a| pick(&a.images, want)).or_else(|| self.show.as_ref().map(|s| pick(&s.images, want))).unwrap_or_default() + } + pub fn playable(&self) -> bool { + self.is_playable != Some(false) && !self.uri.is_empty() && !self.uri.starts_with("spotify:local:") + } +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct ResumePoint { + pub fully_played: bool, + pub resume_position_ms: u32, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Owner { + pub id: String, + pub display_name: Option, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Total { + pub total: u32, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Playlist { + pub id: String, + pub name: String, + pub uri: String, + pub images: Option>, + pub description: String, + pub owner: Owner, + pub tracks: Option, + pub items: Option, + pub followers: Option, +} + +impl Playlist { + pub fn image(&self, want: u32) -> String { + self.images.as_deref().map(|i| pick(i, want)).unwrap_or_default() + } + pub fn count(&self) -> u32 { + self.tracks.as_ref().or(self.items.as_ref()).map(|t| t.total).unwrap_or(0) + } + pub fn owner_name(&self) -> String { + self.owner.display_name.clone().unwrap_or_else(|| self.owner.id.clone()) + } +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Artist { + pub id: String, + pub name: String, + pub uri: String, + pub images: Vec, + pub followers: Option, + pub genres: Vec, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Show { + pub id: String, + pub name: String, + pub uri: String, + pub images: Vec, + pub publisher: String, + pub description: String, + pub total_episodes: u32, +} + +#[derive(Debug, Clone, Deserialize)] +#[serde(default)] +pub struct Paging { + /// Search answers may hold nulls. + pub items: Vec>, + pub next: Option, + pub total: u32, + pub offset: u32, +} + +impl Default for Paging { + fn default() -> Self { + Paging { items: Vec::new(), next: None, total: 0, offset: 0 } + } +} + +impl Paging { + pub fn list(&self) -> Vec { + self.items.iter().flatten().cloned().collect() + } + pub fn more(&self) -> bool { + self.next.is_some() + } +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct User { + pub id: String, + pub display_name: Option, + pub product: String, + pub country: String, + pub images: Vec, +} + +impl User { + pub fn name(&self) -> String { + self.display_name.clone().filter(|n| !n.is_empty()).unwrap_or_else(|| self.id.clone()) + } +} + +#[derive(Debug, Clone, Deserialize)] +struct Saved { + track: Option, + album: Option, + show: Option, + episode: Option, + /// Playlist entries: newer answers call it "item". + item: Option, +} + +impl Saved { + fn into_inner(self) -> Option { + self.track.or(self.item).or(self.album).or(self.show).or(self.episode) + } +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct PlayContext { + pub uri: String, + #[serde(rename = "type")] + pub kind: String, +} + +#[derive(Debug, Clone, Default, Deserialize)] +#[serde(default)] +pub struct Played { + pub track: Track, + pub context: Option, +} + +#[derive(Debug, Clone, Default)] +pub struct SearchResult { + pub tracks: Vec, + pub artists: Vec, + pub albums: Vec, + pub playlists: Vec, + pub shows: Vec, +} + +// ---------------------------------------------------------------------------- errors + +#[derive(Debug)] +pub struct ApiError { + pub status: u16, + pub message: String, +} + +impl std::fmt::Display for ApiError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{} ({})", self.message, self.status) + } +} + +impl std::error::Error for ApiError {} + +pub fn status_of(e: &anyhow::Error) -> Option { + e.downcast_ref::().map(|a| a.status) +} + +/// A short Hungarian message for the screen. +pub fn describe(e: &anyhow::Error) -> String { + if let Some(a) = e.downcast_ref::() { + return a.message.clone(); + } + for cause in e.chain() { + if let Some(u) = cause.downcast_ref::() { + return match u { + ureq::Error::Timeout(_) => "A Spotify nem válaszolt időben.".into(), + ureq::Error::Io(_) | ureq::Error::ConnectionFailed | ureq::Error::HostNotFound => "A Spotify nem érhető el. Ellenőrizd a hálózatot.".into(), + other => format!("Hálózati hiba: {other}"), + }; + } + } + format!("{e:#}") +} + +pub fn enc(s: &str) -> String { + let mut out = String::new(); + for b in s.bytes() { + match b { + b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' => out.push(b as char), + _ => out.push_str(&format!("%{b:02X}")), + } + } + out +} + +// ---------------------------------------------------------------------------- client + +/// Cheap to clone; usable from any thread (blocking calls). +#[derive(Clone)] +pub struct Api { + base: String, + engine: Engine, + agent: ureq::Agent, + cache: Arc>>, +} + +impl Api { + pub fn new(engine: Engine) -> Api { + let agent: ureq::Agent = ureq::Agent::config_builder() + .timeout_global(Some(Duration::from_secs(30))) + .timeout_connect(Some(Duration::from_secs(8))) + .http_status_as_error(false) + .user_agent(concat!("FennecSpotifyTV/", env!("CARGO_PKG_VERSION"))) + .build() + .into(); + let base = std::env::var("SPOTIFY_API").unwrap_or_else(|_| API.to_string()); + Api { base: base.trim_end_matches('/').to_string(), engine, agent, cache: Arc::default() } + } + + /// Forgets cached answers (after a change to the library). + pub fn forget(&self, prefix: &str) { + let full = format!("{}{prefix}", self.base); + self.cache.lock().unwrap().retain(|k, _| !k.starts_with(&full)); + } + + fn url(&self, path: &str) -> String { + if path.starts_with("http") { path.to_string() } else { format!("{}{path}", self.base) } + } + + fn call(&self, method: &str, path: &str, cache: bool) -> Result { + let url = self.url(path); + if cache && method == "GET" { + if let Some((at, body)) = self.cache.lock().unwrap().get(&url) { + if at.elapsed() < CACHE_FOR { + return Ok(body.clone()); + } + } + } + let mut tries = 0; + loop { + tries += 1; + let auth = format!("Bearer {}", self.engine.token()?); + let resp = match method { + "GET" => self.agent.get(&url).header("Authorization", &auth).header("Accept-Language", "hu").call(), + "POST" => self.agent.post(&url).header("Authorization", &auth).send_empty(), + "PUT" => self.agent.put(&url).header("Authorization", &auth).send_empty(), + _ => self.agent.delete(&url).header("Authorization", &auth).call(), + } + .with_context(|| format!("{method} {path}"))?; + let status = resp.status().as_u16(); + let retry = resp.headers().get("retry-after").and_then(|v| v.to_str().ok()).and_then(|v| v.parse::().ok()); + let mut text = String::new(); + resp.into_body().into_reader().take(16 << 20).read_to_string(&mut text)?; + if status == 429 && tries == 1 { + let wait = retry.unwrap_or(2).min(8); + log::warn!("{path}: rate limited, waiting {wait} s"); + std::thread::sleep(Duration::from_secs(wait)); + continue; + } + if status == 502 || status == 503 { + if tries < 3 { + std::thread::sleep(Duration::from_millis(600)); + continue; + } + } + if !(200..300).contains(&status) { + let v: serde_json::Value = serde_json::from_str(&text).unwrap_or_default(); + let detail = v["error"]["message"].as_str().unwrap_or("").to_string(); + log::warn!("{method} {path}: {status} {detail}"); + let message = match status { + 401 => "A Spotify bejelentkezés lejárt".into(), + 403 => "A Spotify ezt nem engedi".to_string(), + 404 => "Nem található".into(), + 429 => "A Spotify túl sok kérést kapott, próbáld újra kicsit később".into(), + s => format!("A Spotify hibát jelzett ({s})"), + }; + return Err(ApiError { status, message }.into()); + } + if cache && method == "GET" { + let mut c = self.cache.lock().unwrap(); + if c.len() > 300 { + c.retain(|_, (at, _)| at.elapsed() < CACHE_FOR); + } + c.insert(url.clone(), (Instant::now(), text.clone())); + } + return Ok(text); + } + } + + fn get(&self, path: &str) -> Result { + let text = self.call("GET", path, true)?; + let text = if text.trim().is_empty() { "null" } else { text.as_str() }; + serde_json::from_str(text).with_context(|| format!("GET {path}: unexpected answer")) + } + + fn send(&self, method: &str, path: &str) -> Result<()> { + self.call(method, path, false).map(|_| ()) + } + + /// A page of saved things ({ items: [{ track | album | show | item }] }). + fn saved(&self, path: &str) -> Result> { + let p: Paging> = self.get(path)?; + Ok(Paging { items: p.items.into_iter().map(|s| s.and_then(Saved::into_inner)).collect(), next: p.next, total: p.total, offset: p.offset }) + } + + // ---- account ---- + + pub fn me(&self) -> Result { + self.get("/me") + } + + // ---- home ---- + + pub fn recently_played(&self) -> Result> { + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + items: Vec, + } + Ok(self.get::("/me/player/recently-played?limit=50")?.items) + } + pub fn top_artists(&self) -> Result> { + Ok(self.get::>("/me/top/artists?limit=20&time_range=short_term")?.list()) + } + pub fn top_tracks(&self) -> Result> { + Ok(self.get::>("/me/top/tracks?limit=20&time_range=short_term")?.list()) + } + pub fn new_releases(&self) -> Result> { + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + albums: Paging, + } + Ok(self.get::("/browse/new-releases?limit=20")?.albums.list()) + } + + // ---- library ---- + + pub fn my_playlists(&self, offset: u32) -> Result> { + self.get(&format!("/me/playlists?limit=50&offset={offset}")) + } + pub fn liked(&self, offset: u32) -> Result> { + self.saved(&format!("/me/tracks?limit=50&offset={offset}")) + } + pub fn saved_albums(&self, offset: u32) -> Result> { + self.saved(&format!("/me/albums?limit=50&offset={offset}")) + } + pub fn saved_shows(&self, offset: u32) -> Result> { + self.saved(&format!("/me/shows?limit=50&offset={offset}")) + } + /// Followed artists (cursor paging: `after` is the last artist's id). + pub fn followed_artists(&self, after: &str) -> Result<(Vec, Option)> { + #[derive(Deserialize, Default)] + #[serde(default)] + struct Cursors { + after: Option, + } + #[derive(Deserialize, Default)] + #[serde(default)] + struct P { + items: Vec, + cursors: Cursors, + } + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + artists: P, + } + let q = if after.is_empty() { String::new() } else { format!("&after={}", enc(after)) }; + let r: R = self.get(&format!("/me/following?type=artist&limit=50{q}"))?; + Ok((r.artists.items, r.artists.cursors.after)) + } + + pub fn liked_contains(&self, ids: &[String]) -> Result> { + if ids.is_empty() { + return Ok(Vec::new()); + } + let mut out = Vec::new(); + for chunk in ids.chunks(50) { + let v: Vec = self.get(&format!("/me/tracks/contains?ids={}", chunk.join(",")))?; + out.extend(v); + } + Ok(out) + } + pub fn set_liked(&self, id: &str, on: bool) -> Result<()> { + self.forget("/me/tracks"); + self.send(if on { "PUT" } else { "DELETE" }, &format!("/me/tracks?ids={id}")) + } + pub fn album_saved(&self, id: &str) -> Result { + Ok(self.get::>(&format!("/me/albums/contains?ids={id}"))?.first().copied().unwrap_or(false)) + } + pub fn set_album_saved(&self, id: &str, on: bool) -> Result<()> { + self.forget("/me/albums"); + self.send(if on { "PUT" } else { "DELETE" }, &format!("/me/albums?ids={id}")) + } + pub fn show_saved(&self, id: &str) -> Result { + Ok(self.get::>(&format!("/me/shows/contains?ids={id}"))?.first().copied().unwrap_or(false)) + } + pub fn set_show_saved(&self, id: &str, on: bool) -> Result<()> { + self.forget("/me/shows"); + self.send(if on { "PUT" } else { "DELETE" }, &format!("/me/shows?ids={id}")) + } + pub fn following_artist(&self, id: &str) -> Result { + Ok(self.get::>(&format!("/me/following/contains?type=artist&ids={id}"))?.first().copied().unwrap_or(false)) + } + pub fn set_following_artist(&self, id: &str, on: bool) -> Result<()> { + self.forget("/me/following"); + self.send(if on { "PUT" } else { "DELETE" }, &format!("/me/following?type=artist&ids={id}")) + } + pub fn following_playlist(&self, id: &str, user: &str) -> Result { + let r = self.get::>(&format!("/playlists/{id}/followers/contains?ids={}", enc(user))); + Ok(r?.first().copied().unwrap_or(false)) + } + pub fn set_following_playlist(&self, id: &str, on: bool) -> Result<()> { + self.forget("/me/playlists"); + self.send(if on { "PUT" } else { "DELETE" }, &format!("/playlists/{id}/followers")) + } + + // ---- pages ---- + + pub fn playlist(&self, id: &str) -> Result { + self.get(&format!("/playlists/{id}?fields=id,name,uri,images,description,owner(id,display_name),followers(total),tracks(total)")) + } + pub fn playlist_tracks(&self, id: &str, offset: u32) -> Result> { + let path = format!("/playlists/{id}/tracks?limit=100&offset={offset}&additional_types=track,episode"); + match self.saved(&path) { + // Newer API versions moved the list to /items. + Err(e) if matches!(status_of(&e), Some(403 | 404 | 410)) => self.saved(&format!("/playlists/{id}/items?limit=100&offset={offset}&additional_types=track,episode")), + r => r, + } + } + pub fn album(&self, id: &str) -> Result { + self.get(&format!("/albums/{id}")) + } + pub fn album_tracks(&self, id: &str, offset: u32) -> Result> { + self.get(&format!("/albums/{id}/tracks?limit=50&offset={offset}")) + } + pub fn artist(&self, id: &str) -> Result { + self.get(&format!("/artists/{id}")) + } + pub fn artist_top(&self, id: &str, market: &str) -> Result> { + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + tracks: Vec, + } + let m = if market.is_empty() { "from_token".to_string() } else { market.to_string() }; + Ok(self.get::(&format!("/artists/{id}/top-tracks?market={m}"))?.tracks) + } + /// `groups`: "album" | "single" | "appears_on" | "compilation", comma separated. + pub fn artist_albums(&self, id: &str, groups: &str) -> Result> { + Ok(self.get::>(&format!("/artists/{id}/albums?include_groups={groups}&limit=30"))?.list()) + } + pub fn show(&self, id: &str) -> Result { + self.get(&format!("/shows/{id}")) + } + pub fn show_episodes(&self, id: &str, offset: u32) -> Result> { + self.get(&format!("/shows/{id}/episodes?limit=50&offset={offset}")) + } + + // ---- search ---- + + pub fn search(&self, q: &str) -> Result { + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + tracks: Paging, + artists: Paging, + albums: Paging, + playlists: Paging, + shows: Paging, + } + let r: R = self.get(&format!("/search?q={}&type=track,artist,album,playlist,show&limit=10", enc(q)))?; + Ok(SearchResult { tracks: r.tracks.list(), artists: r.artists.list(), albums: r.albums.list(), playlists: r.playlists.list(), shows: r.shows.list() }) + } + + // ---- player ---- + + /// What comes next on the active device. + pub fn queue(&self) -> Result> { + #[derive(Deserialize, Default)] + #[serde(default)] + struct R { + queue: Vec, + } + let text = self.call("GET", "/me/player/queue", false)?; + Ok(serde_json::from_str::(&text).unwrap_or_default().queue) + } + pub fn add_to_queue(&self, uri: &str) -> Result<()> { + self.send("POST", &format!("/me/player/queue?uri={}", enc(uri))) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn picks_the_right_picture() { + let imgs = vec![ + Image { url: "640".into(), width: Some(640) }, + Image { url: "300".into(), width: Some(300) }, + Image { url: "64".into(), width: Some(64) }, + ]; + assert_eq!(pick(&imgs, 250), "300"); + assert_eq!(pick(&imgs, 400), "640"); + assert_eq!(pick(&imgs, 1000), "640"); + assert_eq!(pick(&imgs, 10), "64"); + assert_eq!(pick(&[], 10), ""); + } + + #[test] + fn parses_saved_and_null_items() { + let p: Paging> = serde_json::from_str(r#"{"items":[{"track":{"id":"a","name":"A","uri":"spotify:track:a","type":"track"}},null,{"item":{"id":"b","type":"episode"}}],"total":3,"next":null}"#).unwrap(); + let list: Vec = p.items.into_iter().flatten().filter_map(Saved::into_inner).collect(); + assert_eq!(list.len(), 2); + assert_eq!(list[1].kind, "episode"); + let s: Paging = serde_json::from_str(r#"{"items":[null,{"id":"p","name":"P","images":null,"owner":{"id":"u"}}]}"#).unwrap(); + assert_eq!(s.list().len(), 1); + assert_eq!(s.list()[0].owner_name(), "u"); + } + + #[test] + fn encodes_queries() { + assert_eq!(enc("Dűne ä&b"), "D%C5%B1ne%20%C3%A4%26b"); + } +} diff --git a/src/app.rs b/src/app.rs new file mode 100644 index 0000000..6acb7ef --- /dev/null +++ b/src/app.rs @@ -0,0 +1,1052 @@ +//! The controller: the screen stack, keys, overlays (text input, picker, +//! toast), the backdrop, sign-in and the Spotify engine's events. +//! +//! Browsing screens implement `Screen`: they describe their page as lines +//! (`spec`) and react to activation. While one of their methods runs it is +//! taken out of the stack, so methods may freely start tasks and request +//! effects (push, play...), which run when the method returns. + +use std::any::Any; +use std::cell::RefCell; +use std::rc::Rc; +use std::time::Duration; + +use slint::platform::Key; +use slint::{ComponentHandle, ModelRc, SharedString, VecModel}; + +use crate::api::{self, Api, User}; +use crate::config::Config; +use crate::nowplaying::NowPlaying; +use crate::page::{Focus, Kind, Spec, View}; +use crate::spotify::{Cmd, Engine, Event, Status}; +use crate::{App, MenuItem, nowplaying, screens, task}; + +/// A remote / keyboard key, as screens see it. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Action { + Up, + Down, + Left, + Right, + Ok, + Back, + PlayPause, +} + +fn action(text: &str) -> Option { + let is = |k: Key| text == SharedString::from(k).as_str(); + Some(if is(Key::UpArrow) { + Action::Up + } else if is(Key::DownArrow) { + Action::Down + } else if is(Key::LeftArrow) { + Action::Left + } else if is(Key::RightArrow) { + Action::Right + } else if is(Key::Return) { + Action::Ok + } else if is(Key::Escape) || is(Key::Backspace) || is(Key::Back) { + Action::Back + } else if text == " " { + Action::PlayPause + } else { + return None; + }) +} + +/// `text` as a QR code: black modules on white, with the quiet zone. +pub fn qr_image(text: &str) -> Option { + let code = qrcode::QrCode::new(text.as_bytes()).ok()?; + let n = code.width(); + let colors = code.to_colors(); + let (quiet, scale) = (2usize, 12usize); + let size = (n + 2 * quiet) * scale; + let mut buf = slint::SharedPixelBuffer::::new(size as u32, size as u32); + let px = buf.make_mut_slice(); + for y in 0..size { + for x in 0..size { + let (mx, my) = ((x / scale) as isize - quiet as isize, (y / scale) as isize - quiet as isize); + let dark = mx >= 0 && my >= 0 && (mx as usize) < n && (my as usize) < n && colors[my as usize * n + mx as usize] == qrcode::Color::Dark; + let v = if dark { 0x12 } else { 0xff }; + px[y * size + x] = slint::Rgba8Pixel { r: v, g: v, b: v, a: 0xff }; + } + } + Some(slint::Image::from_rgba8(buf)) +} + +/// Top navigation sections. Right of the last one: the "now playing" capsule. +pub const SECTIONS: [&str; 4] = ["Kezdőlap", "Keresés", "Könyvtár", "Beállítások"]; + +/// A browsing screen. +pub trait Screen: Any { + /// The page: lines and frame. + fn spec(&mut self, cx: &Cx) -> Spec; + /// OK on an element of a line. + fn activate(&mut self, cx: &Cx, line: &str, item: &str); + /// The focus moved (backdrop...). + fn focus(&mut self, _cx: &Cx, _line: &str, _item: &str) {} + /// Back; true = handled (the screen stays). + fn back(&mut self, _cx: &Cx) -> bool { + false + } + /// The focus is near the end of list `list`. + fn more(&mut self, _cx: &Cx, _list: &str) {} + /// On top again (back from a child or the player). + fn shown(&mut self, _cx: &Cx) {} + /// The search keyboard's text changed (`submit`: the search chip). + fn query(&mut self, _cx: &Cx, _text: &str, _submit: bool) {} + /// The playing track changed (rows mark it). + fn track_changed(&mut self, _cx: &Cx) {} + fn as_any(&mut self) -> &mut dyn Any; +} + +/// A text field request (the input overlay). +pub struct Input { + pub title: String, + pub subtitle: String, + pub placeholder: String, + pub value: String, + pub submit: String, + pub min: i32, +} + +type InputDone = Rc; +type SelectDone = Box; + +enum Effect { + Push(Box), + Refresh, + Play(Cmd), +} + +struct Entry { + id: u64, + screen: Option>, + view: View, +} + +pub struct State { + pub cfg: Config, + pub api: Api, + pub user: User, + pub status: Status, + stack: Vec, + next_id: u64, + /// "message", "signin", "page", "nowplaying" + pub screen: &'static str, + input_done: Option, + select: Option<(usize, usize, SelectDone)>, + pub np: NowPlaying, + /// The nav focus sits on the "now playing" capsule. + np_capsule: bool, +} + +pub struct Inner { + pub ui: slint::Weak, + pub glass: sf_ui::Glass, + pub images: sf_ui::images::Images, + pub engine: Engine, + pub state: RefCell, + effects: RefCell>, + toast_timer: slint::Timer, + backdrop_timer: slint::Timer, + backdrop_key: RefCell, + pub np_timer: slint::Timer, + search_timer: slint::Timer, +} + +/// Cheap to clone; every callback holds one. +#[derive(Clone)] +pub struct Controller(pub Rc); + +impl std::ops::Deref for Controller { + type Target = Inner; + fn deref(&self) -> &Inner { + &self.0 + } +} + +thread_local! { + static CONTROLLER: RefCell> = const { RefCell::new(None) }; +} + +/// What a screen's methods get: the controller and the screen's own id. +pub struct Cx<'a> { + pub c: &'a Controller, + pub id: u64, +} + +/// How the backdrop picture shows. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Look { + /// Details pages: sharp, dark towards the left and bottom. + Sharp, + /// Browsing and now playing: blurred and dim. + Soft, +} + +/// The app's colours: Spotify green on near black. +pub const PALETTE: [&str; 3] = ["#1ed760", "#0d5c2b", "#060a07"]; + +impl<'a> Cx<'a> { + pub fn api(&self) -> Api { + self.c.api() + } + pub fn user(&self) -> User { + self.c.state.borrow().user.clone() + } + pub fn cfg(&self) -> Config { + self.c.state.borrow().cfg.clone() + } + /// The uri of the track that plays ("" if none). + pub fn playing_uri(&self) -> String { + self.c.state.borrow().np.track.as_ref().map(|t| t.uri.clone()).unwrap_or_default() + } + + /// Runs `work` on a thread; `done` gets this screen back (if it still + /// exists) on the UI thread. The page is rebuilt afterwards. + pub fn spawn(&self, work: impl FnOnce() -> R + Send + 'static, done: impl FnOnce(&mut T, &Cx, R) + 'static) { + let c = self.c.clone(); + let id = self.id; + task::spawn(work, move |r| c.with::(id, move |s, cx| done(s, cx, r))); + } + + /// Fire and forget, then rebuild this screen's page (and run `then`). + pub fn call(&self, what: &'static str, work: impl FnOnce() -> anyhow::Result<()> + Send + 'static, then: impl FnOnce(&mut T, &Cx, bool) + 'static) { + self.spawn::(work, move |s, cx, r| { + let ok = r.is_ok(); + if let Err(e) = r { + cx.error(what, &e); + } + then(s, cx, ok); + }); + } + + pub fn error(&self, what: &str, e: &anyhow::Error) { + log::warn!("{what}: {e:#}"); + self.c.toast(&api::describe(e), true); + } + + pub fn push(&self, s: Box) { + self.c.effects.borrow_mut().push(Effect::Push(s)); + } + pub fn refresh(&self) { + self.c.effects.borrow_mut().push(Effect::Refresh); + } + /// Starts playback and shows the now playing screen. + pub fn play(&self, cmd: Cmd) { + self.c.effects.borrow_mut().push(Effect::Play(cmd)); + } + pub fn toast(&self, text: &str) { + self.c.toast(text, false); + } + pub fn backdrop(&self, url: &str, look: Look, key: &str) { + self.c.backdrop(url, look, key); + } + /// A text field; `done` gets the text (this screen back first). + pub fn input(&self, req: Input, done: impl FnOnce(&mut T, &Cx, String) + 'static) { + let id = self.id; + let once = RefCell::new(Some(done)); + self.c.open_input( + req, + Rc::new(move |c: &Controller, text: String| { + if let Some(done) = once.borrow_mut().take() { + c.with::(id, move |s, cx| done(s, cx, text)); + } + }), + ); + } + /// A picker over `items` (label, detail, checked). + pub fn select(&self, title: &str, items: Vec<(String, String, bool)>, done: impl FnOnce(&mut T, &Cx, usize) + 'static) { + let id = self.id; + self.c.open_select(title, items, Box::new(move |c: &Controller, i: usize| c.with::(id, move |s, cx| done(s, cx, i)))); + } + pub fn set_cfg(&self, f: impl FnOnce(&mut Config)) { + let mut st = self.c.state.borrow_mut(); + f(&mut st.cfg); + st.cfg.save(); + } +} + +impl Controller { + pub fn new(ui: &App, glass: sf_ui::Glass, images: sf_ui::images::Images) -> Controller { + let cfg = Config::load(); + crate::config::apply_look(&glass, &cfg.glass); + // Engine events arrive on a runtime thread: hop to the UI thread. + let engine = Engine::start(&cfg, |ev| { + let _ = slint::invoke_from_event_loop(move || { + if let Some(c) = CONTROLLER.with(|c| c.borrow().clone()) { + c.on_event(ev); + } + }); + }); + let api = Api::new(engine.clone()); + let state = State { + cfg, + api, + user: User::default(), + status: Status::Connecting, + stack: Vec::new(), + next_id: 1, + screen: "message", + input_done: None, + select: None, + np: NowPlaying::default(), + np_capsule: false, + }; + let c = Controller(Rc::new(Inner { + ui: ui.as_weak(), + glass, + images, + engine, + state: RefCell::new(state), + effects: RefCell::default(), + toast_timer: slint::Timer::default(), + backdrop_timer: slint::Timer::default(), + backdrop_key: RefCell::default(), + np_timer: slint::Timer::default(), + search_timer: slint::Timer::default(), + })); + CONTROLLER.with(|k| *k.borrow_mut() = Some(c.clone())); + + let k = c.clone(); + ui.on_key(move |text, repeat| match action(&text) { + Some(a) => { + k.key(a, repeat); + true + } + None => false, + }); + let k = c.clone(); + ui.on_input_submitted(move |t| k.input_submitted(t.to_string())); + let k = c.clone(); + ui.on_input_cancelled(move || k.close_input()); + let k = c.clone(); + ui.on_search_submitted(move |t| k.search(t.to_string(), true)); + let k = c.clone(); + ui.on_search_changed(move |t| k.search(t.to_string(), false)); + let k = c.clone(); + ui.on_search_exit_down(move || k.leave_keyboard(true)); + let k = c.clone(); + ui.on_search_exit_up(move || k.leave_keyboard(false)); + let k = c.clone(); + ui.on_search_cancelled(move || k.leave_keyboard(false)); + ui.set_page_nav_items(ModelRc::new(VecModel::from(SECTIONS.iter().map(|s| SharedString::from(*s)).collect::>()))); + c.message(true, "Kapcsolódás a Spotifyhoz…", ""); + c + } + + pub fn ui(&self) -> Option { + self.ui.upgrade() + } + + pub fn px(&self) -> f32 { + self.ui() + .map(|ui| { + let s = ui.window().size(); + (s.width as f32 / 1920.0).min(s.height as f32 / 1080.0).max(0.5) + }) + .unwrap_or(1.0) + } + + pub fn api(&self) -> Api { + self.state.borrow().api.clone() + } + + pub fn show(&self, screen: &'static str) { + self.state.borrow_mut().screen = screen; + if let Some(ui) = self.ui() { + ui.set_screen(screen.into()); + } + } + + pub fn shutdown(&self) { + CONTROLLER.with(|k| *k.borrow_mut() = None); + self.engine.shutdown(Duration::from_secs(2)); + } + + fn message(&self, busy: bool, title: &str, text: &str) { + if let Some(ui) = self.ui() { + ui.set_message_busy(busy); + ui.set_message_title(title.into()); + ui.set_message_text(text.into()); + } + self.clear_backdrop(); + self.show("message"); + } + + // ---- the engine ---- + + fn on_event(&self, ev: Event) { + match ev { + Event::Status(s) => self.on_status(s), + Event::Pair(p) => self.on_pair(p), + other => nowplaying::on_event(self, other), + } + } + + /// A pairing code: the code and its QR code on the sign-in screen. + fn on_pair(&self, p: Option) { + let Some(ui) = self.ui() else { return }; + match p { + Some(p) => { + ui.set_signin_code(p.code.clone().into()); + ui.set_signin_qr(qr_image(&p.url).unwrap_or_default()); + } + None => { + ui.set_signin_code("".into()); + ui.set_signin_qr(Default::default()); + } + } + } + + fn on_status(&self, s: Status) { + let in_app = !self.state.borrow().stack.is_empty(); + self.state.borrow_mut().status = s.clone(); + match s { + Status::SignIn(name) => { + self.state.borrow_mut().stack.clear(); + if let Some(ui) = self.ui() { + ui.set_signin_device(name.into()); + } + self.clear_backdrop(); + self.glass.set_palette(sf_ui::Palette::from_hex(PALETTE)); + self.show("signin"); + } + Status::Connecting if !in_app => { + let screen = self.state.borrow().screen; + if screen == "signin" { + if let Some(ui) = self.ui() { + ui.set_signin_busy(true); + } + } else { + self.message(true, "Kapcsolódás a Spotifyhoz…", ""); + } + } + Status::Connecting => {} + Status::Ready(_) if in_app => {} + Status::Ready(_) => { + if let Some(ui) = self.ui() { + ui.set_signin_busy(false); + } + self.message(true, "Kapcsolódás a Spotifyhoz…", ""); + let api = self.api(); + let c = self.clone(); + task::spawn( + move || api.me(), + move |r| match r { + Ok(user) => { + if user.product != "premium" && !user.product.is_empty() { + c.toast("A lejátszáshoz Spotify Premium kell.", true); + } + c.show_user(&user); + c.state.borrow_mut().user = user; + c.section_now(0); + } + Err(e) => { + // Browsing may still fail, but playback works: go on. + log::warn!("me: {e:#}"); + c.section_now(0); + } + }, + ); + } + Status::Failed(msg) if in_app => self.toast(&msg, true), + Status::Failed(msg) => { + if let Some(ui) = self.ui() { + ui.set_signin_busy(false); + } + if self.state.borrow().screen == "signin" { + if let Some(ui) = self.ui() { + ui.set_signin_error(msg.into()); + } + } else { + self.message(false, "Nem sikerült csatlakozni", &msg); + } + } + } + } + + /// The user's picture (or initial) in the top right corner. + fn show_user(&self, user: &User) { + let Some(ui) = self.ui() else { return }; + ui.set_page_user_initial(user.name().chars().next().map(|c| c.to_uppercase().to_string()).unwrap_or_default().into()); + ui.set_page_user_image(Default::default()); + let url = api::pick(&user.images, 160); + if !url.is_empty() { + let px = self.px(); + let w = self.ui.clone(); + self.images.load(&url, ((72.0 * px) as u32, (72.0 * px) as u32), move |img| { + if let Some(ui) = w.upgrade() { + ui.set_page_user_image(img); + } + }); + } + } + + /// Settings → Kijelentkezés. + pub fn sign_out(&self) { + self.engine.send(Cmd::SignOut); + } + + // ---- input overlay ---- + + pub fn open_input(&self, req: Input, done: InputDone) { + self.state.borrow_mut().input_done = Some(done); + let Some(ui) = self.ui() else { return }; + ui.invoke_input_reset(); + ui.set_input_title(req.title.into()); + ui.set_input_subtitle(req.subtitle.into()); + ui.set_input_placeholder(req.placeholder.into()); + ui.set_input_submit_label(req.submit.into()); + ui.set_input_min_length(req.min); + ui.set_input_text(req.value.into()); + ui.set_input_error("".into()); + ui.set_input_open(true); + } + + fn input_submitted(&self, text: String) { + let done = self.state.borrow_mut().input_done.take(); + self.close_input(); + if let Some(done) = done { + done(self, text); + } + } + + fn close_input(&self) { + self.state.borrow_mut().input_done = None; + if let Some(ui) = self.ui() { + ui.set_input_open(false); + } + } + + // ---- picker ---- + + pub fn open_select(&self, title: &str, items: Vec<(String, String, bool)>, done: SelectDone) { + let focus = items.iter().position(|i| i.2).unwrap_or(0); + let n = items.len(); + self.state.borrow_mut().select = Some((focus, n, done)); + let Some(ui) = self.ui() else { return }; + let model: Vec = items.into_iter().map(|(l, d, c)| MenuItem { text: l.into(), detail: d.into(), checked: c }).collect(); + ui.set_select_title(title.into()); + ui.set_select_items(ModelRc::new(VecModel::from(model))); + ui.set_select_focus(focus as i32); + ui.set_select_open(true); + } + + fn select_key(&self, a: Action) { + let mut st = self.state.borrow_mut(); + let Some((focus, n, _)) = st.select.as_mut() else { return }; + match a { + Action::Up => *focus = focus.saturating_sub(1), + Action::Down => *focus = (*focus + 1).min(n.saturating_sub(1)), + Action::Ok => { + let (i, _, done) = st.select.take().unwrap(); + drop(st); + if let Some(ui) = self.ui() { + ui.set_select_open(false); + } + done(self, i); + self.run_effects(); + return; + } + Action::Back | Action::Left | Action::Right => { + st.select = None; + drop(st); + if let Some(ui) = self.ui() { + ui.set_select_open(false); + } + return; + } + _ => {} + } + let f = *focus as i32; + drop(st); + if let Some(ui) = self.ui() { + ui.set_select_focus(f); + } + } + + // ---- toast ---- + + pub fn toast(&self, text: &str, bad: bool) { + let Some(ui) = self.ui() else { return }; + ui.set_toast_text(text.into()); + ui.set_toast_bad(bad); + let w = self.ui.clone(); + self.toast_timer.start(slint::TimerMode::SingleShot, Duration::from_millis(if bad { 5000 } else { 2600 }), move || { + if let Some(ui) = w.upgrade() { + ui.set_toast_text("".into()); + } + }); + } + + // ---- backdrop ---- + + /// The backdrop picture `url` (after the focus settles), or the gradient. + /// Its average colour tints the gradient. + pub fn backdrop(&self, url: &str, look: Look, key: &str) { + if *self.backdrop_key.borrow() == key && !key.is_empty() { + return; + } + *self.backdrop_key.borrow_mut() = key.to_string(); + if url.is_empty() { + self.backdrop_timer.stop(); + self.glass.set_backdrop(None); + self.glass.set_palette(sf_ui::Palette::from_hex(PALETTE)); + return; + } + let (c, url, key) = (self.clone(), url.to_string(), key.to_string()); + self.backdrop_timer.start(slint::TimerMode::SingleShot, Duration::from_millis(250), move || { + let px = c.px(); + let size = if look == Look::Soft { ((960.0 * px) as u32, (540.0 * px) as u32) } else { ((1920.0 * px) as u32, (1080.0 * px) as u32) }; + let c2 = c.clone(); + let key2 = key.clone(); + c.images.load_pixels(&url, size, move |pixels| { + if *c2.backdrop_key.borrow() != key2 { + return; + } + let colour = sf_ui::images::average_color(pixels); + c2.glass.set_palette(sf_ui::Palette::from_color(colour)); + let b = sf_ui::Backdrop::new(pixels.clone()); + let b = match look { + Look::Sharp => b.dim(0.3).fade_left(1.0).fade_bottom(0.9).align(0.5, 0.3), + Look::Soft => b.dim(0.55).fade_left(0.5).fade_bottom(0.7).soft(), + }; + c2.glass.set_backdrop(Some(b)); + }); + }); + } + + pub fn clear_backdrop(&self) { + self.backdrop_key.borrow_mut().clear(); + self.backdrop_timer.stop(); + self.glass.set_backdrop(None); + self.glass.set_palette(sf_ui::Palette::from_hex(PALETTE)); + } + + // ---- the screen stack ---- + + /// Runs `f` on screen `id` (if it still exists), then the effects and a + /// rebuild of the top page. + pub fn with(&self, id: u64, f: impl FnOnce(&mut T, &Cx)) { + let taken = { + let mut st = self.state.borrow_mut(); + st.stack.iter_mut().find(|e| e.id == id).and_then(|e| e.screen.take()) + }; + let Some(mut screen) = taken else { return }; + { + let cx = Cx { c: self, id }; + if let Some(s) = screen.as_any().downcast_mut::() { + f(s, &cx); + } + } + { + let mut st = self.state.borrow_mut(); + if let Some(e) = st.stack.iter_mut().find(|e| e.id == id) { + e.screen = Some(screen); + } + } + let top = self.state.borrow().stack.last().map(|e| e.id); + if top == Some(id) { + self.effects.borrow_mut().push(Effect::Refresh); + } + self.run_effects(); + } + + /// Runs a `Screen` method on the top screen. + fn top(&self, f: impl FnOnce(&mut dyn Screen, &Cx) -> R) -> Option { + let (id, taken) = { + let mut st = self.state.borrow_mut(); + let e = st.stack.last_mut()?; + (e.id, e.screen.take()) + }; + let mut screen = taken?; + let r = { + let cx = Cx { c: self, id }; + f(screen.as_mut(), &cx) + }; + { + let mut st = self.state.borrow_mut(); + if let Some(e) = st.stack.iter_mut().find(|e| e.id == id) { + e.screen = Some(screen); + } + } + Some(r) + } + + fn run_effects(&self) { + loop { + let effects: Vec = std::mem::take(&mut *self.effects.borrow_mut()); + if effects.is_empty() { + break; + } + let mut refresh = false; + for e in effects { + match e { + Effect::Push(s) => self.push_now(s), + Effect::Refresh => refresh = true, + Effect::Play(cmd) => { + self.engine.send(cmd); + nowplaying::open(self); + } + } + } + if refresh && self.state.borrow().screen == "page" { + self.rebuild(); + } + } + } + + /// Opens a page from outside a screen (menus, the player). + pub fn push_screen(&self, s: Box) { + if self.state.borrow().stack.is_empty() { + return; + } + self.effects.borrow_mut().push(Effect::Push(s)); + self.run_effects(); + } + + fn push_now(&self, s: Box) { + { + let mut st = self.state.borrow_mut(); + let id = st.next_id; + st.next_id += 1; + st.stack.push(Entry { id, screen: Some(s), view: View::default() }); + } + self.clear_backdrop(); + self.attach(); + self.rebuild(); + self.after_focus(); + } + + fn pop_now(&self) { + { + let mut st = self.state.borrow_mut(); + if st.stack.len() > 1 { + st.stack.pop(); + } + } + self.clear_backdrop(); + self.attach(); + self.top(|s, cx| s.shown(cx)); + self.rebuild(); + self.after_focus(); + } + + /// Replaces the stack with a section's screen. + pub fn section_now(&self, n: usize) { + let keep_nav = self.state.borrow().stack.last().is_some_and(|e| e.view.focus == Focus::Nav); + self.state.borrow_mut().stack.clear(); + self.state.borrow_mut().np_capsule = false; + let screen = screens::section(n); + { + let mut st = self.state.borrow_mut(); + let id = st.next_id; + st.next_id += 1; + let mut view = View::default(); + view.nav_index = n; + if keep_nav { + view.focus = Focus::Nav; + } + st.stack.push(Entry { id, screen: Some(screen), view }); + } + self.clear_backdrop(); + self.attach(); + self.rebuild(); + self.after_focus(); + } + + /// Points Slint at the top view's model and shows the page. + fn attach(&self) { + let model = self.state.borrow().stack.last().map(|e| e.view.model()); + if let (Some(ui), Some(m)) = (self.ui(), model) { + ui.set_page_lines(m); + } + self.show("page"); + } + + /// Rebuilds the top page from its screen. + pub fn rebuild(&self) { + let spec = self.top(|s, cx| s.spec(cx)); + let Some(spec) = spec else { return }; + let px = self.px(); + { + let mut st = self.state.borrow_mut(); + if let Some(e) = st.stack.last_mut() { + e.view.set(spec, &self.images, px); + } + } + self.sync(); + } + + /// The playing track changed: pages that mark it rebuild. + pub fn track_changed(&self) { + if self.state.borrow().stack.is_empty() { + return; + } + self.top(|s, cx| s.track_changed(cx)); + if self.state.borrow().screen == "page" { + self.rebuild(); + } else { + self.sync_nav(); + } + } + + /// Focus, scroll and frame to Slint; pictures around the focus. + fn sync(&self) { + let Some(ui) = self.ui() else { return }; + let px = self.px(); + self.sync_nav(); + let mut st = self.state.borrow_mut(); + let Some(e) = st.stack.last_mut() else { return }; + let v = &mut e.view; + v.sync_cols(); + ui.set_page_focus(if v.focus == Focus::Line { v.line as i32 } else { -1 }); + ui.set_page_scroll(v.scroll); + ui.set_page_show_nav(v.frame.nav.is_some()); + ui.set_page_nav_index(v.frame.nav.unwrap_or(0) as i32); + let kb_line = v.lines.iter().position(|l| l.kind == Kind::Keyboard); + match (kb_line, &v.frame.keyboard) { + (Some(i), Some(ph)) => { + ui.set_page_kb_y(v.line_y(i)); + ui.set_page_kb_placeholder(ph.clone().into()); + ui.set_page_kb_focused(v.focus == Focus::Line && v.line == i); + } + _ => { + ui.set_page_kb_y(-1.0); + ui.set_page_kb_focused(false); + } + } + v.load_images(&self.images, px); + } + + /// The nav focus and the "now playing" capsule. + fn sync_nav(&self) { + let Some(ui) = self.ui() else { return }; + let st = self.state.borrow(); + let nav_focus = st.stack.last().is_some_and(|e| e.view.focus == Focus::Nav); + ui.set_page_nav_focused(nav_focus && !st.np_capsule); + ui.set_page_np_focused(nav_focus && st.np_capsule); + match &st.np.track { + Some(t) => { + ui.set_page_np_title(t.name.clone().into()); + ui.set_page_np_artist(t.artist_names().into()); + ui.set_page_np_playing(st.np.playing); + } + None => { + ui.set_page_np_title("".into()); + ui.set_page_np_artist("".into()); + } + } + } + + fn after_focus(&self) { + let target = { + let st = self.state.borrow(); + st.stack.last().map(|e| (e.view.target(), e.view.near_end(), e.view.focus.clone())) + }; + let Some(((line, item), near, focus)) = target else { return }; + if focus == Focus::Line { + self.top(|s, cx| s.focus(cx, &line, &item)); + if let Some(list) = near { + self.top(|s, cx| s.more(cx, &list)); + } + } + self.run_effects(); + } + + /// Back from the now playing screen. + pub fn back_to_pages(&self) { + if self.state.borrow().stack.is_empty() { + return; + } + self.clear_backdrop(); + self.attach(); + self.top(|s, cx| s.shown(cx)); + self.rebuild(); + self.after_focus(); + } + + // ---- keys ---- + + fn key(&self, a: Action, repeat: bool) { + if self.state.borrow().select.is_some() { + return self.select_key(a); + } + let screen = self.state.borrow().screen; + match screen { + "message" | "signin" => { + if a == Action::Back { + let _ = slint::quit_event_loop(); + } + } + "nowplaying" => nowplaying::key(self, a, repeat), + _ => self.page_key(a), + } + } + + fn page_key(&self, a: Action) { + enum Then { + Moved, + Activate(String, String), + Back, + Section(usize), + NowPlaying, + Nothing, + Quit, + } + if a == Action::PlayPause { + if self.state.borrow().np.track.is_some() { + self.engine.send(Cmd::PlayPause); + } + return; + } + let has_track = self.state.borrow().np.track.is_some(); + let then = { + let mut st = self.state.borrow_mut(); + let capsule = st.np_capsule; + let Some(e) = st.stack.last_mut() else { return }; + let v = &mut e.view; + let has_nav = v.frame.nav.is_some(); + let nav = v.frame.nav.unwrap_or(0); + let mut capsule_to: Option = None; + let then = match v.focus { + Focus::Nav if capsule => match a { + Action::Left => { + capsule_to = Some(false); + Then::Moved + } + Action::Ok | Action::Down => Then::NowPlaying, + Action::Back => { + capsule_to = Some(false); + Then::Section(0) + } + _ => Then::Nothing, + }, + Focus::Nav => match a { + Action::Left if nav > 0 => Then::Section(nav - 1), + Action::Right if nav + 1 < SECTIONS.len() => Then::Section(nav + 1), + Action::Right if has_track => { + capsule_to = Some(true); + Then::Moved + } + Action::Down | Action::Ok => { + if v.lines.iter().any(|l| matches!(l.kind, Kind::Chips | Kind::Cards | Kind::Item | Kind::Hero | Kind::Keyboard | Kind::Track)) { + v.focus = Focus::Line; + v.clamp_scroll(); + Then::Moved + } else { + Then::Nothing + } + } + Action::Back if nav != 0 => Then::Section(0), + Action::Back => Then::Quit, + _ => Then::Nothing, + }, + Focus::Side => Then::Nothing, + Focus::Line => match a { + Action::Up => { + if !v.vertical(false) && has_nav { + v.focus = Focus::Nav; + v.scroll = 0.0; + } + Then::Moved + } + Action::Down => { + v.vertical(true); + Then::Moved + } + Action::Left => { + v.horizontal(false); + Then::Moved + } + Action::Right => { + v.horizontal(true); + Then::Moved + } + Action::Ok => { + let (l, i) = v.target(); + Then::Activate(l, i) + } + Action::Back => Then::Back, + Action::PlayPause => Then::Nothing, + }, + }; + if let Some(cap) = capsule_to { + st.np_capsule = cap; + } + then + }; + match then { + Then::Nothing => {} + Then::Quit => { + let _ = slint::quit_event_loop(); + } + Then::Moved => { + self.sync(); + self.after_focus(); + } + Then::Section(n) => self.section_now(n), + Then::NowPlaying => nowplaying::open(self), + Then::Activate(l, i) => { + self.top(|s, cx| s.activate(cx, &l, &i)); + self.effects.borrow_mut().push(Effect::Refresh); + self.run_effects(); + self.after_focus(); + } + Then::Back => { + let handled = self.top(|s, cx| s.back(cx)).unwrap_or(false); + if handled { + self.effects.borrow_mut().push(Effect::Refresh); + self.run_effects(); + return; + } + let depth = self.state.borrow().stack.len(); + if depth > 1 { + self.pop_now(); + } else { + { + let mut st = self.state.borrow_mut(); + if let Some(e) = st.stack.last_mut() { + if e.view.frame.nav.is_some() { + e.view.focus = Focus::Nav; + e.view.scroll = 0.0; + } + } + } + self.sync(); + } + } + } + } + + // ---- search keyboard ---- + + fn search(&self, text: String, submit: bool) { + if submit { + self.search_timer.stop(); + self.top(|s, cx| s.query(cx, &text, true)); + self.run_effects(); + return; + } + let c = self.clone(); + self.search_timer.start(slint::TimerMode::SingleShot, Duration::from_millis(450), move || { + c.top(|s, cx| s.query(cx, &text, false)); + c.run_effects(); + }); + } + + fn leave_keyboard(&self, down: bool) { + { + let mut st = self.state.borrow_mut(); + let Some(e) = st.stack.last_mut() else { return }; + let v = &mut e.view; + if !v.vertical(down) && !down && v.frame.nav.is_some() { + v.focus = Focus::Nav; + } + } + self.sync(); + self.after_focus(); + } +} diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..068227d --- /dev/null +++ b/src/config.rs @@ -0,0 +1,123 @@ +//! What this TV remembers: its Connect identity and the playback settings. +//! `$HOME/.config/spotify-tv/config.toml` (on the TV, $HOME is the app's own +//! data folder inside the sandbox). The Spotify credentials live apart, in +//! `$HOME/.cache/spotify-tv/credentials.json` (librespot's cache). + +use std::path::PathBuf; + +use serde::{Deserialize, Serialize}; + +pub const DEFAULT_NAME: &str = "Fennec TV"; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Config { + /// Spotify Connect device id (stays the same, so phones remember the TV). + #[serde(default)] + pub device_id: String, + /// The name phones show. + #[serde(default = "default_name")] + pub device_name: String, + /// 96 | 160 | 320 kbit/s. + #[serde(default = "default_bitrate")] + pub bitrate: u32, + /// Same loudness for every track. + #[serde(default = "yes")] + pub normalise: bool, + /// Similar tracks after the end of an album or playlist. + #[serde(default = "yes")] + pub autoplay: bool, + /// "auto" | "full" | "light" | "off" (Material) + #[serde(default = "auto")] + pub glass: String, +} + +fn default_name() -> String { + DEFAULT_NAME.into() +} +fn default_bitrate() -> u32 { + 320 +} +fn yes() -> bool { + true +} +fn auto() -> String { + "auto".into() +} + +impl Default for Config { + fn default() -> Self { + Config { device_id: String::new(), device_name: default_name(), bitrate: default_bitrate(), normalise: true, autoplay: true, glass: auto() } + } +} + +pub fn home() -> PathBuf { + std::env::var_os("HOME").or_else(|| std::env::var_os("APPDATA")).map(PathBuf::from).unwrap_or_else(|| PathBuf::from(".")) +} + +fn path() -> PathBuf { + home().join(".config").join("spotify-tv").join("config.toml") +} + +/// 40 hex digits, random enough for a device id. +fn new_device_id() -> String { + use std::collections::hash_map::RandomState; + use std::hash::{BuildHasher, Hasher}; + let mut out = String::new(); + while out.len() < 40 { + let mut h = RandomState::new().build_hasher(); + h.write_u128(std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map(|d| d.as_nanos()).unwrap_or(0)); + h.write_u32(std::process::id()); + out.push_str(&format!("{:016x}", h.finish())); + } + out.truncate(40); + out +} + +impl Config { + pub fn load() -> Config { + let mut c: Config = std::fs::read_to_string(path()).ok().and_then(|t| toml::from_str(&t).ok()).unwrap_or_default(); + if c.device_id.len() != 40 || !c.device_id.chars().all(|ch| ch.is_ascii_hexdigit()) { + c.device_id = new_device_id(); + c.save(); + } + if c.device_name.trim().is_empty() { + c.device_name = default_name(); + } + c + } + + pub fn save(&self) { + let p = path(); + let result = (|| -> anyhow::Result<()> { + std::fs::create_dir_all(p.parent().unwrap())?; + let tmp = p.with_extension("tmp"); + std::fs::write(&tmp, toml::to_string(self)?)?; + std::fs::rename(&tmp, &p)?; + Ok(()) + })(); + if let Err(e) = result { + log::warn!("saving {}: {e:#}", p.display()); + } + } +} + +/// Applies the glass look. "auto": sf-ui measures the GPU and picks full, +/// light or the matte Material style; "off" (shown as "Matt") is Material. +pub fn apply_look(glass: &sf_ui::Glass, look: &str) { + match look { + "full" => glass.set_quality(sf_ui::Quality::Full), + "light" => glass.set_quality(sf_ui::Quality::Light), + "off" => glass.set_quality(sf_ui::Quality::Material), + _ => glass.set_auto_quality(), + } +} + +#[cfg(test)] +mod tests { + #[test] + fn device_ids_are_hex() { + let id = super::new_device_id(); + assert_eq!(id.len(), 40); + assert!(id.chars().all(|c| c.is_ascii_hexdigit())); + } +} diff --git a/src/format.rs b/src/format.rs new file mode 100644 index 0000000..71a4fcc --- /dev/null +++ b/src/format.rs @@ -0,0 +1,104 @@ +//! Hungarian texts: times, counts, dates. + +/// 214000 -> "3:34", 3725000 -> "1:02:05". +pub fn clock(ms: u32) -> String { + let s = ms / 1000; + let (h, m, s) = (s / 3600, (s / 60) % 60, s % 60); + if h > 0 { format!("{h}:{m:02}:{s:02}") } else { format!("{m}:{s:02}") } +} + +/// A list's length: "1 óra 12 perc", "48 perc". +pub fn total(ms: u64) -> String { + let min = (ms / 60_000) as u32; + match (min / 60, min % 60) { + (0, m) => format!("{m} perc"), + (h, 0) => format!("{h} óra"), + (h, m) => format!("{h} óra {m} perc"), + } +} + +/// 1234567 -> "1 234 567". +pub fn thousands(n: u32) -> String { + let s = n.to_string(); + let mut out = String::new(); + for (i, ch) in s.chars().enumerate() { + if i > 0 && (s.len() - i) % 3 == 0 { + out.push('\u{a0}'); + } + out.push(ch); + } + out +} + +/// Followers: "12 345 követő", "1,2 millió követő". +pub fn followers(n: u32) -> String { + if n >= 1_000_000 { + let m = n as f64 / 1_000_000.0; + let t = if m >= 100.0 { format!("{m:.0}") } else { format!("{m:.1}").replace('.', ",") }; + format!("{} millió követő", t.trim_end_matches(",0")) + } else { + format!("{} követő", thousands(n)) + } +} + +/// "2023-05-12" -> "2023". +pub fn year(date: &str) -> String { + date.split('-').next().unwrap_or("").to_string() +} + +/// "2023-05-12" -> "2023. máj. 12." +pub fn date(d: &str) -> String { + const MONTHS: [&str; 12] = ["jan.", "febr.", "márc.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."]; + let p: Vec<&str> = d.split('-').collect(); + match p.as_slice() { + [y, m, day] => match m.parse::().ok().and_then(|m| MONTHS.get(m.wrapping_sub(1))) { + Some(mn) => format!("{y}. {mn} {}.", day.trim_start_matches('0')), + None => d.to_string(), + }, + [y, ..] => y.to_string(), + _ => d.to_string(), + } +} + +/// Album types as Spotify's Hungarian UI calls them. +pub fn album_type(t: &str) -> &'static str { + match t { + "single" => "Kislemez", + "compilation" => "Válogatás", + "ep" => "EP", + _ => "Album", + } +} + +/// Strips the HTML Spotify puts into playlist descriptions. +pub fn plain(html: &str) -> String { + let mut out = String::new(); + let mut tag = false; + for ch in html.chars() { + match ch { + '<' => tag = true, + '>' => tag = false, + c if !tag => out.push(c), + _ => {} + } + } + out.replace("&", "&").replace("'", "'").replace(""", "\"").replace("<", "<").replace(">", ">").replace("'", "'") +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn formats() { + assert_eq!(clock(214_000), "3:34"); + assert_eq!(clock(3_725_000), "1:02:05"); + assert_eq!(total(4_320_000), "1 óra 12 perc"); + assert_eq!(total(2_880_000), "48 perc"); + assert_eq!(thousands(1234567), "1\u{a0}234\u{a0}567"); + assert_eq!(followers(1_200_000), "1,2 millió követő"); + assert_eq!(followers(2_000_000), "2 millió követő"); + assert_eq!(date("2023-05-02"), "2023. máj. 2."); + assert_eq!(plain("Hits here & more"), "Hits here & more"); + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..0a0c3b8 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,58 @@ +//! Spotify for Fennec OS: a native TV client. +//! +//! - UI: Slint (ui/*.slint) on sf-ui's Liquid Glass layer; the page engine +//! and controller come from Netflex TV. +//! - Spotify: librespot (src/spotify.rs) for the session, Spotify Connect, +//! the zeroconf sign-in and playback; the Web API (src/api.rs) for +//! browsing. + +mod api; +mod app; +mod config; +mod format; +mod nowplaying; +mod page; +mod screens; +mod spotify; +mod task; + +use slint::{ComponentHandle, Model}; + +slint::include_modules!(); +sf_ui::glue!(App); + +fn main() -> anyhow::Result<()> { + env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info,librespot=info,libmdns=warn")).init(); + sf_ui::init()?; + + let ui = App::new()?; + ui.sf_ui_setup(); + if std::env::var_os("SF_UI_SIZE").is_none() && std::env::var_os("SPOTIFY_WINDOWED").is_none() { + ui.window().set_fullscreen(true); + } + // Development: where the window opens ("x,y", physical px), e.g. on a + // second monitor. + if let Some((x, y)) = std::env::var("SPOTIFY_WINDOW_POS").ok().and_then(|v| v.split_once(',').and_then(|(x, y)| Some((x.trim().parse().ok()?, y.trim().parse().ok()?)))) { + ui.window().set_position(slint::PhysicalPosition::new(x, y)); + } + + let glass = sf_ui::Glass::install(&ui, |ui, p| { + p.extend(ui.get_glass_signin().iter()); + p.extend(ui.get_glass_page().iter()); + p.extend(ui.get_glass_page_keyboard().iter()); + p.extend(ui.get_glass_np().iter()); + p.extend(ui.get_glass_input().iter()); + p.extend(ui.get_glass_input_keyboard().iter()); + p.extend(ui.get_glass_select().iter()); + p.extend(ui.get_glass_toast().iter()); + })?; + glass.set_palette(sf_ui::Palette::from_hex(app::PALETTE)); + + let images = sf_ui::images::Images::new(256 << 20); + let app = app::Controller::new(&ui, glass, images); + + ui.run()?; + app.shutdown(); + // Background threads (image loader, audio, network) need no goodbye. + std::process::exit(0) +} diff --git a/src/nowplaying.rs b/src/nowplaying.rs new file mode 100644 index 0000000..41562f1 --- /dev/null +++ b/src/nowplaying.rs @@ -0,0 +1,524 @@ +//! Most szól: the big cover, the title, the progress, the controls (shuffle, +//! previous, play/pause, next, repeat, like, lyrics, queue), synced lyrics +//! and the queue. Also keeps the playback state that the engine reports +//! (pages show it in the "now playing" capsule of the nav). +//! +//! Keys: left/right between the buttons, OK presses one, up goes to the +//! progress bar (left/right seek there), Back returns to the pages. Space +//! (play/pause on a keyboard) works everywhere. + +use std::rc::Rc; +use std::time::{Duration, Instant}; + +use slint::{Model, ModelRc, VecModel}; + +use crate::api; +use crate::app::{Action, Controller, Look}; +use crate::spotify::{Cmd, Event, Track}; +use crate::{QueueItem, format, task}; + +/// The buttons, left to right. +const BUTTONS: [&str; 8] = ["shuffle", "prev", "play", "next", "repeat", "like", "lyrics", "queue"]; +const PLAY: usize = 2; + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum Panel { + #[default] + None, + Lyrics, + Queue, +} + +#[derive(Default)] +pub struct NowPlaying { + pub track: Option, + pub playing: bool, + pub loading: bool, + pos_ms: u32, + since: Option, + pub shuffle: bool, + pub repeat: (bool, bool), + liked: Option, + /// (track id, lines, synced); empty lines = none. + lyrics: Option<(String, Vec<(u32, String)>, bool)>, + lyrics_loading: bool, + queue: Vec, + panel: Panel, + focus: usize, + /// 0: the buttons, 1: the progress bar. + area: u8, + /// Another device that plays now (its name). + elsewhere: String, +} + +impl NowPlaying { + pub fn position(&self) -> u32 { + let p = match (self.playing, self.since) { + (true, Some(at)) => self.pos_ms + at.elapsed().as_millis() as u32, + _ => self.pos_ms, + }; + match &self.track { + Some(t) if t.duration_ms > 0 => p.min(t.duration_ms), + _ => p, + } + } + fn set_pos(&mut self, ms: u32) { + self.pos_ms = ms; + self.since = Some(Instant::now()); + } +} + +pub fn on_event(c: &Controller, ev: Event) { + let mut new_track = false; + { + let mut st = c.state.borrow_mut(); + let np = &mut st.np; + match ev { + Event::Track(t) => { + new_track = np.track.as_ref().map(|o| &o.uri) != Some(&t.uri); + if new_track { + np.liked = None; + np.set_pos(0); + } + np.track = Some(t); + np.elsewhere.clear(); + } + Event::Loading => np.loading = true, + Event::Playing(p) => { + np.playing = true; + np.loading = false; + np.elsewhere.clear(); + np.set_pos(p); + } + Event::Paused(p) => { + np.playing = false; + np.loading = false; + np.set_pos(p); + } + Event::Seeked(p) => np.set_pos(p), + Event::Stopped => { + let p = np.position(); + np.playing = false; + np.loading = false; + np.set_pos(p); + } + Event::Unavailable => { + drop(st); + c.toast("Ez a szám most nem játszható le.", true); + return; + } + Event::Shuffle(on) => np.shuffle = on, + Event::Repeat(ctx, track) => np.repeat = (ctx, track), + Event::Active(true) => { + let open = st.screen == "page" && st.np.track.is_some(); + drop(st); + if open { + self::open(c); + } + return; + } + Event::Active(false) => { + let p = np.position(); + np.playing = false; + np.set_pos(p); + } + Event::Client(name) => { + if !name.is_empty() { + np.elsewhere = name; + } + } + Event::Status(_) | Event::Pair(_) => {} + } + } + if new_track { + track_changed(c); + } + sync(c); + c.track_changed(); +} + +/// A new track: its cover behind the screen, its like state, lyrics, queue. +fn track_changed(c: &Controller) { + let (track, panel) = { + let st = c.state.borrow(); + (st.np.track.clone(), st.np.panel) + }; + let Some(t) = track else { return }; + if c.state.borrow().screen == "nowplaying" { + c.backdrop(&t.cover, Look::Soft, &format!("np:{}", t.uri)); + } + load_cover(c, &t); + if !t.episode && !t.id.is_empty() { + let api = c.api(); + let c2 = c.clone(); + let id = t.id.clone(); + task::spawn( + move || api.liked_contains(std::slice::from_ref(&id)).map(|v| v.first().copied().unwrap_or(false)), + move |r| { + if let Ok(liked) = r { + let mut st = c2.state.borrow_mut(); + if st.np.track.as_ref().is_some_and(|x| x.id == t.id) { + st.np.liked = Some(liked); + } + drop(st); + sync(&c2); + } + }, + ); + } + match panel { + Panel::Lyrics => load_lyrics(c), + Panel::Queue => load_queue(c), + Panel::None => {} + } +} + +fn load_cover(c: &Controller, t: &Track) { + let Some(ui) = c.ui() else { return }; + ui.set_np_cover(Default::default()); + if t.cover.is_empty() { + return; + } + let px = c.px(); + let w = c.ui.clone(); + let uri = t.uri.clone(); + let c2 = c.clone(); + c.images.load(&t.cover, ((600.0 * px) as u32, (600.0 * px) as u32), move |img| { + if c2.state.borrow().np.track.as_ref().is_some_and(|x| x.uri == uri) { + if let Some(ui) = w.upgrade() { + ui.set_np_cover(img); + } + } + }); +} + +fn load_lyrics(c: &Controller) { + let id = { + let mut st = c.state.borrow_mut(); + let Some(t) = st.np.track.clone() else { return }; + if t.episode || st.np.lyrics.as_ref().is_some_and(|l| l.0 == t.id) || st.np.lyrics_loading { + return; + } + st.np.lyrics_loading = true; + t.id + }; + sync(c); + let engine = c.engine.clone(); + let c2 = c.clone(); + let id2 = id.clone(); + task::spawn( + move || engine.lyrics(&id2), + move |r| { + { + let mut st = c2.state.borrow_mut(); + st.np.lyrics_loading = false; + let (lines, synced) = r.unwrap_or_else(|e| { + log::info!("lyrics: {e:#}"); + (Vec::new(), false) + }); + st.np.lyrics = Some((id, lines, synced)); + } + // The track may have changed meanwhile. + let again = { + let st = c2.state.borrow(); + st.np.panel == Panel::Lyrics && st.np.track.as_ref().is_some_and(|t| st.np.lyrics.as_ref().is_none_or(|l| l.0 != t.id)) + }; + if again { + load_lyrics(&c2); + } + sync(&c2); + }, + ); +} + +fn load_queue(c: &Controller) { + let api = c.api(); + let c2 = c.clone(); + task::spawn( + move || api.queue(), + move |r| { + match r { + Ok(q) => c2.state.borrow_mut().np.queue = q, + Err(e) => log::info!("queue: {e:#}"), + } + sync_queue(&c2); + }, + ); +} + +fn sync_queue(c: &Controller) { + let Some(ui) = c.ui() else { return }; + let queue = c.state.borrow().np.queue.clone(); + let model = Rc::new(VecModel::from( + queue + .iter() + .take(30) + .map(|t| QueueItem { title: t.name.clone().into(), artist: t.artist_names().into(), image: Default::default() }) + .collect::>(), + )); + ui.set_np_queue(ModelRc::from(model.clone())); + let px = c.px(); + for (i, t) in queue.iter().take(12).enumerate() { + let url = t.image(64); + if url.is_empty() { + continue; + } + let m = model.clone(); + c.images.load(&url, ((64.0 * px) as u32, (64.0 * px) as u32), move |img| { + if let Some(mut row) = m.row_data(i) { + row.image = img; + m.set_row_data(i, row); + } + }); + } +} + +/// Shows the screen. +pub fn open(c: &Controller) { + { + let mut st = c.state.borrow_mut(); + if st.screen == "nowplaying" { + return; + } + st.np.area = 0; + st.np.focus = PLAY; + } + let track = c.state.borrow().np.track.clone(); + match &track { + Some(t) => c.backdrop(&t.cover, Look::Soft, &format!("np:{}", t.uri)), + None => c.clear_backdrop(), + } + c.show("nowplaying"); + sync(c); + let panel = c.state.borrow().np.panel; + match panel { + Panel::Lyrics => load_lyrics(c), + Panel::Queue => load_queue(c), + Panel::None => {} + } + let k = c.clone(); + c.np_timer.start(slint::TimerMode::Repeated, Duration::from_millis(250), move || { + if k.state.borrow().screen == "nowplaying" { + sync_time(&k); + } else { + k.np_timer.stop(); + } + }); +} + +fn close(c: &Controller) { + c.np_timer.stop(); + c.back_to_pages(); +} + +pub fn key(c: &Controller, a: Action, repeat: bool) { + enum Then { + Sync, + Press(usize), + Seek(i64), + Close, + Toggle, + Nothing, + } + let then = { + let mut st = c.state.borrow_mut(); + let np = &mut st.np; + match (np.area, a) { + (_, Action::PlayPause) => Then::Toggle, + (_, Action::Back) if np.area == 1 => { + np.area = 0; + Then::Sync + } + (_, Action::Back) => Then::Close, + (0, Action::Left) => { + np.focus = np.focus.saturating_sub(1); + Then::Sync + } + (0, Action::Right) => { + np.focus = (np.focus + 1).min(BUTTONS.len() - 1); + Then::Sync + } + (0, Action::Up) if np.track.as_ref().is_some_and(|t| t.duration_ms > 0) => { + np.area = 1; + Then::Sync + } + (0, Action::Ok) => Then::Press(np.focus), + (1, Action::Left) => Then::Seek(if repeat { -30_000 } else { -10_000 }), + (1, Action::Right) => Then::Seek(if repeat { 30_000 } else { 10_000 }), + (1, Action::Down) | (1, Action::Ok) => { + np.area = 0; + Then::Sync + } + _ => Then::Nothing, + } + }; + match then { + Then::Nothing => {} + Then::Sync => sync(c), + Then::Close => close(c), + Then::Toggle => c.engine.send(Cmd::PlayPause), + Then::Seek(d) => { + let target = { + let mut st = c.state.borrow_mut(); + let dur = st.np.track.as_ref().map(|t| t.duration_ms).unwrap_or(0); + let t = (st.np.position() as i64 + d).clamp(0, dur.saturating_sub(1000) as i64) as u32; + st.np.set_pos(t); + t + }; + c.engine.send(Cmd::Seek(target)); + sync_time(c); + } + Then::Press(i) => press(c, BUTTONS[i]), + } +} + +fn press(c: &Controller, button: &str) { + let (shuffle, repeat, liked, track, panel) = { + let st = c.state.borrow(); + (st.np.shuffle, st.np.repeat, st.np.liked, st.np.track.clone(), st.np.panel) + }; + match button { + "play" => c.engine.send(if c.state.borrow().np.playing { Cmd::Pause } else { Cmd::Play }), + "prev" => c.engine.send(Cmd::Prev), + "next" => c.engine.send(Cmd::Next), + "shuffle" => { + c.state.borrow_mut().np.shuffle = !shuffle; + c.engine.send(Cmd::Shuffle(!shuffle)); + c.toast(if shuffle { "Keverés kikapcsolva" } else { "Keverés bekapcsolva" }, false); + } + "repeat" => { + // off -> the list -> this track -> off + let next = match repeat { + (false, false) => (true, false), + (true, false) => (true, true), + _ => (false, false), + }; + c.state.borrow_mut().np.repeat = next; + c.engine.send(Cmd::Repeat(next.0, next.1)); + c.toast( + match next { + (true, false) => "Ismétlés: a lista", + (true, true) => "Ismétlés: ez a szám", + _ => "Ismétlés kikapcsolva", + }, + false, + ); + } + "like" => { + let Some(t) = track.filter(|t| !t.episode && !t.id.is_empty()) else { return }; + let on = !liked.unwrap_or(false); + let api = c.api(); + let c2 = c.clone(); + let id = t.id.clone(); + task::spawn( + move || api.set_liked(&id, on), + move |r| match r { + Ok(()) => { + c2.state.borrow_mut().np.liked = Some(on); + c2.toast(if on { "Hozzáadva a Kedvelt dalokhoz" } else { "Eltávolítva a Kedvelt dalok közül" }, false); + sync(&c2); + } + Err(e) => c2.toast(&api::describe(&e), true), + }, + ); + } + "lyrics" => { + let next = if panel == Panel::Lyrics { Panel::None } else { Panel::Lyrics }; + c.state.borrow_mut().np.panel = next; + if next == Panel::Lyrics { + load_lyrics(c); + } + } + "queue" => { + let next = if panel == Panel::Queue { Panel::None } else { Panel::Queue }; + c.state.borrow_mut().np.panel = next; + if next == Panel::Queue { + load_queue(c); + } + } + _ => {} + } + sync(c); +} + +/// Everything but the time to Slint. +pub fn sync(c: &Controller) { + let Some(ui) = c.ui() else { return }; + { + let st = c.state.borrow(); + let np = &st.np; + match &np.track { + Some(t) => { + ui.set_np_title(t.name.clone().into()); + ui.set_np_artist(t.artist_names().into()); + ui.set_np_album(if t.episode { "Podcast".into() } else { t.album.clone().into() }); + ui.set_np_explicit(t.explicit); + ui.set_np_episode(t.episode); + } + None => { + ui.set_np_title("Most nem szól semmi".into()); + ui.set_np_artist("Indíts el egy számot, vagy válaszd ki ezt a TV-t a telefonod Spotify appjában.".into()); + ui.set_np_album("".into()); + } + } + ui.set_np_playing(np.playing); + ui.set_np_loading(np.loading); + ui.set_np_shuffle(np.shuffle); + ui.set_np_repeat(match np.repeat { + (_, true) => 2, + (true, false) => 1, + _ => 0, + }); + ui.set_np_liked(match np.liked { + Some(true) => 1, + Some(false) => 0, + None => -1, + }); + ui.set_np_focus(np.focus as i32); + ui.set_np_area(np.area as i32); + ui.set_np_panel(match np.panel { + Panel::None => 0, + Panel::Lyrics => 1, + Panel::Queue => 2, + }); + let device = if !np.elsewhere.is_empty() && !np.playing { format!("Irányítja: {}", np.elsewhere) } else { format!("Lejátszás itt: {}", st.cfg.device_name) }; + ui.set_np_device(device.into()); + // Lyrics. + let (lines, note) = match (&np.lyrics, &np.track) { + (_, Some(t)) if t.episode => (Vec::new(), "Podcastokhoz nincs dalszöveg."), + (Some((id, lines, _)), Some(t)) if *id == t.id && !lines.is_empty() => (lines.iter().map(|l| l.1.clone().into()).collect(), ""), + (Some((id, _, _)), Some(t)) if *id == t.id => (Vec::new(), "Ehhez a számhoz nincs dalszöveg."), + _ if np.lyrics_loading => (Vec::new(), "Dalszöveg betöltése…"), + _ => (Vec::new(), ""), + }; + let n = lines.len(); + if ui.get_np_lyrics().row_count() != n || n == 0 { + ui.set_np_lyrics(ModelRc::new(VecModel::from(lines))); + } + ui.set_np_lyrics_note(note.into()); + if np.panel == Panel::Queue && np.queue.is_empty() { + ui.set_np_queue_note("A lejátszási sor üres.".into()); + } else { + ui.set_np_queue_note("".into()); + } + } + sync_time(c); +} + +/// The progress and the current lyrics line. +fn sync_time(c: &Controller) { + let Some(ui) = c.ui() else { return }; + let st = c.state.borrow(); + let np = &st.np; + let pos = np.position(); + let dur = np.track.as_ref().map(|t| t.duration_ms).unwrap_or(0); + ui.set_np_progress(if dur > 0 { pos as f32 / dur as f32 } else { 0.0 }); + ui.set_np_time(format::clock(pos).into()); + ui.set_np_duration(if dur > 0 { format::clock(dur).into() } else { "".into() }); + let line = match (&np.lyrics, &np.track) { + (Some((id, lines, true)), Some(t)) if *id == t.id => lines.iter().rposition(|l| l.0 <= pos + 300).map(|i| i as i32).unwrap_or(-1), + _ => -1, + }; + ui.set_np_lyric_line(line); + ui.set_np_lyrics_synced(matches!(&np.lyrics, Some((_, _, true)))); +} diff --git a/src/page.rs b/src/page.rs new file mode 100644 index 0000000..708c897 --- /dev/null +++ b/src/page.rs @@ -0,0 +1,1020 @@ +//! The page engine (from Netflex TV). Every browsing screen describes itself +//! as a list of lines (`L`): hero, headings, texts, notices, chip rows, card +//! rows, list items, track rows, checks. This module lays them out on the 1920x1080 grid, owns the +//! focus and the scroll position, loads the pictures that are about to show, +//! and hands the result to ui/page.slint. +//! +//! Navigation is generic: up/down between focusable lines (and between the +//! rows of a wrapped chip line), left/right inside a line, the top nav above +//! the first line, the settings side list left of the content. + +// The engine is shared with Netflex TV; not every kind of line is used here. +#![allow(dead_code)] + +use std::collections::{HashMap, HashSet}; +use std::rc::Rc; + +use slint::{Model, ModelRc, VecModel}; + +use crate::{Card, Check, Chip, Line}; + +/// Width of the content on a page without the side list (design px). +pub const CONTENT_W: f32 = 1728.0; +pub const SIDE_W: f32 = 1224.0; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Kind { + Hero, + Heading, + Text, + Notice, + Chips, + Cards, + Item, + Checks, + Keyboard, + /// A track row: the whole row is one chip, plus a small "more" chip. + Track, +} + +impl Kind { + fn name(self) -> &'static str { + match self { + Kind::Hero => "hero", + Kind::Heading => "heading", + Kind::Text => "text", + Kind::Notice => "notice", + Kind::Chips => "chips", + Kind::Cards => "cards", + Kind::Item => "item", + Kind::Checks => "checks", + Kind::Keyboard => "keyboard", + Kind::Track => "track", + } + } +} + +/// A chip (button, choice, text field). +#[derive(Debug, Clone, Default)] +pub struct Ch { + pub id: String, + pub text: String, + pub icon: String, + pub active: bool, + pub tone: &'static str, + pub enabled: bool, + /// Fixed width (design px); else from the text. + pub w: Option, +} + +impl Ch { + pub fn new(id: impl Into, text: impl Into) -> Ch { + Ch { id: id.into(), text: text.into(), enabled: true, ..Ch::default() } + } + pub fn icon(mut self, icon: &str) -> Ch { + self.icon = icon.into(); + self + } + pub fn active(mut self, on: bool) -> Ch { + self.active = on; + self + } + pub fn tone(mut self, tone: &'static str) -> Ch { + self.tone = tone; + self + } + pub fn enabled(mut self, on: bool) -> Ch { + self.enabled = on; + self + } + pub fn width(mut self, w: f32) -> Ch { + self.w = Some(w); + self + } + /// A text field: shows `value` (or the placeholder), opens the keyboard. + pub fn field(id: impl Into, value: &str, placeholder: &str, icon: &str) -> Ch { + let text = if value.is_empty() { placeholder.to_string() } else { value.to_string() }; + Ch { id: id.into(), text, icon: icon.into(), tone: "field", enabled: true, w: Some(900.0), ..Ch::default() } + } + + fn width_of(&self) -> f32 { + if let Some(w) = self.w { + return w; + } + // Onest 23/600: about 13.4 px per character (measured on the TV + // screenshots); capitals and wide letters more, narrow ones less. + let chars: f32 = self + .text + .chars() + .map(|c| match c { + 'i' | 'l' | 'í' | 'j' | '.' | ',' | ':' | '·' | '(' | ')' | ' ' => 7.5, + 'm' | 'w' | 'M' | 'W' => 20.0, + c if c.is_uppercase() || c.is_ascii_digit() => 16.0, + _ => 13.4, + }) + .sum::() + + 6.0; + if self.text.is_empty() { + return 64.0; + } + let icon = if self.icon.is_empty() { 0.0 } else { 38.0 }; + (chars + icon + if self.icon.is_empty() { 52.0 } else { 46.0 }).max(88.0) + } + + fn height_of(&self) -> f32 { + if self.tone == "field" { 80.0 } else { 64.0 } + } +} + +/// A card. +#[derive(Debug, Clone, Default)] +pub struct C { + pub id: String, + pub title: String, + pub caption: String, + pub detail: String, + pub image: String, + pub progress: f32, + pub badge: String, + pub badge_tone: &'static str, + pub mark: &'static str, + pub big: String, + pub current: bool, +} + +impl C { + pub fn new(id: impl Into, title: impl Into, image: impl Into) -> C { + C { id: id.into(), title: title.into(), image: image.into(), progress: -1.0, ..C::default() } + } +} + +/// One line of a page, as screens describe it. +#[derive(Debug, Clone)] +pub struct L { + pub id: String, + pub kind: Kind, + pub title: String, + pub subtitle: String, + pub meta: String, + pub extra: String, + pub text: String, + pub note: String, + pub style: String, + pub tone: String, + pub icon: String, + pub image: String, + pub logo: String, + /// Hero: a square cover left of the texts (`round`: an artist's photo). + pub cover: String, + pub round: bool, + pub progress: f32, + pub captions: bool, + /// Grids keep the column when moving between their lines. + pub grid: bool, + pub cards: Vec, + pub chips: Vec, + pub checks: Vec<(i32, String, String)>, + /// Fixed height (design px). + pub h: Option, + pub indent: f32, +} + +impl L { + pub fn new(id: impl Into, kind: Kind) -> L { + L { + id: id.into(), + kind, + title: String::new(), + subtitle: String::new(), + meta: String::new(), + extra: String::new(), + text: String::new(), + note: String::new(), + style: String::new(), + tone: String::new(), + icon: String::new(), + image: String::new(), + logo: String::new(), + cover: String::new(), + round: false, + progress: -1.0, + captions: false, + grid: false, + cards: Vec::new(), + chips: Vec::new(), + checks: Vec::new(), + h: None, + indent: 0.0, + } + } + pub fn heading(id: impl Into, title: impl Into) -> L { + let mut l = L::new(id, Kind::Heading); + l.title = title.into(); + l + } + /// A page title (56 px). + pub fn page_title(id: impl Into, title: impl Into, subtitle: impl Into) -> L { + let mut l = L::heading(id, title); + l.style = "big".into(); + l.subtitle = subtitle.into(); + l + } + pub fn text(id: impl Into, text: impl Into, style: &str) -> L { + let mut l = L::new(id, Kind::Text); + l.text = text.into(); + l.style = style.into(); + l + } + pub fn notice(id: impl Into, tone: &str, title: impl Into, text: impl Into) -> L { + let mut l = L::new(id, Kind::Notice); + l.tone = tone.into(); + l.title = title.into(); + l.text = text.into(); + l + } + pub fn chips(id: impl Into, label: impl Into, chips: Vec) -> L { + let mut l = L::new(id, Kind::Chips); + l.title = label.into(); + l.chips = chips; + l + } + pub fn cards(id: impl Into, title: impl Into, style: &str, cards: Vec) -> L { + let mut l = L::new(id, Kind::Cards); + l.title = title.into(); + l.style = style.into(); + l.cards = cards; + l + } + pub fn item(id: impl Into, title: impl Into, meta: impl Into, text: impl Into, chips: Vec) -> L { + let mut l = L::new(id, Kind::Item); + l.title = title.into(); + l.meta = meta.into(); + l.text = text.into(); + l.chips = chips; + l + } + pub fn checks(id: impl Into, checks: Vec<(i32, String, String)>) -> L { + let mut l = L::new(id, Kind::Checks); + l.checks = checks; + l + } + pub fn sub(mut self, s: impl Into) -> L { + self.subtitle = s.into(); + self + } + pub fn image(mut self, url: impl Into) -> L { + self.image = url.into(); + self.style = "image".into(); + self + } + /// A track row: `title`, `meta` (artists · album), `extra` (duration), + /// `note` (the number; unused when `image` is set), the "more" chip. + pub fn track(id: impl Into, title: impl Into, meta: impl Into, extra: impl Into) -> L { + let mut l = L::new(id, Kind::Track); + l.title = title.into(); + l.meta = meta.into(); + l.extra = extra.into(); + l.chips = vec![Ch::new("play", ""), Ch::new("more", "").icon("plus")]; + l.grid = true; + l + } + pub fn cover(mut self, url: impl Into, round: bool) -> L { + self.cover = url.into(); + self.round = round; + self + } + pub fn captions(mut self) -> L { + self.captions = true; + self + } + pub fn grid(mut self) -> L { + self.grid = true; + self + } + + fn focusable(&self) -> bool { + match self.kind { + Kind::Chips | Kind::Item | Kind::Hero | Kind::Track => self.chips.iter().any(|c| c.enabled) || (self.kind == Kind::Item && !self.chips.is_empty()), + Kind::Cards => !self.cards.is_empty(), + Kind::Keyboard => true, + _ => false, + } + } + + fn len(&self) -> usize { + if self.kind == Kind::Cards { self.cards.len() } else { self.chips.len() } + } +} + +/// Splits a list into grid lines of `n` cards. +pub fn grid_lines(id: &str, title: &str, style: &str, cards: Vec, n: usize) -> Vec { + let mut out = Vec::new(); + let mut it = cards.into_iter().peekable(); + let mut i = 0; + while it.peek().is_some() { + let chunk: Vec = it.by_ref().take(n).collect(); + out.push(L::cards(format!("{id}#{i}"), if i == 0 { title } else { "" }, style, chunk).captions().grid()); + i += 1; + } + out +} + +/// What a screen shows besides its lines. +#[derive(Debug, Clone, Default)] +pub struct Frame { + /// The top navigation with this section lit. + pub nav: Option, + /// Settings: (title, items, current). + pub side: Option<(String, Vec, usize)>, + /// The embedded search keyboard's placeholder (its line has kind Keyboard). + pub keyboard: Option, +} + +pub struct Spec { + pub lines: Vec, + pub frame: Frame, +} + +/// Where the focus is. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum Focus { + Nav, + Side, + Line, +} + +#[derive(Debug, Clone, Default)] +struct Laid { + y: f32, + h: f32, + x: f32, + w: f32, + /// Chips: (x, y, w, h, row). + chips: Vec<(f32, f32, f32, f32, usize)>, +} + +/// The page on screen: its lines laid out, the focus, the Slint models. +pub struct View { + pub lines: Vec, + laid: Vec, + pub frame: Frame, + pub focus: Focus, + pub line: usize, + cols: HashMap, + pub side_focus: usize, + pub nav_index: usize, + pub scroll: f32, + total: f32, + model: Rc>, + card_models: Vec>>>, + shown: HashSet, +} + +impl Default for View { + fn default() -> Self { + View { + lines: Vec::new(), + laid: Vec::new(), + frame: Frame::default(), + focus: Focus::Line, + line: 0, + cols: HashMap::new(), + side_focus: 0, + nav_index: 0, + scroll: 0.0, + total: 0.0, + model: Rc::new(VecModel::default()), + card_models: Vec::new(), + shown: HashSet::new(), + } + } +} + +/// Lines' heights and positions on the grid. +fn layout(lines: &[L], side: bool) -> (Vec, f32) { + let (x0, w) = if side { (0.0, SIDE_W) } else { (0.0, CONTENT_W) }; + let mut y = if side { 184.0 } else { 150.0 }; + let mut out = Vec::with_capacity(lines.len()); + let est = |text: &str, char_w: f32, width: f32, line_h: f32| -> f32 { + if text.is_empty() { + return 0.0; + } + let per_line = (width / char_w).max(10.0); + let n: f32 = text.split('\n').map(|p| (p.chars().count() as f32 / per_line).ceil().max(1.0)).sum(); + n * line_h + }; + for (i, l) in lines.iter().enumerate() { + let lw = w - l.indent; + let mut chips = Vec::new(); + let h = match l.kind { + Kind::Hero => { + // With a cover the texts and buttons sit right of it. + let (x0, cy, h) = if l.cover.is_empty() && l.icon != "liked" { (0.0, 520.0, 640.0) } else { (HERO_TEXT_X, 336.0, 420.0) }; + for c in &l.chips { + let cw = c.width_of(); + let cx = chips.last().map(|p: &(f32, f32, f32, f32, usize)| p.0 + p.2 + 20.0).unwrap_or(x0); + chips.push((cx, cy, cw, 72.0, 0)); + } + l.h.unwrap_or(h) + } + Kind::Track => { + chips.push((0.0, 0.0, lw - 96.0, TRACK_H, 0)); + chips.push((lw - 80.0, 8.0, 64.0, 64.0, 0)); + TRACK_H + } + Kind::Heading => { + if l.style == "big" { 96.0 + if l.subtitle.is_empty() { 0.0 } else { 34.0 } } else { 58.0 + if l.subtitle.is_empty() { 0.0 } else { 34.0 } } + } + Kind::Text => { + let (cw, lh) = match l.style.as_str() { + "caption" => (10.6, 30.0), + "label" => (11.8, 34.0), + _ => (12.6, 38.0), + }; + est(&l.text, cw, lw, lh) + 4.0 + } + Kind::Notice => 48.0 + est(&l.text, 11.2, lw - 56.0, 32.0), + Kind::Checks => ((l.checks.len() + 1) / 2) as f32 * 84.0, + Kind::Chips => { + let top = if l.title.is_empty() { 0.0 } else { 38.0 }; + let (mut cx, mut row, mut ry) = (0.0f32, 0usize, top); + let mut row_h = 0.0f32; + for c in &l.chips { + let (cw, ch) = (c.width_of().min(lw), c.height_of()); + if cx > 0.0 && cx + cw > lw { + cx = 0.0; + row += 1; + ry += row_h + 14.0; + row_h = 0.0; + } + chips.push((cx, ry, cw, ch, row)); + cx += cw + 14.0; + row_h = row_h.max(ch); + } + ry + row_h + } + Kind::Cards => { + let ch = card_size(&l.style).1; + (if l.title.is_empty() { 0.0 } else { 56.0 }) + ch + if l.captions { 80.0 } else { 0.0 } + 10.0 + } + Kind::Item => { + let tx = if l.style == "image" { 288.0 } else { 0.0 }; + let mut ty = 6.0 + 36.0 + if l.meta.is_empty() { 0.0 } else { 32.0 }; + if !l.text.is_empty() { + ty += est(&l.text, 10.0, (lw - tx).min(1100.0), 29.0).min(58.0) + 6.0; + } + let mut cx = tx; + for c in &l.chips { + let cw = c.width_of(); + chips.push((cx, ty + 4.0, cw, 60.0, 0)); + cx += cw + 12.0; + } + let mut h = ty + if l.chips.is_empty() { 8.0 } else { 74.0 }; + if l.style == "image" { + h = h.max(162.0); + } + if l.progress >= 0.0 && l.style != "image" { + h += 14.0; + } + h + } + Kind::Keyboard => 540.0, + }; + let h = l.h.unwrap_or(h); + out.push(Laid { y, h, x: x0 + l.indent, w: lw, chips }); + let next = lines.get(i + 1).map(|n| n.kind); + let gap = match (l.kind, next) { + (Kind::Heading, _) => 14.0, + (Kind::Cards, Some(Kind::Cards)) if l.grid => 18.0, + (Kind::Item, Some(Kind::Item)) => 14.0, + (Kind::Track, Some(Kind::Track)) => 6.0, + (Kind::Hero, _) => 24.0, + (_, Some(Kind::Heading)) => 44.0, + _ => 28.0, + }; + y += h + gap; + } + (out, y) +} + +impl View { + pub fn model(&self) -> ModelRc { + ModelRc::from(self.model.clone()) + } + + /// Shows new lines, keeping the focus on the same line (by id) and item. + pub fn set(&mut self, spec: Spec, images: &sf_ui::images::Images, px: f32) { + let old_id = self.lines.get(self.line).map(|l| l.id.clone()); + if let Some(l) = self.lines.get(self.line) { + let c = self.col(); + self.cols.insert(l.id.clone(), c); + } + let side = spec.frame.side.is_some(); + self.lines = spec.lines; + self.frame = spec.frame; + let (laid, total) = layout(&self.lines, side); + self.laid = laid; + self.total = total; + self.line = match old_id.and_then(|id| self.lines.iter().position(|l| l.id == id)) { + Some(i) => i, + None => self.first_focusable().unwrap_or(0), + }; + if !self.lines.get(self.line).is_some_and(L::focusable) { + self.line = self.nearest_focusable(self.line).unwrap_or(0); + } + if let Some((_, items, cur)) = &self.frame.side { + if self.focus != Focus::Side { + self.side_focus = *cur; + } + self.side_focus = self.side_focus.min(items.len().saturating_sub(1)); + } + if self.focus == Focus::Nav && self.frame.nav.is_none() { + self.focus = Focus::Line; + } + if self.focus == Focus::Line && self.first_focusable().is_none() { + if self.frame.nav.is_some() { + self.focus = Focus::Nav; + } else if self.frame.side.is_some() { + self.focus = Focus::Side; + } + } + self.shown.clear(); + self.card_models = vec![None; self.lines.len()]; + let rows: Vec = (0..self.lines.len()).map(|i| self.slint_line(i, images, px)).collect(); + self.model.set_vec(rows); + self.clamp_scroll(); + } + + /// Line `i`'s top (design px). + pub fn line_y(&self, i: usize) -> f32 { + self.laid.get(i).map(|l| l.y).unwrap_or(0.0) + } + + pub fn has_lines(&self) -> bool { + !self.lines.is_empty() + } + + fn first_focusable(&self) -> Option { + self.lines.iter().position(L::focusable) + } + + fn nearest_focusable(&self, from: usize) -> Option { + (from..self.lines.len()).find(|&i| self.lines[i].focusable()).or_else(|| (0..from).rev().find(|&i| self.lines[i].focusable())) + } + + pub fn col(&self) -> usize { + let Some(l) = self.lines.get(self.line) else { return 0 }; + let c = self.cols.get(&l.id).copied().unwrap_or(0); + c.min(l.len().saturating_sub(1)) + } + + fn set_col(&mut self, c: usize) { + if let Some(l) = self.lines.get(self.line) { + self.cols.insert(l.id.clone(), c); + } + } + + /// Sets the focus on line `id` (and item index), if it exists. + pub fn focus_on(&mut self, id: &str, col: usize) { + if let Some(i) = self.lines.iter().position(|l| l.id == id) { + self.line = i; + self.focus = Focus::Line; + self.set_col(col); + self.clamp_scroll(); + } + } + + /// The focused line's id and item id ("" if none). + pub fn target(&self) -> (String, String) { + let Some(l) = self.lines.get(self.line) else { return (String::new(), String::new()) }; + let c = self.col(); + let item = match l.kind { + Kind::Cards => l.cards.get(c).map(|c| c.id.clone()), + _ => l.chips.get(c).map(|c| c.id.clone()), + }; + (l.id.clone(), item.unwrap_or_default()) + } + + + /// Center x of the focused element (for spatial up/down). + fn focus_x(&self) -> f32 { + let Some(l) = self.lines.get(self.line) else { return 0.0 }; + let c = self.col(); + match l.kind { + Kind::Cards => { + let step = card_step(&l.style); + let fit = ((CONTENT_W + 32.0) / step).floor() as usize; + let scroll = c.saturating_sub(1).min(l.cards.len().saturating_sub(fit)); + (c - scroll) as f32 * step + step / 2.0 + } + _ => self.laid[self.line].chips.get(c).map(|p| p.0 + p.2 / 2.0).unwrap_or(0.0), + } + } + + fn nearest_in(&self, li: usize, x: f32, row: Option) -> usize { + let l = &self.lines[li]; + match l.kind { + Kind::Cards => { + let step = card_step(&l.style); + ((x / step).floor() as usize).min(l.cards.len().saturating_sub(1)) + } + _ => { + let chips = &self.laid[li].chips; + let mut best = (f32::MAX, 0usize); + for (i, p) in chips.iter().enumerate() { + if let Some(r) = row { + if p.4 != r { + continue; + } + } + if !l.chips[i].enabled { + continue; + } + let d = (p.0 + p.2 / 2.0 - x).abs(); + if d < best.0 { + best = (d, i); + } + } + best.1 + } + } + } + + /// Up/down. Returns false at the edges (the caller may move to the nav). + pub fn vertical(&mut self, down: bool) -> bool { + let Some(l) = self.lines.get(self.line) else { return false }; + let x = self.focus_x(); + // Inside a wrapped chip line first. + if l.kind == Kind::Chips { + let row = self.laid[self.line].chips.get(self.col()).map(|p| p.4).unwrap_or(0); + let rows = self.laid[self.line].chips.iter().map(|p| p.4).max().unwrap_or(0); + let next = if down { (row < rows).then_some(row + 1) } else { row.checked_sub(1) }; + if let Some(r) = next { + let c = self.nearest_in(self.line, x, Some(r)); + self.set_col(c); + self.clamp_scroll(); + return true; + } + } + let grid_col = if l.grid { Some(self.col()) } else { None }; + let mut i = self.line as isize; + loop { + i += if down { 1 } else { -1 }; + if i < 0 || i as usize >= self.lines.len() { + return false; + } + if self.lines[i as usize].focusable() { + break; + } + } + let prev = self.line; + self.line = i as usize; + let nl = &self.lines[self.line]; + match nl.kind { + Kind::Cards if nl.grid && grid_col.is_some() => self.set_col(grid_col.unwrap().min(nl.cards.len().saturating_sub(1))), + Kind::Cards => {} + Kind::Track if grid_col.is_some() && self.lines[prev].kind == Kind::Track => self.set_col(grid_col.unwrap().min(1)), + Kind::Track => self.set_col(0), + Kind::Chips | Kind::Item | Kind::Hero => { + let rows = self.laid[self.line].chips.iter().map(|p| p.4).max().unwrap_or(0); + let row = if down { 0 } else { rows }; + let c = self.nearest_in(self.line, x, Some(row)); + self.set_col(c); + } + _ => {} + } + self.clamp_scroll(); + true + } + + /// Left/right inside the line. Returns false at the edges. + pub fn horizontal(&mut self, right: bool) -> bool { + let Some(l) = self.lines.get(self.line) else { return false }; + let n = l.len(); + let c = self.col(); + let mut next = c as isize; + loop { + next += if right { 1 } else { -1 }; + if next < 0 || next as usize >= n { + return false; + } + let ok = match l.kind { + Kind::Cards => true, + _ => l.chips[next as usize].enabled, + }; + if ok { + break; + } + } + self.set_col(next as usize); + true + } + + /// Scrolls so the focused line sits comfortably on screen. + pub fn clamp_scroll(&mut self) { + let Some(laid) = self.laid.get(self.line) else { + self.scroll = 0.0; + return; + }; + let top_margin = if self.frame.side.is_some() { 184.0 } else { 150.0 }; + let mut target = if self.line == 0 || laid.y - top_margin < 120.0 { + 0.0 + } else { + laid.y - 230.0 + }; + // Tall lines (the keyboard) and wrapped chip rows: keep the focused row visible. + if let Some(l) = self.lines.get(self.line) { + if l.kind == Kind::Chips { + if let Some(p) = laid.chips.get(self.col()) { + if laid.y + p.1 + p.3 - target > 1000.0 { + target = laid.y + p.1 + p.3 - 1000.0; + } + } + } + } + let max = (self.total - 1000.0).max(0.0); + self.scroll = target.clamp(0.0, max.max(0.0)).max(0.0); + if self.focus == Focus::Nav { + self.scroll = 0.0; + } + } + + /// Slint's struct for line `i`. + fn slint_line(&mut self, i: usize, images: &sf_ui::images::Images, px: f32) -> Line { + let l = &self.lines[i]; + let laid = &self.laid[i]; + let chips: Vec = l + .chips + .iter() + .zip(laid.chips.iter()) + .map(|(c, p)| Chip { + id: c.id.clone().into(), + text: c.text.clone().into(), + icon: c.icon.clone().into(), + x: p.0, + y: p.1, + w: p.2, + h: p.3, + active: c.active, + tone: c.tone.into(), + enabled: c.enabled, + }) + .collect(); + let (cw, ch) = card_size(&l.style); + let size = ((cw * px * 1.1) as u32, (ch * px * 1.1) as u32); + let cards: Vec = l + .cards + .iter() + .map(|c| Card { + id: c.id.clone().into(), + title: c.title.clone().into(), + caption: c.caption.clone().into(), + detail: c.detail.clone().into(), + image: images.cached(&c.image, size).unwrap_or_default(), + progress: c.progress, + badge: c.badge.clone().into(), + badge_tone: c.badge_tone.into(), + mark: c.mark.into(), + big: c.big.clone().into(), + current: c.current, + }) + .collect(); + let card_model = Rc::new(VecModel::from(cards)); + let checks: Vec = l.checks.iter().map(|(s, a, b)| Check { state: *s, label: a.clone().into(), detail: b.clone().into() }).collect(); + let logo_size = ((620.0 * px) as u32, (190.0 * px) as u32); + let item_size = image_size(l.kind, px); + let cover_size = ((360.0 * px) as u32, (360.0 * px) as u32); + let line = Line { + id: l.id.clone().into(), + kind: l.kind.name().into(), + y: laid.y, + h: laid.h, + x: laid.x, + w: laid.w, + title: l.title.clone().into(), + subtitle: l.subtitle.clone().into(), + meta: l.meta.clone().into(), + extra: l.extra.clone().into(), + text: l.text.clone().into(), + note: l.note.clone().into(), + style: l.style.clone().into(), + tone: l.tone.clone().into(), + icon: l.icon.clone().into(), + image: if l.image.is_empty() { Default::default() } else { images.cached(&l.image, item_size).unwrap_or_default() }, + logo: if l.logo.is_empty() { Default::default() } else { images.cached(&l.logo, logo_size).unwrap_or_default() }, + cover: if l.cover.is_empty() { Default::default() } else { images.cached(&l.cover, cover_size).unwrap_or_default() }, + round: l.round, + framed: !l.cover.is_empty() || (l.kind == Kind::Hero && l.icon == "liked"), + progress: l.progress, + col: self.cols.get(&l.id).copied().unwrap_or(0).min(l.len().saturating_sub(1)) as i32, + captions: l.captions, + cards: ModelRc::from(card_model.clone()), + chips: ModelRc::new(VecModel::from(chips)), + checks: ModelRc::new(VecModel::from(checks)), + }; + self.card_models[i] = Some(card_model); + line + } + + /// Sends the focus (column, line, scroll) to Slint's models. + pub fn sync_cols(&self) { + for (i, l) in self.lines.iter().enumerate() { + let want = self.cols.get(&l.id).copied().unwrap_or(0).min(l.len().saturating_sub(1)) as i32; + if let Some(mut row) = self.model.row_data(i) { + if row.col != want { + row.col = want; + self.model.set_row_data(i, row); + } + } + } + } + + /// Loads the pictures of the lines around the focus (cached ones were + /// set when building). + pub fn load_images(&mut self, images: &sf_ui::images::Images, px: f32) { + let view_top = self.scroll - 400.0; + let view_bottom = self.scroll + 1080.0 + 900.0; + for i in 0..self.lines.len() { + let laid = &self.laid[i]; + if laid.y + laid.h < view_top || laid.y > view_bottom { + continue; + } + let l = &self.lines[i]; + if !l.logo.is_empty() && self.shown.insert(format!("{}#logo", l.id)) { + let model = self.model.clone(); + let id = l.id.clone(); + images.load(&l.logo, ((620.0 * px) as u32, (190.0 * px) as u32), move |img| { + if let Some(idx) = (0..model.row_count()).find(|&k| model.row_data(k).is_some_and(|r| r.id == id)) { + let mut row = model.row_data(idx).unwrap(); + row.logo = img; + model.set_row_data(idx, row); + } + }); + } + if !l.cover.is_empty() && self.shown.insert(format!("{}#cover", l.id)) { + let model = self.model.clone(); + let id = l.id.clone(); + images.load(&l.cover, ((360.0 * px) as u32, (360.0 * px) as u32), move |img| { + if let Some(idx) = (0..model.row_count()).find(|&k| model.row_data(k).is_some_and(|r| r.id == id)) { + let mut row = model.row_data(idx).unwrap(); + row.cover = img; + model.set_row_data(idx, row); + } + }); + } + if !l.image.is_empty() && self.shown.insert(format!("{}#image", l.id)) { + let model = self.model.clone(); + let id = l.id.clone(); + images.load(&l.image, image_size(l.kind, px), move |img| { + if let Some(idx) = (0..model.row_count()).find(|&k| model.row_data(k).is_some_and(|r| r.id == id)) { + let mut row = model.row_data(idx).unwrap(); + row.image = img; + model.set_row_data(idx, row); + } + }); + } + if l.kind != Kind::Cards || l.cards.is_empty() { + continue; + } + let col = self.cols.get(&l.id).copied().unwrap_or(0); + let step = card_step(&l.style); + let fit = ((CONTENT_W + 32.0) / step).floor() as usize; + let start = col.saturating_sub(2); + let end = (col + fit + 3).min(l.cards.len()); + let (cw, ch) = card_size(&l.style); + let size = ((cw * px * 1.1) as u32, (ch * px * 1.1) as u32); + let Some(Some(model)) = self.card_models.get(i).cloned() else { continue }; + for ci in start..end { + let c = &l.cards[ci]; + if c.image.is_empty() || !self.shown.insert(format!("{}#{}", l.id, c.id)) { + continue; + } + let model = model.clone(); + let card_id = c.id.clone(); + images.load(&c.image, size, move |img| { + if let Some(mut row) = model.row_data(ci) { + if row.id == card_id && row.image.size().width == 0 { + row.image = img; + model.set_row_data(ci, row); + } + } + }); + } + } + } + + /// Lines whose end is near the focus (infinite lists ask for more). + pub fn near_end(&self) -> Option { + let l = self.lines.get(self.line)?; + if l.grid { + // The last grid line of this list is close. + let prefix = l.id.split('#').next().unwrap_or(""); + let last = self.lines.iter().rposition(|x| x.id.starts_with(&format!("{prefix}#")))?; + if last <= self.line + 2 { + return Some(prefix.to_string()); + } + } else if l.kind == Kind::Cards && self.col() + 6 >= l.cards.len() { + return Some(l.id.clone()); + } + None + } + +} + +pub fn card_size(style: &str) -> (f32, f32) { + match style { + "landscape" => (400.0, 225.0), + // Albums, playlists, shows (square) and artists (round). + _ => (CARD, CARD), + } +} + +/// The picture of an item (256x144) or a track row (64x64), physical px. +fn image_size(kind: Kind, px: f32) -> (u32, u32) { + if kind == Kind::Track { ((64.0 * px) as u32, (64.0 * px) as u32) } else { ((256.0 * px * 1.1) as u32, (144.0 * px * 1.1) as u32) } +} + +fn card_step(style: &str) -> f32 { + card_size(style).0 + 32.0 +} + +/// Cards per grid line. +pub const GRID: usize = 7; +/// A square card (design px). +pub const CARD: f32 = 216.0; +/// A track row's height. +pub const TRACK_H: f32 = 80.0; +/// A hero with a cover: where its texts start. +pub const HERO_TEXT_X: f32 = 420.0; + +#[cfg(test)] +mod tests { + use super::*; + + fn chips_line(n: usize) -> L { + L::chips("c", "Műfaj", (0..n).map(|i| Ch::new(format!("g{i}"), format!("Műfaj {i}"))).collect()) + } + + #[test] + fn wraps_chips_and_moves_by_rows() { + let lines = vec![chips_line(40), L::cards("r", "Sor", "poster", (0..20).map(|i| C::new(format!("{i}"), "x", "")).collect())]; + let (laid, _) = layout(&lines, false); + let rows = laid[0].chips.iter().map(|p| p.4).max().unwrap(); + assert!(rows >= 2, "40 chips wrap"); + assert!(laid[0].chips.iter().all(|p| p.0 + p.2 <= CONTENT_W + 0.1)); + let mut v = View { lines: lines.clone(), laid, ..View::default() }; + v.total = 2000.0; + assert!(v.vertical(true)); + assert_eq!(v.line, 0, "first down stays in the chip line (next row)"); + let row = v.laid[0].chips[v.col()].4; + assert_eq!(row, 1); + for _ in 0..rows { + v.vertical(true); + } + assert_eq!(v.line, 1, "then the cards"); + assert!(!v.vertical(true), "nothing below"); + } + + #[test] + fn grids_keep_the_column() { + let cards: Vec = (0..20).map(|i| C::new(format!("{i}"), "x", "")).collect(); + let lines = grid_lines("g", "Rács", "poster", cards, 8); + assert_eq!(lines.len(), 3); + let (laid, total) = layout(&lines, false); + let mut v = View { lines, laid, total, ..View::default() }; + v.set_col(5); + v.vertical(true); + assert_eq!((v.line, v.col()), (1, 5)); + v.vertical(true); + assert_eq!((v.line, v.col()), (2, 3), "clamped to the short last line"); + assert_eq!(v.near_end().as_deref(), Some("g")); + } + + #[test] + fn track_rows_keep_the_column_and_page() { + let mut lines = vec![L::cards("c", "Kártyák", "", (0..3).map(|i| C::new(format!("{i}"), "x", "")).collect())]; + lines.extend((0..10).map(|i| L::track(format!("trk#{i}"), "Dal", "Előadó", "3:12"))); + let (laid, total) = layout(&lines, false); + let mut v = View { lines, laid, total, ..View::default() }; + v.vertical(true); + assert_eq!((v.line, v.col()), (1, 0), "from cards onto the row itself"); + assert!(v.horizontal(true)); + assert_eq!(v.target(), ("trk#0".to_string(), "more".to_string())); + v.vertical(true); + assert_eq!(v.target(), ("trk#1".to_string(), "more".to_string()), "the more chip stays focused"); + for _ in 0..6 { + v.vertical(true); + } + assert_eq!(v.near_end().as_deref(), Some("trk")); + } + + #[test] + fn skips_disabled_chips() { + let line = L::chips("c", "", vec![Ch::new("a", "A"), Ch::new("b", "B").enabled(false), Ch::new("c", "C")]); + let (laid, total) = layout(std::slice::from_ref(&line), false); + let mut v = View { lines: vec![line], laid, total, ..View::default() }; + assert!(v.horizontal(true)); + assert_eq!(v.target().1, "c"); + assert!(!v.horizontal(true)); + } +} diff --git a/src/screens/artist.rs b/src/screens/artist.rs new file mode 100644 index 0000000..18182f7 --- /dev/null +++ b/src/screens/artist.rs @@ -0,0 +1,146 @@ +//! An artist: photo, followers, Lejátszás / Keverés / Követés, the popular +//! tracks, then albums, singles and appearances. + +use std::any::Any; + +use crate::api::{self, Album, Artist, Track}; +use crate::app::{Cx, Look, Screen}; +use crate::format; +use crate::page::{Ch, Frame, Kind, L, Spec}; +use crate::screens::{self, Load, album_card, row_index, track_line}; +use crate::spotify::Cmd; + +#[derive(Default)] +struct Data { + artist: Artist, + top: Vec, + albums: Vec, + singles: Vec, + appears: Vec, +} + +pub struct ArtistPage { + id: String, + data: Load, + following: Option, + started: bool, +} + +impl ArtistPage { + pub fn new(id: &str) -> ArtistPage { + ArtistPage { id: id.into(), data: Load::Loading, following: None, started: false } + } + + fn load(&mut self, cx: &Cx) { + let api = cx.api(); + let id = self.id.clone(); + let market = cx.user().country; + cx.spawn::( + move || -> anyhow::Result<(Data, Option)> { + let artist = api.artist(&id)?; + let (top, albums, singles, appears, following) = std::thread::scope(|s| { + let top = s.spawn(|| api.artist_top(&id, &market).unwrap_or_default()); + let albums = s.spawn(|| api.artist_albums(&id, "album").unwrap_or_default()); + let singles = s.spawn(|| api.artist_albums(&id, "single").unwrap_or_default()); + let appears = s.spawn(|| api.artist_albums(&id, "appears_on,compilation").unwrap_or_default()); + let following = s.spawn(|| api.following_artist(&id).ok()); + (top.join().unwrap_or_default(), albums.join().unwrap_or_default(), singles.join().unwrap_or_default(), appears.join().unwrap_or_default(), following.join().ok().flatten()) + }); + Ok((Data { artist, top, albums, singles, appears }, following)) + }, + |s, cx, r| match r { + Ok((d, following)) => { + s.following = following; + let img = api::pick(&d.artist.images, 960); + cx.backdrop(&img, Look::Sharp, &format!("ar:{}", s.id)); + s.data = Load::Ready(d); + } + Err(e) => s.data = Load::Failed(api::describe(&e)), + }, + ); + } +} + +impl Screen for ArtistPage { + fn spec(&mut self, cx: &Cx) -> Spec { + if !self.started { + self.started = true; + self.load(cx); + } + let frame = Frame::default(); + let Some(d) = self.data.ready() else { + return Spec { lines: vec![self.data.status("status").unwrap()], frame }; + }; + let a = &d.artist; + let mut hero = L::new("hero", Kind::Hero).cover(api::pick(&a.images, 400), true); + hero.style = "ELŐADÓ".into(); + hero.title = a.name.clone(); + hero.subtitle = a.followers.as_ref().map(|f| format::followers(f.total)).unwrap_or_default(); + hero.meta = a.genres.iter().take(4).cloned().collect::>().join(" · "); + let mut chips = vec![Ch::new("play", "Lejátszás").icon("play").tone("primary"), Ch::new("shuffle", "Keverés").icon("shuffle")]; + if let Some(f) = self.following { + chips.push(if f { Ch::new("follow", "Követed").icon("check").active(true) } else { Ch::new("follow", "Követés").icon("plus") }); + } + hero.chips = chips; + let mut lines = vec![hero]; + let playing = cx.playing_uri(); + if !d.top.is_empty() { + lines.push(L::heading("top-h", "Népszerű")); + for (i, t) in d.top.iter().take(10).enumerate() { + lines.push(track_line(format!("trk#{i}"), t, None, true, &playing)); + } + } + for (id, title, list) in [("albums", "Albumok", &d.albums), ("singles", "Kislemezek és EP-k", &d.singles), ("appears", "Közreműködések", &d.appears)] { + if !list.is_empty() { + lines.push(L::cards(id, title, "square", list.iter().map(album_card).collect()).captions()); + } + } + Spec { lines, frame } + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + let Some(d) = self.data.ready() else { return }; + let uri = d.artist.uri.clone(); + if line == "hero" { + match item { + "play" | "shuffle" => cx.play(Cmd::Context { uri, start: None, shuffle: item == "shuffle" }), + "follow" => { + let Some(on) = self.following.map(|f| !f) else { return }; + let api = cx.api(); + let id = self.id.clone(); + cx.call::("follow", move || api.set_following_artist(&id, on), move |s, cx, ok| { + if ok { + s.following = Some(on); + cx.toast(if on { "Követed" } else { "Már nem követed" }); + } + }); + } + _ => {} + } + return; + } + if line.starts_with("trk#") { + let Some(i) = row_index(line) else { return }; + let top: Vec = d.top.iter().take(10).cloned().collect(); + if item == "more" { + if let Some(t) = top.get(i) { + screens::track_menu(cx, t); + } + } else { + screens::play_from(cx, &uri, &top, i); + } + return; + } + screens::open_card(cx, item); + } + + fn shown(&mut self, cx: &Cx) { + if let Some(d) = self.data.ready() { + cx.backdrop(&api::pick(&d.artist.images, 960), Look::Sharp, &format!("ar:{}", self.id)); + } + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/screens/collection.rs b/src/screens/collection.rs new file mode 100644 index 0000000..3158906 --- /dev/null +++ b/src/screens/collection.rs @@ -0,0 +1,343 @@ +//! A list of tracks with a header: a playlist, an album, the liked songs or a +//! podcast's episodes. Lejátszás / Keverés / Mentés, then the rows; long +//! lists load page by page while the focus moves down. + +use std::any::Any; + +use crate::api::{self, Api, Paging, Track}; +use crate::app::{Cx, Look, Screen}; +use crate::format; +use crate::page::{Ch, Frame, Kind, L, Spec}; +use crate::screens::{self, Load, row_index, track_line}; +use crate::spotify::Cmd; + +#[derive(Debug, Clone, PartialEq, Eq)] +enum What { + Playlist(String), + Album(String), + Liked, + Show(String), +} + +#[derive(Debug, Clone, Default)] +struct Head { + label: String, + title: String, + subtitle: String, + meta: String, + text: String, + cover: String, + uri: String, + /// Your own playlist (no follow button). + own: bool, +} + +pub struct Collection { + what: What, + head: Load, + tracks: Vec, + next: Option, + loading_more: bool, + /// Saved / followed (None: unknown or not applicable). + saved: Option, + started: bool, +} + +impl Collection { + fn new(what: What) -> Collection { + Collection { what, head: Load::Loading, tracks: Vec::new(), next: Some(0), loading_more: false, saved: None, started: false } + } + pub fn playlist(id: &str) -> Collection { + Collection::new(What::Playlist(id.into())) + } + pub fn album(id: &str) -> Collection { + Collection::new(What::Album(id.into())) + } + pub fn liked() -> Collection { + Collection::new(What::Liked) + } + pub fn show(id: &str) -> Collection { + Collection::new(What::Show(id.into())) + } + + /// What Spotify plays when this page plays. + fn context(&self, cx: &Cx) -> String { + match &self.what { + What::Liked => { + let user = cx.user().id; + if user.is_empty() { String::new() } else { format!("spotify:user:{user}:collection") } + } + _ => self.head.ready().map(|h| h.uri.clone()).unwrap_or_default(), + } + } + + fn load(&mut self, cx: &Cx) { + let api = cx.api(); + let what = self.what.clone(); + let me = cx.user().id; + cx.spawn::( + move || -> anyhow::Result<(Head, Paging, Option)> { + Ok(match &what { + What::Playlist(id) => { + let p = api.playlist(id)?; + let tracks = api.playlist_tracks(id, 0)?; + let own = p.owner.id == me; + let saved = if own || me.is_empty() { None } else { api.following_playlist(id, &me).ok() }; + let mut meta = vec![format!("{} dal", p.count())]; + if let Some(f) = p.followers.as_ref().filter(|f| f.total > 0) { + meta.push(format::followers(f.total).replace("követő", "kedvelés")); + } + let head = Head { + label: "LEJÁTSZÁSI LISTA".into(), + title: p.name.clone(), + subtitle: p.owner_name(), + meta: meta.join(" · "), + text: format::plain(&p.description), + cover: p.image(400), + uri: p.uri.clone(), + own, + }; + (head, tracks, saved) + } + What::Album(id) => { + let a = api.album(id)?; + let mut tracks = a.tracks.clone().unwrap_or_default(); + // Album tracks come without the album: add it (art, menus). + let bare = api::Album { tracks: None, ..a.clone() }; + for t in tracks.items.iter_mut().flatten() { + t.album = Some(bare.clone()); + } + let saved = api.album_saved(id).ok(); + let artists = a.artists.iter().map(|x| x.name.as_str()).collect::>().join(", "); + let length: u64 = tracks.items.iter().flatten().map(|t| t.duration_ms as u64).sum(); + let mut meta = vec![format::year(&a.release_date), format!("{} dal", a.total_tracks)]; + if !tracks.more() { + meta.push(format::total(length)); + } + let head = Head { + label: format::album_type(&a.album_type).to_uppercase(), + title: a.name.clone(), + subtitle: artists, + meta: meta.into_iter().filter(|s| !s.is_empty()).collect::>().join(" · "), + text: if a.label.is_empty() { String::new() } else { format!("Kiadó: {}", a.label) }, + cover: api::pick(&a.images, 400), + uri: a.uri.clone(), + own: false, + }; + (head, tracks, saved) + } + What::Liked => { + let tracks = api.liked(0)?; + let head = Head { + label: "LEJÁTSZÁSI LISTA".into(), + title: "Kedvelt dalok".into(), + subtitle: String::new(), + meta: format!("{} dal", tracks.total), + text: "A dalok, amiket a szívvel jelöltél meg.".into(), + cover: String::new(), + uri: String::new(), + own: true, + }; + (head, tracks, None) + } + What::Show(id) => { + let s = api.show(id)?; + let mut tracks = api.show_episodes(id, 0)?; + let bare = api::Show { ..s.clone() }; + for t in tracks.items.iter_mut().flatten() { + t.show = Some(bare.clone()); + t.kind = "episode".into(); + } + let saved = api.show_saved(id).ok(); + let head = Head { + label: "PODCAST".into(), + title: s.name.clone(), + subtitle: s.publisher.clone(), + meta: format!("{} epizód", s.total_episodes), + text: format::plain(&s.description), + cover: api::pick(&s.images, 400), + uri: s.uri.clone(), + own: false, + }; + (head, tracks, saved) + } + }) + }, + |s, cx, r| match r { + Ok((head, tracks, saved)) => { + s.next = tracks.more().then_some(tracks.offset + tracks.items.len() as u32); + s.tracks = tracks.list(); + s.saved = saved; + let cover = head.cover.clone(); + s.head = Load::Ready(head); + cx.backdrop(&cover, Look::Soft, &format!("col:{:?}", s.what)); + } + Err(e) => s.head = Load::Failed(api::describe(&e)), + }, + ); + } + + fn load_more(&mut self, cx: &Cx) { + let Some(offset) = self.next.filter(|_| !self.loading_more) else { return }; + self.loading_more = true; + let api = cx.api(); + let what = self.what.clone(); + let album = self.tracks.first().and_then(|t| t.album.clone()); + let show = self.tracks.first().and_then(|t| t.show.clone()); + cx.spawn::( + move || fetch_page(&api, &what, offset), + move |s, cx, r| { + s.loading_more = false; + match r { + Ok(mut p) => { + s.next = p.more().then_some(p.offset + p.items.len() as u32); + for t in p.items.iter_mut().flatten() { + if t.album.is_none() { + t.album = album.clone(); + } + if what_is_show(&s.what) { + t.show = show.clone(); + t.kind = "episode".into(); + } + } + s.tracks.extend(p.list()); + } + Err(e) => { + s.next = None; + cx.error("more", &e); + } + } + }, + ); + } + + fn toggle_saved(&mut self, cx: &Cx) { + let Some(on) = self.saved.map(|s| !s) else { return }; + let api = cx.api(); + let what = self.what.clone(); + cx.call::( + "save", + move || match &what { + What::Playlist(id) => api.set_following_playlist(id, on), + What::Album(id) => api.set_album_saved(id, on), + What::Show(id) => api.set_show_saved(id, on), + What::Liked => Ok(()), + }, + move |s, cx, ok| { + if ok { + s.saved = Some(on); + cx.toast(if on { "Hozzáadva a könyvtáradhoz" } else { "Eltávolítva a könyvtáradból" }); + } + }, + ); + } +} + +fn what_is_show(w: &What) -> bool { + matches!(w, What::Show(_)) +} + +fn fetch_page(api: &Api, what: &What, offset: u32) -> anyhow::Result> { + match what { + What::Playlist(id) => api.playlist_tracks(id, offset), + What::Album(id) => api.album_tracks(id, offset), + What::Liked => api.liked(offset), + What::Show(id) => api.show_episodes(id, offset), + } +} + +impl Screen for Collection { + fn spec(&mut self, cx: &Cx) -> Spec { + if !self.started { + self.started = true; + self.load(cx); + } + let frame = Frame::default(); + let Some(h) = self.head.ready() else { + let lines = vec![self.head.status("status").unwrap()]; + return Spec { lines, frame }; + }; + let mut hero = L::new("hero", Kind::Hero).cover(h.cover.clone(), false); + hero.style = h.label.clone(); + hero.title = h.title.clone(); + hero.subtitle = h.subtitle.clone(); + hero.meta = h.meta.clone(); + hero.text = h.text.clone(); + if h.cover.is_empty() && self.what == What::Liked { + hero.icon = "liked".into(); + } + let mut chips = vec![Ch::new("play", "Lejátszás").icon("play").tone("primary")]; + if !matches!(self.what, What::Show(_)) { + chips.push(Ch::new("shuffle", "Keverés").icon("shuffle")); + } + if let Some(saved) = self.saved.filter(|_| !h.own) { + chips.push(if saved { Ch::new("save", "A könyvtáradban").icon("check").active(true) } else { Ch::new("save", "Mentés").icon("plus") }); + } + hero.chips = chips; + let mut lines = vec![hero]; + if self.tracks.is_empty() { + lines.push(L::notice("empty", "info", "Ez a lista üres", "")); + } + let playing = cx.playing_uri(); + let numbered = matches!(self.what, What::Album(_)); + let with_album = matches!(self.what, What::Playlist(_) | What::Liked); + for (i, t) in self.tracks.iter().enumerate() { + let n = if numbered { Some(t.track_number.max(i as u32 + 1)) } else { None }; + lines.push(track_line(format!("trk#{i}"), t, n, with_album, &playing)); + } + if self.next.is_some() { + lines.push(L::text("more", "További dalok betöltése…", "caption")); + } + Spec { lines, frame } + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + if line == "hero" { + let context = self.context(cx); + match item { + "play" | "shuffle" => { + let shuffle = item == "shuffle"; + if context.is_empty() { + let uris: Vec = self.tracks.iter().filter(|t| t.playable()).map(|t| t.uri.clone()).collect(); + if !uris.is_empty() { + cx.play(Cmd::Tracks { uris, start: 0 }); + } + } else { + cx.play(Cmd::Context { uri: context, start: None, shuffle }); + } + } + "save" => self.toggle_saved(cx), + _ => {} + } + return; + } + let Some(i) = row_index(line) else { return }; + match item { + "more" => { + if let Some(t) = self.tracks.get(i) { + screens::track_menu(cx, t); + } + } + _ => { + let context = self.context(cx); + screens::play_from(cx, &context, &self.tracks, i); + } + } + } + + fn more(&mut self, cx: &Cx, list: &str) { + if list == "trk" { + self.load_more(cx); + } + } + + fn shown(&mut self, cx: &Cx) { + if let Some(h) = self.head.ready() { + cx.backdrop(&h.cover, Look::Soft, &format!("col:{:?}", self.what)); + } + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/screens/home.rs b/src/screens/home.rs new file mode 100644 index 0000000..afe3b59 --- /dev/null +++ b/src/screens/home.rs @@ -0,0 +1,154 @@ +//! Kezdőlap: rows: recently played, your playlists (with the +//! liked songs first), your top artists and tracks, saved albums, new +//! releases. Every row loads on its own; a failing one just stays away. + +use std::any::Any; + +use crate::api::{Album, Artist, Playlist, Played, Track}; +use crate::app::{Cx, Look, Screen}; +use crate::page::{Frame, L, Spec}; +use crate::screens::{self, album_card, artist_card, liked_card, playlist_card, track_card}; + +#[derive(Default)] +struct Data { + recent: Option>, + playlists: Option>, + liked_total: Option, + top_artists: Option>, + top_tracks: Option>, + albums: Option>, + releases: Option>, + errors: Vec, +} + +pub struct Home { + data: Data, + loading: bool, + started: bool, +} + +impl Home { + pub fn new() -> Home { + Home { data: Data::default(), loading: true, started: false } + } + + fn load(&mut self, cx: &Cx) { + self.loading = true; + let api = cx.api(); + cx.spawn::( + move || { + std::thread::scope(|s| { + let recent = s.spawn(|| api.recently_played()); + let playlists = s.spawn(|| api.my_playlists(0)); + let liked = s.spawn(|| api.liked(0)); + let artists = s.spawn(|| api.top_artists()); + let tracks = s.spawn(|| api.top_tracks()); + let albums = s.spawn(|| api.saved_albums(0)); + let releases = s.spawn(|| api.new_releases()); + let mut d = Data::default(); + let e = &mut d.errors; + let recent = keep(recent.join(), e); + let playlists = keep(playlists.join(), e).map(|p| p.list()); + let liked_total = keep(liked.join(), e).map(|p| p.total); + let top_artists = keep(artists.join(), e); + let top_tracks = keep(tracks.join(), e); + let albums = keep(albums.join(), e).map(|p| p.list()); + let releases = keep(releases.join(), e); + Data { recent, playlists, liked_total, top_artists, top_tracks, albums, releases, ..d } + }) + }, + |s, cx, d| { + s.data = d; + s.loading = false; + // The first picture of the page tints the background. + let first = s.data.recent.as_ref().and_then(|r| r.first()).map(|p| p.track.image(640)).unwrap_or_default(); + cx.backdrop(&first, Look::Soft, "home"); + }, + ); + } +} + +/// A row's result: the data, or its error noted. +fn keep(r: std::thread::Result>, errors: &mut Vec) -> Option { + match r { + Ok(Ok(t)) => Some(t), + Ok(Err(e)) => { + log::warn!("home: {e:#}"); + errors.push(crate::api::describe(&e)); + None + } + Err(_) => None, + } +} + +/// Recently played tracks, each once (newest first). +fn recent_cards(items: &[Played]) -> Vec { + let mut seen = std::collections::HashSet::new(); + items + .iter() + .filter(|p| seen.insert(p.track.uri.clone())) + .take(20) + .map(|p| track_card(&p.track, p.context.as_ref().map(|c| c.uri.as_str()).unwrap_or(""))) + .collect() +} + + +impl Screen for Home { + fn spec(&mut self, cx: &Cx) -> Spec { + if !self.started { + self.started = true; + self.load(cx); + } + let frame = Frame { nav: Some(0), ..Frame::default() }; + let mut lines = Vec::new(); + if self.loading { + lines.push(L::text("loading", "Betöltés…", "caption")); + return Spec { lines, frame }; + } + let d = &self.data; + if let Some(r) = d.recent.as_ref().filter(|r| !r.is_empty()) { + lines.push(L::cards("recent", "Legutóbb játszott", "square", recent_cards(r)).captions()); + } + let mut pl = vec![liked_card(d.liked_total)]; + pl.extend(d.playlists.iter().flatten().map(playlist_card)); + lines.push(L::cards("playlists", "Lejátszási listáid", "square", pl).captions()); + if let Some(a) = d.top_artists.as_ref().filter(|a| !a.is_empty()) { + lines.push(L::cards("artists", "Kedvenc előadóid", "round", a.iter().map(artist_card).collect()).captions()); + } + if let Some(t) = d.top_tracks.as_ref().filter(|t| !t.is_empty()) { + lines.push(L::cards("top", "Mostanában sokat hallgatod", "square", t.iter().map(|t| track_card(t, "")).collect()).captions()); + } + if let Some(a) = d.albums.as_ref().filter(|a| !a.is_empty()) { + lines.push(L::cards("albums", "Elmentett albumaid", "square", a.iter().map(album_card).collect()).captions()); + } + if let Some(a) = d.releases.as_ref().filter(|a| !a.is_empty()) { + lines.push(L::cards("releases", "Új megjelenések", "square", a.iter().map(album_card).collect()).captions()); + } + if d.recent.is_none() && d.playlists.is_none() && d.top_artists.is_none() { + let why = d.errors.first().cloned().unwrap_or_default(); + lines.push(L::notice("error", "bad", "Nem sikerült betölteni a kezdőlapot", why)); + } + Spec { lines, frame } + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + if line == "top" { + // Top tracks play as a list, from the chosen one. + if let Some(t) = &self.data.top_tracks { + let i = t.iter().position(|x| item == format!("t:{}|", x.uri)).unwrap_or(0); + screens::play_from(cx, "", t, i); + return; + } + } + screens::open_card(cx, item); + } + + fn shown(&mut self, cx: &Cx) { + let first = self.data.recent.as_ref().and_then(|r| r.first()).map(|p| p.track.image(640)).unwrap_or_default(); + cx.backdrop(&first, Look::Soft, "home"); + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/screens/library.rs b/src/screens/library.rs new file mode 100644 index 0000000..3d20f24 --- /dev/null +++ b/src/screens/library.rs @@ -0,0 +1,151 @@ +//! Könyvtár: playlists (the liked songs first), albums, artists, podcasts, +//! one at a time, as a grid. More loads while the focus moves down. + +use std::any::Any; + +use crate::api::{Album, Artist, Playlist, Show}; +use crate::app::{Cx, Screen}; +use crate::page::{C, Ch, Frame, GRID, L, Spec, grid_lines}; +use crate::screens::{self, Load, album_card, artist_card, liked_card, playlist_card, show_card}; + +const TABS: [(&str, &str); 4] = [("playlists", "Lejátszási listák"), ("albums", "Albumok"), ("artists", "Előadók"), ("shows", "Podcastok")]; + +enum Items { + Playlists(Vec, Option), + Albums(Vec), + Artists(Vec), + Shows(Vec), +} + +pub struct Library { + tab: usize, + items: Load, + /// Next page: an offset, or the last artist's id (cursor). + next: Option, + loading_more: bool, + started: bool, +} + +impl Library { + pub fn new() -> Library { + Library { tab: 0, items: Load::Loading, next: None, loading_more: false, started: false } + } + + fn load(&mut self, cx: &Cx, more: bool) { + if more && (self.loading_more || self.next.is_none()) { + return; + } + let next = if more { self.next.clone().unwrap_or_default() } else { String::new() }; + if more { + self.loading_more = true; + } else { + self.items = Load::Loading; + self.next = None; + } + let api = cx.api(); + let tab = self.tab; + cx.spawn::( + move || -> anyhow::Result<(Items, Option)> { + let offset: u32 = next.parse().unwrap_or(0); + Ok(match tab { + 0 => { + let p = api.my_playlists(offset)?; + let liked = if offset == 0 { api.liked(0).ok().map(|p| p.total) } else { None }; + let n = p.more().then(|| (p.offset + p.items.len() as u32).to_string()); + (Items::Playlists(p.list(), liked), n) + } + 1 => { + let p = api.saved_albums(offset)?; + let n = p.more().then(|| (p.offset + p.items.len() as u32).to_string()); + (Items::Albums(p.list()), n) + } + 2 => { + let (a, after) = api.followed_artists(&next)?; + (Items::Artists(a), after) + } + _ => { + let p = api.saved_shows(offset)?; + let n = p.more().then(|| (p.offset + p.items.len() as u32).to_string()); + (Items::Shows(p.list()), n) + } + }) + }, + move |s, cx, r| { + if s.tab != tab { + return; + } + s.loading_more = false; + match r { + Ok((items, n)) => { + s.next = n; + match (s.items.ready_mut(), items) { + (Some(Items::Playlists(a, _)), Items::Playlists(b, _)) if more => a.extend(b), + (Some(Items::Albums(a)), Items::Albums(b)) if more => a.extend(b), + (Some(Items::Artists(a)), Items::Artists(b)) if more => a.extend(b), + (Some(Items::Shows(a)), Items::Shows(b)) if more => a.extend(b), + (_, items) => s.items = Load::Ready(items), + } + } + Err(e) if more => { + s.next = None; + cx.error("library", &e); + } + Err(e) => s.items = Load::Failed(crate::api::describe(&e)), + } + }, + ); + } +} + +impl Screen for Library { + fn spec(&mut self, cx: &Cx) -> Spec { + if !self.started { + self.started = true; + self.load(cx, false); + } + let tabs = TABS.iter().enumerate().map(|(i, (id, t))| Ch::new(*id, *t).active(i == self.tab)).collect(); + let mut lines = vec![L::page_title("title", "Könyvtár", ""), L::chips("tabs", "", tabs)]; + if let Some(st) = self.items.status("status") { + lines.push(st); + } else { + let (cards, style, empty): (Vec, &str, &str) = match self.items.ready().unwrap() { + Items::Playlists(p, liked) => { + let mut c = vec![liked_card(*liked)]; + c.extend(p.iter().map(playlist_card)); + (c, "square", "") + } + Items::Albums(a) => (a.iter().map(album_card).collect(), "square", "Még nincs elmentett albumod."), + Items::Artists(a) => (a.iter().map(artist_card).collect(), "round", "Még nem követsz előadót."), + Items::Shows(s) => (s.iter().map(show_card).collect(), "square", "Még nem követsz podcastot."), + }; + if cards.is_empty() { + lines.push(L::notice("empty", "info", empty, "A telefonos Spotify appban mentett dolgok itt is megjelennek.")); + } + lines.extend(grid_lines("grid", "", style, cards, GRID)); + } + Spec { lines, frame: Frame { nav: Some(2), ..Frame::default() } } + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + if line == "tabs" { + if let Some(i) = TABS.iter().position(|t| t.0 == item) { + if i != self.tab { + self.tab = i; + self.load(cx, false); + } + } + return; + } + screens::open_card(cx, item); + } + + fn more(&mut self, cx: &Cx, list: &str) { + if list == "grid" { + self.load(cx, true); + } + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/screens/mod.rs b/src/screens/mod.rs new file mode 100644 index 0000000..d2af8c0 --- /dev/null +++ b/src/screens/mod.rs @@ -0,0 +1,283 @@ +//! The browsing screens. Each one describes its page as lines (src/page.rs) +//! and reacts to OK; see app::Screen. +//! +//! Card ids say what a card opens: "al:" album, "pl:" playlist, +//! "ar:" artist, "sh:" podcast, "liked" the liked songs, +//! "t:|" plays a track (in its context, if any). + +pub mod artist; +pub mod collection; +pub mod home; +pub mod library; +pub mod search; +pub mod settings; + +use crate::api::{self, Album, Artist, Playlist, Show, Track}; +use crate::app::{Controller, Cx, Screen}; +use crate::format; +use crate::page::{C, CARD, L}; +use crate::spotify::{Cmd, Start}; +use crate::task; + +/// The screen of a top navigation section. +pub fn section(n: usize) -> Box { + match n { + 1 => Box::new(search::Search::new()), + 2 => Box::new(library::Library::new()), + 3 => Box::new(settings::Settings::new()), + _ => Box::new(home::Home::new()), + } +} + +/// Data that loads. +#[derive(Debug, Clone, Default)] +pub enum Load { + #[default] + Loading, + Ready(T), + Failed(String), +} + +impl Load { + pub fn ready(&self) -> Option<&T> { + match self { + Load::Ready(t) => Some(t), + _ => None, + } + } + pub fn ready_mut(&mut self) -> Option<&mut T> { + match self { + Load::Ready(t) => Some(t), + _ => None, + } + } + pub fn from(r: anyhow::Result) -> Load { + match r { + Ok(t) => Load::Ready(t), + Err(e) => Load::Failed(api::describe(&e)), + } + } + /// The loading / error line, or None when ready. + pub fn status(&self, id: &str) -> Option { + match self { + Load::Loading => Some(L::text(id, "Betöltés…", "caption")), + Load::Failed(e) => Some(L::notice(id, "bad", "Nem sikerült betölteni", e.clone())), + Load::Ready(_) => None, + } + } +} + +/// Picture size asked for cards (design px; Spotify's 300 px images fit). +const CARD_IMG: u32 = CARD as u32 + 60; + +pub fn album_card(a: &Album) -> C { + let mut c = C::new(format!("al:{}", a.id), a.name.clone(), api::pick(&a.images, CARD_IMG)); + c.caption = a.name.clone(); + let artists = a.artists.iter().map(|x| x.name.as_str()).collect::>().join(", "); + let y = format::year(&a.release_date); + c.detail = [y, artists].into_iter().filter(|s| !s.is_empty()).collect::>().join(" · "); + c +} + +pub fn playlist_card(p: &Playlist) -> C { + let mut c = C::new(format!("pl:{}", p.id), p.name.clone(), p.image(CARD_IMG)); + c.caption = p.name.clone(); + c.detail = format!("Lejátszási lista · {}", p.owner_name()); + c +} + +pub fn artist_card(a: &Artist) -> C { + let mut c = C::new(format!("ar:{}", a.id), a.name.clone(), api::pick(&a.images, CARD_IMG)); + c.caption = a.name.clone(); + c.detail = "Előadó".into(); + c +} + +pub fn show_card(s: &Show) -> C { + let mut c = C::new(format!("sh:{}", s.id), s.name.clone(), api::pick(&s.images, CARD_IMG)); + c.caption = s.name.clone(); + c.detail = if s.publisher.is_empty() { "Podcast".into() } else { s.publisher.clone() }; + c +} + +/// A track as a card (album art): plays it, in `context` if given. +pub fn track_card(t: &Track, context: &str) -> C { + let mut c = C::new(format!("t:{}|{context}", t.uri), t.name.clone(), t.image(CARD_IMG)); + c.caption = t.name.clone(); + c.detail = t.artist_names(); + c +} + +pub fn liked_card(total: Option) -> C { + let mut c = C::new("liked", "Kedvelt dalok", ""); + c.caption = "Kedvelt dalok".into(); + c.mark = "liked"; + c.detail = match total { + Some(n) => format!("Lejátszási lista · {n} dal"), + None => "Lejátszási lista".into(), + }; + c +} + +/// A track row. `number`: the album's track number, else the art shows. +pub fn track_line(id: String, t: &Track, number: Option, with_album: bool, playing: &str) -> L { + let meta = if t.kind == "episode" { + let mut p = vec![format::date(&t.release_date)]; + if let Some(r) = &t.resume_point { + if r.fully_played { + p.push("Meghallgatva".into()); + } else if r.resume_position_ms > 0 { + p.push(format!("Még {}", format::clock(t.duration_ms.saturating_sub(r.resume_position_ms)))); + } + } + p.join(" · ") + } else { + let mut m = t.artist_names(); + if with_album { + if let Some(a) = &t.album { + m = format!("{m} · {}", a.name); + } + } + if t.explicit { + m = format!("E · {m}"); + } + m + }; + let mut l = L::track(id, t.name.clone(), meta, format::clock(t.duration_ms)); + match number { + Some(n) => l.note = n.to_string(), + None => l.image = t.image(64), + } + if !playing.is_empty() && t.uri == playing { + l.tone = "playing".into(); + } + if !t.playable() { + l.tone = "dim".into(); + } + l +} + +/// The index in a "#" line id. +pub fn row_index(line: &str) -> Option { + line.rsplit_once('#')?.1.parse().ok() +} + +/// Plays `t` from a list: in `context` if given, else the list's tracks. +pub fn play_from(cx: &Cx, context: &str, tracks: &[Track], i: usize) { + let Some(t) = tracks.get(i) else { return }; + if !t.playable() { + cx.toast("Ez a szám nem játszható le."); + return; + } + let shuffle = cx.c.state.borrow().np.shuffle; + if context.is_empty() { + let uris: Vec = tracks.iter().filter(|t| t.playable()).map(|t| t.uri.clone()).collect(); + let start = uris.iter().position(|u| *u == t.uri).unwrap_or(0) as u32; + cx.play(Cmd::Tracks { uris, start }); + } else { + cx.play(Cmd::Context { uri: context.to_string(), start: Some(Start::Uri(t.uri.clone())), shuffle }); + } +} + +/// Opens the page of a card id (see the module docs); true if it was one. +pub fn open_card(cx: &Cx, key: &str) -> bool { + if key == "liked" { + cx.push(Box::new(collection::Collection::liked())); + } else if let Some(id) = key.strip_prefix("al:") { + cx.push(Box::new(collection::Collection::album(id))); + } else if let Some(id) = key.strip_prefix("pl:") { + cx.push(Box::new(collection::Collection::playlist(id))); + } else if let Some(id) = key.strip_prefix("sh:") { + cx.push(Box::new(collection::Collection::show(id))); + } else if let Some(id) = key.strip_prefix("ar:") { + cx.push(Box::new(artist::ArtistPage::new(id))); + } else if let Some(rest) = key.strip_prefix("t:") { + let (uri, context) = rest.split_once('|').unwrap_or((rest, "")); + let shuffle = cx.c.state.borrow().np.shuffle; + if context.is_empty() { + cx.play(Cmd::Tracks { uris: vec![uri.to_string()], start: 0 }); + } else { + cx.play(Cmd::Context { uri: context.to_string(), start: Some(Start::Uri(uri.to_string())), shuffle }); + } + } else { + return false; + } + true +} + +/// The "+" of a track row: queue, like, album, artist. +pub fn track_menu(cx: &Cx, t: &Track) { + let c = cx.c.clone(); + let t = t.clone(); + let api = cx.api(); + let id = t.id.clone(); + let episode = t.kind == "episode"; + task::spawn( + move || if episode || id.is_empty() { None } else { api.liked_contains(&[id]).ok().and_then(|v| v.first().copied()) }, + move |liked| open_track_menu(&c, t, liked), + ); +} + +fn open_track_menu(c: &Controller, t: Track, liked: Option) { + let mut items: Vec<(String, String, bool)> = vec![("Hozzáadás a lejátszási sorhoz".into(), String::new(), false)]; + let mut actions: Vec<&str> = vec!["queue"]; + if let Some(l) = liked { + items.push((if l { "Eltávolítás a Kedvelt dalok közül" } else { "Hozzáadás a Kedvelt dalokhoz" }.into(), String::new(), false)); + actions.push(if l { "unlike" } else { "like" }); + } + if let Some(a) = t.album.as_ref().filter(|a| !a.id.is_empty()) { + items.push(("Album megnyitása".into(), a.name.clone(), false)); + actions.push("album"); + } + for a in t.artists.iter().filter(|a| !a.id.is_empty()).take(3) { + items.push(("Előadó megnyitása".into(), a.name.clone(), false)); + actions.push("artist"); + } + if let Some(s) = t.show.as_ref().filter(|s| !s.id.is_empty()) { + items.push(("Podcast megnyitása".into(), s.name.clone(), false)); + actions.push("show"); + } + let title = t.name.clone(); + c.open_select( + &title, + items, + Box::new(move |c: &Controller, i: usize| { + let api = c.api(); + let c2 = c.clone(); + match actions.get(i).copied() { + Some("queue") => { + let uri = t.uri.clone(); + task::spawn( + move || api.add_to_queue(&uri), + move |r| match r { + Ok(()) => c2.toast("Hozzáadva a lejátszási sorhoz", false), + Err(e) if api::status_of(&e) == Some(404) => c2.toast("Előbb indíts el valamit, utána lehet a sorba tenni.", true), + Err(e) => c2.toast(&api::describe(&e), true), + }, + ); + } + Some(a @ ("like" | "unlike")) => { + let on = a == "like"; + let id = t.id.clone(); + task::spawn( + move || api.set_liked(&id, on), + move |r| match r { + Ok(()) => c2.toast(if on { "Hozzáadva a Kedvelt dalokhoz" } else { "Eltávolítva a Kedvelt dalok közül" }, false), + Err(e) => c2.toast(&api::describe(&e), true), + }, + ); + } + Some("album") => c.push_screen(Box::new(collection::Collection::album(&t.album.as_ref().unwrap().id))), + Some("artist") => { + // Which artist: the n-th artist entry of the menu. + let first = actions.iter().position(|a| *a == "artist").unwrap_or(i); + if let Some(a) = t.artists.iter().filter(|a| !a.id.is_empty()).nth(i - first) { + c.push_screen(Box::new(artist::ArtistPage::new(&a.id))); + } + } + Some("show") => c.push_screen(Box::new(collection::Collection::show(&t.show.as_ref().unwrap().id))), + _ => {} + } + }), + ); +} diff --git a/src/screens/search.rs b/src/screens/search.rs new file mode 100644 index 0000000..b959029 --- /dev/null +++ b/src/screens/search.rs @@ -0,0 +1,101 @@ +//! Keresés: the on-screen keyboard, then songs (rows), artists, albums, +//! playlists and podcasts (cards). + +use std::any::Any; + +use crate::api::SearchResult; +use crate::app::{Cx, Screen}; +use crate::page::{Frame, Kind, L, Spec}; +use crate::screens::{self, Load, album_card, artist_card, playlist_card, row_index, show_card, track_line}; + +pub struct Search { + searched: String, + result: Option>, +} + +impl Search { + pub fn new() -> Search { + Search { searched: String::new(), result: None } + } +} + +impl Screen for Search { + fn spec(&mut self, cx: &Cx) -> Spec { + let mut lines = vec![L::page_title("title", "Mit hallgatnál?", "Dalok, előadók, albumok, lejátszási listák és podcastok."), L::new("kb", Kind::Keyboard)]; + match &self.result { + None => lines.push(L::notice("hint", "info", "Kezdj el gépelni", "Két betű elég.")), + Some(Load::Loading) => lines.push(L::text("loading", "Keresés…", "caption")), + Some(Load::Failed(e)) => lines.push(L::notice("error", "bad", "Nem sikerült keresni", e.clone())), + Some(Load::Ready(r)) if r.tracks.is_empty() && r.artists.is_empty() && r.albums.is_empty() && r.playlists.is_empty() && r.shows.is_empty() => { + lines.push(L::notice("none", "info", "Erre nincs találat", "Próbáld másképp írni.")) + } + Some(Load::Ready(r)) => { + let playing = cx.playing_uri(); + if !r.tracks.is_empty() { + lines.push(L::heading("songs", "Dalok")); + for (i, t) in r.tracks.iter().take(6).enumerate() { + lines.push(track_line(format!("trk#{i}"), t, None, true, &playing)); + } + } + if !r.artists.is_empty() { + lines.push(L::cards("artists", "Előadók", "round", r.artists.iter().map(artist_card).collect()).captions()); + } + if !r.albums.is_empty() { + lines.push(L::cards("albums", "Albumok", "square", r.albums.iter().map(album_card).collect()).captions()); + } + if !r.playlists.is_empty() { + lines.push(L::cards("playlists", "Lejátszási listák", "square", r.playlists.iter().map(playlist_card).collect()).captions()); + } + if !r.shows.is_empty() { + lines.push(L::cards("shows", "Podcastok", "square", r.shows.iter().map(show_card).collect()).captions()); + } + } + } + Spec { lines, frame: Frame { nav: Some(1), keyboard: Some("Előadó, dal vagy podcast".into()), ..Frame::default() } } + } + + fn query(&mut self, cx: &Cx, text: &str, _submit: bool) { + let q = text.trim().to_string(); + if q.chars().count() < 2 { + self.result = None; + self.searched.clear(); + cx.refresh(); + return; + } + if q == self.searched { + return; + } + self.searched = q.clone(); + self.result = Some(Load::Loading); + let api = cx.api(); + cx.spawn::(move || (api.search(&q), q), |s, _cx, (r, q)| { + if s.searched == q { + s.result = Some(Load::from(r)); + } + }); + cx.refresh(); + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + if line.starts_with("trk#") { + let Some(Load::Ready(r)) = &self.result else { return }; + let Some(i) = row_index(line) else { return }; + let tracks: Vec<_> = r.tracks.iter().take(6).cloned().collect(); + if item == "more" { + if let Some(t) = tracks.get(i) { + screens::track_menu(cx, t); + } + } else if let Some(t) = tracks.get(i) { + // A found song plays in its album. + let context = t.album.as_ref().map(|a| a.uri.clone()).unwrap_or_default(); + screens::play_from(cx, &context, &tracks, i); + } + return; + } + screens::open_card(cx, item); + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/screens/settings.rs b/src/screens/settings.rs new file mode 100644 index 0000000..ccc7d47 --- /dev/null +++ b/src/screens/settings.rs @@ -0,0 +1,96 @@ +//! Beállítások: the account (sign out), the Connect name, sound quality, +//! loudness normalisation, autoplay, the look. + +use std::any::Any; + +use crate::app::{Cx, Input, Screen}; +use crate::page::{Ch, Frame, L, Spec}; + +pub struct Settings; + +impl Settings { + pub fn new() -> Settings { + Settings + } +} + +const RESTART: &str = "Az app következő indításakor lép életbe."; + +impl Screen for Settings { + fn spec(&mut self, cx: &Cx) -> Spec { + let cfg = cx.cfg(); + let user = cx.user(); + let mut lines = vec![L::page_title("title", "Beállítások", "")]; + + lines.push(L::heading("acc-h", "Fiók")); + let plan = match user.product.as_str() { + "premium" => "Premium", + "" => "", + _ => "Ingyenes fiók: a lejátszáshoz Premium kell", + }; + let meta = [plan.to_string(), user.country.clone()].into_iter().filter(|s| !s.is_empty()).collect::>().join(" · "); + let name = if user.name().is_empty() { "Spotify fiók".to_string() } else { user.name() }; + lines.push(L::item("account", name, meta, "Kijelentkezés után a TV újra a telefonról kér bejelentkezést.", vec![Ch::new("signout", "Kijelentkezés").tone("danger")])); + + lines.push(L::heading("dev-h", "Spotify Connect")); + lines.push(L::chips("name", "", vec![Ch::field("name", &cfg.device_name, "A TV neve", "tv")])); + lines.push(L::text("name-note", format!("A telefon ezen a néven mutatja a TV-t. {RESTART}"), "caption")); + + lines.push(L::heading("play-h", "Lejátszás")); + let q = |id: &str, t: &str, v: u32| Ch::new(id, t).active(cfg.bitrate == v); + lines.push(L::chips("quality", "HANGMINŐSÉG", vec![q("96", "Alacsony · 96 kbit/s", 96), q("160", "Normál · 160 kbit/s", 160), q("320", "Nagyon magas · 320 kbit/s", 320)])); + lines.push(L::chips("normalise", "HANGERŐ-KIEGYENLÍTÉS", vec![Ch::new("on", "Be").active(cfg.normalise), Ch::new("off", "Ki").active(!cfg.normalise)])); + lines.push(L::chips("autoplay", "AUTOMATIKUS LEJÁTSZÁS A LISTA VÉGÉN", vec![Ch::new("on", "Be").active(cfg.autoplay), Ch::new("off", "Ki").active(!cfg.autoplay)])); + lines.push(L::text("play-note", RESTART, "caption")); + + lines.push(L::heading("look-h", "Megjelenés")); + let g = |id: &str, t: &str| Ch::new(id, t).active(cfg.glass == id); + lines.push(L::chips("glass", "", vec![g("auto", "Automatikus"), g("full", "Teljes üveg"), g("light", "Könnyű üveg"), g("off", "Matt")])); + lines.push(L::text("look-note", "Automatikus: a TV a grafikus chip ereje szerint választ.", "caption")); + lines.push(L::text("about", format!("Spotify for Fennec OS {} · librespot", env!("CARGO_PKG_VERSION")), "caption")); + Spec { lines, frame: Frame { nav: Some(3), ..Frame::default() } } + } + + fn activate(&mut self, cx: &Cx, line: &str, item: &str) { + match line { + "account" => cx.select::( + "Kijelentkezel?", + vec![("Kijelentkezés".into(), String::new(), false), ("Mégse".into(), String::new(), true)], + |_, cx, i| { + if i == 0 { + cx.c.sign_out(); + } + }, + ), + "name" => { + let cur = cx.cfg().device_name; + cx.input::( + Input { title: "A TV neve".into(), subtitle: "Ezen a néven látod a telefon Spotify appjában".into(), placeholder: "Fennec TV".into(), value: cur, submit: "Mentés".into(), min: 1 }, + |_, cx, text| { + let t = text.trim().to_string(); + if !t.is_empty() { + cx.set_cfg(|c| c.device_name = t); + cx.toast(RESTART); + } + }, + ); + } + "quality" => { + if let Ok(v) = item.parse() { + cx.set_cfg(|c| c.bitrate = v); + } + } + "normalise" => cx.set_cfg(|c| c.normalise = item == "on"), + "autoplay" => cx.set_cfg(|c| c.autoplay = item == "on"), + "glass" => { + cx.set_cfg(|c| c.glass = item.to_string()); + crate::config::apply_look(&cx.c.glass, item); + } + _ => {} + } + } + + fn as_any(&mut self) -> &mut dyn Any { + self + } +} diff --git a/src/spotify.rs b/src/spotify.rs new file mode 100644 index 0000000..363d84a --- /dev/null +++ b/src/spotify.rs @@ -0,0 +1,690 @@ +//! The Spotify side: a librespot session with Spotify Connect (Spirc), the +//! zeroconf sign-in and the player. It runs on its own tokio runtime; the UI +//! sends `Cmd`s and gets `Event`s on the UI thread. +//! +//! Sign-in, two ways at once (whichever comes first): +//! - Spotify Connect: the TV announces itself on the local network +//! (zeroconf). The Spotify app on a phone lists it among its devices; +//! picking it hands over the credentials. +//! - Pairing code (OAuth device flow, like Spotify's own TV apps): the TV +//! shows a QR code and a short code; the phone signs in at +//! spotify.com/pair, the TV polls for the token. +//! +//! The credentials are kept in `$HOME/.cache/spotify-tv` for the next start. +//! A Premium account is needed (librespot plays nothing else). +//! +//! Playback goes through Spirc, so the TV is a full Connect device: the phone +//! can control it, and playback can move between the TV and other devices. + +use std::path::PathBuf; +use std::sync::{Arc, Mutex}; +use std::time::Duration; + +use futures_util::StreamExt; +use librespot_connect::{ConnectConfig, LoadContextOptions, LoadRequest, LoadRequestOptions, Options, PlayingTrack, Spirc}; +use librespot_core::authentication::Credentials; +use librespot_core::cache::Cache; +use librespot_core::config::{DeviceType, SessionConfig}; +use librespot_core::{Session, SpotifyId}; +use librespot_metadata::audio::{AudioItem, UniqueFields}; +use librespot_playback::audio_backend; +use librespot_playback::config::{AudioFormat, Bitrate, PlayerConfig}; +use librespot_playback::mixer::{self, MixerConfig}; +use librespot_playback::player::{Player, PlayerEvent}; +use tokio::sync::mpsc; + +use crate::config::Config; + +/// Scopes of the Web API token (browsing, library, queue). +const SCOPES: &str = "user-read-private,user-read-email,playlist-read-private,playlist-read-collaborative,playlist-modify-private,playlist-modify-public,user-library-read,user-library-modify,user-follow-read,user-follow-modify,user-top-read,user-read-recently-played,user-read-playback-state,user-modify-playback-state,user-read-currently-playing,streaming"; + +/// The track (or episode) that plays. +#[derive(Debug, Clone, Default, PartialEq)] +pub struct Track { + pub uri: String, + /// Base62 id. + pub id: String, + pub name: String, + pub artists: Vec<(String, String)>, + pub album: String, + pub cover: String, + pub duration_ms: u32, + pub episode: bool, + pub explicit: bool, +} + +impl Track { + pub fn artist_names(&self) -> String { + self.artists.iter().map(|a| a.1.as_str()).collect::>().join(", ") + } +} + +#[derive(Debug, Clone, PartialEq)] +pub enum Status { + /// No credentials: waiting for a phone (device name). + SignIn(String), + Connecting, + /// Signed in (user name). + Ready(String), + Failed(String), +} + +/// A pairing code for spotify.com/pair. +#[derive(Debug, Clone, PartialEq)] +pub struct Pair { + pub code: String, + /// Opens the pairing page with the code filled in (the QR code). + pub url: String, +} + +#[derive(Debug, Clone)] +pub enum Event { + Status(Status), + /// A new pairing code (None: none could be had, e.g. no network). + Pair(Option), + Track(Track), + Loading, + Playing(u32), + Paused(u32), + Seeked(u32), + Stopped, + Unavailable, + Shuffle(bool), + Repeat(bool, bool), + /// This TV became (or stopped being) the active Connect device. + Active(bool), + /// Another device (its name) took over the playback. + Client(String), +} + +pub enum Cmd { + /// Plays `context` (an album, playlist, artist, show, "spotify:user::collection"), + /// from track `start` (a uri) or index, optionally shuffled. + Context { uri: String, start: Option, shuffle: bool }, + /// Plays a list of track uris from index `start`. + Tracks { uris: Vec, start: u32 }, + PlayPause, + Play, + Pause, + Next, + Prev, + Seek(u32), + Shuffle(bool), + /// (context, track) + Repeat(bool, bool), + SignOut, + /// The app closes: leave Spotify Connect cleanly. + Quit, +} + +#[derive(Debug, Clone)] +pub enum Start { + Uri(String), +} + +/// Cheap to clone; usable from any thread. +#[derive(Clone)] +pub struct Engine { + rt: Arc, + cmd: mpsc::UnboundedSender, + session: Arc>>, + /// Mock mode (UI work without an account): no librespot at all. + mock: bool, + /// Set when the engine's loop has ended (after `Cmd::Quit`). + stopped: Arc, +} + +fn cache_dir() -> PathBuf { + crate::config::home().join(".cache").join("spotify-tv") +} + +impl Engine { + /// Starts the engine; `events` is called on a runtime thread. + pub fn start(cfg: &Config, events: impl Fn(Event) + Send + Sync + 'static) -> Engine { + let rt = Arc::new(tokio::runtime::Builder::new_multi_thread().worker_threads(2).enable_all().thread_name("spotify").build().expect("tokio runtime")); + let (tx, rx) = mpsc::unbounded_channel(); + let session = Arc::new(Mutex::new(None)); + let mock = std::env::var_os("SPOTIFY_MOCK").is_some(); + let stopped = Arc::new(std::sync::atomic::AtomicBool::new(false)); + let engine = Engine { rt: rt.clone(), cmd: tx, session: session.clone(), mock, stopped: stopped.clone() }; + let events: Arc = Arc::new(events); + let cfg = cfg.clone(); + rt.spawn(async move { + if mock { + mock_loop(rx, events).await; + } else { + run(cfg, rx, session, events).await; + } + stopped.store(true, std::sync::atomic::Ordering::SeqCst); + }); + // The TV closes background apps with SIGTERM: leave like Back does. + #[cfg(unix)] + rt.spawn(async { + if let Ok(mut term) = tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate()) { + term.recv().await; + log::info!("SIGTERM"); + let _ = slint::invoke_from_event_loop(|| { + let _ = slint::quit_event_loop(); + }); + } + }); + engine + } + + /// Leaves Spotify Connect (the phone sees the TV go), waiting at most + /// `limit` for it. + pub fn shutdown(&self, limit: Duration) { + self.send(Cmd::Quit); + let start = std::time::Instant::now(); + while !self.stopped.load(std::sync::atomic::Ordering::SeqCst) && start.elapsed() < limit { + std::thread::sleep(Duration::from_millis(20)); + } + } + + pub fn send(&self, c: Cmd) { + let _ = self.cmd.send(c); + } + + fn session(&self) -> anyhow::Result { + self.session.lock().unwrap().clone().filter(|s| !s.is_invalid()).ok_or_else(|| anyhow::anyhow!("Nincs kapcsolat a Spotifyjal")) + } + + /// A Web API access token (blocking; call it off the UI thread). + pub fn token(&self) -> anyhow::Result { + if self.mock { + return Ok("mock".into()); + } + let s = self.session()?; + let t = self.rt.block_on(async move { tokio::time::timeout(Duration::from_secs(15), s.token_provider().get_token(SCOPES)).await }); + match t { + Ok(Ok(t)) => Ok(t.access_token), + Ok(Err(e)) => Err(anyhow::anyhow!("token: {e}")), + Err(_) => Err(anyhow::anyhow!("A Spotify nem válaszolt")), + } + } + + /// Lyrics of a track: (start ms, line), and whether they are synced. + pub fn lyrics(&self, track_id: &str) -> anyhow::Result<(Vec<(u32, String)>, bool)> { + if self.mock { + let lines = ["Ez itt egy dal szövege", "A második sor jön utána", "Aztán a refrén, hangosan", "És még egyszer, halkabban", "", "Vége a versszaknak"]; + return Ok((lines.iter().enumerate().map(|(i, l)| (i as u32 * 4000, l.to_string())).collect(), true)); + } + let s = self.session()?; + let id = SpotifyId::from_base62(track_id).map_err(|e| anyhow::anyhow!("{e}"))?; + let body = self.rt.block_on(async move { s.spclient().get_lyrics(&id).await }).map_err(|e| anyhow::anyhow!("{e}"))?; + parse_lyrics(&body) + } +} + +/// Spotify's color-lyrics JSON -> lines. +pub fn parse_lyrics(body: &[u8]) -> anyhow::Result<(Vec<(u32, String)>, bool)> { + let v: serde_json::Value = serde_json::from_slice(body)?; + let l = &v["lyrics"]; + let synced = l["syncType"].as_str() == Some("LINE_SYNCED"); + let lines = l["lines"] + .as_array() + .map(|a| { + a.iter() + .map(|x| { + let t = x["startTimeMs"].as_str().and_then(|s| s.parse().ok()).or_else(|| x["startTimeMs"].as_u64().map(|v| v as u32)).unwrap_or(0); + let w = x["words"].as_str().unwrap_or("").replace('♪', "").trim().to_string(); + (t, w) + }) + .collect() + }) + .unwrap_or_default(); + Ok((lines, synced)) +} + +fn track_of(item: &AudioItem) -> Track { + let id = item.track_id.to_id().unwrap_or_default(); + let cover = item.covers.iter().max_by_key(|c| c.width).map(|c| c.url.clone()).unwrap_or_default(); + let (artists, album, episode) = match &item.unique_fields { + UniqueFields::Track { artists, album, .. } => ( + artists.0.iter().map(|a| (a.id.to_id().unwrap_or_default(), a.name.clone())).collect(), + album.clone(), + false, + ), + UniqueFields::Episode { show_name, .. } => (vec![(String::new(), show_name.clone())], show_name.clone(), true), + UniqueFields::Local { artists, album, .. } => (artists.iter().map(|a| (String::new(), a.clone())).collect(), album.clone().unwrap_or_default(), false), + }; + Track { uri: item.uri.clone(), id, name: item.name.clone(), artists, album, cover, duration_ms: item.duration_ms, episode, explicit: item.is_explicit } +} + +fn bitrate(b: u32) -> Bitrate { + match b { + 96 => Bitrate::Bitrate96, + 320 => Bitrate::Bitrate320, + _ => Bitrate::Bitrate160, + } +} + +fn load_request(c: Cmd) -> Option { + match c { + Cmd::Context { uri, start, shuffle } => { + let options = LoadRequestOptions { + start_playing: true, + seek_to: 0, + context_options: Some(LoadContextOptions::Options(Options { shuffle, repeat: false, repeat_track: false })), + playing_track: start.map(|Start::Uri(u)| PlayingTrack::Uri(u)), + }; + Some(LoadRequest::from_context_uri(uri, options)) + } + Cmd::Tracks { uris, start } => { + let options = LoadRequestOptions { start_playing: true, seek_to: 0, context_options: None, playing_track: Some(PlayingTrack::Index(start)) }; + Some(LoadRequest::from_tracks(uris, options)) + } + _ => None, + } +} + +async fn run(cfg: Config, mut rx: mpsc::UnboundedReceiver, shared: Arc>>, events: Arc) { + let dir = cache_dir(); + let cache = match Cache::new(Some(dir.clone()), Some(dir.clone()), Some(dir.join("audio")), Some(512 << 20)) { + Ok(c) => Some(c), + Err(e) => { + log::warn!("cache: {e}"); + None + } + }; + let mut session_config = SessionConfig::default(); + session_config.device_id = cfg.device_id.clone(); + session_config.autoplay = Some(cfg.autoplay); + let connect_config = ConnectConfig { + name: cfg.device_name.clone(), + device_type: DeviceType::Tv, + is_group: false, + // The TV sets the loudness; Spotify plays at full scale. + initial_volume: u16::MAX, + disable_volume: false, + volume_steps: 64, + }; + let player_config = PlayerConfig { bitrate: bitrate(cfg.bitrate), normalisation: cfg.normalise, gapless: true, ..PlayerConfig::default() }; + + let mixer = match mixer::find(None).map(|m| m(MixerConfig::default())) { + Some(Ok(m)) => m, + _ => { + events(Event::Status(Status::Failed("A hangkeverő nem indult el".into()))); + return; + } + }; + #[cfg(target_os = "linux")] + let backend = audio_backend::find(Some("gstreamer".into())); + #[cfg(not(target_os = "linux"))] + let backend = audio_backend::find(None); + let Some(backend) = backend else { + events(Event::Status(Status::Failed("Nincs hangkimenet".into()))); + return; + }; + + let mut session = Session::new(session_config.clone(), cache.clone()); + let player = Player::new(player_config, session.clone(), mixer.get_soft_volume(), move || backend(None, AudioFormat::default())); + *shared.lock().unwrap() = Some(session.clone()); + + // Player events -> UI. + { + let mut ch = player.get_player_event_channel(); + let events = events.clone(); + tokio::spawn(async move { + while let Some(ev) = ch.recv().await { + if let Some(e) = player_event(ev) { + events(e); + } + } + }); + } + + // Zeroconf: the phone signs in (or switches the account). + let mut discovery = match librespot_discovery::Discovery::builder(session_config.device_id.clone(), session_config.client_id.clone()) + .name(cfg.device_name.clone()) + .device_type(DeviceType::Tv) + .launch() + { + Ok(d) => Some(d), + Err(e) => { + log::warn!("discovery: {e}"); + None + } + }; + + // Pairing codes: run while signed out. + let (pair_tx, mut pair_rx) = mpsc::unbounded_channel::(); + let mut pairing: Option> = None; + let start_pairing = |pairing: &mut Option>| { + if pairing.as_ref().is_none_or(|p| p.is_finished()) { + *pairing = Some(tokio::spawn(pair_loop(session_config.client_id.clone(), events.clone(), pair_tx.clone()))); + } + }; + + let mut credentials: Option = cache.as_ref().and_then(Cache::credentials); + let mut connecting = credentials.is_some(); + if connecting { + events(Event::Status(Status::Connecting)); + } else { + events(Event::Status(Status::SignIn(cfg.device_name.clone()))); + start_pairing(&mut pairing); + } + + let mut spirc: Option = None; + let mut spirc_task: Option + Send>>> = None; + let mut failures = 0u32; + // Commands that came before Spirc was up (a load right after sign-in). + let mut waiting: Vec = Vec::new(); + + loop { + tokio::select! { + creds = async { match discovery.as_mut() { Some(d) => d.next().await, None => std::future::pending().await } } => { + let Some(creds) = creds else { + log::warn!("discovery stopped"); + discovery = None; + continue; + }; + log::info!("signed in from the network"); + if let Some(p) = pairing.take() { p.abort(); } + if let Some(s) = spirc.take() { let _ = s.shutdown(); } + if let Some(t) = spirc_task.take() { tokio::spawn(t); } + if !session.is_invalid() { session.shutdown(); } + credentials = Some(creds); + failures = 0; + connecting = true; + events(Event::Status(Status::Connecting)); + } + creds = pair_rx.recv() => { + let Some(creds) = creds else { continue }; + log::info!("signed in with a pairing code"); + pairing = None; + if let Some(s) = spirc.take() { let _ = s.shutdown(); } + if let Some(t) = spirc_task.take() { tokio::spawn(t); } + if !session.is_invalid() { session.shutdown(); } + credentials = Some(creds); + failures = 0; + connecting = true; + events(Event::Status(Status::Connecting)); + } + _ = async {}, if connecting => { + connecting = false; + if session.is_invalid() { + session = Session::new(session_config.clone(), cache.clone()); + player.set_session(session.clone()); + *shared.lock().unwrap() = Some(session.clone()); + } + let creds = credentials.clone().unwrap_or_default(); + match Spirc::new(connect_config.clone(), session.clone(), creds, player.clone(), mixer.clone()).await { + Ok((s, task)) => { + for c in waiting.drain(..) { apply(&s, c); } + spirc = Some(s); + spirc_task = Some(Box::pin(task)); + *shared.lock().unwrap() = Some(session.clone()); + events(Event::Status(Status::Ready(session.username()))); + } + Err(e) => { + log::warn!("connect: {e}"); + let msg = e.to_string(); + // Bad credentials: sign in again from the phone. + if msg.contains("BadCredentials") || msg.contains("PremiumAccountRequired") || msg.contains("Login failed") { + if let Some(c) = &cache { let _ = std::fs::remove_file(cache_dir().join("credentials.json")); let _ = c; } + credentials = None; + let text = if msg.contains("Premium") { "Ehhez Spotify Premium előfizetés kell." } else { "A bejelentkezés lejárt." }; + events(Event::Status(Status::Failed(format!("{text} Jelentkezz be újra a telefonról.")))); + events(Event::Status(Status::SignIn(cfg.device_name.clone()))); + start_pairing(&mut pairing); + } else { + failures += 1; + events(Event::Status(Status::Failed(format!("Nem sikerült csatlakozni a Spotifyhoz: {msg}")))); + let delay = Duration::from_secs((2u64 << failures.min(5)).min(60)); + tokio::time::sleep(delay).await; + connecting = credentials.is_some(); + if connecting { events(Event::Status(Status::Connecting)); } + } + } + } + } + _ = async { if let Some(t) = spirc_task.as_mut() { t.await } else { std::future::pending().await } } => { + // Spirc ended: the connection broke. Reconnect. + log::warn!("connect ended, reconnecting"); + spirc_task = None; + spirc = None; + if credentials.is_some() { + failures += 1; + tokio::time::sleep(Duration::from_secs((1u64 << failures.min(5)).min(30))).await; + connecting = true; + events(Event::Status(Status::Connecting)); + } + } + cmd = rx.recv() => { + let Some(cmd) = cmd else { break }; + if matches!(cmd, Cmd::Quit) { break; } + if matches!(cmd, Cmd::SignOut) { + if let Some(s) = spirc.take() { let _ = s.shutdown(); } + if let Some(t) = spirc_task.take() { tokio::spawn(t); } + player.stop(); + if !session.is_invalid() { session.shutdown(); } + let _ = std::fs::remove_file(cache_dir().join("credentials.json")); + credentials = None; + events(Event::Stopped); + events(Event::Status(Status::SignIn(cfg.device_name.clone()))); + start_pairing(&mut pairing); + continue; + } + match &spirc { + Some(s) => { failures = 0; apply(s, cmd) } + None => waiting.push(cmd), + } + } + } + } + if let Some(s) = spirc.take() { + let _ = s.shutdown(); + } + if let Some(t) = spirc_task.take() { + let _ = tokio::time::timeout(Duration::from_secs(2), t).await; + } + if let Some(p) = pairing { + p.abort(); + } + if let Some(d) = discovery { + d.shutdown().await; + } +} + +// ---------------------------------------------------------------------------- pairing + +const ACCOUNTS: &str = "https://accounts.spotify.com"; +/// The scopes librespot asks for when signing in with a token. +const PAIR_SCOPES: &str = "app-remote-control playlist-modify playlist-modify-private playlist-modify-public playlist-read playlist-read-collaborative playlist-read-private streaming ugc-image-upload user-follow-modify user-follow-read user-library-modify user-library-read user-modify user-modify-playback-state user-modify-private user-personalized user-read-currently-playing user-read-email user-read-play-history user-read-playback-position user-read-playback-state user-read-private user-read-recently-played user-top-read"; + +struct DeviceCode { + device_code: String, + pair: Pair, + interval: u64, + expires: u64, +} + +enum Poll { + Pending, + SlowDown, + Token(String), + /// Expired or refused: a new code is needed. + Over, +} + +fn form(pairs: &[(&str, &str)]) -> String { + pairs.iter().map(|(k, v)| format!("{k}={}", crate::api::enc(v))).collect::>().join("&") +} + +fn post_form(path: &str, body: String) -> anyhow::Result<(u16, serde_json::Value)> { + let agent: ureq::Agent = ureq::Agent::config_builder().timeout_global(Some(Duration::from_secs(20))).http_status_as_error(false).build().into(); + let resp = agent.post(&format!("{ACCOUNTS}{path}")).header("Content-Type", "application/x-www-form-urlencoded").send(body)?; + let status = resp.status().as_u16(); + let text = resp.into_body().read_to_string()?; + Ok((status, serde_json::from_str(&text).unwrap_or_default())) +} + +fn request_code(client_id: &str) -> anyhow::Result { + let (status, v) = post_form("/oauth2/device/authorize", form(&[("client_id", client_id), ("scope", PAIR_SCOPES)]))?; + let s = |k: &str| v[k].as_str().unwrap_or("").to_string(); + if status != 200 || s("device_code").is_empty() { + anyhow::bail!("pairing code: {status} {v}"); + } + let url = if s("verification_uri_complete").is_empty() { s("verification_uri") } else { s("verification_uri_complete") }; + Ok(DeviceCode { + device_code: s("device_code"), + pair: Pair { code: s("user_code"), url }, + interval: v["interval"].as_u64().unwrap_or(5).max(2), + expires: v["expires_in"].as_u64().unwrap_or(600), + }) +} + +fn poll_token(client_id: &str, device_code: &str) -> anyhow::Result { + let (status, v) = post_form("/api/token", form(&[("grant_type", "urn:ietf:params:oauth:grant-type:device_code"), ("device_code", device_code), ("client_id", client_id)]))?; + if status == 200 { + if let Some(t) = v["access_token"].as_str() { + return Ok(Poll::Token(t.to_string())); + } + } + Ok(match v["error"].as_str().unwrap_or("") { + "authorization_pending" => Poll::Pending, + "slow_down" => Poll::SlowDown, + _ => Poll::Over, + }) +} + +/// Shows pairing codes (a new one when one expires) until the phone signs in. +async fn pair_loop(client_id: String, events: Arc, done: mpsc::UnboundedSender) { + loop { + let cid = client_id.clone(); + let code = match tokio::task::spawn_blocking(move || request_code(&cid)).await { + Ok(Ok(c)) => c, + other => { + if let Ok(Err(e)) = other { + log::warn!("{e:#}"); + } + events(Event::Pair(None)); + tokio::time::sleep(Duration::from_secs(15)).await; + continue; + } + }; + events(Event::Pair(Some(code.pair.clone()))); + let deadline = std::time::Instant::now() + Duration::from_secs(code.expires.saturating_sub(10)); + let mut interval = code.interval; + while std::time::Instant::now() < deadline { + tokio::time::sleep(Duration::from_secs(interval)).await; + let (cid, dc) = (client_id.clone(), code.device_code.clone()); + match tokio::task::spawn_blocking(move || poll_token(&cid, &dc)).await { + Ok(Ok(Poll::Token(t))) => { + let _ = done.send(Credentials::with_access_token(t)); + return; + } + Ok(Ok(Poll::SlowDown)) => interval += 5, + Ok(Ok(Poll::Over)) => break, + Ok(Ok(Poll::Pending)) => {} + // Network trouble: keep the code, try again. + Ok(Err(e)) => log::info!("pairing poll: {e:#}"), + Err(_) => {} + } + } + } +} + +fn apply(s: &Spirc, c: Cmd) { + let r = match c { + Cmd::Context { .. } | Cmd::Tracks { .. } => { + let req = load_request(c).unwrap(); + // The TV takes the playback over (it may be on the phone). + let _ = s.activate(); + s.load(req) + } + Cmd::PlayPause => s.play_pause(), + Cmd::Play => s.activate().and_then(|_| s.play()), + Cmd::Pause => s.pause(), + Cmd::Next => s.next(), + Cmd::Prev => s.prev(), + Cmd::Seek(ms) => s.set_position_ms(ms), + Cmd::Shuffle(on) => s.shuffle(on), + Cmd::Repeat(ctx, track) => s.repeat(ctx).and_then(|_| s.repeat_track(track)), + Cmd::SignOut | Cmd::Quit => Ok(()), + }; + if let Err(e) = r { + log::warn!("command: {e}"); + } +} + +fn player_event(ev: PlayerEvent) -> Option { + Some(match ev { + PlayerEvent::TrackChanged { audio_item } => Event::Track(track_of(&audio_item)), + PlayerEvent::Loading { .. } => Event::Loading, + PlayerEvent::Playing { position_ms, .. } => Event::Playing(position_ms), + PlayerEvent::Paused { position_ms, .. } => Event::Paused(position_ms), + PlayerEvent::Seeked { position_ms, .. } | PlayerEvent::PositionCorrection { position_ms, .. } => Event::Seeked(position_ms), + PlayerEvent::Stopped { .. } => Event::Stopped, + PlayerEvent::Unavailable { .. } => Event::Unavailable, + PlayerEvent::ShuffleChanged { shuffle } => Event::Shuffle(shuffle), + PlayerEvent::RepeatChanged { context, track } => Event::Repeat(context, track), + PlayerEvent::SessionConnected { .. } => Event::Active(true), + PlayerEvent::SessionDisconnected { .. } => Event::Active(false), + PlayerEvent::SessionClientChanged { client_name, .. } => Event::Client(client_name), + _ => return None, + }) +} + +/// Mock mode: signed in at once; "plays" a made-up track for every load. +async fn mock_loop(mut rx: mpsc::UnboundedReceiver, events: Arc) { + tokio::time::sleep(Duration::from_millis(300)).await; + if std::env::var("SPOTIFY_MOCK").as_deref() == Ok("signin") { + events(Event::Status(Status::SignIn("Fennec TV".into()))); + events(Event::Pair(Some(Pair { code: "5HWPC6".into(), url: "https://spotify.com/pair?code=5HWPC6".into() }))); + std::future::pending::<()>().await; + } + events(Event::Status(Status::Ready("demo".into()))); + let mut playing = false; + let mut n = 0u32; + let track = |n: u32| Track { + uri: format!("spotify:track:mock{n}"), + id: format!("mock{n}"), + name: ["Hajnali fények", "Nyári éjszaka", "Városi zaj", "Csend a víz felett"][n as usize % 4].into(), + artists: vec![("mockartist".into(), "Demó Előadó".into())], + album: "Demó album".into(), + cover: format!("https://picsum.photos/seed/cover{}/640/640", n % 4), + duration_ms: 214_000, + episode: false, + explicit: false, + }; + while let Some(c) = rx.recv().await { + match c { + Cmd::Context { .. } | Cmd::Tracks { .. } => { + n += 1; + events(Event::Active(true)); + events(Event::Track(track(n))); + events(Event::Playing(0)); + playing = true; + } + Cmd::PlayPause => { + playing = !playing; + events(if playing { Event::Playing(30_000) } else { Event::Paused(30_000) }); + } + Cmd::Play => events(Event::Playing(30_000)), + Cmd::Pause => events(Event::Paused(30_000)), + Cmd::Next | Cmd::Prev => { + n += 1; + events(Event::Track(track(n))); + events(Event::Playing(0)); + } + Cmd::Seek(ms) => events(Event::Seeked(ms)), + Cmd::Shuffle(on) => events(Event::Shuffle(on)), + Cmd::Repeat(c, t) => events(Event::Repeat(c, t)), + Cmd::SignOut => events(Event::Status(Status::SignIn("Fennec TV".into()))), + Cmd::Quit => break, + } + } +} + +#[cfg(test)] +mod tests { + #[test] + fn parses_lyrics() { + let body = br#"{"lyrics":{"syncType":"LINE_SYNCED","lines":[{"startTimeMs":"1200","words":"Hello"},{"startTimeMs":"5300","words":""}]},"colors":{}}"#; + let (lines, synced) = super::parse_lyrics(body).unwrap(); + assert!(synced); + assert_eq!(lines, vec![(1200, "Hello".to_string()), (5300, String::new())]); + } +} diff --git a/src/task.rs b/src/task.rs new file mode 100644 index 0000000..dad1ae5 --- /dev/null +++ b/src/task.rs @@ -0,0 +1,40 @@ +//! Blocking work (HTTP calls) on a thread, its result back on the UI thread. +//! +//! `done` runs on the Slint event loop, so it may touch the UI and `Rc` +//! state; it is kept in a thread-local table while the work runs. + +use std::cell::RefCell; +use std::collections::HashMap; +use std::sync::atomic::{AtomicU64, Ordering}; + +type Done = Box)>; + +thread_local! { + static WAITING: RefCell> = RefCell::new(HashMap::new()); +} + +static NEXT: AtomicU64 = AtomicU64::new(1); + +/// Runs `work` on a new thread; `done(result)` runs on the UI thread. Call it +/// from the UI thread. +pub fn spawn(work: impl FnOnce() -> T + Send + 'static, done: impl FnOnce(T) + 'static) { + let id = NEXT.fetch_add(1, Ordering::Relaxed); + WAITING.with(|w| { + w.borrow_mut().insert( + id, + Box::new(move |any: Box| { + if let Ok(v) = any.downcast::() { + done(*v); + } + }), + ) + }); + std::thread::spawn(move || { + let result: Box = Box::new(work()); + let _ = slint::invoke_from_event_loop(move || { + if let Some(done) = WAITING.with(|w| w.borrow_mut().remove(&id)) { + done(result); + } + }); + }); +} diff --git a/tools/mock_server.py b/tools/mock_server.py new file mode 100755 index 0000000..8c53c4f --- /dev/null +++ b/tools/mock_server.py @@ -0,0 +1,171 @@ +#!/usr/bin/env python3 +"""Stand-in for the Spotify Web API (api.spotify.com/v1), for UI work and +screenshots without an account. Made-up data, pictures from picsum.photos. + + python3 tools/mock_server.py --port 7890 + SPOTIFY_MOCK=1 SPOTIFY_API=http://127.0.0.1:7890/v1 cargo run + +SPOTIFY_MOCK=1 also replaces librespot (signed in at once, fake playback); +SPOTIFY_MOCK=signin shows the sign-in screen with a sample code. +""" + +import argparse +import json +import re +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from urllib.parse import parse_qs, urlparse + + +def img(seed, size=640): + return [{"url": f"https://picsum.photos/seed/{seed}/{size}/{size}", "width": size, "height": size}, + {"url": f"https://picsum.photos/seed/{seed}/300/300", "width": 300, "height": 300}] + + +ARTISTS = ["Napfény Zenekar", "Éjféli Kék", "Hold Utca", "Kristóf Vass", "Lili és a Fények", "Déli Szél", + "Városi Zaj", "Mira", "Tisza Trió", "Galaxis", "Neon Hajnal", "Bori"] +WORDS = ["Hajnali", "Nyári", "Csendes", "Fényes", "Messzi", "Kék", "Arany", "Éjszakai", "Vad", "Puha", "Régi", "Új"] +NOUNS = ["fények", "utca", "tenger", "város", "dal", "álom", "szél", "eső", "tánc", "csillagok", "part", "hajó"] + + +def artist(i): + return {"id": f"ar{i}", "name": ARTISTS[i % len(ARTISTS)], "uri": f"spotify:artist:ar{i}", "type": "artist", + "images": img(f"artist{i}"), "followers": {"total": 12345 * (i + 3) * 17}, "genres": ["magyar pop", "indie"]} + + +def album(i): + return {"id": f"al{i}", "name": f"{WORDS[i % 12]} {NOUNS[(i * 5) % 12]}", "uri": f"spotify:album:al{i}", + "images": img(f"album{i}"), "artists": [{"id": f"ar{i % 12}", "name": ARTISTS[i % 12], "uri": f"spotify:artist:ar{i % 12}"}], + "release_date": f"{2010 + i % 15}-0{1 + i % 9}-1{i % 9}", "total_tracks": 10, "album_type": "album" if i % 3 else "single", + "label": "Fennec Records"} + + +def track(i, with_album=True): + a = album(i // 10) + t = {"id": f"tr{i}", "name": f"{WORDS[(i * 7) % 12]} {NOUNS[(i * 3) % 12]}", "uri": f"spotify:track:tr{i}", "type": "track", + "duration_ms": 150000 + (i * 7919) % 120000, "explicit": i % 7 == 0, "track_number": i % 10 + 1, + "artists": [{"id": f"ar{i % 12}", "name": ARTISTS[i % 12], "uri": f"spotify:artist:ar{i % 12}"}]} + if with_album: + t["album"] = a + return t + + +def playlist(i): + names = ["Reggeli kávé", "Edzés", "Esti nyugalom", "Road trip", "Fókusz", "Buli", "Magyar slágerek", "Discover Weekly", + "Release Radar", "Chill", "Gitáros", "Retro 80s"] + return {"id": f"pl{i}", "name": names[i % len(names)], "uri": f"spotify:playlist:pl{i}", "images": img(f"pl{i}"), + "description": "Válogatás a legjobbakból & még több.", "owner": {"id": "demo" if i < 4 else "spotify", + "display_name": "Demó" if i < 4 else "Spotify"}, "tracks": {"total": 40}, "followers": {"total": 1200 * (i + 1)}} + + +def show(i): + names = ["Tudomány percek", "Zene és ember", "Esti mese", "Tech hírek", "Futás közben"] + return {"id": f"sh{i}", "name": names[i % 5], "uri": f"spotify:show:sh{i}", "images": img(f"show{i}"), + "publisher": "Fennec Podcast", "description": "Heti beszélgetések.", "total_episodes": 30} + + +def episode(i): + return {"id": f"ep{i}", "name": f"{i + 1}. rész: {WORDS[i % 12]} {NOUNS[i % 12]}", "uri": f"spotify:episode:ep{i}", + "type": "episode", "duration_ms": 1800000 + i * 60000, "release_date": f"2026-10-{1 + i % 28:02d}", + "images": img(f"ep{i}"), "description": "Egy epizód.", "resume_point": {"fully_played": i % 4 == 1, "resume_position_ms": 600000 if i % 4 == 2 else 0}} + + +def page(items, offset, limit, total, url): + nxt = f"{url}?offset={offset + limit}&limit={limit}" if offset + limit < total else None + return {"items": items, "offset": offset, "limit": limit, "total": total, "next": nxt} + + +class H(BaseHTTPRequestHandler): + def send_json(self, obj, code=200): + body = json.dumps(obj).encode() + self.send_response(code) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.end_headers() + self.wfile.write(body) + + def log_message(self, fmt, *args): + pass + + def do_PUT(self): + self.send_response(204) + self.end_headers() + + do_DELETE = do_PUT + do_POST = do_PUT + + def do_GET(self): + u = urlparse(self.path) + q = {k: v[0] for k, v in parse_qs(u.query).items()} + p = u.path.removeprefix("/v1") + off, lim = int(q.get("offset", 0)), int(q.get("limit", 20)) + if p == "/me": + return self.send_json({"id": "demo", "display_name": "Demó Felhasználó", "product": "premium", "country": "HU", "images": img("me", 300)}) + if p == "/me/player/recently-played": + return self.send_json({"items": [{"track": track(i * 3), "context": {"uri": f"spotify:album:al{i * 3 // 10}", "type": "album"}} for i in range(20)]}) + if p == "/me/top/artists": + return self.send_json(page([artist(i) for i in range(12)], 0, 20, 12, p)) + if p == "/me/top/tracks": + return self.send_json(page([track(i * 5) for i in range(15)], 0, 20, 15, p)) + if p == "/browse/new-releases": + return self.send_json({"albums": page([album(i + 20) for i in range(15)], 0, 20, 15, p)}) + if p == "/me/playlists": + return self.send_json(page([playlist(i) for i in range(off, min(off + 50, 12))], off, 50, 12, p)) + if p == "/me/tracks": + total = 230 + return self.send_json(page([{"track": track(i)} for i in range(off, min(off + lim, total))], off, lim, total, p)) + if p == "/me/albums": + return self.send_json(page([{"album": album(i)} for i in range(off, min(off + 50, 18))], off, 50, 18, p)) + if p == "/me/shows": + return self.send_json(page([{"show": show(i)} for i in range(5)], 0, 50, 5, p)) + if p == "/me/following": + return self.send_json({"artists": {"items": [artist(i) for i in range(12)], "cursors": {"after": None}}}) + if p.endswith("/contains"): + ids = q.get("ids", "x").split(",") + return self.send_json([i.endswith("1") for i in ids]) + if m := re.fullmatch(r"/playlists/(\w+)", p): + return self.send_json(playlist(int(m[1][2:]))) + if m := re.fullmatch(r"/playlists/(\w+)/(tracks|items)", p): + total = 140 + return self.send_json(page([{"track": track(i * 2 + 1)} for i in range(off, min(off + lim, total))], off, lim, total, p)) + if m := re.fullmatch(r"/albums/(\w+)", p): + n = int(m[1][2:]) + a = album(n) + a["tracks"] = page([track(n * 10 + i, False) for i in range(10)], 0, 50, 10, p) + return self.send_json(a) + if m := re.fullmatch(r"/albums/(\w+)/tracks", p): + return self.send_json(page([], off, lim, 10, p)) + if m := re.fullmatch(r"/artists/(\w+)", p): + return self.send_json(artist(int(m[1][2:]))) + if m := re.fullmatch(r"/artists/(\w+)/top-tracks", p): + n = int(m[1][2:]) + return self.send_json({"tracks": [track(n + 12 * i) for i in range(10)]}) + if m := re.fullmatch(r"/artists/(\w+)/albums", p): + n = int(m[1][2:]) + return self.send_json(page([album(n + 12 * i) for i in range(6)], 0, 30, 6, p)) + if m := re.fullmatch(r"/shows/(\w+)", p): + return self.send_json(show(int(m[1][2:]))) + if m := re.fullmatch(r"/shows/(\w+)/episodes", p): + return self.send_json(page([episode(i) for i in range(off, min(off + 50, 30))], off, 50, 30, p)) + if p == "/search": + return self.send_json({ + "tracks": page([track(i * 11) for i in range(10)], 0, 10, 10, p), + "artists": page([artist(i) for i in range(6)], 0, 10, 6, p), + "albums": page([album(i) for i in range(8)], 0, 10, 8, p), + "playlists": page([None] + [playlist(i) for i in range(6)], 0, 10, 7, p), + "shows": page([show(i) for i in range(3)], 0, 10, 3, p), + }) + if p == "/me/player/queue": + return self.send_json({"currently_playing": track(1), "queue": [track(i + 40) for i in range(12)]}) + self.send_json({"error": {"status": 404, "message": "not found"}}, 404) + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("--port", type=int, default=7890) + a = ap.parse_args() + print(f"mock Spotify Web API on http://127.0.0.1:{a.port}/v1") + ThreadingHTTPServer(("127.0.0.1", a.port), H).serve_forever() + + +if __name__ == "__main__": + main() diff --git a/ui/app.slint b/ui/app.slint new file mode 100644 index 0000000..2fdc011 --- /dev/null +++ b/ui/app.slint @@ -0,0 +1,195 @@ +// Spotify for Fennec OS: the root window. +// +// Screens: "message" (start-up, errors), "signin" (QR code / Spotify app), +// "page" (every browsing screen: a LinePage built by src/page.rs), +// "nowplaying". Over them: the text input, the picker, the toast. +// +// Rust owns state and focus: every key goes to the `key` callback, except +// while a keyboard has the focus (the input overlay, the search keyboard). + +import { TvWindow, Tv, SfText, GlassRect, MenuItem } from "@sf-ui/sf-ui.slint"; +import { Line, Chip, Card, Check, QueueItem } from "types.slint"; +import { LinePage } from "page.slint"; +import { NowPlayingScreen } from "nowplaying.slint"; +import { ConnectScreen, InputScreen, MessageScreen } from "signin.slint"; +import { SelectOverlay, Toast } from "overlays.slint"; + +export { Tv, SfText, MenuItem, Line, Chip, Card, Check, QueueItem } + +export component App inherits TvWindow { + title: "Spotify"; + forward-focus: keys; + + // "message", "signin", "page", "nowplaying" + in property screen: "message"; + // The key text (Slint's Key codes) and whether it repeats; true = handled. + callback key(string, bool) -> bool; + + out property message-t: self.screen == "message" ? 1 : 0; + animate message-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property signin-t: self.screen == "signin" ? 1 : 0; + animate signin-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property page-t: self.screen == "page" ? 1 : 0; + animate page-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property np-t: self.screen == "nowplaying" ? 1 : 0; + animate np-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property input-t: self.input-open ? 1 : 0; + animate input-t { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property select-t: self.select-open ? 1 : 0; + animate select-t { duration: 300ms; easing: cubic-bezier(0.3, 1.18, 0.4, 1); } + // Whatever an overlay would cover goes away first. + property under: max(0, 1 - 1.6 * max(self.input-t, self.select-t)); + // The outgoing screen goes first, the incoming one follows. + function vis(t: float) -> float { + clamp(t * 2 - 1, 0, 1) + } + + keys := FocusScope { + key-pressed(event) => { + if root.input-open { + return input.key(event); + } + if root.screen == "page" && root.page-kb-focused && !root.select-open { + return page.kb-key(event); + } + if root.key(event.text, event.repeat) { + return accept; + } + reject + } + } + + // ---- message ---- + in property message-busy <=> message.busy; + in property message-title <=> message.title; + in property message-text <=> message.text; + message := MessageScreen { + alpha: root.vis(root.message-t); + visible: self.alpha > 0.001; + } + + // ---- sign-in ---- + in property signin-device <=> signin.device; + in property signin-code <=> signin.code; + in property signin-qr <=> signin.qr; + in property signin-busy <=> signin.busy; + in property signin-error <=> signin.error; + signin := ConnectScreen { + alpha: root.vis(root.signin-t); + visible: self.alpha > 0.001; + } + + // ---- page ---- + in property <[Line]> page-lines <=> page.lines; + in property page-focus <=> page.focus-line; + in property page-scroll <=> page.scroll; + in property page-show-nav <=> page.show-nav; + in property <[string]> page-nav-items <=> page.nav-items; + in property page-nav-index <=> page.nav-index; + in property page-nav-focused <=> page.nav-focused; + in property page-np-title <=> page.np-title; + in property page-np-artist <=> page.np-artist; + in property page-np-playing <=> page.np-playing; + in property page-np-focused <=> page.np-focused; + in property page-user-image <=> page.user-image; + in property page-user-initial <=> page.user-initial; + in property page-kb-y <=> page.kb-y; + in property page-kb-focused <=> page.kb-focused; + in property page-kb-placeholder <=> page.kb-placeholder; + in-out property page-query <=> page.query; + callback search-submitted(string); + callback search-changed(string); + changed page-query => { + root.search-changed(self.page-query); + } + callback search-exit-down(); + callback search-exit-up(); + callback search-cancelled(); + public function page-kb-reset() { + page.kb-reset(); + } + page := LinePage { + alpha: root.vis(root.page-t) * root.under; + visible: root.page-t > 0.001; + search-submitted(t) => { root.search-submitted(t); } + search-exit-down => { root.search-exit-down(); } + search-exit-up => { root.search-exit-up(); } + search-cancelled => { root.search-cancelled(); } + } + + // ---- now playing ---- + in property np-title <=> np.title; + in property np-artist <=> np.artist; + in property np-album <=> np.album; + in property np-cover <=> np.art; + in property np-explicit <=> np.explicit; + in property np-episode <=> np.episode; + in property np-playing <=> np.playing; + in property np-loading <=> np.loading; + in property np-progress <=> np.progress; + in property np-time <=> np.time; + in property np-duration <=> np.duration; + in property np-shuffle <=> np.shuffle; + in property np-repeat <=> np.repeat; + in property np-liked <=> np.liked; + in property np-focus <=> np.button; + in property np-area <=> np.area; + in property np-panel <=> np.panel; + in property <[string]> np-lyrics <=> np.lyrics; + in property np-lyric-line <=> np.lyric-line; + in property np-lyrics-synced <=> np.lyrics-synced; + in property np-lyrics-note <=> np.lyrics-note; + in property <[QueueItem]> np-queue <=> np.queue; + in property np-queue-note <=> np.queue-note; + in property np-device <=> np.device; + np := NowPlayingScreen { + alpha: root.vis(root.np-t) * root.under; + visible: root.np-t > 0.001; + } + + // ---- text input ---- + in property input-open; + in property input-title <=> input.title; + in property input-subtitle <=> input.subtitle; + in property input-placeholder <=> input.placeholder; + in property input-submit-label <=> input.submit-label; + in property input-min-length <=> input.min-length; + in-out property input-text <=> input.text; + in-out property input-error <=> input.error; + callback input-submitted(string); + callback input-cancelled(); + public function input-reset() { + input.reset(); + } + input := InputScreen { + alpha: root.vis(root.input-t); + visible: root.input-t > 0.001; + submitted(t) => { root.input-submitted(t); } + cancelled => { root.input-cancelled(); } + } + + // ---- picker ---- + in property select-open; + in property select-title <=> select.title; + in property <[MenuItem]> select-items <=> select.items; + in property select-focus <=> select.focus-index; + select := SelectOverlay { + alpha: root.select-t; + visible: root.select-t > 0.001; + } + + // ---- toast ---- + in property toast-text <=> toast.text; + in property toast-bad <=> toast.bad; + toast := Toast { } + + // ---- glass, in drawing order (listed by src/main.rs) ---- + out property <[GlassRect]> glass-signin: signin.glass; + out property <[GlassRect]> glass-page: page.glass; + out property <[GlassRect]> glass-page-keyboard: page.glass-keyboard; + out property <[GlassRect]> glass-np: np.glass; + out property <[GlassRect]> glass-input: input.glass; + out property <[GlassRect]> glass-input-keyboard: input.glass-keyboard; + out property <[GlassRect]> glass-select: select.glass; + out property <[GlassRect]> glass-toast: toast.glass; +} diff --git a/ui/icons.slint b/ui/icons.slint new file mode 100644 index 0000000..ec2870b --- /dev/null +++ b/ui/icons.slint @@ -0,0 +1,37 @@ +// Icons sf-ui does not have (shuffle, repeat, heart, lyrics, queue), drawn +// the same way: strokes on a 32 grid. Any other name goes to sf-ui's Icon. + +import { Tv, Icon } from "@sf-ui/sf-ui.slint"; + +export component SpIcon inherits Rectangle { + in property name; + in property ink: Tv.text; + in property size: 32 * Tv.u; + width: self.size; + height: self.size; + property own: self.name == "shuffle" || self.name == "repeat" || self.name == "repeat-one" || self.name == "heart" + || self.name == "heart-filled" || self.name == "lyrics" || self.name == "queue" || self.name == "devices"; + property filled: self.name == "heart-filled"; + if !root.own: Icon { + name: root.name; + ink: root.ink; + size: root.size; + } + if root.own: Path { + width: 100%; + height: 100%; + viewbox-width: 32; + viewbox-height: 32; + stroke: root.ink; + stroke-width: root.size * 2.4 / 32; + fill: root.filled ? root.ink : transparent; + commands: root.name == "shuffle" ? "M 4 9 L 9 9 C 15 9 17 23 23 23 L 28 23 M 24.5 19.5 L 28 23 L 24.5 26.5 M 4 23 L 9 23 C 11.5 23 13 21 14.5 18 M 17.5 14 C 19 11 20.5 9 23 9 L 28 9 M 24.5 5.5 L 28 9 L 24.5 12.5" + : root.name == "repeat" ? "M 6 16 L 6 12.5 C 6 10 7.5 8.5 10 8.5 L 26 8.5 M 22.5 5 L 26 8.5 L 22.5 12 M 26 16 L 26 19.5 C 26 22 24.5 23.5 22 23.5 L 6 23.5 M 9.5 27 L 6 23.5 L 9.5 20" + : root.name == "repeat-one" ? "M 6 16 L 6 12.5 C 6 10 7.5 8.5 10 8.5 L 26 8.5 M 22.5 5 L 26 8.5 L 22.5 12 M 26 16 L 26 19.5 C 26 22 24.5 23.5 22 23.5 L 6 23.5 M 9.5 27 L 6 23.5 L 9.5 20 M 14.5 14 L 16.5 12.8 L 16.5 19.5" + : root.name == "heart" || root.name == "heart-filled" ? "M 16 26.5 L 6.2 16.8 C 3.2 13.8 3.6 9 7.4 7.4 C 10.4 6.1 13.8 7.3 16 10.2 C 18.2 7.3 21.6 6.1 24.6 7.4 C 28.4 9 28.8 13.8 25.8 16.8 Z" + : root.name == "lyrics" ? "M 16 4 C 18.5 4 20.5 6 20.5 8.5 L 20.5 15 C 20.5 17.5 18.5 19.5 16 19.5 C 13.5 19.5 11.5 17.5 11.5 15 L 11.5 8.5 C 11.5 6 13.5 4 16 4 Z M 7.5 14.5 C 7.5 19.5 11.3 23.5 16 23.5 C 20.7 23.5 24.5 19.5 24.5 14.5 M 16 23.5 L 16 28 M 11 28 L 21 28" + : root.name == "queue" ? "M 5 8 L 22 8 M 5 14 L 22 14 M 5 20 L 13 20 M 18 18.5 L 18 27.5 L 26 23 Z" + : root.name == "devices" ? "M 4 7 L 22 7 L 22 20 L 4 20 Z M 9 25 L 17 25 M 25 11 L 29 11 L 29 26 L 25 26 Z" + : ""; + } +} diff --git a/ui/nowplaying.slint b/ui/nowplaying.slint new file mode 100644 index 0000000..c9e9f83 --- /dev/null +++ b/ui/nowplaying.slint @@ -0,0 +1,405 @@ +// Most szól: the cover, the title, the progress and the controls. With the +// lyrics or the queue open, the cover and the texts move to the left and a +// glass panel holds the lyrics / the queue on the right. +// +// Rust owns the focus: `button` is the focused button (0..7), `area` 1 means +// the progress bar (left/right seek there). + +import { Tv, GlassRect, GlassPane, Spinner, Caption } from "@sf-ui/sf-ui.slint"; +import { QueueItem } from "types.slint"; +import { SpIcon } from "icons.slint"; +import { Accent, Equalizer } from "page.slint"; + +// A round glass control. `on`: a toggle that is on (green icon and dot). +component NpButton inherits Rectangle { + in property icon; + in property focused; + in property on; + in property primary; + in property alpha: 1; + in property size: 80 * Tv.u; + out property f: self.focused ? 1 : 0; + animate f { duration: 220ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + property s: 1 + 0.08 * self.f; + width: self.size; + height: self.size; + SpIcon { + name: root.icon; + size: root.size * (root.primary ? 0.46 : 0.42); + ink: root.focused ? Tv.ink : root.primary ? #121317 : root.on ? Accent.green : Tv.text; + opacity: root.alpha; + } + if root.on: Rectangle { + x: (parent.width - self.width) / 2; + y: parent.height - 14 * Tv.u; + width: 7 * Tv.u; + height: 7 * Tv.u; + border-radius: self.width / 2; + background: root.focused ? Tv.ink : Accent.green; + opacity: root.alpha; + } + out property glass: { + x: self.absolute-position.x - self.width * (self.s - 1) / 2, + y: self.absolute-position.y - self.height * (self.s - 1) / 2, + w: self.width * self.s, + h: self.height * self.s, + r: self.height * self.s / 2, + focus: self.f, + alpha: self.alpha, + blur: 1.4, + glow: self.primary ? Accent.green : #ffffff, + tint: self.primary ? (self.focused ? #ffffff.with-alpha(0.9) : Accent.green.with-alpha(0.92)) : #ffffff.with-alpha(0.06 + 0.82 * self.f), + group: 0, + }; +} + +export component NowPlayingScreen inherits Rectangle { + in property alpha: 1; + in property title; + in property artist; + in property album; + in property art; + in property explicit; + in property episode; + in property playing; + in property loading; + in property progress; + in property time; + in property duration; + in property shuffle; + // 0 off, 1 the list, 2 this track + in property repeat; + // -1 unknown, 0 no, 1 yes + in property liked: -1; + in property button: 2; + in property area; + // 0 none, 1 lyrics, 2 queue + in property panel; + in property <[string]> lyrics; + in property lyric-line: -1; + in property lyrics-synced; + in property lyrics-note; + in property <[QueueItem]> queue; + in property queue-note; + in property device; + + // 0: the big layout, 1: side by side with the panel. + out property t: self.panel != 0 ? 1 : 0; + animate t { duration: 520ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + pure function mix(a: float, b: float) -> length { + (a + (b - a) * root.t) * Tv.u + } + + // ---- cover ---- + property cover-size: root.mix(600, 360); + Rectangle { + x: root.mix(170, 120); + y: root.mix(190, 120); + width: root.cover-size; + height: root.cover-size; + opacity: root.alpha; + Rectangle { + border-radius: 20 * Tv.u; + background: #1b1d24; + drop-shadow-blur: 60 * Tv.u; + drop-shadow-offset-y: 24 * Tv.u; + drop-shadow-color: #000000b0; + } + Rectangle { + border-radius: 20 * Tv.u; + clip: true; + Image { + width: 100%; + height: 100%; + source: root.art; + image-fit: cover; + } + if root.loading: Rectangle { + background: #00000080; + Spinner { size: 72 * Tv.u; } + } + } + } + + // ---- texts ---- + property tx: root.mix(870, 120); + property tw: root.mix(900, 620); + property ty: root.mix(220, 520); + HorizontalLayout { + x: root.tx; + y: root.ty; + width: root.tw; + height: 36 * Tv.u; + spacing: 12 * Tv.u; + alignment: start; + opacity: root.alpha; + Equalizer { + y: (parent.height - self.height) / 2; + size: 22 * Tv.u; + moving: root.playing; + } + Text { + vertical-alignment: center; + text: root.device; + font-size: 22 * Tv.u; + font-weight: 600; + color: Accent.green; + overflow: elide; + } + } + title-text := Text { + x: root.tx; + y: root.ty + root.mix(52, 44); + width: root.tw; + height: min(self.preferred-height, root.mix(170, 64)); + vertical-alignment: top; + text: root.title; + font-size: root.panel != 0 ? 40 * Tv.u : (root.title.character-count > 30 ? 52 : 68) * Tv.u; + font-weight: 700; + letter-spacing: -1.5 * Tv.u; + color: Tv.text; + wrap: root.panel != 0 ? no-wrap : word-wrap; + overflow: elide; + opacity: root.alpha; + } + HorizontalLayout { + x: root.tx; + y: title-text.y + title-text.height + 10 * Tv.u; + width: root.tw; + height: 44 * Tv.u; + spacing: 12 * Tv.u; + alignment: start; + opacity: root.alpha; + if root.explicit: Rectangle { + y: (parent.height - self.height) / 2; + width: 28 * Tv.u; + height: 28 * Tv.u; + border-radius: 5 * Tv.u; + background: #ffffffb0; + Text { + text: "E"; + font-size: 18 * Tv.u; + font-weight: 700; + color: #121317; + } + } + Text { + vertical-alignment: center; + text: root.artist; + font-size: root.mix(34, 28); + font-weight: 600; + color: Tv.text-secondary; + overflow: elide; + } + } + Text { + x: root.tx; + y: title-text.y + title-text.height + 58 * Tv.u; + width: root.tw; + text: root.album; + font-size: 24 * Tv.u; + color: Tv.text-tertiary; + overflow: elide; + opacity: root.alpha; + } + + // ---- progress ---- + property py: root.ty + root.mix(400, 236); + property pf: root.area == 1 ? 1 : 0; + animate pf { duration: 200ms; easing: ease-out; } + property rail-h: (8 + 6 * self.pf) * Tv.u; + rail := Rectangle { + x: root.tx; + y: root.py - root.rail-h / 2; + width: root.tw; + height: root.rail-h; + opacity: root.alpha; + Rectangle { + x: 0; + width: parent.width * clamp(root.progress, 0, 1); + border-radius: parent.height / 2; + background: root.pf > 0.5 ? Accent.green : #ffffff; + } + if root.area == 1: Rectangle { + x: parent.width * clamp(root.progress, 0, 1) - self.width / 2; + y: (parent.height - self.height) / 2; + width: 28 * Tv.u; + height: 28 * Tv.u; + border-radius: self.width / 2; + background: #ffffff; + drop-shadow-blur: 10 * Tv.u; + drop-shadow-color: #00000080; + } + } + Text { + x: root.tx; + y: root.py + 22 * Tv.u; + text: root.time; + font-size: 22 * Tv.u; + font-weight: 600; + color: Tv.text-secondary; + opacity: root.alpha; + } + Text { + x: root.tx; + y: root.py + 22 * Tv.u; + width: root.tw; + horizontal-alignment: right; + text: root.area == 1 ? "◀ ▶ tekerés" : root.duration; + font-size: 22 * Tv.u; + font-weight: 600; + color: root.area == 1 ? Accent.green : Tv.text-secondary; + opacity: root.alpha; + } + + // ---- buttons ---- + property bs: root.mix(80, 64); + property gap: root.mix(22, 12); + controls := HorizontalLayout { + x: root.tx; + y: root.py + root.mix(90, 76); + height: root.bs * 1.25; + spacing: root.gap; + alignment: start; + b0 := NpButton { y: (parent.height - self.height) / 2; icon: "shuffle"; size: root.bs; on: root.shuffle; focused: root.area == 0 && root.button == 0; alpha: root.alpha * (root.episode ? 0.4 : 1); } + b1 := NpButton { y: (parent.height - self.height) / 2; icon: "previous"; size: root.bs; focused: root.area == 0 && root.button == 1; alpha: root.alpha; } + b2 := NpButton { y: (parent.height - self.height) / 2; icon: root.playing ? "pause" : "play"; size: root.bs * 1.25; primary: true; focused: root.area == 0 && root.button == 2; alpha: root.alpha; } + b3 := NpButton { y: (parent.height - self.height) / 2; icon: "next"; size: root.bs; focused: root.area == 0 && root.button == 3; alpha: root.alpha; } + b4 := NpButton { y: (parent.height - self.height) / 2; icon: root.repeat == 2 ? "repeat-one" : "repeat"; size: root.bs; on: root.repeat > 0; focused: root.area == 0 && root.button == 4; alpha: root.alpha; } + Rectangle { width: root.mix(24, 6); } + b5 := NpButton { y: (parent.height - self.height) / 2; icon: root.liked == 1 ? "heart-filled" : "heart"; size: root.bs; on: root.liked == 1; focused: root.area == 0 && root.button == 5; alpha: root.alpha * (root.liked < 0 ? 0.4 : 1); } + b6 := NpButton { y: (parent.height - self.height) / 2; icon: "lyrics"; size: root.bs; on: root.panel == 1; focused: root.area == 0 && root.button == 6; alpha: root.alpha; } + b7 := NpButton { y: (parent.height - self.height) / 2; icon: "queue"; size: root.bs; on: root.panel == 2; focused: root.area == 0 && root.button == 7; alpha: root.alpha; } + } + property <[string]> hints: ["Keverés", "Előző", root.playing ? "Szünet" : "Lejátszás", "Következő", "Ismétlés", "Kedvelés", "Dalszöveg", "Lejátszási sor"]; + Caption { + x: root.tx; + y: controls.y + controls.height + 18 * Tv.u; + width: root.tw; + text: root.area == 0 ? root.hints[root.button] : ""; + opacity: root.alpha; + } + + // ---- the panel: lyrics or the queue ---- + property pa: root.alpha * clamp(root.t * 1.6 - 0.6, 0, 1); + panel-pane := GlassPane { + x: 820 * Tv.u; + y: 90 * Tv.u; + width: 1000 * Tv.u; + height: 900 * Tv.u; + radius: 48 * Tv.u; + frost: 3.2; + tint: Tv.smoke.with-alpha(0.38); + alpha: root.panel != 0 ? root.pa : 0; + visible: root.t > 0.01; + // lyrics + if root.panel == 1: Rectangle { + clip: true; + opacity: root.pa; + property line-h: 76 * Tv.u; + property offset: root.lyrics-synced && root.lyric-line >= 0 ? self.height * 0.38 - root.lyric-line * self.line-h : 56 * Tv.u; + animate offset { duration: 420ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + for l[i] in root.lyrics: Text { + x: 64 * Tv.u; + y: parent.offset + i * parent.line-h; + width: parent.width - 128 * Tv.u; + height: parent.line-h; + vertical-alignment: center; + text: l == "" ? "♪" : l; + font-size: 38 * Tv.u; + font-weight: 700; + color: !root.lyrics-synced ? Tv.text : i == root.lyric-line ? Tv.text : i < root.lyric-line ? #ffffff66 : #ffffff8c; + overflow: elide; + animate color { duration: 300ms; } + } + if root.lyrics-note != "": Text { + x: 64 * Tv.u; + width: parent.width - 128 * Tv.u; + horizontal-alignment: center; + text: root.lyrics-note; + font-size: 30 * Tv.u; + font-weight: 600; + color: Tv.text-secondary; + wrap: word-wrap; + } + } + // queue + if root.panel == 2: Rectangle { + clip: true; + opacity: root.pa; + Text { + x: 56 * Tv.u; + y: 44 * Tv.u; + text: "Következik"; + font-size: 38 * Tv.u; + font-weight: 700; + color: Tv.text; + } + for q[i] in root.queue: Rectangle { + x: 56 * Tv.u; + y: (120 + i * 84) * Tv.u; + width: parent.width - 112 * Tv.u; + height: 72 * Tv.u; + Rectangle { + x: 0; + width: 64 * Tv.u; + height: 64 * Tv.u; + y: 4 * Tv.u; + border-radius: 8 * Tv.u; + clip: true; + background: #1b1d24; + Image { + width: 100%; + height: 100%; + source: q.image; + image-fit: cover; + } + } + Text { + x: 88 * Tv.u; + y: 6 * Tv.u; + width: parent.width - 88 * Tv.u; + text: q.title; + font-size: 26 * Tv.u; + font-weight: 600; + color: Tv.text; + overflow: elide; + } + Text { + x: 88 * Tv.u; + y: 40 * Tv.u; + width: parent.width - 88 * Tv.u; + text: q.artist; + font-size: 21 * Tv.u; + color: Tv.text-tertiary; + overflow: elide; + } + } + if root.queue-note != "": Text { + x: 56 * Tv.u; + y: 130 * Tv.u; + text: root.queue-note; + font-size: 26 * Tv.u; + color: Tv.text-secondary; + } + } + } + + out property <[GlassRect]> glass: [ + { + x: rail.absolute-position.x, + y: rail.absolute-position.y, + w: rail.width, + h: rail.height, + r: rail.height / 2, + focus: root.pf, + alpha: root.alpha, + blur: 1.2, + glow: Accent.green, + tint: #ffffff.with-alpha(0.14 + 0.1 * root.pf), + group: 0, + }, + b0.glass, b1.glass, b2.glass, b3.glass, b4.glass, b5.glass, b6.glass, b7.glass, + panel-pane.glass, + ]; +} diff --git a/ui/overlays.slint b/ui/overlays.slint new file mode 100644 index 0000000..e5ca0d5 --- /dev/null +++ b/ui/overlays.slint @@ -0,0 +1,66 @@ +// Overlays over any page: a picker (Select) and a toast. The page under them +// fades out first (Nothing-under-glass): app.slint dims it while one is open. + +import { Tv, GlassRect, GlassPane, GlassMenu, MenuItem, Icon } from "@sf-ui/sf-ui.slint"; + +// A list to choose from, centred. +export component SelectOverlay inherits Rectangle { + in property alpha; + in property title; + in property <[MenuItem]> items; + in property focus-index; + menu := GlassMenu { + x: (root.width - self.width) / 2; + y: (root.height - self.height) / 2; + width: 640 * Tv.u; + title: root.title; + items: root.items; + focused-index: root.focus-index; + alpha: root.alpha; + accent: #1ed760; + visible-rows: 9; + } + out property <[GlassRect]> glass: menu.glass; +} + +// A short message at the bottom ("Elmentve", errors). +export component Toast inherits Rectangle { + in property text; + in property bad; + out property t: self.text != "" ? 1 : 0; + animate t { duration: 300ms; easing: cubic-bezier(0.3, 1.18, 0.4, 1); } + pane := GlassPane { + x: (root.width - self.width) / 2; + y: root.height - (64 + 96 * root.t) * Tv.u; + width: min(1400 * Tv.u, label.preferred-width + 140 * Tv.u); + height: 80 * Tv.u; + radius: self.height / 2; + frost: 2.4; + tint: Tv.smoke.with-alpha(0.5); + glow: root.bad ? Tv.danger : #ffffff; + lit: 0.3; + alpha: root.t; + HorizontalLayout { + padding-left: 36 * Tv.u; + padding-right: 36 * Tv.u; + spacing: 14 * Tv.u; + alignment: center; + opacity: root.t; + Icon { + y: (parent.height - self.height) / 2; + name: root.bad ? "warning" : "check"; + size: 30 * Tv.u; + ink: root.bad ? Tv.danger-ink : Tv.ok-ink; + } + label := Text { + vertical-alignment: center; + text: root.text; + font-size: 25 * Tv.u; + font-weight: 600; + color: Tv.text; + overflow: elide; + } + } + } + out property <[GlassRect]> glass: [pane.glass]; +} diff --git a/ui/page.slint b/ui/page.slint new file mode 100644 index 0000000..64c9cef --- /dev/null +++ b/ui/page.slint @@ -0,0 +1,804 @@ +// The page renderer (from Netflex TV): every browsing screen is a list of +// Lines built by Rust (src/page.rs), which also owns the focus and the +// scroll position. This file draws them and their glass: +// - the top navigation capsule and, right of it, "now playing", +// - hero buttons (glass at rest), +// - one focus pill that glides to the focused chip on any other line +// (on a track row it covers the whole row), +// - the search keyboard's pane. +// Everything else (cards, texts, unfocused chips) is plain Slint over the +// backdrop, so nothing Slint draws sits under glass. + +import { Tv, GlassRect, GlassPane, Keyboard, Spinner, Display, Headline, Title, SectionTitle, Body, Item, Label, Caption } from "@sf-ui/sf-ui.slint"; +import { Line, Chip, Card, Check } from "types.slint"; +import { SpIcon } from "icons.slint"; + +export global Accent { + out property green: #1ed760; + out property deep: #1db954; +} + +// The liked songs' picture: a heart on Spotify's violet gradient. +component LikedArt inherits Rectangle { + in property icon-size: 72 * Tv.u; + background: @linear-gradient(135deg, #450af5 0%, #8e8ee5 100%); + SpIcon { + name: "heart-filled"; + size: root.icon-size; + ink: #ffffff; + } +} + +// An album, playlist, show (square) or artist (round) card. +component SpCard inherits Rectangle { + in property card; + in property focused; + in property round; + in property art-h; + in property captions; + out property f: self.focused ? 1 : 0; + animate f { duration: 260ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + property r: self.round ? root.art-h / 2 : 14 * Tv.u; + + art := Rectangle { + y: 0; + height: root.art-h; + transform-scale: 1 + 0.08 * root.f; + Rectangle { + border-radius: root.r; + background: #1b1d24; + drop-shadow-blur: (14 + 22 * root.f) * Tv.u; + drop-shadow-offset-y: (8 + 12 * root.f) * Tv.u; + drop-shadow-color: #00000090; + } + Rectangle { + border-radius: root.r; + clip: true; + if root.card.mark == "liked": LikedArt { } + if root.card.image.width == 0 && root.card.mark != "liked": Text { + x: 20 * Tv.u; + width: parent.width - 40 * Tv.u; + horizontal-alignment: center; + vertical-alignment: center; + text: root.card.title; + font-size: 24 * Tv.u; + font-weight: 600; + color: Tv.text-tertiary; + wrap: word-wrap; + } + Image { + width: 100%; + height: 100%; + source: root.card.image; + image-fit: cover; + } + Rectangle { + background: #000000; + opacity: 0.2 * (1 - root.f); + } + } + if root.card.current: Rectangle { + border-radius: root.r; + border-width: 4 * Tv.u; + border-color: Accent.green; + } + } + if root.captions: Text { + x: 0; + y: root.art-h + 18 * Tv.u; + width: root.width; + horizontal-alignment: root.round ? center : left; + text: root.card.caption; + font-size: 24 * Tv.u; + font-weight: 600; + color: root.focused ? Tv.text : #ffffffd0; + overflow: elide; + } + if root.captions: Text { + x: 0; + y: root.art-h + 52 * Tv.u; + width: root.width; + horizontal-alignment: root.round ? center : left; + text: root.card.detail; + font-size: 20 * Tv.u; + color: Tv.text-tertiary; + overflow: elide; + } +} + +// A chip drawn by Slint. Focused chips get the page's glass pill underneath, +// hero chips are glass all the time: neither draws a background then. +component SpChip inherits Rectangle { + in property chip; + in property focused; + in property on-glass; + property plain: root.focused || root.on-glass; + property ink: root.focused && root.chip.tone != "primary" ? Tv.ink + : root.chip.tone == "danger" ? Tv.danger-ink + : root.chip.active || root.on-glass || root.chip.tone == "primary" ? Tv.text + : #ffffffd0; + x: root.chip.x * Tv.u; + y: root.chip.y * Tv.u; + width: root.chip.w * Tv.u; + height: root.chip.h * Tv.u; + opacity: root.chip.enabled ? 1 : 0.42; + Rectangle { + visible: !root.plain; + border-radius: root.chip.tone == "field" ? 22 * Tv.u : self.height / 2; + background: root.chip.tone == "field" ? #ffffff10 + : root.chip.tone == "primary" ? #1ed76080 + : root.chip.active ? #ffffff2c + : #ffffff12; + border-width: root.chip.tone == "field" ? 1.5 * Tv.u : 0; + border-color: #ffffff38; + } + HorizontalLayout { + padding-left: root.chip.tone == "field" ? 28 * Tv.u : root.chip.text == "" ? (root.height - 30 * Tv.u) / 2 : (root.chip.icon == "" ? 26 : 20) * Tv.u; + padding-right: root.chip.tone == "field" ? 28 * Tv.u : root.chip.text == "" ? (root.height - 30 * Tv.u) / 2 : 26 * Tv.u; + spacing: 10 * Tv.u; + alignment: root.chip.tone == "field" ? start : center; + if root.chip.icon != "": SpIcon { + y: (parent.height - self.height) / 2; + name: root.chip.icon; + size: (root.chip.text == "" ? 30 : 28) * Tv.u; + ink: root.ink; + } + if root.chip.text != "": Text { + vertical-alignment: center; + horizontal-stretch: root.chip.tone == "field" ? 1 : 0; + text: root.chip.text; + font-size: (root.chip.tone == "field" ? 26 : 23) * Tv.u; + font-weight: root.chip.active || root.focused || root.chip.tone == "primary" ? 700 : 600; + color: root.ink; + overflow: elide; + } + } +} + +// Three bars that move while a track plays (track rows, the nav capsule). +export component Equalizer inherits Rectangle { + in property ink: Accent.green; + in property moving: true; + in property size: 24 * Tv.u; + width: self.size; + height: self.size; + // Only ticks while moving: a paused screen draws no frames. + property t: root.moving ? animation-tick() : 0ms; + for i in 3: Rectangle { + property phase: root.moving ? (1 + sin((root.t / 1ms) * (0.45 + i * 0.17) * 1deg)) / 2 : 0.35; + x: i * root.size / 3 + root.size / 18; + width: root.size / 4.5; + height: root.size * (0.25 + 0.75 * self.phase); + y: root.size - self.height; + border-radius: self.width / 3; + background: root.ink; + } +} + +export component LinePage inherits Rectangle { + in property alpha: 1; + in property <[Line]> lines; + in property focus-line: -1; + // Vertical scroll position (design px), animated here. + in property scroll; + // Top navigation (main sections). + in property show-nav; + in property <[string]> nav-items; + in property nav-index; + in property nav-focused; + // "Now playing" right of the nav ("" = nothing loaded). + in property np-title; + in property np-artist; + in property np-playing; + in property np-focused; + // The signed-in user (top right): their picture, or their initial. + in property user-image; + in property user-initial; + // Embedded search keyboard: its top (design px, page coordinates; < 0 = none). + in property kb-y: -1; + in property kb-focused; + in property kb-placeholder; + in property kb-submit-label: "Keresés"; + in-out property query; + callback search-submitted(string); + callback search-exit-down(); + callback search-exit-up(); + callback search-cancelled(); + public function kb-key(event: KeyEvent) -> EventResult { + kb.key(event) + } + public function kb-reset() { + kb.reset(); + } + + // Content left edge (design px). + property cx: 96; + out property scroll-anim: self.scroll; + animate scroll-anim { duration: 380ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + property content-focus: !self.nav-focused && !self.np-focused && !self.kb-focused; + + // ---- lines ---- + for line[li] in root.lines: Rectangle { + property ty: line.y - root.scroll-anim; + property lf: li == root.focus-line && root.content-focus; + x: (root.cx + line.x) * Tv.u; + y: self.ty * Tv.u; + width: line.w * Tv.u; + height: line.h * Tv.u; + visible: self.ty + line.h > -40 && self.ty < 1120; + opacity: root.alpha; + + // hero without a cover (big title) + if line.kind == "hero" && !line.framed: Rectangle { + if line.style != "": Text { + x: 0; + y: 12 * Tv.u; + text: line.style; + font-size: 20 * Tv.u; + font-weight: 700; + letter-spacing: 3 * Tv.u; + color: Tv.text-secondary; + } + Display { + x: 0; + y: 90 * Tv.u; + width: 1300 * Tv.u; + text: line.title; + font-size: (line.title.character-count > 24 ? 64 : 88) * Tv.u; + } + Caption { + x: 0; + y: 242 * Tv.u; + width: 1300 * Tv.u; + text: line.subtitle; + } + Label { + x: 0; + y: 274 * Tv.u; + width: 1500 * Tv.u; + text: line.meta; + color: Tv.text; + } + Body { + x: 0; + y: 316 * Tv.u; + width: 1100 * Tv.u; + height: 152 * Tv.u; + text: line.text; + font-size: 26 * Tv.u; + } + for chip[ci] in line.chips: SpChip { + chip: chip; + focused: lf && line.col == ci; + on-glass: true; + } + } + + // hero with a cover: picture left, texts and buttons right + if line.kind == "hero" && line.framed: Rectangle { + Rectangle { + x: 0; + y: 20 * Tv.u; + width: 360 * Tv.u; + height: 360 * Tv.u; + border-radius: line.round ? self.width / 2 : 18 * Tv.u; + background: #1b1d24; + drop-shadow-blur: 40 * Tv.u; + drop-shadow-offset-y: 16 * Tv.u; + drop-shadow-color: #000000a0; + } + Rectangle { + x: 0; + y: 20 * Tv.u; + width: 360 * Tv.u; + height: 360 * Tv.u; + border-radius: line.round ? self.width / 2 : 18 * Tv.u; + clip: true; + if line.icon == "liked": LikedArt { icon-size: 120 * Tv.u; } + Image { + width: 100%; + height: 100%; + source: line.cover; + image-fit: cover; + } + } + property tx: 420 * Tv.u; + Text { + x: parent.tx; + y: 28 * Tv.u; + text: line.style; + font-size: 20 * Tv.u; + font-weight: 700; + letter-spacing: 3 * Tv.u; + color: Tv.text-secondary; + } + Text { + x: parent.tx; + y: 58 * Tv.u; + width: parent.width - parent.tx; + height: 120 * Tv.u; + vertical-alignment: center; + text: line.title; + font-size: (line.title.character-count > 40 ? 44 : line.title.character-count > 22 ? 58 : 80) * Tv.u; + font-weight: 700; + letter-spacing: -2 * Tv.u; + color: Tv.text; + wrap: word-wrap; + overflow: elide; + } + Text { + x: parent.tx; + y: 186 * Tv.u; + width: parent.width - parent.tx; + text: line.subtitle; + font-size: 28 * Tv.u; + font-weight: 700; + color: Tv.text; + overflow: elide; + } + Label { + x: parent.tx; + y: 226 * Tv.u; + width: parent.width - parent.tx; + text: line.meta; + color: Tv.text-secondary; + overflow: elide; + } + Text { + x: parent.tx; + y: 262 * Tv.u; + width: min(parent.width - parent.tx, 1100 * Tv.u); + height: 62 * Tv.u; + text: line.text; + font-size: 22 * Tv.u; + color: Tv.text-tertiary; + wrap: word-wrap; + overflow: elide; + } + for chip[ci] in line.chips: SpChip { + chip: chip; + focused: lf && line.col == ci; + on-glass: true; + } + } + + // heading + if line.kind == "heading": Rectangle { + Text { + x: 0; + y: 4 * Tv.u; + text: line.title; + font-size: (line.style == "big" ? 56 : 38) * Tv.u; + font-weight: 700; + letter-spacing: (line.style == "big" ? -1 : -0.4) * Tv.u; + color: Tv.text; + } + Caption { + x: 0; + y: (line.style == "big" ? 76 : 54) * Tv.u; + width: parent.width; + text: line.subtitle; + } + } + + // text + if line.kind == "text": Text { + x: 0; + y: 0; + width: parent.width; + height: parent.height; + text: line.text; + wrap: word-wrap; + vertical-alignment: top; + font-size: (line.style == "caption" ? 22 : line.style == "label" ? 24 : 26) * Tv.u; + font-weight: line.style == "label" ? 600 : 400; + color: line.style == "warn" ? Tv.warn-ink : line.style == "bad" ? Tv.danger-ink : line.style == "good" ? Tv.ok-ink : line.style == "caption" ? Tv.text-tertiary : Tv.text-secondary; + } + + // notice + if line.kind == "notice": Rectangle { + SpIcon { + x: 0; + y: 4 * Tv.u; + size: 36 * Tv.u; + name: line.icon != "" ? line.icon : line.tone == "good" ? "check" : line.tone == "info" ? "info" : "warning"; + ink: line.tone == "good" ? Tv.ok-ink : line.tone == "bad" ? Tv.danger-ink : line.tone == "warn" ? Tv.warn-ink : Tv.text-secondary; + } + Item { + x: 56 * Tv.u; + y: 4 * Tv.u; + width: parent.width - 56 * Tv.u; + text: line.title; + font-size: 27 * Tv.u; + } + Text { + x: 56 * Tv.u; + y: 44 * Tv.u; + width: parent.width - 56 * Tv.u; + height: parent.height - 44 * Tv.u; + text: line.text; + wrap: word-wrap; + font-size: 23 * Tv.u; + color: Tv.text-secondary; + } + } + + // chips + if line.kind == "chips": Rectangle { + if line.title != "": Text { + x: 0; + y: 0; + text: line.title; + font-size: 22 * Tv.u; + font-weight: 600; + letter-spacing: 1 * Tv.u; + color: Tv.text-tertiary; + } + for chip[ci] in line.chips: SpChip { + chip: chip; + focused: lf && line.col == ci; + } + } + + // item + if line.kind == "item": Rectangle { + Text { + x: 0; + y: 6 * Tv.u; + width: parent.width; + text: line.title; + font-size: 26 * Tv.u; + font-weight: 600; + color: Tv.text; + overflow: elide; + } + Text { + x: 0; + y: 42 * Tv.u; + width: parent.width; + text: line.meta; + font-size: 21 * Tv.u; + font-weight: 500; + color: Tv.text-tertiary; + overflow: elide; + } + Text { + x: 0; + y: 74 * Tv.u; + width: min(parent.width, 1100 * Tv.u); + height: 58 * Tv.u; + text: line.text; + font-size: 21 * Tv.u; + color: Tv.text-secondary; + wrap: word-wrap; + overflow: elide; + } + for chip[ci] in line.chips: SpChip { + chip: chip; + focused: lf && line.col == ci; + } + } + + // track row + if line.kind == "track": Rectangle { + property f0: lf && line.col == 0; + property playing: line.tone == "playing"; + property body-w: parent.width - 96 * Tv.u; + property ink: self.f0 ? Tv.ink : self.playing ? Accent.green : line.tone == "dim" ? Tv.text-tertiary : Tv.text; + if line.note != "" && line.tone != "playing": Text { + x: 8 * Tv.u; + width: 64 * Tv.u; + height: parent.height; + horizontal-alignment: center; + vertical-alignment: center; + text: line.note; + font-size: 24 * Tv.u; + font-weight: 600; + color: parent.f0 ? Tv.ink : Tv.text-tertiary; + } + if line.note != "" && line.tone == "playing": Equalizer { + x: 28 * Tv.u; + y: (parent.height - self.height) / 2; + ink: parent.f0 ? Tv.ink : Accent.green; + } + if line.note == "": Rectangle { + x: 10 * Tv.u; + y: 8 * Tv.u; + width: 64 * Tv.u; + height: 64 * Tv.u; + border-radius: 8 * Tv.u; + clip: true; + background: #1b1d24; + Image { + width: 100%; + height: 100%; + source: line.image; + image-fit: cover; + } + } + Text { + x: 96 * Tv.u; + y: 10 * Tv.u; + width: parent.body-w - 96 * Tv.u - 130 * Tv.u; + text: line.title; + font-size: 26 * Tv.u; + font-weight: 600; + color: parent.ink; + overflow: elide; + } + Text { + x: 96 * Tv.u; + y: 44 * Tv.u; + width: parent.body-w - 96 * Tv.u - 130 * Tv.u; + text: line.meta; + font-size: 21 * Tv.u; + font-weight: 500; + color: parent.f0 ? #121317b0 : Tv.text-tertiary; + overflow: elide; + } + Text { + x: parent.body-w - 130 * Tv.u; + width: 100 * Tv.u; + height: parent.height; + horizontal-alignment: right; + vertical-alignment: center; + text: line.extra; + font-size: 22 * Tv.u; + font-weight: 500; + color: parent.f0 ? Tv.ink : Tv.text-tertiary; + } + if line.chips.length > 1: SpChip { + chip: line.chips[1]; + focused: lf && line.col == 1; + } + } + + // cards + if line.kind == "cards": Rectangle { + property cw: line.style == "landscape" ? 400 : 216; + property ch: line.style == "landscape" ? 225 : 216; + property step: self.cw + 32; + property head: line.title != "" ? 56 : 0; + property fit: floor((line.w + 32) / self.step); + property scroll-to: clamp(line.col - 1, 0, max(0, line.cards.length - self.fit)); + property sc: self.scroll-to; + animate sc { duration: 320ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + if line.title != "": Text { + x: 0; + y: 0; + text: line.title; + font-size: 32 * Tv.u; + font-weight: 700; + color: lf ? Tv.text : #ffffffc8; + } + for card[ci] in line.cards: SpCard { + x: (ci - parent.sc) * parent.step * Tv.u; + y: parent.head * Tv.u; + width: parent.cw * Tv.u; + height: (parent.ch + (line.captions ? 80 : 0)) * Tv.u; + art-h: parent.ch * Tv.u; + round: line.style == "round"; + visible: ci >= parent.sc - 2 && ci < parent.sc + parent.fit + 2; + card: card; + captions: line.captions; + focused: lf && line.col == ci; + } + } + } + + // ---- embedded keyboard (search) ---- + kb-pane := GlassPane { + x: (root.width - self.width) / 2; + y: (root.kb-y - root.scroll-anim) * Tv.u; + width: 1720 * Tv.u; + height: 508 * Tv.u; + radius: 48 * Tv.u; + frost: 3.4; + tint: Tv.smoke.with-alpha(0.44); + alpha: root.kb-y >= 0 ? root.alpha : 0; + visible: root.kb-y >= 0; + kb := Keyboard { + x: 0; + y: 40 * Tv.u; + width: parent.width; + compact: true; + placeholder: root.kb-placeholder; + submit-label: root.kb-submit-label; + min-length: 2; + max-length: 60; + active: root.kb-focused; + alpha: root.kb-y >= 0 ? root.alpha : 0; + text <=> root.query; + submitted(t) => { root.search-submitted(t); } + cancelled => { root.search-cancelled(); } + exit-down => { root.search-exit-down(); } + exit-up => { root.search-exit-up(); } + } + } + + // ---- top navigation ---- + property tab-w: 190 * Tv.u; + property nav-a: root.show-nav ? root.alpha * (root.nav-focused || root.np-focused ? 1 : clamp(1 - root.scroll-anim / 120, 0, 1)) : 0; + nav := GlassPane { + x: (root.width - self.width) / 2; + y: 40 * Tv.u; + width: root.nav-items.length * root.tab-w + 16 * Tv.u; + height: 80 * Tv.u; + radius: self.height / 2; + frost: 1.6; + tint: #ffffff0a; + alpha: root.nav-a; + visible: root.show-nav; + for t[i] in root.nav-items: Text { + x: 8 * Tv.u + i * root.tab-w; + width: root.tab-w; + height: parent.height; + horizontal-alignment: center; + vertical-alignment: center; + text: t; + font-size: 25 * Tv.u; + font-weight: 600; + color: i == root.nav-index ? (root.nav-focused ? Tv.ink : Tv.text) : Tv.text-secondary; + opacity: root.nav-a; + } + } + + // ---- now playing capsule ---- + property np-on: root.show-nav && root.np-title != ""; + out property np-t: self.np-focused ? 1 : 0; + animate np-t { duration: 220ms; easing: ease-out; } + np := Rectangle { + x: nav.x + nav.width + 24 * Tv.u; + y: nav.y + 4 * Tv.u; + width: max(0, min(460 * Tv.u, np-text.preferred-width + 100 * Tv.u, avatar.x - 24 * Tv.u - self.x)); + height: 72 * Tv.u; + visible: root.np-on; + opacity: root.nav-a; + Equalizer { + x: 24 * Tv.u; + y: (parent.height - self.height) / 2; + moving: root.np-playing; + ink: root.np-focused ? Tv.ink : Accent.green; + } + np-text := VerticalLayout { + x: 64 * Tv.u; + width: parent.width - 88 * Tv.u; + alignment: center; + Text { + text: root.np-title; + font-size: 22 * Tv.u; + font-weight: 700; + color: root.np-focused ? Tv.ink : Tv.text; + overflow: elide; + } + Text { + text: root.np-artist; + font-size: 19 * Tv.u; + font-weight: 500; + color: root.np-focused ? #121317b0 : Tv.text-secondary; + overflow: elide; + } + } + } + // ---- the signed-in user ---- + avatar := Rectangle { + x: root.width - Tv.safe-x - self.width; + y: 44 * Tv.u; + width: 72 * Tv.u; + height: 72 * Tv.u; + visible: root.show-nav && (root.user-initial != "" || root.user-image.width > 0); + opacity: root.nav-a; + Rectangle { + border-radius: self.width / 2; + background: #ffffff26; + drop-shadow-blur: 16 * Tv.u; + drop-shadow-offset-y: 6 * Tv.u; + drop-shadow-color: #00000070; + } + Rectangle { + border-radius: self.width / 2; + clip: true; + if root.user-image.width == 0: Text { + text: root.user-initial; + font-size: 32 * Tv.u; + font-weight: 700; + color: Tv.text; + } + Image { + width: 100%; + height: 100%; + source: root.user-image; + image-fit: cover; + } + } + } + out property tab-pos: self.nav-index; + animate tab-pos { duration: 260ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property nav-t: self.nav-focused ? 1 : 0; + animate nav-t { duration: 220ms; easing: ease-out; } + + // ---- glass ---- + property fl: root.focus-line >= 0 && root.focus-line < root.lines.length ? root.lines[root.focus-line] : root.lines[0]; + property fc: root.fl.chips[max(0, root.fl.col)]; + property pill-on: root.content-focus && root.focus-line >= 0 && root.fl.kind != "hero" && root.fl.kind != "cards" && root.fc.w > 0; + out property pill-x: root.cx + root.fl.x + root.fc.x; + animate pill-x { duration: 220ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property pill-w: root.fc.w; + animate pill-w { duration: 220ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property pill-y: root.fl.y + root.fc.y; + animate pill-y { duration: 260ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property pill-h: root.fc.h; + animate pill-h { duration: 220ms; easing: cubic-bezier(0.22, 1, 0.36, 1); } + out property pill-a: root.pill-on ? 1 : 0; + animate pill-a { duration: 160ms; easing: ease-out; } + property hero: root.lines.length > 0 && root.lines[0].kind == "hero" ? root.lines[0] : root.fl; + property has-hero: root.lines.length > 0 && root.lines[0].kind == "hero"; + + pure function hero-rect(i: int) -> GlassRect { + let c = root.hero.chips[i]; + let f = root.has-hero && root.focus-line == 0 && root.content-focus && root.hero.col == i ? 1 : 0; + let s = 1 + 0.05 * f; + { + x: (root.cx + root.hero.x + c.x) * Tv.u - c.w * Tv.u * (s - 1) / 2, + y: (root.hero.y + c.y - root.scroll-anim) * Tv.u - c.h * Tv.u * (s - 1) / 2, + w: c.w * Tv.u * s, + h: c.h * Tv.u * s, + r: c.h * Tv.u * s / 2, + focus: f, + alpha: root.has-hero && c.w > 0 && i < root.hero.chips.length ? root.alpha * (c.enabled ? 1 : 0.5) : 0, + blur: 1.4, + glow: c.tone == "primary" ? Accent.green : #ffffff, + tint: c.tone == "primary" ? Accent.deep.with-alpha(0.5 + 0.4 * f) : #ffffff.with-alpha((c.active ? 0.16 : 0.07) + 0.8 * f), + group: 0, + } + } + + out property <[GlassRect]> glass: [ + nav.glass, + { + x: nav.absolute-position.x + 8 * Tv.u + root.tab-pos * root.tab-w, + y: nav.absolute-position.y + 8 * Tv.u, + w: root.tab-w, + h: nav.height - 16 * Tv.u, + r: (nav.height - 16 * Tv.u) / 2, + focus: root.nav-t, + alpha: root.nav-a, + blur: -1, + glow: #ffffff, + tint: #ffffff.with-alpha(0.12 + 0.76 * root.nav-t), + group: 0, + }, + { + x: np.absolute-position.x, + y: np.absolute-position.y, + w: np.width, + h: np.height, + r: np.height / 2, + focus: root.np-t, + alpha: root.np-on ? root.nav-a : 0, + blur: 1.6, + glow: Accent.green, + tint: #ffffff.with-alpha(0.06 + 0.82 * root.np-t), + group: 0, + }, + root.hero-rect(0), + root.hero-rect(1), + root.hero-rect(2), + root.hero-rect(3), + { + x: root.pill-x * Tv.u, + y: (root.pill-y - root.scroll-anim) * Tv.u, + w: root.pill-w * Tv.u, + h: root.pill-h * Tv.u, + r: root.fc.tone == "field" ? 22 * Tv.u : root.pill-h * Tv.u / 2, + focus: 1, + alpha: root.alpha * root.pill-a, + blur: 1.2, + glow: root.fc.tone == "primary" ? Accent.green : #ffffff, + tint: root.fc.tone == "primary" ? Accent.deep.with-alpha(0.85) : #ffffff.with-alpha(root.fc.tone == "field" ? 0.82 : 0.88), + group: 0, + }, + kb-pane.glass, + ]; + out property <[GlassRect]> glass-keyboard: kb.glass; +} diff --git a/ui/signin.slint b/ui/signin.slint new file mode 100644 index 0000000..598639a --- /dev/null +++ b/ui/signin.slint @@ -0,0 +1,244 @@ +// Sign-in from the phone (Spotify Connect), the text input overlay (on a +// modal glass pane with the on-screen keyboard) and a plain message screen. + +import { Tv, GlassRect, GlassPane, Keyboard, Spinner, Display, Title, Body, Label, Caption, Icon } from "@sf-ui/sf-ui.slint"; +import { SpIcon } from "icons.slint"; + +// Sign-in, two ways: a pairing code (QR code or spotify.com/pair) or this +// TV picked in the Spotify app on the phone (Spotify Connect). +export component ConnectScreen inherits Rectangle { + in property alpha: 1; + in property device; + in property code; + in property qr; + in property busy; + in property error; + + pane := GlassPane { + x: (root.width - self.width) / 2; + y: (root.height - self.height) / 2 - 20 * Tv.u; + width: 1640 * Tv.u; + height: 760 * Tv.u; + radius: 56 * Tv.u; + frost: 3.6; + tint: Tv.smoke.with-alpha(0.46); + glow: #1ed760; + alpha: root.alpha; + + // ---- left: title and the two ways ---- + VerticalLayout { + x: 80 * Tv.u; + y: 72 * Tv.u; + width: 860 * Tv.u; + height: parent.height - 144 * Tv.u; + spacing: 18 * Tv.u; + opacity: root.alpha; + HorizontalLayout { + spacing: 24 * Tv.u; + alignment: start; + Rectangle { + width: 80 * Tv.u; + height: 80 * Tv.u; + border-radius: self.width / 2; + background: #1ed760; + SpIcon { + name: "audio"; + size: 44 * Tv.u; + ink: #121317; + } + } + VerticalLayout { + alignment: center; + Title { text: "Jelentkezz be a telefonoddal"; } + Caption { text: "Spotify Premium fiók kell hozzá"; } + } + } + Rectangle { height: 14 * Tv.u; } + Text { + text: "QR-KÓDDAL"; + font-size: 20 * Tv.u; + font-weight: 700; + letter-spacing: 3 * Tv.u; + color: #1ed760; + } + Body { + text: "Olvasd be a kódot a telefon kamerájával, és jelentkezz be. Vagy nyisd meg a spotify.com/pair oldalt, és írd be a kódot."; + font-size: 26 * Tv.u; + color: Tv.text; + } + Rectangle { height: 10 * Tv.u; } + Text { + text: "A SPOTIFY APPBÓL"; + font-size: 20 * Tv.u; + font-weight: 700; + letter-spacing: 3 * Tv.u; + color: #1ed760; + } + Body { + text: "Ha a telefon ugyanazon a Wi-Fin van: indíts el egy számot, koppints az eszközök ikonjára, és válaszd: „" + root.device + "”."; + font-size: 26 * Tv.u; + color: Tv.text; + } + Rectangle { } + HorizontalLayout { + spacing: 16 * Tv.u; + alignment: start; + height: 48 * Tv.u; + Spinner { size: 40 * Tv.u; } + Label { + vertical-alignment: center; + text: root.busy ? "Bejelentkezés…" : root.error != "" ? root.error : "Várakozás a telefonra…"; + color: root.error != "" && !root.busy ? Tv.warn-ink : Tv.text-secondary; + wrap: word-wrap; + } + } + } + + // ---- right: the QR code and the code ---- + qr-box := Rectangle { + x: parent.width - self.width - 96 * Tv.u; + y: 80 * Tv.u; + width: 440 * Tv.u; + height: 440 * Tv.u; + border-radius: 28 * Tv.u; + background: #ffffff; + opacity: root.alpha; + clip: true; + if root.qr.width > 0: Image { + x: 20 * Tv.u; + y: 20 * Tv.u; + width: parent.width - 40 * Tv.u; + height: parent.height - 40 * Tv.u; + source: root.qr; + image-rendering: pixelated; + } + if root.qr.width == 0: Spinner { + size: 64 * Tv.u; + ink: #121317; + } + } + Text { + x: qr-box.x; + y: qr-box.y + qr-box.height + 28 * Tv.u; + width: qr-box.width; + horizontal-alignment: center; + text: "spotify.com/pair"; + font-size: 24 * Tv.u; + font-weight: 600; + color: Tv.text-secondary; + opacity: root.alpha; + } + Text { + x: qr-box.x; + y: qr-box.y + qr-box.height + 66 * Tv.u; + width: qr-box.width; + horizontal-alignment: center; + text: root.code; + font-size: 64 * Tv.u; + font-weight: 700; + letter-spacing: 10 * Tv.u; + color: Tv.text; + opacity: root.alpha; + } + } + Caption { + x: pane.x; + y: pane.y + pane.height + 28 * Tv.u; + width: pane.width; + horizontal-alignment: center; + text: "Vissza: kilépés"; + opacity: root.alpha; + } + + out property <[GlassRect]> glass: [pane.glass]; +} + +// A text field over everything (the TV's name...). +export component InputScreen inherits Rectangle { + in property alpha: 1; + in property title; + in property subtitle; + in property placeholder; + in property submit-label: "Kész"; + in property min-length: 1; + in-out property text; + in-out property error; + callback submitted(string); + callback cancelled(); + + public function key(event: KeyEvent) -> EventResult { + kb.key(event) + } + + public function reset() { + kb.reset(); + } + + pane := GlassPane { + x: (root.width - self.width) / 2; + y: (root.height - self.height) / 2 - 24 * Tv.u; + width: 1720 * Tv.u; + height: 720 * Tv.u; + radius: 56 * Tv.u; + frost: 3.8; + tint: Tv.smoke.with-alpha(0.48); + glow: #1ed760; + alpha: root.alpha; + kb := Keyboard { + x: 0; + y: 72 * Tv.u; + width: parent.width; + title: root.title; + subtitle: root.subtitle; + placeholder: root.placeholder; + submit-label: root.submit-label; + min-length: root.min-length; + max-length: 60; + alpha: root.alpha; + active: true; + text <=> root.text; + error <=> root.error; + submitted(t) => { root.submitted(t); } + cancelled => { root.cancelled(); } + } + } + + out property <[GlassRect]> glass: [pane.glass]; + out property <[GlassRect]> glass-keyboard: kb.glass; +} + +// Loading and errors. +export component MessageScreen inherits Rectangle { + in property alpha: 1; + in property busy; + in property title; + in property text; + + VerticalLayout { + x: Tv.safe-x; + width: root.width - 2 * Tv.safe-x; + y: 340 * Tv.u; + height: 400 * Tv.u; + spacing: 24 * Tv.u; + alignment: start; + opacity: root.alpha; + HorizontalLayout { + alignment: center; + if root.busy: Spinner { size: 72 * Tv.u; } + if !root.busy: Icon { name: "warning"; size: 64 * Tv.u; ink: Tv.warn-ink; } + } + Title { + horizontal-alignment: center; + text: root.title; + } + Label { + horizontal-alignment: center; + text: root.text; + wrap: word-wrap; + } + Caption { + horizontal-alignment: center; + text: root.busy ? "" : "Újrapróbálkozik magától. Vissza: kilépés"; + } + } +} diff --git a/ui/types.slint b/ui/types.slint new file mode 100644 index 0000000..00bad10 --- /dev/null +++ b/ui/types.slint @@ -0,0 +1,91 @@ +// Data the Rust side fills in. Every page is a list of Lines (src/page.rs); +// all lengths here are design px (1920x1080 grid), multiplied by Tv.u. + +// A button / choice / text field on a line. x, y relative to the line. +export struct Chip { + id: string, + text: string, + icon: string, + x: float, + y: float, + w: float, + h: float, + // Selected (a choice, the current tab). + active: bool, + // "" | "primary" (accent glass) | "danger" | "field" (text field) + tone: string, + enabled: bool, +} + +// A card in a cards line. +export struct Card { + id: string, + title: string, + // Under the card (cards lines with captions). + caption: string, + detail: string, + image: image, + // 0..1; negative = no bar. + progress: float, + badge: string, + badge-tone: string, + // "liked": the liked songs' card (a heart on a gradient). + mark: string, + big: string, + // Highlighted (plays now). + current: bool, +} + +export struct Check { + state: int, + label: string, + detail: string, +} + +// One line of a page. +// hero big title block with buttons; with a cover (`framed`) the +// texts sit right of a square (or round) picture +// heading section title (+ subtitle) +// text paragraph (style "body" | "caption" | "label" | "warn" | "bad" | "good") +// notice icon + title + text, toned ("good" | "bad" | "warn" | "info") +// chips a row of chips (title = label above them) +// cards a row of cards (style "square" | "round" | "landscape"; captions under them) +// item list row: optional picture, title, meta, text, chips +// track a song row: number or art, title, meta, duration, "more" chip +// checks two columns of check rows +// keyboard room for the page's on-screen keyboard +export struct Line { + id: string, + kind: string, + y: float, + h: float, + x: float, + w: float, + title: string, + subtitle: string, + meta: string, + extra: string, + text: string, + note: string, + style: string, + tone: string, + icon: string, + image: image, + logo: image, + cover: image, + round: bool, + framed: bool, + progress: float, + col: int, + captions: bool, + cards: [Card], + chips: [Chip], + checks: [Check], +} + +// A row of the queue (now playing). +export struct QueueItem { + title: string, + artist: string, + image: image, +}