summaryrefslogtreecommitdiffstats
path: root/third_party/rust/unic-langid-impl
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/unic-langid-impl')
-rw-r--r--third_party/rust/unic-langid-impl/.cargo-checksum.json1
-rw-r--r--third_party/rust/unic-langid-impl/Cargo.lock617
-rw-r--r--third_party/rust/unic-langid-impl/Cargo.toml86
-rw-r--r--third_party/rust/unic-langid-impl/README.md1
-rw-r--r--third_party/rust/unic-langid-impl/benches/canonicalize.rs50
-rw-r--r--third_party/rust/unic-langid-impl/benches/langid.rs84
-rw-r--r--third_party/rust/unic-langid-impl/benches/likely_subtags.rs88
-rw-r--r--third_party/rust/unic-langid-impl/benches/parser.rs82
-rw-r--r--third_party/rust/unic-langid-impl/data/cldr-misc-full/README.md6
-rw-r--r--third_party/rust/unic-langid-impl/src/bin/generate_layout.rs130
-rw-r--r--third_party/rust/unic-langid-impl/src/bin/generate_likelysubtags.rs201
-rw-r--r--third_party/rust/unic-langid-impl/src/errors.rs29
-rw-r--r--third_party/rust/unic-langid-impl/src/layout_table.rs4
-rw-r--r--third_party/rust/unic-langid-impl/src/lib.rs516
-rw-r--r--third_party/rust/unic-langid-impl/src/likelysubtags/mod.rs136
-rw-r--r--third_party/rust/unic-langid-impl/src/likelysubtags/tables.rs2226
-rw-r--r--third_party/rust/unic-langid-impl/src/parser/errors.rs20
-rw-r--r--third_party/rust/unic-langid-impl/src/parser/mod.rs83
-rw-r--r--third_party/rust/unic-langid-impl/src/serde.rs60
-rw-r--r--third_party/rust/unic-langid-impl/src/subtags/language.rs108
-rw-r--r--third_party/rust/unic-langid-impl/src/subtags/mod.rs9
-rw-r--r--third_party/rust/unic-langid-impl/src/subtags/region.rs74
-rw-r--r--third_party/rust/unic-langid-impl/src/subtags/script.rs62
-rw-r--r--third_party/rust/unic-langid-impl/src/subtags/variant.rs78
-rw-r--r--third_party/rust/unic-langid-impl/tests/canonicalize_test.rs13
-rw-r--r--third_party/rust/unic-langid-impl/tests/fixtures.rs75
-rw-r--r--third_party/rust/unic-langid-impl/tests/language_identifier_test.rs192
-rw-r--r--third_party/rust/unic-langid-impl/tests/likelysubtags.rs113
28 files changed, 5144 insertions, 0 deletions
diff --git a/third_party/rust/unic-langid-impl/.cargo-checksum.json b/third_party/rust/unic-langid-impl/.cargo-checksum.json
new file mode 100644
index 0000000000..b3315aaa15
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/.cargo-checksum.json
@@ -0,0 +1 @@
+{"files":{"Cargo.lock":"da3d5fabc92472ac1f45fa321f1e188fd3fff22b3234d3f74e78a8f79503aac9","Cargo.toml":"67560e144c925cdb1467085067b51138da8461c4babd170777e90082a1664d61","README.md":"1ce686b1ba46e7fff771db934d1e8905e3d96c73d9e6712ca85011cf63cf4157","benches/canonicalize.rs":"1bc9db6454ed711c1c1d58a9236d1ed02c40645782338697812dc21b26c2295f","benches/langid.rs":"46dc68e1ee1c998fe957035c11c373cc5d2c2993dd3058aeb36014028618a46e","benches/likely_subtags.rs":"33debb6db4eabd0166525c7c06868f86e35958c2d0d9e5e7668f28b1aff3da23","benches/parser.rs":"bc5460589125aca2ca4c4cf475fde81e7de6aa70c7bf8443996b6246b44110a3","data/cldr-misc-full/README.md":"b4bbc8e56b8c9f5d482d2dd211e53720cdca27b0e98eec274e56577d41906b92","src/bin/generate_layout.rs":"e1df742c318ba4de09a25edad082a398da1d5591ac24074f9eadf3f40d677a9a","src/bin/generate_likelysubtags.rs":"9b0df3a008d0f6090ee441e4c649f00f9b78c7d23434f389fe3de2288951cf72","src/errors.rs":"091525fd3d704cc4698bab82af9fff1f2e6fc793910700790ec3ef943b3eddfe","src/layout_table.rs":"c311b5399a22efd69f14decb00aee7dfb2943a090832e2aef127e2853ad1ce0b","src/lib.rs":"75b5e8958ba0139ef60139e61441d29c80bde8552d1adead3905165c11ed97cd","src/likelysubtags/mod.rs":"66889568b883675465faa445e257b4b70e9dcba98c6c523eb34a08ebb50377c0","src/likelysubtags/tables.rs":"47ab40497145adc553f9f585d1ec79d01028495a57b1907392642afd26986e89","src/parser/errors.rs":"2dacf5bf388499c9fbecf64ef950038f123335e87b6691bcdb88d185678f38d5","src/parser/mod.rs":"30f9ff487ab7b023ec7e6cfbfe4f4ebc41ca524cef0eba96a6b77ad624c9f6b8","src/serde.rs":"2ce1fdea1217c4f72b2c8e00f333902ff496c54eef5b4534adb289375c50aef0","src/subtags/language.rs":"ea198788c10a9b24a88d2316d516a1b6325b20c57c1d05586edc7c50acc1e27d","src/subtags/mod.rs":"ba23712d7ce5e0fa896c97ddc91d7eacbf21a99d62c15f5cf19a6653876bf56b","src/subtags/region.rs":"f3455679067ed0da9103d5433586cb4809628847e923bbcf35cc2d2b25a0d35e","src/subtags/script.rs":"c5ca9a2ab6d8b3a1dc3f52a73665223f0dd30901b8e5d722dd93e58a69710f5d","src/subtags/variant.rs":"a0feec8b44933ff04a3d3f91e9e69f7537468e7c813c3780eb87e51512f6d1dd","tests/canonicalize_test.rs":"5ca005223ae159c15f8809c28c1cc950dc4d69063d9de70b885f18ef8e6cca28","tests/fixtures.rs":"d03a280b67080dac1bc333255e89d8903164688a6dfaed5adbea68efd65ef1bc","tests/language_identifier_test.rs":"90a4d7ac4961c1e214de166036c1b5cae21f3a99f157fe00d149d8b9106cb7b9","tests/likelysubtags.rs":"f5db0c3ec9f545eef148914486c7a74f1bbc629f4dcff3077242c174c0c1c6a3"},"package":"e35bfd2f2b8796545b55d7d3fd3e89a0613f68a0d1c8bc28cb7ff96b411a35ff"} \ No newline at end of file
diff --git a/third_party/rust/unic-langid-impl/Cargo.lock b/third_party/rust/unic-langid-impl/Cargo.lock
new file mode 100644
index 0000000000..bd8b6c575c
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/Cargo.lock
@@ -0,0 +1,617 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "atty"
+version = "0.2.14"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
+dependencies = [
+ "hermit-abi",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bstr"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
+dependencies = [
+ "lazy_static",
+ "memchr",
+ "regex-automata",
+ "serde",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba"
+
+[[package]]
+name = "cast"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "clap"
+version = "2.34.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
+dependencies = [
+ "bitflags",
+ "textwrap",
+ "unicode-width",
+]
+
+[[package]]
+name = "criterion"
+version = "0.3.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
+dependencies = [
+ "atty",
+ "cast",
+ "clap",
+ "criterion-plot",
+ "csv",
+ "itertools",
+ "lazy_static",
+ "num-traits",
+ "oorandom",
+ "plotters",
+ "rayon",
+ "regex",
+ "serde",
+ "serde_cbor",
+ "serde_derive",
+ "serde_json",
+ "tinytemplate",
+ "walkdir",
+]
+
+[[package]]
+name = "criterion-plot"
+version = "0.4.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
+dependencies = [
+ "cast",
+ "itertools",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f916dfc5d356b0ed9dae65f1db9fc9770aa2851d2662b988ccf4fe3516e86348"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "csv"
+version = "1.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
+dependencies = [
+ "bstr",
+ "csv-core",
+ "itoa 0.4.8",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "csv-core"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "displaydoc"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "either"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+
+[[package]]
+name = "half"
+version = "1.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "itertools"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
+dependencies = [
+ "either",
+]
+
+[[package]]
+name = "itoa"
+version = "0.4.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
+
+[[package]]
+name = "itoa"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc"
+
+[[package]]
+name = "js-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
+
+[[package]]
+name = "libc"
+version = "0.2.135"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68783febc7782c6c5cb401fbda4de5a9898be1762314da0bb2c10ced61f18b0c"
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "memchr"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1"
+
+[[package]]
+name = "oorandom"
+version = "11.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
+
+[[package]]
+name = "plotters"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2538b639e642295546c50fcd545198c9d64ee2a38620a628724a3b266d5fbf97"
+dependencies = [
+ "num-traits",
+ "plotters-backend",
+ "plotters-svg",
+ "wasm-bindgen",
+ "web-sys",
+]
+
+[[package]]
+name = "plotters-backend"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
+
+[[package]]
+name = "plotters-svg"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
+dependencies = [
+ "plotters-backend",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rayon"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
+dependencies = [
+ "autocfg",
+ "crossbeam-deque",
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "regex"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
+dependencies = [
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
+
+[[package]]
+name = "regex-syntax"
+version = "0.6.27"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
+
+[[package]]
+name = "ryu"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
+
+[[package]]
+name = "same-file"
+version = "1.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
+dependencies = [
+ "winapi-util",
+]
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "serde"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_cbor"
+version = "0.11.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
+dependencies = [
+ "half",
+ "serde",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.87"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
+dependencies = [
+ "itoa 1.0.4",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "syn"
+version = "1.0.102"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "textwrap"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
+dependencies = [
+ "unicode-width",
+]
+
+[[package]]
+name = "tinystr"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8aeafdfd935e4a7fe16a91ab711fa52d54df84f9c8f7ca5837a9d1d902ef4c2"
+dependencies = [
+ "displaydoc",
+]
+
+[[package]]
+name = "tinytemplate"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
+[[package]]
+name = "unic-langid-impl"
+version = "0.9.1"
+dependencies = [
+ "criterion",
+ "serde",
+ "serde_json",
+ "tinystr",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
+
+[[package]]
+name = "unicode-width"
+version = "0.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
+
+[[package]]
+name = "walkdir"
+version = "2.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
+dependencies = [
+ "same-file",
+ "winapi",
+ "winapi-util",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.83"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f"
+
+[[package]]
+name = "web-sys"
+version = "0.3.60"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f"
+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-util"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/third_party/rust/unic-langid-impl/Cargo.toml b/third_party/rust/unic-langid-impl/Cargo.toml
new file mode 100644
index 0000000000..eab3f743e9
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/Cargo.toml
@@ -0,0 +1,86 @@
+# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
+#
+# When uploading crates to the registry Cargo will automatically
+# "normalize" Cargo.toml files for maximal compatibility
+# with all versions of Cargo and also rewrite `path` dependencies
+# to registry (e.g., crates.io) dependencies.
+#
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
+
+[package]
+edition = "2018"
+name = "unic-langid-impl"
+version = "0.9.1"
+authors = ["Zibi Braniecki <gandalf@mozilla.com>"]
+include = [
+ "src/**/*",
+ "benches/*.rs",
+ "tests/*.rs",
+ "Cargo.toml",
+ "README.md",
+]
+description = "API for managing Unicode Language Identifiers"
+readme = "README.md"
+categories = ["internationalization"]
+license = "MIT/Apache-2.0"
+repository = "https://github.com/zbraniecki/unic-locale"
+
+[[bin]]
+name = "generate_likelysubtags"
+required-features = ["binary"]
+
+[[bin]]
+name = "generate_layout"
+required-features = ["binary"]
+
+[[test]]
+name = "likelysubtags"
+path = "tests/likelysubtags.rs"
+required-features = ["likelysubtags"]
+
+[[bench]]
+name = "parser"
+harness = false
+
+[[bench]]
+name = "langid"
+harness = false
+
+[[bench]]
+name = "canonicalize"
+harness = false
+
+[[bench]]
+name = "likely_subtags"
+harness = false
+required-features = ["likelysubtags"]
+
+[dependencies.serde]
+version = "1.0"
+optional = true
+
+[dependencies.serde_json]
+version = "1.0"
+optional = true
+
+[dependencies.tinystr]
+version = "0.7.0"
+
+[dev-dependencies.criterion]
+version = "0.3"
+
+[dev-dependencies.serde]
+version = "1.0"
+features = ["derive"]
+
+[dev-dependencies.serde_json]
+version = "1.0"
+
+[features]
+binary = [
+ "serde",
+ "serde_json",
+]
+likelysubtags = []
diff --git a/third_party/rust/unic-langid-impl/README.md b/third_party/rust/unic-langid-impl/README.md
new file mode 100644
index 0000000000..1ad62eac92
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/README.md
@@ -0,0 +1 @@
+This is an internal implementation crate for `unic-langid`. Please use `unic-langid`.
diff --git a/third_party/rust/unic-langid-impl/benches/canonicalize.rs b/third_party/rust/unic-langid-impl/benches/canonicalize.rs
new file mode 100644
index 0000000000..a9e17e49aa
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/benches/canonicalize.rs
@@ -0,0 +1,50 @@
+use criterion::black_box;
+use criterion::criterion_group;
+use criterion::criterion_main;
+use criterion::Criterion;
+
+use unic_langid_impl::canonicalize;
+
+fn langid_canonicalize_bench(c: &mut Criterion) {
+ let strings = &[
+ "En_uS",
+ "EN-GB",
+ "ES-aR",
+ "iT",
+ "zH_HaNs_cN",
+ "dE-aT",
+ "Pl",
+ "FR-FR",
+ "de_AT",
+ "sR-CyrL_sr",
+ "NB-NO",
+ "fr_fr",
+ "Mk",
+ "uK",
+ "en-us",
+ "en_gb",
+ "ES-AR",
+ "tH",
+ "DE",
+ "ZH_cyrl_hN",
+ "eN-lAtN-uS",
+ ];
+ c.bench_function("langid_canonicalize", |b| {
+ b.iter(|| {
+ for s in strings {
+ let _ = canonicalize(black_box(s));
+ }
+ })
+ });
+ c.bench_function("langid_canonicalize_from_bytes", |b| {
+ let slices: Vec<&[u8]> = strings.iter().map(|s| s.as_bytes()).collect();
+ b.iter(|| {
+ for s in &slices {
+ let _ = canonicalize(black_box(s));
+ }
+ })
+ });
+}
+
+criterion_group!(benches, langid_canonicalize_bench,);
+criterion_main!(benches);
diff --git a/third_party/rust/unic-langid-impl/benches/langid.rs b/third_party/rust/unic-langid-impl/benches/langid.rs
new file mode 100644
index 0000000000..026c288602
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/benches/langid.rs
@@ -0,0 +1,84 @@
+use criterion::black_box;
+use criterion::criterion_group;
+use criterion::criterion_main;
+use criterion::Criterion;
+use criterion::Fun;
+
+use unic_langid_impl::subtags;
+use unic_langid_impl::LanguageIdentifier;
+
+static STRINGS: &[&str] = &[
+ "en-US",
+ "en-GB",
+ "es-AR",
+ "it",
+ "zh-Hans-CN",
+ "de-AT",
+ "pl",
+ "fr-FR",
+ "de-AT",
+ "sr-Cyrl-SR",
+ "nb-NO",
+ "fr-FR",
+ "mk",
+ "uk",
+ "en-US",
+ "en-GB",
+ "es-AR",
+ "th",
+ "de",
+ "zh-Cyrl-HN",
+ "en-Latn-US",
+];
+
+fn language_identifier_construct_bench(c: &mut Criterion) {
+ let langids: Vec<LanguageIdentifier> = STRINGS
+ .iter()
+ .map(|s| -> LanguageIdentifier { s.parse().unwrap() })
+ .collect();
+
+ let funcs = vec![
+ Fun::new("from_str", |b, _| {
+ b.iter(|| {
+ for s in STRINGS {
+ let _: Result<LanguageIdentifier, _> = black_box(s).parse();
+ }
+ })
+ }),
+ Fun::new("from_bytes", |b, _| {
+ let slices: Vec<&[u8]> = STRINGS.iter().map(|s| s.as_bytes()).collect();
+ b.iter(|| {
+ for s in &slices {
+ let _ = LanguageIdentifier::from_bytes(black_box(s));
+ }
+ })
+ }),
+ Fun::new("from_parts", |b, langids: &Vec<LanguageIdentifier>| {
+ let entries: Vec<(
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+ Vec<subtags::Variant>,
+ )> = langids
+ .iter()
+ .cloned()
+ .map(|langid| langid.into_parts())
+ .collect();
+ b.iter(|| {
+ for (language, script, region, variants) in &entries {
+ let _ = LanguageIdentifier::from_parts(
+ language.clone(),
+ script.clone(),
+ region.clone(),
+ variants,
+ );
+ }
+ })
+ }),
+ ];
+
+ c.bench_functions("language_identifier_construct", funcs, langids);
+}
+
+criterion_group!(benches, language_identifier_construct_bench,);
+criterion_main!(benches);
diff --git a/third_party/rust/unic-langid-impl/benches/likely_subtags.rs b/third_party/rust/unic-langid-impl/benches/likely_subtags.rs
new file mode 100644
index 0000000000..3b7f8746ee
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/benches/likely_subtags.rs
@@ -0,0 +1,88 @@
+use criterion::criterion_group;
+use criterion::criterion_main;
+use criterion::Criterion;
+
+use unic_langid_impl::subtags;
+use unic_langid_impl::LanguageIdentifier;
+
+static STRINGS: &[&str] = &[
+ "en-US",
+ "en-GB",
+ "es-AR",
+ "it",
+ "zh-Hans-CN",
+ "de-AT",
+ "pl",
+ "fr-FR",
+ "de-AT",
+ "sr-Cyrl-SR",
+ "nb-NO",
+ "fr-FR",
+ "mk",
+ "uk",
+ "und-PL",
+ "und-Latn-AM",
+ "ug-Cyrl",
+ "sr-ME",
+ "mn-Mong",
+ "lif-Limb",
+ "gan",
+ "zh-Hant",
+ "yue-Hans",
+ "unr",
+ "unr-Deva",
+ "und-Thai-CN",
+ "ug-Cyrl",
+ "en-Latn-DE",
+ "pl-FR",
+ "de-CH",
+ "tuq",
+ "sr-ME",
+ "ng",
+ "klx",
+ "kk-Arab",
+ "en-Cyrl",
+ "und-Cyrl-UK",
+ "und-Arab",
+ "und-Arab-FO",
+];
+
+fn maximize_bench(c: &mut Criterion) {
+ let langids: Vec<LanguageIdentifier> = STRINGS
+ .iter()
+ .map(|s| -> LanguageIdentifier { s.parse().unwrap() })
+ .collect();
+ c.bench_function("maximize", move |b| {
+ b.iter(|| {
+ for mut s in langids.clone().into_iter() {
+ s.maximize();
+ }
+ })
+ });
+}
+
+fn extract_input(
+ s: &str,
+) -> (
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+) {
+ let langid: LanguageIdentifier = s.parse().unwrap();
+ (langid.language, langid.script, langid.region)
+}
+
+fn raw_maximize_bench(c: &mut Criterion) {
+ let entries: Vec<_> = STRINGS.iter().map(|s| extract_input(s)).collect();
+
+ c.bench_function("raw_maximize", move |b| {
+ b.iter(|| {
+ for (lang, script, region) in entries.clone().into_iter() {
+ let _ = unic_langid_impl::likelysubtags::maximize(lang, script, region);
+ }
+ })
+ });
+}
+
+criterion_group!(benches, maximize_bench, raw_maximize_bench,);
+criterion_main!(benches);
diff --git a/third_party/rust/unic-langid-impl/benches/parser.rs b/third_party/rust/unic-langid-impl/benches/parser.rs
new file mode 100644
index 0000000000..97abe833fb
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/benches/parser.rs
@@ -0,0 +1,82 @@
+use criterion::black_box;
+use criterion::criterion_group;
+use criterion::criterion_main;
+use criterion::Criterion;
+
+use unic_langid_impl::parser::parse_language_identifier;
+
+fn language_identifier_parser_bench(c: &mut Criterion) {
+ let strings = &[
+ "en-US",
+ "en-GB",
+ "es-AR",
+ "it",
+ "zh-Hans-CN",
+ "de-AT",
+ "pl",
+ "fr-FR",
+ "de-AT",
+ "sr-Cyrl-SR",
+ "nb-NO",
+ "fr-FR",
+ "mk",
+ "uk",
+ "en-US",
+ "en-GB",
+ "es-AR",
+ "th",
+ "de",
+ "zh-Cyrl-HN",
+ "en-Latn-US",
+ ];
+
+ c.bench_function("language_identifier_parser", |b| {
+ let slices: Vec<&[u8]> = strings.iter().map(|s| s.as_bytes()).collect();
+ b.iter(|| {
+ for s in &slices {
+ let _ = parse_language_identifier(black_box(s));
+ }
+ })
+ });
+}
+
+fn language_identifier_parser_casing_bench(c: &mut Criterion) {
+ let strings = &[
+ "En_uS",
+ "EN-GB",
+ "ES-aR",
+ "iT",
+ "zH_HaNs_cN",
+ "dE-aT",
+ "Pl",
+ "FR-FR",
+ "de_AT",
+ "sR-CyrL_sr",
+ "NB-NO",
+ "fr_fr",
+ "Mk",
+ "uK",
+ "en-us",
+ "en_gb",
+ "ES-AR",
+ "tH",
+ "DE",
+ "ZH_cyrl_hN",
+ "eN-lAtN-uS",
+ ];
+ c.bench_function("language_identifier_parser_casing", |b| {
+ let slices: Vec<&[u8]> = strings.iter().map(|s| s.as_bytes()).collect();
+ b.iter(|| {
+ for s in &slices {
+ let _ = parse_language_identifier(black_box(s));
+ }
+ })
+ });
+}
+
+criterion_group!(
+ benches,
+ language_identifier_parser_bench,
+ language_identifier_parser_casing_bench,
+);
+criterion_main!(benches);
diff --git a/third_party/rust/unic-langid-impl/data/cldr-misc-full/README.md b/third_party/rust/unic-langid-impl/data/cldr-misc-full/README.md
new file mode 100644
index 0000000000..68cb052559
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/data/cldr-misc-full/README.md
@@ -0,0 +1,6 @@
+# cldr-misc-full
+
+This repository provides the a portion of the JSON distribution of CLDR locale data
+for internationalization.
+
+Refer to the README at https://github.com/unicode-cldr/cldr-json for complete details.
diff --git a/third_party/rust/unic-langid-impl/src/bin/generate_layout.rs b/third_party/rust/unic-langid-impl/src/bin/generate_layout.rs
new file mode 100644
index 0000000000..35d8e27aed
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/bin/generate_layout.rs
@@ -0,0 +1,130 @@
+use serde_json::Value;
+use std::collections::HashMap;
+use std::collections::HashSet;
+use std::fs;
+use unic_langid_impl::subtags::{Language, Script};
+use unic_langid_impl::CharacterDirection;
+use unic_langid_impl::LanguageIdentifier;
+
+fn langid_to_direction_map(path: &str) -> HashMap<LanguageIdentifier, CharacterDirection> {
+ let mut result = HashMap::new();
+ for entry in fs::read_dir(path).unwrap() {
+ let entry = entry.unwrap();
+ let mut path = entry.path();
+ path.push("layout.json");
+ let contents = fs::read_to_string(path).expect("Something went wrong reading the file");
+ let v: Value = serde_json::from_str(&contents).unwrap();
+
+ let langid_key = v["main"].as_object().unwrap().keys().nth(0).unwrap();
+
+ if langid_key == "root" {
+ continue;
+ }
+ let langid: LanguageIdentifier = langid_key.parse().unwrap();
+
+ let character_order = match v["main"][langid_key]["layout"]["orientation"]["characterOrder"]
+ .as_str()
+ .unwrap()
+ {
+ "right-to-left" => CharacterDirection::RTL,
+ "left-to-right" => CharacterDirection::LTR,
+ _ => unimplemented!("Encountered unknown directionality!"),
+ };
+ result.insert(langid, character_order);
+ }
+ result
+}
+
+fn check_all_variants_rtl(
+ map: &HashMap<LanguageIdentifier, CharacterDirection>,
+ lang: Option<Language>,
+ script: Option<Script>,
+) -> bool {
+ for (langid, dir) in map.iter() {
+ if let Some(reference_script) = script {
+ if let Some(s) = langid.script {
+ if reference_script == s && dir != &CharacterDirection::RTL {
+ return false;
+ }
+ }
+ }
+ if let Some(reference_lang) = lang {
+ if langid.language == reference_lang && dir != &CharacterDirection::RTL {
+ println!("{:#?}", langid);
+ println!("{:#?}", lang);
+ return false;
+ }
+ }
+ }
+ true
+}
+
+fn main() {
+ let path = "./data/cldr-misc-full/main/";
+ let map = langid_to_direction_map(path);
+
+ let mut scripts = HashSet::new();
+ let mut langs = HashSet::new();
+
+ for (langid, dir) in map.iter() {
+ if dir == &CharacterDirection::LTR {
+ continue;
+ }
+
+ let script = langid.script;
+
+ if let Some(script) = script {
+ if scripts.contains(&script) {
+ continue;
+ }
+ assert!(
+ check_all_variants_rtl(&map, None, Some(script)),
+ "We didn't expect a script with two directionalities!"
+ );
+ scripts.insert(script);
+ continue;
+ }
+
+ let lang = langid.language;
+
+ if langs.contains(&lang) {
+ continue;
+ }
+
+ assert!(
+ check_all_variants_rtl(&map, Some(lang), None),
+ "We didn't expect a language with two directionalities!"
+ );
+ langs.insert(lang);
+ }
+
+ let mut scripts: Vec<String> = scripts
+ .into_iter()
+ .map(|s| {
+ let v: u32 = s.into();
+ v.to_string()
+ })
+ .collect();
+ scripts.sort();
+ let mut langs: Vec<String> = langs
+ .into_iter()
+ .map(|s| {
+ let v: Option<u64> = s.into();
+ let v: u64 = v.expect("Expected language to not be undefined.");
+ v.to_string()
+ })
+ .collect();
+ langs.sort();
+
+ println!(
+ "pub const SCRIPTS_CHARACTER_DIRECTION_RTL: [u32; {}] = [{}];",
+ scripts.len(),
+ scripts.join(", ")
+ );
+
+ println!(
+ "pub const LANGS_CHARACTER_DIRECTION_RTL: [u64; {}] = [{}];",
+ langs.len(),
+ langs.join(", ")
+ );
+}
diff --git a/third_party/rust/unic-langid-impl/src/bin/generate_likelysubtags.rs b/third_party/rust/unic-langid-impl/src/bin/generate_likelysubtags.rs
new file mode 100644
index 0000000000..a86ffa80d6
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/bin/generate_likelysubtags.rs
@@ -0,0 +1,201 @@
+use serde_json::Value;
+use std::fs;
+use tinystr::TinyStr8;
+use unic_langid_impl::{subtags, LanguageIdentifier};
+
+type LangIdSubTags = (Option<u64>, Option<u32>, Option<u32>);
+
+fn serialize_val(input: LangIdSubTags) -> String {
+ format!(
+ "({}, {}, {})",
+ serialize_lang_option(input.0),
+ serialize_script_option(input.1),
+ serialize_region_option(input.2)
+ )
+}
+
+fn serialize_lang_option(l: Option<u64>) -> String {
+ if let Some(l) = l {
+ format!("Some({})", l)
+ } else {
+ String::from("None")
+ }
+}
+
+fn serialize_script_option(r: Option<u32>) -> String {
+ if let Some(r) = r {
+ format!("Some({})", r)
+ } else {
+ String::from("None")
+ }
+}
+
+fn serialize_region_option(r: Option<u32>) -> String {
+ if let Some(r) = r {
+ format!("Some({})", r)
+ } else {
+ String::from("None")
+ }
+}
+
+fn main() {
+ let contents = fs::read_to_string("./data/likelySubtags.json")
+ .expect("Something went wrong reading the file");
+ let v: Value = serde_json::from_str(&contents).unwrap();
+ let values = v["supplemental"]["likelySubtags"].as_object().unwrap();
+
+ let mut lang_only: Vec<(u64, LangIdSubTags)> = vec![];
+ let mut lang_region: Vec<(u64, u32, LangIdSubTags)> = vec![];
+ let mut lang_script: Vec<(u64, u32, LangIdSubTags)> = vec![];
+ let mut script_region: Vec<(u32, u32, LangIdSubTags)> = vec![];
+ let mut region_only: Vec<(u32, LangIdSubTags)> = vec![];
+ let mut script_only: Vec<(u32, LangIdSubTags)> = vec![];
+
+ let zz_region: subtags::Region = "ZZ".parse().unwrap();
+
+ for (k, v) in values {
+ let key_langid: LanguageIdentifier = k.parse().expect("Failed to parse a key.");
+ let v: &str = v.as_str().unwrap();
+ let mut value_langid: LanguageIdentifier = v.parse().expect("Failed to parse a value.");
+ if Some(zz_region) == value_langid.region {
+ value_langid.region = None;
+ }
+ let (val_lang, val_script, val_region, _) = value_langid.into_parts();
+
+ let val_lang: Option<u64> = val_lang.into();
+ let val_script: Option<u32> = val_script.map(Into::into);
+ let val_region: Option<u32> = val_region.map(Into::into);
+
+ let lang = if key_langid.language.is_empty() {
+ None
+ } else {
+ Some(key_langid.language)
+ };
+ let script = key_langid.script;
+ let region = key_langid.region;
+
+ match (lang, script, region) {
+ (None, None, None) => lang_only.push((
+ u64::from_le_bytes(*TinyStr8::from_str("und").unwrap().all_bytes()),
+ (val_lang, val_script, val_region),
+ )),
+ (Some(l), None, None) => lang_only.push((
+ Into::<Option<u64>>::into(l).unwrap(),
+ (val_lang, val_script, val_region),
+ )),
+ (Some(l), None, Some(r)) => lang_region.push((
+ Into::<Option<u64>>::into(l).unwrap(),
+ r.into(),
+ (val_lang, val_script, val_region),
+ )),
+ (Some(l), Some(s), None) => lang_script.push((
+ Into::<Option<u64>>::into(l).unwrap(),
+ s.into(),
+ (val_lang, val_script, val_region),
+ )),
+ (None, Some(s), Some(r)) => {
+ script_region.push((s.into(), r.into(), (val_lang, val_script, val_region)))
+ }
+ (None, Some(s), None) => {
+ script_only.push((s.into(), (val_lang, val_script, val_region)))
+ }
+ (None, None, Some(r)) => {
+ region_only.push((r.into(), (val_lang, val_script, val_region)))
+ }
+ _ => {
+ panic!("{:#?}", key_langid);
+ }
+ }
+ }
+
+ println!("#![allow(clippy::type_complexity)]");
+ println!("#![allow(clippy::unreadable_literal)]\n");
+
+ let version = v["supplemental"]["version"]["_cldrVersion"]
+ .as_str()
+ .unwrap();
+ println!("pub static CLDR_VERSION: &str = \"{}\";", version);
+
+ println!(
+ "pub static LANG_ONLY: [(u64, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ lang_only.len()
+ );
+ lang_only.sort_by(|a, b| a.0.partial_cmp(&b.0).unwrap());
+ for (key_lang, val) in lang_only {
+ println!(" ({}, {}),", key_lang, serialize_val(val),);
+ }
+ println!("];");
+
+ println!(
+ "pub static LANG_REGION: [(u64, u32, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ lang_region.len()
+ );
+ lang_region.sort_by(|a, b| {
+ a.0.partial_cmp(&b.0)
+ .unwrap()
+ .then_with(|| a.1.partial_cmp(&b.1).unwrap())
+ });
+ for (key_lang, key_region, val) in lang_region {
+ println!(
+ " ({}, {}, {}),",
+ key_lang,
+ key_region,
+ serialize_val(val),
+ );
+ }
+ println!("];");
+ println!(
+ "pub static LANG_SCRIPT: [(u64, u32, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ lang_script.len()
+ );
+ lang_script.sort_by(|a, b| {
+ a.0.partial_cmp(&b.0)
+ .unwrap()
+ .then_with(|| a.1.partial_cmp(&b.1).unwrap())
+ });
+ for (key_lang, key_script, val) in lang_script {
+ println!(
+ " ({}, {}, {}),",
+ key_lang,
+ key_script,
+ serialize_val(val),
+ );
+ }
+ println!("];");
+ println!(
+ "pub static SCRIPT_REGION: [(u32, u32, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ script_region.len()
+ );
+ script_region.sort_by(|a, b| {
+ a.0.partial_cmp(&b.0)
+ .unwrap()
+ .then_with(|| a.1.partial_cmp(&b.1).unwrap())
+ });
+ for (key_script, key_region, val) in script_region {
+ println!(
+ " ({}, {}, {}),",
+ key_script,
+ key_region,
+ serialize_val(val),
+ );
+ }
+ println!("];");
+ println!(
+ "pub static SCRIPT_ONLY: [(u32, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ script_only.len()
+ );
+ script_only.sort_by(|a, b| a.0.partial_cmp(&b.0).unwrap());
+ for (key_script, val) in script_only {
+ println!(" ({}, {}),", key_script, serialize_val(val),);
+ }
+ println!("];");
+ println!(
+ "pub static REGION_ONLY: [(u32, (Option<u64>, Option<u32>, Option<u32>)); {}] = [",
+ region_only.len()
+ );
+ region_only.sort_by(|a, b| a.0.partial_cmp(&b.0).unwrap());
+ for (key_region, val) in region_only {
+ println!(" ({}, {}),", key_region, serialize_val(val),);
+ }
+ println!("];");
+}
diff --git a/third_party/rust/unic-langid-impl/src/errors.rs b/third_party/rust/unic-langid-impl/src/errors.rs
new file mode 100644
index 0000000000..ec054b1867
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/errors.rs
@@ -0,0 +1,29 @@
+use super::parser::ParserError;
+use std::error::Error;
+use std::fmt::{self, Display};
+
+/// Enum with errors that can be returned by LanguageIdentifier.
+#[derive(Debug, PartialEq)]
+pub enum LanguageIdentifierError {
+ /// An unknown error - currently covers all-but parser errors.
+ Unknown,
+ /// A parser error.
+ ParserError(ParserError),
+}
+
+impl From<ParserError> for LanguageIdentifierError {
+ fn from(error: ParserError) -> LanguageIdentifierError {
+ LanguageIdentifierError::ParserError(error)
+ }
+}
+
+impl Error for LanguageIdentifierError {}
+
+impl Display for LanguageIdentifierError {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ match self {
+ LanguageIdentifierError::Unknown => write!(f, "Unknown error"),
+ LanguageIdentifierError::ParserError(p) => write!(f, "Parser error: {}", p),
+ }
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/src/layout_table.rs b/third_party/rust/unic-langid-impl/src/layout_table.rs
new file mode 100644
index 0000000000..4446408731
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/layout_table.rs
@@ -0,0 +1,4 @@
+pub const SCRIPTS_CHARACTER_DIRECTION_RTL: [u32; 1] = [1650553409];
+pub const LANGS_CHARACTER_DIRECTION_RTL: [u64; 12] = [
+ 24934, 25715, 25960, 26485, 27001, 29281, 29301, 29547, 29552, 6450019, 6517356, 7240301,
+];
diff --git a/third_party/rust/unic-langid-impl/src/lib.rs b/third_party/rust/unic-langid-impl/src/lib.rs
new file mode 100644
index 0000000000..0a6d0b34af
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/lib.rs
@@ -0,0 +1,516 @@
+mod errors;
+mod layout_table;
+#[cfg(feature = "likelysubtags")]
+pub mod likelysubtags;
+#[doc(hidden)]
+pub mod parser;
+#[cfg(feature = "serde")]
+mod serde;
+pub mod subtags;
+
+pub use crate::errors::LanguageIdentifierError;
+use std::fmt::Write;
+use std::iter::Peekable;
+use std::str::FromStr;
+
+/// Enum representing available character direction orientations.
+#[derive(Debug, PartialEq)]
+pub enum CharacterDirection {
+ /// Right To Left
+ ///
+ /// Used in languages such as Arabic, Hebrew, Fula, Kurdish etc.
+ RTL,
+ /// Left To Right
+ ///
+ /// Used in languages such as French, Spanish, English, German etc.
+ LTR,
+}
+
+type PartsTuple = (
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+ Vec<subtags::Variant>,
+);
+
+/// `LanguageIdentifier` is a core struct representing a Unicode Language Identifier.
+///
+/// # Examples
+///
+/// ```
+/// use unic_langid_impl::LanguageIdentifier;
+///
+/// let li: LanguageIdentifier = "en-US".parse()
+/// .expect("Failed to parse.");
+///
+/// assert_eq!(li.language, "en");
+/// assert_eq!(li.script, None);
+/// assert_eq!(li.region.as_ref().map(Into::into), Some("US"));
+/// assert_eq!(li.variants().len(), 0);
+/// ```
+///
+/// # Parsing
+///
+/// Unicode recognizes three levels of standard conformance for any language identifier:
+///
+/// * *well-formed* - syntactically correct
+/// * *valid* - well-formed and only uses registered language subtags, extensions, keywords, types...
+/// * *canonical* - valid and no deprecated codes or structure.
+///
+/// At the moment parsing normalizes a well-formed language identifier converting
+/// `_` separators to `-` and adjusting casing to conform to the Unicode standard.
+///
+/// Any bogus subtags will cause the parsing to fail with an error.
+/// No subtag validation is performed.
+///
+/// # Examples:
+///
+/// ```
+/// use unic_langid_impl::LanguageIdentifier;
+///
+/// let li: LanguageIdentifier = "eN_latn_Us-Valencia".parse()
+/// .expect("Failed to parse.");
+///
+/// assert_eq!(li.language, "en");
+/// assert_eq!(li.script.as_ref().map(Into::into), Some("Latn"));
+/// assert_eq!(li.region.as_ref().map(Into::into), Some("US"));
+/// assert_eq!(li.variants().map(|v| v.as_str()).collect::<Vec<_>>(), &["valencia"]);
+/// ```
+#[derive(Default, Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord)]
+pub struct LanguageIdentifier {
+ pub language: subtags::Language,
+ pub script: Option<subtags::Script>,
+ pub region: Option<subtags::Region>,
+ variants: Option<Box<[subtags::Variant]>>,
+}
+
+impl LanguageIdentifier {
+ /// A constructor which takes a utf8 slice, parses it and
+ /// produces a well-formed `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let li = LanguageIdentifier::from_bytes("en-US".as_bytes())
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li.to_string(), "en-US");
+ /// ```
+ pub fn from_bytes(v: &[u8]) -> Result<Self, LanguageIdentifierError> {
+ Ok(parser::parse_language_identifier(v)?)
+ }
+
+ /// A constructor which takes optional subtags as `AsRef<[u8]>`, parses them and
+ /// produces a well-formed `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let li = LanguageIdentifier::from_parts(
+ /// "fr".parse().expect("Parsing failed."),
+ /// None,
+ /// Some("CA".parse().expect("Parsing failed.")),
+ /// &[]
+ /// );
+ ///
+ /// assert_eq!(li.to_string(), "fr-CA");
+ /// ```
+ pub fn from_parts(
+ language: subtags::Language,
+ script: Option<subtags::Script>,
+ region: Option<subtags::Region>,
+ variants: &[subtags::Variant],
+ ) -> Self {
+ let variants = if !variants.is_empty() {
+ let mut v = variants.to_vec();
+ v.sort_unstable();
+ v.dedup();
+ Some(v.into_boxed_slice())
+ } else {
+ None
+ };
+
+ Self {
+ language,
+ script,
+ region,
+ variants,
+ }
+ }
+
+ /// # Unchecked
+ ///
+ /// This function accepts subtags expecting variants
+ /// to be deduplicated and ordered.
+ pub const fn from_raw_parts_unchecked(
+ language: subtags::Language,
+ script: Option<subtags::Script>,
+ region: Option<subtags::Region>,
+ variants: Option<Box<[subtags::Variant]>>,
+ ) -> Self {
+ Self {
+ language,
+ script,
+ region,
+ variants,
+ }
+ }
+
+ #[doc(hidden)]
+ /// This method is used by `unic-locale` to handle partial
+ /// subtag iterator.
+ ///
+ /// Not stable.
+ pub fn try_from_iter<'a>(
+ iter: &mut Peekable<impl Iterator<Item = &'a [u8]>>,
+ allow_extension: bool,
+ ) -> Result<LanguageIdentifier, LanguageIdentifierError> {
+ Ok(parser::parse_language_identifier_from_iter(
+ iter,
+ allow_extension,
+ )?)
+ }
+
+ /// Consumes `LanguageIdentifier` and produces raw internal representations
+ /// of all subtags in form of `u64`/`u32`.
+ ///
+ /// Primarily used for storing internal representation and restoring via
+ /// `from_raw_parts_unchecked`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ /// use tinystr::{TinyStr8, TinyStr4};
+ ///
+ /// let li: LanguageIdentifier = "en-US".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// let (lang, script, region, variants) = li.into_parts();
+ ///
+ /// // let li2 = LanguageIdentifier::from_raw_parts_unchecked(
+ /// // lang.map(|l| unsafe { TinyStr8::new_unchecked(l) }),
+ /// // script.map(|s| unsafe { TinyStr4::new_unchecked(s) }),
+ /// // region.map(|r| unsafe { TinyStr4::new_unchecked(r) }),
+ /// // variants.map(|v| v.into_iter().map(|v| unsafe { TinyStr8::new_unchecked(*v) }).collect()),
+ /// //);
+ ///
+ /// //assert_eq!(li2.to_string(), "en-US");
+ /// ```
+ pub fn into_parts(self) -> PartsTuple {
+ (
+ self.language,
+ self.script,
+ self.region,
+ self.variants.map_or_else(Vec::new, |v| v.to_vec()),
+ )
+ }
+
+ /// Compares a `LanguageIdentifier` to another `AsRef<LanguageIdentifier`
+ /// allowing for either side to use the missing fields as wildcards.
+ ///
+ /// This allows for matching between `en` (treated as `en-*-*-*`) and `en-US`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let li1: LanguageIdentifier = "en".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// let li2: LanguageIdentifier = "en-US".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_ne!(li1, li2); // "en" != "en-US"
+ /// assert_ne!(li1.to_string(), li2.to_string()); // "en" != "en-US"
+ ///
+ /// assert_eq!(li1.matches(&li2, false, false), false); // "en" != "en-US"
+ /// assert_eq!(li1.matches(&li2, true, false), true); // "en-*-*-*" == "en-US"
+ /// assert_eq!(li1.matches(&li2, false, true), false); // "en" != "en-*-US-*"
+ /// assert_eq!(li1.matches(&li2, true, true), true); // "en-*-*-*" == "en-*-US-*"
+ /// ```
+ pub fn matches<O: AsRef<Self>>(
+ &self,
+ other: &O,
+ self_as_range: bool,
+ other_as_range: bool,
+ ) -> bool {
+ let other = other.as_ref();
+ self.language
+ .matches(&other.language, self_as_range, other_as_range)
+ && subtag_matches(&self.script, &other.script, self_as_range, other_as_range)
+ && subtag_matches(&self.region, &other.region, self_as_range, other_as_range)
+ && subtags_match(
+ &self.variants,
+ &other.variants,
+ self_as_range,
+ other_as_range,
+ )
+ }
+
+ /// Returns a vector of variants subtags of the `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let li1: LanguageIdentifier = "ca-ES-valencia".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li1.variants().map(|v| v.as_str()).collect::<Vec<_>>(), &["valencia"]);
+ ///
+ /// let li2: LanguageIdentifier = "de".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li2.variants().len(), 0);
+ /// ```
+ pub fn variants(&self) -> impl ExactSizeIterator<Item = &subtags::Variant> {
+ let variants: &[_] = match self.variants {
+ Some(ref v) => &**v,
+ None => &[],
+ };
+
+ variants.iter()
+ }
+
+ /// Sets variant subtags of the `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let mut li: LanguageIdentifier = "ca-ES".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// li.set_variants(&["valencia".parse().expect("Parsing failed.")]);
+ ///
+ /// assert_eq!(li.to_string(), "ca-ES-valencia");
+ /// ```
+ pub fn set_variants(&mut self, variants: &[subtags::Variant]) {
+ let mut v = variants.to_vec();
+
+ if v.is_empty() {
+ self.variants = None;
+ } else {
+ v.sort_unstable();
+ v.dedup();
+ self.variants = Some(v.into_boxed_slice());
+ }
+ }
+
+ /// Tests if a variant subtag is present in the `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let mut li: LanguageIdentifier = "ca-ES-macos".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li.has_variant("valencia".parse().unwrap()), false);
+ /// assert_eq!(li.has_variant("macos".parse().unwrap()), true);
+ /// ```
+ pub fn has_variant(&self, variant: subtags::Variant) -> bool {
+ if let Some(variants) = &self.variants {
+ variants.contains(&variant)
+ } else {
+ false
+ }
+ }
+
+ /// Clears variant subtags of the `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let mut li: LanguageIdentifier = "ca-ES-valencia".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// li.clear_variants();
+ ///
+ /// assert_eq!(li.to_string(), "ca-ES");
+ /// ```
+ pub fn clear_variants(&mut self) {
+ self.variants = None;
+ }
+
+ /// Extends the `LanguageIdentifier` adding likely subtags based
+ /// on tables provided by CLDR.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let mut li: LanguageIdentifier = "en-US".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li.maximize(), true);
+ /// assert_eq!(li.to_string(), "en-Latn-US");
+ /// ```
+ #[cfg(feature = "likelysubtags")]
+ pub fn maximize(&mut self) -> bool {
+ if let Some(new_li) = likelysubtags::maximize(self.language, self.script, self.region) {
+ self.language = new_li.0;
+ self.script = new_li.1;
+ self.region = new_li.2;
+ true
+ } else {
+ false
+ }
+ }
+
+ /// Extends the `LanguageIdentifier` removing likely subtags based
+ /// on tables provided by CLDR.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::LanguageIdentifier;
+ ///
+ /// let mut li: LanguageIdentifier = "en-Latn-US".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li.minimize(), true);
+ /// assert_eq!(li.to_string(), "en");
+ /// ```
+ #[cfg(feature = "likelysubtags")]
+ pub fn minimize(&mut self) -> bool {
+ if let Some(new_li) = likelysubtags::minimize(self.language, self.script, self.region) {
+ self.language = new_li.0;
+ self.script = new_li.1;
+ self.region = new_li.2;
+ true
+ } else {
+ false
+ }
+ }
+
+ /// Returns character direction of the `LanguageIdentifier`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use unic_langid_impl::{LanguageIdentifier, CharacterDirection};
+ ///
+ /// let li1: LanguageIdentifier = "es-AR".parse()
+ /// .expect("Parsing failed.");
+ /// let li2: LanguageIdentifier = "fa".parse()
+ /// .expect("Parsing failed.");
+ ///
+ /// assert_eq!(li1.character_direction(), CharacterDirection::LTR);
+ /// assert_eq!(li2.character_direction(), CharacterDirection::RTL);
+ /// ```
+ pub fn character_direction(&self) -> CharacterDirection {
+ match (self.language.into(), self.script) {
+ (_, Some(script))
+ if layout_table::SCRIPTS_CHARACTER_DIRECTION_RTL.contains(&script.into()) =>
+ {
+ CharacterDirection::RTL
+ }
+ (Some(lang), _) if layout_table::LANGS_CHARACTER_DIRECTION_RTL.contains(&lang) => {
+ CharacterDirection::RTL
+ }
+ _ => CharacterDirection::LTR,
+ }
+ }
+}
+
+impl FromStr for LanguageIdentifier {
+ type Err = LanguageIdentifierError;
+
+ fn from_str(source: &str) -> Result<Self, Self::Err> {
+ Self::from_bytes(source.as_bytes())
+ }
+}
+
+impl AsRef<LanguageIdentifier> for LanguageIdentifier {
+ #[inline(always)]
+ fn as_ref(&self) -> &LanguageIdentifier {
+ self
+ }
+}
+
+impl std::fmt::Display for LanguageIdentifier {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ self.language.fmt(f)?;
+ if let Some(ref script) = self.script {
+ f.write_char('-')?;
+ script.fmt(f)?;
+ }
+ if let Some(ref region) = self.region {
+ f.write_char('-')?;
+ region.fmt(f)?;
+ }
+ if let Some(variants) = &self.variants {
+ for variant in variants.iter() {
+ f.write_char('-')?;
+ variant.fmt(f)?;
+ }
+ }
+ Ok(())
+ }
+}
+
+impl PartialEq<&str> for LanguageIdentifier {
+ fn eq(&self, other: &&str) -> bool {
+ self.to_string().as_str() == *other
+ }
+}
+
+fn subtag_matches<P: PartialEq>(
+ subtag1: &Option<P>,
+ subtag2: &Option<P>,
+ as_range1: bool,
+ as_range2: bool,
+) -> bool {
+ (as_range1 && subtag1.is_none()) || (as_range2 && subtag2.is_none()) || subtag1 == subtag2
+}
+
+fn is_option_empty<P: PartialEq>(subtag: &Option<Box<[P]>>) -> bool {
+ subtag.as_ref().map_or(true, |t| t.is_empty())
+}
+
+fn subtags_match<P: PartialEq>(
+ subtag1: &Option<Box<[P]>>,
+ subtag2: &Option<Box<[P]>>,
+ as_range1: bool,
+ as_range2: bool,
+) -> bool {
+ // or is some and is empty!
+ (as_range1 && is_option_empty(subtag1))
+ || (as_range2 && is_option_empty(subtag2))
+ || subtag1 == subtag2
+}
+
+/// This is a best-effort operation that performs all available levels of canonicalization.
+///
+/// At the moment the operation will normalize casing and the separator, but in the future
+/// it may also validate and update from deprecated subtags to canonical ones.
+///
+/// # Examples
+///
+/// ```
+/// use unic_langid_impl::canonicalize;
+///
+/// assert_eq!(canonicalize("pL_latn_pl"), Ok("pl-Latn-PL".to_string()));
+/// ```
+pub fn canonicalize<S: AsRef<[u8]>>(input: S) -> Result<String, LanguageIdentifierError> {
+ let lang_id = LanguageIdentifier::from_bytes(input.as_ref())?;
+ Ok(lang_id.to_string())
+}
+
+#[test]
+fn invalid_subtag() {
+ assert!(LanguageIdentifier::from_bytes("en-ÁÁÁÁ".as_bytes()).is_err());
+}
diff --git a/third_party/rust/unic-langid-impl/src/likelysubtags/mod.rs b/third_party/rust/unic-langid-impl/src/likelysubtags/mod.rs
new file mode 100644
index 0000000000..dad9dc9a67
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/likelysubtags/mod.rs
@@ -0,0 +1,136 @@
+mod tables;
+
+pub use tables::CLDR_VERSION;
+
+use crate::subtags;
+
+unsafe fn lang_from_parts(
+ input: (Option<u64>, Option<u32>, Option<u32>),
+ lang: Option<subtags::Language>,
+ script: Option<subtags::Script>,
+ region: Option<subtags::Region>,
+) -> Option<(
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+)> {
+ let lang = lang
+ .or_else(|| input.0.map(|s| subtags::Language::from_raw_unchecked(s)))
+ .unwrap();
+ let script = script.or_else(|| input.1.map(|s| subtags::Script::from_raw_unchecked(s)));
+ let region = region.or_else(|| input.2.map(|r| subtags::Region::from_raw_unchecked(r)));
+ Some((lang, script, region))
+}
+
+pub fn maximize(
+ lang: subtags::Language,
+ script: Option<subtags::Script>,
+ region: Option<subtags::Region>,
+) -> Option<(
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+)> {
+ if !lang.is_empty() && script.is_some() && region.is_some() {
+ return None;
+ }
+
+ if let Some(l) = Into::<Option<u64>>::into(lang) {
+ if let Some(r) = region {
+ let result = tables::LANG_REGION
+ .binary_search_by_key(&(&l.into(), &r.into()), |(key_l, key_r, _)| (key_l, key_r))
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::LANG_REGION[r].2, None, None, None) };
+ }
+ }
+
+ if let Some(s) = script {
+ let result = tables::LANG_SCRIPT
+ .binary_search_by_key(&(&l.into(), &s.into()), |(key_l, key_s, _)| (key_l, key_s))
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::LANG_SCRIPT[r].2, None, None, None) };
+ }
+ }
+
+ let result = tables::LANG_ONLY
+ .binary_search_by_key(&(&l.into()), |(key_l, _)| key_l)
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::LANG_ONLY[r].1, None, script, region) };
+ }
+ } else if let Some(s) = script {
+ if let Some(r) = region {
+ let result = tables::SCRIPT_REGION
+ .binary_search_by_key(&(&s.into(), &r.into()), |(key_s, key_r, _)| (key_s, key_r))
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::SCRIPT_REGION[r].2, None, None, None) };
+ }
+ }
+
+ let result = tables::SCRIPT_ONLY
+ .binary_search_by_key(&(&s.into()), |(key_s, _)| key_s)
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::SCRIPT_ONLY[r].1, None, None, region) };
+ }
+ } else if let Some(r) = region {
+ let result = tables::REGION_ONLY
+ .binary_search_by_key(&(&r.into()), |(key_r, _)| key_r)
+ .ok();
+ if let Some(r) = result {
+ // safe because all table entries are well formed.
+ return unsafe { lang_from_parts(tables::REGION_ONLY[r].1, None, None, None) };
+ }
+ }
+
+ None
+}
+
+pub fn minimize(
+ lang: subtags::Language,
+ script: Option<subtags::Script>,
+ region: Option<subtags::Region>,
+) -> Option<(
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+)> {
+ // maximize returns None when all 3 components are
+ // already filled so don't call it in that case.
+ let max_langid = if !lang.is_empty() && script.is_some() && region.is_some() {
+ (lang, script, region)
+ } else {
+ maximize(lang, script, region)?
+ };
+
+ if let Some(trial) = maximize(max_langid.0, None, None) {
+ if trial == max_langid {
+ return Some((max_langid.0, None, None));
+ }
+ }
+
+ if max_langid.2.is_some() {
+ if let Some(trial) = maximize(max_langid.0, None, max_langid.2) {
+ if trial == max_langid {
+ return Some((max_langid.0, None, max_langid.2));
+ }
+ }
+ }
+
+ if max_langid.1.is_some() {
+ if let Some(trial) = maximize(max_langid.0, max_langid.1, None) {
+ if trial == max_langid {
+ return Some((max_langid.0, max_langid.1, None));
+ }
+ }
+ }
+ None
+}
diff --git a/third_party/rust/unic-langid-impl/src/likelysubtags/tables.rs b/third_party/rust/unic-langid-impl/src/likelysubtags/tables.rs
new file mode 100644
index 0000000000..599e0187c5
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/likelysubtags/tables.rs
@@ -0,0 +1,2226 @@
+#![allow(clippy::type_complexity)]
+#![allow(clippy::unreadable_literal)]
+
+pub static CLDR_VERSION: &str = "36";
+pub static LANG_ONLY: [(u64, (Option<u64>, Option<u32>, Option<u32>)); 1333] = [
+ (24929, (Some(24929), Some(1853120844), Some(21573))),
+ (24930, (Some(24930), Some(1819441475), Some(21842))),
+ (24931, (Some(24931), Some(1853120844), Some(21317))),
+ (24932, (Some(24932), Some(1853120844), Some(19268))),
+ (24934, (Some(24934), Some(1650553409), Some(21065))),
+ (24935, (Some(24935), Some(1853120844), Some(17737))),
+ (24936, (Some(24936), Some(1853120844), Some(18254))),
+ (24937, (Some(24937), Some(1853120844), Some(3223600))),
+ (24938, (Some(24938), Some(1851879498), Some(20554))),
+ (24939, (Some(24939), Some(1919903047), Some(17735))),
+ (24940, (Some(24940), Some(1853120844), Some(16726))),
+ (24942, (Some(24942), Some(1853120844), Some(21070))),
+ (24944, (Some(24944), Some(1970435399), Some(20041))),
+ (24947, (Some(24947), Some(1635149124), Some(20041))),
+ (24948, (Some(24948), Some(1819107668), Some(20041))),
+ (24951, (Some(24951), Some(1853120844), Some(17730))),
+ (24954, (Some(24954), Some(1853120844), Some(20035))),
+ (25185, (Some(25185), Some(1819441475), Some(17735))),
+ (25196, (Some(25196), Some(1853120844), Some(21836))),
+ (25198, (Some(25198), Some(1853120844), Some(20302))),
+ (25455, (Some(25455), Some(1853120844), Some(21062))),
+ (25459, (Some(25459), Some(1853120844), Some(21577))),
+ (25703, (Some(25703), Some(1853120844), Some(16967))),
+ (25705, (Some(25705), Some(1853120844), Some(17481))),
+ (25710, (Some(25710), Some(1853120844), Some(22362))),
+ (25715, (Some(25715), Some(1650553409), Some(19280))),
+ (25953, (Some(25953), Some(1953723969), Some(21065))),
+ (25954, (Some(25954), Some(1819441475), Some(22850))),
+ (25955, (Some(25955), Some(1819441475), Some(21842))),
+ (25956, (Some(25956), Some(1853120844), Some(17732))),
+ (25957, (Some(25957), Some(1853120844), Some(18503))),
+ (25960, (Some(25960), Some(1919051080), Some(19529))),
+ (25966, (Some(25966), Some(1635149124), Some(20558))),
+ (25971, (Some(25971), Some(1853120844), Some(20302))),
+ (25972, (Some(25972), Some(1970038100), Some(20041))),
+ (25974, (Some(25974), Some(1853120844), Some(16730))),
+ (26209, (Some(26209), Some(1853120844), Some(16730))),
+ (26214, (Some(26214), Some(1853120844), Some(20051))),
+ (26466, (Some(26466), Some(1819441475), Some(18242))),
+ (26473, (Some(26473), Some(1853120844), Some(18254))),
+ (26475, (Some(26475), Some(1853120844), Some(17475))),
+ (26476, (Some(26476), Some(1853120844), Some(18261))),
+ (26477, (Some(26477), Some(1853120844), Some(18253))),
+ (26478, (Some(26478), Some(1853120844), Some(16718))),
+ (26483, (Some(26483), Some(1853120844), Some(17987))),
+ (26484, (Some(26484), Some(1819441475), Some(19028))),
+ (26485, (Some(26485), Some(1650553409), Some(20035))),
+ (26723, (Some(26723), Some(1853120844), Some(21831))),
+ (26733, (Some(26733), Some(1853120844), Some(18509))),
+ (26740, (Some(26740), Some(1767991380), Some(18516))),
+ (26744, (Some(26744), Some(1853120844), Some(16730))),
+ (26746, (Some(26746), Some(1936613704), Some(20035))),
+ (26978, (Some(26978), Some(1853120844), Some(21846))),
+ (26982, (Some(26982), Some(1853120844), Some(18758))),
+ (26984, (Some(26984), Some(1635149124), Some(20041))),
+ (26985, (Some(26985), Some(1768515929), Some(20035))),
+ (26986, (Some(26986), Some(1919051080), Some(16725))),
+ (26987, (Some(26987), Some(1853120844), Some(17739))),
+ (26988, (Some(26988), Some(1853120844), Some(19534))),
+ (26989, (Some(26989), Some(1853120844), Some(23118))),
+ (26995, (Some(26995), Some(1752066387), Some(19276))),
+ (26996, (Some(26996), Some(1768453189), Some(21573))),
+ (26998, (Some(26998), Some(1853120844), Some(20054))),
+ (27001, (Some(27001), Some(1919051080), Some(3223600))),
+ (27238, (Some(27238), Some(1853120844), Some(19014))),
+ (27243, (Some(27243), Some(1853120844), Some(16718))),
+ (27489, (Some(27489), Some(1853120844), Some(18503))),
+ (27497, (Some(27497), Some(1853120844), Some(21333))),
+ (27499, (Some(27499), Some(1819441475), Some(23115))),
+ (27501, (Some(27501), Some(1819441475), Some(19277))),
+ (27507, (Some(27507), Some(1853120844), Some(19283))),
+ (27508, (Some(27508), Some(1853120844), Some(19796))),
+ (27509, (Some(27509), Some(1819441475), Some(16725))),
+ (27749, (Some(27749), Some(1801810503), Some(21063))),
+ (27751, (Some(27751), Some(1853120844), Some(21317))),
+ (27755, (Some(27755), Some(1853120844), Some(19527))),
+ (27757, (Some(27757), Some(1836674125), Some(20041))),
+ (27758, (Some(27758), Some(1853120844), Some(19534))),
+ (27760, (Some(27760), Some(1853120844), Some(19536))),
+ (27763, (Some(27763), Some(1853120844), Some(18771))),
+ (27764, (Some(27764), Some(1853120844), Some(18512))),
+ (28001, (Some(28001), Some(1768453189), Some(21573))),
+ (28002, (Some(28002), Some(1853120844), Some(19533))),
+ (28011, (Some(28011), Some(1919772747), Some(18507))),
+ (28015, (Some(28015), Some(1853120844), Some(21573))),
+ (28018, (Some(28018), Some(1853120844), Some(18499))),
+ (28019, (Some(28019), Some(1853120844), Some(21335))),
+ (28257, (Some(28257), Some(1853120844), Some(21317))),
+ (28258, (Some(28258), Some(1735288130), Some(17474))),
+ (28261, (Some(28261), Some(1853120844), Some(21333))),
+ (28263, (Some(28263), Some(1853120844), Some(22864))),
+ (28265, (Some(28265), Some(1853120844), Some(17481))),
+ (28267, (Some(28267), Some(1633971787), Some(20041))),
+ (28268, (Some(28268), Some(1853120844), Some(17475))),
+ (28269, (Some(28269), Some(1819441475), Some(20045))),
+ (28270, (Some(28270), Some(1853120844), Some(20302))),
+ (28274, (Some(28274), Some(1853120844), Some(18754))),
+ (28275, (Some(28275), Some(1853120844), Some(22362))),
+ (28276, (Some(28276), Some(1853120844), Some(16730))),
+ (28514, (Some(28514), Some(1952606548), Some(20035))),
+ (28515, (Some(28515), Some(1853120844), Some(21062))),
+ (28517, (Some(28517), Some(1853120844), Some(3223600))),
+ (28518, (Some(28518), Some(1853120844), Some(20294))),
+ (28520, (Some(28520), Some(1853120844), Some(18256))),
+ (28521, (Some(28521), Some(1853120844), Some(3223600))),
+ (28523, (Some(28523), Some(1701998411), Some(21067))),
+ (28524, (Some(28524), Some(1869570380), Some(16716))),
+ (28525, (Some(28525), Some(1853120844), Some(20306))),
+ (28526, (Some(28526), Some(1853120844), Some(20302))),
+ (28530, (Some(28530), Some(1853120844), Some(20306))),
+ (28531, (Some(28531), Some(1853120844), Some(20307))),
+ (28532, (Some(28532), Some(1853120844), Some(20308))),
+ (28534, (Some(28534), Some(1853120844), Some(3223600))),
+ (28535, (Some(28535), Some(1853120844), Some(20051))),
+ (28537, (Some(28537), Some(1853120844), Some(18254))),
+ (29043, (Some(29043), Some(1853120844), Some(19521))),
+ (29281, (Some(29281), Some(1650553409), Some(18245))),
+ (29282, (Some(29282), Some(1853120844), Some(21062))),
+ (29283, (Some(29283), Some(1936613699), Some(16707))),
+ (29286, (Some(29286), Some(1853120844), Some(21062))),
+ (29288, (Some(29288), Some(1853120844), Some(21064))),
+ (29291, (Some(29291), Some(1853120844), None)),
+ (29293, (Some(29293), Some(1635149124), Some(20041))),
+ (29294, (Some(29294), Some(1853120844), Some(16730))),
+ (29295, (Some(29295), Some(1635349071), Some(20041))),
+ (29299, (Some(29299), Some(1819441475), Some(21330))),
+ (29300, (Some(29300), Some(1853120844), Some(21076))),
+ (29301, (Some(29301), Some(1650553409), Some(19280))),
+ (29537, (Some(29537), Some(1735288130), Some(20041))),
+ (29538, (Some(29538), Some(1853120844), Some(16706))),
+ (29539, (Some(29539), Some(1853120844), Some(23107))),
+ (29541, (Some(29541), Some(1853120844), Some(21317))),
+ (29545, (Some(29545), Some(1853120844), Some(21321))),
+ (29547, (Some(29547), Some(1650553409), Some(20041))),
+ (29549, (Some(29549), Some(1853120844), Some(22861))),
+ (29551, (Some(29551), Some(1819441475), Some(17735))),
+ (29552, (Some(29552), Some(1650553409), Some(17985))),
+ (29555, (Some(29555), Some(1853120844), Some(16730))),
+ (29556, (Some(29556), Some(1853120844), Some(16730))),
+ (29797, (Some(29797), Some(1853120844), Some(17733))),
+ (29800, (Some(29800), Some(1853120844), Some(21576))),
+ (29801, (Some(29801), Some(1853120844), Some(21577))),
+ (29804, (Some(29804), Some(1853120844), Some(21580))),
+ (29805, (Some(29805), Some(1853120844), Some(21581))),
+ (29808, (Some(29808), Some(1853120844), Some(21058))),
+ (29811, (Some(29811), Some(1853120844), Some(16730))),
+ (29812, (Some(29812), Some(1819441475), Some(21842))),
+ (30051, (Some(30051), Some(1819441475), Some(21842))),
+ (30053, (Some(30053), Some(1853120844), Some(21317))),
+ (30055, (Some(30055), Some(1919579463), Some(20041))),
+ (30056, (Some(30056), Some(1853120844), Some(21832))),
+ (30057, (Some(30057), Some(1936613699), Some(16707))),
+ (30059, (Some(30059), Some(1853120844), Some(21076))),
+ (30060, (Some(30060), Some(1853120844), Some(17475))),
+ (30065, (Some(30065), Some(1853120844), Some(17744))),
+ (30066, (Some(30066), Some(1819441475), Some(21842))),
+ (30067, (Some(30067), Some(1853120844), Some(17481))),
+ (30074, (Some(30074), Some(1853120844), Some(16730))),
+ (30305, (Some(30305), Some(1819441475), Some(21842))),
+ (30307, (Some(30307), Some(1819441475), Some(21842))),
+ (30308, (Some(30308), Some(1633773652), Some(22093))),
+ (30311, (Some(30311), Some(1853120844), Some(19785))),
+ (30314, (Some(30314), Some(1853120844), Some(17481))),
+ (30315, (Some(30315), Some(1819441475), Some(21842))),
+ (30316, (Some(30316), Some(1853120844), Some(22092))),
+ (30318, (Some(30318), Some(1853120844), Some(21333))),
+ (30323, (Some(30323), Some(1853120844), Some(17747))),
+ (30569, (Some(30569), Some(1919051080), Some(19529))),
+ (30570, (Some(30570), Some(1853120844), Some(17481))),
+ (30571, (Some(30571), Some(1853120844), Some(16967))),
+ (30578, (Some(30578), Some(1853120844), Some(22354))),
+ (30579, (Some(30579), Some(1853120844), Some(23124))),
+ (31073, (Some(31073), Some(1853120844), Some(20290))),
+ (31075, (Some(31075), Some(1853120844), Some(16967))),
+ (31078, (Some(31078), Some(1853120844), Some(19534))),
+ (31080, (Some(31080), Some(1852666433), Some(19777))),
+ (31083, (Some(31083), Some(1819441475), Some(18251))),
+ (31085, (Some(31085), Some(1919777101), Some(19789))),
+ (31086, (Some(31086), Some(1853120844), Some(22349))),
+ (31092, (Some(31092), Some(1853120844), Some(18000))),
+ (31329, (Some(31329), Some(1853120844), Some(23105))),
+ (31332, (Some(31332), Some(1952606548), Some(21570))),
+ (31336, (Some(31336), Some(1853120844), Some(16718))),
+ (31349, (Some(31349), Some(1853120844), Some(23125))),
+ (6381926, (Some(6381926), Some(1853120844), None)),
+ (6381927, (Some(6381927), Some(1853120844), Some(18503))),
+ (6381931, (Some(6381931), Some(1819441475), Some(23125))),
+ (6382178, (Some(6382178), Some(1853120844), None)),
+ (6382183, (Some(6382183), Some(1853120844), None)),
+ (6382185, (Some(6382185), Some(1853120844), Some(22861))),
+ (6382195, (Some(6382195), Some(1853120844), None)),
+ (6382201, (Some(6382201), Some(1853120844), None)),
+ (6382441, (Some(6382441), Some(1853120844), None)),
+ (6382446, (Some(6382446), Some(1853120844), None)),
+ (6382689, (Some(6382689), Some(1853120844), Some(18503))),
+ (6382701, (Some(6382701), Some(1853120844), None)),
+ (6382955, (Some(6382955), Some(1853120844), Some(22083))),
+ (6382970, (Some(6382970), Some(1853120844), Some(19534))),
+ (6383203, (Some(6383203), Some(1853120844), None)),
+ (6383213, (Some(6383213), Some(1650553409), Some(18516))),
+ (6383460, (Some(6383460), Some(1853120844), None)),
+ (6383470, (Some(6383470), Some(1853120844), None)),
+ (6383475, (Some(6383475), Some(1835099983), Some(17737))),
+ (6383477, (Some(6383477), Some(1918986069), Some(22867))),
+ (6383713, (Some(6383713), Some(1853120844), None)),
+ (6383723, (Some(6383723), Some(1853120844), Some(20041))),
+ (6383972, (Some(6383972), Some(1853120844), None)),
+ (6383974, (Some(6383974), Some(1650553409), Some(17491))),
+ (6383976, (Some(6383976), Some(1853120844), None)),
+ (6383980, (Some(6383980), Some(1853120844), None)),
+ (6383986, (Some(6383986), Some(1853120844), Some(20041))),
+ (6383994, (Some(6383994), Some(1853120844), None)),
+ (6384227, (Some(6384227), Some(1650553409), Some(18507))),
+ (6384247, (Some(6384247), Some(1853120844), None)),
+ (6384485, (Some(6384485), Some(1853120844), None)),
+ (6384496, (Some(6384496), Some(1751216706), Some(20041))),
+ (6384737, (Some(6384737), Some(1853120844), None)),
+ (6384739, (Some(6384739), Some(1853120844), None)),
+ (6384744, (Some(6384744), Some(1853120844), None)),
+ (6384752, (Some(6384752), Some(1853120844), None)),
+ (6384760, (Some(6384760), Some(1853120844), None)),
+ (6384997, (Some(6384997), Some(1853120844), None)),
+ (6385011, (Some(6385011), Some(1853120844), Some(17747))),
+ (6385261, (Some(6385261), Some(1853120844), None)),
+ (6385266, (Some(6385266), Some(1853120844), None)),
+ (6385272, (Some(6385272), Some(1651663182), Some(16723))),
+ (6385517, (Some(6385517), Some(1853120844), None)),
+ (6385776, (Some(6385776), Some(1635149124), Some(20041))),
+ (6386274, (Some(6386274), Some(1635149124), Some(20041))),
+ (6386282, (Some(6386282), Some(1853120844), None)),
+ (6386288, (Some(6386288), Some(1918986315), Some(19280))),
+ (6386529, (Some(6386529), Some(1853120844), Some(23124))),
+ (6386543, (Some(6386543), Some(1701278543), Some(21333))),
+ (6386549, (Some(6386549), Some(1853120844), None)),
+ (6386552, (Some(6386552), Some(1651663187), Some(17753))),
+ (6386785, (Some(6386785), Some(1853120844), None)),
+ (6386799, (Some(6386799), Some(1650553409), None)),
+ (6387042, (Some(6387042), Some(1819441475), Some(21842))),
+ (6387044, (Some(6387044), Some(1853120844), Some(19779))),
+ (6387052, (Some(6387052), Some(1853120844), Some(17475))),
+ (6387053, (Some(6387053), Some(1853120844), Some(19779))),
+ (6387059, (Some(6387059), Some(1853120844), None)),
+ (6387065, (Some(6387065), Some(1853120844), Some(22605))),
+ (6387300, (Some(6387300), Some(1853120844), None)),
+ (6387309, (Some(6387309), Some(1853120844), None)),
+ (6387553, (Some(6387553), Some(1635149124), Some(20041))),
+ (6387568, (Some(6387568), Some(1853120844), None)),
+ (6387575, (Some(6387575), Some(1853120844), None)),
+ (6387819, (Some(6387819), Some(1853120844), None)),
+ (6388084, (Some(6388084), Some(1853120844), None)),
+ (6388322, (Some(6388322), Some(1853120844), None)),
+ (6388346, (Some(6388346), Some(1853120844), Some(21076))),
+ (6447462, (Some(6447462), Some(1853120844), None)),
+ (6447466, (Some(6447466), Some(1853120844), None)),
+ (6447467, (Some(6447467), Some(1853120844), Some(23108))),
+ (6447468, (Some(6447468), Some(1634625868), Some(21063))),
+ (6447714, (Some(6447714), Some(1853120844), None)),
+ (6447720, (Some(6447720), Some(1853120844), None)),
+ (6447721, (Some(6447721), Some(1853120844), Some(18254))),
+ (6447737, (Some(6447737), Some(1853120844), Some(19779))),
+ (6448236, (Some(6448236), Some(1853120844), None)),
+ (6448481, (Some(6448481), Some(1650553409), Some(20052))),
+ (6448483, (Some(6448483), Some(1853120844), Some(18512))),
+ (6448487, (Some(6448487), Some(1853120844), None)),
+ (6448494, (Some(6448494), Some(1853120844), None)),
+ (6449001, (Some(6449001), Some(1853120844), None)),
+ (6449006, (Some(6449006), Some(1853120844), None)),
+ (6449250, (Some(6449250), Some(1635149124), Some(20041))),
+ (6449259, (Some(6449259), Some(1970037076), Some(20035))),
+ (6449262, (Some(6449262), Some(1853120844), None)),
+ (6449506, (Some(6449506), Some(1853120844), None)),
+ (6449514, (Some(6449514), Some(1853120844), None)),
+ (6449527, (Some(6449527), Some(1853120844), None)),
+ (6450019, (Some(6450019), Some(1650553409), Some(20809))),
+ (6450539, (Some(6450539), Some(1853120844), Some(20289))),
+ (6450549, (Some(6450549), Some(1853120844), Some(20289))),
+ (6451044, (Some(6451044), Some(1853120844), None)),
+ (6451058, (Some(6451058), Some(1853120844), Some(17481))),
+ (6451063, (Some(6451063), Some(1853120844), None)),
+ (6451563, (Some(6451563), Some(1853120844), None)),
+ (6451815, (Some(6451815), Some(1853120844), None)),
+ (6451822, (Some(6451822), Some(1853120844), None)),
+ (6451827, (Some(6451827), Some(1634889555), Some(20041))),
+ (6451832, (Some(6451832), Some(1853120844), None)),
+ (6451833, (Some(6451833), Some(1853120844), None)),
+ (6452067, (Some(6452067), Some(1853120844), Some(19536))),
+ (6452068, (Some(6452068), Some(1853120844), Some(17732))),
+ (6452072, (Some(6452072), Some(1853120844), Some(17732))),
+ (6452075, (Some(6452075), Some(1853120844), Some(23124))),
+ (6452331, (Some(6452331), Some(1768453189), None)),
+ (6452582, (Some(6452582), Some(1650553409), Some(19779))),
+ (6452583, (Some(6452583), Some(1853120844), Some(21058))),
+ (6452587, (Some(6452587), Some(1853120844), None)),
+ (6452834, (Some(6452834), Some(1853120844), Some(20807))),
+ (6453089, (Some(6453089), Some(1853120844), None)),
+ (6453102, (Some(6453102), Some(1853120844), None)),
+ (6453107, (Some(6453107), Some(1650553409), Some(21593))),
+ (6453601, (Some(6453601), Some(1853120844), None)),
+ (6513003, (Some(6513003), Some(1853120844), Some(19789))),
+ (6513006, (Some(6513006), Some(1853120844), None)),
+ (6513250, (Some(6513250), Some(1853120844), Some(17481))),
+ (6513268, (Some(6513268), Some(1853120844), None)),
+ (6513508, (Some(6513508), Some(1650553409), Some(20041))),
+ (6513774, (Some(6513774), Some(1853120844), Some(23117))),
+ (6513776, (Some(6513776), Some(1853120844), Some(21333))),
+ (6513779, (Some(6513779), Some(1853120844), Some(21577))),
+ (6514038, (Some(6514038), Some(1853120844), Some(21577))),
+ (6514529, (Some(6514529), Some(1853120844), None)),
+ (6514530, (Some(6514530), Some(1635149124), Some(20041))),
+ (6514543, (Some(6514543), Some(1853120844), None)),
+ (6514548, (Some(6514548), Some(1853120844), None)),
+ (6515043, (Some(6515043), Some(1853120844), Some(21333))),
+ (6515062, (Some(6515062), Some(1853120844), Some(22611))),
+ (6515554, (Some(6515554), Some(1853120844), None)),
+ (6515563, (Some(6515563), Some(1853120844), None)),
+ (6515571, (Some(6515571), Some(1853120844), None)),
+ (6515832, (Some(6515832), Some(1768126796), Some(21076))),
+ (6516074, (Some(6516074), Some(1853120844), Some(23124))),
+ (6516321, (Some(6516321), Some(1853120844), None)),
+ (6516339, (Some(6516339), Some(1853120844), None)),
+ (6516343, (Some(6516343), Some(1853120844), None)),
+ (6516584, (Some(6516584), Some(1635149124), Some(20041))),
+ (6516833, (Some(6516833), Some(1650553409), None)),
+ (6517090, (Some(6517090), Some(1853120844), None)),
+ (6517345, (Some(6517345), Some(1768780353), Some(21065))),
+ (6517350, (Some(6517350), Some(1853120844), Some(21333))),
+ (6517351, (Some(6517351), Some(1953656899), Some(22851))),
+ (6517355, (Some(6517355), Some(1819441475), Some(21842))),
+ (6517356, (Some(6517356), Some(1650553409), Some(21065))),
+ (6517869, (Some(6517869), Some(1853120844), None)),
+ (6518114, (Some(6518114), Some(1853120844), Some(21593))),
+ (6518116, (Some(6518116), Some(1853120844), None)),
+ (6518119, (Some(6518119), Some(1853120844), Some(20291))),
+ (6518129, (Some(6518129), Some(1853120844), Some(21575))),
+ (6518631, (Some(6518631), Some(1650553409), None)),
+ (6518643, (Some(6518643), Some(1853120844), Some(17475))),
+ (6518891, (Some(6518891), Some(1768453189), None)),
+ (6518893, (Some(6518893), Some(1853120844), Some(22362))),
+ (6578532, (Some(6578532), Some(1853120844), None)),
+ (6578539, (Some(6578539), Some(1853120844), None)),
+ (6578540, (Some(6578540), Some(1919051080), Some(19529))),
+ (6578541, (Some(6578541), Some(1853120844), Some(17481))),
+ (6578786, (Some(6578786), Some(1853120844), None)),
+ (6578788, (Some(6578788), Some(1853120844), None)),
+ (6578795, (Some(6578795), Some(1819441475), Some(21842))),
+ (6578804, (Some(6578804), Some(1853120844), None)),
+ (6579041, (Some(6579041), Some(1853120844), None)),
+ (6579056, (Some(6579056), Some(1853120844), Some(21062))),
+ (6579298, (Some(6579298), Some(1853120844), None)),
+ (6579305, (Some(6579305), Some(1853120844), None)),
+ (6579316, (Some(6579316), Some(1701601620), Some(20035))),
+ (6579556, (Some(6579556), Some(1853120844), None)),
+ (6579564, (Some(6579564), Some(1853120844), None)),
+ (6579565, (Some(6579565), Some(1853120844), None)),
+ (6579568, (Some(6579568), Some(1853120844), None)),
+ (6579572, (Some(6579572), Some(1853120844), None)),
+ (6579810, (Some(6579810), Some(1853120844), Some(19779))),
+ (6580065, (Some(6580065), Some(1853120844), None)),
+ (6580588, (Some(6580588), Some(1853120844), None)),
+ (6580595, (Some(6580595), Some(1853120844), Some(21573))),
+ (6580843, (Some(6580843), Some(1853120844), None)),
+ (6581363, (Some(6581363), Some(1853120844), None)),
+ (6581368, (Some(6581368), Some(1768192332), Some(21076))),
+ (6581608, (Some(6581608), Some(1685220432), Some(20035))),
+ (6581863, (Some(6581863), Some(1853120844), None)),
+ (6581864, (Some(6581864), Some(1650553409), Some(19280))),
+ (6581877, (Some(28261), Some(1853120844), Some(21333))),
+ (6582118, (Some(6582118), Some(1853120844), None)),
+ (6582119, (Some(6582119), Some(1853120844), None)),
+ (6582126, (Some(6582126), Some(1634623820), Some(18516))),
+ (6582369, (Some(6582369), Some(1650553409), Some(18260))),
+ (6582387, (Some(6582387), Some(1853120844), None)),
+ (6582893, (Some(6582893), Some(1635149124), Some(20558))),
+ (6582896, (Some(6582896), Some(1650553409), Some(21065))),
+ (6583147, (Some(6583147), Some(1853120844), None)),
+ (6583155, (Some(6583155), Some(1853120844), None)),
+ (6583156, (Some(6583156), Some(1801810503), Some(21063))),
+ (6583395, (Some(6583395), Some(1668637008), Some(19789))),
+ (6583412, (Some(6583412), Some(1853120844), None)),
+ (6583650, (Some(6583650), Some(1853120844), None)),
+ (6583652, (Some(6583652), Some(1853120844), None)),
+ (6583654, (Some(6583654), Some(1853120844), Some(18007))),
+ (6583655, (Some(6583655), Some(1853120844), None)),
+ (6583659, (Some(6583659), Some(1853120844), None)),
+ (6583924, (Some(6583924), Some(1853120844), None)),
+ (6584162, (Some(6584162), Some(1853120844), None)),
+ (6644087, (Some(6644087), Some(1853120844), Some(18499))),
+ (6644332, (Some(6644332), Some(1819441475), Some(21842))),
+ (6644339, (Some(6644339), Some(1853120844), None)),
+ (6644577, (Some(6644577), Some(1853120844), Some(17481))),
+ (6644590, (Some(6644590), Some(1853120844), None)),
+ (6644833, (Some(6644833), Some(1853120844), None)),
+ (6644839, (Some(6644839), Some(1853120844), None)),
+ (6644843, (Some(6644843), Some(1853120844), Some(23124))),
+ (6644845, (Some(6644845), Some(1650553409), None)),
+ (6645100, (Some(6645100), Some(1853120844), None)),
+ (6645101, (Some(6645101), Some(1853120844), None)),
+ (6645353, (Some(6645353), Some(1853120844), Some(18260))),
+ (6645357, (Some(6645357), Some(1853120844), Some(21837))),
+ (6645609, (Some(6645609), Some(1853120844), None)),
+ (6645611, (Some(6645611), Some(1853120844), Some(17481))),
+ (6645870, (Some(6645870), Some(1853120844), Some(22605))),
+ (6646372, (Some(6646372), Some(1853120844), Some(17742))),
+ (6646892, (Some(6646892), Some(1853120844), None)),
+ (6646893, (Some(6646893), Some(1853120844), None)),
+ (6646905, (Some(6646905), Some(1853120844), None)),
+ (6647139, (Some(6647139), Some(1853120844), None)),
+ (6647400, (Some(6647400), Some(1635149124), Some(20041))),
+ (6647418, (Some(6647418), Some(1853120844), None)),
+ (6647661, (Some(6647661), Some(1853120844), Some(16707))),
+ (6647662, (Some(6647662), Some(1635149124), Some(20041))),
+ (6647905, (Some(6647905), Some(1853120844), None)),
+ (6647910, (Some(6647910), Some(1853120844), None)),
+ (6647915, (Some(6647915), Some(1853120844), Some(21068))),
+ (6648441, (Some(6648441), Some(1853120844), None)),
+ (6648673, (Some(6648673), Some(2003724115), Some(21333))),
+ (6648948, (Some(6648948), Some(1853120844), None)),
+ (6649190, (Some(6649190), Some(1853120844), None)),
+ (6649195, (Some(6649195), Some(1853120844), None)),
+ (6649202, (Some(6649202), Some(1819441475), Some(16725))),
+ (6649203, (Some(6649203), Some(1853120844), None)),
+ (6649209, (Some(6649209), Some(1953390920), Some(19272))),
+ (6649720, (Some(6649720), Some(1853120844), None)),
+ (6649963, (Some(6649963), Some(1853120844), None)),
+ (6650210, (Some(6650210), Some(1853120844), None)),
+ (6650219, (Some(6650219), Some(1853120844), None)),
+ (6650466, (Some(6650466), Some(1853120844), Some(19533))),
+ (6709604, (Some(6709604), Some(1853120844), None)),
+ (6709607, (Some(6709607), Some(1853120844), None)),
+ (6709613, (Some(6709613), Some(1853120844), Some(19779))),
+ (6709614, (Some(6709614), Some(1853120844), None)),
+ (6709619, (Some(6709619), Some(1853120844), Some(18503))),
+ (6709863, (Some(6709863), Some(1853120844), None)),
+ (6709876, (Some(6709876), Some(1853120844), None)),
+ (6710114, (Some(6710114), Some(1853120844), None)),
+ (6710126, (Some(6710126), Some(1853120844), None)),
+ (6710130, (Some(6710130), Some(1853120844), Some(17746))),
+ (6710381, (Some(6710381), Some(1819441475), Some(21842))),
+ (6710626, (Some(6710626), Some(1853120844), None)),
+ (6710643, (Some(6710643), Some(1853120844), Some(18755))),
+ (6711147, (Some(6711147), Some(1853120844), None)),
+ (6711656, (Some(6711656), Some(1853120844), Some(19014))),
+ (6711660, (Some(6711660), Some(1635149124), Some(20558))),
+ (6711661, (Some(6711661), Some(1853120844), None)),
+ (6711662, (Some(6711662), Some(1853120844), None)),
+ (6711666, (Some(6711666), Some(1735288404), Some(16717))),
+ (6711668, (Some(6711668), Some(1853120844), None)),
+ (6712436, (Some(6712436), Some(1853120844), None)),
+ (6712690, (Some(6712690), Some(1853120844), Some(18758))),
+ (6712694, (Some(6712694), Some(1853120844), Some(17732))),
+ (6712696, (Some(6712696), Some(1919903047), Some(17735))),
+ (6712939, (Some(6712939), Some(1853120844), Some(22343))),
+ (6712941, (Some(6712941), Some(1853120844), None)),
+ (6712942, (Some(6712942), Some(1853120844), None)),
+ (6713191, (Some(6713191), Some(1768453189), None)),
+ (6713202, (Some(6713202), Some(1853120844), Some(23124))),
+ (6713204, (Some(6713204), Some(1853120844), None)),
+ (6713451, (Some(6713451), Some(1853120844), None)),
+ (6713707, (Some(6713707), Some(1853120844), None)),
+ (6714219, (Some(6714219), Some(1853120844), Some(19779))),
+ (6714228, (Some(6714228), Some(1635149124), Some(20558))),
+ (6714477, (Some(6714477), Some(1853120844), None)),
+ (6714726, (Some(6714726), Some(1853120844), Some(20039))),
+ (6714983, (Some(6714983), Some(1853120844), None)),
+ (6716002, (Some(6716002), Some(1853120844), None)),
+ (6775140, (Some(6775140), Some(1853120844), None)),
+ (6775142, (Some(6775142), Some(1853120844), None)),
+ (6775143, (Some(6775143), Some(1853120844), Some(17485))),
+ (6775144, (Some(6775144), Some(1853120844), None)),
+ (6775148, (Some(6775148), Some(1853120844), Some(23124))),
+ (6775149, (Some(6775149), Some(1635149124), Some(20041))),
+ (6775152, (Some(6775152), Some(1853120844), Some(18512))),
+ (6775158, (Some(6775158), Some(1853120844), None)),
+ (6775162, (Some(6775162), Some(1853120844), Some(17491))),
+ (6775412, (Some(6775412), Some(1853120844), None)),
+ (6775659, (Some(6775659), Some(1853120844), Some(18254))),
+ (6775924, (Some(6775924), Some(1635149124), Some(20558))),
+ (6776673, (Some(6776673), Some(1853120844), None)),
+ (6776675, (Some(6776675), Some(1853120844), Some(18261))),
+ (6776684, (Some(6776684), Some(1853120844), None)),
+ (6776930, (Some(6776930), Some(1853120844), None)),
+ (6776946, (Some(6776946), Some(1650553409), Some(19789))),
+ (6776951, (Some(6776951), Some(1853120844), None)),
+ (6777186, (Some(6777186), Some(1853120844), None)),
+ (6777192, (Some(6777192), Some(1853120844), None)),
+ (6777196, (Some(6777196), Some(1853120844), None)),
+ (6777203, (Some(6777203), Some(1853120844), None)),
+ (6777204, (Some(6777204), Some(1768453189), Some(21061))),
+ (6777441, (Some(6777441), Some(1853120844), None)),
+ (6777451, (Some(6777451), Some(1869570380), Some(16716))),
+ (6777710, (Some(6777710), Some(1853120844), None)),
+ (6777977, (Some(6777977), Some(1853120844), None)),
+ (6778211, (Some(6778211), Some(1870229331), Some(20045))),
+ (6778222, (Some(6778222), Some(1853120844), Some(19779))),
+ (6778466, (Some(6778466), Some(1853120844), None)),
+ (6778471, (Some(6778471), Some(1853120844), None)),
+ (6778479, (Some(6778479), Some(1853120844), None)),
+ (6778480, (Some(6778480), Some(1853120844), None)),
+ (6778482, (Some(6778482), Some(1853120844), Some(23117))),
+ (6778739, (Some(6778739), Some(1684500307), Some(23125))),
+ (6778740, (Some(6778740), Some(1853120844), Some(22349))),
+ (6778744, (Some(6778744), Some(1853120844), Some(18261))),
+ (6779504, (Some(6779504), Some(1853120844), Some(3223600))),
+ (6779745, (Some(6779745), Some(1853120844), None)),
+ (6779749, (Some(6779749), Some(1835953991), Some(20041))),
+ (6779763, (Some(6779763), Some(1853120844), None)),
+ (6779764, (Some(6779764), Some(1853120844), Some(18512))),
+ (6779767, (Some(6779767), Some(1735290695), Some(20041))),
+ (6780001, (Some(6780001), Some(1853120844), None)),
+ (6780012, (Some(6780012), Some(1853120844), Some(22092))),
+ (6780258, (Some(6780258), Some(1853120844), Some(17481))),
+ (6780260, (Some(6780260), Some(1853120844), None)),
+ (6780273, (Some(6780273), Some(1853120844), Some(17221))),
+ (6780274, (Some(6780274), Some(1853120844), Some(16979))),
+ (6780523, (Some(6780523), Some(1853120844), None)),
+ (6780787, (Some(6780787), Some(1853120844), Some(17732))),
+ (6781044, (Some(6781044), Some(1735287124), Some(20035))),
+ (6781540, (Some(6781540), Some(1853120844), None)),
+ (6840676, (Some(6840676), Some(1853120844), None)),
+ (6840679, (Some(6840679), Some(1853120844), None)),
+ (6840684, (Some(6840684), Some(1650553409), Some(19280))),
+ (6840691, (Some(6840691), Some(1819441475), Some(21842))),
+ (6840941, (Some(6840941), Some(1853120844), None)),
+ (6841185, (Some(6841185), Some(1853120844), Some(18261))),
+ (6841186, (Some(6841186), Some(1853120844), None)),
+ (6841187, (Some(6841187), Some(1853120844), Some(18254))),
+ (6841193, (Some(6841193), Some(1853120844), None)),
+ (6841198, (Some(6841198), Some(1853120844), Some(22605))),
+ (6841451, (Some(6841451), Some(1650553409), Some(18260))),
+ (6841453, (Some(6841453), Some(1853120844), Some(18512))),
+ (6841459, (Some(6841459), Some(1650553409), Some(21065))),
+ (6841460, (Some(6841460), Some(1635149124), Some(20558))),
+ (6841698, (Some(6841698), Some(1853120844), None)),
+ (6841715, (Some(6841715), Some(1853120844), Some(23117))),
+ (6842212, (Some(6842212), Some(1853120844), None)),
+ (6842221, (Some(6842221), Some(1853120844), Some(23117))),
+ (6842234, (Some(6842234), Some(1735288404), Some(16717))),
+ (6842728, (Some(6842728), Some(1853120844), None)),
+ (6842732, (Some(6842732), Some(1853120844), None)),
+ (6842978, (Some(6842978), Some(1853120844), None)),
+ (6843746, (Some(6843746), Some(1853120844), None)),
+ (6843755, (Some(6843755), Some(1853120844), None)),
+ (6843764, (Some(6843764), Some(1853120844), Some(17742))),
+ (6844009, (Some(6844009), Some(1819441475), Some(21842))),
+ (6844014, (Some(6844014), Some(1853120844), Some(19779))),
+ (6844020, (Some(6844020), Some(1853120844), None)),
+ (6844269, (Some(6844269), Some(1853120844), Some(16707))),
+ (6845025, (Some(6845025), Some(1853120844), None)),
+ (6845026, (Some(6845026), Some(1650553409), Some(19280))),
+ (6845027, (Some(6845027), Some(1819441475), Some(16725))),
+ (6845028, (Some(6845028), Some(1735290701), Some(20035))),
+ (6845291, (Some(6845291), Some(1853120844), Some(17732))),
+ (6845798, (Some(6845798), Some(1853120844), None)),
+ (6845812, (Some(6845812), Some(1853120844), None)),
+ (6846069, (Some(6846069), Some(1853120844), None)),
+ (6846324, (Some(6846324), Some(1853120844), None)),
+ (6846562, (Some(6846562), Some(1853120844), None)),
+ (6847074, (Some(6847074), Some(1853120844), None)),
+ (6847081, (Some(6847081), Some(1853120844), Some(21842))),
+ (6847084, (Some(6847084), Some(1936613704), Some(20035))),
+ (6906209, (Some(6906209), Some(1853120844), None)),
+ (6906214, (Some(6906214), Some(1853120844), None)),
+ (6906219, (Some(6906219), Some(1853120844), None)),
+ (6906221, (Some(6906221), Some(1635149124), Some(20041))),
+ (6906226, (Some(6906226), Some(1853120844), None)),
+ (6906230, (Some(6906230), Some(1768513878), Some(21068))),
+ (6906465, (Some(6906465), Some(1853120844), None)),
+ (6906480, (Some(6906480), Some(1853120844), None)),
+ (6906488, (Some(6906488), Some(1853120844), None)),
+ (6906722, (Some(6906722), Some(1853120844), Some(18755))),
+ (6906733, (Some(6906733), Some(1853120844), None)),
+ (6906740, (Some(6906740), Some(1853120844), None)),
+ (6906743, (Some(6906743), Some(1853120844), None)),
+ (6906985, (Some(6906985), Some(1853120844), None)),
+ (6907251, (Some(6907251), Some(1853120844), Some(22605))),
+ (6907493, (Some(6907493), Some(1853120844), Some(18254))),
+ (6907494, (Some(6907494), Some(1853120844), None)),
+ (6907508, (Some(6907508), Some(1853120844), None)),
+ (6907748, (Some(6907748), Some(1853120844), None)),
+ (6907767, (Some(6907767), Some(1853120844), None)),
+ (6908002, (Some(6908002), Some(1635149124), Some(20041))),
+ (6908013, (Some(6908013), Some(1853120844), None)),
+ (6908019, (Some(6908019), Some(1735288404), Some(16717))),
+ (6908270, (Some(6908270), Some(1853120844), None)),
+ (6908514, (Some(6908514), Some(1768453189), None)),
+ (6908535, (Some(6908535), Some(1853120844), None)),
+ (6908780, (Some(6908780), Some(1650553409), Some(21065))),
+ (6908781, (Some(6908781), Some(1650553409), None)),
+ (6909025, (Some(6909025), Some(1853120844), None)),
+ (6909043, (Some(6909043), Some(1853120844), Some(19536))),
+ (6909045, (Some(6909045), Some(1853120844), Some(19782))),
+ (6909285, (Some(6909285), Some(1853120844), None)),
+ (6909306, (Some(6909306), Some(1853120844), Some(22861))),
+ (6909549, (Some(6909549), Some(1735288130), Some(20041))),
+ (6909559, (Some(6909559), Some(1650553409), Some(19787))),
+ (6909796, (Some(6909796), Some(1650553409), Some(20041))),
+ (6909799, (Some(6909799), Some(1853120844), None)),
+ (6909803, (Some(6909803), Some(1819441475), Some(21842))),
+ (6910068, (Some(6910068), Some(1853120844), Some(18256))),
+ (6910306, (Some(6910306), Some(1650553409), Some(21065))),
+ (6910564, (Some(6910564), Some(1853120844), None)),
+ (6910565, (Some(6910565), Some(1853120844), None)),
+ (6910569, (Some(6910569), Some(1853120844), None)),
+ (6910571, (Some(6910571), Some(1853120844), Some(19539))),
+ (6910581, (Some(6910581), Some(1853120844), None)),
+ (6910840, (Some(6910840), Some(1853120844), None)),
+ (6911085, (Some(6911085), Some(1853120844), None)),
+ (6911336, (Some(6911336), Some(1853120844), None)),
+ (6911342, (Some(6911342), Some(1853120844), None)),
+ (6911847, (Some(6911847), Some(1853120844), Some(16707))),
+ (6912359, (Some(6912359), Some(1853120844), None)),
+ (6912617, (Some(6912617), Some(1853120844), None)),
+ (6912622, (Some(6912622), Some(1853120844), Some(18503))),
+ (6971751, (Some(6971751), Some(1853120844), None)),
+ (6971755, (Some(6971755), Some(1853120844), Some(18254))),
+ (6971756, (Some(6971756), Some(1853120844), Some(18261))),
+ (6971762, (Some(6971762), Some(1635149124), Some(20041))),
+ (6971764, (Some(6971764), Some(1635149124), Some(20558))),
+ (6971767, (Some(6971767), Some(1853120844), None)),
+ (6972002, (Some(6972002), Some(1853120844), Some(19779))),
+ (6972003, (Some(6972003), Some(1853120844), None)),
+ (6972513, (Some(6972513), Some(1853120844), None)),
+ (6972525, (Some(6972525), Some(1853120844), None)),
+ (6972538, (Some(6972538), Some(1650553409), Some(19787))),
+ (6972770, (Some(6972770), Some(1650553409), Some(17491))),
+ (6972775, (Some(6972775), Some(1853120844), None)),
+ (6972786, (Some(6972786), Some(1853120844), Some(17481))),
+ (6973803, (Some(6973803), Some(1853120844), None)),
+ (6973804, (Some(6973804), Some(1853120844), Some(21577))),
+ (6973806, (Some(6973806), Some(1853120844), Some(17481))),
+ (6974050, (Some(6974050), Some(1635149124), Some(20041))),
+ (6974057, (Some(6974057), Some(1853120844), None)),
+ (6974315, (Some(6974315), Some(1853120844), Some(19779))),
+ (6974835, (Some(6974835), Some(1853120844), Some(17747))),
+ (6975076, (Some(6975076), Some(1853120844), Some(18755))),
+ (6975080, (Some(6975080), Some(1735290184), Some(16716))),
+ (6975329, (Some(6975329), Some(1853120844), None)),
+ (6975330, (Some(6975330), Some(1853120844), None)),
+ (6975336, (Some(6975336), Some(1635149124), Some(20041))),
+ (6975340, (Some(6975340), Some(1853120844), None)),
+ (6976099, (Some(6976099), Some(1936613699), Some(16707))),
+ (6976107, (Some(6976107), Some(1853120844), Some(18512))),
+ (6976109, (Some(6976109), Some(1819441475), Some(21842))),
+ (6976354, (Some(6976354), Some(1853120844), None)),
+ (6976363, (Some(6976363), Some(1853120844), None)),
+ (6976372, (Some(6976372), Some(1952606548), Some(21570))),
+ (6976609, (Some(6976609), Some(1853120844), Some(16707))),
+ (6976628, (Some(6976628), Some(1853120844), Some(18261))),
+ (6976875, (Some(6976875), Some(1853120844), None)),
+ (6976889, (Some(6976889), Some(1853120844), None)),
+ (6977387, (Some(6977387), Some(1853120844), None)),
+ (6978155, (Some(6978155), Some(1853120844), Some(22861))),
+ (7037281, (Some(7037281), Some(1853120844), None)),
+ (7037284, (Some(7037284), Some(1853120844), Some(21333))),
+ (7037288, (Some(7037288), Some(1936613704), Some(20035))),
+ (7037293, (Some(7037293), Some(1853120844), Some(17481))),
+ (7037294, (Some(7037294), Some(1853120844), None)),
+ (7037803, (Some(7037803), Some(1853120844), Some(22362))),
+ (7037811, (Some(7037811), Some(1635149124), Some(20041))),
+ (7038317, (Some(7038317), Some(1853120844), None)),
+ (7038567, (Some(7038567), Some(1853120844), None)),
+ (7038826, (Some(7038826), Some(1853120844), None)),
+ (7039075, (Some(7039075), Some(1853120844), Some(19782))),
+ (7039091, (Some(7039091), Some(1853120844), None)),
+ (7039330, (Some(7039330), Some(1853120844), Some(18512))),
+ (7039348, (Some(7039348), Some(1853120844), None)),
+ (7039591, (Some(7039591), Some(1650553409), Some(19280))),
+ (7039841, (Some(7039841), Some(2020963160), Some(20809))),
+ (7039849, (Some(7039849), Some(1853120844), None)),
+ (7040103, (Some(7040103), Some(1650553409), Some(21065))),
+ (7040354, (Some(7040354), Some(1853120844), None)),
+ (7040609, (Some(7040609), Some(1853120844), None)),
+ (7040622, (Some(7040622), Some(1853120844), None)),
+ (7040627, (Some(7040627), Some(1853120844), Some(19533))),
+ (7040875, (Some(7040875), Some(1635149124), Some(20041))),
+ (7040876, (Some(7040876), Some(1853120844), None)),
+ (7040883, (Some(7040883), Some(1853120844), None)),
+ (7040885, (Some(7040885), Some(1853120844), None)),
+ (7041635, (Some(7041635), Some(1936613699), Some(16707))),
+ (7041902, (Some(7041902), Some(1936613699), Some(16707))),
+ (7041911, (Some(7041911), Some(1853120844), None)),
+ (7042159, (Some(7042159), Some(1751872079), Some(20045))),
+ (7042163, (Some(7042163), Some(1853120844), None)),
+ (7042402, (Some(7042402), Some(1853120844), None)),
+ (7042419, (Some(7042419), Some(1853120844), Some(23124))),
+ (7042925, (Some(7042925), Some(1853120844), Some(19533))),
+ (7042930, (Some(7042930), Some(1853120844), Some(23124))),
+ (7043437, (Some(7043437), Some(1853120844), None)),
+ (7043693, (Some(7043693), Some(1853120844), None)),
+ (7102818, (Some(7102818), Some(1650553409), Some(19280))),
+ (7102832, (Some(7102832), Some(1768712272), Some(21065))),
+ (7102836, (Some(7102836), Some(1853120844), None)),
+ (7102839, (Some(7102839), Some(1768453189), Some(21573))),
+ (7103339, (Some(7103339), Some(1853120844), None)),
+ (7103347, (Some(7103347), Some(1650553409), None)),
+ (7103595, (Some(7103595), Some(1853120844), None)),
+ (7103847, (Some(7103847), Some(1853120844), None)),
+ (7103858, (Some(7103858), Some(1853120844), None)),
+ (7104112, (Some(7104112), Some(1853120844), Some(17732))),
+ (7104356, (Some(7104356), Some(1650553409), None)),
+ (7104357, (Some(7104357), Some(1853120844), Some(21577))),
+ (7104365, (Some(7104365), Some(1853120844), None)),
+ (7104366, (Some(7104366), Some(1853120844), Some(23117))),
+ (7104609, (Some(7104609), Some(1853120844), None)),
+ (7104610, (Some(7104610), Some(1853120844), None)),
+ (7104621, (Some(7104621), Some(1853120844), None)),
+ (7104624, (Some(7104624), Some(1650553409), None)),
+ (7104628, (Some(7104628), Some(1635149124), Some(20558))),
+ (7104870, (Some(7104870), Some(1853120844), Some(18512))),
+ (7104871, (Some(7104871), Some(1853120844), Some(18763))),
+ (7104872, (Some(7104872), Some(1853120844), Some(18512))),
+ (7104880, (Some(7104880), Some(1853120844), None)),
+ (7104883, (Some(7104883), Some(1853120844), None)),
+ (7105379, (Some(7105379), Some(1853120844), None)),
+ (7105389, (Some(7105389), Some(1853120844), None)),
+ (7105396, (Some(7105396), Some(1853120844), Some(19284))),
+ (7105651, (Some(7105651), Some(1853120844), None)),
+ (7105657, (Some(7105657), Some(1853120844), None)),
+ (7105898, (Some(7105898), Some(1635149124), Some(20558))),
+ (7105913, (Some(7105913), Some(1853120844), None)),
+ (7106411, (Some(7106411), Some(1853120844), None)),
+ (7106412, (Some(7106412), Some(1853120844), Some(17475))),
+ (7106675, (Some(7106675), Some(1853120844), None)),
+ (7106925, (Some(7106925), Some(1853120844), None)),
+ (7107171, (Some(7107171), Some(1936613699), Some(16707))),
+ (7107179, (Some(7107179), Some(1853120844), Some(21842))),
+ (7107193, (Some(7107193), Some(1853120844), Some(21058))),
+ (7107956, (Some(7107956), Some(1853120844), None)),
+ (7108193, (Some(7108193), Some(1650553409), None)),
+ (7108212, (Some(7108212), Some(1853120844), Some(22100))),
+ (7108213, (Some(7108213), Some(1853120844), None)),
+ (7108460, (Some(7108460), Some(1767991380), Some(18516))),
+ (7108979, (Some(7108979), Some(1735288130), Some(17474))),
+ (7109235, (Some(7109235), Some(1853120844), Some(19536))),
+ (7168359, (Some(7168359), Some(1853120844), None)),
+ (7168360, (Some(7168360), Some(1853120844), None)),
+ (7168362, (Some(7168362), Some(1853120844), Some(19786))),
+ (7168363, (Some(7168363), Some(1853120844), Some(17739))),
+ (7168368, (Some(7168368), Some(1853120844), Some(18512))),
+ (7168377, (Some(7168377), Some(1853120844), None)),
+ (7168615, (Some(7168615), Some(1635149124), Some(20041))),
+ (7168619, (Some(7168619), Some(1853120844), None)),
+ (7168866, (Some(7168866), Some(1853120844), None)),
+ (7168876, (Some(7168876), Some(1853120844), None)),
+ (7168880, (Some(7168880), Some(1853120844), Some(18254))),
+ (7169141, (Some(7169141), Some(1819441475), Some(21842))),
+ (7169378, (Some(7169378), Some(1853120844), Some(19802))),
+ (7169388, (Some(7169388), Some(1853120844), None)),
+ (7169396, (Some(7169396), Some(1853120844), Some(19539))),
+ (7169638, (Some(7169638), Some(1853120844), Some(19533))),
+ (7169889, (Some(7169889), Some(1853120844), None)),
+ (7170147, (Some(7170147), Some(1819441475), Some(21842))),
+ (7170402, (Some(7170402), Some(1853120844), None)),
+ (7170407, (Some(7170407), Some(1853120844), None)),
+ (7170419, (Some(7170419), Some(1853120844), None)),
+ (7170420, (Some(7170420), Some(1853120844), None)),
+ (7170659, (Some(7170659), Some(1835100227), Some(20054))),
+ (7170914, (Some(7170914), Some(1853120844), Some(19779))),
+ (7171194, (Some(7171194), Some(1853120844), Some(18260))),
+ (7171425, (Some(7171425), Some(1853120844), None)),
+ (7171431, (Some(7171431), Some(1853120844), None)),
+ (7171682, (Some(7171682), Some(1853120844), None)),
+ (7171694, (Some(7171694), Some(1853120844), None)),
+ (7171937, (Some(7171937), Some(1853120844), None)),
+ (7171938, (Some(7171938), Some(1853120844), None)),
+ (7171943, (Some(7171943), Some(1635149124), Some(20041))),
+ (7172207, (Some(7172207), Some(1853120844), None)),
+ (7172212, (Some(7172212), Some(1853120844), None)),
+ (7172707, (Some(7172707), Some(1936613699), Some(16707))),
+ (7172984, (Some(7172984), Some(1853120844), None)),
+ (7173220, (Some(7173220), Some(1853120844), Some(19533))),
+ (7173227, (Some(7173227), Some(1853120844), None)),
+ (7173230, (Some(7173230), Some(1853120844), None)),
+ (7173234, (Some(7173234), Some(1853120844), Some(19014))),
+ (7173239, (Some(7173239), Some(1635149124), Some(20041))),
+ (7173474, (Some(7173474), Some(1853120844), Some(19779))),
+ (7173483, (Some(7173483), Some(1819441475), Some(21842))),
+ (7173492, (Some(7173492), Some(1853120844), Some(22349))),
+ (7173993, (Some(7173993), Some(1853120844), None)),
+ (7174251, (Some(7174251), Some(1767991380), Some(18516))),
+ (7174253, (Some(7174253), Some(1853120844), None)),
+ (7174509, (Some(7174509), Some(1768453189), None)),
+ (7174510, (Some(7174510), Some(1853120844), Some(23124))),
+ (7174765, (Some(7174765), Some(1853120844), None)),
+ (7174767, (Some(7174767), Some(1853120844), None)),
+ (7174772, (Some(7174772), Some(1853120844), Some(16717))),
+ (7233890, (Some(7233890), Some(1853120844), Some(17481))),
+ (7233891, (Some(7233891), Some(1853120844), None)),
+ (7233894, (Some(7233894), Some(1853120844), Some(20807))),
+ (7233895, (Some(7233895), Some(1936613704), Some(20035))),
+ (7233897, (Some(7233897), Some(1853120844), None)),
+ (7233901, (Some(7233901), Some(1853120844), Some(19783))),
+ (7233902, (Some(7233902), Some(1936613704), Some(20035))),
+ (7233908, (Some(7233908), Some(1853120844), None)),
+ (7233910, (Some(7233910), Some(1853120844), None)),
+ (7233911, (Some(7233911), Some(1853120844), None)),
+ (7234402, (Some(7234402), Some(1853120844), None)),
+ (7234419, (Some(7234419), Some(1853120844), Some(21577))),
+ (7234660, (Some(7234660), Some(1853120844), None)),
+ (7234663, (Some(7234663), Some(1853120844), None)),
+ (7234916, (Some(7234916), Some(1853120844), Some(16707))),
+ (7234922, (Some(7234922), Some(1853120844), None)),
+ (7234923, (Some(7234923), Some(1853120844), Some(19779))),
+ (7234925, (Some(7234925), Some(1853120844), Some(19539))),
+ (7235181, (Some(7235181), Some(1853120844), None)),
+ (7235426, (Some(7235426), Some(1650553409), Some(19280))),
+ (7235431, (Some(7235431), Some(1635149124), Some(20558))),
+ (7235442, (Some(7235442), Some(1853120844), Some(21577))),
+ (7235691, (Some(7235691), Some(1635149124), Some(20041))),
+ (7235696, (Some(7235696), Some(2020501584), Some(16972))),
+ (7235699, (Some(7235699), Some(1919777101), Some(19789))),
+ (7235938, (Some(7235938), Some(1853120844), Some(18254))),
+ (7235949, (Some(7235949), Some(1853120844), Some(17481))),
+ (7235950, (Some(7235950), Some(1853120844), None)),
+ (7236194, (Some(7236194), Some(1853120844), Some(17481))),
+ (7236199, (Some(7236199), Some(1853120844), None)),
+ (7236455, (Some(7236455), Some(1853120844), None)),
+ (7236705, (Some(7236705), Some(1853120844), Some(19288))),
+ (7236715, (Some(7236715), Some(1853120844), Some(17739))),
+ (7236716, (Some(7236716), Some(1853120844), None)),
+ (7236961, (Some(7236961), Some(1853120844), None)),
+ (7236972, (Some(7236972), Some(1970038100), Some(20041))),
+ (7236979, (Some(7236979), Some(1853120844), Some(18758))),
+ (7236984, (Some(7236984), Some(1768841549), Some(20035))),
+ (7237217, (Some(7237217), Some(1853120844), None)),
+ (7237221, (Some(7237221), Some(1853120844), None)),
+ (7237224, (Some(7237224), Some(1853120844), Some(18512))),
+ (7237231, (Some(7237231), Some(1853120844), None)),
+ (7237232, (Some(7237232), Some(1853120844), None)),
+ (7237474, (Some(7237474), Some(1853120844), None)),
+ (7237478, (Some(7237478), Some(1853120844), Some(19010))),
+ (7237479, (Some(7237479), Some(1970038100), Some(20041))),
+ (7237486, (Some(7237486), Some(1919841618), Some(17747))),
+ (7237488, (Some(7237488), Some(1853120844), Some(19782))),
+ (7237496, (Some(7237496), Some(1853120844), None)),
+ (7237497, (Some(7237497), Some(1853120844), None)),
+ (7238241, (Some(7238241), Some(1853120844), Some(19523))),
+ (7238259, (Some(7238259), Some(1853120844), Some(21075))),
+ (7238504, (Some(7238504), Some(1936613704), Some(20035))),
+ (7238510, (Some(7238510), Some(1853120844), None)),
+ (7239019, (Some(7239019), Some(1853120844), None)),
+ (7239030, (Some(7239030), Some(1853120844), Some(23124))),
+ (7239265, (Some(7239265), Some(1853120844), None)),
+ (7239277, (Some(7239277), Some(1853120844), None)),
+ (7239795, (Some(7239795), Some(1853120844), Some(17481))),
+ (7240034, (Some(7240034), Some(1768453189), Some(21061))),
+ (7240046, (Some(7240046), Some(1853120844), Some(18261))),
+ (7240301, (Some(7240301), Some(1650553409), Some(21065))),
+ (7299435, (Some(7299435), Some(1853120844), Some(19533))),
+ (7299442, (Some(7299442), Some(1853120844), None)),
+ (7299449, (Some(7299449), Some(1853120844), Some(23117))),
+ (7299690, (Some(7299690), Some(1853120844), Some(3223600))),
+ (7299693, (Some(7299693), Some(1853120844), None)),
+ (7299700, (Some(7299700), Some(1853120844), None)),
+ (7299938, (Some(7299938), Some(1853120844), None)),
+ (7299950, (Some(7299950), Some(1853120844), None)),
+ (7299955, (Some(7299955), Some(1853120844), Some(16967))),
+ (7300464, (Some(7300464), Some(1868918872), Some(21065))),
+ (7300468, (Some(7300468), Some(1853120844), Some(18261))),
+ (7300715, (Some(7300715), Some(1853120844), Some(18755))),
+ (7300717, (Some(7300717), Some(1853120844), None)),
+ (7300961, (Some(7300961), Some(1853120844), None)),
+ (7300970, (Some(7300970), Some(1853120844), Some(19779))),
+ (7300973, (Some(7300973), Some(1853120844), Some(19779))),
+ (7300980, (Some(7300980), Some(1853120844), None)),
+ (7301217, (Some(7301217), Some(1836017729), Some(20041))),
+ (7301218, (Some(7301218), Some(1635149124), Some(20041))),
+ (7301219, (Some(7301219), Some(1853120844), Some(21333))),
+ (7301474, (Some(7301474), Some(1853120844), None)),
+ (7301492, (Some(7301492), Some(1853120844), None)),
+ (7301730, (Some(7301730), Some(1853120844), None)),
+ (7301742, (Some(7301742), Some(1853120844), Some(20041))),
+ (7301987, (Some(7301987), Some(1853120844), None)),
+ (7301998, (Some(7301998), Some(1853120844), None)),
+ (7302000, (Some(7302000), Some(1853120844), Some(17739))),
+ (7302009, (Some(7302009), Some(1853120844), None)),
+ (7302249, (Some(7302249), Some(1853120844), Some(18512))),
+ (7302497, (Some(7302497), Some(1853120844), Some(18254))),
+ (7302505, (Some(7302505), Some(1853120844), None)),
+ (7302507, (Some(7302507), Some(1853120844), None)),
+ (7302508, (Some(7302508), Some(1853120844), Some(21577))),
+ (7302509, (Some(7302509), Some(1853120844), None)),
+ (7302514, (Some(7302514), Some(1853120844), Some(18499))),
+ (7302519, (Some(7302519), Some(1853120844), None)),
+ (7302760, (Some(7302760), Some(1650553409), Some(19280))),
+ (7303026, (Some(7303026), Some(1853120844), None)),
+ (7303275, (Some(7303275), Some(1853120844), None)),
+ (7303280, (Some(7303280), Some(1853120844), None)),
+ (7303534, (Some(7303534), Some(1869572942), Some(20039))),
+ (7303540, (Some(7303540), Some(1853120844), None)),
+ (7303777, (Some(7303777), Some(1853120844), Some(20290))),
+ (7303789, (Some(7303789), Some(1869574733), Some(17474))),
+ (7303791, (Some(7303791), Some(1853120844), None)),
+ (7303794, (Some(7303794), Some(1853120844), None)),
+ (7303798, (Some(7303798), Some(1853120844), Some(17733))),
+ (7304033, (Some(7304033), Some(1853120844), None)),
+ (7304046, (Some(7304046), Some(1853120844), Some(16730))),
+ (7304290, (Some(7304290), Some(1853120844), Some(18512))),
+ (7304299, (Some(7304299), Some(1853120844), None)),
+ (7304546, (Some(7304546), Some(1853120844), None)),
+ (7304556, (Some(7304556), Some(1853120844), Some(17739))),
+ (7305057, (Some(7305057), Some(1853120844), None)),
+ (7305061, (Some(7305061), Some(1853120844), Some(19779))),
+ (7305067, (Some(7305067), Some(1853120844), None)),
+ (7305074, (Some(7305074), Some(1853120844), None)),
+ (7305572, (Some(7305572), Some(1853120844), Some(20051))),
+ (7364962, (Some(7364962), Some(1635149124), Some(20558))),
+ (7364974, (Some(7364974), Some(1853120844), Some(21577))),
+ (7364976, (Some(7364976), Some(1853120844), Some(22337))),
+ (7364985, (Some(7364985), Some(1853120844), Some(19782))),
+ (7365218, (Some(7365218), Some(1853120844), None)),
+ (7365227, (Some(7365227), Some(1853120844), None)),
+ (7365235, (Some(7365235), Some(1853120844), Some(23124))),
+ (7365239, (Some(7365239), Some(1853120844), Some(21825))),
+ (7365475, (Some(7365475), Some(1835753795), Some(17474))),
+ (7365484, (Some(7365484), Some(1767991380), Some(20035))),
+ (7365485, (Some(7365485), Some(1853120844), None)),
+ (7365729, (Some(7365729), Some(1952606548), Some(21570))),
+ (7365996, (Some(7365996), Some(1668310348), Some(20041))),
+ (7366006, (Some(7366006), Some(1853120844), Some(21842))),
+ (7366507, (Some(7366507), Some(1853120844), Some(21058))),
+ (7366509, (Some(7366509), Some(1635149124), Some(20558))),
+ (7366755, (Some(7366755), Some(1853120844), Some(16707))),
+ (7367024, (Some(7367024), Some(1853120844), None)),
+ (7367276, (Some(7367276), Some(1853120844), Some(17481))),
+ (7367527, (Some(7367527), Some(1853120844), None)),
+ (7367533, (Some(7367533), Some(1853120844), None)),
+ (7367789, (Some(7367789), Some(1853120844), None)),
+ (7368033, (Some(7368033), Some(1853120844), None)),
+ (7368038, (Some(7368038), Some(1853120844), None)),
+ (7368044, (Some(7368044), Some(1853120844), None)),
+ (7368051, (Some(7368051), Some(1919770963), Some(19529))),
+ (7368290, (Some(7368290), Some(1853120844), None)),
+ (7368299, (Some(7368299), Some(1853120844), None)),
+ (7368302, (Some(7368302), Some(1869112151), Some(20041))),
+ (7368307, (Some(7368307), Some(1853120844), None)),
+ (7368547, (Some(7368547), Some(1953525571), Some(18245))),
+ (7368548, (Some(7368548), Some(1853120844), None)),
+ (7368558, (Some(7368558), Some(1853120844), None)),
+ (7368813, (Some(7368813), Some(1853120844), None)),
+ (7369058, (Some(7369058), Some(1853120844), None)),
+ (7369318, (Some(7369318), Some(1853120844), Some(21062))),
+ (7369828, (Some(7369828), Some(1853120844), Some(22861))),
+ (7369840, (Some(7369840), Some(1853120844), None)),
+ (7370091, (Some(7370091), Some(1853120844), None)),
+ (7370094, (Some(7370094), Some(1853120844), None)),
+ (7370611, (Some(7370611), Some(1853120844), None)),
+ (7370859, (Some(7370859), Some(1650553409), Some(19280))),
+ (7371373, (Some(7371373), Some(1853120844), None)),
+ (7430510, (Some(7430510), Some(1853120844), Some(16718))),
+ (7430515, (Some(7430515), Some(1853120844), Some(17739))),
+ (7430516, (Some(7430516), Some(1853120844), None)),
+ (7430753, (Some(7430753), Some(1819441475), None)),
+ (7430756, (Some(7430756), Some(1853120844), None)),
+ (7430763, (Some(7430763), Some(1853120844), None)),
+ (7430765, (Some(7430765), Some(1853120844), None)),
+ (7430775, (Some(7430775), Some(1970038100), Some(20041))),
+ (7431010, (Some(7431010), Some(1768453189), None)),
+ (7431021, (Some(7431021), Some(1853120844), None)),
+ (7431532, (Some(7431532), Some(1853120844), None)),
+ (7431778, (Some(7431778), Some(1819107668), Some(20041))),
+ (7431789, (Some(7431789), Some(1853120844), None)),
+ (7432033, (Some(7432033), Some(1853120844), Some(19779))),
+ (7432299, (Some(7432299), Some(1853120844), Some(19533))),
+ (7432308, (Some(7432308), Some(1635149124), Some(20558))),
+ (7432546, (Some(7432546), Some(1853120844), None)),
+ (7433058, (Some(7433058), Some(1853120844), None)),
+ (7433323, (Some(7433323), Some(1853120844), None)),
+ (7433570, (Some(7433570), Some(1853120844), Some(19533))),
+ (7433587, (Some(7433587), Some(1853120844), None)),
+ (7433829, (Some(7433829), Some(1853120844), None)),
+ (7434099, (Some(7434099), Some(1853120844), None)),
+ (7434100, (Some(7434100), Some(1853120844), None)),
+ (7434849, (Some(7434849), Some(1650553409), Some(23108))),
+ (7435106, (Some(7435106), Some(1936941378), Some(21068))),
+ (7435379, (Some(7435379), Some(1853120844), Some(17732))),
+ (7435622, (Some(7435622), Some(1853120844), Some(17742))),
+ (7435636, (Some(7435636), Some(1853120844), None)),
+ (7436139, (Some(7436139), Some(1853120844), None)),
+ (7436148, (Some(7436148), Some(1853120844), Some(17742))),
+ (7436398, (Some(7436398), Some(1853120844), Some(20035))),
+ (7496034, (Some(7496034), Some(1853120844), Some(21569))),
+ (7496036, (Some(7496036), Some(1819441475), Some(21842))),
+ (7496041, (Some(7496041), Some(1853120844), None)),
+ (7496055, (Some(7496055), Some(1853120844), Some(18512))),
+ (7496289, (Some(7496289), Some(1853120844), Some(18503))),
+ (7496290, (Some(7496290), Some(1853120844), None)),
+ (7496311, (Some(7496311), Some(1635149124), Some(20041))),
+ (7496551, (Some(7496551), Some(1853120844), Some(17991))),
+ (7496557, (Some(7496557), Some(1853120844), None)),
+ (7496568, (Some(7496568), Some(1769103683), Some(21076))),
+ (7496807, (Some(7496807), Some(1853120844), None)),
+ (7496813, (Some(7496813), Some(1853120844), Some(17481))),
+ (7497069, (Some(7497069), Some(1853120844), Some(17739))),
+ (7497079, (Some(7497079), Some(1853120844), None)),
+ (7497081, (Some(7497081), Some(1853120844), None)),
+ (7497323, (Some(7497323), Some(1635149124), Some(20041))),
+ (7497326, (Some(7497326), Some(1853120844), None)),
+ (7497572, (Some(7497572), Some(1853120844), Some(16707))),
+ (7497593, (Some(7497593), Some(1853120844), None)),
+ (7497827, (Some(7497827), Some(1919248451), Some(21333))),
+ (7497844, (Some(7497844), Some(1635149124), Some(20558))),
+ (7498338, (Some(7498338), Some(1853120844), None)),
+ (7498355, (Some(7498355), Some(1853120844), None)),
+ (7498607, (Some(7498607), Some(1853120844), None)),
+ (7498611, (Some(7498611), Some(1650553409), Some(19280))),
+ (7498612, (Some(7498612), Some(1853120844), Some(23105))),
+ (7498854, (Some(7498854), Some(1853120844), None)),
+ (7499128, (Some(7499128), Some(1668441421), Some(17491))),
+ (7499381, (Some(7499381), Some(1735288130), Some(20041))),
+ (7499384, (Some(7499384), Some(1635149124), Some(20041))),
+ (7499622, (Some(7499622), Some(1853120844), None)),
+ (7499623, (Some(7499623), Some(1853120844), Some(17481))),
+ (7499628, (Some(7499628), Some(1853120844), None)),
+ (7499873, (Some(7499873), Some(1853120844), None)),
+ (7499883, (Some(7499883), Some(1853120844), None)),
+ (7499896, (Some(7499896), Some(1769239120), Some(21065))),
+ (7500390, (Some(7500390), Some(1853120844), Some(17732))),
+ (7500403, (Some(7500403), Some(1853120844), Some(20051))),
+ (7500651, (Some(7500651), Some(1853120844), None)),
+ (7500664, (Some(7500664), Some(1635149124), Some(20558))),
+ (7500901, (Some(7500901), Some(1853120844), None)),
+ (7500907, (Some(7500907), Some(1853120844), Some(22861))),
+ (7500909, (Some(7500909), Some(1635149124), Some(20041))),
+ (7500910, (Some(7500910), Some(1853120844), None)),
+ (7500916, (Some(7500916), Some(1853120844), None)),
+ (7500917, (Some(7500917), Some(1853120844), None)),
+ (7501158, (Some(7501158), Some(1853120844), Some(21577))),
+ (7501159, (Some(7501159), Some(1853120844), Some(18503))),
+ (7501165, (Some(7501165), Some(1853120844), None)),
+ (7501171, (Some(7501171), Some(1853120844), None)),
+ (7501414, (Some(7501414), Some(1853120844), Some(17491))),
+ (7501415, (Some(7501415), Some(1635149124), Some(20558))),
+ (7501419, (Some(7501419), Some(1853120844), Some(17481))),
+ (7501666, (Some(7501666), Some(1853120844), None)),
+ (7501677, (Some(7501677), Some(1635149124), Some(20041))),
+ (7501934, (Some(7501934), Some(1853120844), None)),
+ (7502178, (Some(7502178), Some(1853120844), None)),
+ (7502195, (Some(7502195), Some(1668446547), Some(20809))),
+ (7502443, (Some(7502443), Some(1853120844), None)),
+ (7561570, (Some(7561570), Some(1853120844), Some(19779))),
+ (7561580, (Some(7561580), Some(1853120844), None)),
+ (7561581, (Some(7561581), Some(1853120844), Some(17739))),
+ (7561582, (Some(7561582), Some(1853120844), None)),
+ (7561587, (Some(7561587), Some(1853120844), Some(17481))),
+ (7561593, (Some(7561593), Some(1853120844), None)),
+ (7562099, (Some(7562099), Some(1853120844), Some(16707))),
+ (7562350, (Some(7562350), Some(1853120844), Some(17732))),
+ (7562610, (Some(7562610), Some(1853120844), None)),
+ (7562611, (Some(7562611), Some(1853120844), Some(19533))),
+ (7562616, (Some(7562616), Some(1853120844), None)),
+ (7563123, (Some(7563123), Some(1853120844), Some(21580))),
+ (7563367, (Some(7563367), Some(1853120844), None)),
+ (7563371, (Some(7563371), Some(1853120844), None)),
+ (7563628, (Some(7563628), Some(1970497868), Some(20035))),
+ (7563629, (Some(7563629), Some(1920229704), Some(20809))),
+ (7563883, (Some(7563883), Some(1853120844), None)),
+ (7563890, (Some(7563890), Some(1635149124), Some(20558))),
+ (7564147, (Some(7564147), Some(1853120844), None)),
+ (7564397, (Some(7564397), Some(1853120844), Some(17491))),
+ (7564406, (Some(7564406), Some(1853120844), Some(17730))),
+ (7564407, (Some(7564407), Some(1853120844), Some(18007))),
+ (7564651, (Some(7564651), Some(1853120844), None)),
+ (7564656, (Some(7564656), Some(1853120844), Some(21577))),
+ (7564659, (Some(7564659), Some(1853120844), Some(18758))),
+ (7564908, (Some(7564908), Some(1853120844), None)),
+ (7564911, (Some(7564911), Some(1853120844), None)),
+ (7565159, (Some(7565159), Some(1853120844), Some(19534))),
+ (7565163, (Some(7565163), Some(1853120844), Some(19782))),
+ (7565164, (Some(7565164), Some(1853120844), None)),
+ (7565165, (Some(7565165), Some(1853120844), Some(17986))),
+ (7565175, (Some(7565175), Some(1853120844), None)),
+ (7565409, (Some(7565409), Some(1853120844), None)),
+ (7565411, (Some(7565411), Some(1853120844), Some(18512))),
+ (7565421, (Some(7565421), Some(1853120844), None)),
+ (7565427, (Some(7565427), Some(1853120844), None)),
+ (7565670, (Some(7565670), Some(1853120844), None)),
+ (7565675, (Some(7565675), Some(1853120844), None)),
+ (7565921, (Some(7565921), Some(1650553409), Some(16723))),
+ (7565923, (Some(7565923), Some(1853120844), Some(17235))),
+ (7565924, (Some(7565924), Some(1768453189), None)),
+ (7565926, (Some(7565926), Some(1853120844), Some(17732))),
+ (7565931, (Some(7565931), Some(1853120844), None)),
+ (7565943, (Some(7565943), Some(1853120844), None)),
+ (7566178, (Some(7566178), Some(1853120844), Some(19779))),
+ (7566190, (Some(7566190), Some(1853120844), None)),
+ (7566192, (Some(7566192), Some(1853120844), None)),
+ (7566201, (Some(7566201), Some(1853120844), None)),
+ (7566436, (Some(7566436), Some(1853120844), None)),
+ (7566452, (Some(7566452), Some(1767991380), Some(18516))),
+ (7566690, (Some(7566690), Some(1853120844), None)),
+ (7566699, (Some(7566699), Some(1853120844), None)),
+ (7566701, (Some(7566701), Some(1853120844), Some(21333))),
+ (7566702, (Some(7566702), Some(1853120844), Some(21331))),
+ (7566707, (Some(7566707), Some(1853120844), Some(20039))),
+ (7566951, (Some(7566951), Some(1853120844), None)),
+ (7567209, (Some(7567209), Some(1853120844), None)),
+ (7567714, (Some(7567714), Some(1853120844), None)),
+ (7627123, (Some(7627123), Some(1853120844), Some(20041))),
+ (7627129, (Some(7627129), Some(1853120844), None)),
+ (7627361, (Some(7627361), Some(1853120844), None)),
+ (7627627, (Some(7627627), Some(1853120844), None)),
+ (7627883, (Some(7627883), Some(1767991380), Some(18516))),
+ (7627888, (Some(7627888), Some(1853120844), Some(16707))),
+ (7628130, (Some(7628130), Some(1853120844), None)),
+ (7628141, (Some(7628141), Some(1853120844), None)),
+ (7628148, (Some(7628148), Some(1853120844), Some(19540))),
+ (7628386, (Some(7628386), Some(1650553409), Some(19280))),
+ (7628907, (Some(7628907), Some(1919777101), Some(20041))),
+ (7629158, (Some(7629158), Some(1853120844), Some(17747))),
+ (7629410, (Some(7629410), Some(1853120844), Some(20051))),
+ (7629673, (Some(7629673), Some(1853120844), Some(16707))),
+ (7629676, (Some(7629676), Some(1853120844), Some(21333))),
+ (7629682, (Some(7629682), Some(1735288130), Some(17474))),
+ (7629684, (Some(7629684), Some(1635149124), Some(20558))),
+ (7629921, (Some(7629921), Some(1819441475), Some(21842))),
+ (7629922, (Some(7629922), Some(1953915220), Some(20054))),
+ (7629931, (Some(7629931), Some(1853120844), None)),
+ (7630184, (Some(7630184), Some(1853120844), None)),
+ (7630194, (Some(7630194), Some(1650553409), Some(21065))),
+ (7630448, (Some(7630448), Some(1801810503), Some(21063))),
+ (7630695, (Some(7630695), Some(1752461127), Some(16725))),
+ (7630696, (Some(7630696), Some(1853120844), None)),
+ (7630710, (Some(7630710), Some(1853120844), Some(21842))),
+ (7630957, (Some(7630957), Some(1853120844), None)),
+ (7631463, (Some(7631463), Some(1735288130), Some(20041))),
+ (7631477, (Some(7631477), Some(1853120844), None)),
+ (7631713, (Some(7631713), Some(1853120844), Some(21317))),
+ (7631714, (Some(7631714), Some(1768453189), None)),
+ (7631970, (Some(7631970), Some(1853120844), None)),
+ (7631973, (Some(7631973), Some(1818326089), Some(21577))),
+ (7631988, (Some(7631988), Some(1853120844), Some(23105))),
+ (7632234, (Some(7632234), Some(1853120844), Some(19268))),
+ (7632246, (Some(7632246), Some(1853120844), None)),
+ (7632249, (Some(7632249), Some(1853120844), None)),
+ (7632481, (Some(7632481), Some(1853120844), None)),
+ (7632743, (Some(7632743), Some(1650553409), None)),
+ (7632997, (Some(7632997), Some(1853120844), Some(21317))),
+ (7633515, (Some(7633515), Some(1853120844), Some(22861))),
+ (7692641, (Some(7692641), Some(1853120844), None)),
+ (7692656, (Some(7692656), Some(1853120844), Some(22352))),
+ (7692901, (Some(7692901), Some(1853120844), Some(17739))),
+ (7692906, (Some(7692906), Some(1853120844), None)),
+ (7692908, (Some(7692908), Some(1853120844), None)),
+ (7692909, (Some(7692909), Some(1853120844), None)),
+ (7692917, (Some(7692917), Some(1853120844), None)),
+ (7693154, (Some(7693154), Some(1853120844), None)),
+ (7693165, (Some(7693165), Some(1853120844), None)),
+ (7693166, (Some(7693166), Some(1853120844), None)),
+ (7693417, (Some(7693417), Some(1853120844), None)),
+ (7693428, (Some(7693428), Some(1853120844), Some(22861))),
+ (7693676, (Some(7693676), Some(1853120844), None)),
+ (7693677, (Some(7693677), Some(1853120844), None)),
+ (7694196, (Some(7694196), Some(1853120844), None)),
+ (7694451, (Some(7694451), Some(1650553409), None)),
+ (7694699, (Some(7694699), Some(1853120844), Some(21076))),
+ (7694702, (Some(7694702), Some(1853120844), Some(21838))),
+ (7694711, (Some(7694711), Some(1853120844), None)),
+ (7694951, (Some(7694951), Some(1650553409), Some(19280))),
+ (7695202, (Some(7695202), Some(1853120844), Some(18512))),
+ (7695464, (Some(7695464), Some(2004184136), Some(21076))),
+ (7695714, (Some(7695714), Some(1853120844), None)),
+ (7695723, (Some(7695723), Some(1853120844), None)),
+ (7695725, (Some(7695725), Some(1853120844), None)),
+ (7695730, (Some(7695730), Some(1853120844), Some(17747))),
+ (7695980, (Some(7695980), Some(1853120844), None)),
+ (7695991, (Some(7695991), Some(1853120844), None)),
+ (7696233, (Some(7696233), Some(1853120844), None)),
+ (7696238, (Some(7696238), Some(1853120844), None)),
+ (7696243, (Some(7696243), Some(1767991380), Some(18516))),
+ (7697003, (Some(7697003), Some(1635149124), Some(20041))),
+ (7697007, (Some(7697007), Some(1650553409), None)),
+ (7697012, (Some(7697012), Some(1853120844), Some(21076))),
+ (7697253, (Some(7697253), Some(1853120844), Some(21333))),
+ (7697509, (Some(7697509), Some(1853120844), None)),
+ (7697762, (Some(7697762), Some(1853120844), None)),
+ (7697776, (Some(7697776), Some(1853120844), Some(16711))),
+ (7697783, (Some(7697783), Some(1936613704), Some(20035))),
+ (7698017, (Some(7698017), Some(1853120844), None)),
+ (7698036, (Some(7698036), Some(1853120844), None)),
+ (7698788, (Some(7698788), Some(1853120844), Some(17986))),
+ (7698802, (Some(7698802), Some(1634623819), Some(20554))),
+ (7758178, (Some(7758178), Some(1853120844), None)),
+ (7758180, (Some(7758180), Some(1853120844), Some(17739))),
+ (7758195, (Some(7758195), Some(1853120844), Some(20051))),
+ (7758200, (Some(7758200), Some(1853120844), Some(21058))),
+ (7758201, (Some(7758201), Some(1853120844), Some(19779))),
+ (7760244, (Some(7760244), Some(1853120844), Some(18254))),
+ (7760246, (Some(7760246), Some(1853120844), None)),
+ (7760247, (Some(7760247), Some(1853120844), None)),
+ (7760483, (Some(7760483), Some(1853120844), None)),
+ (7760738, (Some(7760738), Some(1853120844), None)),
+ (7760751, (Some(7760751), Some(1853120844), None)),
+ (7761255, (Some(7761255), Some(1768453189), None)),
+ (7762274, (Some(7762274), Some(1853120844), Some(18755))),
+ (7762548, (Some(7762548), Some(1853120844), Some(22356))),
+ (7763042, (Some(7763042), Some(1635149124), Some(19280))),
+ (7763302, (Some(7763302), Some(1853120844), Some(18254))),
+ (7763310, (Some(7763310), Some(1853120844), None)),
+ (7763319, (Some(7763319), Some(1853120844), None)),
+ (7763821, (Some(7763821), Some(1853120844), Some(17481))),
+ (7763827, (Some(7763827), Some(1635149124), Some(20041))),
+ (7764322, (Some(7764322), Some(1853120844), Some(19779))),
+ (7764333, (Some(7764333), Some(1819441475), Some(21842))),
+ (7764340, (Some(7764340), Some(1819441475), Some(21842))),
+ (7823719, (Some(7823719), Some(1853120844), None)),
+ (7823720, (Some(7823720), Some(1853120844), Some(21333))),
+ (7823725, (Some(7823725), Some(1853120844), None)),
+ (7823980, (Some(7823980), Some(1853120844), Some(17481))),
+ (7823981, (Some(7823981), Some(1853120844), None)),
+ (7823988, (Some(7823988), Some(1853120844), Some(18512))),
+ (7824738, (Some(7824738), Some(1853120844), Some(17481))),
+ (7824750, (Some(7824750), Some(1635149124), Some(20558))),
+ (7825267, (Some(7825267), Some(1768453189), None)),
+ (7825273, (Some(7825273), Some(1853120844), None)),
+ (7825515, (Some(7825515), Some(1650553409), Some(19280))),
+ (7825518, (Some(7825518), Some(1853120844), Some(22605))),
+ (7825771, (Some(7825771), Some(1853120844), None)),
+ (7825773, (Some(7825773), Some(1853120844), None)),
+ (7826281, (Some(7826281), Some(1853120844), None)),
+ (7826285, (Some(7826285), Some(1853120844), None)),
+ (7826795, (Some(7826795), Some(1853120844), None)),
+ (7826806, (Some(7826806), Some(1853120844), Some(23117))),
+ (7827053, (Some(7827053), Some(1919777101), Some(19789))),
+ (7827300, (Some(7827300), Some(1853120844), None)),
+ (7828071, (Some(7828071), Some(1853120844), None)),
+ (7828084, (Some(7828084), Some(1650553409), None)),
+ (7828085, (Some(7828085), Some(1853120844), None)),
+ (7828323, (Some(7828323), Some(1936613699), Some(16707))),
+ (7828327, (Some(7828327), Some(1853120844), Some(18499))),
+ (7828340, (Some(7828340), Some(1853120844), None)),
+ (7828839, (Some(7828839), Some(1853120844), None)),
+ (7828857, (Some(7828857), Some(1853120844), None)),
+ (7829348, (Some(7829348), Some(1853120844), None)),
+ (7829357, (Some(7829357), Some(1886285128), Some(21333))),
+ (7829611, (Some(7829611), Some(1853120844), None)),
+ (7829619, (Some(7829619), Some(1853120844), None)),
+ (7829869, (Some(7829869), Some(1853120844), None)),
+ (7830114, (Some(7830114), Some(1853120844), None)),
+ (7830125, (Some(7830125), Some(1853120844), None)),
+ (7889250, (Some(7889250), Some(1970102594), Some(19779))),
+ (7889515, (Some(7889515), Some(1853120844), None)),
+ (7890029, (Some(7890029), Some(1768453189), None)),
+ (7890274, (Some(7890274), Some(1853120844), None)),
+ (7890286, (Some(7890286), Some(1853120844), None)),
+ (7890288, (Some(7890288), Some(1853120844), None)),
+ (7890786, (Some(7890786), Some(1801810503), Some(21076))),
+ (7891066, (Some(7891066), Some(1969779534), Some(20035))),
+ (7891817, (Some(7891817), Some(1853120844), None)),
+ (7892075, (Some(7892075), Some(1853120844), None)),
+ (7892084, (Some(7892084), Some(1853120844), None)),
+ (7892333, (Some(7892333), Some(1853120844), None)),
+ (7892595, (Some(7892595), Some(1853120844), None)),
+ (7892597, (Some(7892597), Some(1735288130), Some(20041))),
+ (7892845, (Some(7892845), Some(1853120844), None)),
+ (7893099, (Some(7893099), Some(1853120844), None)),
+ (7893101, (Some(7893101), Some(1853120844), None)),
+ (7893602, (Some(7893602), Some(1635149124), Some(20041))),
+ (7893619, (Some(7893619), Some(1635149124), Some(20041))),
+ (7894117, (Some(7894117), Some(1853120844), None)),
+ (7894375, (Some(7894375), Some(1853120844), None)),
+ (7894382, (Some(7894382), Some(1853120844), None)),
+ (7894635, (Some(7894635), Some(1650553409), Some(19280))),
+ (7894881, (Some(7894881), Some(1853120844), None)),
+ (7895394, (Some(7895394), Some(1853120844), None)),
+ (7895403, (Some(7895403), Some(1853120844), None)),
+ (7895405, (Some(7895405), Some(1853120844), Some(18261))),
+ (7954791, (Some(7954791), Some(1853120844), Some(17481))),
+ (7954809, (Some(7954809), Some(1853120844), None)),
+ (7955041, (Some(7955041), Some(1853120844), None)),
+ (7955047, (Some(7955047), Some(1853120844), None)),
+ (7955049, (Some(7955049), Some(1853120844), None)),
+ (7955051, (Some(7955051), Some(1650553409), Some(17742))),
+ (7955065, (Some(7955065), Some(1853120844), None)),
+ (7955316, (Some(7955316), Some(1633971787), Some(20041))),
+ (7955553, (Some(7955553), Some(1819441475), Some(21842))),
+ (7955560, (Some(7955560), Some(1768453189), None)),
+ (7955809, (Some(7955809), Some(1853120844), None)),
+ (7956066, (Some(7956066), Some(1635149124), Some(20041))),
+ (7956075, (Some(7956075), Some(1635149124), Some(20041))),
+ (7956325, (Some(7956325), Some(1887004485), Some(18245))),
+ (7956333, (Some(7956333), Some(1853120844), Some(23124))),
+ (7956578, (Some(7956578), Some(1853120844), None)),
+ (7956584, (Some(7956584), Some(1853120844), None)),
+ (7956846, (Some(7956846), Some(1853120844), None)),
+ (7957099, (Some(7957099), Some(1853120844), None)),
+ (7957347, (Some(7957347), Some(1853120844), None)),
+ (7957349, (Some(7957349), Some(1768710475), Some(19789))),
+ (7957619, (Some(7957619), Some(1853120844), Some(17481))),
+ (7957620, (Some(7957620), Some(1853120844), Some(23105))),
+ (7957876, (Some(7957876), Some(1853120844), None)),
+ (7958113, (Some(7958113), Some(1853120844), None)),
+ (7958131, (Some(7958131), Some(1853120844), None)),
+ (7958387, (Some(7958387), Some(1853120844), None)),
+ (7958626, (Some(7958626), Some(1735288130), Some(20041))),
+ (7958891, (Some(7958891), Some(1768453189), None)),
+ (7959137, (Some(7959137), Some(1650553409), Some(16717))),
+ (7959411, (Some(7959411), Some(1853120844), Some(21061))),
+ (7959652, (Some(7959652), Some(1635149124), Some(20558))),
+ (7959905, (Some(7959905), Some(1853120844), None)),
+ (7959910, (Some(7959910), Some(1853120844), None)),
+ (7959916, (Some(7959916), Some(1853120844), Some(17739))),
+ (7960173, (Some(7960173), Some(1650553409), Some(19280))),
+ (8020328, (Some(8020328), Some(1650553409), Some(17985))),
+ (8020333, (Some(8020333), Some(1853120844), Some(22605))),
+ (8020339, (Some(8020339), Some(1920295251), Some(20041))),
+ (8020345, (Some(8020345), Some(1853120844), None)),
+ (8020583, (Some(8020583), Some(1650553409), Some(21065))),
+ (8020596, (Some(8020596), Some(1853120844), None)),
+ (8021089, (Some(8021089), Some(1853120844), None)),
+ (8021346, (Some(8021346), Some(1853120844), Some(23124))),
+ (8021351, (Some(8021351), Some(1768453189), Some(21573))),
+ (8021355, (Some(8021355), Some(1853120844), None)),
+ (8021356, (Some(8021356), Some(1819441475), Some(21842))),
+ (8021860, (Some(8021860), Some(1853120844), None)),
+ (8021875, (Some(8021875), Some(1853120844), None)),
+ (8022123, (Some(8022123), Some(1853120844), None)),
+ (8022382, (Some(8022382), Some(1853120844), None)),
+ (8022626, (Some(8022626), Some(1853120844), None)),
+ (8023406, (Some(8023406), Some(1853120844), None)),
+ (8023905, (Some(8023905), Some(1853120844), Some(17481))),
+ (8023915, (Some(8023915), Some(1853120844), None)),
+ (8023916, (Some(8023916), Some(1853120844), Some(19802))),
+ (8024161, (Some(8024161), Some(1853120844), None)),
+ (8024180, (Some(8024180), Some(1853120844), None)),
+ (8024673, (Some(8024673), Some(1650553409), Some(18245))),
+ (8024674, (Some(8024674), Some(1853120844), None)),
+ (8025447, (Some(8025447), Some(1853120844), Some(17739))),
+ (8025452, (Some(8025452), Some(1650553409), Some(21065))),
+ (8026219, (Some(8026219), Some(1853120844), None)),
+ (8026477, (Some(8026477), Some(1684955469), Some(21065))),
+ (8026732, (Some(8026732), Some(1853120844), Some(21076))),
+ (8026733, (Some(8026733), Some(1853120844), None)),
+];
+pub static LANG_REGION: [(u64, u32, (Option<u64>, Option<u32>, Option<u32>)); 45] = [
+ (24936, 17491, (Some(24936), Some(1650553409), Some(17491))),
+ (24936, 19779, (Some(24936), Some(1650553409), Some(19779))),
+ (24944, 19280, (Some(24944), Some(1650553409), Some(19280))),
+ (26484, 19280, (Some(26484), Some(1650553409), Some(19280))),
+ (26485, 20045, (Some(26485), Some(1819441475), Some(20045))),
+ (26485, 23115, (Some(26485), Some(1819441475), Some(23115))),
+ (26746, 16720, (Some(26746), Some(1953390920), Some(16720))),
+ (26746, 16967, (Some(26746), Some(1953390920), Some(16967))),
+ (26746, 17481, (Some(26746), Some(1953390920), Some(17481))),
+ (26746, 17991, (Some(26746), Some(1953390920), Some(17991))),
+ (26746, 18000, (Some(26746), Some(1953390920), Some(18000))),
+ (26746, 18512, (Some(26746), Some(1953390920), Some(18512))),
+ (26746, 18516, (Some(26746), Some(1953390920), Some(18516))),
+ (26746, 19272, (Some(26746), Some(1953390920), Some(19272))),
+ (26746, 20034, (Some(26746), Some(1953390920), Some(20034))),
+ (26746, 20054, (Some(26746), Some(1953390920), Some(20054))),
+ (26746, 20301, (Some(26746), Some(1953390920), Some(20301))),
+ (26746, 21075, (Some(26746), Some(1953390920), Some(21075))),
+ (26746, 21333, (Some(26746), Some(1953390920), Some(21333))),
+ (26746, 21825, (Some(26746), Some(1953390920), Some(21825))),
+ (26746, 22356, (Some(26746), Some(1953390920), Some(22356))),
+ (26746, 22861, (Some(26746), Some(1953390920), Some(22861))),
+ (27499, 17985, (Some(27499), Some(1650553409), Some(17985))),
+ (27499, 20035, (Some(27499), Some(1650553409), Some(20035))),
+ (27499, 20045, (Some(27499), Some(1650553409), Some(20045))),
+ (27499, 21065, (Some(27499), Some(1650553409), Some(21065))),
+ (28269, 20035, (Some(28269), Some(1735290701), Some(20035))),
+ (29299, 17741, (Some(29299), Some(1853120844), Some(17741))),
+ (29299, 20306, (Some(29299), Some(1853120844), Some(20306))),
+ (29299, 21076, (Some(29299), Some(1853120844), Some(21076))),
+ (29299, 21842, (Some(29299), Some(1853120844), Some(21842))),
+ (29549, 17219, (Some(29549), Some(1650553409), Some(17219))),
+ (29549, 17481, (Some(29549), Some(1650553409), Some(17481))),
+ (30059, 16972, (Some(30059), Some(1650553409), Some(16972))),
+ (31083, 20035, (Some(31083), Some(1650553409), Some(20035))),
+ (31083, 21076, (Some(31083), Some(1853120844), Some(21076))),
+ (31329, 20809, (Some(31329), Some(1650553409), Some(20809))),
+ (31329, 21065, (Some(31329), Some(1650553409), Some(21065))),
+ (31329, 21842, (Some(31329), Some(1819441475), Some(21842))),
+ (31349, 17985, (Some(31349), Some(1650553409), Some(17985))),
+ (31349, 20035, (Some(31349), Some(1819441475), Some(20035))),
+ (
+ 6649209,
+ 20035,
+ (Some(6649209), Some(1936613704), Some(20035)),
+ ),
+ (
+ 6711666,
+ 19534,
+ (Some(6711666), Some(1853120844), Some(19534)),
+ ),
+ (
+ 7233901,
+ 20039,
+ (Some(7233901), Some(1869572942), Some(20039)),
+ ),
+ (
+ 7499381,
+ 20558,
+ (Some(7499381), Some(1635149124), Some(20558)),
+ ),
+];
+pub static LANG_SCRIPT: [(u64, u32, (Option<u64>, Option<u32>, Option<u32>)); 28] = [
+ (
+ 24944,
+ 1650553409,
+ (Some(24944), Some(1650553409), Some(19280)),
+ ),
+ (
+ 25715,
+ 1635149124,
+ (Some(25715), Some(1635149124), Some(20041)),
+ ),
+ (
+ 25715,
+ 1684957523,
+ (Some(25715), Some(1684957523), Some(20041)),
+ ),
+ (
+ 25715,
+ 1785686091,
+ (Some(25715), Some(1785686091), Some(20041)),
+ ),
+ (
+ 26214,
+ 1835820097,
+ (Some(26214), Some(1835820097), Some(20039)),
+ ),
+ (
+ 26484,
+ 1650553409,
+ (Some(26484), Some(1650553409), Some(19280)),
+ ),
+ (
+ 26485,
+ 1819441475,
+ (Some(26485), Some(1819441475), Some(23115)),
+ ),
+ (
+ 26746,
+ 1651401032,
+ (Some(26746), Some(1651401032), Some(22356)),
+ ),
+ (
+ 26746,
+ 1869639490,
+ (Some(26746), Some(1869639490), Some(22356)),
+ ),
+ (
+ 26746,
+ 1953390920,
+ (Some(26746), Some(1953390920), Some(22356)),
+ ),
+ (
+ 27499,
+ 1650553409,
+ (Some(27499), Some(1650553409), Some(20035)),
+ ),
+ (
+ 28261,
+ 2002872403,
+ (Some(28261), Some(2002872403), Some(16967)),
+ ),
+ (
+ 28269,
+ 1735290701,
+ (Some(28269), Some(1735290701), Some(20035)),
+ ),
+ (
+ 30051,
+ 1734437959,
+ (Some(30051), Some(1734437959), Some(18242)),
+ ),
+ (
+ 30059,
+ 1650553409,
+ (Some(30059), Some(1650553409), Some(20809)),
+ ),
+ (
+ 31083,
+ 1650553409,
+ (Some(31083), Some(1650553409), Some(20035)),
+ ),
+ (
+ 31083,
+ 1853120844,
+ (Some(31083), Some(1853120844), Some(21076)),
+ ),
+ (
+ 31329,
+ 1650553409,
+ (Some(31329), Some(1650553409), Some(21065)),
+ ),
+ (
+ 31349,
+ 1650553409,
+ (Some(31349), Some(1650553409), Some(17985)),
+ ),
+ (
+ 6517345,
+ 1835819344,
+ (Some(6517345), Some(1835819344), Some(22867)),
+ ),
+ (
+ 6517345,
+ 1952539214,
+ (Some(6517345), Some(1952539214), Some(20298)),
+ ),
+ (
+ 6517351,
+ 1651403084,
+ (Some(6517351), Some(1651403084), Some(21063)),
+ ),
+ (
+ 6649209,
+ 1936613704,
+ (Some(6649209), Some(1936613704), Some(20035)),
+ ),
+ (
+ 6711660,
+ 1651337548,
+ (Some(6711660), Some(1651337548), Some(20041)),
+ ),
+ (
+ 7102832,
+ 1886152784,
+ (Some(7102832), Some(1886152784), Some(20035)),
+ ),
+ (
+ 7233901,
+ 1869572942,
+ (Some(7233901), Some(1869572942), Some(20039)),
+ ),
+ (
+ 7499381,
+ 1635149124,
+ (Some(7499381), Some(1635149124), Some(20558)),
+ ),
+ (
+ 7563629,
+ 1717855565,
+ (Some(7563629), Some(1717855565), Some(18254)),
+ ),
+];
+pub static SCRIPT_REGION: [(u32, u32, (Option<u64>, Option<u32>, Option<u32>)); 59] = [
+ (
+ 1635149124,
+ 19014,
+ (Some(6711656), Some(1635149124), Some(19014)),
+ ),
+ (
+ 1635149124,
+ 19280,
+ (Some(7763042), Some(1635149124), Some(19280)),
+ ),
+ (
+ 1635149124,
+ 21570,
+ (Some(25966), Some(1635149124), Some(21570)),
+ ),
+ (
+ 1635149124,
+ 21837,
+ (Some(7301218), Some(1635149124), Some(21837)),
+ ),
+ (
+ 1650553409,
+ 16967,
+ (Some(29547), Some(1650553409), Some(16967)),
+ ),
+ (
+ 1650553409,
+ 17219,
+ (Some(29549), Some(1650553409), Some(17219)),
+ ),
+ (
+ 1650553409,
+ 17481,
+ (Some(29549), Some(1650553409), Some(17481)),
+ ),
+ (
+ 1650553409,
+ 18254,
+ (Some(24936), Some(1650553409), Some(18254)),
+ ),
+ (
+ 1650553409,
+ 18260,
+ (Some(6582369), Some(1650553409), Some(18260)),
+ ),
+ (
+ 1650553409,
+ 18507,
+ (Some(6384227), Some(1650553409), Some(18507)),
+ ),
+ (
+ 1650553409,
+ 18516,
+ (Some(6383213), Some(1650553409), Some(18516)),
+ ),
+ (
+ 1650553409,
+ 19028,
+ (Some(24934), Some(1650553409), Some(19028)),
+ ),
+ (
+ 1650553409,
+ 19280,
+ (Some(29301), Some(1650553409), Some(19280)),
+ ),
+ (
+ 1650553409,
+ 19789,
+ (Some(6776946), Some(1650553409), Some(19789)),
+ ),
+ (
+ 1650553409,
+ 20035,
+ (Some(26485), Some(1650553409), Some(20035)),
+ ),
+ (
+ 1650553409,
+ 20041,
+ (Some(29301), Some(1650553409), Some(20041)),
+ ),
+ (
+ 1650553409,
+ 20045,
+ (Some(27499), Some(1650553409), Some(20045)),
+ ),
+ (
+ 1650553409,
+ 21076,
+ (Some(31329), Some(1650553409), Some(21076)),
+ ),
+ (
+ 1650553409,
+ 21593,
+ (Some(6453107), Some(1650553409), Some(21593)),
+ ),
+ (
+ 1650553409,
+ 21837,
+ (Some(29301), Some(1650553409), Some(21837)),
+ ),
+ (
+ 1767991380,
+ 16716,
+ (Some(7627883), Some(1767991380), Some(16716)),
+ ),
+ (
+ 1767991380,
+ 18507,
+ (Some(7627883), Some(1767991380), Some(18507)),
+ ),
+ (
+ 1767991380,
+ 20035,
+ (Some(7365484), Some(1767991380), Some(20035)),
+ ),
+ (
+ 1801810503,
+ 21076,
+ (Some(7890786), Some(1801810503), Some(21076)),
+ ),
+ (
+ 1819441475,
+ 16706,
+ (Some(29299), Some(1819441475), Some(16706)),
+ ),
+ (
+ 1819441475,
+ 17485,
+ (Some(27509), Some(1819441475), Some(17485)),
+ ),
+ (
+ 1819441475,
+ 17735,
+ (Some(25185), Some(1819441475), Some(17735)),
+ ),
+ (
+ 1819441475,
+ 19283,
+ (Some(27509), Some(1819441475), Some(19283)),
+ ),
+ (
+ 1819441475,
+ 19288,
+ (Some(29299), Some(1819441475), Some(19288)),
+ ),
+ (
+ 1819441475,
+ 19521,
+ (Some(27501), Some(1819441475), Some(19521)),
+ ),
+ (
+ 1819441475,
+ 20306,
+ (Some(26466), Some(1819441475), Some(20306)),
+ ),
+ (
+ 1819441475,
+ 21063,
+ (Some(27501), Some(1819441475), Some(21063)),
+ ),
+ (
+ 1819441475,
+ 21076,
+ (Some(6578795), Some(1819441475), Some(21076)),
+ ),
+ (
+ 1853120844,
+ 16717,
+ (Some(29286), Some(1853120844), Some(16717)),
+ ),
+ (
+ 1853120844,
+ 16725,
+ (Some(27760), Some(1853120844), Some(16725)),
+ ),
+ (
+ 1853120844,
+ 17735,
+ (Some(30059), Some(1853120844), Some(17735)),
+ ),
+ (
+ 1853120844,
+ 17985,
+ (Some(27508), Some(1853120844), Some(17985)),
+ ),
+ (
+ 1853120844,
+ 19277,
+ (Some(29043), Some(1853120844), Some(19277)),
+ ),
+ (
+ 1853120844,
+ 19777,
+ (Some(30059), Some(1853120844), Some(19777)),
+ ),
+ (
+ 1853120844,
+ 19787,
+ (Some(29286), Some(1853120844), Some(19787)),
+ ),
+ (
+ 1853120844,
+ 19789,
+ (Some(6513003), Some(1853120844), Some(19789)),
+ ),
+ (
+ 1853120844,
+ 20035,
+ (Some(24954), Some(1853120844), Some(20035)),
+ ),
+ (
+ 1853120844,
+ 20052,
+ (Some(29286), Some(1853120844), Some(20052)),
+ ),
+ (
+ 1853120844,
+ 20301,
+ (Some(29808), Some(1853120844), Some(20301)),
+ ),
+ (
+ 1853120844,
+ 21065,
+ (Some(27508), Some(1853120844), Some(21065)),
+ ),
+ (
+ 1853120844,
+ 21069,
+ (Some(29286), Some(1853120844), Some(21069)),
+ ),
+ (
+ 1853120844,
+ 21573,
+ (Some(28261), Some(1853120844), Some(21573)),
+ ),
+ (
+ 1853120844,
+ 21842,
+ (Some(7107179), Some(1853120844), Some(21842)),
+ ),
+ (
+ 1853120844,
+ 22356,
+ (Some(7762548), Some(1853120844), Some(22356)),
+ ),
+ (
+ 1853120844,
+ 22851,
+ (Some(29300), Some(1853120844), Some(22851)),
+ ),
+ (
+ 1853120844,
+ 22867,
+ (Some(29286), Some(1853120844), Some(22867)),
+ ),
+ (
+ 1853120844,
+ 23108,
+ (Some(29286), Some(1853120844), Some(23108)),
+ ),
+ (
+ 1919051080,
+ 16707,
+ (Some(27001), Some(1919051080), Some(16707)),
+ ),
+ (
+ 1919051080,
+ 16725,
+ (Some(27001), Some(1919051080), Some(16725)),
+ ),
+ (
+ 1919051080,
+ 16967,
+ (Some(27001), Some(1919051080), Some(16967)),
+ ),
+ (
+ 1919051080,
+ 17747,
+ (Some(27001), Some(1919051080), Some(17747)),
+ ),
+ (
+ 1919051080,
+ 21333,
+ (Some(27001), Some(1919051080), Some(21333)),
+ ),
+ (
+ 1919777101,
+ 18516,
+ (Some(7827053), Some(1919777101), Some(18516)),
+ ),
+ (
+ 1919777101,
+ 20041,
+ (Some(7628907), Some(1919777101), Some(20041)),
+ ),
+];
+pub static SCRIPT_ONLY: [(u32, (Option<u64>, Option<u32>, Option<u32>)); 154] = [
+ (1633773652, (Some(30308), Some(1633773652), Some(22093))),
+ (1633840197, (Some(29043), Some(1633840197), Some(19521))),
+ (1633971787, (Some(28267), Some(1633971787), Some(20041))),
+ (1634427213, (Some(7037293), Some(1634427213), Some(17481))),
+ (1634562895, (Some(28531), Some(1634562895), Some(20307))),
+ (1634623819, (Some(24938), Some(1634623819), Some(20554))),
+ (1634623820, (Some(6582126), Some(1634623820), Some(18516))),
+ (1634625868, (Some(6447468), Some(1634625868), Some(21063))),
+ (1634885975, (Some(6516584), Some(1634885975), Some(20041))),
+ (1634888008, (Some(24938), Some(1634888008), Some(20554))),
+ (1634889555, (Some(6451827), Some(1634889555), Some(20041))),
+ (1635148106, (Some(30314), Some(1635148106), Some(17481))),
+ (1635149124, (Some(26984), Some(1635149124), Some(20041))),
+ (1635214670, (Some(7824750), Some(1635214670), Some(20558))),
+ (1635349071, (Some(29295), Some(1635349071), Some(20041))),
+ (1650553409, (Some(29281), Some(1650553409), Some(18245))),
+ (1650942292, (Some(7823988), Some(1650942292), Some(18512))),
+ (1651009345, (Some(8021356), Some(1651009345), Some(21842))),
+ (1651337548, (Some(6711660), Some(1651337548), Some(20041))),
+ (1651401032, (Some(26746), Some(1651401032), Some(22356))),
+ (1651401050, (Some(6778211), Some(1651401050), Some(20045))),
+ (1651403084, (Some(6517351), Some(1651403084), Some(21063))),
+ (1651663182, (Some(6385272), Some(1651663182), Some(16723))),
+ (1651663187, (Some(6386552), Some(1651663187), Some(17753))),
+ (1668310348, (Some(7365996), Some(1668310348), Some(20041))),
+ (1668440397, (Some(28514), Some(1668440397), Some(20035))),
+ (1668441421, (Some(7499128), Some(1668441421), Some(17491))),
+ (1668446547, (Some(7502195), Some(1668446547), Some(20809))),
+ (1668637008, (Some(6583395), Some(1668637008), Some(19789))),
+ (1684302163, (Some(24947), Some(1684302163), Some(20041))),
+ (1684500307, (Some(6778739), Some(1684500307), Some(23125))),
+ (1684567362, (Some(7695202), Some(1684567362), Some(18512))),
+ (1684955469, (Some(8026477), Some(1684955469), Some(21065))),
+ (1684955470, (Some(24947), Some(1684955470), Some(20041))),
+ (1684956493, (Some(7234925), Some(1684956493), Some(19539))),
+ (1684957523, (Some(25715), Some(1684957523), Some(20041))),
+ (1684960595, (Some(30067), Some(1684960595), Some(17481))),
+ (1685219411, (Some(24947), Some(1685219411), Some(20041))),
+ (1685220432, (Some(6581608), Some(1685220432), Some(20035))),
+ (1701278543, (Some(6386543), Some(1701278543), Some(21333))),
+ (1701601620, (Some(6579316), Some(1701601620), Some(20035))),
+ (1701998411, (Some(28523), Some(1701998411), Some(21067))),
+ (1717855565, (Some(7563629), Some(1717855565), Some(18254))),
+ (1734436944, (Some(6847084), Some(1734436944), Some(20035))),
+ (1734437959, (Some(30051), Some(1734437959), Some(18242))),
+ (1734897490, (Some(6776946), Some(1734897490), Some(19789))),
+ (1735157588, (Some(7104870), Some(1735157588), Some(18512))),
+ (1735287112, (Some(28523), Some(1735287112), Some(21067))),
+ (1735287124, (Some(6781044), Some(1735287124), Some(20035))),
+ (1735288130, (Some(28258), Some(1735288130), Some(17474))),
+ (1735288404, (Some(6842234), Some(1735288404), Some(16717))),
+ (1735289426, (Some(6972786), Some(1735289426), Some(17481))),
+ (1735290184, (Some(6975080), Some(1735290184), Some(16716))),
+ (1735290695, (Some(6779767), Some(1735290695), Some(20041))),
+ (1735290701, (Some(28269), Some(1735290701), Some(20035))),
+ (1735292232, (Some(30056), Some(1735292232), Some(21832))),
+ (1751216706, (Some(6384496), Some(1751216706), Some(20041))),
+ (1751872079, (Some(7042159), Some(1751872079), Some(20045))),
+ (1752066387, (Some(26995), Some(1752066387), Some(19276))),
+ (1752328532, (Some(6906221), Some(1752328532), Some(20041))),
+ (1752461127, (Some(7630695), Some(1752461127), Some(16725))),
+ (1767991380, (Some(26740), Some(1767991380), Some(18516))),
+ (1767993922, (Some(29286), Some(1767993922), Some(21062))),
+ (1768126796, (Some(6515832), Some(1768126796), Some(21076))),
+ (1768189773, (Some(29293), Some(1768189773), Some(20041))),
+ (1768192332, (Some(6581368), Some(1768192332), Some(21076))),
+ (1768256589, (Some(6909549), Some(1768256589), Some(20041))),
+ (1768387906, (Some(6780258), Some(1768387906), Some(17481))),
+ (1768453189, (Some(28001), Some(1768453189), Some(21573))),
+ (1768453195, (Some(7301218), Some(1768453195), Some(20041))),
+ (1768513878, (Some(6906230), Some(1768513878), Some(21068))),
+ (1768515929, (Some(26985), Some(1768515929), Some(20035))),
+ (1768710466, (Some(7233890), Some(1768710466), Some(17481))),
+ (1768710475, (Some(7957349), Some(1768710475), Some(19789))),
+ (1768712272, (Some(7102832), Some(1768712272), Some(21065))),
+ (1768780353, (Some(6517345), Some(1768780353), Some(21065))),
+ (1768841544, (Some(26746), Some(1768841544), Some(20035))),
+ (1768841549, (Some(7236984), Some(1768841549), Some(20035))),
+ (1769103683, (Some(7496568), Some(1769103683), Some(21076))),
+ (1769239120, (Some(7499896), Some(1769239120), Some(21065))),
+ (1785225549, (Some(26984), Some(1785225549), Some(20041))),
+ (1785686091, (Some(25715), Some(1785686091), Some(20041))),
+ (1801677903, (Some(7627123), Some(1801677903), Some(20041))),
+ (1801810503, (Some(27749), Some(1801810503), Some(21063))),
+ (1802789186, (Some(6513250), Some(1802789186), Some(17481))),
+ (1818326089, (Some(7631973), Some(1818326089), Some(21577))),
+ (1819107668, (Some(24948), Some(1819107668), Some(20041))),
+ (1819309380, (Some(29286), Some(1819309380), Some(21062))),
+ (1819441475, (Some(30066), Some(1819441475), Some(21842))),
+ (1835099983, (Some(6383475), Some(1835099983), Some(17737))),
+ (1835100227, (Some(7170659), Some(1835100227), Some(20054))),
+ (1835753795, (Some(7365475), Some(1835753795), Some(17474))),
+ (1835819344, (Some(6517345), Some(1835819344), Some(22867))),
+ (1835820097, (Some(26214), Some(1835820097), Some(20039))),
+ (1835953991, (Some(6779749), Some(1835953991), Some(20041))),
+ (1836017729, (Some(7301217), Some(1836017729), Some(20041))),
+ (1836213584, (Some(30315), Some(1836213584), Some(21842))),
+ (1836674117, (Some(6517345), Some(1836674117), Some(21065))),
+ (1836674125, (Some(27757), Some(1836674125), Some(20041))),
+ (1851879498, (Some(24938), Some(1851879498), Some(20554))),
+ (1851880007, (Some(24947), Some(1851880007), Some(20041))),
+ (1852666433, (Some(31080), Some(1852666433), Some(19777))),
+ (1868918872, (Some(7300464), Some(1868918872), Some(21065))),
+ (1869049683, (Some(6778739), Some(1869049683), Some(23125))),
+ (1869112151, (Some(7368302), Some(1869112151), Some(20041))),
+ (1869379923, (Some(7108979), Some(1869379923), Some(17474))),
+ (1869439306, (Some(28523), Some(1869439306), Some(21067))),
+ (1869504840, (Some(7237224), Some(1869504840), Some(18512))),
+ (1869570380, (Some(28524), Some(1869570380), Some(16716))),
+ (1869572942, (Some(7233901), Some(1869572942), Some(20039))),
+ (1869574733, (Some(7303789), Some(1869574733), Some(17474))),
+ (1869639490, (Some(26746), Some(1869639490), Some(22356))),
+ (1869768013, (Some(7499128), Some(1869768013), Some(17491))),
+ (1870229331, (Some(6778211), Some(1870229331), Some(20045))),
+ (1886152784, (Some(7102832), Some(1886152784), Some(20035))),
+ (1886285128, (Some(7829357), Some(1886285128), Some(21333))),
+ (1887004485, (Some(7956325), Some(1887004485), Some(18245))),
+ (1918986069, (Some(6383477), Some(1918986069), Some(22867))),
+ (1918986315, (Some(6386288), Some(1918986315), Some(19280))),
+ (1919051080, (Some(25960), Some(1919051080), Some(19529))),
+ (1919248451, (Some(7497827), Some(1919248451), Some(21333))),
+ (1919381316, (Some(6909796), Some(1919381316), Some(20041))),
+ (1919579463, (Some(30055), Some(1919579463), Some(20041))),
+ (1919639892, (Some(6909796), Some(1919639892), Some(20041))),
+ (1919770963, (Some(7368051), Some(1919770963), Some(19529))),
+ (1919772747, (Some(28011), Some(1919772747), Some(18507))),
+ (1919777101, (Some(31085), Some(1919777101), Some(19789))),
+ (1919841618, (Some(7237486), Some(1919841618), Some(17747))),
+ (1919903047, (Some(24939), Some(1919903047), Some(17735))),
+ (1920229704, (Some(7563629), Some(1920229704), Some(20809))),
+ (1920295251, (Some(8020339), Some(1920295251), Some(20041))),
+ (1936418882, (Some(24947), Some(1936418882), Some(20041))),
+ (1936613699, (Some(29283), Some(1936613699), Some(16707))),
+ (1936613704, (Some(26746), Some(1936613704), Some(20035))),
+ (1936941378, (Some(7435106), Some(1936941378), Some(21068))),
+ (1952539214, (Some(6517345), Some(1952539214), Some(20298))),
+ (1952606548, (Some(28514), Some(1952606548), Some(20035))),
+ (1953264973, (Some(7498611), Some(1953264973), Some(19280))),
+ (1953390920, (Some(26746), Some(1953390920), Some(22356))),
+ (1953525571, (Some(7368547), Some(1953525571), Some(18245))),
+ (1953656899, (Some(6517351), Some(1953656899), Some(22851))),
+ (1953723969, (Some(25953), Some(1953723969), Some(21065))),
+ (1953915220, (Some(7629922), Some(1953915220), Some(20054))),
+ (1969779534, (Some(7891066), Some(1969779534), Some(20035))),
+ (1970037076, (Some(6449259), Some(1970037076), Some(20035))),
+ (1970038100, (Some(25972), Some(1970038100), Some(20041))),
+ (1970102594, (Some(7889250), Some(1970102594), Some(19779))),
+ (1970435399, (Some(24944), Some(1970435399), Some(20041))),
+ (1970497868, (Some(7563628), Some(1970497868), Some(20035))),
+ (2002872403, (Some(28261), Some(2002872403), Some(16967))),
+ (2003724115, (Some(6648673), Some(2003724115), Some(21333))),
+ (2004184136, (Some(7695464), Some(2004184136), Some(21076))),
+ (2020501584, (Some(7235696), Some(2020501584), Some(16972))),
+ (2020963160, (Some(7039841), Some(2020963160), Some(20809))),
+];
+pub static REGION_ONLY: [(u32, (Option<u64>, Option<u32>, Option<u32>)); 227] = [
+ (16706, (Some(29538), Some(1853120844), Some(16706))),
+ (16709, (Some(29541), Some(1853120844), Some(16709))),
+ (16711, (Some(29286), Some(1853120844), Some(16711))),
+ (16716, (Some(28524), Some(1869570380), Some(16716))),
+ (16717, (Some(29281), Some(1650553409), Some(16717))),
+ (16718, (Some(26209), Some(1853120844), Some(16718))),
+ (16720, (Some(29541), Some(1853120844), Some(16720))),
+ (16721, (Some(29281), Some(1650553409), Some(16721))),
+ (16723, (Some(29281), Some(1650553409), Some(16723))),
+ (16725, (Some(27509), Some(1819441475), Some(16725))),
+ (16726, (Some(29801), Some(1853120844), Some(16726))),
+ (16972, (Some(29281), Some(1650553409), Some(16972))),
+ (17221, (Some(29541), Some(1853120844), Some(17221))),
+ (17225, (Some(29541), Some(1853120844), Some(17225))),
+ (17229, (Some(29286), Some(1853120844), Some(17229))),
+ (17230, (Some(29286), Some(1853120844), Some(17230))),
+ (17235, (Some(29286), Some(1853120844), Some(17235))),
+ (17473, (Some(24931), Some(1853120844), Some(17473))),
+ (17474, (Some(28258), Some(1735288130), Some(17474))),
+ (17475, (Some(30579), Some(1853120844), Some(17475))),
+ (17481, (Some(25705), Some(1853120844), Some(17481))),
+ (17485, (Some(28530), Some(1853120844), Some(17485))),
+ (17491, (Some(29281), Some(1650553409), Some(17491))),
+ (17492, (Some(29286), Some(1853120844), Some(17492))),
+ (17729, (Some(29281), Some(1650553409), Some(17729))),
+ (17730, (Some(27758), Some(1853120844), Some(17730))),
+ (17732, (Some(25956), Some(1853120844), Some(17732))),
+ (17733, (Some(29797), Some(1853120844), Some(17733))),
+ (17735, (Some(24939), Some(1919903047), Some(17735))),
+ (17739, (Some(30579), Some(1853120844), Some(17739))),
+ (17741, (Some(29299), Some(1853120844), Some(17741))),
+ (17742, (Some(24936), Some(1853120844), Some(17742))),
+ (17744, (Some(29541), Some(1853120844), Some(17744))),
+ (17746, (Some(29286), Some(1853120844), Some(17746))),
+ (17747, (Some(30323), Some(1853120844), Some(17747))),
+ (17750, (Some(29541), Some(1853120844), Some(17750))),
+ (17753, (Some(29281), Some(1650553409), Some(17753))),
+ (17985, (Some(24934), Some(1650553409), Some(17985))),
+ (17986, (Some(29286), Some(1853120844), Some(17986))),
+ (17987, (Some(29286), Some(1853120844), Some(17987))),
+ (17991, (Some(29286), Some(1853120844), Some(17991))),
+ (17997, (Some(29286), Some(1853120844), Some(17997))),
+ (18000, (Some(29286), Some(1853120844), Some(18000))),
+ (18004, (Some(29286), Some(1853120844), Some(18004))),
+ (18007, (Some(29286), Some(1853120844), Some(18007))),
+ (18242, (Some(26466), Some(1819441475), Some(18242))),
+ (18243, (Some(29286), Some(1853120844), Some(18243))),
+ (18245, (Some(29281), Some(1650553409), Some(18245))),
+ (18251, (Some(31083), Some(1819441475), Some(18251))),
+ (18253, (Some(26477), Some(1853120844), Some(18253))),
+ (18256, (Some(6910068), Some(1853120844), Some(18256))),
+ (18260, (Some(29286), Some(1853120844), Some(18260))),
+ (18261, (Some(30579), Some(1853120844), Some(18261))),
+ (18498, (Some(29281), Some(1650553409), Some(18498))),
+ (18499, (Some(25956), Some(1853120844), Some(18499))),
+ (18501, (Some(29281), Some(1650553409), Some(18501))),
+ (18503, (Some(27489), Some(1853120844), Some(18503))),
+ (18507, (Some(28011), Some(1919772747), Some(18507))),
+ (18512, (Some(7104870), Some(1853120844), Some(18512))),
+ (18516, (Some(26740), Some(1767991380), Some(18516))),
+ (18754, (Some(28274), Some(1853120844), Some(18754))),
+ (18755, (Some(29286), Some(1853120844), Some(18755))),
+ (18758, (Some(26982), Some(1853120844), Some(18758))),
+ (18764, (Some(25956), Some(1853120844), Some(18764))),
+ (18766, (Some(29541), Some(1853120844), Some(18766))),
+ (18771, (Some(27763), Some(1853120844), Some(18771))),
+ (19010, (Some(29286), Some(1853120844), Some(19010))),
+ (19012, (Some(24929), Some(1853120844), Some(19012))),
+ (19027, (Some(25198), Some(1853120844), Some(19027))),
+ (19028, (Some(26484), Some(1819441475), Some(19028))),
+ (19268, (Some(24932), Some(1853120844), Some(19268))),
+ (19272, (Some(26746), Some(1953390920), Some(19272))),
+ (19276, (Some(26995), Some(1752066387), Some(19276))),
+ (19277, (Some(27501), Some(1819441475), Some(19277))),
+ (19280, (Some(29301), Some(1650553409), Some(19280))),
+ (19283, (Some(27507), Some(1853120844), Some(19283))),
+ (19284, (Some(7105396), Some(1853120844), Some(19284))),
+ (19288, (Some(29043), Some(1853120844), Some(19288))),
+ (19521, (Some(29043), Some(1853120844), Some(19521))),
+ (19522, (Some(29286), Some(1853120844), Some(19522))),
+ (19523, (Some(29541), Some(1853120844), Some(19523))),
+ (19527, (Some(27755), Some(1853120844), Some(19527))),
+ (19529, (Some(25960), Some(1919051080), Some(19529))),
+ (19533, (Some(28002), Some(1853120844), Some(19533))),
+ (19534, (Some(27758), Some(1853120844), Some(19534))),
+ (19536, (Some(27760), Some(1853120844), Some(19536))),
+ (19540, (Some(29808), Some(1853120844), Some(19540))),
+ (19777, (Some(31080), Some(1852666433), Some(19777))),
+ (19779, (Some(29286), Some(1853120844), Some(19779))),
+ (19784, (None, Some(1853120844), Some(19784))),
+ (19787, (Some(29281), Some(1650553409), Some(19787))),
+ (19789, (Some(31085), Some(1919777101), Some(19789))),
+ (19791, (Some(29281), Some(1650553409), Some(19791))),
+ (19792, (Some(29286), Some(1853120844), Some(19792))),
+ (19795, (Some(29801), Some(1853120844), Some(19795))),
+ (19796, (Some(27508), Some(1853120844), Some(19796))),
+ (20034, (Some(29549), Some(1853120844), Some(20034))),
+ (20035, (Some(26746), Some(1936613704), Some(20035))),
+ (20039, (Some(29286), Some(1853120844), Some(20039))),
+ (20040, (Some(29541), Some(1853120844), Some(20040))),
+ (20041, (Some(26984), Some(1635149124), Some(20041))),
+ (20045, (Some(28269), Some(1819441475), Some(20045))),
+ (20051, (Some(29286), Some(1853120844), Some(20051))),
+ (20052, (Some(29281), Some(1650553409), Some(20052))),
+ (20054, (Some(26998), Some(1853120844), Some(20054))),
+ (20289, (Some(29808), Some(1853120844), Some(20289))),
+ (20290, (Some(29541), Some(1853120844), Some(20290))),
+ (20291, (Some(29541), Some(1853120844), Some(20291))),
+ (20292, (Some(29541), Some(1853120844), Some(20292))),
+ (20294, (Some(28518), Some(1853120844), Some(20294))),
+ (20298, (Some(29281), Some(1650553409), Some(20298))),
+ (20301, (Some(26746), Some(1953390920), Some(20301))),
+ (20302, (Some(25198), Some(1853120844), Some(20302))),
+ (20305, (Some(28261), Some(1853120844), Some(18244))),
+ (20306, (Some(28530), Some(1853120844), Some(20306))),
+ (20307, (Some(28531), Some(1853120844), Some(20307))),
+ (20308, (Some(28532), Some(1853120844), Some(20308))),
+ (20547, (None, Some(1853120844), Some(20547))),
+ (20551, (Some(29286), Some(1853120844), Some(20551))),
+ (20554, (Some(24938), Some(1851879498), Some(20554))),
+ (20555, (Some(28523), Some(1701998411), Some(20555))),
+ (20558, (Some(25966), Some(1635149124), Some(20558))),
+ (20801, (None, Some(1853120844), Some(20801))),
+ (20802, (Some(7364976), Some(1853120844), Some(20802))),
+ (20807, (Some(29541), Some(1853120844), Some(20807))),
+ (20809, (Some(29281), Some(1650553409), Some(20809))),
+ (20813, (Some(29286), Some(1853120844), Some(20813))),
+ (21057, (Some(29541), Some(1853120844), Some(21057))),
+ (21058, (Some(29808), Some(1853120844), Some(21058))),
+ (21059, (Some(29541), Some(1853120844), Some(21059))),
+ (21061, (Some(26996), Some(1768453189), Some(21061))),
+ (21062, (Some(29286), Some(1853120844), Some(21062))),
+ (21063, (Some(27749), Some(1801810503), Some(21063))),
+ (21064, (Some(29288), Some(1853120844), Some(21064))),
+ (21065, (Some(24934), Some(1650553409), Some(21065))),
+ (21067, (Some(28523), Some(1701998411), Some(21067))),
+ (21069, (Some(29281), Some(1650553409), Some(21069))),
+ (21072, (Some(29541), Some(1853120844), Some(21072))),
+ (21075, (Some(27758), Some(1853120844), Some(21075))),
+ (21076, (Some(29300), Some(1853120844), Some(21076))),
+ (21313, (Some(28019), Some(1853120844), Some(21313))),
+ (21317, (Some(29541), Some(1853120844), Some(21317))),
+ (21319, (None, Some(1853120844), Some(21319))),
+ (21321, (Some(29545), Some(1853120844), Some(21321))),
+ (21324, (Some(29811), Some(1853120844), Some(21324))),
+ (21328, (Some(29281), Some(1650553409), Some(21328))),
+ (21330, (Some(29299), Some(1819441475), Some(21330))),
+ (21335, (Some(28019), Some(1853120844), Some(21335))),
+ (21569, (Some(25956), Some(1853120844), Some(21569))),
+ (21570, (Some(31332), Some(1952606548), Some(21570))),
+ (21573, (Some(28001), Some(1768453189), Some(21573))),
+ (21575, (Some(29541), Some(1853120844), Some(21575))),
+ (21576, (Some(29800), Some(1853120844), Some(21576))),
+ (21577, (Some(29801), Some(1853120844), Some(21577))),
+ (21580, (Some(29804), Some(1853120844), Some(21580))),
+ (21581, (Some(29805), Some(1853120844), Some(21581))),
+ (21584, (Some(29808), Some(1853120844), Some(21584))),
+ (21587, (Some(29808), Some(1853120844), Some(21587))),
+ (21593, (Some(29286), Some(1853120844), Some(21593))),
+ (21827, (Some(29541), Some(1853120844), Some(21827))),
+ (21829, (Some(28261), Some(1853120844), Some(16967))),
+ (21832, (Some(30056), Some(1853120844), Some(21832))),
+ (21836, (Some(29286), Some(1853120844), Some(21836))),
+ (21837, (Some(6645357), Some(1853120844), Some(21837))),
+ (21842, (Some(30066), Some(1819441475), Some(21842))),
+ (21846, (Some(26978), Some(1853120844), Some(21846))),
+ (22082, (None, Some(1853120844), Some(22082))),
+ (22083, (Some(29808), Some(1853120844), Some(22083))),
+ (22092, (Some(30316), Some(1853120844), Some(22092))),
+ (22093, (Some(30308), Some(1633773652), Some(22093))),
+ (22099, (Some(29541), Some(1853120844), Some(22099))),
+ (22100, (Some(7108212), Some(1853120844), Some(22100))),
+ (22337, (Some(27758), Some(1853120844), Some(22337))),
+ (22339, (Some(7364976), Some(1853120844), Some(22339))),
+ (22343, (Some(29808), Some(1853120844), Some(22343))),
+ (22347, (Some(29281), Some(1650553409), Some(22347))),
+ (22352, (Some(7692656), Some(1853120844), Some(22352))),
+ (22354, (Some(30578), Some(1853120844), Some(22354))),
+ (22356, (Some(26746), Some(1953390920), Some(22356))),
+ (22362, (Some(28275), Some(1853120844), Some(22362))),
+ (22593, (Some(30323), Some(1853120844), Some(22593))),
+ (22605, (Some(29541), Some(1853120844), Some(22605))),
+ (22850, (Some(25954), Some(1819441475), Some(22850))),
+ (22851, (Some(27749), Some(1801810503), Some(22851))),
+ (22860, (Some(29281), Some(1650553409), Some(22860))),
+ (22861, (Some(29549), Some(1853120844), Some(22861))),
+ (22864, (Some(28263), Some(1853120844), Some(22864))),
+ (22867, (Some(29281), Some(1650553409), Some(22867))),
+ (22869, (Some(29541), Some(1853120844), Some(22869))),
+ (23105, (Some(31329), Some(1853120844), Some(23105))),
+ (23107, (Some(29539), Some(1853120844), Some(23107))),
+ (23108, (Some(29281), Some(1650553409), Some(23108))),
+ (23109, (Some(25956), Some(1853120844), Some(23109))),
+ (23115, (Some(30066), Some(1819441475), Some(23115))),
+ (23117, (Some(29808), Some(1853120844), Some(23117))),
+ (23124, (Some(30579), Some(1853120844), Some(23124))),
+ (23125, (Some(31349), Some(1853120844), Some(23125))),
+ (3158832, (Some(26746), Some(1936613704), Some(20035))),
+ (3159345, (Some(30066), Some(1819441475), Some(21842))),
+ (3223856, (Some(28261), Some(1853120844), Some(18254))),
+ (3224112, (Some(28261), Some(1853120844), Some(21333))),
+ (3224881, (Some(30066), Some(1819441475), Some(21842))),
+ (3225136, (Some(28019), Some(1853120844), Some(21335))),
+ (3289136, (Some(28261), Some(1853120844), Some(18254))),
+ (3289138, (Some(28261), Some(1853120844), Some(18254))),
+ (3290161, (Some(26746), Some(1936613704), Some(20035))),
+ (3354672, (Some(28261), Some(1853120844), Some(21333))),
+ (3354928, (Some(29541), Some(1853120844), Some(22605))),
+ (3355697, (Some(31349), Some(1853120844), Some(23125))),
+ (3355952, (Some(28261), Some(1853120844), Some(21825))),
+ (3420464, (Some(30579), Some(1853120844), Some(23124))),
+ (3420976, (Some(26984), Some(1635149124), Some(20041))),
+ (3421488, (Some(28261), Some(1853120844), Some(18256))),
+ (3421489, (Some(28261), Some(1853120844), Some(16967))),
+ (3485744, (Some(29808), Some(1853120844), Some(21058))),
+ (3486000, (Some(29281), Some(1650553409), Some(18245))),
+ (3486512, (Some(25705), Some(1853120844), Some(17481))),
+ (3486769, (Some(29281), Some(1650553409), Some(16723))),
+ (3487025, (Some(25956), Some(1853120844), Some(17732))),
+ (3617072, (Some(30579), Some(1853120844), Some(17475))),
+ (3618096, (Some(28261), Some(1853120844), Some(21831))),
+ (3682608, (Some(28261), Some(1853120844), Some(16730))),
+ (3747888, (Some(28261), Some(1853120844), Some(21825))),
+ (3748144, (Some(28261), Some(1853120844), Some(21333))),
+ (3748148, (Some(29541), Some(1853120844), Some(3748148))),
+ (3748400, (Some(29541), Some(1853120844), Some(21827))),
+ (3748656, (Some(29801), Some(1853120844), Some(21577))),
+];
diff --git a/third_party/rust/unic-langid-impl/src/parser/errors.rs b/third_party/rust/unic-langid-impl/src/parser/errors.rs
new file mode 100644
index 0000000000..acc36bff96
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/parser/errors.rs
@@ -0,0 +1,20 @@
+use std::error::Error;
+use std::fmt::{self, Display};
+
+#[derive(Debug, PartialEq)]
+pub enum ParserError {
+ InvalidLanguage,
+ InvalidSubtag,
+}
+
+impl Error for ParserError {}
+
+impl Display for ParserError {
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+ let value = match self {
+ ParserError::InvalidLanguage => "The given language subtag is invalid",
+ ParserError::InvalidSubtag => "Invalid subtag",
+ };
+ f.write_str(value)
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/src/parser/mod.rs b/third_party/rust/unic-langid-impl/src/parser/mod.rs
new file mode 100644
index 0000000000..d750ebba98
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/parser/mod.rs
@@ -0,0 +1,83 @@
+pub mod errors;
+
+use std::iter::Peekable;
+
+pub use self::errors::ParserError;
+use crate::subtags;
+use crate::LanguageIdentifier;
+
+pub fn parse_language_identifier_from_iter<'a>(
+ iter: &mut Peekable<impl Iterator<Item = &'a [u8]>>,
+ allow_extension: bool,
+) -> Result<LanguageIdentifier, ParserError> {
+ let language = if let Some(subtag) = iter.next() {
+ subtags::Language::from_bytes(subtag)?
+ } else {
+ subtags::Language::default()
+ };
+
+ let mut script = None;
+ let mut region = None;
+ let mut variants = vec![];
+
+ let mut position = 1;
+
+ while let Some(subtag) = iter.peek() {
+ if position == 1 {
+ if let Ok(s) = subtags::Script::from_bytes(subtag) {
+ script = Some(s);
+ position = 2;
+ } else if let Ok(s) = subtags::Region::from_bytes(subtag) {
+ region = Some(s);
+ position = 3;
+ } else if let Ok(v) = subtags::Variant::from_bytes(subtag) {
+ variants.push(v);
+ position = 3;
+ } else {
+ break;
+ }
+ } else if position == 2 {
+ if let Ok(s) = subtags::Region::from_bytes(subtag) {
+ region = Some(s);
+ position = 3;
+ } else if let Ok(v) = subtags::Variant::from_bytes(subtag) {
+ variants.push(v);
+ position = 3;
+ } else {
+ break;
+ }
+ } else {
+ // Variants
+ if let Ok(v) = subtags::Variant::from_bytes(subtag) {
+ variants.push(v);
+ } else {
+ break;
+ }
+ }
+ iter.next();
+ }
+
+ if !allow_extension && iter.peek().is_some() {
+ return Err(ParserError::InvalidSubtag);
+ }
+
+ let variants = if variants.is_empty() {
+ None
+ } else {
+ variants.sort_unstable();
+ variants.dedup();
+ Some(variants.into_boxed_slice())
+ };
+
+ Ok(LanguageIdentifier {
+ language,
+ script,
+ region,
+ variants,
+ })
+}
+
+pub fn parse_language_identifier(t: &[u8]) -> Result<LanguageIdentifier, ParserError> {
+ let mut iter = t.split(|c| *c == b'-' || *c == b'_').peekable();
+ parse_language_identifier_from_iter(&mut iter, false)
+}
diff --git a/third_party/rust/unic-langid-impl/src/serde.rs b/third_party/rust/unic-langid-impl/src/serde.rs
new file mode 100644
index 0000000000..faac0b0288
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/serde.rs
@@ -0,0 +1,60 @@
+use crate::LanguageIdentifier;
+use serde::{Deserialize, Deserializer, Serialize, Serializer};
+
+impl Serialize for LanguageIdentifier {
+ fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+ where
+ S: Serializer,
+ {
+ serializer.serialize_str(&self.to_string())
+ }
+}
+
+impl<'de> Deserialize<'de> for LanguageIdentifier {
+ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+ where
+ D: Deserializer<'de>,
+ {
+ struct LanguageIdentifierVisitor;
+
+ impl<'de> serde::de::Visitor<'de> for LanguageIdentifierVisitor {
+ type Value = LanguageIdentifier;
+
+ fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ write!(formatter, "A valid Unicode Language Identifier")
+ }
+
+ fn visit_str<E>(self, s: &str) -> Result<Self::Value, E>
+ where
+ E: serde::de::Error,
+ {
+ s.parse::<LanguageIdentifier>()
+ .map_err(serde::de::Error::custom)
+ }
+ }
+
+ deserializer.deserialize_string(LanguageIdentifierVisitor)
+ }
+}
+
+#[test]
+fn serialize() -> Result<(), Box<dyn std::error::Error>> {
+ let fr = serde_json::json!("fr".parse::<LanguageIdentifier>()?);
+ let en = serde_json::json!("en-US".parse::<LanguageIdentifier>()?);
+
+ assert_eq!(serde_json::to_string(&fr)?, r#""fr""#);
+ assert_eq!(serde_json::to_string(&en)?, r#""en-US""#);
+
+ Ok(())
+}
+
+#[test]
+fn deserialize() -> Result<(), Box<dyn std::error::Error>> {
+ let fr = serde_json::from_str::<LanguageIdentifier>(r#""fr""#)?;
+ let en = serde_json::from_str::<LanguageIdentifier>(r#""en-US""#)?;
+
+ assert_eq!(fr, "fr".parse::<LanguageIdentifier>()?);
+ assert_eq!(en, "en-US".parse::<LanguageIdentifier>()?);
+
+ Ok(())
+}
diff --git a/third_party/rust/unic-langid-impl/src/subtags/language.rs b/third_party/rust/unic-langid-impl/src/subtags/language.rs
new file mode 100644
index 0000000000..8b25bb609f
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/subtags/language.rs
@@ -0,0 +1,108 @@
+use crate::parser::errors::ParserError;
+use std::borrow::Borrow;
+use std::convert::TryFrom;
+use std::str::FromStr;
+use tinystr::TinyStr8;
+
+#[derive(Default, Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord, Copy)]
+pub struct Language(Option<TinyStr8>);
+
+impl Language {
+ pub fn from_bytes(v: &[u8]) -> Result<Self, ParserError> {
+ let slen = v.len();
+
+ let s = TinyStr8::from_bytes(v).map_err(|_| ParserError::InvalidLanguage)?;
+ if slen < 2 || slen > 8 || slen == 4 || !s.is_ascii_alphabetic() {
+ return Err(ParserError::InvalidLanguage);
+ }
+
+ let value = s.to_ascii_lowercase();
+
+ if value == "und" {
+ Ok(Self(None))
+ } else {
+ Ok(Self(Some(value)))
+ }
+ }
+
+ pub fn as_str(&self) -> &str {
+ self.0.as_deref().unwrap_or("und")
+ }
+
+ /// # Safety
+ ///
+ /// This function accepts any u64 that is exected to be a valid
+ /// `TinyStr8` and a valid `Language` subtag.
+ pub const unsafe fn from_raw_unchecked(v: u64) -> Self {
+ Self(Some(TinyStr8::from_bytes_unchecked(v.to_le_bytes())))
+ }
+
+ pub fn matches<O: Borrow<Self>>(
+ self,
+ other: O,
+ self_as_range: bool,
+ other_as_range: bool,
+ ) -> bool {
+ (self_as_range && self.0.is_none())
+ || (other_as_range && other.borrow().0.is_none())
+ || self == *other.borrow()
+ }
+
+ pub fn clear(&mut self) {
+ self.0 = None;
+ }
+
+ pub fn is_empty(self) -> bool {
+ self.0.is_none()
+ }
+}
+
+impl From<Language> for Option<u64> {
+ fn from(input: Language) -> Self {
+ input.0.map(|i| u64::from_le_bytes(*i.all_bytes()))
+ }
+}
+
+impl From<&Language> for Option<u64> {
+ fn from(input: &Language) -> Self {
+ input.0.map(|i| u64::from_le_bytes(*i.all_bytes()))
+ }
+}
+
+impl<T> TryFrom<Option<T>> for Language
+where
+ T: AsRef<[u8]>,
+{
+ type Error = ParserError;
+
+ fn try_from(v: Option<T>) -> Result<Self, Self::Error> {
+ match v {
+ Some(l) => Ok(Self::from_bytes(l.as_ref())?),
+ None => Ok(Self(None)),
+ }
+ }
+}
+
+impl FromStr for Language {
+ type Err = ParserError;
+
+ fn from_str(source: &str) -> Result<Self, Self::Err> {
+ Self::from_bytes(source.as_bytes())
+ }
+}
+
+impl std::fmt::Display for Language {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ if let Some(ref lang) = self.0 {
+ f.write_str(lang)
+ } else {
+ f.write_str("und")
+ }
+ }
+}
+
+impl PartialEq<&str> for Language {
+ fn eq(&self, other: &&str) -> bool {
+ self.as_str() == *other
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/src/subtags/mod.rs b/third_party/rust/unic-langid-impl/src/subtags/mod.rs
new file mode 100644
index 0000000000..2d0a7e3a42
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/subtags/mod.rs
@@ -0,0 +1,9 @@
+mod language;
+mod region;
+mod script;
+mod variant;
+
+pub use language::Language;
+pub use region::Region;
+pub use script::Script;
+pub use variant::Variant;
diff --git a/third_party/rust/unic-langid-impl/src/subtags/region.rs b/third_party/rust/unic-langid-impl/src/subtags/region.rs
new file mode 100644
index 0000000000..b7febe2025
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/subtags/region.rs
@@ -0,0 +1,74 @@
+use crate::parser::errors::ParserError;
+use std::str::FromStr;
+use tinystr::TinyStr4;
+
+#[derive(Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord, Copy)]
+pub struct Region(TinyStr4);
+
+impl Region {
+ pub fn from_bytes(v: &[u8]) -> Result<Self, ParserError> {
+ let slen = v.len();
+
+ match slen {
+ 2 => {
+ let s = TinyStr4::from_bytes(v).map_err(|_| ParserError::InvalidSubtag)?;
+ if !s.is_ascii_alphabetic() {
+ return Err(ParserError::InvalidSubtag);
+ }
+ Ok(Self(s.to_ascii_uppercase()))
+ }
+ 3 => {
+ let s = TinyStr4::from_bytes(v).map_err(|_| ParserError::InvalidSubtag)?;
+ if !s.is_ascii_numeric() {
+ return Err(ParserError::InvalidSubtag);
+ }
+ Ok(Self(s))
+ }
+ _ => Err(ParserError::InvalidSubtag),
+ }
+ }
+
+ pub fn as_str(&self) -> &str {
+ self.0.as_str()
+ }
+
+ /// # Safety
+ ///
+ /// This function accepts any u64 that is exected to be a valid
+ /// `TinyStr4` and a valid `Region` subtag.
+ pub const unsafe fn from_raw_unchecked(v: u32) -> Self {
+ Self(TinyStr4::from_bytes_unchecked(v.to_le_bytes()))
+ }
+}
+
+impl From<Region> for u32 {
+ fn from(input: Region) -> Self {
+ u32::from_le_bytes(*input.0.all_bytes())
+ }
+}
+
+impl<'l> From<&'l Region> for &'l str {
+ fn from(input: &'l Region) -> Self {
+ input.0.as_str()
+ }
+}
+
+impl FromStr for Region {
+ type Err = ParserError;
+
+ fn from_str(source: &str) -> Result<Self, Self::Err> {
+ Self::from_bytes(source.as_bytes())
+ }
+}
+
+impl std::fmt::Display for Region {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+impl PartialEq<&str> for Region {
+ fn eq(&self, other: &&str) -> bool {
+ self.as_str() == *other
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/src/subtags/script.rs b/third_party/rust/unic-langid-impl/src/subtags/script.rs
new file mode 100644
index 0000000000..8cb38c8d52
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/subtags/script.rs
@@ -0,0 +1,62 @@
+use crate::parser::errors::ParserError;
+use std::str::FromStr;
+use tinystr::TinyStr4;
+
+#[derive(Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord, Copy)]
+pub struct Script(TinyStr4);
+
+impl Script {
+ pub fn from_bytes(v: &[u8]) -> Result<Self, ParserError> {
+ let slen = v.len();
+
+ let s = TinyStr4::from_bytes(v).map_err(|_| ParserError::InvalidSubtag)?;
+ if slen != 4 || !s.is_ascii_alphabetic() {
+ return Err(ParserError::InvalidSubtag);
+ }
+ Ok(Self(s.to_ascii_titlecase()))
+ }
+
+ pub fn as_str(&self) -> &str {
+ self.0.as_str()
+ }
+
+ /// # Safety
+ ///
+ /// This function accepts any u64 that is exected to be a valid
+ /// `TinyStr4` and a valid `Script` subtag.
+ pub const unsafe fn from_raw_unchecked(v: u32) -> Self {
+ Self(TinyStr4::from_bytes_unchecked(v.to_le_bytes()))
+ }
+}
+
+impl From<Script> for u32 {
+ fn from(input: Script) -> Self {
+ u32::from_le_bytes(*input.0.all_bytes())
+ }
+}
+
+impl<'l> From<&'l Script> for &'l str {
+ fn from(input: &'l Script) -> Self {
+ input.0.as_str()
+ }
+}
+
+impl FromStr for Script {
+ type Err = ParserError;
+
+ fn from_str(source: &str) -> Result<Self, Self::Err> {
+ Self::from_bytes(source.as_bytes())
+ }
+}
+
+impl std::fmt::Display for Script {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+impl PartialEq<&str> for Script {
+ fn eq(&self, other: &&str) -> bool {
+ self.as_str() == *other
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/src/subtags/variant.rs b/third_party/rust/unic-langid-impl/src/subtags/variant.rs
new file mode 100644
index 0000000000..8b29a458ec
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/src/subtags/variant.rs
@@ -0,0 +1,78 @@
+use crate::parser::errors::ParserError;
+use std::str::FromStr;
+use tinystr::TinyStr8;
+
+#[derive(Debug, PartialEq, Eq, Clone, Hash, PartialOrd, Ord, Copy)]
+pub struct Variant(TinyStr8);
+
+impl Variant {
+ pub fn from_bytes(v: &[u8]) -> Result<Self, ParserError> {
+ let slen = v.len();
+
+ if slen < 4 || slen > 8 {
+ return Err(ParserError::InvalidSubtag);
+ }
+
+ let s = TinyStr8::from_bytes(v).map_err(|_| ParserError::InvalidSubtag)?;
+
+ if (slen >= 5 && !s.is_ascii_alphanumeric())
+ || (slen == 4
+ && !v[0].is_ascii_digit()
+ && v[1..].iter().any(|c: &u8| !c.is_ascii_alphanumeric()))
+ {
+ return Err(ParserError::InvalidSubtag);
+ }
+
+ Ok(Self(s.to_ascii_lowercase()))
+ }
+
+ pub fn as_str(&self) -> &str {
+ self.0.as_str()
+ }
+
+ /// # Safety
+ ///
+ /// This function accepts any u64 that is exected to be a valid
+ /// `TinyStr8` and a valid `Variant` subtag.
+ pub const unsafe fn from_raw_unchecked(v: u64) -> Self {
+ Self(TinyStr8::from_bytes_unchecked(v.to_le_bytes()))
+ }
+}
+
+impl From<Variant> for u64 {
+ fn from(input: Variant) -> Self {
+ u64::from_le_bytes(*input.0.all_bytes())
+ }
+}
+
+impl From<&Variant> for u64 {
+ fn from(input: &Variant) -> Self {
+ u64::from_le_bytes(*input.0.all_bytes())
+ }
+}
+
+impl FromStr for Variant {
+ type Err = ParserError;
+
+ fn from_str(source: &str) -> Result<Self, Self::Err> {
+ Self::from_bytes(source.as_bytes())
+ }
+}
+
+impl std::fmt::Display for Variant {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+ f.write_str(&self.0)
+ }
+}
+
+impl PartialEq<&str> for Variant {
+ fn eq(&self, other: &&str) -> bool {
+ self.as_str() == *other
+ }
+}
+
+impl PartialEq<str> for Variant {
+ fn eq(&self, other: &str) -> bool {
+ self.as_str() == other
+ }
+}
diff --git a/third_party/rust/unic-langid-impl/tests/canonicalize_test.rs b/third_party/rust/unic-langid-impl/tests/canonicalize_test.rs
new file mode 100644
index 0000000000..b0195828b3
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/tests/canonicalize_test.rs
@@ -0,0 +1,13 @@
+use unic_langid_impl::canonicalize;
+
+fn assert_canonicalize(input: &str, output: &str) {
+ assert_eq!(&canonicalize(input).unwrap(), output);
+}
+
+#[test]
+fn test_canonicalize() {
+ assert_canonicalize("Pl", "pl");
+ assert_canonicalize("eN-uS", "en-US");
+ assert_canonicalize("ZH_hans_hK", "zh-Hans-HK");
+ assert_canonicalize("en-scouse-fonipa", "en-fonipa-scouse");
+}
diff --git a/third_party/rust/unic-langid-impl/tests/fixtures.rs b/third_party/rust/unic-langid-impl/tests/fixtures.rs
new file mode 100644
index 0000000000..27cd29b33a
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/tests/fixtures.rs
@@ -0,0 +1,75 @@
+use std::convert::TryInto;
+use std::error::Error;
+use std::fs::File;
+use std::path::Path;
+
+use unic_langid_impl::LanguageIdentifier;
+
+use serde::{Deserialize, Serialize};
+
+#[derive(Serialize, Deserialize)]
+struct LangIdTestInputData {
+ string: String,
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+struct LangIdTestOutputObject {
+ language: Option<String>,
+ script: Option<String>,
+ region: Option<String>,
+ #[serde(default)]
+ variants: Vec<String>,
+}
+
+#[derive(Serialize, Deserialize, Debug)]
+#[serde(untagged)]
+enum LangIdTestOutput {
+ String(String),
+ Object(LangIdTestOutputObject),
+}
+
+#[derive(Serialize, Deserialize)]
+struct LangIdTestSet {
+ input: LangIdTestInputData,
+ output: LangIdTestOutput,
+}
+
+fn read_langid_testsets<P: AsRef<Path>>(path: P) -> Result<Vec<LangIdTestSet>, Box<dyn Error>> {
+ let file = File::open(path)?;
+ let sets = serde_json::from_reader(file)?;
+ Ok(sets)
+}
+
+fn test_langid_fixtures(path: &str) {
+ let tests = read_langid_testsets(path).unwrap();
+
+ for test in tests {
+ let s = test.input.string;
+
+ let langid: LanguageIdentifier = s.parse().expect("Parsing failed.");
+
+ match test.output {
+ LangIdTestOutput::Object(o) => {
+ let expected = LanguageIdentifier::from_parts(
+ o.language.try_into().unwrap(),
+ o.script.as_ref().map(|s| s.parse().unwrap()),
+ o.region.as_ref().map(|r| r.parse().unwrap()),
+ o.variants
+ .iter()
+ .map(|s| s.parse().unwrap())
+ .collect::<Vec<_>>()
+ .as_ref(),
+ );
+ assert_eq!(langid, expected);
+ }
+ LangIdTestOutput::String(s) => {
+ assert_eq!(langid.to_string(), s);
+ }
+ }
+ }
+}
+
+#[test]
+fn parse() {
+ test_langid_fixtures("./tests/fixtures/parsing.json");
+}
diff --git a/third_party/rust/unic-langid-impl/tests/language_identifier_test.rs b/third_party/rust/unic-langid-impl/tests/language_identifier_test.rs
new file mode 100644
index 0000000000..79b81fb4fb
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/tests/language_identifier_test.rs
@@ -0,0 +1,192 @@
+use unic_langid_impl::parser::parse_language_identifier;
+use unic_langid_impl::subtags;
+use unic_langid_impl::CharacterDirection;
+use unic_langid_impl::LanguageIdentifier;
+
+fn assert_language_identifier(
+ loc: &LanguageIdentifier,
+ language: Option<&str>,
+ script: Option<&str>,
+ region: Option<&str>,
+ variants: Option<&[&str]>,
+) {
+ assert_eq!(
+ loc.language,
+ language.map_or(subtags::Language::default(), |l| {
+ subtags::Language::from_bytes(l.as_bytes()).unwrap()
+ })
+ );
+ assert_eq!(loc.script, script.map(|s| s.parse().unwrap()));
+ assert_eq!(loc.region, region.map(|r| r.parse().unwrap()));
+ let v = variants
+ .unwrap_or(&[])
+ .iter()
+ .map(|v| -> subtags::Variant { v.parse().unwrap() })
+ .collect::<Vec<_>>();
+ assert_eq!(
+ loc.variants().collect::<Vec<_>>(),
+ v.iter().collect::<Vec<_>>(),
+ );
+}
+
+fn assert_parsed_language_identifier(
+ input: &str,
+ language: Option<&str>,
+ script: Option<&str>,
+ region: Option<&str>,
+ variants: Option<&[&str]>,
+) {
+ let langid = parse_language_identifier(input.as_bytes()).unwrap();
+ assert_language_identifier(&langid, language, script, region, variants);
+}
+
+#[test]
+fn test_language_identifier_parser() {
+ assert_parsed_language_identifier("pl", Some("pl"), None, None, None);
+ assert_parsed_language_identifier("und", None, None, None, None);
+ assert_parsed_language_identifier("en-US", Some("en"), None, Some("US"), None);
+ assert_parsed_language_identifier("en-Latn-US", Some("en"), Some("Latn"), Some("US"), None);
+ assert_parsed_language_identifier("sl-nedis", Some("sl"), None, None, Some(&["nedis"]));
+}
+
+#[test]
+fn test_language_casing() {
+ assert_parsed_language_identifier("Pl", Some("pl"), None, None, None);
+ assert_parsed_language_identifier("En-uS", Some("en"), None, Some("US"), None);
+ assert_parsed_language_identifier("eN-lAtN-uS", Some("en"), Some("Latn"), Some("US"), None);
+ assert_parsed_language_identifier("ZH_cyrl_hN", Some("zh"), Some("Cyrl"), Some("HN"), None);
+}
+
+#[test]
+fn test_serialize_langid() {
+ let langid: LanguageIdentifier = "en-Latn-US".parse().unwrap();
+ assert_eq!(&langid.to_string(), "en-Latn-US");
+}
+
+#[test]
+fn test_sorted_variants() {
+ let langid: LanguageIdentifier = "en-nedis-macos".parse().unwrap();
+ assert_eq!(&langid.to_string(), "en-macos-nedis");
+
+ let langid = LanguageIdentifier::from_parts(
+ "en".parse().unwrap(),
+ None,
+ None,
+ &["nedis".parse().unwrap(), "macos".parse().unwrap()],
+ );
+ assert_eq!(&langid.to_string(), "en-macos-nedis");
+}
+
+#[test]
+fn test_from_parts_unchecked() {
+ let langid: LanguageIdentifier = "en-nedis-macos".parse().unwrap();
+ let (lang, script, region, variants) = langid.into_parts();
+ let langid = LanguageIdentifier::from_raw_parts_unchecked(
+ lang,
+ script,
+ region,
+ Some(variants.into_boxed_slice()),
+ );
+ assert_eq!(&langid.to_string(), "en-macos-nedis");
+}
+
+#[test]
+fn test_matches() {
+ let langid_en: LanguageIdentifier = "en".parse().unwrap();
+ let langid_en_us: LanguageIdentifier = "en-US".parse().unwrap();
+ let langid_en_us2: LanguageIdentifier = "en-US".parse().unwrap();
+ let langid_pl: LanguageIdentifier = "pl".parse().unwrap();
+ assert_eq!(langid_en.matches(&langid_en_us, false, false), false);
+ assert_eq!(langid_en_us.matches(&langid_en_us2, false, false), true);
+ assert_eq!(langid_en.matches(&langid_pl, false, false), false);
+ assert_eq!(langid_en.matches(&langid_en_us, true, false), true);
+}
+
+#[test]
+fn test_set_fields() {
+ let mut langid = LanguageIdentifier::default();
+ assert_eq!(&langid.to_string(), "und");
+
+ langid.language = "pl".parse().expect("Setting language failed");
+ assert_eq!(&langid.to_string(), "pl");
+
+ langid.language = "de".parse().expect("Setting language failed");
+ assert_eq!(&langid.to_string(), "de");
+ langid.region = Some("AT".parse().expect("Setting region failed"));
+ assert_eq!(&langid.to_string(), "de-AT");
+ langid.script = Some("Latn".parse().expect("Setting script failed"));
+ assert_eq!(&langid.to_string(), "de-Latn-AT");
+ langid.set_variants(&["macos".parse().expect("Setting variants failed")]);
+ assert_eq!(&langid.to_string(), "de-Latn-AT-macos");
+
+ assert_eq!(langid.has_variant("macos".parse().unwrap()), true);
+ assert_eq!(langid.has_variant("windows".parse().unwrap()), false);
+
+ langid.language.clear();
+ assert_eq!(&langid.to_string(), "und-Latn-AT-macos");
+ langid.region = None;
+ assert_eq!(&langid.to_string(), "und-Latn-macos");
+ langid.script = None;
+ assert_eq!(&langid.to_string(), "und-macos");
+ langid.clear_variants();
+ assert_eq!(&langid.to_string(), "und");
+
+ assert_eq!(langid.has_variant("macos".parse().unwrap()), false);
+}
+
+#[test]
+fn test_matches_as_range() {
+ let langid: LanguageIdentifier = "en-US".parse().unwrap();
+ let langid2: LanguageIdentifier = "en-US-windows".parse().unwrap();
+ assert_eq!(langid.matches(&langid2, false, false), false);
+ assert_eq!(langid.matches(&langid2, true, false), true);
+ assert_eq!(langid.matches(&langid2, false, true), false);
+ assert_eq!(langid.matches(&langid2, true, true), true);
+}
+
+#[test]
+fn test_character_direction() {
+ let langid: LanguageIdentifier = "en-US".parse().unwrap();
+ let langid2: LanguageIdentifier = "ar-AF".parse().unwrap();
+ assert_eq!(langid.character_direction(), CharacterDirection::LTR);
+ assert_eq!(langid2.character_direction(), CharacterDirection::RTL);
+}
+
+#[test]
+fn test_langid_ord() {
+ let input = &[
+ "en-US-macos-zarab",
+ "en-US-macos-nedis",
+ "en-US-macos",
+ "en-GB",
+ "en",
+ "en-US",
+ "ar",
+ "fr",
+ "de",
+ ];
+
+ let mut langids = input
+ .iter()
+ .map(|l| -> LanguageIdentifier { l.parse().unwrap() })
+ .collect::<Vec<_>>();
+
+ langids.sort();
+
+ let result = langids.iter().map(|l| l.to_string()).collect::<Vec<_>>();
+
+ assert_eq!(
+ &result,
+ &[
+ "ar",
+ "de",
+ "en",
+ "en-GB",
+ "en-US",
+ "en-US-macos",
+ "en-US-macos-nedis",
+ "en-US-macos-zarab",
+ "fr"
+ ]
+ );
+}
diff --git a/third_party/rust/unic-langid-impl/tests/likelysubtags.rs b/third_party/rust/unic-langid-impl/tests/likelysubtags.rs
new file mode 100644
index 0000000000..a378274f3c
--- /dev/null
+++ b/third_party/rust/unic-langid-impl/tests/likelysubtags.rs
@@ -0,0 +1,113 @@
+use unic_langid_impl::likelysubtags::{maximize, minimize, CLDR_VERSION};
+use unic_langid_impl::subtags;
+
+static STRINGS: &[(&str, Option<&str>)] = &[
+ ("en-US", Some("en-Latn-US")),
+ ("en-GB", Some("en-Latn-GB")),
+ ("es-AR", Some("es-Latn-AR")),
+ ("it", Some("it-Latn-IT")),
+ ("zh-Hans-CN", None),
+ ("de-AT", Some("de-Latn-AT")),
+ ("pl", Some("pl-Latn-PL")),
+ ("fr-FR", Some("fr-Latn-FR")),
+ ("de-AT", Some("de-Latn-AT")),
+ ("sr-Cyrl-SR", None),
+ ("nb-NO", Some("nb-Latn-NO")),
+ ("fr-FR", Some("fr-Latn-FR")),
+ ("mk", Some("mk-Cyrl-MK")),
+ ("uk", Some("uk-Cyrl-UA")),
+ ("und-PL", Some("pl-Latn-PL")),
+ ("und-Latn-AM", Some("ku-Latn-AM")),
+ ("ug-Cyrl", Some("ug-Cyrl-KZ")),
+ ("sr-ME", Some("sr-Latn-ME")),
+ ("mn-Mong", Some("mn-Mong-CN")),
+ ("lif-Limb", Some("lif-Limb-IN")),
+ ("gan", Some("gan-Hans-CN")),
+ ("zh-Hant", Some("zh-Hant-TW")),
+ ("yue-Hans", Some("yue-Hans-CN")),
+ ("unr", Some("unr-Beng-IN")),
+ ("unr-Deva", Some("unr-Deva-NP")),
+ ("und-Thai-CN", Some("lcp-Thai-CN")),
+ ("ug-Cyrl", Some("ug-Cyrl-KZ")),
+ ("en-Latn-DE", None),
+ ("pl-FR", Some("pl-Latn-FR")),
+ ("de-CH", Some("de-Latn-CH")),
+ ("tuq", Some("tuq-Latn")),
+ ("sr-ME", Some("sr-Latn-ME")),
+ ("ng", Some("ng-Latn-NA")),
+ ("klx", Some("klx-Latn")),
+ ("kk-Arab", Some("kk-Arab-CN")),
+ ("en-Cyrl", Some("en-Cyrl-US")),
+ ("und-Cyrl-UK", Some("ru-Cyrl-UK")),
+ ("und-Arab", Some("ar-Arab-EG")),
+ ("und-Arab-FO", Some("ar-Arab-FO")),
+ ("zh-TW", Some("zh-Hant-TW")),
+];
+
+fn extract_input(
+ s: &str,
+) -> (
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+) {
+ let chunks: Vec<&str> = s.split("-").collect();
+ let lang: subtags::Language = chunks[0].parse().unwrap();
+ let (script, region) = if let Some(s) = chunks.get(1) {
+ if let Ok(script) = s.parse() {
+ let region = chunks.get(2).map(|r| r.parse().unwrap());
+ (Some(script), region)
+ } else {
+ let region = s.parse().unwrap();
+ (None, Some(region))
+ }
+ } else {
+ (None, None)
+ };
+ (lang, script, region)
+}
+
+fn extract_output(
+ s: Option<&str>,
+) -> Option<(
+ subtags::Language,
+ Option<subtags::Script>,
+ Option<subtags::Region>,
+)> {
+ s.map(|s| {
+ let chunks: Vec<&str> = s.split("-").collect();
+ (
+ chunks[0].parse().unwrap(),
+ chunks.get(1).map(|s| s.parse().unwrap()),
+ chunks.get(2).map(|s| s.parse().unwrap()),
+ )
+ })
+}
+
+#[test]
+fn maximize_test() {
+ for i in STRINGS {
+ let chunks = extract_input(i.0);
+ let result = maximize(chunks.0, chunks.1, chunks.2);
+ assert_eq!(extract_output(i.1), result);
+ }
+}
+
+#[test]
+fn version_works() {
+ assert_eq!(CLDR_VERSION, "36");
+}
+
+#[test]
+fn minimize_test() {
+ let lang = "zh".parse().unwrap();
+ let script = "Hant".parse().unwrap();
+ let result = minimize(lang, Some(script), None);
+ assert_eq!(result, Some(extract_input("zh-TW")));
+
+ let lang = "en".parse().unwrap();
+ let script = "Latn".parse().unwrap();
+ let region = "US".parse().unwrap();
+ let result = minimize(lang, Some(script), Some(region));
+ assert_eq!(result, Some(extract_input("en")));
+}