├── .gitignore ├── package.json ├── changelog ├── benchmarks ├── FromIntBenchmark.elm ├── ToStringBenchmark.elm ├── AbsBenchmark.elm ├── AddBenchmark.elm ├── DivmodBenchmark.elm ├── FromStringBenchmark.elm ├── BenchmarkShared.elm ├── MulBenchmark.elm ├── PowBenchmark.elm ├── CompareBenchmark.elm ├── BigIntBenchmarks.elm └── elm.json ├── src ├── Constants.elm └── BigInt.elm ├── elm.json ├── README.md ├── LICENSE ├── review ├── elm.json └── src │ └── ReviewConfig.elm ├── tests └── BigIntTests.elm └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # elm-package generated files 2 | elm-stuff/ 3 | # elm-repl generated files 4 | repl-temp-* 5 | # elm-make Test.elm generated files 6 | index.html 7 | .idea 8 | node_modules 9 | 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "MIT", 3 | "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", 4 | "devDependencies": { 5 | "elm-review": "^2.13.3", 6 | "elm-test-rs": "^3.0.1-0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /changelog: -------------------------------------------------------------------------------- 1 | 1.0.2 2 | + Updated to 0.19 3 | + Mixed case hex strings are now valid. 4 | + (BigInt.fromString "") no longer equals (BigInt.fromString "0") 5 | + mod renamed to modBy. Returns Maybe instead of crashing now. `modBy 0 n` == Nothing 6 | + Fixed bug where `BigInt.fromInt 1234567812345678 |> BigInt.toString` would cause a crash. 7 | + BigInt.toHexString now prepends "0x" or "-0x". Hex strings should be produced as they are consumed. -------------------------------------------------------------------------------- /benchmarks/FromIntBenchmark.elm: -------------------------------------------------------------------------------- 1 | module FromIntBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BigInt as BI 6 | 7 | 8 | main : BenchmarkProgram 9 | main = 10 | program suite 11 | 12 | 13 | suite : Benchmark 14 | suite = 15 | describe "fromInt" 16 | [ benchmark "MAX_SAFE_INTEGER" (\_ -> BI.fromInt 9007199254740991) 17 | ] 18 | -------------------------------------------------------------------------------- /benchmarks/ToStringBenchmark.elm: -------------------------------------------------------------------------------- 1 | module ToStringBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "toString" 17 | [ benchmark "to int string" (\_ -> BI.toString bigInt) 18 | , benchmark "to hex string" (\_ -> BI.toHexString bigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/AbsBenchmark.elm: -------------------------------------------------------------------------------- 1 | module AbsBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "abs" 17 | [ benchmark "positive 32-digit number" (\_ -> BI.abs bigInt) 18 | , benchmark "negative 32-digit number" (\_ -> BI.abs negativeBigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/AddBenchmark.elm: -------------------------------------------------------------------------------- 1 | module AddBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "add" 17 | [ benchmark "two positive 32-digit numbers" (\_ -> BI.add bigInt bigInt) 18 | , benchmark "two negative 32-digit numbers" (\_ -> BI.add negativeBigInt negativeBigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/DivmodBenchmark.elm: -------------------------------------------------------------------------------- 1 | module DivmodBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "divmod" 17 | [ benchmark "one 32-digit number by 2" (\_ -> BI.divmod bigInt (BI.fromInt 2)) 18 | , benchmark "one 32-digit number by itself" (\_ -> BI.divmod bigInt bigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/FromStringBenchmark.elm: -------------------------------------------------------------------------------- 1 | module FromStringBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigIntHexString, bigIntString) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "fromString" 17 | [ benchmark "a 32-digit integer" (\_ -> BI.fromIntString bigIntString) 18 | , benchmark "a large hex string" (\_ -> BI.fromHexString bigIntHexString) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/BenchmarkShared.elm: -------------------------------------------------------------------------------- 1 | module BenchmarkShared exposing (bigInt, bigIntHexString, bigIntString, negativeBigInt) 2 | 3 | import BigInt as BI 4 | 5 | 6 | bigIntString : String 7 | bigIntString = 8 | "98765432100123456789987654321001234567899876543210012345678909" 9 | 10 | 11 | bigIntHexString : String 12 | bigIntHexString = 13 | "0xab5293028efd8c09b76aA37872902bbc1231def131" 14 | 15 | 16 | bigInt : BI.BigInt 17 | bigInt = 18 | BI.fromIntString bigIntString 19 | |> Maybe.withDefault (BI.fromInt 0) 20 | 21 | 22 | negativeBigInt : BI.BigInt 23 | negativeBigInt = 24 | BI.negate bigInt 25 | -------------------------------------------------------------------------------- /benchmarks/MulBenchmark.elm: -------------------------------------------------------------------------------- 1 | module MulBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "mul" 17 | [ benchmark "positive 32-digit number by itself" (\_ -> BI.mul bigInt bigInt) 18 | , benchmark "negative 32-digit number by positive 32-digit number" (\_ -> BI.mul negativeBigInt bigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/PowBenchmark.elm: -------------------------------------------------------------------------------- 1 | module PowBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "pow" 17 | [ benchmark "positive 32-digit to the power 21" (\_ -> BI.pow bigInt (BI.fromInt 21)) 18 | , benchmark "negative 32-digit to the power 21" (\_ -> BI.pow negativeBigInt (BI.fromInt 21)) 19 | ] 20 | -------------------------------------------------------------------------------- /benchmarks/CompareBenchmark.elm: -------------------------------------------------------------------------------- 1 | module CompareBenchmark exposing (main, suite) 2 | 3 | import Benchmark exposing (..) 4 | import Benchmark.Runner exposing (BenchmarkProgram, program) 5 | import BenchmarkShared exposing (bigInt, negativeBigInt) 6 | import BigInt as BI 7 | 8 | 9 | main : BenchmarkProgram 10 | main = 11 | program suite 12 | 13 | 14 | suite : Benchmark 15 | suite = 16 | describe "compare" 17 | [ benchmark "one 32-digit number with itself" (\_ -> BI.compare bigInt bigInt) 18 | , benchmark "one positive and one negative 32-digit number" (\_ -> BI.compare bigInt negativeBigInt) 19 | ] 20 | -------------------------------------------------------------------------------- /src/Constants.elm: -------------------------------------------------------------------------------- 1 | module Constants exposing (hexDigitMagnitude, maxDigitMagnitude, maxDigitValue) 2 | 3 | {-| 4 | 5 | @docs hexDigitMagnitude, maxDigitMagnitude, maxDigitValue 6 | 7 | -} 8 | 9 | 10 | {-| Seven base-10 digits is the most we can have where x \* x < the JS bigInt limit. 11 | 99999999 > sqrt(MAX\_SAFE\_INTEGER) > 9999999 12 | A slightly higher number is possible, but would require a major reworking of the string functions. 13 | -} 14 | maxDigitValue : Int 15 | maxDigitValue = 16 | -1 + 10 ^ maxDigitMagnitude 17 | 18 | 19 | maxDigitMagnitude : Int 20 | maxDigitMagnitude = 21 | 7 22 | 23 | 24 | hexDigitMagnitude : Int 25 | hexDigitMagnitude = 26 | 8 27 | -------------------------------------------------------------------------------- /elm.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "package", 3 | "name": "cmditch/elm-bigint", 4 | "summary": "Unlimited size integers", 5 | "license": "MIT", 6 | "version": "2.1.2", 7 | "exposed-modules": [ 8 | "BigInt" 9 | ], 10 | "elm-version": "0.19.0 <= v < 0.20.0", 11 | "dependencies": { 12 | "elm/core": "1.0.0 <= v < 2.0.0", 13 | "elm-community/list-extra": "8.0.0 <= v < 9.0.0", 14 | "elm-community/maybe-extra": "5.0.0 <= v < 6.0.0", 15 | "rtfeldman/elm-hex": "1.0.0 <= v < 2.0.0" 16 | }, 17 | "test-dependencies": { 18 | "elm/random": "1.0.0 <= v < 2.0.0", 19 | "elm-explorations/test": "2.2.0 <= v < 3.0.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /benchmarks/BigIntBenchmarks.elm: -------------------------------------------------------------------------------- 1 | module BigIntBenchmarks exposing (main) 2 | 3 | -- Individual Benchmarks 4 | 5 | import AbsBenchmark 6 | import AddBenchmark 7 | import Benchmark exposing (describe) 8 | import Benchmark.Runner exposing (BenchmarkProgram, program) 9 | import CompareBenchmark 10 | import DivmodBenchmark 11 | import FromIntBenchmark 12 | import FromStringBenchmark 13 | import MulBenchmark 14 | import ToStringBenchmark 15 | 16 | 17 | main : BenchmarkProgram 18 | main = 19 | program <| 20 | describe "BigInt" 21 | [ AbsBenchmark.suite 22 | , AddBenchmark.suite 23 | , CompareBenchmark.suite 24 | , DivmodBenchmark.suite 25 | , FromIntBenchmark.suite 26 | , FromStringBenchmark.suite 27 | , MulBenchmark.suite 28 | , ToStringBenchmark.suite 29 | ] 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bigint 2 | 3 | Elm's native integer type uses raw JavaScript integers which are limited in size ([MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)). Sometimes, we want more. 4 | 5 | This package provides a `BigInt` type and associated functions so that you can work with integers of unlimited size at the cost of some speed. Benchmarks included. 6 | 7 | ## Contributions 8 | are very welcome! 9 | 10 | ## Aknowledgements 11 | 12 | - Thank you [Javier Casas](https://github.com/javcasas) whose [elm-integer](https://github.com/javcasas/elm-integer) is the basis for this fork. 13 | - Thank you [gilbertkennen](https://github.com/gilbertkennen) whose [bigint](https://github.com/gilbertkennen/bigint) is basically the verbatim basis for this repository. 14 | - Thank you [hickscorp](https://github.com/hickscorp) whose [bigint](https://github.com/hickscorp/bigint) for the further work on top of the original BigInt library. 15 | -------------------------------------------------------------------------------- /benchmarks/elm.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "application", 3 | "source-directories": [ 4 | ".", 5 | "../src" 6 | ], 7 | "elm-version": "0.19.1", 8 | "dependencies": { 9 | "direct": { 10 | "elm/browser": "1.0.2", 11 | "elm/core": "1.0.5", 12 | "elm/html": "1.0.0", 13 | "elm/regex": "1.0.0", 14 | "elm-community/list-extra": "8.3.0", 15 | "elm-community/maybe-extra": "5.2.0", 16 | "elm-community/result-extra": "2.4.0", 17 | "elm-explorations/benchmark": "1.0.2", 18 | "rtfeldman/elm-hex": "1.0.0" 19 | }, 20 | "indirect": { 21 | "BrianHicks/elm-trend": "2.1.3", 22 | "elm/json": "1.1.3", 23 | "elm/time": "1.0.0", 24 | "elm/url": "1.0.0", 25 | "elm/virtual-dom": "1.0.2", 26 | "mdgriffith/style-elements": "5.0.2", 27 | "robinheghan/murmur3": "1.0.0" 28 | } 29 | }, 30 | "test-dependencies": { 31 | "direct": {}, 32 | "indirect": {} 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Javier Casas Velasco 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /review/elm.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "application", 3 | "source-directories": [ 4 | "src" 5 | ], 6 | "elm-version": "0.19.1", 7 | "dependencies": { 8 | "direct": { 9 | "elm/core": "1.0.5", 10 | "elm/json": "1.1.3", 11 | "elm/project-metadata-utils": "1.0.2", 12 | "jfmengels/elm-review": "2.15.1", 13 | "jfmengels/elm-review-code-style": "1.2.0", 14 | "jfmengels/elm-review-common": "1.3.3", 15 | "jfmengels/elm-review-debug": "1.0.8", 16 | "jfmengels/elm-review-documentation": "2.0.4", 17 | "jfmengels/elm-review-simplify": "2.1.9", 18 | "jfmengels/elm-review-unused": "1.2.4", 19 | "stil4m/elm-syntax": "7.3.9" 20 | }, 21 | "indirect": { 22 | "elm/bytes": "1.0.8", 23 | "elm/html": "1.0.0", 24 | "elm/parser": "1.1.0", 25 | "elm/random": "1.0.0", 26 | "elm/regex": "1.0.0", 27 | "elm/time": "1.0.0", 28 | "elm/virtual-dom": "1.0.4", 29 | "elm-explorations/test": "2.2.0", 30 | "pzp1997/assoc-list": "1.0.0", 31 | "rtfeldman/elm-hex": "1.0.0", 32 | "stil4m/structured-writer": "1.0.3" 33 | } 34 | }, 35 | "test-dependencies": { 36 | "direct": { 37 | "elm-explorations/test": "2.2.0" 38 | }, 39 | "indirect": {} 40 | } 41 | } -------------------------------------------------------------------------------- /review/src/ReviewConfig.elm: -------------------------------------------------------------------------------- 1 | module ReviewConfig exposing (config) 2 | 3 | {-| Do not rename the ReviewConfig module or the config function, because 4 | `elm-review` will look for these. 5 | 6 | To add packages that contain rules, add them to this review project using 7 | 8 | `elm install author/packagename` 9 | 10 | when inside the directory containing this file. 11 | 12 | -} 13 | 14 | import Docs.NoMissing exposing (exposedModules, onlyExposed) 15 | import Docs.ReviewAtDocs 16 | import Docs.ReviewLinksAndSections 17 | import Docs.UpToDateReadmeLinks 18 | import NoConfusingPrefixOperator 19 | import NoDebug.Log 20 | import NoDebug.TodoOrToString 21 | import NoExposingEverything 22 | import NoImportingEverything 23 | import NoMissingTypeAnnotation 24 | import NoMissingTypeAnnotationInLetIn 25 | import NoMissingTypeExpose 26 | import NoPrematureLetComputation 27 | import NoSimpleLetBody 28 | import NoUnused.CustomTypeConstructorArgs 29 | import NoUnused.CustomTypeConstructors 30 | import NoUnused.Dependencies 31 | import NoUnused.Exports 32 | import NoUnused.Parameters 33 | import NoUnused.Patterns 34 | import NoUnused.Variables 35 | import Review.Rule as Rule exposing (Rule) 36 | import Simplify 37 | 38 | 39 | config : List Rule 40 | config = 41 | [ Docs.NoMissing.rule 42 | { document = onlyExposed 43 | , from = exposedModules 44 | } 45 | , Docs.ReviewLinksAndSections.rule 46 | , Docs.ReviewAtDocs.rule 47 | , Docs.UpToDateReadmeLinks.rule 48 | , NoConfusingPrefixOperator.rule 49 | , NoDebug.Log.rule 50 | , NoDebug.TodoOrToString.rule 51 | |> Rule.ignoreErrorsForDirectories [ "tests/" ] 52 | , NoExposingEverything.rule 53 | , NoImportingEverything.rule [] 54 | , NoMissingTypeAnnotation.rule 55 | , NoMissingTypeAnnotationInLetIn.rule 56 | , NoMissingTypeExpose.rule 57 | , NoSimpleLetBody.rule 58 | , NoPrematureLetComputation.rule 59 | , NoUnused.CustomTypeConstructors.rule [] 60 | , NoUnused.CustomTypeConstructorArgs.rule 61 | , NoUnused.Dependencies.rule 62 | , NoUnused.Exports.rule 63 | , NoUnused.Parameters.rule 64 | , NoUnused.Patterns.rule 65 | , NoUnused.Variables.rule 66 | , Simplify.rule Simplify.defaults 67 | ] 68 | -------------------------------------------------------------------------------- /tests/BigIntTests.elm: -------------------------------------------------------------------------------- 1 | module BigIntTests exposing (absTests, addTests, compareTests, divmodTests, fromTests, gcdTests, isEvenTests, isOddTests, leadingZeroesTest, maxTests, minTests, modTests, mulTests, negateTests, powTests, roundRobinTests, stringTests, subTests) 2 | 3 | import BigInt exposing (BigInt, add, divmod, fromHexString, fromInt, fromIntString, gt, gte, isEven, isOdd, lt, lte, mul, pow, sub, toHexString) 4 | import Constants exposing (maxDigitValue) 5 | import Expect 6 | import Fuzz exposing (Fuzzer, int, intRange) 7 | import Hex 8 | import Random 9 | import Test exposing (Test, describe, fuzz, fuzz2, test) 10 | 11 | 12 | integer : Fuzzer BigInt 13 | integer = 14 | Fuzz.oneOf 15 | [ Fuzz.map fromInt 16 | (Fuzz.oneOfValues 17 | [ 0 18 | , 1 19 | , -1 20 | , 2 21 | , -2 22 | , 2 ^ 32 23 | , -(2 ^ 32) 24 | , 2 ^ 50 25 | , -(2 ^ 50) 26 | ] 27 | ) 28 | , Fuzz.map fromInt int 29 | , Fuzz.filterMap BigInt.fromIntString intString 30 | ] 31 | 32 | 33 | intString : Fuzzer String 34 | intString = 35 | let 36 | digit : Fuzzer Char 37 | digit = 38 | Fuzz.oneOfValues [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' ] 39 | in 40 | Fuzz.map String.fromList (Fuzz.listOfLengthBetween 1 64 digit) 41 | 42 | 43 | maxIntRange : Fuzzer Int 44 | maxIntRange = 45 | intRange Random.minInt Random.maxInt 46 | 47 | 48 | trickyIntRange : Fuzzer Int 49 | trickyIntRange = 50 | intRange 1234567811345670 1234567812345678 51 | 52 | 53 | smallPositiveIntegers : Fuzzer Int 54 | smallPositiveIntegers = 55 | intRange 0 Random.maxInt 56 | 57 | 58 | singleNonZeroInteger : Fuzzer BigInt 59 | singleNonZeroInteger = 60 | integer 61 | |> Fuzz.map 62 | (\i -> 63 | if i == zero then 64 | one 65 | 66 | else 67 | i 68 | ) 69 | 70 | 71 | nonZeroInteger : Fuzzer BigInt 72 | nonZeroInteger = 73 | Fuzz.map2 mul singleNonZeroInteger singleNonZeroInteger 74 | 75 | 76 | zero : BigInt 77 | zero = 78 | fromInt 0 79 | 80 | 81 | one : BigInt 82 | one = 83 | fromInt 1 84 | 85 | 86 | smallInt : Fuzzer Int 87 | smallInt = 88 | intRange (Basics.negate maxDigitValue) maxDigitValue 89 | 90 | 91 | tinyInt : Fuzzer Int 92 | tinyInt = 93 | intRange -5 5 94 | 95 | 96 | tinyPositiveInt : Fuzzer Int 97 | tinyPositiveInt = 98 | intRange 0 11 99 | 100 | 101 | leadingZeroesTest : Test 102 | leadingZeroesTest = 103 | fuzz intString "Correctly discards leading zeroes" <| 104 | \str -> 105 | let 106 | cut : String -> String 107 | cut s = 108 | if s == "0" then 109 | s 110 | 111 | else if String.startsWith "0" s then 112 | cut (String.dropLeft 1 s) 113 | 114 | else 115 | s 116 | in 117 | case ( BigInt.fromIntString str, BigInt.fromIntString (cut str) ) of 118 | ( Nothing, _ ) -> 119 | Expect.fail ("Failed to parse " ++ str) 120 | 121 | ( _, Nothing ) -> 122 | Expect.fail ("Failed to parse " ++ cut str) 123 | 124 | ( Just fromUncut, Just fromCut ) -> 125 | fromUncut 126 | |> Expect.equal fromCut 127 | 128 | 129 | fromTests : Test 130 | fromTests = 131 | describe "from" 132 | [ test "fromString 9999999 = fromInt 9999999" <| 133 | \_ -> 134 | let 135 | fromString : Maybe BigInt 136 | fromString = 137 | BigInt.fromIntString "9999999" 138 | 139 | fromInt : BigInt 140 | fromInt = 141 | BigInt.fromInt 9999999 142 | in 143 | fromString |> Expect.equal (Just fromInt) 144 | , test "fromString 10000000 = fromInt 10000000" <| 145 | \_ -> 146 | let 147 | fromString : Maybe BigInt 148 | fromString = 149 | BigInt.fromIntString "10000000" 150 | 151 | fromInt : BigInt 152 | fromInt = 153 | BigInt.fromInt 10000000 154 | in 155 | fromString |> Expect.equal (Just fromInt) 156 | , test "fromString 10000001 = fromInt 10000001" <| 157 | \_ -> 158 | let 159 | fromString : Maybe BigInt 160 | fromString = 161 | BigInt.fromIntString "10000001" 162 | 163 | fromInt : BigInt 164 | fromInt = 165 | BigInt.fromInt 10000001 166 | in 167 | fromString |> Expect.equal (Just fromInt) 168 | , test "fromHexString 0x2386f26fc10000 = mul (fromInt 100000000) (fromInt 100000000)" <| 169 | \_ -> 170 | let 171 | fromString : Maybe BigInt 172 | fromString = 173 | BigInt.fromHexString "0x2386f26fc10000" 174 | 175 | midLargeInt : BigInt 176 | midLargeInt = 177 | BigInt.fromInt 100000000 178 | 179 | fromInt : BigInt 180 | fromInt = 181 | BigInt.mul midLargeInt midLargeInt 182 | in 183 | fromString |> Expect.equal (Just fromInt) 184 | , test "fromHexString 2386f26fc10000 = mul (fromInt 100000000) (fromInt 100000000)" <| 185 | \_ -> 186 | let 187 | fromString : Maybe BigInt 188 | fromString = 189 | BigInt.fromHexString "2386f26fc10000" 190 | 191 | midLargeInt : BigInt 192 | midLargeInt = 193 | BigInt.fromInt 100000000 194 | 195 | fromInt : BigInt 196 | fromInt = 197 | BigInt.mul midLargeInt midLargeInt 198 | in 199 | fromString |> Expect.equal (Just fromInt) 200 | , test "fromString 0 = fromInt 0" <| 201 | \_ -> BigInt.fromIntString "0" |> Expect.equal (Just <| BigInt.fromInt 0) 202 | , test "fromString \"\" = Nothing" <| 203 | \_ -> 204 | BigInt.fromIntString "" |> Expect.equal Nothing 205 | , test "fromString + = Nothing" <| 206 | \_ -> 207 | BigInt.fromIntString "+" |> Expect.equal Nothing 208 | , test "fromString - = Nothing" <| 209 | \_ -> 210 | BigInt.fromIntString "-" |> Expect.equal Nothing 211 | , test "fromHexString 0x0 = fromInt 0" <| 212 | \_ -> BigInt.fromHexString "0x0" |> Expect.equal (Just <| BigInt.fromInt 0) 213 | , test "fromHexString -0x0 = fromInt 0" <| 214 | \_ -> BigInt.fromHexString "-0x0" |> Expect.equal (Just <| BigInt.fromInt 0) 215 | , test "fromHexString \"\" = Nothing" <| 216 | \_ -> BigInt.fromHexString "" |> Expect.equal Nothing 217 | , test "fromHexString + = Nothing" <| 218 | \_ -> BigInt.fromHexString "+" |> Expect.equal Nothing 219 | , test "fromHexString - = Nothing" <| 220 | \_ -> BigInt.fromHexString "-" |> Expect.equal Nothing 221 | , test "fromHexString 0x = Nothing" <| 222 | \_ -> BigInt.fromHexString "0x" |> Expect.equal Nothing 223 | , test "fromHexString --0x0 = Nothing" <| 224 | \_ -> BigInt.fromHexString "--0x0" |> Expect.equal Nothing 225 | , test "fromIntString --23 = Nothing" <| 226 | \_ -> BigInt.fromIntString "--23" |> Expect.equal Nothing 227 | , test "fromHexString \"0xBAD\" = fromInt 0x0BAD" <| 228 | \_ -> BigInt.fromHexString "0xBAD" |> Expect.equal (Just <| BigInt.fromInt 0x0BAD) 229 | ] 230 | 231 | 232 | roundRobinTests : Test 233 | roundRobinTests = 234 | let 235 | complexRoundRobin : Int -> Maybe BigInt 236 | complexRoundRobin int_ = 237 | fromInt int_ 238 | |> toHexString 239 | |> fromHexString 240 | |> Maybe.andThen (BigInt.toString >> fromIntString) 241 | in 242 | describe "complex round robin: fromInt -> toHexString -> fromHexString -> toString -> fromString" 243 | [ fuzz maxIntRange "large int range" <| 244 | \x -> 245 | complexRoundRobin x 246 | |> Expect.equal (Just <| fromInt x) 247 | , fuzz trickyIntRange "tricky int range" <| 248 | \x -> 249 | complexRoundRobin x 250 | |> Expect.equal (Just <| fromInt <| x) 251 | ] 252 | 253 | 254 | addTests : Test 255 | addTests = 256 | describe "addition" 257 | [ fuzz2 smallInt smallInt "add x y = x + y for small numbers" <| 258 | \x y -> 259 | add (fromInt x) (fromInt y) 260 | |> Expect.equal (fromInt (x + y)) 261 | , fuzz2 integer integer "x + y + (-y) = x" <| 262 | \x y -> 263 | add x y 264 | |> add (BigInt.negate y) 265 | |> Expect.equal x 266 | , fuzz2 integer integer "a + b = b + a" <| 267 | \a b -> 268 | add a b 269 | |> Expect.equal (add b a) 270 | ] 271 | 272 | 273 | negateTests : Test 274 | negateTests = 275 | describe "negate" 276 | [ fuzz int "negate x = -x; x >= 0" <| 277 | \x -> 278 | let 279 | y : Int 280 | y = 281 | Basics.abs x 282 | in 283 | fromInt y 284 | |> BigInt.negate 285 | |> Expect.equal (fromInt (-1 * y)) 286 | , fuzz int "negate (-x) = x; x >= 0" <| 287 | \x -> 288 | let 289 | y : Int 290 | y = 291 | Basics.abs x * -1 292 | in 293 | fromInt y 294 | |> BigInt.negate 295 | |> Expect.equal (fromInt (-1 * y)) 296 | , fuzz integer "negate (negate x) = x" <| 297 | \a -> 298 | a 299 | |> BigInt.negate 300 | |> BigInt.negate 301 | |> Expect.equal a 302 | ] 303 | 304 | 305 | subTests : Test 306 | subTests = 307 | describe "subtraction" 308 | [ fuzz2 integer integer "x - y = x + -y" <| 309 | \x y -> 310 | sub x y 311 | |> Expect.equal (add x (BigInt.negate y)) 312 | , fuzz2 integer integer "a - b = -(b - a)" <| 313 | \a b -> 314 | sub a b 315 | |> Expect.equal (BigInt.negate (sub b a)) 316 | ] 317 | 318 | 319 | mulTests : Test 320 | mulTests = 321 | describe "Mul testsuite" 322 | [ fuzz2 smallInt smallInt "mul x y = x * y for small numbers" <| 323 | \x y -> 324 | mul (fromInt x) (fromInt y) 325 | |> Expect.equal (fromInt (x * y)) 326 | , fuzz2 integer nonZeroInteger "(x * y) / y = x" <| 327 | \x y -> 328 | mul x y 329 | |> (\n -> divmod n y) 330 | |> Expect.equal (Just ( x, zero )) 331 | , fuzz2 integer integer "x * y = y * x" <| 332 | \x y -> 333 | mul x y 334 | |> Expect.equal (mul y x) 335 | ] 336 | 337 | 338 | divmodTests : Test 339 | divmodTests = 340 | describe "divmod" 341 | [ fuzz2 integer nonZeroInteger "definition" <| 342 | \x y -> 343 | case divmod x y of 344 | Nothing -> 345 | y 346 | |> Expect.equal (fromInt 0) 347 | 348 | Just ( c, r ) -> 349 | mul c y 350 | |> add r 351 | |> Expect.equal x 352 | ] 353 | 354 | 355 | modTests : Test 356 | modTests = 357 | describe "modBy" 358 | [ fuzz2 (Fuzz.constant (BigInt.fromInt -1)) (Fuzz.constant (BigInt.fromInt 1)) "definition [examples]" <| 359 | \x y -> 360 | case BigInt.modBy y x of 361 | Nothing -> 362 | y 363 | |> Expect.equal (fromInt 0) 364 | 365 | Just r -> 366 | let 367 | c : BigInt 368 | c = 369 | BigInt.div x y 370 | in 371 | mul c y 372 | |> add r 373 | |> Expect.equal x 374 | , fuzz2 integer nonZeroInteger "definition" <| 375 | \x y -> 376 | case BigInt.modBy y x of 377 | Nothing -> 378 | y 379 | |> Expect.equal (fromInt 0) 380 | 381 | Just r -> 382 | let 383 | c : BigInt 384 | c = 385 | BigInt.div x y 386 | in 387 | mul c y 388 | |> add r 389 | |> Expect.equal x 390 | ] 391 | 392 | 393 | gcdTests : Test 394 | gcdTests = 395 | describe "gcd" 396 | [ fuzz2 integer integer "definition" <| 397 | \x y -> 398 | let 399 | g : BigInt 400 | g = 401 | BigInt.gcd x y 402 | in 403 | if g == zero then 404 | ( x, y ) 405 | |> Expect.equal ( zero, zero ) 406 | 407 | else 408 | ( BigInt.modBy g x, BigInt.modBy g y ) 409 | |> Expect.equal ( Just zero, Just zero ) 410 | ] 411 | 412 | 413 | absTests : Test 414 | absTests = 415 | describe "abs" 416 | [ fuzz integer "|x| = x; x >= 0 and |x| = -x; x < 0" <| 417 | \x -> 418 | if gte x zero then 419 | BigInt.abs x 420 | |> Expect.equal x 421 | 422 | else 423 | BigInt.abs x 424 | |> Expect.equal (BigInt.negate x) 425 | ] 426 | 427 | 428 | stringTests : Test 429 | stringTests = 430 | describe "toString and fromString" 431 | [ fuzz integer "fromString (toString x) = Just x" <| 432 | \x -> 433 | fromIntString (BigInt.toString x) 434 | |> Expect.equal (Just x) 435 | , fuzz smallInt "match string formatting from core" <| 436 | \x -> 437 | BigInt.toString (fromInt x) 438 | |> Expect.equal (String.fromInt x) 439 | , fuzz integer "accept '+' at the beginning of the string" <| 440 | \x -> 441 | let 442 | y : String 443 | y = 444 | x 445 | |> BigInt.abs 446 | |> BigInt.toString 447 | in 448 | String.cons '+' y 449 | |> fromIntString 450 | |> Expect.equal (fromIntString y) 451 | , test "Basic toHexString" <| 452 | \_ -> 453 | let 454 | fromBase16String : Maybe BigInt 455 | fromBase16String = 456 | BigInt.fromHexString "2386f26fc10000" 457 | 458 | -- midLargeInt = 459 | -- BigInt.fromInt 100000000 460 | -- fromInt = 461 | -- mul midLargeInt midLargeInt 462 | in 463 | Maybe.map BigInt.toHexString fromBase16String 464 | |> Expect.equal (Just "2386f26fc10000") 465 | , fuzz smallPositiveIntegers "Same results as rtfeldman/elm-hex" <| 466 | \x -> 467 | BigInt.toHexString (fromInt x) 468 | |> Expect.equal (Hex.toString x) 469 | ] 470 | 471 | 472 | minTests : Test 473 | minTests = 474 | describe "min" 475 | [ fuzz2 integer integer "min x y = x; x <= y and min x y = y; x > y" <| 476 | \x y -> 477 | case BigInt.compare x y of 478 | GT -> 479 | BigInt.min x y 480 | |> Expect.equal y 481 | 482 | _ -> 483 | BigInt.min x y 484 | |> Expect.equal x 485 | ] 486 | 487 | 488 | maxTests : Test 489 | maxTests = 490 | describe "max" 491 | [ fuzz2 integer integer "min x y = y; x <= y and min x y = x; x > y" <| 492 | \x y -> 493 | case BigInt.compare x y of 494 | LT -> 495 | BigInt.max x y 496 | |> Expect.equal y 497 | 498 | _ -> 499 | BigInt.max x y 500 | |> Expect.equal x 501 | ] 502 | 503 | 504 | compareTests : Test 505 | compareTests = 506 | describe "compare" 507 | [ fuzz integer "x = x" <| 508 | \x -> 509 | x 510 | |> Expect.equal x 511 | |> Expect.onFail "apparently x /= x" 512 | , fuzz2 integer integer "x <= x + y; y >= 0" <| 513 | \x y -> 514 | lte x (add x (BigInt.abs y)) 515 | |> Expect.equal True 516 | |> Expect.onFail "apparently !(x <= x + y); y >= 0" 517 | , fuzz2 integer integer "x >= x + y; y <= 0" <| 518 | \x y -> 519 | gte x (add x (BigInt.abs y |> BigInt.negate)) 520 | |> Expect.equal True 521 | |> Expect.onFail "apparently !(x >= x + y); y <= 0" 522 | , fuzz2 integer nonZeroInteger "x < x + y; y > 0" <| 523 | \x y -> 524 | lt x (add x (BigInt.abs y)) 525 | |> Expect.equal True 526 | |> Expect.onFail "apparently !(x < x + y); y > 0" 527 | , fuzz2 integer nonZeroInteger "x > x + y; y < 0" <| 528 | \x y -> 529 | gt x (add x (BigInt.abs y |> BigInt.negate)) 530 | |> Expect.equal True 531 | |> Expect.onFail "apparently !(x > x + y); y < 0" 532 | ] 533 | 534 | 535 | isEvenTests : Test 536 | isEvenTests = 537 | describe "isEven" 538 | [ fuzz int "the `mod 2` of a number should be 0 if it is even" <| 539 | \x -> Expect.equal (isEven (fromInt x)) (Basics.modBy 2 x == 0) 540 | ] 541 | 542 | 543 | isOddTests : Test 544 | isOddTests = 545 | describe "isOdd" 546 | [ fuzz int "the `mod 2` of a number should be 1 if it is odd" <| 547 | \x -> Expect.equal (isOdd (fromInt x)) (Basics.modBy 2 x == 1) 548 | ] 549 | 550 | 551 | powTests : Test 552 | powTests = 553 | describe "exponentiation (pow)" 554 | [ fuzz integer "pow x 0 = 1" <| 555 | \base -> 556 | pow base (fromInt 0) 557 | |> Expect.equal (fromInt 1) 558 | , fuzz2 integer tinyPositiveInt "pow x (n + 1) = pow x n * x" <| 559 | \base exp -> 560 | pow base (fromInt (exp + 1)) 561 | |> Expect.equal 562 | (pow base (fromInt exp) 563 | |> mul base 564 | ) 565 | , fuzz2 tinyInt tinyPositiveInt "pow x y = x ^ y for small numbers" <| 566 | \base exp -> 567 | pow (fromInt base) (fromInt exp) 568 | |> Expect.equal (fromInt (base ^ exp)) 569 | ] 570 | -------------------------------------------------------------------------------- /src/BigInt.elm: -------------------------------------------------------------------------------- 1 | module BigInt exposing 2 | ( BigInt 3 | , fromInt, fromIntString, fromHexString, toString, toHexString 4 | , add, sub, mul, div, modBy, divmod, pow, gcd 5 | , abs, negate 6 | , compare, gt, gte, lt, lte, max, min 7 | , isEven, isOdd 8 | ) 9 | 10 | {-| Infinite digits integers 11 | 12 | @docs BigInt 13 | 14 | 15 | # From/To 16 | 17 | @docs fromInt, fromIntString, fromHexString, toString, toHexString 18 | 19 | 20 | # Operations 21 | 22 | @docs add, sub, mul, div, modBy, divmod, pow, gcd 23 | 24 | 25 | # Sign 26 | 27 | @docs abs, negate 28 | 29 | 30 | # Comparison 31 | 32 | @docs compare, gt, gte, lt, lte, max, min 33 | 34 | 35 | # Misc 36 | 37 | @docs isEven, isOdd 38 | 39 | -} 40 | 41 | import Basics 42 | import Constants exposing (hexDigitMagnitude, maxDigitMagnitude, maxDigitValue) 43 | import Hex 44 | import List.Extra 45 | import Maybe exposing (Maybe) 46 | import Maybe.Extra 47 | 48 | 49 | {-| The sign of the bigInt 50 | -} 51 | type Sign 52 | = Positive 53 | | Negative 54 | | Zero 55 | 56 | 57 | eightHexDigits : BigInt 58 | eightHexDigits = 59 | mul (fromInt 2) (fromInt 0x80000000) 60 | 61 | 62 | signProduct : Sign -> Sign -> Sign 63 | signProduct x y = 64 | if x == Zero || y == Zero then 65 | Zero 66 | 67 | else if x == y then 68 | Positive 69 | 70 | else 71 | Negative 72 | 73 | 74 | signNegate : Sign -> Sign 75 | signNegate sign_ = 76 | case sign_ of 77 | Positive -> 78 | Negative 79 | 80 | Negative -> 81 | Positive 82 | 83 | Zero -> 84 | Zero 85 | 86 | 87 | signFromInt : Int -> Sign 88 | signFromInt x = 89 | case Basics.compare x 0 of 90 | LT -> 91 | Negative 92 | 93 | GT -> 94 | Positive 95 | 96 | EQ -> 97 | Zero 98 | 99 | 100 | 101 | {- From smallest to largest digit, all the digits are positive, no leading zeros -} 102 | 103 | 104 | {-| A number with arbitrary size. 105 | -} 106 | type BigInt 107 | = Pos Magnitude 108 | | Neg Magnitude 109 | | Zer 110 | 111 | 112 | {-| A list of safe-size `Int`s. with smaller magnitudes closer to the head. 113 | -} 114 | type Magnitude 115 | = Magnitude (List Int) 116 | 117 | 118 | mkBigInt : Sign -> Magnitude -> BigInt 119 | mkBigInt s ((Magnitude digits) as mag) = 120 | if List.isEmpty digits then 121 | Zer 122 | 123 | else 124 | case s of 125 | Zero -> 126 | Zer 127 | 128 | Positive -> 129 | Pos mag 130 | 131 | Negative -> 132 | Neg mag 133 | 134 | 135 | type BigIntNotNormalised 136 | = BigIntNotNormalised Sign MagnitudeNotNormalised 137 | 138 | 139 | type MagnitudeNotNormalised 140 | = MagnitudeNotNormalised (List Int) 141 | 142 | 143 | toDigits : BigInt -> List Int 144 | toDigits bigInt = 145 | case bigInt of 146 | Zer -> 147 | [] 148 | 149 | Pos (Magnitude ds) -> 150 | ds 151 | 152 | Neg (Magnitude ds) -> 153 | ds 154 | 155 | 156 | {-| The base we're using for BigInt, 10^7 157 | -} 158 | baseDigit : Int 159 | baseDigit = 160 | maxDigitValue + 1 161 | 162 | 163 | {-| Makes a BigInt from an Int 164 | -} 165 | fromInt : Int -> BigInt 166 | fromInt x = 167 | BigIntNotNormalised (signFromInt x) (MagnitudeNotNormalised [ Basics.abs x ]) 168 | |> normalise 169 | 170 | 171 | {-| Makes a BigInt from an integer string, positive or negative 172 | 173 | fromIntString "123" == Just (BigInt.Pos ...) 174 | fromIntString "-123" == Just (BigInt.Neg ...) 175 | fromIntString "" == Nothing 176 | fromIntString "this is not a number :P" == Nothing 177 | 178 | -} 179 | fromIntString : String -> Maybe BigInt 180 | fromIntString x = 181 | case String.toList x of 182 | [] -> 183 | Nothing 184 | 185 | '-' :: [] -> 186 | Nothing 187 | 188 | '-' :: xs -> 189 | fromString_ xs 190 | |> Maybe.map (mkBigInt Negative) 191 | 192 | '+' :: [] -> 193 | Nothing 194 | 195 | '+' :: xs -> 196 | fromString_ xs 197 | |> Maybe.map (mkBigInt Positive) 198 | 199 | xs -> 200 | fromString_ xs 201 | |> Maybe.map (mkBigInt Positive) 202 | 203 | 204 | {-| Makes a BigInt from a base16 hex string, positive or negative. 205 | 206 | fromHexString "4b6" == Just (BigInt.Pos ...) 207 | fromHexString "-13d" == Just (BigInt.Neg ...) 208 | 209 | fromHexString "0x456" == Just (BigInt.Pos ...) 210 | fromHexString "-0x123" == Just (BigInt.Neg ...) 211 | 212 | fromHexString "R2D2" == Nothing 213 | fromHexString "0xC3P0" == Nothing 214 | fromHexString "0x" == Nothing 215 | fromHexString "" == Nothing 216 | 217 | **Note:** String can be prepended with or without any combination of "0x", and "+" or "-". 218 | 219 | -} 220 | fromHexString : String -> Maybe BigInt 221 | fromHexString x = 222 | case String.toList x of 223 | [] -> 224 | Nothing 225 | 226 | '-' :: '0' :: 'x' :: [] -> 227 | Nothing 228 | 229 | '-' :: '0' :: 'x' :: xs -> 230 | fromHexString_ xs 231 | |> Maybe.map negate 232 | 233 | '-' :: [] -> 234 | Nothing 235 | 236 | '-' :: xs -> 237 | fromHexString_ xs 238 | |> Maybe.map negate 239 | 240 | '+' :: [] -> 241 | Nothing 242 | 243 | '+' :: xs -> 244 | fromHexString_ xs 245 | 246 | '0' :: 'x' :: [] -> 247 | Nothing 248 | 249 | '0' :: 'x' :: xs -> 250 | fromHexString_ xs 251 | 252 | xs -> 253 | fromHexString_ xs 254 | 255 | 256 | {-| Split a number string into chunks of `maxDigitMagnitude` from smallest digits. 257 | Turn those into integers and store as a Magnitude. 258 | -} 259 | fromString_ : List Char -> Maybe Magnitude 260 | fromString_ x = 261 | x 262 | |> Maybe.Extra.traverse 263 | (\d -> 264 | let 265 | r : Int 266 | r = 267 | Char.toCode d 268 | in 269 | if r >= 0x30 && r <= 0x39 then 270 | Just (r - 0x30) 271 | 272 | else 273 | Nothing 274 | ) 275 | |> Maybe.map 276 | (\digitList -> 277 | digitList 278 | |> List.reverse 279 | |> List.Extra.greedyGroupsOf maxDigitMagnitude 280 | |> List.map 281 | (\group -> 282 | List.foldr (\e a -> a * 10 + e) 0 group 283 | ) 284 | |> Magnitude 285 | |> emptyZero 286 | ) 287 | 288 | 289 | fromHexString_ : List Char -> Maybe BigInt 290 | fromHexString_ x = 291 | x 292 | |> Maybe.Extra.traverse 293 | (\d -> 294 | let 295 | r : Int 296 | r = 297 | Char.toCode d 298 | in 299 | if r >= 0x30 && r <= 0x39 then 300 | Just (r - 0x30) 301 | 302 | else if r >= 0x41 && r <= 0x46 then 303 | Just (r - 0x41 + 0x0A) 304 | 305 | else if r >= 0x61 && r <= 0x66 then 306 | Just (r - 0x61 + 0x0A) 307 | 308 | else 309 | Nothing 310 | ) 311 | |> Maybe.map 312 | (\digitList -> 313 | digitList 314 | |> List.reverse 315 | |> List.Extra.greedyGroupsOf hexDigitMagnitude 316 | |> List.map 317 | (\group -> 318 | List.foldr (\e a -> a * 16 + e) 0 group 319 | ) 320 | |> List.foldr (\e s -> mul eightHexDigits s |> add (fromInt e)) zero 321 | ) 322 | 323 | 324 | emptyZero : Magnitude -> Magnitude 325 | emptyZero (Magnitude xs) = 326 | case List.Extra.dropWhileRight ((==) 0) xs of 327 | [] -> 328 | Magnitude [] 329 | 330 | d -> 331 | Magnitude d 332 | 333 | 334 | {-| Adds two BigInts 335 | -} 336 | add : BigInt -> BigInt -> BigInt 337 | add a b = 338 | let 339 | magnitudeMaybeNegated : BigInt -> List Int 340 | magnitudeMaybeNegated bigInt = 341 | case bigInt of 342 | Zer -> 343 | [] 344 | 345 | Neg (Magnitude digits) -> 346 | List.map Basics.negate digits 347 | 348 | Pos (Magnitude digits) -> 349 | digits 350 | 351 | ma : List Int 352 | ma = 353 | magnitudeMaybeNegated a 354 | 355 | mb : List Int 356 | mb = 357 | magnitudeMaybeNegated b 358 | 359 | added : List Int 360 | added = 361 | sumLonger ma mb 362 | in 363 | normalise <| BigIntNotNormalised Positive (MagnitudeNotNormalised added) 364 | 365 | 366 | {-| Sums two lists, padding the shorter with zeroes at the end. 367 | -} 368 | sumLonger : List Int -> List Int -> List Int 369 | sumLonger xs ys = 370 | case ( xs, ys ) of 371 | ( [], [] ) -> 372 | [] 373 | 374 | ( _, [] ) -> 375 | xs 376 | 377 | ( [], _ ) -> 378 | ys 379 | 380 | ( x :: xs_, y :: ys_ ) -> 381 | x + y :: sumLonger xs_ ys_ 382 | 383 | 384 | {-| Changes the sign of an BigInt 385 | -} 386 | negate : BigInt -> BigInt 387 | negate bigInt = 388 | case bigInt of 389 | Zer -> 390 | Zer 391 | 392 | Pos mag -> 393 | Neg mag 394 | 395 | Neg mag -> 396 | Pos mag 397 | 398 | 399 | {-| Absolute value 400 | -} 401 | abs : BigInt -> BigInt 402 | abs bigInt = 403 | case bigInt of 404 | Zer -> 405 | Zer 406 | 407 | Neg mag -> 408 | Pos mag 409 | 410 | i -> 411 | i 412 | 413 | 414 | {-| Substracts the second BigInt from the first 415 | -} 416 | sub : BigInt -> BigInt -> BigInt 417 | sub a b = 418 | add a (negate b) 419 | 420 | 421 | {-| Multiplies two BigInts 422 | -} 423 | mul : BigInt -> BigInt -> BigInt 424 | mul int1 int2 = 425 | mkBigInt 426 | (signProduct (sign int1) (sign int2)) 427 | (mulMagnitudes (magnitude int1) (magnitude int2)) 428 | 429 | 430 | magnitude : BigInt -> Magnitude 431 | magnitude bigInt = 432 | case bigInt of 433 | Zer -> 434 | Magnitude [] 435 | 436 | Pos mag -> 437 | mag 438 | 439 | Neg mag -> 440 | mag 441 | 442 | 443 | mulMagnitudes : Magnitude -> Magnitude -> Magnitude 444 | mulMagnitudes (Magnitude mag1) (Magnitude mag2) = 445 | case mag1 of 446 | [] -> 447 | Magnitude [] 448 | 449 | m :: [] -> 450 | mulSingleDigit (Magnitude mag2) m 451 | 452 | m :: mx -> 453 | let 454 | accum : List Int 455 | accum = 456 | List.map (\d -> d * m) mag2 457 | 458 | (Magnitude rest) = 459 | mulMagnitudes (Magnitude mx) (Magnitude mag2) 460 | 461 | added : List Int 462 | added = 463 | sumLonger accum (0 :: rest) 464 | in 465 | normaliseMagnitude (MagnitudeNotNormalised added) 466 | 467 | 468 | mulSingleDigit : Magnitude -> Int -> Magnitude 469 | mulSingleDigit (Magnitude xs) d = 470 | xs 471 | |> List.map ((*) d) 472 | |> MagnitudeNotNormalised 473 | |> normaliseMagnitude 474 | 475 | 476 | {-| Compares two BigInts 477 | -} 478 | compare : BigInt -> BigInt -> Order 479 | compare int1 int2 = 480 | case ( int1, int2 ) of 481 | ( Pos (Magnitude mag1), Pos (Magnitude mag2) ) -> 482 | compareMagnitude 0 0 mag1 mag2 483 | 484 | ( Pos _, _ ) -> 485 | GT 486 | 487 | ( Neg (Magnitude mag1), Neg (Magnitude mag2) ) -> 488 | compareMagnitude 0 0 mag2 mag1 489 | 490 | ( Neg _, _ ) -> 491 | LT 492 | 493 | ( Zer, Pos _ ) -> 494 | LT 495 | 496 | ( Zer, Zer ) -> 497 | EQ 498 | 499 | ( Zer, Neg _ ) -> 500 | GT 501 | 502 | 503 | compareMagnitude : Int -> Int -> List Int -> List Int -> Order 504 | compareMagnitude x y xs ys = 505 | case ( xs, ys ) of 506 | ( [], [] ) -> 507 | Basics.compare x y 508 | 509 | ( [], _ ) -> 510 | LT 511 | 512 | ( _, [] ) -> 513 | GT 514 | 515 | ( x_ :: xss, y_ :: yss ) -> 516 | if x_ == y_ then 517 | compareMagnitude x y xss yss 518 | 519 | else 520 | compareMagnitude x_ y_ xss yss 521 | 522 | 523 | {-| Less than 524 | -} 525 | lt : BigInt -> BigInt -> Bool 526 | lt x y = 527 | compare x y == LT 528 | 529 | 530 | {-| Greater than 531 | -} 532 | gt : BigInt -> BigInt -> Bool 533 | gt x y = 534 | compare x y == GT 535 | 536 | 537 | {-| Greater than or equals 538 | -} 539 | gte : BigInt -> BigInt -> Bool 540 | gte x y = 541 | not (lt x y) 542 | 543 | 544 | {-| Less than or equals 545 | -} 546 | lte : BigInt -> BigInt -> Bool 547 | lte x y = 548 | not (gt x y) 549 | 550 | 551 | {-| Returns the largest of two BigInts 552 | -} 553 | max : BigInt -> BigInt -> BigInt 554 | max x y = 555 | if lt x y then 556 | y 557 | 558 | else 559 | x 560 | 561 | 562 | {-| Returns the smallest of two BigInts 563 | -} 564 | min : BigInt -> BigInt -> BigInt 565 | min x y = 566 | if gt x y then 567 | y 568 | 569 | else 570 | x 571 | 572 | 573 | {-| Convert the BigInt to an integer string 574 | -} 575 | toString : BigInt -> String 576 | toString bigInt = 577 | case bigInt of 578 | Zer -> 579 | "0" 580 | 581 | Pos mag -> 582 | revMagnitudeToString mag 583 | 584 | Neg mag -> 585 | "-" ++ revMagnitudeToString mag 586 | 587 | 588 | fillZeroes : Int -> String 589 | fillZeroes x = 590 | String.padLeft maxDigitMagnitude '0' (String.fromInt x) 591 | 592 | 593 | revMagnitudeToString : Magnitude -> String 594 | revMagnitudeToString (Magnitude digits) = 595 | case List.reverse digits of 596 | [] -> 597 | "0" 598 | 599 | x :: xs -> 600 | String.concat <| String.fromInt x :: List.map fillZeroes xs 601 | 602 | 603 | {-| Convert the BigInt to a hex string. 604 | 605 | toHexString (BigInt.fromInt 255) == "ff" 606 | 607 | **Note:** "0x" will NOT be prepended to the output. 608 | 609 | -} 610 | toHexString : BigInt -> String 611 | toHexString bigInt = 612 | case bigInt of 613 | Zer -> 614 | "0" 615 | 616 | Pos mag -> 617 | if mag == Magnitude [] then 618 | "0" 619 | 620 | else 621 | hexMagnitudeToString (Pos mag) 622 | 623 | Neg mag -> 624 | if mag == Magnitude [] then 625 | "0" 626 | 627 | else 628 | "-" ++ hexMagnitudeToString (Pos mag) 629 | 630 | 631 | 632 | -- Shortcut conversion to int for hex handling 633 | 634 | 635 | bigIntToInt_ : BigInt -> Int 636 | bigIntToInt_ bigInt = 637 | case bigInt of 638 | Zer -> 639 | 0 640 | 641 | Pos (Magnitude [ a ]) -> 642 | a 643 | 644 | Pos (Magnitude [ a, b ]) -> 645 | b * (10 ^ maxDigitMagnitude) + a 646 | 647 | _ -> 648 | -- Note: In Elm 0.18, this last case was `Debug.crash "No suitable shortcut conversion in hexMagnitudeToString"` 649 | -- Using "impossible default value" instead. Should be impossible if this internal function is used correctly. 650 | -- Fuzz testing is very helpful. 651 | 42 652 | 653 | 654 | hexMagnitudeToString : BigInt -> String 655 | hexMagnitudeToString bigInt = 656 | case divmod bigInt eightHexDigits of 657 | Nothing -> 658 | -- Another "impossible default value" instead of Debug.crash 659 | "Failure converting BigInt to hex string. Should be impossible. Open up issue on the elm-bigint repo." 660 | 661 | Just ( d, r ) -> 662 | let 663 | rString : String 664 | rString = 665 | Hex.toString (bigIntToInt_ r) 666 | in 667 | if d == fromInt 0 then 668 | rString 669 | 670 | else 671 | hexMagnitudeToString d ++ String.padLeft 8 '0' rString 672 | 673 | 674 | {-| BigInt division. Produces 0 when dividing by 0 (like (//)). 675 | -} 676 | div : BigInt -> BigInt -> BigInt 677 | div num den = 678 | if den == zero then 679 | zero 680 | 681 | else 682 | let 683 | cand_l : Int 684 | cand_l = 685 | List.length (toDigits num) - List.length (toDigits den) + 1 686 | 687 | d : BigInt 688 | d = 689 | div_ 690 | (Basics.max 0 cand_l) 691 | (abs num) 692 | (abs den) 693 | in 694 | mkBigInt (signProduct (sign num) (sign den)) (magnitude d) 695 | 696 | 697 | div_ : Int -> BigInt -> BigInt -> BigInt 698 | div_ n num den = 699 | if n == 0 then 700 | divDigit (padDigits n) num den 701 | 702 | else 703 | let 704 | ( cdiv, cmod ) = 705 | divmodDigit (padDigits n) num den 706 | 707 | rdiv : BigInt 708 | rdiv = 709 | div_ (n - 1) cmod den 710 | in 711 | add cdiv rdiv 712 | 713 | 714 | divDigit : BigInt -> BigInt -> BigInt -> BigInt 715 | divDigit padding x y = 716 | divDigit_ (2 ^ maxDigitBits) padding x y 717 | 718 | 719 | divDigit_ : Int -> BigInt -> BigInt -> BigInt -> BigInt 720 | divDigit_ to_test padding num den = 721 | if to_test == 0 then 722 | zero 723 | 724 | else 725 | let 726 | x : BigInt 727 | x = 728 | fromInt to_test 729 | 730 | candidate : BigInt 731 | candidate = 732 | mul (mul x den) padding 733 | 734 | ( newdiv, newmod ) = 735 | if lte candidate num then 736 | ( mul x padding, sub num candidate ) 737 | 738 | else 739 | ( zero, num ) 740 | 741 | restdiv : BigInt 742 | restdiv = 743 | divDigit_ (to_test // 2) padding newmod den 744 | in 745 | add newdiv restdiv 746 | 747 | 748 | {-| Modulus. 749 | 750 | modBy (BigInt.fromInt 3) (BigInt.fromInt 3) 751 | 752 | **Note:** This function returns negative values when 753 | the second argument is negative, unlike Basics.modBy. 754 | 755 | -} 756 | modBy : BigInt -> BigInt -> Maybe BigInt 757 | modBy den num = 758 | if den == zero then 759 | Nothing 760 | 761 | else 762 | case toDigits den of 763 | [ shortDen ] -> 764 | case num of 765 | Zer -> 766 | Just zero 767 | 768 | Pos (Magnitude numList) -> 769 | let 770 | m : Int 771 | m = 772 | List.foldr 773 | (\d acc -> Basics.modBy shortDen (acc * baseDigit + d)) 774 | 0 775 | numList 776 | in 777 | Just (fromInt m) 778 | 779 | Neg (Magnitude numList) -> 780 | let 781 | m : Int 782 | m = 783 | List.foldr 784 | (\d acc -> Basics.modBy shortDen (acc * baseDigit - d)) 785 | 0 786 | numList 787 | in 788 | if m > 0 then 789 | Just (fromInt (m - shortDen)) 790 | 791 | else 792 | Just (fromInt m) 793 | 794 | denList -> 795 | let 796 | cand_l : Int 797 | cand_l = 798 | List.length (toDigits num) - List.length denList + 1 799 | 800 | m : BigInt 801 | m = 802 | mod_ 803 | (Basics.max 0 cand_l) 804 | (abs num) 805 | (abs den) 806 | in 807 | Just 808 | (mkBigInt (sign num) (magnitude m)) 809 | 810 | 811 | mod_ : Int -> BigInt -> BigInt -> BigInt 812 | mod_ n num den = 813 | if n == 0 then 814 | modDigit (padDigits n) num den 815 | 816 | else 817 | let 818 | cmod : BigInt 819 | cmod = 820 | modDigit (padDigits n) num den 821 | in 822 | mod_ (n - 1) cmod den 823 | 824 | 825 | modDigit : BigInt -> BigInt -> BigInt -> BigInt 826 | modDigit padding x y = 827 | modDigit_ (2 ^ maxDigitBits) padding x y 828 | 829 | 830 | modDigit_ : Int -> BigInt -> BigInt -> BigInt -> BigInt 831 | modDigit_ to_test padding num den = 832 | if to_test == 0 then 833 | num 834 | 835 | else 836 | let 837 | x : BigInt 838 | x = 839 | fromInt to_test 840 | 841 | candidate : BigInt 842 | candidate = 843 | mul (mul x den) padding 844 | 845 | newMod : BigInt 846 | newMod = 847 | if lte candidate num then 848 | sub num candidate 849 | 850 | else 851 | num 852 | in 853 | modDigit_ (to_test // 2) padding newMod den 854 | 855 | 856 | {-| Square. 857 | -} 858 | square : BigInt -> BigInt 859 | square num = 860 | mul num num 861 | 862 | 863 | {-| Parity Check - Even. 864 | -} 865 | isEven : BigInt -> Bool 866 | isEven num = 867 | let 868 | even : Int -> Bool 869 | even i = 870 | Basics.modBy 2 i == 0 871 | in 872 | case num of 873 | Zer -> 874 | True 875 | 876 | Pos (Magnitude mag) -> 877 | even (List.head mag |> Maybe.withDefault 0) 878 | 879 | Neg (Magnitude mag) -> 880 | even (List.head mag |> Maybe.withDefault 0) 881 | 882 | 883 | {-| Parity Check - Odd. 884 | -} 885 | isOdd : BigInt -> Bool 886 | isOdd num = 887 | not (isEven num) 888 | 889 | 890 | {-| Power/Exponentiation. 891 | -} 892 | pow : BigInt -> BigInt -> BigInt 893 | pow base exp = 894 | powHelp one base exp 895 | 896 | 897 | {-| Power helper, for sake of tail-recursion. 898 | -} 899 | powHelp : BigInt -> BigInt -> BigInt -> BigInt 900 | powHelp work num exp = 901 | case exp of 902 | Zer -> 903 | one 904 | 905 | Neg _ -> 906 | Zer 907 | 908 | Pos _ -> 909 | if exp == one then 910 | mul work num 911 | 912 | else if isEven exp then 913 | powHelp work (square num) (divByTwo exp) 914 | 915 | else 916 | powHelp (mul num work) (square num) (divByTwo (sub exp one)) 917 | 918 | 919 | divByTwo : BigInt -> BigInt 920 | divByTwo q = 921 | case q of 922 | Zer -> 923 | q 924 | 925 | Neg mag -> 926 | Neg (divMagnitudeByTwo mag) 927 | 928 | Pos mag -> 929 | Pos (divMagnitudeByTwo mag) 930 | 931 | 932 | divMagnitudeByTwo : Magnitude -> Magnitude 933 | divMagnitudeByTwo (Magnitude m) = 934 | List.foldr 935 | (\d ( carry, acc ) -> 936 | ( Basics.modBy 2 d == 1 937 | , (if carry then 938 | (d + baseDigit) // 2 939 | 940 | else 941 | d // 2 942 | ) 943 | :: acc 944 | ) 945 | ) 946 | ( False, [] ) 947 | m 948 | |> Tuple.second 949 | |> Magnitude 950 | 951 | 952 | {-| Division and modulus 953 | -} 954 | divmod : BigInt -> BigInt -> Maybe ( BigInt, BigInt ) 955 | divmod num den = 956 | if den == zero then 957 | Nothing 958 | 959 | else 960 | let 961 | cand_l : Int 962 | cand_l = 963 | List.length (toDigits num) - List.length (toDigits den) + 1 964 | 965 | ( d, m ) = 966 | divMod_ 967 | (Basics.max 0 cand_l) 968 | (abs num) 969 | (abs den) 970 | in 971 | Just 972 | ( mkBigInt (signProduct (sign num) (sign den)) (magnitude d) 973 | , mkBigInt (sign num) (magnitude m) 974 | ) 975 | 976 | 977 | divmodDigit : BigInt -> BigInt -> BigInt -> ( BigInt, BigInt ) 978 | divmodDigit padding x y = 979 | divmodDigit_ (2 ^ maxDigitBits) padding x y 980 | 981 | 982 | divmodDigit_ : Int -> BigInt -> BigInt -> BigInt -> ( BigInt, BigInt ) 983 | divmodDigit_ to_test padding num den = 984 | if to_test == 0 then 985 | ( zero, num ) 986 | 987 | else 988 | let 989 | x : BigInt 990 | x = 991 | fromInt to_test 992 | 993 | candidate : BigInt 994 | candidate = 995 | mul (mul x den) padding 996 | 997 | ( newdiv, newmod ) = 998 | if lte candidate num then 999 | ( mul x padding, sub num candidate ) 1000 | 1001 | else 1002 | ( zero, num ) 1003 | 1004 | ( restdiv, restmod ) = 1005 | divmodDigit_ (to_test // 2) padding newmod den 1006 | in 1007 | ( add newdiv restdiv, restmod ) 1008 | 1009 | 1010 | divMod_ : Int -> BigInt -> BigInt -> ( BigInt, BigInt ) 1011 | divMod_ n num den = 1012 | if n == 0 then 1013 | divmodDigit (padDigits n) num den 1014 | 1015 | else 1016 | let 1017 | ( cdiv, cmod ) = 1018 | divmodDigit (padDigits n) num den 1019 | 1020 | ( rdiv, rmod ) = 1021 | divMod_ (n - 1) cmod den 1022 | in 1023 | ( add cdiv rdiv, rmod ) 1024 | 1025 | 1026 | maxDigitBits : Int 1027 | maxDigitBits = 1028 | maxDigitValue 1029 | |> toFloat 1030 | |> logBase 2 1031 | |> ceiling 1032 | 1033 | 1034 | padDigits : Int -> BigInt 1035 | padDigits n = 1036 | repeatedly (mul (fromInt baseDigit)) one n 1037 | 1038 | 1039 | repeatedly : (a -> a) -> a -> Int -> a 1040 | repeatedly f x n = 1041 | List.foldl (always f) x (List.range 1 n) 1042 | 1043 | 1044 | sign : BigInt -> Sign 1045 | sign bigInt = 1046 | case bigInt of 1047 | Zer -> 1048 | Zero 1049 | 1050 | Pos _ -> 1051 | Positive 1052 | 1053 | Neg _ -> 1054 | Negative 1055 | 1056 | 1057 | zero : BigInt 1058 | zero = 1059 | fromInt 0 1060 | 1061 | 1062 | one : BigInt 1063 | one = 1064 | fromInt 1 1065 | 1066 | 1067 | {-| We can perform operations more quickly if we don't worry about keeping things in final compressed form. 1068 | This takes a messed up number and cleans it up. 1069 | -} 1070 | normalise : BigIntNotNormalised -> BigInt 1071 | normalise (BigIntNotNormalised s digits) = 1072 | let 1073 | (Magnitude normalisedMag) = 1074 | normaliseMagnitude digits 1075 | in 1076 | if isNegativeMagnitude normalisedMag then 1077 | let 1078 | (Magnitude normalisedMag2) = 1079 | normaliseMagnitude (MagnitudeNotNormalised (List.map Basics.negate normalisedMag)) 1080 | in 1081 | mkBigInt (signNegate s) (Magnitude normalisedMag2) 1082 | 1083 | else 1084 | mkBigInt s (Magnitude normalisedMag) 1085 | 1086 | 1087 | normaliseMagnitude : MagnitudeNotNormalised -> Magnitude 1088 | normaliseMagnitude (MagnitudeNotNormalised xs) = 1089 | Magnitude (xs |> normaliseDigitList 0 |> dropZeroes) 1090 | 1091 | 1092 | normaliseDigitList : Int -> List Int -> List Int 1093 | normaliseDigitList carry xs = 1094 | case xs of 1095 | [] -> 1096 | if carry > baseDigit then 1097 | normaliseDigitList 0 [ carry ] 1098 | 1099 | else 1100 | [ carry ] 1101 | 1102 | x :: xs_ -> 1103 | let 1104 | ( newCarry, x_ ) = 1105 | normaliseDigit (x + carry) 1106 | in 1107 | x_ :: normaliseDigitList newCarry xs_ 1108 | 1109 | 1110 | normaliseDigit : Int -> ( Int, Int ) 1111 | normaliseDigit x = 1112 | if x < 0 then 1113 | normaliseDigit (x + baseDigit) 1114 | |> Tuple.mapFirst ((+) -1) 1115 | 1116 | else 1117 | ( x // baseDigit, remainderBy baseDigit x ) 1118 | 1119 | 1120 | dropZeroes : List Int -> List Int 1121 | dropZeroes ls = 1122 | List.Extra.dropWhileRight ((==) 0) ls 1123 | 1124 | 1125 | isNegativeMagnitude : List Int -> Bool 1126 | isNegativeMagnitude digits = 1127 | case List.Extra.last digits of 1128 | Nothing -> 1129 | False 1130 | 1131 | Just x -> 1132 | x < 0 1133 | 1134 | 1135 | {-| Compute the Greatest Common Divisors of two numbers. 1136 | -} 1137 | gcd : BigInt -> BigInt -> BigInt 1138 | gcd x y = 1139 | let 1140 | -- l > 0, r > 0 1141 | go : BigInt -> BigInt -> BigInt 1142 | go l r = 1143 | case compare l r of 1144 | EQ -> 1145 | l 1146 | 1147 | LT -> 1148 | innerLoop r l 1149 | 1150 | GT -> 1151 | innerLoop l r 1152 | 1153 | -- l > r >= 0 1154 | innerLoop : BigInt -> BigInt -> BigInt 1155 | innerLoop l r = 1156 | case modBy r l of 1157 | Nothing -> 1158 | l 1159 | 1160 | Just rem -> 1161 | innerLoop r rem 1162 | in 1163 | case ( x, y ) of 1164 | ( Zer, _ ) -> 1165 | y 1166 | 1167 | ( _, Zer ) -> 1168 | x 1169 | 1170 | ( Neg nx, Neg ny ) -> 1171 | go (Pos nx) (Pos ny) 1172 | 1173 | ( Neg nx, Pos py ) -> 1174 | go (Pos nx) (Pos py) 1175 | 1176 | ( Pos px, Neg ny ) -> 1177 | go (Pos px) (Pos ny) 1178 | 1179 | ( Pos px, Pos py ) -> 1180 | go (Pos px) (Pos py) 1181 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@mattpiz/elm-test-rs-darwin-arm64@3.0.1-0": 6 | version "3.0.1-0" 7 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-darwin-arm64/-/elm-test-rs-darwin-arm64-3.0.1-0.tgz#f11ef5a1d47a58680386a01903a9b1f7b1558565" 8 | integrity sha512-P9T1XhCgMnKCVaWl41YHvauXh5kDNEIDQyztk/XQTKLj3dA/T9wQ2rOpYrzCptQaLE0W+7yCayLLcWjpKmDm2w== 9 | 10 | "@mattpiz/elm-test-rs-darwin-x64@3.0.1-0": 11 | version "3.0.1-0" 12 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-darwin-x64/-/elm-test-rs-darwin-x64-3.0.1-0.tgz#c829955b6fd77bf28a9384a091b1cf43fccbee71" 13 | integrity sha512-JEsw1bBHVLeZ9ZqpAF10iaDhcaT5f1BYo+lOrUTxqj7X4s2/aQXoAOYoh7p2i0M689ZQoJvJlw0DPdzOuxWUqA== 14 | 15 | "@mattpiz/elm-test-rs-linux-arm64@3.0.1-0": 16 | version "3.0.1-0" 17 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-linux-arm64/-/elm-test-rs-linux-arm64-3.0.1-0.tgz#2f7d87b4a4f69ec13e94c5a5d5e17ddda4846f2f" 18 | integrity sha512-3A/1iRrG7itGxwUnXUmS9M9isoNjMhm4yE8rHu2om0xWX/+S+2g+0Dl++ZXEAtm5c+t5F8dbYvi0wA8G7oidXQ== 19 | 20 | "@mattpiz/elm-test-rs-linux-arm@3.0.1-0": 21 | version "3.0.1-0" 22 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-linux-arm/-/elm-test-rs-linux-arm-3.0.1-0.tgz#e9be0b31cdce04f16c99e0d00b090250e30bba5c" 23 | integrity sha512-nBF348Qs4ZTh1KhSzceHOZrZ0aZUF2r6Su/ggudzzeV9Sx7oW4K3EEx+3tZ5L8ZrAQjpbZ7iVK9UOZekWoXsOw== 24 | 25 | "@mattpiz/elm-test-rs-linux-x64@3.0.1-0": 26 | version "3.0.1-0" 27 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-linux-x64/-/elm-test-rs-linux-x64-3.0.1-0.tgz#39edcd8e123a9abd65dac4ffe96f83256fe484d2" 28 | integrity sha512-MCRdBazLDEu2GH4yASzTa3nngCPnKuf3KDjXHG1Oio301a3MTQOntOtniLwnEd/Je6wP30ff/WuOHlSloQWQjQ== 29 | 30 | "@mattpiz/elm-test-rs-win32-x64@3.0.1-0": 31 | version "3.0.1-0" 32 | resolved "https://registry.yarnpkg.com/@mattpiz/elm-test-rs-win32-x64/-/elm-test-rs-win32-x64-3.0.1-0.tgz#80d5ad27fb28932d6277797d67d072dd8e138c30" 33 | integrity sha512-GIoHBMGrZnit4evzCNNmGFbjKOBwl+EdBwUcmfEbM626aFNAIDaORQGXFJPKBKv/ujPTzAlXemBnX4jjjpYu3w== 34 | 35 | "@sindresorhus/is@^4.0.0": 36 | version "4.6.0" 37 | resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" 38 | integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== 39 | 40 | "@szmarczak/http-timer@^4.0.5": 41 | version "4.0.6" 42 | resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" 43 | integrity sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w== 44 | dependencies: 45 | defer-to-connect "^2.0.0" 46 | 47 | "@types/cacheable-request@^6.0.1": 48 | version "6.0.3" 49 | resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.3.tgz#a430b3260466ca7b5ca5bfd735693b36e7a9d183" 50 | integrity sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw== 51 | dependencies: 52 | "@types/http-cache-semantics" "*" 53 | "@types/keyv" "^3.1.4" 54 | "@types/node" "*" 55 | "@types/responselike" "^1.0.0" 56 | 57 | "@types/http-cache-semantics@*": 58 | version "4.0.4" 59 | resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" 60 | integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== 61 | 62 | "@types/keyv@^3.1.4": 63 | version "3.1.4" 64 | resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.4.tgz#3ccdb1c6751b0c7e52300bcdacd5bcbf8faa75b6" 65 | integrity sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg== 66 | dependencies: 67 | "@types/node" "*" 68 | 69 | "@types/node@*": 70 | version "24.0.15" 71 | resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.15.tgz#f34fbc973e7d64217106e0c59ed8761e6b51381e" 72 | integrity sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA== 73 | dependencies: 74 | undici-types "~7.8.0" 75 | 76 | "@types/responselike@^1.0.0": 77 | version "1.0.3" 78 | resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.3.tgz#cc29706f0a397cfe6df89debfe4bf5cea159db50" 79 | integrity sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw== 80 | dependencies: 81 | "@types/node" "*" 82 | 83 | ansi-escapes@^4.2.1: 84 | version "4.3.2" 85 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" 86 | integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== 87 | dependencies: 88 | type-fest "^0.21.3" 89 | 90 | ansi-regex@^5.0.1: 91 | version "5.0.1" 92 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" 93 | integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== 94 | 95 | ansi-styles@^4.0.0, ansi-styles@^4.1.0: 96 | version "4.3.0" 97 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" 98 | integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== 99 | dependencies: 100 | color-convert "^2.0.1" 101 | 102 | anymatch@~3.1.2: 103 | version "3.1.3" 104 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" 105 | integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== 106 | dependencies: 107 | normalize-path "^3.0.0" 108 | picomatch "^2.0.4" 109 | 110 | balanced-match@^1.0.0: 111 | version "1.0.2" 112 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" 113 | integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== 114 | 115 | base64-js@^1.3.1: 116 | version "1.5.1" 117 | resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" 118 | integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== 119 | 120 | binary-extensions@^2.0.0: 121 | version "2.3.0" 122 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" 123 | integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== 124 | 125 | bl@^4.1.0: 126 | version "4.1.0" 127 | resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" 128 | integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== 129 | dependencies: 130 | buffer "^5.5.0" 131 | inherits "^2.0.4" 132 | readable-stream "^3.4.0" 133 | 134 | brace-expansion@^1.1.7: 135 | version "1.1.12" 136 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843" 137 | integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg== 138 | dependencies: 139 | balanced-match "^1.0.0" 140 | concat-map "0.0.1" 141 | 142 | braces@~3.0.2: 143 | version "3.0.3" 144 | resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789" 145 | integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA== 146 | dependencies: 147 | fill-range "^7.1.1" 148 | 149 | buffer@^5.5.0: 150 | version "5.7.1" 151 | resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" 152 | integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== 153 | dependencies: 154 | base64-js "^1.3.1" 155 | ieee754 "^1.1.13" 156 | 157 | cacheable-lookup@^5.0.3: 158 | version "5.0.4" 159 | resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" 160 | integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== 161 | 162 | cacheable-request@^7.0.2: 163 | version "7.0.4" 164 | resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.4.tgz#7a33ebf08613178b403635be7b899d3e69bbe817" 165 | integrity sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg== 166 | dependencies: 167 | clone-response "^1.0.2" 168 | get-stream "^5.1.0" 169 | http-cache-semantics "^4.0.0" 170 | keyv "^4.0.0" 171 | lowercase-keys "^2.0.0" 172 | normalize-url "^6.0.1" 173 | responselike "^2.0.0" 174 | 175 | chalk@^4.0.0, chalk@^4.1.0: 176 | version "4.1.2" 177 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" 178 | integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== 179 | dependencies: 180 | ansi-styles "^4.1.0" 181 | supports-color "^7.1.0" 182 | 183 | chokidar@^3.5.2: 184 | version "3.6.0" 185 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.6.0.tgz#197c6cc669ef2a8dc5e7b4d97ee4e092c3eb0d5b" 186 | integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== 187 | dependencies: 188 | anymatch "~3.1.2" 189 | braces "~3.0.2" 190 | glob-parent "~5.1.2" 191 | is-binary-path "~2.1.0" 192 | is-glob "~4.0.1" 193 | normalize-path "~3.0.0" 194 | readdirp "~3.6.0" 195 | optionalDependencies: 196 | fsevents "~2.3.2" 197 | 198 | cli-cursor@^3.1.0: 199 | version "3.1.0" 200 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" 201 | integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== 202 | dependencies: 203 | restore-cursor "^3.1.0" 204 | 205 | cli-spinners@^2.5.0: 206 | version "2.9.2" 207 | resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" 208 | integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== 209 | 210 | clone-response@^1.0.2: 211 | version "1.0.3" 212 | resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.3.tgz#af2032aa47816399cf5f0a1d0db902f517abb8c3" 213 | integrity sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA== 214 | dependencies: 215 | mimic-response "^1.0.0" 216 | 217 | clone@^1.0.2: 218 | version "1.0.4" 219 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" 220 | integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== 221 | 222 | color-convert@^2.0.1: 223 | version "2.0.1" 224 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" 225 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== 226 | dependencies: 227 | color-name "~1.1.4" 228 | 229 | color-name@~1.1.4: 230 | version "1.1.4" 231 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" 232 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== 233 | 234 | concat-map@0.0.1: 235 | version "0.0.1" 236 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 237 | integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== 238 | 239 | cross-spawn@^7.0.3: 240 | version "7.0.6" 241 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" 242 | integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== 243 | dependencies: 244 | path-key "^3.1.0" 245 | shebang-command "^2.0.0" 246 | which "^2.0.1" 247 | 248 | debug@^4.1.1: 249 | version "4.4.1" 250 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b" 251 | integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ== 252 | dependencies: 253 | ms "^2.1.3" 254 | 255 | decompress-response@^6.0.0: 256 | version "6.0.0" 257 | resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-6.0.0.tgz#ca387612ddb7e104bd16d85aab00d5ecf09c66fc" 258 | integrity sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== 259 | dependencies: 260 | mimic-response "^3.1.0" 261 | 262 | defaults@^1.0.3: 263 | version "1.0.4" 264 | resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" 265 | integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== 266 | dependencies: 267 | clone "^1.0.2" 268 | 269 | defer-to-connect@^2.0.0: 270 | version "2.0.1" 271 | resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" 272 | integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== 273 | 274 | elm-review@^2.13.3: 275 | version "2.13.3" 276 | resolved "https://registry.yarnpkg.com/elm-review/-/elm-review-2.13.3.tgz#396a8a230a26fabd6d5cb3a41a77870249bc9c69" 277 | integrity sha512-iEUihHeqTv0Xr5CVcUf1hDPxypXNtFPVunyEpn2LKAaa/FtEfTHKOVeBYfFNnt+bIDHbGA+hkWPv1qfzxEDH8Q== 278 | dependencies: 279 | chalk "^4.0.0" 280 | chokidar "^3.5.2" 281 | cross-spawn "^7.0.3" 282 | elm-solve-deps-wasm "^1.0.2 || ^2.0.0" 283 | fastest-levenshtein "^1.0.16" 284 | find-up "^4.1.0 || ^5.0.0" 285 | folder-hash "^3.3.0" 286 | got "^11.8.5" 287 | graceful-fs "^4.2.11" 288 | minimist "^1.2.6" 289 | ora "^5.4.0" 290 | path-key "^3.1.1" 291 | prompts "^2.2.1" 292 | strip-ansi "^6.0.0" 293 | terminal-link "^2.1.1" 294 | tinyglobby "^0.2.10" 295 | which "^2.0.2" 296 | wrap-ansi "^7.0.0" 297 | 298 | "elm-solve-deps-wasm@^1.0.2 || ^2.0.0": 299 | version "2.0.0" 300 | resolved "https://registry.yarnpkg.com/elm-solve-deps-wasm/-/elm-solve-deps-wasm-2.0.0.tgz#8214705876fbcd9789cf6ab2db45ec781b5c1234" 301 | integrity sha512-11OV8FgB9qsth/F94q2SJjb1MoEgbworSyNM1L+YlxVoaxp7wtWPyA8cNcPEkSoIKG1B8Tqg68ED1P6dVamHSg== 302 | 303 | elm-test-rs@^3.0.1-0: 304 | version "3.0.1-0" 305 | resolved "https://registry.yarnpkg.com/elm-test-rs/-/elm-test-rs-3.0.1-0.tgz#7424007d38a4606568706eaab405c70950e55b49" 306 | integrity sha512-mAYDM+h6dsibdt5iASuUAX9zj5LSmyXGne1T0ll7Mt8YjZ5FbXf+Ca6Iytx90YwsdsJjU4aGnEswTfB8MpW1hQ== 307 | optionalDependencies: 308 | "@mattpiz/elm-test-rs-darwin-arm64" "3.0.1-0" 309 | "@mattpiz/elm-test-rs-darwin-x64" "3.0.1-0" 310 | "@mattpiz/elm-test-rs-linux-arm" "3.0.1-0" 311 | "@mattpiz/elm-test-rs-linux-arm64" "3.0.1-0" 312 | "@mattpiz/elm-test-rs-linux-x64" "3.0.1-0" 313 | "@mattpiz/elm-test-rs-win32-x64" "3.0.1-0" 314 | 315 | emoji-regex@^8.0.0: 316 | version "8.0.0" 317 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" 318 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== 319 | 320 | end-of-stream@^1.1.0: 321 | version "1.4.5" 322 | resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c" 323 | integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg== 324 | dependencies: 325 | once "^1.4.0" 326 | 327 | fastest-levenshtein@^1.0.16: 328 | version "1.0.16" 329 | resolved "https://registry.yarnpkg.com/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz#210e61b6ff181de91ea9b3d1b84fdedd47e034e5" 330 | integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== 331 | 332 | fdir@^6.4.4: 333 | version "6.4.6" 334 | resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.6.tgz#2b268c0232697063111bbf3f64810a2a741ba281" 335 | integrity sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w== 336 | 337 | fill-range@^7.1.1: 338 | version "7.1.1" 339 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292" 340 | integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg== 341 | dependencies: 342 | to-regex-range "^5.0.1" 343 | 344 | "find-up@^4.1.0 || ^5.0.0": 345 | version "5.0.0" 346 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" 347 | integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== 348 | dependencies: 349 | locate-path "^6.0.0" 350 | path-exists "^4.0.0" 351 | 352 | folder-hash@^3.3.0: 353 | version "3.3.3" 354 | resolved "https://registry.yarnpkg.com/folder-hash/-/folder-hash-3.3.3.tgz#883c8359d54f91b3f02c1a646c00c30e5831365b" 355 | integrity sha512-SDgHBgV+RCjrYs8aUwCb9rTgbTVuSdzvFmLaChsLre1yf+D64khCW++VYciaByZ8Rm0uKF8R/XEpXuTRSGUM1A== 356 | dependencies: 357 | debug "^4.1.1" 358 | graceful-fs "~4.2.0" 359 | minimatch "~3.0.4" 360 | 361 | fsevents@~2.3.2: 362 | version "2.3.3" 363 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" 364 | integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== 365 | 366 | get-stream@^5.1.0: 367 | version "5.2.0" 368 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" 369 | integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== 370 | dependencies: 371 | pump "^3.0.0" 372 | 373 | glob-parent@~5.1.2: 374 | version "5.1.2" 375 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" 376 | integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== 377 | dependencies: 378 | is-glob "^4.0.1" 379 | 380 | got@^11.8.5: 381 | version "11.8.6" 382 | resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" 383 | integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== 384 | dependencies: 385 | "@sindresorhus/is" "^4.0.0" 386 | "@szmarczak/http-timer" "^4.0.5" 387 | "@types/cacheable-request" "^6.0.1" 388 | "@types/responselike" "^1.0.0" 389 | cacheable-lookup "^5.0.3" 390 | cacheable-request "^7.0.2" 391 | decompress-response "^6.0.0" 392 | http2-wrapper "^1.0.0-beta.5.2" 393 | lowercase-keys "^2.0.0" 394 | p-cancelable "^2.0.0" 395 | responselike "^2.0.0" 396 | 397 | graceful-fs@^4.2.11, graceful-fs@~4.2.0: 398 | version "4.2.11" 399 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" 400 | integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== 401 | 402 | has-flag@^4.0.0: 403 | version "4.0.0" 404 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" 405 | integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== 406 | 407 | http-cache-semantics@^4.0.0: 408 | version "4.2.0" 409 | resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#205f4db64f8562b76a4ff9235aa5279839a09dd5" 410 | integrity sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ== 411 | 412 | http2-wrapper@^1.0.0-beta.5.2: 413 | version "1.0.3" 414 | resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" 415 | integrity sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg== 416 | dependencies: 417 | quick-lru "^5.1.1" 418 | resolve-alpn "^1.0.0" 419 | 420 | ieee754@^1.1.13: 421 | version "1.2.1" 422 | resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" 423 | integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== 424 | 425 | inherits@^2.0.3, inherits@^2.0.4: 426 | version "2.0.4" 427 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 428 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 429 | 430 | is-binary-path@~2.1.0: 431 | version "2.1.0" 432 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" 433 | integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== 434 | dependencies: 435 | binary-extensions "^2.0.0" 436 | 437 | is-extglob@^2.1.1: 438 | version "2.1.1" 439 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" 440 | integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== 441 | 442 | is-fullwidth-code-point@^3.0.0: 443 | version "3.0.0" 444 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" 445 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== 446 | 447 | is-glob@^4.0.1, is-glob@~4.0.1: 448 | version "4.0.3" 449 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" 450 | integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== 451 | dependencies: 452 | is-extglob "^2.1.1" 453 | 454 | is-interactive@^1.0.0: 455 | version "1.0.0" 456 | resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" 457 | integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== 458 | 459 | is-number@^7.0.0: 460 | version "7.0.0" 461 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" 462 | integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== 463 | 464 | is-unicode-supported@^0.1.0: 465 | version "0.1.0" 466 | resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" 467 | integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== 468 | 469 | isexe@^2.0.0: 470 | version "2.0.0" 471 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 472 | integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== 473 | 474 | json-buffer@3.0.1: 475 | version "3.0.1" 476 | resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" 477 | integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== 478 | 479 | keyv@^4.0.0: 480 | version "4.5.4" 481 | resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" 482 | integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== 483 | dependencies: 484 | json-buffer "3.0.1" 485 | 486 | kleur@^3.0.3: 487 | version "3.0.3" 488 | resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" 489 | integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== 490 | 491 | locate-path@^6.0.0: 492 | version "6.0.0" 493 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" 494 | integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== 495 | dependencies: 496 | p-locate "^5.0.0" 497 | 498 | log-symbols@^4.1.0: 499 | version "4.1.0" 500 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" 501 | integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== 502 | dependencies: 503 | chalk "^4.1.0" 504 | is-unicode-supported "^0.1.0" 505 | 506 | lowercase-keys@^2.0.0: 507 | version "2.0.0" 508 | resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" 509 | integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== 510 | 511 | mimic-fn@^2.1.0: 512 | version "2.1.0" 513 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" 514 | integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== 515 | 516 | mimic-response@^1.0.0: 517 | version "1.0.1" 518 | resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" 519 | integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== 520 | 521 | mimic-response@^3.1.0: 522 | version "3.1.0" 523 | resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" 524 | integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== 525 | 526 | minimatch@~3.0.4: 527 | version "3.0.8" 528 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" 529 | integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== 530 | dependencies: 531 | brace-expansion "^1.1.7" 532 | 533 | minimist@^1.2.6: 534 | version "1.2.8" 535 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" 536 | integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== 537 | 538 | ms@^2.1.3: 539 | version "2.1.3" 540 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" 541 | integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== 542 | 543 | normalize-path@^3.0.0, normalize-path@~3.0.0: 544 | version "3.0.0" 545 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" 546 | integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== 547 | 548 | normalize-url@^6.0.1: 549 | version "6.1.0" 550 | resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" 551 | integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== 552 | 553 | once@^1.3.1, once@^1.4.0: 554 | version "1.4.0" 555 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 556 | integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== 557 | dependencies: 558 | wrappy "1" 559 | 560 | onetime@^5.1.0: 561 | version "5.1.2" 562 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" 563 | integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== 564 | dependencies: 565 | mimic-fn "^2.1.0" 566 | 567 | ora@^5.4.0: 568 | version "5.4.1" 569 | resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" 570 | integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== 571 | dependencies: 572 | bl "^4.1.0" 573 | chalk "^4.1.0" 574 | cli-cursor "^3.1.0" 575 | cli-spinners "^2.5.0" 576 | is-interactive "^1.0.0" 577 | is-unicode-supported "^0.1.0" 578 | log-symbols "^4.1.0" 579 | strip-ansi "^6.0.0" 580 | wcwidth "^1.0.1" 581 | 582 | p-cancelable@^2.0.0: 583 | version "2.1.1" 584 | resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" 585 | integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== 586 | 587 | p-limit@^3.0.2: 588 | version "3.1.0" 589 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" 590 | integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== 591 | dependencies: 592 | yocto-queue "^0.1.0" 593 | 594 | p-locate@^5.0.0: 595 | version "5.0.0" 596 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" 597 | integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== 598 | dependencies: 599 | p-limit "^3.0.2" 600 | 601 | path-exists@^4.0.0: 602 | version "4.0.0" 603 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" 604 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== 605 | 606 | path-key@^3.1.0, path-key@^3.1.1: 607 | version "3.1.1" 608 | resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" 609 | integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== 610 | 611 | picomatch@^2.0.4, picomatch@^2.2.1: 612 | version "2.3.1" 613 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" 614 | integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== 615 | 616 | picomatch@^4.0.2: 617 | version "4.0.3" 618 | resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" 619 | integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== 620 | 621 | prompts@^2.2.1: 622 | version "2.4.2" 623 | resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069" 624 | integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== 625 | dependencies: 626 | kleur "^3.0.3" 627 | sisteransi "^1.0.5" 628 | 629 | pump@^3.0.0: 630 | version "3.0.3" 631 | resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d" 632 | integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA== 633 | dependencies: 634 | end-of-stream "^1.1.0" 635 | once "^1.3.1" 636 | 637 | quick-lru@^5.1.1: 638 | version "5.1.1" 639 | resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" 640 | integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== 641 | 642 | readable-stream@^3.4.0: 643 | version "3.6.2" 644 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" 645 | integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== 646 | dependencies: 647 | inherits "^2.0.3" 648 | string_decoder "^1.1.1" 649 | util-deprecate "^1.0.1" 650 | 651 | readdirp@~3.6.0: 652 | version "3.6.0" 653 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" 654 | integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== 655 | dependencies: 656 | picomatch "^2.2.1" 657 | 658 | resolve-alpn@^1.0.0: 659 | version "1.2.1" 660 | resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" 661 | integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== 662 | 663 | responselike@^2.0.0: 664 | version "2.0.1" 665 | resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.1.tgz#9a0bc8fdc252f3fb1cca68b016591059ba1422bc" 666 | integrity sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw== 667 | dependencies: 668 | lowercase-keys "^2.0.0" 669 | 670 | restore-cursor@^3.1.0: 671 | version "3.1.0" 672 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" 673 | integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== 674 | dependencies: 675 | onetime "^5.1.0" 676 | signal-exit "^3.0.2" 677 | 678 | safe-buffer@~5.2.0: 679 | version "5.2.1" 680 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" 681 | integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== 682 | 683 | shebang-command@^2.0.0: 684 | version "2.0.0" 685 | resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" 686 | integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== 687 | dependencies: 688 | shebang-regex "^3.0.0" 689 | 690 | shebang-regex@^3.0.0: 691 | version "3.0.0" 692 | resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" 693 | integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== 694 | 695 | signal-exit@^3.0.2: 696 | version "3.0.7" 697 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" 698 | integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== 699 | 700 | sisteransi@^1.0.5: 701 | version "1.0.5" 702 | resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" 703 | integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== 704 | 705 | string-width@^4.1.0: 706 | version "4.2.3" 707 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" 708 | integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== 709 | dependencies: 710 | emoji-regex "^8.0.0" 711 | is-fullwidth-code-point "^3.0.0" 712 | strip-ansi "^6.0.1" 713 | 714 | string_decoder@^1.1.1: 715 | version "1.3.0" 716 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" 717 | integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== 718 | dependencies: 719 | safe-buffer "~5.2.0" 720 | 721 | strip-ansi@^6.0.0, strip-ansi@^6.0.1: 722 | version "6.0.1" 723 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" 724 | integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== 725 | dependencies: 726 | ansi-regex "^5.0.1" 727 | 728 | supports-color@^7.0.0, supports-color@^7.1.0: 729 | version "7.2.0" 730 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" 731 | integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== 732 | dependencies: 733 | has-flag "^4.0.0" 734 | 735 | supports-hyperlinks@^2.0.0: 736 | version "2.3.0" 737 | resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz#3943544347c1ff90b15effb03fc14ae45ec10624" 738 | integrity sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA== 739 | dependencies: 740 | has-flag "^4.0.0" 741 | supports-color "^7.0.0" 742 | 743 | terminal-link@^2.1.1: 744 | version "2.1.1" 745 | resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" 746 | integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== 747 | dependencies: 748 | ansi-escapes "^4.2.1" 749 | supports-hyperlinks "^2.0.0" 750 | 751 | tinyglobby@^0.2.10: 752 | version "0.2.14" 753 | resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.14.tgz#5280b0cf3f972b050e74ae88406c0a6a58f4079d" 754 | integrity sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ== 755 | dependencies: 756 | fdir "^6.4.4" 757 | picomatch "^4.0.2" 758 | 759 | to-regex-range@^5.0.1: 760 | version "5.0.1" 761 | resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" 762 | integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== 763 | dependencies: 764 | is-number "^7.0.0" 765 | 766 | type-fest@^0.21.3: 767 | version "0.21.3" 768 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" 769 | integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== 770 | 771 | undici-types@~7.8.0: 772 | version "7.8.0" 773 | resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294" 774 | integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw== 775 | 776 | util-deprecate@^1.0.1: 777 | version "1.0.2" 778 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 779 | integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== 780 | 781 | wcwidth@^1.0.1: 782 | version "1.0.1" 783 | resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" 784 | integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== 785 | dependencies: 786 | defaults "^1.0.3" 787 | 788 | which@^2.0.1, which@^2.0.2: 789 | version "2.0.2" 790 | resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" 791 | integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== 792 | dependencies: 793 | isexe "^2.0.0" 794 | 795 | wrap-ansi@^7.0.0: 796 | version "7.0.0" 797 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" 798 | integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== 799 | dependencies: 800 | ansi-styles "^4.0.0" 801 | string-width "^4.1.0" 802 | strip-ansi "^6.0.0" 803 | 804 | wrappy@1: 805 | version "1.0.2" 806 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 807 | integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== 808 | 809 | yocto-queue@^0.1.0: 810 | version "0.1.0" 811 | resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" 812 | integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== 813 | --------------------------------------------------------------------------------