From 97332726803384127b1984389cd9fd724f5c4271 Mon Sep 17 00:00:00 2001 From: hosted-fornet Date: Tue, 18 Feb 2025 10:02:43 -0800 Subject: [PATCH] remove chess from core distribution --- Cargo.toml | 1 - hyperdrive/packages/chess/Cargo.lock | 3922 ----------------- hyperdrive/packages/chess/Cargo.toml | 10 - .../packages/chess/api/chess:sys-v0.wit | 38 - hyperdrive/packages/chess/chess/Cargo.toml | 22 - hyperdrive/packages/chess/chess/src/icon | 1 - hyperdrive/packages/chess/chess/src/lib.rs | 573 --- hyperdrive/packages/chess/metadata.json | 18 - hyperdrive/packages/chess/pkg/manifest.json | 16 - .../chess/pkg/ui/assets/index-237df385.js | 87 - hyperdrive/packages/chess/pkg/ui/index.html | 53 - 11 files changed, 4741 deletions(-) delete mode 100644 hyperdrive/packages/chess/Cargo.lock delete mode 100644 hyperdrive/packages/chess/Cargo.toml delete mode 100644 hyperdrive/packages/chess/api/chess:sys-v0.wit delete mode 100644 hyperdrive/packages/chess/chess/Cargo.toml delete mode 100644 hyperdrive/packages/chess/chess/src/icon delete mode 100644 hyperdrive/packages/chess/chess/src/lib.rs delete mode 100644 hyperdrive/packages/chess/metadata.json delete mode 100644 hyperdrive/packages/chess/pkg/manifest.json delete mode 100644 hyperdrive/packages/chess/pkg/ui/assets/index-237df385.js delete mode 100644 hyperdrive/packages/chess/pkg/ui/index.html diff --git a/Cargo.toml b/Cargo.toml index eb050b9bc..af6a49a93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,6 @@ members = [ "hyperdrive/packages/app-store/app-store", "hyperdrive/packages/app-store/ft-worker", "hyperdrive/packages/app-store/downloads", "hyperdrive/packages/app-store/chain", "hyperdrive/packages/app-store/download", "hyperdrive/packages/app-store/install", "hyperdrive/packages/app-store/uninstall", "hyperdrive/packages/app-store/reset-store", - "hyperdrive/packages/chess/chess", "hyperdrive/packages/contacts/contacts", "hyperdrive/packages/homepage/homepage", "hyperdrive/packages/kns-indexer/kns-indexer", "hyperdrive/packages/kns-indexer/get-block", "hyperdrive/packages/settings/settings", "hyperdrive/packages/kns-indexer/reset", diff --git a/hyperdrive/packages/chess/Cargo.lock b/hyperdrive/packages/chess/Cargo.lock deleted file mode 100644 index 5857644cc..000000000 --- a/hyperdrive/packages/chess/Cargo.lock +++ /dev/null @@ -1,3922 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "alloy" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59febb24956a41c29bb5f450978fbe825bd6456b3f80586c8bd558dc882e7b6a" -dependencies = [ - "alloy-consensus", - "alloy-core", - "alloy-eips", - "alloy-genesis", - "alloy-json-rpc", - "alloy-provider", - "alloy-rpc-client", - "alloy-rpc-types", - "alloy-serde", - "alloy-transport", - "alloy-transport-http", -] - -[[package]] -name = "alloy-chains" -version = "0.1.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830045a4421ee38d3ab570d36d4d2b5152c066e72797139224da8de5d5981fd0" -dependencies = [ - "alloy-primitives", - "num_enum", - "strum", -] - -[[package]] -name = "alloy-consensus" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88e1edea70787c33e11197d3f32ae380f3db19e6e061e539a5bcf8184a6b326" -dependencies = [ - "alloy-eips", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "alloy-trie", - "auto_impl", - "c-kzg", - "derive_more", - "serde", -] - -[[package]] -name = "alloy-consensus-any" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b1bb53f40c0273cd1975573cd457b39213e68584e36d1401d25fd0398a1d65" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-core" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618bd382f0bc2ac26a7e4bfae01c9b015ca8f21b37ca40059ae35a7e62b3dc6" -dependencies = [ - "alloy-dyn-abi", - "alloy-json-abi", - "alloy-primitives", - "alloy-rlp", - "alloy-sol-types", -] - -[[package]] -name = "alloy-dyn-abi" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41056bde53ae10ffbbf11618efbe1e0290859e5eab0fe9ef82ebdb62f12a866f" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-type-parser", - "alloy-sol-types", - "const-hex", - "itoa", - "serde", - "serde_json", - "winnow", -] - -[[package]] -name = "alloy-eip2930" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "serde", -] - -[[package]] -name = "alloy-eip7702" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "derive_more", - "serde", -] - -[[package]] -name = "alloy-eips" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9fadfe089e9ccc0650473f2d4ef0a28bc015bbca5631d9f0f09e49b557fdb3" -dependencies = [ - "alloy-eip2930", - "alloy-eip7702", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "c-kzg", - "derive_more", - "once_cell", - "serde", - "sha2", -] - -[[package]] -name = "alloy-genesis" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2a4cf7b70f3495788e74ce1c765260ffe38820a2a774ff4aacb62e31ea73f9" -dependencies = [ - "alloy-primitives", - "alloy-serde", - "alloy-trie", - "serde", -] - -[[package]] -name = "alloy-json-abi" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c357da577dfb56998d01f574d81ad7a1958d248740a7981b205d69d65a7da404" -dependencies = [ - "alloy-primitives", - "alloy-sol-type-parser", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-json-rpc" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e29040b9d5fe2fb70415531882685b64f8efd08dfbd6cc907120650504821105" -dependencies = [ - "alloy-primitives", - "alloy-sol-types", - "serde", - "serde_json", - "thiserror 2.0.9", - "tracing", -] - -[[package]] -name = "alloy-network" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510cc00b318db0dfccfdd2d032411cfae64fc144aef9679409e014145d3dacc4" -dependencies = [ - "alloy-consensus", - "alloy-consensus-any", - "alloy-eips", - "alloy-json-rpc", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-types-any", - "alloy-rpc-types-eth", - "alloy-serde", - "alloy-signer", - "alloy-sol-types", - "async-trait", - "auto_impl", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.9", -] - -[[package]] -name = "alloy-network-primitives" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9081c099e798b8a2bba2145eb82a9a146f01fc7a35e9ab6e7b43305051f97550" -dependencies = [ - "alloy-consensus", - "alloy-eips", - "alloy-primitives", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-primitives" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" -dependencies = [ - "alloy-rlp", - "bytes", - "cfg-if", - "const-hex", - "derive_more", - "foldhash", - "hashbrown 0.15.2", - "hex-literal", - "indexmap", - "itoa", - "k256", - "keccak-asm", - "paste", - "proptest", - "rand 0.8.5", - "ruint", - "rustc-hash", - "serde", - "sha3", - "tiny-keccak", -] - -[[package]] -name = "alloy-provider" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc2dfaddd9a30aa870a78a4e1316e3e115ec1e12e552cbc881310456b85c1f24" -dependencies = [ - "alloy-chains", - "alloy-consensus", - "alloy-eips", - "alloy-json-rpc", - "alloy-network", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rpc-client", - "alloy-rpc-types-eth", - "alloy-transport", - "alloy-transport-http", - "async-stream", - "async-trait", - "auto_impl", - "dashmap", - "futures", - "futures-utils-wasm", - "lru", - "parking_lot", - "pin-project", - "reqwest", - "schnellru", - "serde", - "serde_json", - "thiserror 2.0.9", - "tokio", - "tracing", - "url", - "wasmtimer", -] - -[[package]] -name = "alloy-rlp" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f542548a609dca89fcd72b3b9f355928cf844d4363c5eed9c5273a3dd225e097" -dependencies = [ - "alloy-rlp-derive", - "arrayvec", - "bytes", -] - -[[package]] -name = "alloy-rlp-derive" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a833d97bf8a5f0f878daf2c8451fff7de7f9de38baa5a45d936ec718d81255a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "alloy-rpc-client" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531137b283547d5b9a5cafc96b006c64ef76810c681d606f28be9781955293b6" -dependencies = [ - "alloy-json-rpc", - "alloy-primitives", - "alloy-transport", - "alloy-transport-http", - "futures", - "pin-project", - "reqwest", - "serde", - "serde_json", - "tokio", - "tokio-stream", - "tower", - "tracing", - "url", - "wasmtimer", -] - -[[package]] -name = "alloy-rpc-types" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3410a472ce26c457e9780f708ee6bd540b30f88f1f31fdab7a11d00bd6aa1aee" -dependencies = [ - "alloy-primitives", - "alloy-rpc-types-eth", - "alloy-serde", - "serde", -] - -[[package]] -name = "alloy-rpc-types-any" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed98e1af55a7d856bfa385f30f63d8d56be2513593655c904a8f4a7ec963aa3e" -dependencies = [ - "alloy-consensus-any", - "alloy-rpc-types-eth", - "alloy-serde", -] - -[[package]] -name = "alloy-rpc-types-eth" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8737d7a6e37ca7bba9c23e9495c6534caec6760eb24abc9d5ffbaaba147818e1" -dependencies = [ - "alloy-consensus", - "alloy-consensus-any", - "alloy-eips", - "alloy-network-primitives", - "alloy-primitives", - "alloy-rlp", - "alloy-serde", - "alloy-sol-types", - "derive_more", - "itertools 0.13.0", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-serde" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5851bf8d5ad33014bd0c45153c603303e730acc8a209450a7ae6b4a12c2789e2" -dependencies = [ - "alloy-primitives", - "serde", - "serde_json", -] - -[[package]] -name = "alloy-signer" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e10ca565da6500cca015ba35ee424d59798f2e1b85bc0dd8f81dafd401f029a" -dependencies = [ - "alloy-primitives", - "async-trait", - "auto_impl", - "elliptic-curve", - "k256", - "thiserror 2.0.9", -] - -[[package]] -name = "alloy-sol-macro" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" -dependencies = [ - "alloy-sol-macro-expander", - "alloy-sol-macro-input", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "alloy-sol-macro-expander" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" -dependencies = [ - "alloy-sol-macro-input", - "const-hex", - "heck", - "indexmap", - "proc-macro-error2", - "proc-macro2", - "quote", - "syn 2.0.91", - "syn-solidity", - "tiny-keccak", -] - -[[package]] -name = "alloy-sol-macro-input" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" -dependencies = [ - "const-hex", - "dunce", - "heck", - "proc-macro2", - "quote", - "syn 2.0.91", - "syn-solidity", -] - -[[package]] -name = "alloy-sol-type-parser" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce13ff37285b0870d0a0746992a4ae48efaf34b766ae4c2640fa15e5305f8e73" -dependencies = [ - "serde", - "winnow", -] - -[[package]] -name = "alloy-sol-types" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" -dependencies = [ - "alloy-json-abi", - "alloy-primitives", - "alloy-sol-macro", - "const-hex", - "serde", -] - -[[package]] -name = "alloy-transport" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538a04a37221469cac0ce231b737fd174de2fdfcdd843bdd068cb39ed3e066ad" -dependencies = [ - "alloy-json-rpc", - "base64", - "futures-util", - "futures-utils-wasm", - "serde", - "serde_json", - "thiserror 2.0.9", - "tokio", - "tower", - "tracing", - "url", - "wasmtimer", -] - -[[package]] -name = "alloy-transport-http" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ed40eb1e1265b2911512f6aa1dcece9702d078f5a646730c45e39e2be00ac1c" -dependencies = [ - "alloy-json-rpc", - "alloy-transport", - "reqwest", - "serde_json", - "tower", - "tracing", - "url", -] - -[[package]] -name = "alloy-trie" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e428104b2445a4f929030891b3dbf8c94433a8349ba6480946bf6af7975c2f6" -dependencies = [ - "alloy-primitives", - "alloy-rlp", - "arrayvec", - "derive_more", - "nybbles", - "serde", - "smallvec", - "tracing", -] - -[[package]] -name = "anyhow" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" - -[[package]] -name = "ark-ff" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" -dependencies = [ - "ark-ff-asm 0.3.0", - "ark-ff-macros 0.3.0", - "ark-serialize 0.3.0", - "ark-std 0.3.0", - "derivative", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.3.3", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm 0.4.2", - "ark-ff-macros 0.4.2", - "ark-serialize 0.4.2", - "ark-std 0.4.0", - "derivative", - "digest 0.10.7", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rustc_version 0.4.1", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" -dependencies = [ - "num-bigint", - "num-traits", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-serialize" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" -dependencies = [ - "ark-std 0.3.0", - "digest 0.9.0", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-std 0.4.0", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-std" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" -dependencies = [ - "serde", -] - -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "async-trait" -version = "0.1.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "auto_impl" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.4.0", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" - -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[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 = "blst" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378725facc195f1a538864863f6de233b500a8862747e7f165078a419d5e874" -dependencies = [ - "cc", - "glob", - "threadpool", - "zeroize", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" -dependencies = [ - "serde", -] - -[[package]] -name = "c-kzg" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" -dependencies = [ - "blst", - "cc", - "glob", - "hex", - "libc", - "once_cell", - "serde", -] - -[[package]] -name = "cc" -version = "1.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chess" -version = "0.2.1" -dependencies = [ - "anyhow", - "bincode", - "hyperware_process_lib", - "pleco", - "serde", - "serde_json", - "wit-bindgen", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "const-hex" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" -dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[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 = "cpufeatures" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-bigint" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" -dependencies = [ - "generic-array", - "rand_core 0.6.4", - "subtle", - "zeroize", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", - "unicode-xid", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[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 = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - -[[package]] -name = "ecdsa" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] - -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - -[[package]] -name = "elliptic-curve" -version = "0.13.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "subtle", - "zeroize", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "fastrlp" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "fixed-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" -dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", - "static_assertions", -] - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "futures-utils-wasm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", - "serde", -] - -[[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 = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -dependencies = [ - "serde", -] - -[[package]] -name = "hex-literal" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "http" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" -dependencies = [ - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" - -[[package]] -name = "hyper" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", -] - -[[package]] -name = "hyperware_process_lib" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80405897b911c54f87418e96185d847aaa6ba68ccd79271d1422f9b87932b7d" -dependencies = [ - "alloy", - "alloy-primitives", - "alloy-sol-macro", - "alloy-sol-types", - "anyhow", - "bincode", - "http", - "mime_guess", - "rand 0.8.5", - "regex", - "rmp-serde", - "serde", - "serde_json", - "thiserror 1.0.69", - "url", - "wit-bindgen", -] - -[[package]] -name = "icu_collections" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locid" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - -[[package]] -name = "icu_normalizer" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "utf16_iter", - "utf8_iter", - "write16", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" - -[[package]] -name = "icu_properties" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locid_transform", - "icu_properties_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" - -[[package]] -name = "icu_provider" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_provider_macros", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "impl-codec" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "indexmap" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", - "serde", -] - -[[package]] -name = "ipnet" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" - -[[package]] -name = "js-sys" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "k256" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "keccak-asm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" -dependencies = [ - "digest 0.10.7", - "sha3-asm", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "libc" -version = "0.2.169" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" - -[[package]] -name = "libm" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "litemap" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg 1.4.0", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" - -[[package]] -name = "lru" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.2", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.52.0", -] - -[[package]] -name = "mucow" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55d0c9dc43dedfd2414deb74ade67687749ef88b1d3482024d4c81d901a7a83" - -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg 1.4.0", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "nybbles" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a62e678a89501192cc5ebf47dcbc656b608ae5e1c61c9251fe35230f119fe3" -dependencies = [ - "alloy-rlp", - "const-hex", - "proptest", - "serde", - "smallvec", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" - -[[package]] -name = "openssl" -version = "0.10.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" -dependencies = [ - "bitflags 2.6.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parity-scale-codec" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pest" -version = "2.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" -dependencies = [ - "memchr", - "thiserror 2.0.9", - "ucd-trie", -] - -[[package]] -name = "pin-project" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[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.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] -name = "pleco" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a8c8ab569c544644c468a63f4fe4b33c0706b1472bebb517fabb75ec0f688e" -dependencies = [ - "bitflags 1.3.2", - "lazy_static", - "mucow", - "num_cpus", - "rand 0.6.5", - "rayon", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "prettyplease" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" -dependencies = [ - "proc-macro2", - "syn 2.0.91", -] - -[[package]] -name = "primitive-types" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" -dependencies = [ - "fixed-hash", - "impl-codec", - "uint", -] - -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit", -] - -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "proc-macro2" -version = "1.0.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proptest" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" -dependencies = [ - "bit-set", - "bit-vec", - "bitflags 2.6.0", - "lazy_static", - "num-traits", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_xorshift 0.3.0", - "regex-syntax", - "rusty-fork", - "tempfile", - "unarray", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift 0.1.1", - "winapi", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "serde", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.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_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_xorshift" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "reqwest" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" -dependencies = [ - "base64", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-tls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-registry", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle", -] - -[[package]] -name = "rlp" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" -dependencies = [ - "bytes", - "rustc-hex", -] - -[[package]] -name = "rmp" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" -dependencies = [ - "byteorder", - "num-traits", - "paste", -] - -[[package]] -name = "rmp-serde" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" -dependencies = [ - "byteorder", - "rmp", - "serde", -] - -[[package]] -name = "ruint" -version = "1.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" -dependencies = [ - "alloy-rlp", - "ark-ff 0.3.0", - "ark-ff 0.4.2", - "bytes", - "fastrlp 0.3.1", - "fastrlp 0.4.0", - "num-bigint", - "num-integer", - "num-traits", - "parity-scale-codec", - "primitive-types", - "proptest", - "rand 0.8.5", - "rlp", - "ruint-macro", - "serde", - "valuable", - "zeroize", -] - -[[package]] -name = "ruint-macro" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" - -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver 1.0.24", -] - -[[package]] -name = "rustix" -version = "0.38.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" -dependencies = [ - "bitflags 2.6.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.59.0", -] - -[[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.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" - -[[package]] -name = "rustversion" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" - -[[package]] -name = "rusty-fork" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" -dependencies = [ - "fnv", - "quick-error", - "tempfile", - "wait-timeout", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "schnellru" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" -dependencies = [ - "ahash", - "cfg-if", - "hashbrown 0.13.2", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.6.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" - -[[package]] -name = "semver-parser" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.216" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.216" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "serde_json" -version = "1.0.134" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[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 = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "sha3-asm" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" -dependencies = [ - "cc", - "cfg-if", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg 1.4.0", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -dependencies = [ - "serde", -] - -[[package]] -name = "socket2" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spdx" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae30cc7bfe3656d60ee99bf6836f472b0c53dddcbf335e253329abb16e535a2" -dependencies = [ - "smallvec", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strum" -version = "0.26.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.91", -] - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "0.8.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[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.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" -dependencies = [ - "cfg-if", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" -dependencies = [ - "thiserror-impl 2.0.9", -] - -[[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.91", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinystr" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", - "tokio-util", -] - -[[package]] -name = "tokio-util" -version = "0.7.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" - -[[package]] -name = "toml_edit" -version = "0.22.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tower-layer", - "tower-service", -] - -[[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.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "ucd-trie" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unarray" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" - -[[package]] -name = "unicase" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" - -[[package]] -name = "unicode-ident" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "wait-timeout" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" -dependencies = [ - "libc", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" -dependencies = [ - "cfg-if", - "once_cell", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.91", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" - -[[package]] -name = "wasm-encoder" -version = "0.220.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" -dependencies = [ - "leb128", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.220.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3e5f5920c5abfc45573c89b07b38efdaae1515ef86f83dad12d60e50ecd62b" -dependencies = [ - "anyhow", - "indexmap", - "serde", - "serde_derive", - "serde_json", - "spdx", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.220.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" -dependencies = [ - "ahash", - "bitflags 2.6.0", - "hashbrown 0.14.5", - "indexmap", - "semver 1.0.24", -] - -[[package]] -name = "wasmtimer" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" -dependencies = [ - "futures", - "js-sys", - "parking_lot", - "pin-utils", - "slab", - "wasm-bindgen", -] - -[[package]] -name = "web-sys" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[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-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-registry" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" -dependencies = [ - "windows-result", - "windows-strings", - "windows-targets", -] - -[[package]] -name = "windows-result" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-strings" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" -dependencies = [ - "windows-result", - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[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.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a2b3e15cd6068f233926e7d8c7c588b2ec4fb7cc7bf3824115e7c7e2a8485a3" -dependencies = [ - "wit-bindgen-rt", - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b632a5a0fa2409489bd49c9e6d99fcc61bb3d4ce9d1907d44662e75a28c71172" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7947d0131c7c9da3f01dfde0ab8bd4c4cf3c5bd49b6dba0ae640f1fa752572ea" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4329de4186ee30e2ef30a0533f9b3c123c019a237a7c82d692807bf1b3ee2697" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn 2.0.91", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177fb7ee1484d113b4792cc480b1ba57664bbc951b42a4beebe573502135b1fc" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn 2.0.91", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.220.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ccedf54cc65f287da268d64d2bf4f7530d2cfb2296ffbe3ad5f65567e4cf53" -dependencies = [ - "anyhow", - "bitflags 2.6.0", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.220.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7117ce3adc0b4354b46dc1cf3190b00b333e65243d244c613ffcc58bdec84d" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver 1.0.24", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" - -[[package]] -name = "writeable" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" - -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - -[[package]] -name = "yoke" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "zerofrom" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] - -[[package]] -name = "zerovec" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.91", -] diff --git a/hyperdrive/packages/chess/Cargo.toml b/hyperdrive/packages/chess/Cargo.toml deleted file mode 100644 index 9daeed7e3..000000000 --- a/hyperdrive/packages/chess/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[workspace] -resolver = "2" -members = [ - "chess", -] - -[profile.release] -panic = "abort" -opt-level = "s" -lto = true diff --git a/hyperdrive/packages/chess/api/chess:sys-v0.wit b/hyperdrive/packages/chess/api/chess:sys-v0.wit deleted file mode 100644 index 742c60b83..000000000 --- a/hyperdrive/packages/chess/api/chess:sys-v0.wit +++ /dev/null @@ -1,38 +0,0 @@ -interface chess { - /// Our "chess protocol" request/response format. We'll always serialize these - /// to a byte vector and send them over IPC. - variant request { - /// lazy-load-blob: none. - new-game(new-game-request), - /// lazy-load-blob: none. - move(move-request), - /// lazy-load-blob: none. - resign(string), - } - - variant response { - /// lazy-load-blob: none. - new-game-accepted, - /// lazy-load-blob: none. - new-game-rejected, - /// lazy-load-blob: none. - move-accepted, - /// lazy-load-blob: none. - move-rejected, - } - - record new-game-request { - white: string, - black: string, - } - - record move-request { - game-id: string, - move-str: string, - } -} - -world chess-sys-v0 { - import chess; - include process-v1; -} diff --git a/hyperdrive/packages/chess/chess/Cargo.toml b/hyperdrive/packages/chess/chess/Cargo.toml deleted file mode 100644 index 29d99df54..000000000 --- a/hyperdrive/packages/chess/chess/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[package] -name = "chess" -version = "0.2.1" -edition = "2021" - -[features] -simulation-mode = [] - -[dependencies] -anyhow = "1.0" -bincode = "1.3.3" -hyperware_process_lib = "1.0.2" -pleco = "0.5" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -wit-bindgen = "0.36.0" - -[lib] -crate-type = ["cdylib"] - -[package.metadata.component] -package = "hyperware:process" diff --git a/hyperdrive/packages/chess/chess/src/icon b/hyperdrive/packages/chess/chess/src/icon deleted file mode 100644 index 00f10fd83..000000000 --- a/hyperdrive/packages/chess/chess/src/icon +++ /dev/null @@ -1 +0,0 @@ -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACJCAYAAAD35nD3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA24SURBVHgB7Z3LbxTJHcd/v+qxDX6sIryRso5XwbvBgAJatD7BZVeLxGEF110pJ25RuPIv7DV/Q9hLDpsjCGkPicgFn5xsAhHY3gRHEJwomEjYHuNHV+3vVz1jz3j6Ud3TM1M1XR/JM0NPd7twf/v3qkcjVBilnk7pD3WYit1hHDb5DfHcJlQUhCFGC+CtmgYxMQly+10IYQxEcApQjIKUY7lOJsQuqP0tULBHf7UNCCbewEH9NYz/cwPx810YUoZGIErdH4P6B9NQGz8F+9s/hWDkJ7lFUBQWj9x/DbWJZywanDj3EoYEpwWiRbF34QwcbM+BGDnVN0Fk0RRMMLoMY/vrLrso5wTSJgoI3gMnCNddFYszAlHbT2fodcEdUSSgwn9BAMt48vwaOIDVAoniirkL5D4uWOM+ygIpQxLBku1WxUqBDLUwjsNCQXJBJ3DJRqFYJZBKCSOWcAnGccUmoVgjELX9ZKG6wmiBLYoMH+Pk+UdgAQMXiA4+UXxCBagp8ByhXc/IIp6cW4MBMjCBaHeyc+Zj+nARPMmIcGWQ8clABKJ2npwGGPmk8u7ElEbGgyc+XIE+01eBeKvRJaP4CNZW/4xn+tf30zeB6I6zHXHdxxpdwtbkpLzXL5fTF4Got0/mQY1c9i6lJLhHuRY87IfL6blAdPoKwQJ4ekC4hBPnl6CH9EwgOt7YmrtMwdU8eHoHZTnUr/MAekRPBBIFo3MUbwTT4Ok9GG7Av5/d60XwWrpAomBUXfPi6DM9Cl5LFYjPVAZMD0RSmkC8OCyhZJEIKIEo5mC34sUxcPga0LVQq/dLKSmUIhAfkFoGX4uZuWtQAl0LRNVXL3tx2EjwHvV5fQpd0pVAdBHM96vYiwzmo0JlcQoLJOqR9RVS+wkWogHfxSgkEJ2xqOAyeNxAiWuH00xzUsyC+HTWLRBGdZZZgNwCieIOLw7noERC7a/mtvq5BBL5Mh93OMueupg3HslnQXhwscdt6BrmKaIZC8S7liGBr+HpMx+b7m4kkCgC9q5laGBX82b5XZNdzSzIjiilbOuxiEAaBayZAlFv/zFPZsmX0ocOKsUbBKzZFkSG3rUMKwZJR6pAGtbDB6bDCl1btfUktS8t3YJ461EBqK8mJe1NFIi3HhWBy/DvzSXOPEi2IN56VAcRXEj8Km6jtx4Vg2ORhIwm3oKEe2fBUzFUrMfoEEijaur2SoKFkZfo5ab+QVWxGYFUF4mprtY69nvLJXUF1UTM0v89qjAqfEWvfV+PY6AEwc/o9VXrpk6BKFU964FIMRdZDCXP0udom/4s+LsV+q4aQlGSayJtk8HbXIwOVKoYnCrul1A3tFCa6M+0TVXI1VDKezxYbY9B/Ex8T6hOt/6zXSBVdC8a/Jp+fkUfHrZsu9vYdg+qxDEjcSiQyrqXNnADqs4xN3MUpCJFsKpC2YtSV0HgdXofT9iBY5KrINXO4SbEb+j1Oxh6auxJ9DNvjlyMOjAaYTQ8qMXsXUg8CNP6B4CtSwXEwewfWhAtEKX+Plq54hiKOrnUPxjvL8RdqAxUNGv08EYWpB5UzHo0UPKP5DbqBntuVKYW0mTmAz2KsOFiatXMXoytCFbIejRopLsNgewXntzrPGxF0uHYIzteGTYaGW0kkCqv76GtSJr7qJhraTISnOI3oQNUHlXkOijHdWebohK5/pznWEwWAQZ/gX60wTZ4jAgFqjXnA1ShpiHkLnruOwmjZfkUv8hFqgrepTpGVvHrffq5nvitkl/SSf8KabAYJNVMUHxGbRgv0AY7mfhwSkAwMgmuwuKQcJsuSEwfEvLa8LepGDadcY56ZiajMqyB0m2IKboZtsFWTtVOCYpW3S2vK33np/3xybqENyH9HFeTq6mNc2jLkHQ8VVwBZ6GbNtgKaUOQ+XNTIGw9FFzJ3C/qtu90o4JjBXVbCyQT3e1/I/78kD2FkdvQOpTAFeQ+CUQcuCkQie+b74xnOo+Xl8j0z4IpAtmKtItBKbZeZu5DyhzttQQJYzVwFnUSuuMeWY97FETO0sUjC6N+3fkr4AUEwW95yb6uA03Ebtvbf0aCyRqlcZNuDkHFF8ZjZxE3EnuqpaTzkBA4UO2MReqN7xMg4UR1lOyUFvG5g73lo4LNCLjJc8P+EbN+FAUmfTLtsDhSBdTSBhmugoMIt4tkeCc1RdVWQfwGCp/eRDTUhqgcn4L6RovJNahYVs5a7YOCXYdUX+lYoQP1ggLZrwBNY4eYTEeBiesgCwUswu9i24AsUOHsOBLHBaILWFfoTo/JRjhDkVd6XqQ6bENcGkttUOEVZwtlEDcvxhV4yCCK62Qhku9yrm5KntKgu+sXU841HfvkHMxIYVvbkBiA6mrqfGYbLMVNC8KlbwGzRtmDrlOoS+nlchEvhKzUVND3qmXMaloblLpC/TPOWZKafgara4FqNNDna7rov9d1DCAr0VlVJb+Pi7TPit4fUx6ulWSFlLYM44kBJtdRAO9p98KFN+yoyra3wcF6Qo3uxF1qt5uZTHMsB/KcWnn8y+fAFwiNjORsyu/gcREZnXnchjh3lKsN9oGw6XaQ2iTO1Zi5n+a+Zwt9l31et8eEAOwJirK3wHlU592LaH5x0vpk0LTPB7trg40oJIHIWqnPWR0ICjprGAhmHXFKz+xPy4Q+AjM6haSU20M5Dw5IIAGU/rTmvhNvAQwvjl40JhkdpBp01au4IQU5eottRMcgwZjbFkSPC0mIQUwuLMKlzH2yloDgFDrOYul2KXeHdAoWiNx2OwaRkHzxMi+sFlC2pcGMQUUoUn5PzFgUVwhOkEC2HJ/RnjaqLOvCCrMF7TOtEaq0OMXdBQH/v7cl8MfnNnWxzEWELpGnWZDkC2s6ZLGJDG8UOg8HucrNKRA4c/ZVVAchXwMuEhpcYBl+GbtdpUx1iCNpXGlWG6JK7GfgGhgNYYgEEjroZiLrYTJgeFZ3qh0/No/1aHLcikRtMBAa98M4ZkXCsEUgI+IluEZ055qlsrxQTGuXu55oVYBoNcQjsUl1y/DIaeesiMJ1fosEsrm/Di5hfOc2YDMfhrf0Xay76KH4FIQjsV3PmA/TDgfMLo0LaSQvWiBOBap6miPchrwgPIeAuucRvoBuiMR2k94XDdcWaT3ulhOuhrpfOEDljy1LUOEauIBEnp6Q907ciObIFhBWHFGwekkPOch33Ky2QLYTHo2xPRKIC3GIUl8Ucw94F0LJsUN5Jj5yNaYj64+IZvJlV28HCR4ZiyOBjL1dA5uJytkG0yRjQO1Pyy1YaZfB/Th6zEfOY2Wx/0e/2IVDY3EoEMRfUAwS2h2s5vH5regxp2i+zocpQbBM581vldDmYBXXdUzaoH3AUG3iGdhK5kpAaahLlPksFhZY/DlfQHjwWp8796E5VlfsN2HY9jduF8jopu3LLRXz3Ty/hTv1Sh3hRQFn8QFB9sYgLe6FaROI9W6mqAVAcKf+MFDa3QvTOS9GwCO62yxdFlPPLcl/1/LUBAwomJR34k+rpy8UOK+sk+u7k/tcCCbzefvPMffCdMwF0IvabY/8cigWtvOYw8WxyfO/O765Y1S7djMoHoGnWiiIrYPFT3sY3/UCqRpvcSluc6xAtBWRWM0FZKuIDFeOB6dNkidOidALpCokWA8mUSA4ce6l9ZVVT/ekWA8mfeplHR+AZ7hJsR5MqkC0shB9wDqsZFgPJnvy9sm9JWdHvXuS4TnZGdaDyRSIr4sMKTiynGU9GKPlH3Di50vDsQqAR8NVU76mBpivD4I+YB0adswfsWYsEJ32+oDVfcLwsYlraZJvhSEdsHpX4yzsWt45/zDPIbkEogPWialvweMmO/mf3pl7jTLE2Q1SYvWeAuk8YimPazk8CgqAk+cfgfCdec7ABTHDrOU4xVc5PLH30McjDsDX6D/PClt8hC5Q/3s6BSfVDf3MGY99sDgo7ijiWpp0JRDdBvViGrbrN/wQRcvg7hE5fhffme1qaY+uF9LVQauUPmi1jVrwsFtxMKWstIzvnFv2mY1F0LXAEx+WkkR07WJaUdvfL1DIvACeAULpbMGMJY5SBcJ4kQyScsXBlC4QRm09uUiZjdkSk55yCIIHZbmVVnoiEEbtPDkNYfCpz256DGcrBzt/wh991JOJ9z0TCOPrJD2G6xxy6tsyspUkevq8GF2g4Q4iX3EtH7n3WhfBeigOpqcWpBVVX71MVbWL4OmeMHwM/322hGc+7/mTOvomEEYHrxAs+LikIHrweLikO0v7RF8Fwvi4pCi4DvXwQTf9KoV+KwwIXy8xRD+VVDwqu75hysAEwmhrMq4+Jbdj6YI1g2YwVqOtBWAB6s3TsyDUgnc7DXT6iku6j2vAWCGQJtrtqP2zlRVKw53Ay5XH/chQTLBKIIx2Oyco0xGq+IL7rmGhMJpYJ5AmUXxSmx9qi2KxMJpYK5BWdIxSExfoDzoky1lS8KnEGqwvr9gqjCZOCKSJHt64tUM9xQczzlkVPQQwXIEA16LFedzAKYG0orafzoAM5q0Wi6OiaMVZgbQSDZzeJaHI09HC/QMq5euYAje0+8D9DVdF0cpQCOQ4h4KRe1MQ1KZ7IhoWAz8tlAURig2YGHupB3APGUMpkDjU6v0xmPlgmtLnUQhHpwDpXagp/aWEqY4DgmCXClbRykoSN0HhHtRgF8bGNuD7v23ZHlyWxQ8I7HVya0LmQgAAAABJRU5ErkJggg== \ No newline at end of file diff --git a/hyperdrive/packages/chess/chess/src/lib.rs b/hyperdrive/packages/chess/chess/src/lib.rs deleted file mode 100644 index bd71ba3dc..000000000 --- a/hyperdrive/packages/chess/chess/src/lib.rs +++ /dev/null @@ -1,573 +0,0 @@ -#![feature(let_chains)] -use crate::hyperware::process::chess::{ - MoveRequest, NewGameRequest, Request as ChessRequest, Response as ChessResponse, -}; -use hyperware_process_lib::{ - await_message, call_init, get_blob, get_typed_state, http, http::server, println, set_state, - Address, LazyLoadBlob, Message, NodeId, Request, Response, -}; -use pleco::Board; -use serde::{Deserialize, Serialize}; -use std::collections::{HashMap, HashSet}; - -const ICON: &str = include_str!("icon"); - -/// -/// Our serializable state format. -/// -#[derive(Clone, Debug, Serialize, Deserialize)] -struct Game { - /// the node with whom we are playing - pub id: String, - pub turns: u64, - pub board: String, - pub white: String, - pub black: String, - pub ended: bool, -} - -#[derive(Debug, Serialize, Deserialize)] -struct ChessState { - pub our: Address, - pub games: HashMap, // game is by opposing player id - pub clients: HashSet, // doesn't get persisted -} - -#[derive(Debug, Serialize, Deserialize)] -struct StoredChessState { - pub games: HashMap, // game is by opposing player id -} - -fn save_chess_state(state: &ChessState) { - set_state(&bincode::serialize(&state.games).unwrap()); -} - -fn load_chess_state(our: Address) -> ChessState { - match get_typed_state(|bytes| bincode::deserialize::>(bytes)) { - Some(games) => ChessState { - our, - games, - clients: HashSet::new(), - }, - None => { - let state = ChessState { - our, - games: HashMap::new(), - clients: HashSet::new(), - }; - save_chess_state(&state); - state - } - } -} - -fn send_ws_update(http_server: &mut server::HttpServer, game: &Game) { - http_server.ws_push_all_channels( - "/", - server::WsMessageType::Binary, - LazyLoadBlob { - mime: Some("application/json".to_string()), - bytes: serde_json::json!({ - "kind": "game_update", - "data": game, - }) - .to_string() - .into_bytes(), - }, - ) -} - -// Boilerplate: generate the wasm bindings for a process -wit_bindgen::generate!({ - path: "target/wit", - world: "chess-sys-v0", - generate_unused_types: true, - additional_derives: [PartialEq, serde::Deserialize, serde::Serialize], -}); - -// After generating bindings, use this macro to define the Component struct -// and its init() function, which the kernel will look for on startup. -call_init!(initialize); -fn initialize(our: Address) { - // A little printout to show in terminal that the process has started. - println!("started"); - - // add ourselves to the homepage - hyperware_process_lib::homepage::add_to_homepage("Chess", Some(ICON), Some("/"), None); - - // create an HTTP server struct with which to manipulate `http-server:distro:sys` - let mut http_server = server::HttpServer::new(5); - let http_config = server::HttpBindingConfig::default(); - - // Serve the index.html and other UI files found in pkg/ui at the root path. - // authenticated=true, local_only=false - http_server - .serve_ui("ui", vec!["/"], http_config.clone()) - .expect("failed to serve ui"); - - // Allow HTTP requests to be made to /games; they will be handled dynamically. - http_server - .bind_http_path("/games", http_config.clone()) - .expect("failed to bind /games"); - - // Allow websockets to be opened at / (our process ID will be prepended). - http_server - .bind_ws_path("/", server::WsBindingConfig::default()) - .expect("failed to bind ws"); - - // Grab our state, then enter the main event loop. - let mut state: ChessState = load_chess_state(our); - main_loop(&mut state, &mut http_server); -} - -fn main_loop(state: &mut ChessState, http_server: &mut server::HttpServer) { - loop { - // Call await_message() to wait for any incoming messages. - // If we get a network error, make a print and throw it away. - // In a high-quality consumer-grade app, we'd want to explicitly handle - // this and surface it to the user. - match await_message() { - Err(send_error) => { - println!("got network error: {send_error:?}"); - continue; - } - Ok(message) => match handle_request(&message, state, http_server) { - Ok(()) => continue, - Err(e) => println!("error handling request: {e}"), - }, - } - } -} - -/// Handle chess protocol messages from ourself *or* other nodes. -fn handle_request( - message: &Message, - state: &mut ChessState, - http_server: &mut server::HttpServer, -) -> anyhow::Result<()> { - // Throw away responses. We never expect any responses *here*, because for every - // chess protocol request, we *await* its response in-place. This is appropriate - // for direct node-to-node comms, less appropriate for other circumstances... - if !message.is_request() { - return Ok(()); - } - - // If the request is from another node, handle it as an incoming request. - // Note that we can enforce the ProcessId as well, but it shouldn't be a trusted - // piece of information, since another node can easily spoof any ProcessId on a request. - // It can still be useful simply as a protocol-level switch to handle different kinds of - // requests from the same node, with the knowledge that the remote node can finagle with - // which ProcessId a given message can be from. It's their code, after all. - if message.source().node != state.our.node { - // Deserialize the request IPC to our format, and throw it away if it - // doesn't fit. - let Ok(chess_request) = serde_json::from_slice::(message.body()) else { - return Err(anyhow::anyhow!("invalid chess request")); - }; - handle_chess_request(&message.source().node, state, http_server, &chess_request) - } - // ...and if the request is from ourselves, handle it as our own! - // Note that since this is a local request, we *can* trust the ProcessId. - else { - // Here, we accept messages *from any local process that can message this one*. - // Since the manifest specifies that this process is *public*, any local process - // can "play chess" for us. - // - // If you wanted to restrict this privilege, you could check for a specific process, - // package, and/or publisher here, *or* change the manifest to only grant messaging - // capabilities to specific processes. - - // if the message is from the HTTP server runtime module, we should handle it - // as an HTTP request and not a chess request - if message.source().process == "http-server:distro:sys" { - return handle_http_request(state, http_server, message); - } - - let Ok(chess_request) = serde_json::from_slice::(message.body()) else { - return Err(anyhow::anyhow!("invalid chess request")); - }; - let _game = handle_local_request(state, &chess_request)?; - Ok(()) - } -} - -/// Handle chess protocol messages from other nodes. -fn handle_chess_request( - source_node: &NodeId, - state: &mut ChessState, - http_server: &mut server::HttpServer, - action: &ChessRequest, -) -> anyhow::Result<()> { - println!("handling action from {source_node}: {action:?}"); - - // For simplicity's sake, we'll just use the node we're playing with as the game id. - // This limits us to one active game per partner. - let game_id = source_node; - - match action { - ChessRequest::NewGame(NewGameRequest { white, black }) => { - // Make a new game with source.node - // This will replace any existing game with source.node! - if state.games.contains_key(game_id) { - println!("chess: resetting game with {game_id} on their request!"); - } - let game = Game { - id: game_id.to_string(), - turns: 0, - board: Board::start_pos().fen(), - white: white.to_string(), - black: black.to_string(), - ended: false, - }; - // Use our helper function to persist state after every action. - // The simplest and most trivial way to keep state. You'll want to - // use a database or something in a real app, and consider performance - // when doing intensive data-based operations. - send_ws_update(http_server, &game); - state.games.insert(game_id.to_string(), game); - save_chess_state(&state); - // Send a response to tell them we've accepted the game. - // Remember, the other player is waiting for this. - Response::new() - .body(serde_json::to_vec(&ChessResponse::NewGameAccepted)?) - .send()?; - Ok(()) - } - ChessRequest::Move(MoveRequest { ref move_str, .. }) => { - // Get the associated game, and respond with an error if - // we don't have it in our state. - let Some(game) = state.games.get_mut(game_id) else { - // If we don't have a game with them, reject the move. - Response::new() - .body(serde_json::to_vec(&ChessResponse::MoveRejected)?) - .send()?; - return Ok(()); - }; - // Convert the saved board to one we can manipulate. - let mut board = Board::from_fen(&game.board).unwrap(); - if !board.apply_uci_move(move_str) { - // Reject invalid moves! - Response::new() - .body(serde_json::to_vec(&ChessResponse::MoveRejected)?) - .send()?; - return Ok(()); - } - game.turns += 1; - if board.checkmate() || board.stalemate() { - game.ended = true; - } - // Persist state. - game.board = board.fen(); - send_ws_update(http_server, &game); - save_chess_state(&state); - // Send a response to tell them we've accepted the move. - Response::new() - .body(serde_json::to_vec(&ChessResponse::MoveAccepted)?) - .send()?; - Ok(()) - } - ChessRequest::Resign(_) => { - // They've resigned. The sender isn't waiting for a response to this, - // so we don't need to send one. - match state.games.get_mut(game_id) { - Some(game) => { - game.ended = true; - send_ws_update(http_server, &game); - save_chess_state(&state); - } - None => {} - } - Ok(()) - } - } -} - -/// Handle actions we are performing. Here's where we'll send_and_await various requests. -fn handle_local_request(state: &mut ChessState, action: &ChessRequest) -> anyhow::Result { - match action { - ChessRequest::NewGame(NewGameRequest { white, black }) => { - // Create a new game. We'll enforce that one of the two players is us. - if white != &state.our.node && black != &state.our.node { - return Err(anyhow::anyhow!("cannot start a game without us!")); - } - let game_id = if white == &state.our.node { - black - } else { - white - }; - // If we already have a game with this player, throw an error. - if let Some(game) = state.games.get(game_id) - && !game.ended - { - return Err(anyhow::anyhow!("already have a game with {game_id}")); - }; - // Send the other player a NewGame request - // The request is exactly the same as what we got from terminal. - // We'll give their node 30 seconds to respond... - let Ok(Message::Response { ref body, .. }) = Request::new() - .target((game_id, state.our.process.clone())) - .body(serde_json::to_vec(&action)?) - .send_and_await_response(30)? - else { - return Err(anyhow::anyhow!( - "other player did not respond properly to new game request" - )); - }; - // If they accept, create a new game -- otherwise, error out. - if serde_json::from_slice::(body)? != ChessResponse::NewGameAccepted { - return Err(anyhow::anyhow!("other player rejected new game request!")); - } - // New game with default board. - let game = Game { - id: game_id.to_string(), - turns: 0, - board: Board::start_pos().fen(), - white: white.to_string(), - black: black.to_string(), - ended: false, - }; - state.games.insert(game_id.to_string(), game.clone()); - save_chess_state(&state); - Ok(game) - } - ChessRequest::Move(MoveRequest { game_id, move_str }) => { - // Make a move. We'll enforce that it's our turn. The game_id is the - // person we're playing with. - let Some(game) = state.games.get_mut(game_id) else { - return Err(anyhow::anyhow!("no game with {game_id}")); - }; - if (game.turns % 2 == 0 && game.white != state.our.node) - || (game.turns % 2 == 1 && game.black != state.our.node) - { - return Err(anyhow::anyhow!("not our turn!")); - } else if game.ended { - return Err(anyhow::anyhow!("that game is over!")); - } - let mut board = Board::from_fen(&game.board).unwrap(); - if !board.apply_uci_move(move_str) { - return Err(anyhow::anyhow!("illegal move!")); - } - // Send the move to the other player, then check if the game is over. - // The request is exactly the same as what we got from terminal. - // We'll give their node 30 seconds to respond... - let Ok(Message::Response { ref body, .. }) = Request::new() - .target((game_id, state.our.process.clone())) - .body(serde_json::to_vec(&action)?) - .send_and_await_response(30)? - else { - return Err(anyhow::anyhow!( - "other player did not respond properly to our move" - )); - }; - if serde_json::from_slice::(body)? != ChessResponse::MoveAccepted { - return Err(anyhow::anyhow!("other player rejected our move")); - } - game.turns += 1; - if board.checkmate() || board.stalemate() { - game.ended = true; - } - game.board = board.fen(); - let game = game.clone(); - save_chess_state(&state); - Ok(game) - } - ChessRequest::Resign(ref with_who) => { - // Resign from a game with a given player. - let Some(game) = state.games.get_mut(with_who) else { - return Err(anyhow::anyhow!("no game with {with_who}")); - }; - // send the other player an end game request -- no response expected - Request::new() - .target((with_who, state.our.process.clone())) - .body(serde_json::to_vec(&action)?) - .send()?; - game.ended = true; - let game = game.clone(); - save_chess_state(&state); - Ok(game) - } - } -} - -/// Handle HTTP requests from our own frontend. -fn handle_http_request( - state: &mut ChessState, - http_server: &mut server::HttpServer, - message: &Message, -) -> anyhow::Result<()> { - let request = http_server.parse_request(message.body())?; - - // the HTTP server helper struct allows us to pass functions that - // handle the various types of requests we get from the frontend - http_server.handle_request( - request, - |incoming| { - // client frontend sent an HTTP request, process it and - // return an HTTP response - // these functions can reuse the logic from handle_local_request - // after converting the request into the appropriate format! - match incoming.method().unwrap_or_default() { - http::Method::GET => handle_get(state), - http::Method::POST => handle_post(state), - http::Method::PUT => handle_put(state), - http::Method::DELETE => handle_delete(state, &incoming), - _ => ( - server::HttpResponse::new(http::StatusCode::METHOD_NOT_ALLOWED), - None, - ), - } - }, - |_channel_id, _message_type, _message| { - // client frontend sent a websocket message - // we don't expect this! we only use websockets to push updates - }, - ); - - Ok(()) -} - -/// On GET: return all active games -fn handle_get(state: &mut ChessState) -> (server::HttpResponse, Option) { - ( - server::HttpResponse::new(http::StatusCode::OK), - Some(LazyLoadBlob { - mime: Some("application/json".to_string()), - bytes: serde_json::to_vec(&state.games).expect("failed to serialize games!"), - }), - ) -} - -/// On POST: create a new game -fn handle_post(state: &mut ChessState) -> (server::HttpResponse, Option) { - let Some(blob) = get_blob() else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - let Ok(blob_json) = serde_json::from_slice::(&blob.bytes) else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - let Some(game_id) = blob_json["id"].as_str() else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - - let player_white = blob_json["white"] - .as_str() - .unwrap_or(state.our.node.as_str()) - .to_string(); - let player_black = blob_json["black"].as_str().unwrap_or(game_id).to_string(); - - match handle_local_request( - state, - &ChessRequest::NewGame(NewGameRequest { - white: player_white, - black: player_black, - }), - ) { - Ok(game) => ( - server::HttpResponse::new(http::StatusCode::OK) - .header("Content-Type", "application/json"), - Some(LazyLoadBlob { - mime: Some("application/json".to_string()), - bytes: serde_json::to_vec(&game).expect("failed to serialize game!"), - }), - ), - Err(e) => ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - Some(LazyLoadBlob { - mime: Some("application/text".to_string()), - bytes: e.to_string().into_bytes(), - }), - ), - } -} - -/// On PUT: make a move -fn handle_put(state: &mut ChessState) -> (server::HttpResponse, Option) { - let Some(blob) = get_blob() else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - let Ok(blob_json) = serde_json::from_slice::(&blob.bytes) else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - - let Some(game_id) = blob_json["id"].as_str() else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - let Some(move_str) = blob_json["move"].as_str() else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - - match handle_local_request( - state, - &ChessRequest::Move(MoveRequest { - game_id: game_id.to_string(), - move_str: move_str.to_string(), - }), - ) { - Ok(game) => ( - server::HttpResponse::new(http::StatusCode::OK) - .header("Content-Type", "application/json"), - Some(LazyLoadBlob { - mime: Some("application/json".to_string()), - bytes: serde_json::to_vec(&game).expect("failed to serialize game!"), - }), - ), - Err(e) => ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - Some(LazyLoadBlob { - mime: Some("application/text".to_string()), - bytes: e.to_string().into_bytes(), - }), - ), - } -} - -/// On DELETE: end the game -fn handle_delete( - state: &mut ChessState, - request: &server::IncomingHttpRequest, -) -> (server::HttpResponse, Option) { - let Some(game_id) = request.query_params().get("id") else { - return ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - None, - ); - }; - match handle_local_request(state, &ChessRequest::Resign(game_id.to_string())) { - Ok(game) => ( - server::HttpResponse::new(http::StatusCode::OK) - .header("Content-Type", "application/json"), - Some(LazyLoadBlob { - mime: Some("application/json".to_string()), - bytes: serde_json::to_vec(&game).expect("failed to serialize game!"), - }), - ), - Err(e) => ( - server::HttpResponse::new(http::StatusCode::BAD_REQUEST), - Some(LazyLoadBlob { - mime: Some("application/text".to_string()), - bytes: e.to_string().into_bytes(), - }), - ), - } -} diff --git a/hyperdrive/packages/chess/metadata.json b/hyperdrive/packages/chess/metadata.json deleted file mode 100644 index 4c4812c55..000000000 --- a/hyperdrive/packages/chess/metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "Chess by Hyperware", - "description": "A peer-to-peer chess game.", - "image": "", - "properties": { - "package_name": "chess", - "current_version": "1.0.0", - "publisher": "sys", - "mirrors": [], - "code_hashes": { - "1.0.0": "" - }, - "wit_version": 1, - "dependencies": [] - }, - "external_url": "https://hyperware.ai", - "animation_url": "" -} diff --git a/hyperdrive/packages/chess/pkg/manifest.json b/hyperdrive/packages/chess/pkg/manifest.json deleted file mode 100644 index 8bd23b3ca..000000000 --- a/hyperdrive/packages/chess/pkg/manifest.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "process_name": "chess", - "process_wasm_path": "/chess.wasm", - "on_exit": "Restart", - "request_networking": true, - "request_capabilities": [ - "homepage:homepage:sys", - "http-server:distro:sys", - "net:distro:sys", - "vfs:distro:sys" - ], - "grant_capabilities": [], - "public": true - } -] diff --git a/hyperdrive/packages/chess/pkg/ui/assets/index-237df385.js b/hyperdrive/packages/chess/pkg/ui/assets/index-237df385.js deleted file mode 100644 index 8c1e1fa5d..000000000 --- a/hyperdrive/packages/chess/pkg/ui/assets/index-237df385.js +++ /dev/null @@ -1,87 +0,0 @@ -var mh=Object.defineProperty;var vh=(e,t,n)=>t in e?mh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ze=(e,t,n)=>(vh(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ac={exports:{}},so={},cc={exports:{}},b={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Wr=Symbol.for("react.element"),yh=Symbol.for("react.portal"),Sh=Symbol.for("react.fragment"),wh=Symbol.for("react.strict_mode"),Ch=Symbol.for("react.profiler"),Eh=Symbol.for("react.provider"),kh=Symbol.for("react.context"),_h=Symbol.for("react.forward_ref"),xh=Symbol.for("react.suspense"),Oh=Symbol.for("react.memo"),Th=Symbol.for("react.lazy"),ku=Symbol.iterator;function Dh(e){return e===null||typeof e!="object"?null:(e=ku&&e[ku]||e["@@iterator"],typeof e=="function"?e:null)}var dc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fc=Object.assign,hc={};function Kn(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||dc}Kn.prototype.isReactComponent={};Kn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function pc(){}pc.prototype=Kn.prototype;function Cl(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||dc}var El=Cl.prototype=new pc;El.constructor=Cl;fc(El,Kn.prototype);El.isPureReactComponent=!0;var _u=Array.isArray,gc=Object.prototype.hasOwnProperty,kl={current:null},mc={key:!0,ref:!0,__self:!0,__source:!0};function vc(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)gc.call(t,r)&&!mc.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1>>1,X=D[H];if(0>>1;Hi(ft,j))Gei(vn,ft)?(D[H]=vn,D[Ge]=j,H=Ge):(D[H]=ft,D[A]=j,H=A);else if(Gei(vn,j))D[H]=vn,D[Ge]=j,H=Ge;else break e}}return L}function i(D,L){var j=D.sortIndex-L.sortIndex;return j!==0?j:D.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();e.unstable_now=function(){return s.now()-l}}var u=[],a=[],g=1,p=null,f=3,S=!1,m=!1,y=!1,C=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(D){for(var L=n(a);L!==null;){if(L.callback===null)r(a);else if(L.startTime<=D)r(a),L.sortIndex=L.expirationTime,t(u,L);else break;L=n(a)}}function w(D){if(y=!1,h(D),!m)if(n(u)!==null)m=!0,Ce(k);else{var L=n(a);L!==null&&dt(w,L.startTime-D)}}function k(D,L){m=!1,y&&(y=!1,d(T),T=-1),S=!0;var j=f;try{for(h(L),p=n(u);p!==null&&(!(p.expirationTime>L)||D&&!$());){var H=p.callback;if(typeof H=="function"){p.callback=null,f=p.priorityLevel;var X=H(p.expirationTime<=L);L=e.unstable_now(),typeof X=="function"?p.callback=X:p===n(u)&&r(u),h(L)}else r(u);p=n(u)}if(p!==null)var ot=!0;else{var A=n(a);A!==null&&dt(w,A.startTime-L),ot=!1}return ot}finally{p=null,f=j,S=!1}}var O=!1,x=null,T=-1,z=5,M=-1;function $(){return!(e.unstable_now()-MD||125H?(D.sortIndex=j,t(a,D),n(u)===null&&D===n(a)&&(y?(d(T),T=-1):y=!0,dt(w,j-H))):(D.sortIndex=X,t(u,D),m||S||(m=!0,Ce(k))),D},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(D){var L=f;return function(){var j=f;f=L;try{return D.apply(this,arguments)}finally{f=j}}}})(Ec);Cc.exports=Ec;var Fh=Cc.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kc=E,je=Fh;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Es=Object.prototype.hasOwnProperty,$h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ou={},Tu={};function Uh(e){return Es.call(Tu,e)?!0:Es.call(Ou,e)?!1:$h.test(e)?Tu[e]=!0:(Ou[e]=!0,!1)}function Hh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Wh(e,t,n,r){if(t===null||typeof t>"u"||Hh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function we(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ce={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ce[e]=new we(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ce[t]=new we(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ce[e]=new we(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ce[e]=new we(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ce[e]=new we(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ce[e]=new we(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ce[e]=new we(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ce[e]=new we(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ce[e]=new we(e,5,!1,e.toLowerCase(),null,!1,!1)});var xl=/[\-:]([a-z])/g;function Ol(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xl,Ol);ce[t]=new we(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xl,Ol);ce[t]=new we(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xl,Ol);ce[t]=new we(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!1,!1)});ce.xlinkHref=new we("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ce[e]=new we(e,1,!1,e.toLowerCase(),null,!0,!0)});function Tl(e,t,n,r){var i=ce.hasOwnProperty(t)?ce[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var u=` -`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=l);break}}}finally{$o=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lr(e):""}function Bh(e){switch(e.tag){case 5:return lr(e.type);case 16:return lr("Lazy");case 13:return lr("Suspense");case 19:return lr("SuspenseList");case 0:case 2:case 15:return e=Uo(e.type,!1),e;case 11:return e=Uo(e.type.render,!1),e;case 1:return e=Uo(e.type,!0),e;default:return""}}function Os(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case En:return"Fragment";case Cn:return"Portal";case ks:return"Profiler";case Dl:return"StrictMode";case _s:return"Suspense";case xs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Oc:return(e.displayName||"Context")+".Consumer";case xc:return(e._context.displayName||"Context")+".Provider";case Pl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ll:return t=e.displayName||null,t!==null?t:Os(e.type)||"Memo";case Lt:t=e._payload,e=e._init;try{return Os(e(t))}catch{}}return null}function Vh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Os(t);case 8:return t===Dl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Kt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qh(e){var t=Dc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ni(e){e._valueTracker||(e._valueTracker=Qh(e))}function Pc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Dc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ts(e,t){var n=t.checked;return Y({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Kt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Lc(e,t){t=t.checked,t!=null&&Tl(e,"checked",t,!1)}function Ds(e,t){Lc(e,t);var n=Kt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ps(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ps(e,t.type,Kt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Lu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ps(e,t,n){(t!=="number"||Mi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ur=Array.isArray;function jn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function _r(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Kh=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(e){Kh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fr[t]=fr[e]})});function Rc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fr.hasOwnProperty(e)&&fr[e]?(""+t).trim():t+"px"}function Mc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Rc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var qh=Y({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ns(e,t){if(t){if(qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function js(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rs=null;function Il(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ms=null,Rn=null,Mn=null;function ju(e){if(e=Qr(e)){if(typeof Ms!="function")throw Error(_(280));var t=e.stateNode;t&&(t=fo(t),Ms(e.stateNode,e.type,t))}}function Ac(e){Rn?Mn?Mn.push(e):Mn=[e]:Rn=e}function bc(){if(Rn){var e=Rn,t=Mn;if(Mn=Rn=null,ju(e),t)for(e=0;e>>=0,e===0?32:31-(op(e)/sp|0)|0}var ii=64,oi=4194304;function ar(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~i;l!==0?r=ar(l):(o&=s,o!==0&&(r=ar(o)))}else s=n&~i,s!==0?r=ar(s):o!==0&&(r=ar(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nt(t),e[t]=n}function cp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=pr),Hu=String.fromCharCode(32),Wu=!1;function rd(e,t){switch(e){case"keyup":return zp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function id(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function $p(e,t){switch(e){case"compositionend":return id(t);case"keypress":return t.which!==32?null:(Wu=!0,Hu);case"textInput":return e=t.data,e===Hu&&Wu?null:e;default:return null}}function Up(e,t){if(kn)return e==="compositionend"||!Fl&&rd(e,t)?(e=td(),ki=Al=At=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ku(n)}}function ud(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ud(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ad(){for(var e=window,t=Mi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mi(e.document)}return t}function $l(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yp(e){var t=ad(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ud(n.ownerDocument.documentElement,n)){if(r!==null&&$l(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=qu(n,o);var s=qu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,_n=null,Us=null,mr=null,Hs=!1;function Gu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hs||_n==null||_n!==Mi(r)||(r=_n,"selectionStart"in r&&$l(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),mr&&Lr(mr,r)||(mr=r,r=Hi(Us,"onSelect"),0Tn||(e.current=qs[Tn],qs[Tn]=null,Tn--)}function W(e,t){Tn++,qs[Tn]=e.current,e.current=t}var qt={},me=Yt(qt),xe=Yt(!1),un=qt;function $n(e,t){var n=e.type.contextTypes;if(!n)return qt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Oe(e){return e=e.childContextTypes,e!=null}function Bi(){V(xe),V(me)}function na(e,t,n){if(me.current!==qt)throw Error(_(168));W(me,t),W(xe,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,Vh(e)||"Unknown",i));return Y({},n,r)}function Vi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,un=me.current,W(me,e),W(xe,xe.current),!0}function ra(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=yd(e,t,un),r.__reactInternalMemoizedMergedChildContext=e,V(xe),V(me),W(me,e)):V(xe),W(xe,n)}var gt=null,ho=!1,ts=!1;function Sd(e){gt===null?gt=[e]:gt.push(e)}function u0(e){ho=!0,Sd(e)}function Xt(){if(!ts&>!==null){ts=!0;var e=0,t=U;try{var n=gt;for(U=1;e>=s,i-=s,mt=1<<32-nt(t)+i|n<T?(z=x,x=null):z=x.sibling;var M=f(d,x,h[T],w);if(M===null){x===null&&(x=z);break}e&&x&&M.alternate===null&&t(d,x),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M,x=z}if(T===h.length)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;TT?(z=x,x=null):z=x.sibling;var $=f(d,x,M.value,w);if($===null){x===null&&(x=z);break}e&&x&&$.alternate===null&&t(d,x),c=o($,c,T),O===null?k=$:O.sibling=$,O=$,x=z}if(M.done)return n(d,x),Q&&Jt(d,T),k;if(x===null){for(;!M.done;T++,M=h.next())M=p(d,M.value,w),M!==null&&(c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return Q&&Jt(d,T),k}for(x=r(d,x);!M.done;T++,M=h.next())M=S(x,d,T,M.value,w),M!==null&&(e&&M.alternate!==null&&x.delete(M.key===null?T:M.key),c=o(M,c,T),O===null?k=M:O.sibling=M,O=M);return e&&x.forEach(function(K){return t(d,K)}),Q&&Jt(d,T),k}function C(d,c,h,w){if(typeof h=="object"&&h!==null&&h.type===En&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case ti:e:{for(var k=h.key,O=c;O!==null;){if(O.key===k){if(k=h.type,k===En){if(O.tag===7){n(d,O.sibling),c=i(O,h.props.children),c.return=d,d=c;break e}}else if(O.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Lt&&ca(k)===O.type){n(d,O.sibling),c=i(O,h.props),c.ref=tr(d,O,h),c.return=d,d=c;break e}n(d,O);break}else t(d,O);O=O.sibling}h.type===En?(c=sn(h.props.children,d.mode,w,h.key),c.return=d,d=c):(w=Ii(h.type,h.key,h.props,null,d.mode,w),w.ref=tr(d,c,h),w.return=d,d=w)}return s(d);case Cn:e:{for(O=h.key;c!==null;){if(c.key===O)if(c.tag===4&&c.stateNode.containerInfo===h.containerInfo&&c.stateNode.implementation===h.implementation){n(d,c.sibling),c=i(c,h.children||[]),c.return=d,d=c;break e}else{n(d,c);break}else t(d,c);c=c.sibling}c=as(h,d.mode,w),c.return=d,d=c}return s(d);case Lt:return O=h._init,C(d,c,O(h._payload),w)}if(ur(h))return m(d,c,h,w);if(Yn(h))return y(d,c,h,w);fi(d,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,c!==null&&c.tag===6?(n(d,c.sibling),c=i(c,h),c.return=d,d=c):(n(d,c),c=us(h,d.mode,w),c.return=d,d=c),s(d)):n(d,c)}return C}var Hn=Td(!0),Dd=Td(!1),Kr={},ct=Yt(Kr),Rr=Yt(Kr),Mr=Yt(Kr);function rn(e){if(e===Kr)throw Error(_(174));return e}function Gl(e,t){switch(W(Mr,t),W(Rr,e),W(ct,Kr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Is(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Is(t,e)}V(ct),W(ct,t)}function Wn(){V(ct),V(Rr),V(Mr)}function Pd(e){rn(Mr.current);var t=rn(ct.current),n=Is(t,e.type);t!==n&&(W(Rr,e),W(ct,n))}function Yl(e){Rr.current===e&&(V(ct),V(Rr))}var q=Yt(0);function Xi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ns=[];function Xl(){for(var e=0;en?n:4,e(!0);var r=rs.transition;rs.transition={};try{e(!1),t()}finally{U=n,rs.transition=r}}function Vd(){return Ke().memoizedState}function f0(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qd(e))Kd(t,n);else if(n=kd(e,t,n,r),n!==null){var i=ye();rt(n,e,r,i),qd(n,t,r)}}function h0(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qd(e))Kd(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,l=o(s,n);if(i.hasEagerState=!0,i.eagerState=l,it(l,s)){var u=t.interleaved;u===null?(i.next=i,Kl(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=kd(e,t,i,r),n!==null&&(i=ye(),rt(n,e,r,i),qd(n,t,r))}}function Qd(e){var t=e.alternate;return e===G||t!==null&&t===G}function Kd(e,t){vr=Zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Ji={readContext:Qe,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},p0={readContext:Qe,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:fa,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ti(4194308,4,$d.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ti(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ti(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=f0.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:da,useDebugValue:nu,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=da(!1),t=e[0];return e=d0.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=lt();if(Q){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),le===null)throw Error(_(349));cn&30||Nd(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fa(Rd.bind(null,r,o,e),[e]),r.flags|=2048,zr(9,jd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lt(),t=le.identifierPrefix;if(Q){var n=vt,r=mt;n=(r&~(1<<32-nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ar++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ut]=t,e[jr]=r,rf(e,t,!1,!1),t.stateNode=e;e:{switch(s=js(n,r),n){case"dialog":B("cancel",e),B("close",e),i=r;break;case"iframe":case"object":case"embed":B("load",e),i=r;break;case"video":case"audio":for(i=0;iVn&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Xi(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),nr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Q)return he(t),null}else 2*J()-o.renderingStartTime>Vn&&n!==1073741824&&(t.flags|=128,r=!0,nr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=J(),t.sibling=null,n=q.current,W(q,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return uu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Le&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function E0(e,t){switch(Hl(t),t.tag){case 1:return Oe(t.type)&&Bi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),V(xe),V(me),Xl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yl(t),null;case 13:if(V(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(q),null;case 4:return Wn(),null;case 10:return Ql(t.type._context),null;case 22:case 23:return uu(),null;case 24:return null;default:return null}}var pi=!1,ge=!1,k0=typeof WeakSet=="function"?WeakSet:Set,P=null;function In(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function sl(e,t,n){try{n()}catch(r){Z(e,t,r)}}var Ca=!1;function _0(e,t){if(Ws=$i,e=ad(),$l(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,l=-1,u=-1,a=0,g=0,p=e,f=null;t:for(;;){for(var S;p!==n||i!==0&&p.nodeType!==3||(l=s+i),p!==o||r!==0&&p.nodeType!==3||(u=s+r),p.nodeType===3&&(s+=p.nodeValue.length),(S=p.firstChild)!==null;)f=p,p=S;for(;;){if(p===e)break t;if(f===n&&++a===i&&(l=s),f===o&&++g===r&&(u=s),(S=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=S}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bs={focusedElem:e,selectionRange:n},$i=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,C=m.memoizedState,d=t.stateNode,c=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Je(t.type,y),C);d.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(w){Z(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return m=Ca,Ca=!1,m}function yr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&sl(t,n,o)}i=i.next}while(i!==r)}}function mo(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ll(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function lf(e){var t=e.alternate;t!==null&&(e.alternate=null,lf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[jr],delete t[Ks],delete t[s0],delete t[l0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function uf(e){return e.tag===5||e.tag===3||e.tag===4}function Ea(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||uf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ul(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wi));else if(r!==4&&(e=e.child,e!==null))for(ul(e,t,n),e=e.sibling;e!==null;)ul(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}var ue=null,et=!1;function Tt(e,t,n){for(n=n.child;n!==null;)af(e,t,n),n=n.sibling}function af(e,t,n){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(lo,n)}catch{}switch(n.tag){case 5:ge||In(n,t);case 6:var r=ue,i=et;ue=null,Tt(e,t,n),ue=r,et=i,ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ue.removeChild(n.stateNode));break;case 18:ue!==null&&(et?(e=ue,n=n.stateNode,e.nodeType===8?es(e.parentNode,n):e.nodeType===1&&es(e,n),Dr(e)):es(ue,n.stateNode));break;case 4:r=ue,i=et,ue=n.stateNode.containerInfo,et=!0,Tt(e,t,n),ue=r,et=i;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&sl(n,t,s),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!ge&&(In(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Z(n,t,l)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,Tt(e,t,n),ge=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function ka(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new k0),t.forEach(function(r){var i=j0.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ze(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*O0(r/1960))-r,10e?16:e,bt===null)var r=!1;else{if(e=bt,bt=null,no=0,F&6)throw Error(_(331));var i=F;for(F|=4,P=e.current;P!==null;){var o=P,s=o.child;if(P.flags&16){var l=o.deletions;if(l!==null){for(var u=0;uJ()-su?on(e,0):ou|=n),Te(e,t)}function vf(e,t){t===0&&(e.mode&1?(t=oi,oi<<=1,!(oi&130023424)&&(oi=4194304)):t=1);var n=ye();e=Ct(e,t),e!==null&&(Br(e,t,n),Te(e,n))}function N0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function j0(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),vf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||xe.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,w0(e,t,n);_e=!!(e.flags&131072)}else _e=!1,Q&&t.flags&1048576&&wd(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Di(e,t),e=t.pendingProps;var i=$n(t,me.current);bn(t,n),i=Jl(null,t,r,e,i,n);var o=eu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Oe(r)?(o=!0,Vi(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ql(t),i.updater=po,t.stateNode=i,i._reactInternals=t,Js(t,r,e,n),t=nl(null,t,r,!0,o,n)):(t.tag=0,Q&&o&&Ul(t),ve(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Di(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=M0(r),e=Je(r,e),i){case 0:t=tl(null,t,r,e,n);break e;case 1:t=ya(null,t,r,e,n);break e;case 11:t=ma(null,t,r,e,n);break e;case 14:t=va(null,t,r,Je(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),tl(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ya(e,t,r,i,n);case 3:e:{if(ef(t),e===null)throw Error(_(387));r=t.pendingProps,o=t.memoizedState,i=o.element,_d(e,t),Yi(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Bn(Error(_(423)),t),t=Sa(e,t,r,n,i);break e}else if(r!==i){i=Bn(Error(_(424)),t),t=Sa(e,t,r,n,i);break e}else for(Ie=Ut(t.stateNode.containerInfo.firstChild),Ne=t,Q=!0,tt=null,n=Dd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Un(),r===i){t=Et(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Pd(t),e===null&&Ys(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Vs(r,i)?s=null:o!==null&&Vs(r,o)&&(t.flags|=32),Jd(e,t),ve(e,t,s,n),t.child;case 6:return e===null&&Ys(t),null;case 13:return tf(e,t,n);case 4:return Gl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),ma(e,t,r,i,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,W(qi,r._currentValue),r._currentValue=s,o!==null)if(it(o.value,s)){if(o.children===i.children&&!xe.current){t=Et(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){s=o.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=yt(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var g=a.pending;g===null?u.next=u:(u.next=g.next,g.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Xs(o.return,n,t),l.lanes|=n;break}u=u.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(_(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Xs(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}ve(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,bn(t,n),i=Qe(i),r=r(i),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,i=Je(r,t.pendingProps),i=Je(r.type,i),va(e,t,r,i,n);case 15:return Xd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Je(r,i),Di(e,t),t.tag=1,Oe(r)?(e=!0,Vi(t)):e=!1,bn(t,n),Od(t,r,i),Js(t,r,i,n),nl(null,t,r,!0,e,n);case 19:return nf(e,t,n);case 22:return Zd(e,t,n)}throw Error(_(156,t.tag))};function Sf(e,t){return Bc(e,t)}function R0(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new R0(e,t,n,r)}function cu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function M0(e){if(typeof e=="function")return cu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pl)return 11;if(e===Ll)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ii(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")cu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case En:return sn(n.children,i,o,t);case Dl:s=8,i|=8;break;case ks:return e=Be(12,n,t,i|2),e.elementType=ks,e.lanes=o,e;case _s:return e=Be(13,n,t,i),e.elementType=_s,e.lanes=o,e;case xs:return e=Be(19,n,t,i),e.elementType=xs,e.lanes=o,e;case Tc:return yo(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xc:s=10;break e;case Oc:s=9;break e;case Pl:s=11;break e;case Ll:s=14;break e;case Lt:s=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Be(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function sn(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function yo(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Tc,e.lanes=n,e.stateNode={isHidden:!1},e}function us(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function as(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function A0(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wo(0),this.expirationTimes=Wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wo(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function du(e,t,n,r,i,o,s,l,u){return e=new A0(e,t,n,l,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Be(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ql(o),e}function b0(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kf)}catch(e){console.error(e)}}kf(),wc.exports=Re;var H0=wc.exports,Ia=H0;Cs.createRoot=Ia.createRoot,Cs.hydrateRoot=Ia.hydrateRoot;/** - * @license - * Copyright (c) 2023, Jeff Hlywa (jhlywa@gmail.com) - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */const pe="w",$e="b",oe="p",pl="n",Ni="b",dr="r",Nt="q",ne="k",cs="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",Ee=-1,W0={NORMAL:"n",CAPTURE:"c",BIG_PAWN:"b",EP_CAPTURE:"e",PROMOTION:"p",KSIDE_CASTLE:"k",QSIDE_CASTLE:"q"},I={NORMAL:1,CAPTURE:2,BIG_PAWN:4,EP_CAPTURE:8,PROMOTION:16,KSIDE_CASTLE:32,QSIDE_CASTLE:64},R={a8:0,b8:1,c8:2,d8:3,e8:4,f8:5,g8:6,h8:7,a7:16,b7:17,c7:18,d7:19,e7:20,f7:21,g7:22,h7:23,a6:32,b6:33,c6:34,d6:35,e6:36,f6:37,g6:38,h6:39,a5:48,b5:49,c5:50,d5:51,e5:52,f5:53,g5:54,h5:55,a4:64,b4:65,c4:66,d4:67,e4:68,f4:69,g4:70,h4:71,a3:80,b3:81,c3:82,d3:83,e3:84,f3:85,g3:86,h3:87,a2:96,b2:97,c2:98,d2:99,e2:100,f2:101,g2:102,h2:103,a1:112,b1:113,c1:114,d1:115,e1:116,f1:117,g1:118,h1:119},ds={b:[16,32,17,15],w:[-16,-32,-17,-15]},Na={n:[-18,-33,-31,-14,18,33,31,14],b:[-17,-15,17,15],r:[-16,1,16,-1],q:[-17,-16,-15,1,17,16,15,-1],k:[-17,-16,-15,1,17,16,15,-1]},B0=[20,0,0,0,0,0,0,24,0,0,0,0,0,0,20,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,24,24,24,24,24,24,56,0,56,24,24,24,24,24,24,0,0,0,0,0,0,2,53,56,53,2,0,0,0,0,0,0,0,0,0,0,0,20,2,24,2,20,0,0,0,0,0,0,0,0,0,0,20,0,0,24,0,0,20,0,0,0,0,0,0,0,0,20,0,0,0,24,0,0,0,20,0,0,0,0,0,0,20,0,0,0,0,24,0,0,0,0,20,0,0,0,0,20,0,0,0,0,0,24,0,0,0,0,0,20,0,0,20,0,0,0,0,0,0,24,0,0,0,0,0,0,20],V0=[17,0,0,0,0,0,0,16,0,0,0,0,0,0,15,0,0,17,0,0,0,0,0,16,0,0,0,0,0,15,0,0,0,0,17,0,0,0,0,16,0,0,0,0,15,0,0,0,0,0,0,17,0,0,0,16,0,0,0,15,0,0,0,0,0,0,0,0,17,0,0,16,0,0,15,0,0,0,0,0,0,0,0,0,0,17,0,16,0,15,0,0,0,0,0,0,0,0,0,0,0,0,17,16,15,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,-15,-16,-17,0,0,0,0,0,0,0,0,0,0,0,0,-15,0,-16,0,-17,0,0,0,0,0,0,0,0,0,0,-15,0,0,-16,0,0,-17,0,0,0,0,0,0,0,0,-15,0,0,0,-16,0,0,0,-17,0,0,0,0,0,0,-15,0,0,0,0,-16,0,0,0,0,-17,0,0,0,0,-15,0,0,0,0,0,-16,0,0,0,0,0,-17,0,0,-15,0,0,0,0,0,0,-16,0,0,0,0,0,0,-17],Q0={p:1,n:2,b:4,r:8,q:16,k:32},K0="pnbrqkPNBRQK",ja=[pl,Ni,dr,Nt],q0=7,G0=6,Y0=1,X0=0,vi={[ne]:I.KSIDE_CASTLE,[Nt]:I.QSIDE_CASTLE},Dt={w:[{square:R.a1,flag:I.QSIDE_CASTLE},{square:R.h1,flag:I.KSIDE_CASTLE}],b:[{square:R.a8,flag:I.QSIDE_CASTLE},{square:R.h8,flag:I.KSIDE_CASTLE}]},Z0={b:Y0,w:G0},J0=["1-0","0-1","1/2-1/2","*"];function ln(e){return e>>4}function $r(e){return e&15}function _f(e){return"0123456789".indexOf(e)!==-1}function Pe(e){const t=$r(e),n=ln(e);return"abcdefgh".substring(t,t+1)+"87654321".substring(n,n+1)}function ir(e){return e===pe?$e:pe}function eg(e){const t=e.split(/\s+/);if(t.length!==6)return{ok:!1,error:"Invalid FEN: must contain six space-delimited fields"};const n=parseInt(t[5],10);if(isNaN(n)||n<=0)return{ok:!1,error:"Invalid FEN: move number must be a positive integer"};const r=parseInt(t[4],10);if(isNaN(r)||r<0)return{ok:!1,error:"Invalid FEN: half move counter number must be a non-negative integer"};if(!/^(-|[abcdefgh][36])$/.test(t[3]))return{ok:!1,error:"Invalid FEN: en-passant square is invalid"};if(/[^kKqQ-]/.test(t[2]))return{ok:!1,error:"Invalid FEN: castling availability is invalid"};if(!/^(w|b)$/.test(t[1]))return{ok:!1,error:"Invalid FEN: side-to-move is invalid"};const i=t[0].split("/");if(i.length!==8)return{ok:!1,error:"Invalid FEN: piece data does not contain 8 '/'-delimited rows"};for(let s=0;s1)return{ok:!1,error:`Invalid FEN: too many ${s} kings`}}return Array.from(i[0]+i[7]).some(s=>s.toUpperCase()==="P")?{ok:!1,error:"Invalid FEN: some pawns are on the edge rows"}:{ok:!0}}function tg(e,t){const n=e.from,r=e.to,i=e.piece;let o=0,s=0,l=0;for(let u=0,a=t.length;u0?s>0&&l>0?Pe(n):l>0?Pe(n).charAt(1):Pe(n).charAt(0):""}function Pt(e,t,n,r,i,o=void 0,s=I.NORMAL){const l=ln(r);if(i===oe&&(l===q0||l===X0))for(let u=0;u="a"&&t<="h"?e.match(/[a-h]\d.*[a-h]\d/)?void 0:oe:(t=t.toLowerCase(),t==="o"?ne:t)}function fs(e){return e.replace(/=/,"").replace(/[+#]?[?!]*$/,"")}function Ma(e){return e.split(" ").slice(0,4).join(" ")}class ng{constructor(t=cs){ze(this,"_board",new Array(128));ze(this,"_turn",pe);ze(this,"_header",{});ze(this,"_kings",{w:Ee,b:Ee});ze(this,"_epSquare",-1);ze(this,"_halfMoves",0);ze(this,"_moveNumber",0);ze(this,"_history",[]);ze(this,"_comments",{});ze(this,"_castling",{w:0,b:0});ze(this,"_positionCounts",{});this.load(t)}clear({preserveHeaders:t=!1}={}){this._board=new Array(128),this._kings={w:Ee,b:Ee},this._turn=pe,this._castling={w:0,b:0},this._epSquare=Ee,this._halfMoves=0,this._moveNumber=1,this._history=[],this._comments={},this._header=t?this._header:{},delete this._header.SetUp,delete this._header.FEN,this._positionCounts=new Proxy({},{get:(n,r)=>r==="length"?Object.keys(n).length:(n==null?void 0:n[Ma(r)])||0,set:(n,r,i)=>{const o=Ma(r);return i===0?delete n[o]:n[o]=i,!0}})}removeHeader(t){t in this._header&&delete this._header[t]}load(t,{skipValidation:n=!1,preserveHeaders:r=!1}={}){let i=t.split(/\s+/);if(i.length>=2&&i.length<6){const l=["-","-","0","1"];t=i.concat(l.slice(-(6-i.length))).join(" ")}if(i=t.split(/\s+/),!n){const{ok:l,error:u}=eg(t);if(!l)throw new Error(u)}const o=i[0];let s=0;this.clear({preserveHeaders:r});for(let l=0;l-1&&(this._castling.w|=I.KSIDE_CASTLE),i[2].indexOf("Q")>-1&&(this._castling.w|=I.QSIDE_CASTLE),i[2].indexOf("k")>-1&&(this._castling.b|=I.KSIDE_CASTLE),i[2].indexOf("q")>-1&&(this._castling.b|=I.QSIDE_CASTLE),this._epSquare=i[3]==="-"?Ee:R[i[3]],this._halfMoves=parseInt(i[4],10),this._moveNumber=parseInt(i[5],10),this._updateSetup(t),this._positionCounts[t]++}fen(){var o,s;let t=0,n="";for(let l=R.a8;l<=R.h1;l++){if(this._board[l]){t>0&&(n+=t,t=0);const{color:u,type:a}=this._board[l];n+=u===pe?a.toUpperCase():a.toLowerCase()}else t++;l+1&136&&(t>0&&(n+=t),l!==R.h1&&(n+="/"),t=0,l+=8)}let r="";this._castling[pe]&I.KSIDE_CASTLE&&(r+="K"),this._castling[pe]&I.QSIDE_CASTLE&&(r+="Q"),this._castling[$e]&I.KSIDE_CASTLE&&(r+="k"),this._castling[$e]&I.QSIDE_CASTLE&&(r+="q"),r=r||"-";let i="-";if(this._epSquare!==Ee){const l=this._epSquare+(this._turn===pe?16:-16),u=[l+1,l-1];for(const a of u){if(a&136)continue;const g=this._turn;if(((o=this._board[a])==null?void 0:o.color)===g&&((s=this._board[a])==null?void 0:s.type)===oe){this._makeMove({color:g,from:a,to:this._epSquare,piece:oe,captured:oe,flags:I.EP_CAPTURE});const p=!this._isKingAttacked(g);if(this._undoMove(),p){i=Pe(this._epSquare);break}}}}return[n,this._turn,r,i,this._halfMoves,this._moveNumber].join(" ")}_updateSetup(t){this._history.length>0||(t!==cs?(this._header.SetUp="1",this._header.FEN=t):(delete this._header.SetUp,delete this._header.FEN))}reset(){this.load(cs)}get(t){return this._board[R[t]]||!1}put({type:t,color:n},r){return this._put({type:t,color:n},r)?(this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),!0):!1}_put({type:t,color:n},r){if(K0.indexOf(t.toLowerCase())===-1||!(r in R))return!1;const i=R[r];if(t==ne&&!(this._kings[n]==Ee||this._kings[n]==i))return!1;const o=this._board[i];return o&&o.type===ne&&(this._kings[o.color]=Ee),this._board[i]={type:t,color:n},t===ne&&(this._kings[n]=i),!0}remove(t){const n=this.get(t);return delete this._board[R[t]],n&&n.type===ne&&(this._kings[n.color]=Ee),this._updateCastlingRights(),this._updateEnPassantSquare(),this._updateSetup(this.fen()),n}_updateCastlingRights(){var r,i,o,s,l,u,a,g,p,f,S,m;const t=((r=this._board[R.e1])==null?void 0:r.type)===ne&&((i=this._board[R.e1])==null?void 0:i.color)===pe,n=((o=this._board[R.e8])==null?void 0:o.type)===ne&&((s=this._board[R.e8])==null?void 0:s.color)===$e;(!t||((l=this._board[R.a1])==null?void 0:l.type)!==dr||((u=this._board[R.a1])==null?void 0:u.color)!==pe)&&(this._castling.w&=~I.QSIDE_CASTLE),(!t||((a=this._board[R.h1])==null?void 0:a.type)!==dr||((g=this._board[R.h1])==null?void 0:g.color)!==pe)&&(this._castling.w&=~I.KSIDE_CASTLE),(!n||((p=this._board[R.a8])==null?void 0:p.type)!==dr||((f=this._board[R.a8])==null?void 0:f.color)!==$e)&&(this._castling.b&=~I.QSIDE_CASTLE),(!n||((S=this._board[R.h8])==null?void 0:S.type)!==dr||((m=this._board[R.h8])==null?void 0:m.color)!==$e)&&(this._castling.b&=~I.KSIDE_CASTLE)}_updateEnPassantSquare(){var o,s;if(this._epSquare===Ee)return;const t=this._epSquare+(this._turn===pe?-16:16),n=this._epSquare+(this._turn===pe?16:-16),r=[n+1,n-1];if(this._board[t]!==null||this._board[this._epSquare]!==null||((o=this._board[n])==null?void 0:o.color)!==ir(this._turn)||((s=this._board[n])==null?void 0:s.type)!==oe){this._epSquare=Ee;return}const i=l=>{var u,a;return!(l&136)&&((u=this._board[l])==null?void 0:u.color)===this._turn&&((a=this._board[l])==null?void 0:a.type)===oe};r.some(i)||(this._epSquare=Ee)}_attacked(t,n){for(let r=R.a8;r<=R.h1;r++){if(r&136){r+=7;continue}if(this._board[r]===void 0||this._board[r].color!==t)continue;const i=this._board[r],o=r-n;if(o===0)continue;const s=o+119;if(B0[s]&Q0[i.type]){if(i.type===oe){if(o>0){if(i.color===pe)return!0}else if(i.color===$e)return!0;continue}if(i.type==="n"||i.type==="k")return!0;const l=V0[s];let u=r+l,a=!1;for(;u!==n;){if(this._board[u]!=null){a=!0;break}u+=l}if(!a)return!0}}return!1}_isKingAttacked(t){const n=this._kings[t];return n===-1?!1:this._attacked(ir(t),n)}isAttacked(t,n){return this._attacked(n,R[t])}isCheck(){return this._isKingAttacked(this._turn)}inCheck(){return this.isCheck()}isCheckmate(){return this.isCheck()&&this._moves().length===0}isStalemate(){return!this.isCheck()&&this._moves().length===0}isInsufficientMaterial(){const t={b:0,n:0,r:0,q:0,k:0,p:0},n=[];let r=0,i=0;for(let o=R.a8;o<=R.h1;o++){if(i=(i+1)%2,o&136){o+=7;continue}const s=this._board[o];s&&(t[s.type]=s.type in t?t[s.type]+1:1,s.type===Ni&&n.push(i),r++)}if(r===2)return!0;if(r===3&&(t[Ni]===1||t[pl]===1))return!0;if(r===t[Ni]+2){let o=0;const s=n.length;for(let l=0;l=3}isDraw(){return this._halfMoves>=100||this.isStalemate()||this.isInsufficientMaterial()||this.isThreefoldRepetition()}isGameOver(){return this.isCheckmate()||this.isStalemate()||this.isDraw()}moves({verbose:t=!1,square:n=void 0,piece:r=void 0}={}){const i=this._moves({square:n,piece:r});return t?i.map(o=>this._makePretty(o)):i.map(o=>this._moveToSan(o,i))}_moves({legal:t=!0,piece:n=void 0,square:r=void 0}={}){var S;const i=r?r.toLowerCase():void 0,o=n==null?void 0:n.toLowerCase(),s=[],l=this._turn,u=ir(l);let a=R.a8,g=R.h1,p=!1;if(i)if(i in R)a=g=R[i],p=!0;else return[];for(let m=a;m<=g;m++){if(m&136){m+=7;continue}if(!this._board[m]||this._board[m].color===u)continue;const{type:y}=this._board[m];let C;if(y===oe){if(o&&o!==y)continue;C=m+ds[l][0],this._board[C]||(Pt(s,l,m,C,oe),C=m+ds[l][1],Z0[l]===ln(m)&&!this._board[C]&&Pt(s,l,m,C,oe,void 0,I.BIG_PAWN));for(let d=2;d<4;d++)C=m+ds[l][d],!(C&136)&&(((S=this._board[C])==null?void 0:S.color)===u?Pt(s,l,m,C,oe,this._board[C].type,I.CAPTURE):C===this._epSquare&&Pt(s,l,m,C,oe,oe,I.EP_CAPTURE))}else{if(o&&o!==y)continue;for(let d=0,c=Na[y].length;d{const S=this._comments[this.fen()];if(typeof S<"u"){const m=f.length>0?" ":"";f=`${f}${m}{${S}}`}return f},s=[];for(;this._history.length>0;)s.push(this._undoMove());const l=[];let u="";for(s.length===0&&l.push(o(""));s.length>0;){u=o(u);const f=s.pop();if(!f)break;if(!this._history.length&&f.color==="b"){const S=`${this._moveNumber}. ...`;u=u?`${u} ${S}`:S}else f.color==="w"&&(u.length&&l.push(u),u=this._moveNumber+".");u=u+" "+this._moveToSan(f,this._moves({legal:!0})),this._makeMove(f)}if(u.length&&l.push(o(u)),typeof this._header.Result<"u"&&l.push(this._header.Result),n===0)return r.join("")+l.join(" ");const a=function(){return r.length>0&&r[r.length-1]===" "?(r.pop(),!0):!1},g=function(f,S){for(const m of S.split(" "))if(m){if(f+m.length>n){for(;a();)f--;r.push(t),f=0}r.push(m),f+=m.length,r.push(" "),f++}return a()&&f--,f};let p=0;for(let f=0;fn&&l[f].includes("{")){p=g(p,l[f]);continue}p+l[f].length>n&&f!==0?(r[r.length-1]===" "&&r.pop(),r.push(t),p=0):f!==0&&(r.push(" "),p++),r.push(l[f]),p+=l[f].length}return r.join("")}header(...t){for(let n=0;n0&&(w[O]=x)}return w}t=t.trim();const l=new RegExp("^(\\[((?:"+i(r)+")|.)*\\])((?:\\s*"+i(r)+"){2}|(?:\\s*"+i(r)+")*$)").exec(t),u=l&&l.length>=2?l[1]:"";this.reset();const a=o(u);let g="";for(const h in a)h.toLowerCase()==="fen"&&(g=a[h]),this.header(h,a[h]);if(!n)g&&this.load(g,{preserveHeaders:!0});else if(a.SetUp==="1"){if(!("FEN"in a))throw new Error("Invalid PGN: FEN tag must be supplied with SetUp tag");this.load(a.FEN,{preserveHeaders:!0})}function p(h){return Array.from(h).map(function(w){return w.charCodeAt(0)<128?w.charCodeAt(0).toString(16):encodeURIComponent(w).replace(/%/g,"").toLowerCase()}).join("")}function f(h){return h.length==0?"":decodeURIComponent("%"+(h.match(/.{1,2}/g)||[]).join("%"))}const S=function(h){return h=h.replace(new RegExp(i(r),"g")," "),`{${p(h.slice(1,h.length-1))}}`},m=function(h){if(h.startsWith("{")&&h.endsWith("}"))return f(h.slice(1,h.length-1))};let y=t.replace(u,"").replace(new RegExp(`({[^}]*})+?|;([^${i(r)}]*)`,"g"),function(h,w,k){return w!==void 0?S(w):" "+S(`{${k.slice(1)}}`)}).replace(new RegExp(i(r),"g")," ");const C=/(\([^()]+\))+?/g;for(;C.test(y);)y=y.replace(C,"");y=y.replace(/\d+\.(\.\.)?/g,""),y=y.replace(/\.\.\./g,""),y=y.replace(/\$\d+/g,"");let d=y.trim().split(new RegExp(/\s+/));d=d.filter(h=>h!=="");let c="";for(let h=0;h-1)c=d[h];else throw new Error(`Invalid move in PGN: ${d[h]}`);else c="",this._makeMove(k),this._positionCounts[this.fen()]++}c&&Object.keys(this._header).length&&!this._header.Result&&this.header("Result",c)}_moveToSan(t,n){let r="";if(t.flags&I.KSIDE_CASTLE)r="O-O";else if(t.flags&I.QSIDE_CASTLE)r="O-O-O";else{if(t.piece!==oe){const i=tg(t,n);r+=t.piece.toUpperCase()+i}t.flags&(I.CAPTURE|I.EP_CAPTURE)&&(t.piece===oe&&(r+=Pe(t.from)[0]),r+="x"),r+=Pe(t.to),t.promotion&&(r+="="+t.promotion.toUpperCase())}return this._makeMove(t),this.isCheck()&&(this.isCheckmate()?r+="#":r+="+"),this._undoMove(),r}_moveFromSan(t,n=!1){const r=fs(t);let i=Ra(r),o=this._moves({legal:!0,piece:i});for(let f=0,S=o.length;f0?r+=this.perft(t-1):r++),this._undoMove();return r}_makePretty(t){const{color:n,piece:r,from:i,to:o,flags:s,captured:l,promotion:u}=t;let a="";for(const S in I)I[S]&s&&(a+=W0[S]);const g=Pe(i),p=Pe(o),f={color:n,piece:r,from:g,to:p,san:this._moveToSan(t,this._moves({legal:!0})),flags:a,lan:g+p,before:this.fen(),after:""};return this._makeMove(t),f.after=this.fen(),this._undoMove(),l&&(f.captured=l),u&&(f.promotion=u,f.lan+=u),f}turn(){return this._turn}board(){const t=[];let n=[];for(let r=R.a8;r<=R.h1;r++)this._board[r]==null?n.push(null):n.push({square:Pe(r),type:this._board[r].type,color:this._board[r].color}),r+1&136&&(t.push(n),n=[],r+=8);return t}squareColor(t){if(t in R){const n=R[t];return(ln(n)+$r(n))%2===0?"light":"dark"}return null}history({verbose:t=!1}={}){const n=[],r=[];for(;this._history.length>0;)n.push(this._undoMove());for(;;){const i=n.pop();if(!i)break;t?r.push(this._makePretty(i)):r.push(this._moveToSan(i,this._moves())),this._makeMove(i)}return r}_pruneComments(){const t=[],n={},r=i=>{i in this._comments&&(n[i]=this._comments[i])};for(;this._history.length>0;)t.push(this._undoMove());for(r(this.fen());;){const i=t.pop();if(!i)break;this._makeMove(i),r(this.fen())}this._comments=n}getComment(){return this._comments[this.fen()]}setComment(t){this._comments[this.fen()]=t.replace("{","[").replace("}","]")}deleteComment(){const t=this._comments[this.fen()];return delete this._comments[this.fen()],t}getComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>({fen:t,comment:this._comments[t]}))}deleteComments(){return this._pruneComments(),Object.keys(this._comments).map(t=>{const n=this._comments[t];return delete this._comments[t],{fen:t,comment:n}})}setCastlingRights(t,n){for(const i of[ne,Nt])n[i]!==void 0&&(n[i]?this._castling[t]|=vi[i]:this._castling[t]&=~vi[i]);this._updateCastlingRights();const r=this.getCastlingRights(t);return(n[ne]===void 0||n[ne]===r[ne])&&(n[Nt]===void 0||n[Nt]===r[Nt])}getCastlingRights(t){return{[ne]:(this._castling[t]&vi[ne])!==0,[Nt]:(this._castling[t]&vi[Nt])!==0}}moveNumber(){return this._moveNumber}}function rg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fe(1));return n(Of)(e,t)}if(typeof e!="function")throw new Error(Fe(2));var i=e,o=t,s=[],l=s,u=!1;function a(){l===s&&(l=s.slice())}function g(){if(u)throw new Error(Fe(3));return o}function p(y){if(typeof y!="function")throw new Error(Fe(4));if(u)throw new Error(Fe(5));var C=!0;return a(),l.push(y),function(){if(C){if(u)throw new Error(Fe(6));C=!1,a();var c=l.indexOf(y);l.splice(c,1),s=null}}}function f(y){if(!ig(y))throw new Error(Fe(7));if(typeof y.type>"u")throw new Error(Fe(8));if(u)throw new Error(Fe(9));try{u=!0,o=i(o,y)}finally{u=!1}for(var C=s=l,d=0;dr&&r[i]?r[i]:n||null,e)}function lg(e,t){return e.filter(n=>n!==t)}function Tf(e){return typeof e=="object"}function ug(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function ag(e,t){return e.filter(n=>t.indexOf(n)>-1)}const gu="dnd-core/INIT_COORDS",ko="dnd-core/BEGIN_DRAG",mu="dnd-core/PUBLISH_DRAG_SOURCE",_o="dnd-core/HOVER",xo="dnd-core/DROP",Oo="dnd-core/END_DRAG";function za(e,t){return{type:gu,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const cg={type:gu,payload:{clientOffset:null,sourceClientOffset:null}};function dg(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,l=e.getMonitor(),u=e.getRegistry();e.dispatch(za(o)),fg(n,l,u);const a=gg(n,l);if(a==null){e.dispatch(cg);return}let g=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");hg(s),g=s(a)}e.dispatch(za(o,g));const f=u.getSource(a).beginDrag(l,a);if(f==null)return;pg(f),u.pinSource(a);const S=u.getSourceType(a);return{type:ko,payload:{itemType:S,item:f,sourceId:a,clientOffset:o||null,sourceClientOffset:g||null,isSourcePublic:!!i}}}}function fg(e,t,n){N(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){N(n.getSource(r),"Expected sourceIds to be registered.")})}function hg(e){N(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function pg(e){N(Tf(e),"Item must be an object.")}function gg(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function mg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vg(e){for(var t=1;t{const u=wg(s,l,i,r),a={type:xo,payload:{dropResult:vg({},n,u)}};e.dispatch(a)})}}function Sg(e){N(e.isDragging(),"Cannot call drop while not dragging."),N(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function wg(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return Cg(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function Cg(e){N(typeof e>"u"||Tf(e),"Drop result must either be an object or undefined.")}function Eg(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function kg(e){return function(){const n=e.getMonitor(),r=e.getRegistry();_g(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Oo}}}function _g(e){N(e.isDragging(),"Cannot call endDrag while not dragging.")}function gl(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function xg(e){return function(n,{clientOffset:r}={}){Og(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),l=o.getItemType();return Dg(i,s,l),Tg(i,o,s),Pg(i,o,s),{type:_o,payload:{targetIds:i,clientOffset:r||null}}}}function Og(e){N(Array.isArray(e),"Expected targetIds to be an array.")}function Tg(e,t,n){N(t.isDragging(),"Cannot call hover while not dragging."),N(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const i=e[r],o=t.getTargetType(i);gl(o,n)||e.splice(r,1)}}function Pg(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Lg(e){return function(){if(e.getMonitor().isDragging())return{type:mu}}}function Ig(e){return{beginDrag:dg(e),publishDragSource:Lg(e),hover:xg(e),drop:yg(e),endDrag:kg(e)}}class Ng{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const l=o.apply(t,s);typeof l<"u"&&n(l)}}const i=Ig(this);return Object.keys(i).reduce((o,s)=>{const l=i[s];return o[s]=r(l),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function jg(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Df(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rg(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:Df(jg(t,r),n)}function Mg(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:Df(t,n)}const Cr=[],vu=[];Cr.__IS_NONE__=!0;vu.__IS_ALL__=!0;function Ag(e,t){return e===Cr?!1:e===vu||typeof t>"u"?!0:ag(t,e).length>0}class bg{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;N(typeof t=="function","listener must be a function."),N(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),l=s.stateId;try{l===i||l===i+1&&!Ag(s.dirtyHandlerIds,r)||t()}finally{i=l}};return this.store.subscribe(o)}subscribeToOffsetChange(t){N(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return N(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(N(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return gl(r,i)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(N(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!gl(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const l=s.indexOf(t);return r?l===s.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Rg(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Mg(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const Fa=typeof global<"u"?global:self,Pf=Fa.MutationObserver||Fa.WebKitMutationObserver;function Lf(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function zg(e){let t=1;const n=new Pf(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Fg=typeof Pf=="function"?zg:Lf;class $g{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,i=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Fg(this.flush),this.requestErrorThrow=Lf(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ug{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class Hg{create(t){const n=this.freeTasks,r=n.length?n.pop():new Ug(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const If=new $g,Wg=new Hg(If.registerPendingError);function Bg(e){If.enqueueTask(Wg.create(e))}const yu="dnd-core/ADD_SOURCE",Su="dnd-core/ADD_TARGET",wu="dnd-core/REMOVE_SOURCE",To="dnd-core/REMOVE_TARGET";function Vg(e){return{type:yu,payload:{sourceId:e}}}function Qg(e){return{type:Su,payload:{targetId:e}}}function Kg(e){return{type:wu,payload:{sourceId:e}}}function qg(e){return{type:To,payload:{targetId:e}}}function Gg(e){N(typeof e.canDrag=="function","Expected canDrag to be a function."),N(typeof e.beginDrag=="function","Expected beginDrag to be a function."),N(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Yg(e){N(typeof e.canDrop=="function","Expected canDrop to be a function."),N(typeof e.hover=="function","Expected hover to be a function."),N(typeof e.drop=="function","Expected beginDrag to be a function.")}function ml(e,t){if(t&&Array.isArray(e)){e.forEach(n=>ml(n,!1));return}N(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var We;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(We||(We={}));let Xg=0;function Zg(){return Xg++}function Jg(e){const t=Zg().toString();switch(e){case We.SOURCE:return`S${t}`;case We.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function $a(e){switch(e[0]){case"S":return We.SOURCE;case"T":return We.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Ua(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class e1{addSource(t,n){ml(t),Gg(n);const r=this.addHandler(We.SOURCE,t,n);return this.store.dispatch(Vg(r)),r}addTarget(t,n){ml(t,!0),Yg(n);const r=this.addHandler(We.TARGET,t,n);return this.store.dispatch(Qg(r)),r}containsHandler(t){return Ua(this.dragSources,t)||Ua(this.dropTargets,t)}getSource(t,n=!1){return N(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return N(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return N(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return $a(t)===We.SOURCE}isTargetId(t){return $a(t)===We.TARGET}removeSource(t){N(this.getSource(t),"Expected an existing source."),this.store.dispatch(Kg(t)),Bg(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){N(this.getTarget(t),"Expected an existing target."),this.store.dispatch(qg(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);N(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){N(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=Jg(t);return this.types.set(i,n),t===We.SOURCE?this.dragSources.set(i,r):t===We.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const t1=(e,t)=>e===t;function n1(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function r1(e,t,n=t1){if(e.length!==t.length)return!1;for(let r=0;r0||!r1(n,r)))return Cr;const s=r[r.length-1],l=n[n.length-1];return s!==l&&(s&&i.push(s),l&&i.push(l)),i}function o1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s1(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function S1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let Wa=0;const ji=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var w1=E.memo(function(t){var{children:n}=t,r=y1(t,["children"]);const[i,o]=C1(r);return E.useEffect(()=>{if(o){const s=Nf();return++Wa,()=>{--Wa===0&&(s[ji]=null)}}},[]),v.jsx(xf.Provider,{value:i,children:n})});function C1(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=E1(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function E1(e,t=Nf(),n,r){const i=t;return i[ji]||(i[ji]={dragDropManager:m1(e,t,n,r)}),i[ji]}function Nf(){return typeof global<"u"?global:window}var k1=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const hn=typeof window<"u"?E.useLayoutEffect:E.useEffect;function jf(e,t,n){const[r,i]=E.useState(()=>t(e)),o=E.useCallback(()=>{const s=t(e);k1(r,s)||(i(s),n&&n())},[r,e,n]);return hn(o),[r,o]}function _1(e,t,n){const[r,i]=jf(e,t,n);return hn(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function Rf(e,t,n){return _1(t,e||(()=>({})),()=>n.reconnect())}function Mf(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),E.useMemo(()=>typeof e=="function"?e():e,n)}function x1(e){return E.useMemo(()=>e.hooks.dragSource(),[e])}function O1(e){return E.useMemo(()=>e.hooks.dragPreview(),[e])}let ps=!1,gs=!1;class T1{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){N(!ps,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ps=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{ps=!1}}isDragging(){if(!this.sourceId)return!1;N(!gs,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return gs=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{gs=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let ms=!1;class D1{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;N(!ms,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return ms=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{ms=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function P1(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function L1(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function vl(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let u=0;u, or turn it into a drag source or a drop target itself.`)}function N1(e){return(t=null,n=null)=>{if(!E.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return I1(r),j1(r,n?o=>e(o,n):e)}}function Af(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=N1(r);t[n]=()=>i}}),t}function Ba(e,t){typeof e=="function"?e(t):e.current=t}function j1(e,t){const n=e.ref;return N(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?E.cloneElement(e,{ref:r=>{Ba(n,r),Ba(t,r)}}):E.cloneElement(e,{ref:t})}class R1{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!vl(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!vl(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Af({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,yl(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,yl(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class M1{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!vl(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Af({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,yl(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function mn(){const{dragDropManager:e}=E.useContext(xf);return N(e!=null,"Expected drag drop context"),e}function A1(e,t){const n=mn(),r=E.useMemo(()=>new R1(n.getBackend()),[n]);return hn(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),hn(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function b1(){const e=mn();return E.useMemo(()=>new T1(e),[e])}class z1{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function F1(e,t,n){const r=E.useMemo(()=>new z1(e,t,n),[t,n]);return E.useEffect(()=>{r.spec=e},[e]),r}function $1(e){return E.useMemo(()=>{const t=e.type;return N(t!=null,"spec.type must be defined"),t},[e])}function U1(e,t,n){const r=mn(),i=F1(e,t,n),o=$1(e);hn(function(){if(o!=null){const[l,u]=L1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u}},[r,t,n,i,o])}function H1(e,t){const n=Mf(e,t);N(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=b1(),i=A1(n.options,n.previewOptions);return U1(n,r,i),[Rf(n.collect,r,i),x1(i),O1(i)]}function W1(e){const n=mn().getMonitor(),[r,i]=jf(n,e);return E.useEffect(()=>n.subscribeToOffsetChange(i)),E.useEffect(()=>n.subscribeToStateChange(i)),r}function B1(e){return E.useMemo(()=>e.hooks.dropTarget(),[e])}function V1(e){const t=mn(),n=E.useMemo(()=>new M1(t.getBackend()),[t]);return hn(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Q1(){const e=mn();return E.useMemo(()=>new D1(e),[e])}function K1(e){const{accept:t}=e;return E.useMemo(()=>(N(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class q1{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function G1(e,t){const n=E.useMemo(()=>new q1(e,t),[t]);return E.useEffect(()=>{n.spec=e},[e]),n}function Y1(e,t,n){const r=mn(),i=G1(e,t),o=K1(e);hn(function(){const[l,u]=P1(o,i,r);return t.receiveHandlerId(l),n.receiveHandlerId(l),u},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function X1(e,t){const n=Mf(e,t),r=Q1(),i=V1(n.options);return Y1(n,r,i),[Rf(n.collect,r,i),B1(i)]}function bf(e){let t=null;return()=>(t==null&&(t=e()),t)}function Z1(e,t){return e.filter(n=>n!==t)}function J1(e,t){const n=new Set,r=o=>n.add(o);e.forEach(r),t.forEach(r);const i=[];return n.forEach(o=>i.push(o)),i}class em{enter(t){const n=this.entered.length,r=i=>this.isNodeInDocument(i)&&(!i.contains||i.contains(t));return this.entered=J1(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=Z1(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class tm{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const i=this.config.exposeProperties[r];i!=null&&(n[r]={value:i(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const zf="__NATIVE_FILE__",Ff="__NATIVE_URL__",$f="__NATIVE_TEXT__",Uf="__NATIVE_HTML__";var Va=Object.freeze({__proto__:null,FILE:zf,HTML:Uf,TEXT:$f,URL:Ff});function vs(e,t,n){const r=t.reduce((i,o)=>i||e.getData(o),"");return r??n}const Sl={[zf]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Uf]:{exposeProperties:{html:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ff]:{exposeProperties:{urls:(e,t)=>vs(e,t,"").split(` -`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[$f]:{exposeProperties:{text:(e,t)=>vs(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function nm(e,t){const n=Sl[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new tm(n);return r.loadDataTransfer(t),r}function ys(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(Sl).filter(n=>{const r=Sl[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const rm=bf(()=>/firefox/i.test(navigator.userAgent)),Hf=bf(()=>!!window.safari);class Qa{interpolate(t){const{xs:n,ys:r,c1s:i,c2s:o,c3s:s}=this;let l=n.length-1;if(t===n[l])return r[l];let u=0,a=s.length-1,g;for(;u<=a;){g=Math.floor(.5*(u+a));const S=n[g];if(St)a=g-1;else return r[g]}l=Math.max(0,a);const p=t-n[l],f=p*p;return r[l]+i[l]*p+o[l]*f+s[l]*p*f}constructor(t,n){const{length:r}=t,i=[];for(let S=0;St[S]{let O=new Qa([0,.5,1],[u.y,u.y/g*m,u.y+m-g]).interpolate(f);return Hf()&&o&&(O+=(window.devicePixelRatio-1)*m),O},C=()=>new Qa([0,.5,1],[u.x,u.x/a*S,u.x+S-a]).interpolate(p),{offsetX:d,offsetY:c}=i,h=d===0||d,w=c===0||c;return{x:h?d:C(),y:w?c:y()}}let um=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}};function am(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ka(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const i=s=>this.handleDragStart(s,t),o=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",i),n.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",i),n.removeEventListener("selectstart",o),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),i=s=>this.handleDragOver(s,t),o=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",i),n.addEventListener("drop",o),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",i),n.removeEventListener("drop",o)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return Ka({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return Ka({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(Va).some(n=>Va[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=nm(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&Wf(o)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=i=>!!(i&&this.document&&this.document.body&&this.document.body.contains(i)),this.endDragIfSourceWasRemovedFromDOM=()=>{const i=this.currentDragSourceNode;i==null||this.isNodeInDocument(i)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=i=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(i||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=i=>{if(i.defaultPrevented)return;const{dragStartSourceIds:o}=this;this.dragStartSourceIds=null;const s=yi(i);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(o||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:l}=i,u=ys(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const g=this.monitor.getSourceId(),p=this.sourceNodes.get(g),f=this.sourcePreviewNodes.get(g)||p;if(f){const{anchorX:S,anchorY:m,offsetX:y,offsetY:C}=this.getCurrentSourcePreviewNodeOptions(),h=lm(p,f,s,{anchorX:S,anchorY:m},{offsetX:y,offsetY:C});l.setDragImage(f,h.x,h.y)}}try{l==null||l.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(i.target);const{captureDraggingState:a}=this.getCurrentSourcePreviewNodeOptions();a?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(u)this.beginDragNativeItem(u);else{if(l&&!l.types&&(i.target&&!i.target.hasAttribute||!i.target.hasAttribute("draggable")))return;i.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=i=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}if(!this.enterLeaveCounter.enter(i.target)||this.monitor.isDragging())return;const{dataTransfer:l}=i,u=ys(l);u&&this.beginDragNativeItem(u,l)},this.handleTopDragEnter=i=>{const{dragEnterTargetIds:o}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=i.altKey,o.length>0&&this.actions.hover(o,{clientOffset:yi(i)}),o.some(l=>this.monitor.canDropOnTarget(l))&&(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=i=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var o;(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}},this.handleTopDragOver=i=>{const{dragOverTargetIds:o}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none");return}this.altKeyPressed=i.altKey,this.lastClientOffset=yi(i),this.scheduleHover(o),(o||[]).some(l=>this.monitor.canDropOnTarget(l))?(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?i.preventDefault():(i.preventDefault(),i.dataTransfer&&(i.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=i=>{this.isDraggingNativeItem()&&i.preventDefault(),this.enterLeaveCounter.leave(i.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=i=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var o;i.preventDefault(),(o=this.currentNativeSource)===null||o===void 0||o.loadDataTransfer(i.dataTransfer)}else ys(i.dataTransfer)&&i.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=i=>{const{dropTargetIds:o}=this;this.dropTargetIds=[],this.actions.hover(o,{clientOffset:yi(i)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=i=>{const o=i.target;typeof o.dragDrop=="function"&&(o.tagName==="INPUT"||o.tagName==="SELECT"||o.tagName==="TEXTAREA"||o.isContentEditable||(i.preventDefault(),o.dragDrop()))},this.options=new um(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new em(this.isNodeInDocument)}}let Si;function dm(){return Si||(Si=new Image,Si.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),Si}const fm=function(t,n,r){return new cm(t,n,r)};var Qt;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Qt||(Qt={}));class hm{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function pm(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function gm(e,t,n,r,i){if(!i)return!1;const o=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let s=0;s=l.start)&&(l.end==null||o<=l.end))return!0}return!1}const mm={Left:1,Right:2,Center:4},vm={Left:0,Center:1,Right:2};function Ss(e){return e.button===void 0||e.button===vm.Left}function ym(e){return e.buttons===void 0||(e.buttons&mm.Left)===0}function Bf(e){return!!e.targetTouches}const Sm=1;function wm(e){const t=e.nodeType===Sm?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function Cm(e,t){if(e.targetTouches.length===1)return oo(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return oo(e.touches[0])}function oo(e,t){return Bf(e)?Cm(e,t):{x:e.clientX,y:e.clientY}}const qa=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),or={[Qt.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Qt.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Qt.keyboard]:{keydown:"keydown"}};class Er{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;t&&(N(!Er.isSetUp,"Cannot have two Touch backends at the same time."),Er.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;t&&(Er.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.addEventListener(l,r,o)})}removeEventListener(t,n,r,i=!1){const o=qa?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const l=or[s][n];l&&t.removeEventListener(l,r,o)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const i=o=>{if(!this.document||!r||!this.monitor.isDragging())return;let s;switch(o.type){case or.mouse.move:s={x:o.clientX,y:o.clientY};break;case or.touch.move:var l,u;s={x:((l=o.touches[0])===null||l===void 0?void 0:l.clientX)||0,y:((u=o.touches[0])===null||u===void 0?void 0:u.clientY)||0};break}const a=s!=null?this.document.elementFromPoint(s.x,s.y):void 0,g=a&&n.contains(a);if(a===n||g)return this.handleMove(o,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&wm(o)},this.handleTopMoveStartCapture=i=>{Ss(i)&&(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!Ss(i))return;const o=oo(i);o&&(Bf(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!Ss(i))return;const o=i.type===or.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:s}=this,l=this.options.enableHoverOutsideTarget,u=oo(i,this.lastTargetTouchFallback);if(!u)return;if(this._isScrolling||!this.monitor.isDragging()&&gm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&pm(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,u.x,u.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const a=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(a),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const g=(s||[]).map(m=>this.targetNodes.get(m)).filter(m=>!!m),p=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(u.x,u.y,g):this.document.elementsFromPoint(u.x,u.y),f=[];for(const m in p){if(!p.hasOwnProperty(m))continue;let y=p[m];for(y!=null&&f.push(y);y;)y=y.parentElement,y&&f.indexOf(y)===-1&&f.push(y)}const S=f.filter(m=>g.indexOf(m)>-1).map(m=>this._getDropTargetId(m)).filter(m=>!!m).filter((m,y,C)=>C.indexOf(m)===y);if(l)for(const m in this.targetNodes){const y=this.targetNodes.get(m);if(a&&y&&y.contains(a)&&S.indexOf(m)===-1){S.unshift(m);break}}S.reverse(),this.actions.hover(S,{clientOffset:u})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let s=o.next();for(;s.done===!1;){const l=s.value;if(i===this.targetNodes.get(l))return l;s=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!ym(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new hm(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Qt.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Qt.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Qt.keyboard)}}const Em=function(t,n={},r={}){return new Er(t,n,r)},Ur="abcdefgh".split(""),Ri={a8:"bR",b8:"bN",c8:"bB",d8:"bQ",e8:"bK",f8:"bB",g8:"bN",h8:"bR",a7:"bP",b7:"bP",c7:"bP",d7:"bP",e7:"bP",f7:"bP",g7:"bP",h7:"bP",a2:"wP",b2:"wP",c2:"wP",d2:"wP",e2:"wP",f2:"wP",g2:"wP",h2:"wP",a1:"wR",b1:"wN",c1:"wB",d1:"wQ",e1:"wK",f1:"wB",g1:"wN",h1:"wR"},km={a:0,b:1,c:2,d:3,e:4,f:5,g:6,h:7},_m={a:7,b:6,c:5,d:4,e:3,f:2,g:1,h:0},xm=[7,6,5,4,3,2,1,0],Om=[0,1,2,3,4,5,6,7],Ga={wP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),wR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#ffffff",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 34,14 L 31,17 L 14,17 L 11,14"}),v.jsx("path",{d:"M 31,17 L 31,29.5 L 14,29.5 L 14,17",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 31,29.5 L 32.5,32 L 12.5,32 L 14,29.5"}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#000000",stroke:"#000000"}})]}))})),wB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}})]}))})),wQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#ffffff",stroke:"#000000",strokeWidth:"1.5",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z"}),v.jsx("path",{d:"M 9,26 C 9,28 10.5,28 11.5,30 C 12.5,31.5 12.5,31 12,33.5 C 10.5,34.5 11,36 11,36 C 9.5,37.5 11,38.5 11,38.5 C 17.5,39.5 27.5,39.5 34,38.5 C 34,38.5 35.5,37.5 34,36 C 34,36 34.5,34.5 33,33.5 C 32.5,31 32.5,31.5 33.5,30 C 34.5,28 36,28 36,26 C 27.5,24.5 17.5,24.5 9,26 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30",style:{fill:"none"}}),v.jsx("path",{d:"M 12,33.5 C 18,32.5 27,32.5 33,33.5",style:{fill:"none"}}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"})]}))})),wK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#ffffff",stroke:"#000000",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#ffffff",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5",style:{fill:"none",stroke:"#000000"}}),v.jsx("path",{d:"M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#000000"}})]}))})),bP:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsx("path",{d:"m 22.5,9 c -2.21,0 -4,1.79 -4,4 0,0.89 0.29,1.71 0.78,2.38 C 17.33,16.5 16,18.59 16,21 c 0,2.03 0.94,3.84 2.41,5.03 C 15.41,27.09 11,31.58 11,39.5 H 34 C 34,31.58 29.59,27.09 26.59,26.03 28.06,24.84 29,23.03 29,21 29,18.59 27.67,16.5 25.72,15.38 26.21,14.71 26.5,13.89 26.5,13 c 0,-2.21 -1.79,-4 -4,-4 z",style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"nonzero",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"miter",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}})})),bR:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"#000000",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 9,39 L 36,39 L 36,36 L 9,36 L 9,39 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12.5,32 L 14,29.5 L 31,29.5 L 32.5,32 L 12.5,32 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,36 L 12,32 L 33,32 L 33,36 L 12,36 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 14,29.5 L 14,16.5 L 31,16.5 L 31,29.5 L 14,29.5 z ",style:{strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 11,14 L 34,14 L 31,16.5 L 14,16.5 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 11,14 L 11,9 L 15,9 L 15,11 L 20,11 L 20,9 L 25,9 L 25,11 L 30,11 L 30,9 L 34,9 L 34,14 L 11,14 z ",style:{strokeLinecap:"butt"}}),v.jsx("path",{d:"M 12,35.5 L 33,35.5 L 33,35.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 13,31.5 L 32,31.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,29.5 L 31,29.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 14,16.5 L 31,16.5",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 11,14 L 34,14",style:{fill:"none",stroke:"#ffffff",strokeWidth:"1",strokeLinejoin:"miter"}})]}))})),bN:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22,10 C 32.5,11 38.5,18 38,39 L 15,39 C 15,30 25,32.5 23,18",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 24,18 C 24.38,20.91 18.45,25.37 16,27 C 13,29 13.18,31.34 11,31 C 9.958,30.06 12.41,27.96 11,28 C 10,28 11.19,29.23 10,30 C 9,30 5.997,31 6,26 C 6,24 12,14 12,14 C 12,14 13.89,12.1 14,10.5 C 13.27,9.506 13.5,8.5 13.5,7.5 C 14.5,6.5 16.5,10 16.5,10 L 18.5,10 C 18.5,10 19.28,8.008 21,7 C 22,7 22,10 22,10",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 9.5 25.5 A 0.5 0.5 0 1 1 8.5,25.5 A 0.5 0.5 0 1 1 9.5 25.5 z",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 15 15.5 A 0.5 1.5 0 1 1 14,15.5 A 0.5 1.5 0 1 1 15 15.5 z",transform:"matrix(0.866,0.5,-0.5,0.866,9.693,-5.173)",style:{fill:"#ffffff",stroke:"#ffffff"}}),v.jsx("path",{d:"M 24.55,10.4 L 24.1,11.85 L 24.6,12 C 27.75,13 30.25,14.49 32.5,18.75 C 34.75,23.01 35.75,29.06 35.25,39 L 35.2,39.5 L 37.45,39.5 L 37.5,39 C 38,28.94 36.62,22.15 34.25,17.66 C 31.88,13.17 28.46,11.02 25.06,10.5 L 24.55,10.4 z ",style:{fill:"#ffffff",stroke:"none"}})]}))})),bB:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{opacity:"1",fill:"none",fillRule:"evenodd",fillOpacity:"1",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeLinecap:"butt"}},{children:[v.jsx("path",{d:"M 9,36 C 12.39,35.03 19.11,36.43 22.5,34 C 25.89,36.43 32.61,35.03 36,36 C 36,36 37.65,36.54 39,38 C 38.32,38.97 37.35,38.99 36,38.5 C 32.61,37.53 25.89,38.96 22.5,37.5 C 19.11,38.96 12.39,37.53 9,38.5 C 7.65,38.99 6.68,38.97 6,38 C 7.35,36.54 9,36 9,36 z"}),v.jsx("path",{d:"M 15,32 C 17.5,34.5 27.5,34.5 30,32 C 30.5,30.5 30,30 30,30 C 30,27.5 27.5,26 27.5,26 C 33,24.5 33.5,14.5 22.5,10.5 C 11.5,14.5 12,24.5 17.5,26 C 17.5,26 15,27.5 15,30 C 15,30 14.5,30.5 15,32 z"}),v.jsx("path",{d:"M 25 8 A 2.5 2.5 0 1 1 20,8 A 2.5 2.5 0 1 1 25 8 z"})]})),v.jsx("path",{d:"M 17.5,26 L 27.5,26 M 15,30 L 30,30 M 22.5,15.5 L 22.5,20.5 M 20,18 L 25,18",style:{fill:"none",stroke:"#ffffff",strokeLinejoin:"miter"}})]}))})),bQ:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"#000000",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}},{children:[v.jsx("path",{d:"M 9,26 C 17.5,24.5 30,24.5 36,26 L 38.5,13.5 L 31,25 L 30.7,10.9 L 25.5,24.5 L 22.5,10 L 19.5,24.5 L 14.3,10.9 L 14,25 L 6.5,13.5 L 9,26 z",style:{strokeLinecap:"butt",fill:"#000000"}}),v.jsx("path",{d:"m 9,26 c 0,2 1.5,2 2.5,4 1,1.5 1,1 0.5,3.5 -1.5,1 -1,2.5 -1,2.5 -1.5,1.5 0,2.5 0,2.5 6.5,1 16.5,1 23,0 0,0 1.5,-1 0,-2.5 0,0 0.5,-1.5 -1,-2.5 -0.5,-2.5 -0.5,-2 0.5,-3.5 1,-2 2.5,-2 2.5,-4 -8.5,-1.5 -18.5,-1.5 -27,0 z"}),v.jsx("path",{d:"M 11.5,30 C 15,29 30,29 33.5,30"}),v.jsx("path",{d:"m 12,33.5 c 6,-1 15,-1 21,0"}),v.jsx("circle",{cx:"6",cy:"12",r:"2"}),v.jsx("circle",{cx:"14",cy:"9",r:"2"}),v.jsx("circle",{cx:"22.5",cy:"8",r:"2"}),v.jsx("circle",{cx:"31",cy:"9",r:"2"}),v.jsx("circle",{cx:"39",cy:"12",r:"2"}),v.jsx("path",{d:"M 11,38.5 A 35,35 1 0 0 34,38.5",style:{fill:"none",stroke:"#000000",strokeLinecap:"butt"}}),v.jsxs("g",Object.assign({style:{fill:"none",stroke:"#ffffff"}},{children:[v.jsx("path",{d:"M 11,29 A 35,35 1 0 1 34,29"}),v.jsx("path",{d:"M 12.5,31.5 L 32.5,31.5"}),v.jsx("path",{d:"M 11.5,34.5 A 35,35 1 0 0 33.5,34.5"}),v.jsx("path",{d:"M 10.5,37.5 A 35,35 1 0 0 34.5,37.5"})]}))]}))})),bK:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"45",height:"45"},{children:v.jsxs("g",Object.assign({style:{fill:"none",fillOpacity:"1",fillRule:"evenodd",stroke:"#000000",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"4",strokeDasharray:"none",strokeOpacity:"1"}},{children:[v.jsx("path",{d:"M 22.5,11.63 L 22.5,6",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"},id:"path6570"}),v.jsx("path",{d:"M 22.5,25 C 22.5,25 27,17.5 25.5,14.5 C 25.5,14.5 24.5,12 22.5,12 C 20.5,12 19.5,14.5 19.5,14.5 C 18,17.5 22.5,25 22.5,25",style:{fill:"#000000",fillOpacity:"1",strokeLinecap:"butt",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 12.5,37 C 18,40.5 27,40.5 32.5,37 L 32.5,30 C 32.5,30 41.5,25.5 38.5,19.5 C 34.5,13 25,16 22.5,23.5 L 22.5,27 L 22.5,23.5 C 20,16 10.5,13 6.5,19.5 C 3.5,25.5 12.5,30 12.5,30 L 12.5,37",style:{fill:"#000000",stroke:"#000000"}}),v.jsx("path",{d:"M 20,8 L 25,8",style:{fill:"none",stroke:"#000000",strokeLinejoin:"miter"}}),v.jsx("path",{d:"M 32,29.5 C 32,29.5 40.5,25.5 38.03,19.85 C 34.15,14 25,18 22.5,24.5 L 22.5,26.6 L 22.5,24.5 C 20,18 10.85,14 6.97,19.85 C 4.5,25.5 13,29.5 13,29.5",style:{fill:"none",stroke:"#ffffff"}}),v.jsx("path",{d:"M 12.5,30 C 18,27 27,27 32.5,30 M 12.5,33.5 C 18,30.5 27,30.5 32.5,33.5 M 12.5,37 C 18,34 27,34 32.5,37",style:{fill:"none",stroke:"#ffffff"}})]}))}))};function wl(e,t,n){const r=t/8,i=e==="white"?km:_m,o=e==="white"?xm:Om,s=i[n[0]]*r+r/2,l=o[parseInt(n[1],10)-1]*r+r/2;return{x:s,y:l}}function Ya(e){let t=!1;return Object.keys(Ri).forEach(n=>{e[n]!==Ri[n]&&(t=!0)}),Object.keys(e).forEach(n=>{Ri[n]!==e[n]&&(t=!0)}),t}function Tm(e,t){const n={removed:{},added:{}};return Object.keys(e).forEach(r=>{t[r]!==e[r]&&(n.removed[r]=e[r])}),Object.keys(t).forEach(r=>{e[r]!==t[r]&&(n.added[r]=t[r])}),n}function Xa(e){return e==="start"?Ri:typeof e=="string"?Dm(e):e}function Dm(e){if(!Pm(e))return{};e=e.replace(/ .+$/,"");const t=e.split("/"),n={};let r=8;for(let i=0;i<8;i++){const o=t[i].split("");let s=0;for(let l=0;l{const[i,o]=E.useState([]),[s,l]=E.useState([]),[u,a]=E.useState();E.useEffect(()=>{Array.isArray(e)&&o(e==null?void 0:e.filter(m=>m[0]!==m[1]))},[e]),E.useEffect(()=>{n==null||n(s)},[s]);function g(){l([]),a(void 0)}const p=(m,y)=>{t&&a([m,y,r])},f=[...s,...i];return{arrows:f,newArrow:u,clearArrows:g,drawNewArrow:p,setArrows:l,onArrowDrawEnd:(m,y)=>{if(m===y||!t)return;let C;const d=[m,y,r];f.every(([h,w])=>!(h===m&&w===y))?C=[...s,d]:C=s.filter(([h,w])=>!(h===m&&w===y)),a(void 0),l(C)}}},Vf=E.createContext({}),_t=()=>E.useContext(Vf),jm=E.forwardRef(({allowDragOutsideBoard:e=!0,animationDuration:t=300,areArrowsAllowed:n=!0,arePiecesDraggable:r=!0,arePremovesAllowed:i=!1,autoPromoteToQueen:o=!1,boardOrientation:s="white",boardWidth:l,children:u,clearPremovesOnRightClick:a=!0,customArrows:g,customArrowColor:p="rgb(255,170,0)",customBoardStyle:f,customDarkSquareStyle:S={backgroundColor:"#B58863"},customDropSquareStyle:m={boxShadow:"inset 0 0 1px 6px rgba(255,255,255,0.75)"},customLightSquareStyle:y={backgroundColor:"#F0D9B5"},customPieces:C,customPremoveDarkSquareStyle:d={backgroundColor:"#A42323"},customPremoveLightSquareStyle:c={backgroundColor:"#BD2828"},customSquare:h="div",customSquareStyles:w,dropOffBoardAction:k="snapback",id:O=0,isDraggablePiece:x=()=>!0,getPositionObject:T=()=>{},onArrowsChange:z=()=>{},onDragOverSquare:M=()=>{},onMouseOutSquare:$=()=>{},onMouseOverSquare:K=()=>{},onPieceClick:Ae=()=>{},onPieceDragBegin:be=()=>{},onPieceDragEnd:qe=()=>{},onPieceDrop:Ce=()=>!0,onPromotionCheck:dt=(Zt,xt,qr)=>(qr==="wP"&&Zt[1]==="7"&&xt[1]==="8"||qr==="bP"&&Zt[1]==="2"&&xt[1]==="1")&&Math.abs(Zt.charCodeAt(0)-xt.charCodeAt(0))<=1,onPromotionPieceSelect:D,onSquareClick:L=()=>{},onSquareRightClick:j=()=>{},position:H="start",promotionDialogVariant:X="default",promotionToSquare:ot=null,showBoardNotation:A=!0,showPromotionDialog:ft=!1,snapToCursor:Ge=!0},vn)=>{const[Zt,xt]=E.useState(Xa(H)),[qr,Zf]=E.useState({removed:{},added:{}}),[Po,yn]=E.useState(void 0),[Jf,Lo]=E.useState(ft&&!o),[eh,Cu]=E.useState(null),[th,Io]=E.useState(ot),[Eu,No]=E.useState([]),Ot=E.useRef(Eu),[jo,Gr]=E.useState(),[nh,rh]=E.useState(Object.assign(Object.assign({},Ga),C)),[ih,Yr]=E.useState(!1),[Ro,oh]=E.useState(),[Xr,Zr]=E.useState(!1);E.useImperativeHandle(vn,()=>({clearPremoves(ee=!0){Jr(ee)}})),E.useEffect(()=>{rh(Object.assign(Object.assign({},Ga),C))},[C]),E.useEffect(()=>{Lo(ft),Io(ot)},[ot,ft]),E.useEffect(()=>{var ee,de,Ye;bo();const De=Xa(H),ht=Tm(Zt,De),Xe=((ee=Object.keys(ht.added))===null||ee===void 0?void 0:ee.length)<=2?(Ye=(de=Object.entries(ht.added))===null||de===void 0?void 0:de[0])===null||Ye===void 0?void 0:Ye[1][0]:void 0;if(Xr)xt(De),Zr(!1),i&&Ao(Xe),Ro&&clearTimeout(Ro);else if(ih)xt(De),Zr(!1),i&&Ao(Xe);else{Ya(De)&&Po!==void 0?yn(Xe):Ya(De)?yn(void 0):yn("b"),Zf(ht),Zr(!0);const gh=setTimeout(()=>{xt(De),Zr(!1),i&&Ao(Xe)},t);oh(gh)}return Yr(!1),T(De),Mo(),()=>{clearTimeout(Ro)}},[H]);const{arrows:sh,newArrow:lh,clearArrows:Mo,drawNewArrow:uh,onArrowDrawEnd:ah}=Nm(g,n,z,p);function ch(ee,de,Ye,De){if(ee===de)return;if(Mo(),i&&Xr||i&&(Po===Ye[0]||Ot.current.filter(Xe=>Xe.piece[0]===Ye[0]).length>0)){const Xe=[...Ot.current];Xe.push({sourceSq:ee,targetSq:de,piece:Ye}),Ot.current=Xe,No([...Xe]),bo();return}if(!i&&Xr)return;const ht=Object.assign({},Zt);Yr(!!De),yn(Ye[0]),Ce.length?Ce(ee,de,Ye)||(Jr(),Yr(!1)):(k==="trash"&&!de&&delete ht[ee],delete ht[ee],ht[de]=Ye,xt(ht)),bo(),T(ht)}function Ao(ee){if(Ot.current.length===0)return;const de=Ot.current[0];if(de.piece[0]!==void 0&&de.piece[0]!==ee&&Ce.length)if(yn(de.piece[0]),Yr(!0),Ce(de.sourceSq,de.targetSq,de.piece)){const De=[...Ot.current];De.shift(),Ot.current=De,No([...De])}else Jr()}function Jr(ee=!0){ee&&yn(void 0),Ot.current=[],No([])}function bo(){Cu(null),Io(null),Lo(!1)}function dh(ee){Gr(ee)}function fh(ee){if(jo){if(jo===ee){Gr(void 0),a&&Jr(!1),j(ee);return}}else Gr(void 0)}function hh(){Gr(void 0)}const ph={animationDuration:t,arePiecesDraggable:r,arePremovesAllowed:i,boardOrientation:s,boardWidth:l,customArrowColor:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:d,customPremoveLightSquareStyle:c,customSquare:h,customSquareStyles:w,id:O,isDraggablePiece:x,onDragOverSquare:M,onMouseOutSquare:$,onMouseOverSquare:K,onPieceClick:Ae,onPieceDragBegin:be,onPieceDragEnd:qe,onPieceDrop:Ce,onPromotionCheck:dt,onPromotionPieceSelect:D,onSquareClick:L,showBoardNotation:A,snapToCursor:Ge,promotionDialogVariant:X,allowDragOutsideBoard:e,arrows:sh,newArrow:lh,onArrowDrawEnd:ah,chessPieces:nh,clearArrows:Mo,drawNewArrow:uh,clearCurrentRightClickDown:hh,currentPosition:Zt,handleSetPosition:ch,isWaitingForAnimation:Xr,lastPieceColour:Po,onRightClickDown:dh,onRightClickUp:fh,positionDifferences:qr,promoteFromSquare:eh,promoteToSquare:th,premoves:Eu,setPromoteFromSquare:Cu,setPromoteToSquare:Io,setShowPromoteDialog:Lo,showPromoteDialog:Jf,autoPromoteToQueen:o,currentRightClickDown:jo};return v.jsx(Vf.Provider,Object.assign({value:ph},{children:u}))});function Rm({row:e,col:t}){const{boardOrientation:n,boardWidth:r,customDarkSquareStyle:i,customLightSquareStyle:o}=_t(),s=o.backgroundColor,l=i.backgroundColor,u=t===0,a=e===7,g=u&&a;function p(){return n==="white"?8-e:e+1}function f(){return n==="black"?Ur[7-t]:Ur[t]}function S(){return v.jsxs(v.Fragment,{children:[v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Ja(r))},{children:p()})),v.jsx("div",Object.assign({style:Object.assign(Object.assign({zIndex:3,position:"absolute"},{color:s}),Za(r))},{children:f()}))]})}function m(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},{color:t%2!==0?l:s}),Za(r))},{children:f()}))}function y(){return v.jsx("div",Object.assign({style:Object.assign(Object.assign({userSelect:"none",zIndex:3,position:"absolute"},n==="black"?{color:e%2===0?l:s}:{color:e%2===0?l:s}),Ja(r))},{children:p()}))}return g?S():a?m():u?y():null}const Za=e=>({alignSelf:"flex-end",paddingLeft:e/8-e/48,fontSize:e/48}),Ja=e=>({alignSelf:"flex-start",paddingRight:e/8-e/48,fontSize:e/48});function ec({isPremovedPiece:e=!1,piece:t,square:n,squares:r}){const{animationDuration:i,arePiecesDraggable:o,arePremovesAllowed:s,boardWidth:l,boardOrientation:u,chessPieces:a,currentPosition:g,id:p,isDraggablePiece:f,isWaitingForAnimation:S,onPieceClick:m,onPieceDragBegin:y,onPieceDragEnd:C,positionDifferences:d,premoves:c,onPromotionCheck:h}=_t(),[w,k]=E.useState({opacity:1,zIndex:5,touchAction:"none",cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}),[{canDrag:O,isDragging:x},T,z]=H1(()=>({type:"piece",item:()=>(y(t,n),{piece:t,square:n,id:p}),end:()=>C(t,n),collect:$=>({canDrag:f({piece:t,sourceSquare:n}),isDragging:!!$.isDragging()})}),[t,n,g,p]);z(dm(),{captureDraggingState:!0}),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{opacity:x?0:1}))},[x]),E.useEffect(()=>{if(!s)return;let $=!1;!e&&c.find(K=>K.targetSq===n)&&($=!0),c.find(K=>K.sourceSq===n&&K.piece===t)&&($=!0),k(K=>Object.assign(Object.assign({},K),{display:$?"none":"unset"}))},[g,c]),E.useEffect(()=>{var $;const K=($=d.removed)===null||$===void 0?void 0:$[n];if(!d.added||!K)return;const Ae=Object.entries(d.added).find(([be,qe])=>qe===K||h(n,be,K));if(S&&K&&Ae&&!e){const be=n,qe=Ae[0];if(be&&qe){const Ce=l/8;k(dt=>Object.assign(Object.assign({},dt),{transform:`translate(${(u==="black"?-1:1)*(qe.charCodeAt(0)-be.charCodeAt(0))*Ce}px, ${(u==="black"?-1:1)*(Number(be[1])-Number(qe[1]))*Ce}px)`,transition:`transform ${i}ms`,zIndex:6}))}}},[d]),E.useEffect(()=>{const{sourceSq:$}=M();$&&k(K=>Object.assign(Object.assign({},K),{transform:"translate(0px, 0px)",transition:"transform 0ms"}))},[g]),E.useEffect(()=>{k($=>Object.assign(Object.assign({},$),{cursor:o&&f({piece:t,sourceSquare:n})?"-webkit-grab":"default"}))},[n,g,o]);function M(){return{sourceSq:r[n]}}return v.jsx("div",Object.assign({ref:o&&O?T:null,onClick:()=>m(t),"data-piece":t,style:w},{children:typeof a[t]=="function"?a[t]({squareWidth:l/8,isDragging:x,square:n}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:l/8,height:l/8},{children:v.jsx("g",{children:a[t]})}))}))}function Mm({square:e,squareColor:t,setSquares:n,squareHasPremove:r,children:i}){const o=E.useRef(null),{autoPromoteToQueen:s,boardWidth:l,boardOrientation:u,clearArrows:a,currentPosition:g,currentRightClickDown:p,customBoardStyle:f,customDarkSquareStyle:S,customDropSquareStyle:m,customLightSquareStyle:y,customPremoveDarkSquareStyle:C,customPremoveLightSquareStyle:d,customSquare:c,customSquareStyles:h,drawNewArrow:w,handleSetPosition:k,isWaitingForAnimation:O,lastPieceColour:x,onArrowDrawEnd:T,onDragOverSquare:z,onMouseOutSquare:M,onMouseOverSquare:$,onPieceDrop:K,onPromotionCheck:Ae,onRightClickDown:be,onRightClickUp:qe,onSquareClick:Ce,setPromoteFromSquare:dt,setPromoteToSquare:D,setShowPromoteDialog:L}=_t(),[{isOver:j},H]=X1(()=>({accept:"piece",drop:X,collect:A=>({isOver:!!A.isOver()})}),[e,g,K,O,x]);function X(A){Ae(A.square,e,A.piece)?s?k(A.square,e,A.piece[0]==="w"?"wQ":"bQ"):(dt(A.square),D(e),L(!0)):k(A.square,e,A.piece,!0)}E.useEffect(()=>{if(o.current){const{x:A,y:ft}=o.current.getBoundingClientRect();n(Ge=>Object.assign(Object.assign({},Ge),{[e]:{x:A,y:ft}}))}},[l,u]);const ot=Object.assign(Object.assign(Object.assign(Object.assign({},Am(e,u,f)),t==="black"?S:y),r&&(t==="black"?C:d)),j&&m);return v.jsx("div",Object.assign({ref:H,style:ot,"data-square-color":t,"data-square":e,onMouseOver:A=>{A.buttons===2&&p&&w(p,e),!(A.relatedTarget&&A.currentTarget.contains(A.relatedTarget))&&$(e)},onMouseOut:A=>{A.relatedTarget&&A.currentTarget.contains(A.relatedTarget)||M(e)},onMouseDown:A=>{A.button===2&&be(e)},onMouseUp:A=>{A.button===2&&(p&&T(p,e),qe(e))},onDragEnter:()=>z(e),onClick:()=>{Ce(e),a()},onContextMenu:A=>{A.preventDefault()}},{children:typeof c=="string"?v.jsx(c,Object.assign({ref:o,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i})):v.jsx(c,Object.assign({ref:o,square:e,squareColor:t,style:Object.assign(Object.assign(Object.assign({},nc(l)),tc),!r&&(h==null?void 0:h[e]))},{children:i}))}))}const tc={display:"flex",justifyContent:"center"},nc=e=>({width:e/8,height:e/8}),Am=(e,t,n)=>n!=null&&n.borderRadius?e==="a1"?t==="white"?{borderBottomLeftRadius:n.borderRadius}:{borderTopRightRadius:n.borderRadius}:e==="a8"?t==="white"?{borderTopLeftRadius:n.borderRadius}:{borderBottomRightRadius:n.borderRadius}:e==="h1"?t==="white"?{borderBottomRightRadius:n.borderRadius}:{borderTopLeftRadius:n.borderRadius}:e==="h8"?t==="white"?{borderTopRightRadius:n.borderRadius}:{borderBottomLeftRadius:n.borderRadius}:{}:{};function bm(){const[e,t]=E.useState({}),{boardOrientation:n,boardWidth:r,currentPosition:i,id:o,premoves:s,showBoardNotation:l}=_t();return v.jsx("div",Object.assign({"data-boardid":o},{children:[...Array(8)].map((u,a)=>v.jsx("div",Object.assign({style:{display:"flex",flexWrap:"nowrap",width:r}},{children:[...Array(8)].map((g,p)=>{const f=n==="black"?Ur[7-p]+(a+1):Ur[p]+(8-a),S=p%2===a%2?"white":"black",m=s.find(C=>C.sourceSq===f||C.targetSq===f),y=s.find(C=>C.targetSq===f);return v.jsxs(Mm,Object.assign({square:f,squareColor:S,setSquares:t,squareHasPremove:!!m},{children:[i[f]&&v.jsx(ec,{piece:i[f],square:f,squares:e}),y&&v.jsx(ec,{isPremovedPiece:!0,piece:y.piece,square:f,squares:e}),l&&v.jsx(Rm,{row:a,col:p})]}),`${p}${a}`)})}),a.toString()))}))}const zm=()=>{const{arrows:e,newArrow:t,boardOrientation:n,boardWidth:r,customArrowColor:i}=_t(),o=[...e,t].filter(Boolean);return v.jsx("svg",Object.assign({width:r,height:r,style:{position:"absolute",top:"0",left:"0",pointerEvents:"none",zIndex:"10"}},{children:o.map((s,l)=>{const[u,a,g]=s;if(u===a)return null;const p=wl(n,r,u),f=wl(n,r,a);let S=r/32;const m=l===e.length;e.some(h=>h[0]!==u&&h[1]===a)&&!m&&(S=r/16);const y=f.x-p.x,C=f.y-p.y,d=Math.hypot(C,y),c={x:p.x+y*(d-S)/d,y:p.y+C*(d-S)/d};return v.jsxs(E.Fragment,{children:[v.jsx("marker",Object.assign({id:`arrowhead-${l}`,markerWidth:"2",markerHeight:"2.5",refX:"1.25",refY:"1.25",orient:"auto"},{children:v.jsx("polygon",{points:"0.3 0, 2 1.25, 0.3 2.5",fill:g??i})})),v.jsx("line",{x1:p.x,y1:p.y,x2:c.x,y2:c.y,opacity:m?"0.5":"0.65",stroke:g??i,strokeWidth:m?.9*r/40:r/40,markerEnd:`url(#arrowhead-${l})`})]},`${u}-${a}${m?"-active":""}`)})}))};function Fm({option:e}){const[t,n]=E.useState(!1),{boardWidth:r,chessPieces:i,customDarkSquareStyle:o,customLightSquareStyle:s,handleSetPosition:l,onPromotionPieceSelect:u,promoteFromSquare:a,promoteToSquare:g,promotionDialogVariant:p}=_t(),f=()=>{switch(e[1]){case"Q":return o.backgroundColor;case"R":return s.backgroundColor;case"N":return p==="default"?s.backgroundColor:o.backgroundColor;case"B":return p==="default"?o.backgroundColor:s.backgroundColor}};return v.jsx("div",Object.assign({onClick:()=>{u!=null&&u.length?u(e):l(a,g,e,!0)},onMouseOver:()=>n(!0),onMouseOut:()=>n(!1),"data-piece":e,style:{cursor:"pointer",backgroundColor:t?f():`${f()}aa`,borderRadius:"4px",transition:"all 0.1s ease-out"}},{children:typeof i[e]=="function"?v.jsx("div",Object.assign({style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:i[e]({squareWidth:r/8,isDragging:!1})})):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:r/8,height:r/8,style:{transition:"all 0.1s ease-out",transform:t?"scale(1)":"scale(0.85)"}},{children:v.jsx("g",{children:i[e]})}))}))}function $m(){const{boardOrientation:e,boardWidth:t,promotionDialogVariant:n,promoteToSquare:r}=_t(),i=(r==null?void 0:r[1])==="1"?"b":"w",o=[`${i??"w"}Q`,`${i??"w"}R`,`${i??"w"}N`,`${i??"w"}B`],s={default:{display:"grid",gridTemplateColumns:"1fr 1fr",transform:`translate(${-t/8}px, ${-t/8}px)`},vertical:{transform:`translate(${-t/16}px, ${-t/16}px)`},modal:{display:"flex",justifyContent:"center",alignItems:"center",transform:`translate(0px, ${3*t/8}px)`,width:"100%",height:`${t/4}px`,top:0,backgroundColor:"white",left:0}},l=wl(e,t,r||"a8");return v.jsx("div",Object.assign({style:Object.assign({position:"absolute",top:`${l==null?void 0:l.y}px`,left:`${l==null?void 0:l.x}px`,zIndex:1e3},s[n]),title:"Choose promotion piece"},{children:o.map(u=>v.jsx(Fm,{option:u},u))}))}const Um={whiteKing:v.jsx("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{shapeRendering:"geometricPrecision",textRendering:"geometricPrecision",imageRendering:"crisp-edges"},viewBox:"0 0 4210 12970",x:"0px",y:"0px",fillRule:"evenodd",clipRule:"evenodd",width:"250",height:"250"},{children:v.jsx("g",{children:v.jsx("path",{style:{fill:"black",fillRule:"nonzero"},d:"M2105 0c169,0 286,160 249,315l200 0c-172,266 -231,479 -256,792 315,-24 530,-86 792,-255l0 897c-265,-171 -479,-231 -792,-256 18,234 75,495 185,682l339 0c233,0 369,269 225,456l545 0 -595 1916c130,94 158,275 59,402 465,0 416,568 51,568l-334 0 465 2867 332 0c250,0 381,306 199,485 162,63 273,220 273,399l0 633 168 0 0 475c-1403,0 -2807,0 -4210,0l0 -475 167 0 0 -633c0,-179 112,-336 274,-399 -181,-178 -52,-485 199,-485l332 0 465 -2867 -335 0c-353,0 -418,-568 51,-568 -98,-127 -70,-308 59,-402l-594 -1916c181,0 363,0 545,0 -144,-187 -9,-456 225,-456l339 0c110,-187 167,-448 185,-682 -315,25 -530,87 -793,256l0 -897c266,171 480,231 793,255 -25,-315 -87,-529 -256,-792l199 0c-36,-155 81,-315 250,-315zm-1994 10012l0 253 3988 0 0 -253c-1330,0 -2659,0 -3988,0zm484 -1060c-174,0 -316,142 -316,316l0 633 3652 0 0 -633c0,-174 -142,-316 -316,-316 -1007,0 -2013,0 -3020,0zm45 -457c-230,0 -225,345 0,345l2930 0c230,0 225,-345 0,-345 -977,0 -1953,0 -2930,0zm2020 -2978l-1111 0 -465 2867 2041 0 -465 -2867zm-1558 -456c-229,0 -224,345 0,345 669,0 1337,0 2005,0 230,0 225,-345 0,-345 -668,0 -1336,0 -2005,0zm1730 -457l-1454 0c-229,0 -224,345 0,345l1454 0c229,0 224,-345 0,-345zm-2064 -1862l544 1751c529,0 1057,0 1586,0l544 -1751c-892,0 -1783,0 -2674,0zm1085 -567l504 0c-126,-247 -163,-526 -177,-800 273,15 553,52 800,177l0 -504c-247,126 -527,163 -800,177 14,-273 51,-552 177,-799 -168,0 -336,0 -504,0 125,247 162,526 177,799 -274,-14 -553,-51 -800,-177l0 504c247,-125 527,-162 800,-177 -15,274 -52,553 -177,800zm969 111l-1434 0c-230,0 -225,345 0,345l1434 0c230,0 225,-345 0,-345zm-717 -2175c-105,0 -175,109 -133,204l266 0c42,-96 -30,-205 -133,-204z"})})}))};function Hm({children:e}){try{return v.jsx(v.Fragment,{children:e})}catch(t){return console.log(t),v.jsx(Qf,{showError:!0})}}function Qf({showError:e=!1}){return v.jsxs("div",Object.assign({style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}},{children:[v.jsx("div",Object.assign({style:{width:250,height:250,transform:"rotate(90deg)"}},{children:Um.whiteKing})),e&&v.jsx("h1",{children:"Something went wrong"})]}))}function Wm(){const e=E.useRef(null),{boardWidth:t,clearCurrentRightClickDown:n,onPromotionPieceSelect:r,setShowPromoteDialog:i,showPromoteDialog:o,customBoardStyle:s}=_t();return E.useEffect(()=>{function l(u){e.current&&!e.current.contains(u.target)&&n()}return document.addEventListener("mouseup",l),()=>{document.removeEventListener("mouseup",l)}},[]),t?v.jsx("div",Object.assign({style:{perspective:"1000px"}},{children:v.jsxs("div",Object.assign({ref:e,style:Object.assign(Object.assign({position:"relative"},Bm(t)),s)},{children:[v.jsx(bm,{}),v.jsx(zm,{}),o&&v.jsxs(v.Fragment,{children:[v.jsx("div",{onClick:()=>{i(!1),r==null||r()},style:{position:"absolute",top:"0",left:"0",zIndex:"100",backgroundColor:"rgba(22,21,18,.7)",width:t,height:t}}),v.jsx($m,{})]})]}))})):v.jsx(Qf,{})}const Bm=e=>({cursor:"default",height:e,width:e});function Vm({boardContainer:e}){const{boardWidth:t,chessPieces:n,id:r,snapToCursor:i,allowDragOutsideBoard:o}=_t(),s=W1(f=>({item:f.getItem(),clientOffset:f.getClientOffset(),sourceClientOffset:f.getSourceClientOffset(),isDragging:f.isDragging()})),{isDragging:l,item:u,clientOffset:a,sourceClientOffset:g}=s,p=E.useCallback((f,S)=>{if(!f||!S)return{display:"none"};let{x:m,y}=i?f:S;const C=t/8/2;if(i&&(m-=C,y-=C),!o){const{left:c,top:h}=e,w=c-C,k=h-C,O=c+t-C,x=h+t-C;m=Math.max(w,Math.min(m,O)),y=Math.max(k,Math.min(y,x))}const d=`translate(${m}px, ${y}px)`;return{transform:d,WebkitTransform:d,touchAction:"none"}},[t,o,i,e]);return l&&u.id===r?v.jsx("div",Object.assign({style:{position:"fixed",pointerEvents:"none",zIndex:10,left:0,top:0}},{children:v.jsx("div",Object.assign({style:p(a,g)},{children:typeof n[u.piece]=="function"?n[u.piece]({squareWidth:t/8,isDragging:!0}):v.jsx("svg",Object.assign({viewBox:"1 1 43 43",width:t/8,height:t/8},{children:v.jsx("g",{children:n[u.piece]})}))}))})):null}const Qm=E.forwardRef((e,t)=>{const{customDndBackend:n,customDndBackendOptions:r}=e,i=rg(e,["customDndBackend","customDndBackendOptions"]),[o,s]=E.useState(),[l,u]=E.useState(!1),[a,g]=E.useState(!1),[p,f]=E.useState(e.boardWidth),S=E.useRef(null),m=E.useRef(null),[y,C]=E.useState({left:0,top:0}),d=E.useMemo(()=>{var h;return(h=S.current)===null||h===void 0?void 0:h.getBoundingClientRect()},[S.current]);E.useEffect(()=>{C({left:d!=null&&d.left?d==null?void 0:d.left:0,top:d!=null&&d.top?d==null?void 0:d.top:0})},[d]),E.useEffect(()=>{g("ontouchstart"in window),u(!0),s(window)},[]),E.useEffect(()=>{var h;if(e.boardWidth===void 0&&(!((h=S.current)===null||h===void 0)&&h.offsetWidth)){const w=new ResizeObserver(()=>{var k;f((k=S.current)===null||k===void 0?void 0:k.offsetWidth)});return w.observe(S.current),()=>{w.disconnect()}}},[S.current,o]);const c=n||(a?Em:fm);return l&&o?v.jsx(Hm,{children:v.jsxs("div",Object.assign({ref:m,style:{display:"flex",flexDirection:"column",width:"100%"}},{children:[v.jsx("div",{ref:S,style:{width:"100%"}}),v.jsx(w1,Object.assign({backend:c,context:o,options:n?r:void 0},{children:p&&v.jsxs(jm,Object.assign({boardWidth:p},i,{ref:t},{children:[v.jsx(Vm,{boardContainer:y}),v.jsx(Wm,{})]}))}))]}))}):null});var rc=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function l(g){try{a(r.next(g))}catch(p){s(p)}}function u(g){try{a(r.throw(g))}catch(p){s(p)}}function a(g){g.done?o(g.value):i(g.value).then(l,u)}a((r=r.apply(e,t||[])).next())})};const Km=e=>{const[t,n,r]=e.split(":");return{process_name:t,package_name:n,publisher_node:r}};function sr(e){const t=document.cookie.split(";");for(let n=0;nnull,onOpen:s=()=>null,onClose:l=()=>null,onError:u=()=>null}){this._encrypt=a=>null,this._decrypt=a=>{},this.send=({data:a})=>{sr(`kinode-auth_${this.nodeId}`),sr(`kinode-ws-auth_${this.nodeId}`),this._ws.send(ic(a))},this.fetchJson=(a,g)=>rc(this,void 0,void 0,function*(){return console.log("Fetching JSON:",a),yield(yield fetch(a,g)).json()}),this._secret=void 0,this.processId=Km(n),this.channelId=r,this.nodeId=t,this._ws=new WebSocket(i),this._ws.onmessage=a=>rc(this,void 0,void 0,function*(){o(a.data,this)}),this._ws.onopen=a=>{console.log(`${t}`,sr(`kinode-auth_${t}`),sr(`kinode-ws-auth_${t}`)),this._ws.send(ic({auth_token:sr(`kinode-auth_${t}`),target_process:n,encrypted:!1})),s(a,this)},this._ws.onclose=l,this._ws.onerror=u}}const oc=e=>{let t;const n=new Set,r=(u,a)=>{const g=typeof u=="function"?u(t):u;if(!Object.is(g,t)){const p=t;t=a??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(f=>f(t,p))}},i=()=>t,l={setState:r,getState:i,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{n.clear()}};return t=e(r,i,l),l},Gm=e=>e?oc(e):oc;var Kf={exports:{}},qf={},Gf={exports:{}},Yf={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Qn=E;function Ym(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xm=typeof Object.is=="function"?Object.is:Ym,Zm=Qn.useState,Jm=Qn.useEffect,ev=Qn.useLayoutEffect,tv=Qn.useDebugValue;function nv(e,t){var n=t(),r=Zm({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return ev(function(){i.value=n,i.getSnapshot=t,ws(i)&&o({inst:i})},[e,n,t]),Jm(function(){return ws(i)&&o({inst:i}),e(function(){ws(i)&&o({inst:i})})},[e]),tv(n),n}function ws(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xm(e,n)}catch{return!0}}function rv(e,t){return t()}var iv=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rv:nv;Yf.useSyncExternalStore=Qn.useSyncExternalStore!==void 0?Qn.useSyncExternalStore:iv;Gf.exports=Yf;var ov=Gf.exports;/** - * @license React - * use-sync-external-store-shim/with-selector.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Do=E,sv=ov;function lv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var uv=typeof Object.is=="function"?Object.is:lv,av=sv.useSyncExternalStore,cv=Do.useRef,dv=Do.useEffect,fv=Do.useMemo,hv=Do.useDebugValue;qf.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=cv(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=fv(function(){function u(S){if(!a){if(a=!0,g=S,S=r(S),i!==void 0&&s.hasValue){var m=s.value;if(i(m,S))return p=m}return p=S}if(m=p,uv(g,S))return m;var y=r(S);return i!==void 0&&i(m,y)?m:(g=S,p=y)}var a=!1,g,p,f=n===void 0?null:n;return[function(){return u(t())},f===null?void 0:function(){return u(f())}]},[t,n,r,i]);var l=av(e,o[0],o[1]);return dv(function(){s.hasValue=!0,s.value=l},[l]),hv(l),l};Kf.exports=qf;var pv=Kf.exports;const gv=uc(pv),{useDebugValue:mv}=yc,{useSyncExternalStoreWithSelector:vv}=gv;function yv(e,t=e.getState,n){const r=vv(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return mv(r),r}const sc=e=>{const t=typeof e=="function"?Gm(e):e,n=(r,i)=>yv(t,r,i);return Object.assign(n,t),n},Sv=e=>e?sc(e):sc;function Xf(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const s=u=>u===null?null:JSON.parse(u,t==null?void 0:t.reviver),l=(o=n.getItem(i))!=null?o:null;return l instanceof Promise?l.then(s):s(l)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const Hr=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Hr(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hr(r)(n)}}}},wv=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:C=>C,version:0,merge:(C,d)=>({...d,...C}),...t},s=!1;const l=new Set,u=new Set;let a;try{a=o.getStorage()}catch{}if(!a)return e((...C)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...C)},r,i);const g=Hr(o.serialize),p=()=>{const C=o.partialize({...r()});let d;const c=g({state:C,version:o.version}).then(h=>a.setItem(o.name,h)).catch(h=>{d=h});if(d)throw d;return c},f=i.setState;i.setState=(C,d)=>{f(C,d),p()};const S=e((...C)=>{n(...C),p()},r,i);let m;const y=()=>{var C;if(!a)return;s=!1,l.forEach(c=>c(r()));const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,r()))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)return o.deserialize(c)}).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return m=o.merge(c,(h=r())!=null?h:S),n(m,!0),p()}).then(()=>{d==null||d(m,void 0),s=!0,u.forEach(c=>c(m))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:C=>{o={...o,...C},C.getStorage&&(a=C.getStorage())},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:C=>(l.add(C),()=>{l.delete(C)}),onFinishHydration:C=>(u.add(C),()=>{u.delete(C)})},y(),m||S},Cv=(e,t)=>(n,r,i)=>{let o={storage:Xf(()=>localStorage),partialize:y=>y,version:0,merge:(y,C)=>({...C,...y}),...t},s=!1;const l=new Set,u=new Set;let a=o.storage;if(!a)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...y)},r,i);const g=()=>{const y=o.partialize({...r()});return a.setItem(o.name,{state:y,version:o.version})},p=i.setState;i.setState=(y,C)=>{p(y,C),g()};const f=e((...y)=>{n(...y),g()},r,i);let S;const m=()=>{var y,C;if(!a)return;s=!1,l.forEach(c=>{var h;return c((h=r())!=null?h:f)});const d=((C=o.onRehydrateStorage)==null?void 0:C.call(o,(y=r())!=null?y:f))||void 0;return Hr(a.getItem.bind(a))(o.name).then(c=>{if(c)if(typeof c.version=="number"&&c.version!==o.version){if(o.migrate)return o.migrate(c.state,c.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return c.state}).then(c=>{var h;return S=o.merge(c,(h=r())!=null?h:f),n(S,!0),g()}).then(()=>{d==null||d(S,void 0),S=r(),s=!0,u.forEach(c=>c(S))}).catch(c=>{d==null||d(void 0,c)})};return i.persist={setOptions:y=>{o={...o,...y},y.storage&&(a=y.storage)},clearStorage:()=>{a==null||a.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:y=>(l.add(y),()=>{l.delete(y)}),onFinishHydration:y=>(u.add(y),()=>{u.delete(y)})},o.skipHydration||m(),S||f},Ev=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?wv(e,t):Cv(e,t),kv=Ev,_v=Sv()(kv((e,t)=>({games:{},handleWsMessage:n=>{if(typeof n=="string")try{const{kind:r,data:i}=JSON.parse(n);r==="game_update"&&e({games:{...t().games,[i.id]:i}})}catch(r){console.error("Error parsing WebSocket message",r)}else{const r=new FileReader;r.onload=function(i){var o;if(typeof((o=i==null?void 0:i.target)==null?void 0:o.result)=="string")try{const{kind:s,data:l}=JSON.parse(i.target.result);s==="game_update"&&e({games:{...t().games,[l.id]:l}})}catch(s){console.error("Error parsing WebSocket message",s)}},r.readAsText(n)}},set:e}),{name:"chess",storage:Xf(()=>localStorage)}));const Mt="/chess:chess:sys";window.our&&(window.our.process=Mt==null?void 0:Mt.replace("/",""));const lc=(e,t)=>(e.turns||0)%2===0?t===e.white:t===e.black,xv=void 0;function Ov(){const{games:e,handleWsMessage:t,set:n}=_v(),[r,i]=E.useState("new"),[o,s]=E.useState(""),l=E.useRef(null),[u,a]=E.useState(560-20),g=new ResizeObserver(d=>{for(let c of d)a(Math.min(c.contentRect.width,c.contentRect.height)-16)});l.current&&g.observe(l.current);const p=E.useMemo(()=>e[r]?{...e[r],game:new ng(e[r].board)}:void 0,[e,r]),f=E.useMemo(()=>((p==null?void 0:p.turns)||0)%2===0?`${p==null?void 0:p.white} (white)`:`${p==null?void 0:p.black} (black)`,[p]);E.useEffect(()=>{new qm({uri:xv,nodeId:window.our.node,processId:window.our.process,onMessage:t}),fetch(`${Mt}/games`).then(d=>d.json()).then(d=>{n({games:d})}).catch(console.error)},[]);const S=E.useCallback(async d=>{d.preventDefault();try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:o})}).then(w=>{if(w.status===409)throw e[o]?i(o):alert("Game already exists, please refresh the page and select it."),new Error("Game already exists");if(w.status===503)throw alert(`${o} may be offline, please confirm it is online and try again.`),new Error("Player offline");if(w.status===400)throw alert("Please enter a valid player ID"),new Error("Invalid player ID");if(w.status>399)throw alert("There was an error creating the game. Please try again."),new Error("Error creating game");return w.json()}),h={...e};h[c.id]=c,n({games:h}),i(o),s("")}catch(c){console.error(c)}},[e,o,s,n]),m=E.useCallback((d,c)=>{if(!p||!lc(p,window.our.node))return!1;const h={from:d,to:c,promotion:"q"},w={...p};if(w.game.move(h)===null)return!1;w.board=w.game.fen();const O={...e};return O[p.id]=w,n({games:O}),fetch(`${Mt}/games`,{method:"PUT",body:JSON.stringify({id:p.id,move:d+c})}).then(x=>x.json()).then(x=>{const T={...e};T[p.id]=x,n({games:T})}).catch(x=>{console.error(x),alert("There was an error making your move. Please try again");const T={...e},z={...p};z.game.undo(),T[p.id]=z,n({games:T})}),!0},[p,e,n]),y=E.useCallback(d=>{d.preventDefault(),d.stopPropagation(),p&&window.confirm("Are you sure you want to resign this game?")&&fetch(`${Mt}/games?id=${p.id}`,{method:"DELETE"}).then(c=>c.json()).then(c=>{const h={...e};h[p.id]=c,n({games:h})}).catch(c=>{console.error(c),alert("There was an error resigning the game. Please try again")})},[p]),C=E.useCallback(async d=>{if(d.preventDefault(),d.stopPropagation(),!!p)try{const c=await fetch(`${Mt}/games`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:p.id})}).then(w=>w.json()),h={...e};h[c.id]=c,n({games:h})}catch(c){console.error(c),alert("You could not create the game. Please make sure your current game with this player (if any) has ended and try again.")}},[p]);return v.jsx("div",{className:"flex flex-col justify-center items-center",style:{height:"100%"},children:v.jsxs("div",{className:"flex flex-col justify-center",style:{maxHeight:"100vh",maxWidth:"800px",height:"100%",width:"100%",position:"relative"},children:[v.jsxs("a",{href:"/",className:"absolute top-6 left-0 ml-2",style:{fontSize:24},onClick:d=>{d.preventDefault(),window.history.back()},children:[v.jsx("span",{style:{fontSize:18,marginBottom:4},children:"◀"})," Back"]}),v.jsxs("h4",{className:"m-4 row justify-center",children:["Chess by",v.jsxs("svg",{width:"180",height:"20",viewBox:"0 0 580 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[v.jsxs("g",{"clip-path":"url(#clip0_6_641)",children:[v.jsx("path",{d:"M0.824922 1.07031L0.794922 70.0703H14.7949L14.8049 1.07031H0.824922Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M16.5947 36.8803L41.2547 1.07031H58.2447L33.1647 36.8803L61.2447 70.0703H42.9947L16.5947 36.8803Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M119.885 1.07031H105.765V70.0703H119.885V1.07031Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M173.185 1.07031V70.0703H186.775V26.8303L224.045 70.0703H234.825V1.07031H221.325V45.6803L183.445 1.07031H173.185Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M342.465 8.86C333.025 0.15 321.645 0 318.535 0C315.475 0 303.575 0.22 294.005 9.52C283.845 19.4 283.805 32.24 283.795 35.66C283.785 39.3 283.895 49.03 290.805 57.99C300.855 71.02 316.695 71.31 318.535 71.32C321.375 71.32 334.185 71 343.965 60.66C353.065 51.04 353.265 39.4 353.275 35.66C353.275 32.49 353.305 18.86 342.455 8.86H342.465ZM318.435 58.01C307.095 58.01 297.895 47.95 297.895 35.54C297.895 23.13 307.085 13.07 318.435 13.07C329.785 13.07 338.975 23.13 338.975 35.54C338.975 47.95 329.785 58.01 318.435 58.01Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M450.495 12.0802C444.975 5.46023 437.135 0.990234 427.955 0.990234C417.555 0.990234 405.295 1.07023 402.295 1.07023V69.9802C405.285 69.9802 417.555 70.0602 427.955 70.0602C445.525 70.0602 458.445 53.4102 459.065 36.8602C459.395 28.0102 456.185 18.9002 450.495 12.0802ZM440.085 49.9502C436.895 53.8702 432.705 56.6902 427.665 57.5602C424.025 58.1902 420.095 57.8302 416.405 57.8302C416.405 50.4002 416.405 42.9802 416.405 35.5502V13.2202C423.795 13.2202 430.525 12.7002 436.605 17.6002C440.275 20.5602 442.925 24.7102 444.165 29.2402C444.525 30.5402 444.765 31.8802 444.875 33.2302C445.395 39.3702 443.995 45.1402 440.085 49.9502Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M508.135 0.990234V70.0602H552.715V57.9302H522.035V40.4202H547.125V28.0702H521.995V13.3202H552.715V0.990234H508.135Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M574.835 66.0398H572.745L571.015 63.0698H569.845V66.0398H567.805V57.5498H571.765C572.845 57.5498 573.865 57.9298 574.425 58.9398C575.205 60.3698 574.665 62.3798 573.105 63.0298C573.725 64.1198 574.225 64.9498 574.845 66.0398H574.835ZM570.375 61.0798H570.845C571.335 61.0798 572.365 61.0798 572.365 60.2898C572.365 59.5598 571.335 59.5598 570.845 59.5598H570.375V61.0798Z",fill:"#FFF5D9"}),v.jsx("path",{d:"M570.964 69.0002C574.913 69.0002 578.114 65.799 578.114 61.8502C578.114 57.9014 574.913 54.7002 570.964 54.7002C567.016 54.7002 563.814 57.9014 563.814 61.8502C563.814 65.799 567.016 69.0002 570.964 69.0002Z",stroke:"#FFF5D9","stroke-width":"2.2",strokeMiterlimit:"10"})]}),v.jsx("defs",{children:v.jsx("clipPath",{id:"clip0_6_641",children:v.jsx("rect",{width:"578.41",height:"71.32",fill:"white",transform:"translate(0.794922)"})})})]})]}),v.jsxs("div",{className:"flex flex-row justify-between items-center",style:{height:"100%"},children:[Object.keys(e).length>0&&v.jsxs("div",{className:"flex flex-col games items-center",style:{width:"25%",height:"100%",gap:"1em",padding:"1em"},children:[v.jsx("h4",{className:"m-2",children:"Games"}),v.jsx("button",{className:"small",style:{width:"100%"},onClick:()=>i("new"),children:"New"}),v.jsx("div",{className:"flex flex-col overflow-scroll",style:{width:"100%"},children:Object.values(e).map(d=>v.jsx("div",{onClick:()=>i(d==null?void 0:d.id),className:`game-entry ${r!==(d==null?void 0:d.id)&&lc(d,window.our.node)?"is-turn":""} ${r===(d==null?void 0:d.id)?"selected":""} ${d!=null&&d.ended?"ended":""}`,children:d==null?void 0:d.id},d==null?void 0:d.id))})]}),v.jsx("div",{className:"flex flex-col justify-center items-center game",style:{width:Object.keys(e).length>0?"calc(75% - 16px)":"100%",height:"100%"},ref:l,children:r==="new"||!p?v.jsxs(v.Fragment,{children:[v.jsx("h3",{children:"Start New Game"}),v.jsx("h5",{className:"mb-8 orange-text",children:"(game creator will be white)"}),v.jsxs("form",{onSubmit:S,className:"flex flex-col justify-center mb-40",style:{maxWidth:400},children:[v.jsx("label",{className:"mb-2",style:{alignSelf:"flex-start",fontWeight:"600"},children:"Player ID"}),v.jsx("input",{className:"border rounded p-2 mb-2",style:{minWidth:300},type:"text",placeholder:"Player ID",value:o,onChange:d=>s(d.target.value)}),v.jsx("button",{type:"submit",children:"Start Game"})]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"flex flex-row justify-between items-center w-full px-4 pb-2 gap-4",children:[v.jsx("h4",{children:r}),v.jsx("h5",{children:p!=null&&p.ended?"Game Ended":`Turn: ${f}`}),p!=null&&p.ended?v.jsx("button",{className:"small mt-2",onClick:C,children:"Rematch"}):v.jsx("button",{className:"small mt-2",onClick:y,children:"Resign"})]}),v.jsx("div",{children:v.jsx(Qm,{boardWidth:u-16,position:p==null?void 0:p.game.fen(),onPieceDrop:m,boardOrientation:(p==null?void 0:p.white)===window.our.node?"white":"black"})})]})})]})]})})}Cs.createRoot(document.getElementById("root")).render(v.jsx(yc.StrictMode,{children:v.jsx(Ov,{})})); diff --git a/hyperdrive/packages/chess/pkg/ui/index.html b/hyperdrive/packages/chess/pkg/ui/index.html deleted file mode 100644 index 28c836048..000000000 --- a/hyperdrive/packages/chess/pkg/ui/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - Chess - - - - - - -
- - - \ No newline at end of file