├── .github └── ISSUE_TEMPLATE │ └── bug_report.md ├── .gitignore ├── LICENSE ├── README.md ├── examples ├── alphabet.naz ├── cg │ ├── 333.naz │ ├── compactify.naz │ ├── doublespeak.naz │ ├── fullwidth.naz │ ├── generated.naz │ ├── howhappy.naz │ └── lowercase.naz ├── dd.naz ├── firstchar.naz ├── func.naz ├── helloworld.naz ├── lessthan.naz ├── prime.naz ├── rot13.naz └── var.naz ├── index.js ├── naz.js ├── package-lock.json ├── package.json └── test ├── common.js ├── input.js └── no_input.js /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Report a bug 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | Affects: 12 | 13 | 14 | 15 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 sporeball & contributors 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # naz 2 | **naz** is an esolang where every instruction is named by a number and a letter. 3 | 4 | ### usage 5 | 6 | #### node 7 | first, clone this repository, and install its dependencies: 8 | 9 | ``` 10 | $ npm install 11 | ``` 12 | 13 | you can then run any naz program like so: 14 | 15 | ``` 16 | $ node naz.js filename.naz 17 | ``` 18 | 19 | #### online 20 | you can also experiment with naz using the [web-based interpreter](https://sporeball.dev/naz)! this is usually given less priority than the original Node-based implementation, but should work if you're in a hurry! 21 | 22 | ### instruction reference 23 | - `0-9` - number literal. exactly **one** of these **must** be placed before every instruction. 24 | - `a` - adds *n* to the register. 25 | - `d` - divides the register by *n*, rounding down. 26 | - `e` - conditional equal to. goto function *n* if the value in the register is *equal to* the value of the variable referenced before this instruction. 27 | - `f` - function instruction: 28 | - opcode 0 - *calls* function *n*. 29 | - opcode 1 - *declares* function *n*. 30 | - `g` - conditional greater than. goto function *n* if the value in the register is *greater than* the value of the variable referenced before this instruction. 31 | - `h` - halts program execution. **this is meant to be used for debugging purposes only.** 32 | - `l` - conditional less than. goto function *n* if the value in the register is *less than* the value of the variable referenced before this instruction. 33 | - `m` - multiplies the register by *n*. 34 | - `n` - negates variable *n*. 35 | - `o` - outputs a value determined by the value in the register: 36 | - 0-9 - outputs that number. 37 | - 10 - outputs a newline. 38 | - 32-126 - outputs an ASCII value. 39 | - `p` - divides the register by *n*, then sets the register equal to the remainder. 40 | - `r` - sets the register equal to the ASCII value of the *n*-th character of the input string, then removes that character from the input string. 41 | - `s` - subtracts *n* from the register. 42 | - `v` - variable instruction: 43 | - opcode 0 - sets the register equal to the value of variable *n*. 44 | - opcode 2 - sets variable *n* equal to the value in the register. 45 | - opcode 3 - variable *n* will be considered when executing the conditional instruction that follows. 46 | - `x` - sets the current opcode to *n*. 47 | 48 | ### opcodes 49 | - `0` - normal operation. instructions will execute one at a time, in order. 50 | - `1` - function write. the interpreter **must** parse a call to the `f` instruction first; instructions will then be added onto the end of the referenced function until a newline is parsed or the opcode is explicitly set to 0. 51 | - `2` - variable write. the interpreter **must** parse a call to the `v` instruction; after this is executed, the interpreter will return to opcode 0. 52 | - `3` - conditional opcode. the interpreter **must** parse a call to the `v` instruction, followed by a call to a conditional instruction (`l`, `e` or `g`). afterwards, the interpreter will return to opcode 0. 53 | 54 | ### command line flags 55 | - `-d` / `--delay` - sets the delay between execution steps (default: 1ms) (optional) 56 | - `-f` / `--file` - sets the file whose contents will be read by the `r` instruction. this takes precedence over the `-i` flag (default: none) (optional) 57 | - `-i` / `--input` - sets the string to use as input, to be read by the `r` instruction (default: none) (optional) 58 | - `-n` / `--null` - if present, a null byte (U+0000) will be appended to the input 59 | - `-u` / `--unlimited` - if present, the default limits on integer values will be removed 60 | 61 | #### notes 62 | - by default, the value in the register must always be between -127 and 127 (both inclusive), or program execution will **immediately halt**. this behavior can be disabled with the `-u` flag. 63 | - conditional instructions can only be run in opcode 3. 64 | - anything placed after a `#` on a line will be ignored, allowing you to comment your code. 65 | 66 | ### example 67 | the following naz program will add 9 to the register, multiply by 7, and add 2 (resulting in a value of 65), then output once, resulting in a final output of `A`: 68 | 69 | ``` 70 | 9a7m2a1o 71 | ``` 72 | 73 | for more complicated examples, check the [examples folder](https://github.com/sporeball/naz/tree/master/examples). 74 | 75 | ### testing 76 | if you're making some changes and need to make sure everything's still working correctly, you can run tests on some of the example programs like so: 77 | 78 | ``` 79 | $ npm test 80 | ``` 81 | 82 | ### computational class 83 | naz is provably as powerful as a finite state automaton, because it can implement the esolang [dd](https://esolangs.org/wiki/Dd). given some input file, the example program [dd.naz](https://github.com/sporeball/naz/blob/master/examples/dd.naz) will follow the dd specification and stop reading input when it encounters a null byte. 84 | 85 | as posited by quintopia [here](https://esolangs.org/wiki/Naz#Computational_class), naz `-u` is capable of implementing a universal Turing machine with 5 states and 7 symbols, making it Turing-complete; this means the original language is equivalent to a [bounded-storage machine](https://esolangs.org/wiki/Bounded-storage_machine). 86 | 87 | ### other implementations 88 | a few people have created naz interpreters in languages other than JavaScript! these are: 89 | - [nazly](https://github.com/Lyxal/nazly), written in Python (by [Lyxal](https://github.com/Lyxal)) 90 | - [cnaz](https://github.com/tobiasheineken/cnaz), written in C, using an unbounded integer type for naz `-u` (by [tobiasheineken](https://github.com/tobiasheineken)) 91 | 92 | ### thanks 93 | the naz interpreter and runner are heavily based on those of the fantastic [\\/\\/>](https://github.com/torcado194/worm), by [torcado](https://github.com/torcado194). <3 94 | 95 | the example program [prime.naz](https://github.com/sporeball/naz/blob/master/examples/prime.naz) was designed by [tobiasheineken](https://github.com/tobiasheineken). 96 | 97 | ### donate 98 | you can support the development of this project and others via Patreon: 99 | 100 | [![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dsporeball%26type%3Dpledges%26suffix%3D%252Fmonth&style=for-the-badge)](https://patreon.com/sporeball) 101 | -------------------------------------------------------------------------------- /examples/alphabet.naz: -------------------------------------------------------------------------------- 1 | # alphabet 2 | # illustrates a loop 3 | 4 | 9a9m9a2x1v # set variable 1 equal to 90 ("Z") 5 | 6 | # function 1 7 | # add 1, then output 8 | # call the function again if the register is less than variable 1 9 | 1x1f1a1o3x1v1l 10 | 11 | 9s9s8s 12 | 1f 13 | -------------------------------------------------------------------------------- /examples/cg/333.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 108133 2 | 3a3o3a3o3a3o 3 | -------------------------------------------------------------------------------- /examples/cg/compactify.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 203387 2 | # (102 bytes minified) 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 2a6m8m1a2x2v # set variable 2 equal to 97 ("a") 6 | 4a2x3v # set variable 3 equal to 101 ("e") 7 | 4a2x4v # set variable 4 equal to 105 ("i") 8 | 6a2x5v # set variable 5 equal to 111 ("o") 9 | 6a2x6v # set variable 6 equal to 117 ("u") 10 | 11 | # function 1 12 | # read a byte of input 13 | # goto function 2 if it equals variable 1 14 | # goto the start of the function if it equals variable 2, 3, 4, 5, or 6 15 | # otherwise, output it, then call the function again 16 | 1x1f1r3x1v2e3x2v1e3x3v1e3x4v1e3x5v1e3x6v1e1o1f 17 | 18 | # function 2 19 | # add 0 to the register 20 | 1x2f0a 21 | 22 | 1r1o1f 23 | -------------------------------------------------------------------------------- /examples/cg/doublespeak.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 188988 2 | # (32 bytes minified) 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 6 | # function 1 7 | # add 0 to the register 8 | 1x1f0a 9 | 10 | # function 2 11 | # read a byte of input 12 | # goto function 1 if it equals variable 1 13 | # otherwise, output twice and call the function again 14 | 1x2f1r3x1v1e2o2f 15 | 16 | 2f 17 | -------------------------------------------------------------------------------- /examples/cg/fullwidth.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 75979 2 | # (40 bytes minified) 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 6 | # function 1 7 | # add 0 to the register 8 | 1x1f0a 9 | 10 | # function 2 11 | # read a byte of input 12 | # goto function 1 if it equals variable 1 13 | # otherwise, output it, output a space, and call the function again 14 | 1x2f1r3x1v1e1o0m8a4m1o2f 15 | 16 | 2f 17 | -------------------------------------------------------------------------------- /examples/cg/howhappy.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 202894 2 | # (120 bytes minified) 3 | 4 | 8a5m2x1v # set variable 1 equal to 40 ("(") 5 | 1a2x2v # set variable 2 equal to 41 (")") 6 | 4a2x3v # set variable 3 equal to 45 ("-") 7 | 9a9a5a2x4v # set variable 4 equal to 68 ("D") 8 | 9 | # function 1 10 | # read the second byte of input 11 | # goto the start of the function if it equals variable 3 12 | # otherwise, call function 2 13 | 1x1f2r3x3v1e2f 14 | 15 | # function 2 16 | # goto function 3 if the register equals variable 1 17 | # goto function 5 if the register equals variable 2 18 | # goto function 6 if the register equals variable 4 19 | # otherwise, call function 4 20 | 1x2f3x1v3e3x2v5e3x4v6e4f 21 | 22 | 1x3f0m1o 23 | 1x4f0m1a1o 24 | 1x5f0m2a1o 25 | 1x6f0m3a1o 26 | 27 | 1f 28 | -------------------------------------------------------------------------------- /examples/cg/lowercase.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 12760 2 | # (90 bytes minified) 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 8a8m2x2v # set variable 2 equal to 64 ("@") 6 | 2d3m5s2x3v # set variable 3 equal to 91 ("[") 7 | 8 | # function 1 9 | # read a byte of input 10 | # goto function 4 if it equals variable 1 11 | # goto function 2 if it's greater than variable 2 12 | # otherwise, output it and call the function again 13 | 1x1f1r3x1v4e3x2v2g1o1f 14 | 15 | # function 2 16 | # goto function 3 if the register is less than variable 3 17 | # otherwise, output it and call function 1 18 | 1x2f3x3v3l1o1f 19 | 20 | # function 3 21 | # add 32, output, and call function 1 22 | 1x3f8a8a8a8a1o1f 23 | 24 | # function 4 25 | # add 0 to the register 26 | 1x4f0a 27 | 28 | 1f 29 | -------------------------------------------------------------------------------- /examples/dd.naz: -------------------------------------------------------------------------------- 1 | # dd 2 | # implements User:A's finite state automaton "dd" 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 2a9a9m1a2x2v # set variable 2 equal to 100 ("d") 6 | 7 | # function 1 8 | # output "d" twice, then call function 2 9 | 1x1f2v2o2f 10 | 11 | # function 2 12 | # read a byte of input 13 | # goto function 4 if it equals variable 1 14 | # goto function 3 if it equals variable 2 15 | # otherwise, call the function again 16 | 1x2f1r3x1v4e3x2v3e2f 17 | 18 | # function 3 19 | # read another byte of input 20 | # goto function 4 if it equals variable 1 21 | # goto function 1 if it equals variable 2 22 | # otherwise, call function 2 23 | 1x3f1r3x1v4e3x2v1e2f 24 | 25 | # function 4 26 | # add 0 to the register 27 | 1x4f0a 28 | 29 | 2f 30 | -------------------------------------------------------------------------------- /examples/firstchar.naz: -------------------------------------------------------------------------------- 1 | 1r1o 2 | -------------------------------------------------------------------------------- /examples/func.naz: -------------------------------------------------------------------------------- 1 | # func 2 | # illustrates a function 3 | 4 | # function 1 5 | # add 1, then output 6 | 1x1f1a1o 7 | 8 | 9a7m2a1o # output "A" 9 | 1f1f1f1f # use function 1 to output some subsequent letters 10 | -------------------------------------------------------------------------------- /examples/helloworld.naz: -------------------------------------------------------------------------------- 1 | 9a8m1o 2 | 9a9a9a2a1o 3 | 7a2o 4 | 3a1o 5 | 3d7a1o 6 | 9s3s1o 7 | 8a2m7a1o 8 | 9a9a6a1o 9 | 3a1o 10 | 6s1o 11 | 8s1o 12 | 3d1o 13 | -------------------------------------------------------------------------------- /examples/lessthan.naz: -------------------------------------------------------------------------------- 1 | # lessthan 2 | # illustrates a conditional 3 | 4 | # function 1 5 | # add 10, then output 6 | 1x1f9a1a1o 7 | 8 | 9a7m2a1o # output "A" 9 | 2x1v # set variable 1 equal to this 10 | 9s # subtract 9 11 | 3x1v1l # goto function 1 if the register is less than variable 1 12 | 13 | # the condition passes, so the final output is "AB" 14 | -------------------------------------------------------------------------------- /examples/prime.naz: -------------------------------------------------------------------------------- 1 | # prime 2 | # written by @tobiasheineken 3 | # this was an answer to CGCC question 57617, see that for an explanation! 4 | 5 | 2x2v1x0f0v1s2x0v1v1s2x1v2v3x1v0l 6 | 1x1f2v1o 7 | 1x4f0v1a2x0v1v1s2x1v2v3x1v4l 8 | 1x5f3v2x1v0f2v3x0v5l9v3x2v2g2v 9 | 1x3f5v2x0v8v2x9v3v1s2x3v5f0v3x2v1e2v2a3x3v3l8f 10 | 1x2f9v1s2x9v2v5a4m5m2x1v4f5f 11 | 1x6f1r8s8s8s8s8s8s 12 | 6f2x8v6f5m2m2x0v6f2x1v2v3x1v4l0v2x5v2v2x0v1x7f5v2x3v1s3x2v1e1s3x2v8e3f 13 | 1x8f2v1a1o 14 | 1x9f2v9a4m2x3v8v3x2v7e3f 15 | 9f 16 | -------------------------------------------------------------------------------- /examples/rot13.naz: -------------------------------------------------------------------------------- 1 | # CGCC question 4 2 | # (174 bytes minified) 3 | 4 | 2x1v # set variable 1 equal to 0 5 | 8a8m2x2v # set variable 2 equal to 64 ("@") 6 | 9a4a2x3v # set variable 3 equal to 77 ("M") 7 | 9a5a2x4v # set variable 4 equal to 91 ("[") 8 | 5a2x5v # set variable 5 equal to 96 ("`") 9 | 9a4a2x6v # set variable 6 equal to 109 ("m") 10 | 9a5a2x7v # set variable 7 equal to 123 ("{") 11 | 12 | # function 1 13 | # read a byte of input 14 | # goto function 7 if it equals variable 1 15 | # goto function 5 if it's greater than variable 5 16 | # goto function 2 if it's greater than variable 2 17 | # otherwise, call function 8 18 | 1x1f1r3x1v7e3x5v5g3x2v2g8f 19 | 20 | # function 2 21 | # goto function 3 if the register is less than variable 4 22 | # otherwise, call function 8 23 | 1x2f3x4v3l8f 24 | 25 | # function 3 26 | # goto function 4 if the register is greater than variable 3 27 | # otherwise, add 13 and call function 8 28 | 1x3f3x3v4g9a4a8f 29 | 30 | # function 4 31 | # subtract 13 and call function 8 32 | 1x4f9s4s8f 33 | 34 | # function 5 35 | # goto function 6 if the register is less than variable 7 36 | # otherwise, call function 8 37 | 1x5f3x7v6l8f 38 | 39 | # function 6 40 | # goto function 4 if the register is greater than variable 6 41 | # otherwise, add 13 and call function 8 42 | 1x6f3x6v4g9a4a8f 43 | 44 | # function 7 45 | # add 0 to the register 46 | 1x7f0a 47 | 48 | # function 8 49 | # output, then call function 1 50 | 1x8f1o1f 51 | 52 | 1f 53 | -------------------------------------------------------------------------------- /examples/var.naz: -------------------------------------------------------------------------------- 1 | # var 2 | # illustrates variable usage 3 | 4 | 9a7m2a1o # output "A" 5 | 2x1v # store this in variable 1 6 | 9s9s1s3o # output "..." 7 | 1v1o # use variable 1 to quickly output "A" again 8 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | /* 2 | index.js 3 | naz interpreter 4 | copyright (c) 2021 sporeball & contributors: 5 | - tobiasheineken 6 | MIT license 7 | */ 8 | 9 | // dependencies 10 | import chalkTemplate from 'chalk-template'; 11 | import chalk from 'chalk'; 12 | 13 | let contents; 14 | let filename; 15 | 16 | let opcode = 0; 17 | let register = 0; 18 | 19 | let num = 0; // number to be used for the next instruction 20 | let fnum = 0; // number to be used when executing the f instruction 21 | let cnum; 22 | 23 | let line = 1; 24 | let col = 1; 25 | 26 | let input; 27 | let output = ''; 28 | 29 | let u; 30 | 31 | let functions = Array(10).fill(''); 32 | let variables = []; 33 | const lines = Array(10).fill(0); // line numbers where functions are declared 34 | const cols = Array(10).fill(0); // column numbers where functions are declared 35 | 36 | let callStack = []; 37 | 38 | let func = false; // are we in the middle of declaring a function? 39 | 40 | const instructions = { 41 | // arithmetic instructions 42 | a: () => { 43 | register += num; 44 | chkRegister(); 45 | }, 46 | d: () => { 47 | if (num === 0) { 48 | throw new Error('division by zero'); 49 | } 50 | register = Math.floor(register / num); 51 | }, 52 | m: () => { 53 | register *= num; 54 | chkRegister(); 55 | }, 56 | s: () => { 57 | register -= num; 58 | chkRegister(); 59 | }, 60 | p: () => { 61 | if (num === 0) { 62 | throw new Error('division by zero'); 63 | } 64 | register = register % num; 65 | }, 66 | 67 | // program flow instructions 68 | f: () => { 69 | fnum = num; 70 | if (opcode === 0 || opcode === 3) { 71 | const capturedNum = num; 72 | if (functions[capturedNum] === '') { 73 | throw new Error('use of undeclared function'); 74 | } 75 | 76 | // set the top frame's position to where we are 77 | callStack[0].splice(1, 2, line, col); 78 | // push a new frame with undefined position 79 | // if something goes wrong, it will be updated 80 | callStack.unshift([`${fnum}f`, undefined, undefined]); 81 | 82 | // move to the start of the called function 83 | line = lines[fnum]; 84 | col = cols[fnum] + 2; 85 | 86 | let abort; 87 | for (let i = 0; i < functions[capturedNum].length && !abort; i += 2) { 88 | const val = functions[capturedNum].substr(i, 2); 89 | num = Number(val.slice(0, 1)); 90 | const instruction = val.slice(1, 2); 91 | abort = instructions[instruction](); 92 | col += 2; 93 | } 94 | 95 | // discard the top frame 96 | callStack.shift(); 97 | // restore position 98 | [, line, col] = callStack[0]; 99 | } else if (opcode === 1) { 100 | if (functions[num] !== '') { 101 | throw new Error('attempt to redeclare function'); 102 | } 103 | lines[num] = line; 104 | cols[num] = col; 105 | func = true; 106 | } 107 | }, 108 | h: () => { 109 | warn('program halted'); 110 | console.log(trace()); 111 | if (output === '') { 112 | console.log(chalkTemplate`{gray (no output)}`); 113 | } else { 114 | console.log(`output: ${output}`); 115 | } 116 | process.exit(0); 117 | }, 118 | o: () => { 119 | let val; 120 | if (register > -1 && register < 10) { 121 | val = register.toString(); 122 | } else if (register === 10) { 123 | val = '\n'; 124 | } else if (register > 31 && register < 127) { 125 | val = String.fromCharCode(register); 126 | } else { 127 | if (u) { 128 | val = String.fromCharCode(register); 129 | } else { 130 | throw new Error('invalid output value'); 131 | } 132 | } 133 | 134 | output += val.repeat(num); 135 | }, 136 | v: () => { 137 | if (opcode === 0) { 138 | if (variables[num] === undefined) { 139 | throw new Error('use of undeclared variable'); 140 | } 141 | register = variables[num]; 142 | } else if (opcode === 2) { 143 | variables[num] = register; 144 | opcode = 0; 145 | } else if (opcode === 3) { 146 | if (variables[num] === undefined) { 147 | throw new Error('use of undeclared variable'); 148 | } 149 | cnum = variables[num]; 150 | } 151 | }, 152 | 153 | // conditional instructions 154 | l: () => { 155 | preConditional(); 156 | if (register < cnum) { 157 | return conditional(); 158 | } 159 | }, 160 | e: () => { 161 | preConditional(); 162 | if (register === cnum) { 163 | return conditional(); 164 | } 165 | }, 166 | g: () => { 167 | preConditional(); 168 | if (register > cnum) { 169 | return conditional(); 170 | } 171 | }, 172 | 173 | // special instructions 174 | n: () => { 175 | if (variables[num] === undefined) { 176 | throw new Error('use of undeclared variable'); 177 | } 178 | variables[num] = -(variables[num]); 179 | }, 180 | r: () => { 181 | if (input === undefined) { 182 | throw new Error('no input provided'); 183 | } 184 | 185 | const val = input.charCodeAt(-1 + num); 186 | if (Number.isNaN(val)) { 187 | if (num === 0) { 188 | throw new Error('cannot read the 0th character'); 189 | } 190 | throw new Error('input string not long enough'); 191 | } 192 | register = val; 193 | input = input.replace(input.slice(num - 1, num), ''); 194 | }, 195 | x: () => { 196 | if (num > 3) { 197 | throw new Error('invalid opcode'); 198 | } 199 | 200 | opcode = num; 201 | } 202 | }; 203 | 204 | function chkRegister () { 205 | if (!u && (register < -127 || register > 127)) { 206 | throw new Error('register value out of bounds'); 207 | } 208 | } 209 | 210 | function preConditional () { 211 | if (opcode !== 3) { 212 | throw new Error('conditionals must run in opcode 3'); 213 | } 214 | if (cnum === undefined) { 215 | throw new Error('number to check against must be defined'); 216 | } 217 | opcode = 0; 218 | } 219 | 220 | // execute a correctly formatted conditional instruction 221 | function conditional () { 222 | instructions.f(); 223 | cnum = undefined; // reset cnum 224 | return true; // abort current function 225 | } 226 | 227 | function step () { 228 | const instruction = contents[line - 1].slice(col - 1, col + 1); 229 | 230 | if (instruction === '') { 231 | func = false; 232 | line++; 233 | col = 1; 234 | if (opcode === 1) { 235 | opcode = 0; 236 | } 237 | return; 238 | } 239 | 240 | const [number, letter] = instruction; 241 | 242 | if (letter === undefined) { 243 | throw new Error('number literal missing an instruction'); 244 | } 245 | 246 | if (isNaN(number)) { 247 | if (!(number in instructions)) { 248 | throw new Error('invalid instruction'); 249 | } 250 | throw new Error('missing number literal'); 251 | } 252 | 253 | if (isFinite(letter)) { 254 | throw new Error('attempt to chain number literals'); 255 | } 256 | 257 | if (!(letter in instructions)) { 258 | throw new Error('invalid instruction'); 259 | } 260 | 261 | // both characters of the instruction are permissible, so we can continue 262 | 263 | num = Number(number); 264 | col++; 265 | 266 | // we handle this as soon as possible to avoid issues 267 | if (instruction === '0x') { 268 | func = false; 269 | opcode = 0; 270 | col++; 271 | return; 272 | } 273 | 274 | if (opcode === 1 && func === false && letter !== 'f') { 275 | throw new Error('improper use of opcode 1'); 276 | } 277 | 278 | if (opcode === 2 && letter !== 'v') { 279 | throw new Error('improper use of opcode 2'); 280 | } 281 | 282 | if (opcode === 3) { 283 | // last instruction was 3x 284 | if (cnum === undefined && letter !== 'v') { 285 | throw new Error('improper use of opcode 3'); 286 | } 287 | // last two instructions were 3x and [0-9]v 288 | if (cnum !== undefined && !(letter === 'e' || letter === 'g' || letter === 'l')) { 289 | throw new Error('improper use of opcode 3'); 290 | } 291 | } 292 | 293 | if (func) { // are we in the middle of declaring a function? 294 | // add the parsed instruction to the function we're declaring 295 | functions[fnum] += instruction; 296 | col++; 297 | return; 298 | } 299 | 300 | // everything's correct, run the instruction 301 | instructions[letter](); 302 | 303 | col++; 304 | } 305 | 306 | export default async function parse (c, file, inp, unlimited) { 307 | contents = c; 308 | filename = file; 309 | input = inp; 310 | u = unlimited; 311 | 312 | // create bottom frame with undefined position 313 | // if something goes wrong, it will be updated 314 | callStack.unshift([filename, undefined, undefined]); 315 | 316 | while (line <= contents.length) { 317 | try { 318 | step(); 319 | } catch (err) { 320 | if (err instanceof RangeError) { 321 | err.message = 'too much recursion'; 322 | } 323 | err.message += `\n${trace()}`; 324 | return `${chalk.red('error:')} ${err.message}`; 325 | } 326 | } 327 | 328 | if (output === '') { 329 | return chalkTemplate`{gray (no output)}`; 330 | } else { 331 | return `output: ${output}`; 332 | } 333 | } 334 | 335 | // utils 336 | export const reset = () => { 337 | filename = cnum = input = u = undefined; 338 | opcode = register = num = fnum = 0; 339 | line = col = 1; 340 | output = ''; 341 | func = false; 342 | functions = Array(10).fill(''); 343 | variables = []; 344 | }; 345 | 346 | export const warn = str => console.log(chalk.yellow(str)); 347 | 348 | const trace = () => { 349 | // update the position stored in the top frame 350 | callStack[0][1] = line; 351 | callStack[0][2] = col; 352 | 353 | // prettify 354 | callStack = callStack.map((frame, index) => { 355 | if (index === callStack.length - 1) { 356 | return ` at ${frame.join(':')}`; 357 | } else { 358 | let [namespace, line, col] = frame; 359 | return ` at ${namespace} (${filename}:${line}:${col})`; 360 | } 361 | }); 362 | 363 | // truncate if needed 364 | if (callStack.length > 6) { 365 | callStack.splice(5, callStack.length - 6, ' ...'); 366 | } 367 | 368 | callStack = callStack.map(line => chalk.cyan(line)); 369 | 370 | return callStack.join('\n'); 371 | } 372 | -------------------------------------------------------------------------------- /naz.js: -------------------------------------------------------------------------------- 1 | /* 2 | naz.js 3 | interface to naz interpreter 4 | copyright (c) 2021 sporeball 5 | MIT license 6 | */ 7 | 8 | import parse from './index.js'; 9 | 10 | import chalkTemplate from 'chalk-template'; 11 | import chalk from 'chalk'; 12 | import eol from 'eol'; 13 | import fs from 'fs'; 14 | import yeow from 'yeow'; 15 | 16 | const args = yeow({ 17 | program: { 18 | type: 'file', 19 | extensions: '.naz', 20 | required: true, 21 | missing: 'a file must be passed', 22 | invalid: 'not a .naz file' 23 | }, 24 | file: { 25 | type: 'file', 26 | aliases: '-f / --file' 27 | }, 28 | input: { 29 | type: 'string', 30 | aliases: '-i / --input' 31 | }, 32 | unlimited: { aliases: '-u / --unlimited' }, 33 | null: { aliases: '-n / --null' } 34 | }); 35 | 36 | function naz () { 37 | let contents; 38 | let { program, input, unlimited } = args; 39 | const filename = program.slice(program.lastIndexOf('/') + 1); 40 | 41 | if (args.file) { 42 | try { 43 | input = fs.readFileSync(args.file, { encoding: 'utf-8' }, function () {}); 44 | } catch (e) { 45 | runnerErr('input file not found'); 46 | } 47 | } 48 | 49 | if (args.null) input += '\u0000'; 50 | 51 | // get file contents 52 | // also normalizes line endings to CRLF 53 | try { 54 | contents = eol.crlf(fs.readFileSync(program, { encoding: 'utf-8' }, function () {})); 55 | } catch (e) { 56 | runnerErr('file not found'); 57 | } 58 | 59 | contents = contents.split('\r\n') 60 | .map(line => line.replace(/#.*/gm, '').trim()); 61 | 62 | const tStart = performance.now(); 63 | 64 | parse(contents, filename, input, unlimited, false) 65 | .then(result => { 66 | const tEnd = performance.now(); 67 | const time = (tEnd - tStart).toFixed(0); 68 | 69 | console.log(chalkTemplate`{green finished} {cyan in ${time}ms}`); 70 | console.log(result); 71 | }); 72 | } 73 | 74 | const runnerErr = str => { 75 | console.log(chalkTemplate`{red error:} ${str}`); 76 | process.exit(1); 77 | }; 78 | 79 | naz(); 80 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "naz", 3 | "version": "1.2.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "naz", 9 | "version": "1.2.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "chalk": "^5.0.0", 13 | "chalk-template": "^0.4.0", 14 | "eol": "^0.9.1", 15 | "yeow": "^0.2.0" 16 | }, 17 | "devDependencies": { 18 | "mocha": "^9.2.0" 19 | } 20 | }, 21 | "node_modules/@ungap/promise-all-settled": { 22 | "version": "1.1.2", 23 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 24 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 25 | "dev": true 26 | }, 27 | "node_modules/ansi-colors": { 28 | "version": "4.1.1", 29 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 30 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 31 | "dev": true, 32 | "engines": { 33 | "node": ">=6" 34 | } 35 | }, 36 | "node_modules/ansi-regex": { 37 | "version": "5.0.1", 38 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 39 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 40 | "dev": true, 41 | "engines": { 42 | "node": ">=8" 43 | } 44 | }, 45 | "node_modules/ansi-styles": { 46 | "version": "4.3.0", 47 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 48 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 49 | "dependencies": { 50 | "color-convert": "^2.0.1" 51 | }, 52 | "engines": { 53 | "node": ">=8" 54 | }, 55 | "funding": { 56 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 57 | } 58 | }, 59 | "node_modules/anymatch": { 60 | "version": "3.1.2", 61 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 62 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 63 | "dev": true, 64 | "dependencies": { 65 | "normalize-path": "^3.0.0", 66 | "picomatch": "^2.0.4" 67 | }, 68 | "engines": { 69 | "node": ">= 8" 70 | } 71 | }, 72 | "node_modules/argparse": { 73 | "version": "2.0.1", 74 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 75 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 76 | "dev": true 77 | }, 78 | "node_modules/balanced-match": { 79 | "version": "1.0.2", 80 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 81 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 82 | "dev": true 83 | }, 84 | "node_modules/binary-extensions": { 85 | "version": "2.2.0", 86 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 87 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 88 | "dev": true, 89 | "engines": { 90 | "node": ">=8" 91 | } 92 | }, 93 | "node_modules/brace-expansion": { 94 | "version": "1.1.11", 95 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 96 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 97 | "dev": true, 98 | "dependencies": { 99 | "balanced-match": "^1.0.0", 100 | "concat-map": "0.0.1" 101 | } 102 | }, 103 | "node_modules/braces": { 104 | "version": "3.0.2", 105 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 106 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 107 | "dev": true, 108 | "dependencies": { 109 | "fill-range": "^7.0.1" 110 | }, 111 | "engines": { 112 | "node": ">=8" 113 | } 114 | }, 115 | "node_modules/browser-stdout": { 116 | "version": "1.3.1", 117 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 118 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 119 | "dev": true 120 | }, 121 | "node_modules/camelcase": { 122 | "version": "6.2.0", 123 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 124 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 125 | "dev": true, 126 | "engines": { 127 | "node": ">=10" 128 | }, 129 | "funding": { 130 | "url": "https://github.com/sponsors/sindresorhus" 131 | } 132 | }, 133 | "node_modules/chalk": { 134 | "version": "5.0.0", 135 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", 136 | "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==", 137 | "engines": { 138 | "node": "^12.17.0 || ^14.13 || >=16.0.0" 139 | }, 140 | "funding": { 141 | "url": "https://github.com/chalk/chalk?sponsor=1" 142 | } 143 | }, 144 | "node_modules/chalk-template": { 145 | "version": "0.4.0", 146 | "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", 147 | "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", 148 | "dependencies": { 149 | "chalk": "^4.1.2" 150 | }, 151 | "engines": { 152 | "node": ">=12" 153 | }, 154 | "funding": { 155 | "url": "https://github.com/chalk/chalk-template?sponsor=1" 156 | } 157 | }, 158 | "node_modules/chalk-template/node_modules/chalk": { 159 | "version": "4.1.2", 160 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 161 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 162 | "dependencies": { 163 | "ansi-styles": "^4.1.0", 164 | "supports-color": "^7.1.0" 165 | }, 166 | "engines": { 167 | "node": ">=10" 168 | }, 169 | "funding": { 170 | "url": "https://github.com/chalk/chalk?sponsor=1" 171 | } 172 | }, 173 | "node_modules/chokidar": { 174 | "version": "3.5.3", 175 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 176 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 177 | "dev": true, 178 | "funding": [ 179 | { 180 | "type": "individual", 181 | "url": "https://paulmillr.com/funding/" 182 | } 183 | ], 184 | "dependencies": { 185 | "anymatch": "~3.1.2", 186 | "braces": "~3.0.2", 187 | "glob-parent": "~5.1.2", 188 | "is-binary-path": "~2.1.0", 189 | "is-glob": "~4.0.1", 190 | "normalize-path": "~3.0.0", 191 | "readdirp": "~3.6.0" 192 | }, 193 | "engines": { 194 | "node": ">= 8.10.0" 195 | }, 196 | "optionalDependencies": { 197 | "fsevents": "~2.3.2" 198 | } 199 | }, 200 | "node_modules/cliui": { 201 | "version": "7.0.4", 202 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 203 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 204 | "dev": true, 205 | "dependencies": { 206 | "string-width": "^4.2.0", 207 | "strip-ansi": "^6.0.0", 208 | "wrap-ansi": "^7.0.0" 209 | } 210 | }, 211 | "node_modules/cliui/node_modules/is-fullwidth-code-point": { 212 | "version": "3.0.0", 213 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 214 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 215 | "dev": true, 216 | "engines": { 217 | "node": ">=8" 218 | } 219 | }, 220 | "node_modules/cliui/node_modules/string-width": { 221 | "version": "4.2.2", 222 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 223 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 224 | "dev": true, 225 | "dependencies": { 226 | "emoji-regex": "^8.0.0", 227 | "is-fullwidth-code-point": "^3.0.0", 228 | "strip-ansi": "^6.0.0" 229 | }, 230 | "engines": { 231 | "node": ">=8" 232 | } 233 | }, 234 | "node_modules/cliui/node_modules/strip-ansi": { 235 | "version": "6.0.0", 236 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 237 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 238 | "dev": true, 239 | "dependencies": { 240 | "ansi-regex": "^5.0.0" 241 | }, 242 | "engines": { 243 | "node": ">=8" 244 | } 245 | }, 246 | "node_modules/color-convert": { 247 | "version": "2.0.1", 248 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 249 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 250 | "dependencies": { 251 | "color-name": "~1.1.4" 252 | }, 253 | "engines": { 254 | "node": ">=7.0.0" 255 | } 256 | }, 257 | "node_modules/color-name": { 258 | "version": "1.1.4", 259 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 260 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 261 | }, 262 | "node_modules/concat-map": { 263 | "version": "0.0.1", 264 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 265 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 266 | "dev": true 267 | }, 268 | "node_modules/debug": { 269 | "version": "4.3.3", 270 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 271 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 272 | "dev": true, 273 | "dependencies": { 274 | "ms": "2.1.2" 275 | }, 276 | "engines": { 277 | "node": ">=6.0" 278 | }, 279 | "peerDependenciesMeta": { 280 | "supports-color": { 281 | "optional": true 282 | } 283 | } 284 | }, 285 | "node_modules/debug/node_modules/ms": { 286 | "version": "2.1.2", 287 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 288 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 289 | "dev": true 290 | }, 291 | "node_modules/decamelize": { 292 | "version": "4.0.0", 293 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 294 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 295 | "dev": true, 296 | "engines": { 297 | "node": ">=10" 298 | }, 299 | "funding": { 300 | "url": "https://github.com/sponsors/sindresorhus" 301 | } 302 | }, 303 | "node_modules/diff": { 304 | "version": "5.0.0", 305 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 306 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 307 | "dev": true, 308 | "engines": { 309 | "node": ">=0.3.1" 310 | } 311 | }, 312 | "node_modules/emoji-regex": { 313 | "version": "8.0.0", 314 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 315 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 316 | "dev": true 317 | }, 318 | "node_modules/eol": { 319 | "version": "0.9.1", 320 | "resolved": "https://registry.npmjs.org/eol/-/eol-0.9.1.tgz", 321 | "integrity": "sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==" 322 | }, 323 | "node_modules/escalade": { 324 | "version": "3.1.1", 325 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 326 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 327 | "dev": true, 328 | "engines": { 329 | "node": ">=6" 330 | } 331 | }, 332 | "node_modules/escape-string-regexp": { 333 | "version": "4.0.0", 334 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 335 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 336 | "dev": true, 337 | "engines": { 338 | "node": ">=10" 339 | }, 340 | "funding": { 341 | "url": "https://github.com/sponsors/sindresorhus" 342 | } 343 | }, 344 | "node_modules/fill-range": { 345 | "version": "7.0.1", 346 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 347 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 348 | "dev": true, 349 | "dependencies": { 350 | "to-regex-range": "^5.0.1" 351 | }, 352 | "engines": { 353 | "node": ">=8" 354 | } 355 | }, 356 | "node_modules/find-up": { 357 | "version": "5.0.0", 358 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 359 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 360 | "dev": true, 361 | "dependencies": { 362 | "locate-path": "^6.0.0", 363 | "path-exists": "^4.0.0" 364 | }, 365 | "engines": { 366 | "node": ">=10" 367 | }, 368 | "funding": { 369 | "url": "https://github.com/sponsors/sindresorhus" 370 | } 371 | }, 372 | "node_modules/flat": { 373 | "version": "5.0.2", 374 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 375 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 376 | "dev": true, 377 | "bin": { 378 | "flat": "cli.js" 379 | } 380 | }, 381 | "node_modules/fs.realpath": { 382 | "version": "1.0.0", 383 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 384 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 385 | "dev": true 386 | }, 387 | "node_modules/fsevents": { 388 | "version": "2.3.2", 389 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 390 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 391 | "dev": true, 392 | "hasInstallScript": true, 393 | "optional": true, 394 | "os": [ 395 | "darwin" 396 | ], 397 | "engines": { 398 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 399 | } 400 | }, 401 | "node_modules/get-caller-file": { 402 | "version": "2.0.5", 403 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 404 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 405 | "dev": true, 406 | "engines": { 407 | "node": "6.* || 8.* || >= 10.*" 408 | } 409 | }, 410 | "node_modules/glob": { 411 | "version": "7.2.0", 412 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 413 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 414 | "dev": true, 415 | "dependencies": { 416 | "fs.realpath": "^1.0.0", 417 | "inflight": "^1.0.4", 418 | "inherits": "2", 419 | "minimatch": "^3.0.4", 420 | "once": "^1.3.0", 421 | "path-is-absolute": "^1.0.0" 422 | }, 423 | "engines": { 424 | "node": "*" 425 | }, 426 | "funding": { 427 | "url": "https://github.com/sponsors/isaacs" 428 | } 429 | }, 430 | "node_modules/glob-parent": { 431 | "version": "5.1.2", 432 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 433 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 434 | "dev": true, 435 | "dependencies": { 436 | "is-glob": "^4.0.1" 437 | }, 438 | "engines": { 439 | "node": ">= 6" 440 | } 441 | }, 442 | "node_modules/growl": { 443 | "version": "1.10.5", 444 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 445 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 446 | "dev": true, 447 | "engines": { 448 | "node": ">=4.x" 449 | } 450 | }, 451 | "node_modules/has-flag": { 452 | "version": "4.0.0", 453 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 454 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 455 | "engines": { 456 | "node": ">=8" 457 | } 458 | }, 459 | "node_modules/he": { 460 | "version": "1.2.0", 461 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 462 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 463 | "dev": true, 464 | "bin": { 465 | "he": "bin/he" 466 | } 467 | }, 468 | "node_modules/inflight": { 469 | "version": "1.0.6", 470 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 471 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 472 | "dev": true, 473 | "dependencies": { 474 | "once": "^1.3.0", 475 | "wrappy": "1" 476 | } 477 | }, 478 | "node_modules/inherits": { 479 | "version": "2.0.4", 480 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 481 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 482 | "dev": true 483 | }, 484 | "node_modules/is-binary-path": { 485 | "version": "2.1.0", 486 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 487 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 488 | "dev": true, 489 | "dependencies": { 490 | "binary-extensions": "^2.0.0" 491 | }, 492 | "engines": { 493 | "node": ">=8" 494 | } 495 | }, 496 | "node_modules/is-extglob": { 497 | "version": "2.1.1", 498 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 499 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 500 | "dev": true, 501 | "engines": { 502 | "node": ">=0.10.0" 503 | } 504 | }, 505 | "node_modules/is-glob": { 506 | "version": "4.0.3", 507 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 508 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 509 | "dev": true, 510 | "dependencies": { 511 | "is-extglob": "^2.1.1" 512 | }, 513 | "engines": { 514 | "node": ">=0.10.0" 515 | } 516 | }, 517 | "node_modules/is-number": { 518 | "version": "7.0.0", 519 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 520 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 521 | "dev": true, 522 | "engines": { 523 | "node": ">=0.12.0" 524 | } 525 | }, 526 | "node_modules/is-plain-obj": { 527 | "version": "2.1.0", 528 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 529 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 530 | "dev": true, 531 | "engines": { 532 | "node": ">=8" 533 | } 534 | }, 535 | "node_modules/is-unicode-supported": { 536 | "version": "0.1.0", 537 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 538 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 539 | "dev": true, 540 | "engines": { 541 | "node": ">=10" 542 | }, 543 | "funding": { 544 | "url": "https://github.com/sponsors/sindresorhus" 545 | } 546 | }, 547 | "node_modules/isexe": { 548 | "version": "2.0.0", 549 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 550 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 551 | "dev": true 552 | }, 553 | "node_modules/js-yaml": { 554 | "version": "4.1.0", 555 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 556 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 557 | "dev": true, 558 | "dependencies": { 559 | "argparse": "^2.0.1" 560 | }, 561 | "bin": { 562 | "js-yaml": "bin/js-yaml.js" 563 | } 564 | }, 565 | "node_modules/locate-path": { 566 | "version": "6.0.0", 567 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 568 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 569 | "dev": true, 570 | "dependencies": { 571 | "p-locate": "^5.0.0" 572 | }, 573 | "engines": { 574 | "node": ">=10" 575 | }, 576 | "funding": { 577 | "url": "https://github.com/sponsors/sindresorhus" 578 | } 579 | }, 580 | "node_modules/log-symbols": { 581 | "version": "4.1.0", 582 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 583 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 584 | "dev": true, 585 | "dependencies": { 586 | "chalk": "^4.1.0", 587 | "is-unicode-supported": "^0.1.0" 588 | }, 589 | "engines": { 590 | "node": ">=10" 591 | }, 592 | "funding": { 593 | "url": "https://github.com/sponsors/sindresorhus" 594 | } 595 | }, 596 | "node_modules/log-symbols/node_modules/chalk": { 597 | "version": "4.1.2", 598 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 599 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 600 | "dev": true, 601 | "dependencies": { 602 | "ansi-styles": "^4.1.0", 603 | "supports-color": "^7.1.0" 604 | }, 605 | "engines": { 606 | "node": ">=10" 607 | }, 608 | "funding": { 609 | "url": "https://github.com/chalk/chalk?sponsor=1" 610 | } 611 | }, 612 | "node_modules/minimatch": { 613 | "version": "3.0.4", 614 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 615 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 616 | "dev": true, 617 | "dependencies": { 618 | "brace-expansion": "^1.1.7" 619 | }, 620 | "engines": { 621 | "node": "*" 622 | } 623 | }, 624 | "node_modules/mocha": { 625 | "version": "9.2.0", 626 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", 627 | "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", 628 | "dev": true, 629 | "dependencies": { 630 | "@ungap/promise-all-settled": "1.1.2", 631 | "ansi-colors": "4.1.1", 632 | "browser-stdout": "1.3.1", 633 | "chokidar": "3.5.3", 634 | "debug": "4.3.3", 635 | "diff": "5.0.0", 636 | "escape-string-regexp": "4.0.0", 637 | "find-up": "5.0.0", 638 | "glob": "7.2.0", 639 | "growl": "1.10.5", 640 | "he": "1.2.0", 641 | "js-yaml": "4.1.0", 642 | "log-symbols": "4.1.0", 643 | "minimatch": "3.0.4", 644 | "ms": "2.1.3", 645 | "nanoid": "3.2.0", 646 | "serialize-javascript": "6.0.0", 647 | "strip-json-comments": "3.1.1", 648 | "supports-color": "8.1.1", 649 | "which": "2.0.2", 650 | "workerpool": "6.2.0", 651 | "yargs": "16.2.0", 652 | "yargs-parser": "20.2.4", 653 | "yargs-unparser": "2.0.0" 654 | }, 655 | "bin": { 656 | "_mocha": "bin/_mocha", 657 | "mocha": "bin/mocha" 658 | }, 659 | "engines": { 660 | "node": ">= 12.0.0" 661 | }, 662 | "funding": { 663 | "type": "opencollective", 664 | "url": "https://opencollective.com/mochajs" 665 | } 666 | }, 667 | "node_modules/mocha/node_modules/supports-color": { 668 | "version": "8.1.1", 669 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 670 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 671 | "dev": true, 672 | "dependencies": { 673 | "has-flag": "^4.0.0" 674 | }, 675 | "engines": { 676 | "node": ">=10" 677 | }, 678 | "funding": { 679 | "url": "https://github.com/chalk/supports-color?sponsor=1" 680 | } 681 | }, 682 | "node_modules/ms": { 683 | "version": "2.1.3", 684 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 685 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 686 | "dev": true 687 | }, 688 | "node_modules/nanoid": { 689 | "version": "3.2.0", 690 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", 691 | "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", 692 | "dev": true, 693 | "bin": { 694 | "nanoid": "bin/nanoid.cjs" 695 | }, 696 | "engines": { 697 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 698 | } 699 | }, 700 | "node_modules/normalize-path": { 701 | "version": "3.0.0", 702 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 703 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 704 | "dev": true, 705 | "engines": { 706 | "node": ">=0.10.0" 707 | } 708 | }, 709 | "node_modules/once": { 710 | "version": "1.4.0", 711 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 712 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 713 | "dev": true, 714 | "dependencies": { 715 | "wrappy": "1" 716 | } 717 | }, 718 | "node_modules/p-limit": { 719 | "version": "3.1.0", 720 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 721 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 722 | "dev": true, 723 | "dependencies": { 724 | "yocto-queue": "^0.1.0" 725 | }, 726 | "engines": { 727 | "node": ">=10" 728 | }, 729 | "funding": { 730 | "url": "https://github.com/sponsors/sindresorhus" 731 | } 732 | }, 733 | "node_modules/p-locate": { 734 | "version": "5.0.0", 735 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 736 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 737 | "dev": true, 738 | "dependencies": { 739 | "p-limit": "^3.0.2" 740 | }, 741 | "engines": { 742 | "node": ">=10" 743 | }, 744 | "funding": { 745 | "url": "https://github.com/sponsors/sindresorhus" 746 | } 747 | }, 748 | "node_modules/path-exists": { 749 | "version": "4.0.0", 750 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 751 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 752 | "dev": true, 753 | "engines": { 754 | "node": ">=8" 755 | } 756 | }, 757 | "node_modules/path-is-absolute": { 758 | "version": "1.0.1", 759 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 760 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 761 | "dev": true, 762 | "engines": { 763 | "node": ">=0.10.0" 764 | } 765 | }, 766 | "node_modules/picomatch": { 767 | "version": "2.3.1", 768 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 769 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 770 | "dev": true, 771 | "engines": { 772 | "node": ">=8.6" 773 | }, 774 | "funding": { 775 | "url": "https://github.com/sponsors/jonschlinkert" 776 | } 777 | }, 778 | "node_modules/randombytes": { 779 | "version": "2.1.0", 780 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 781 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 782 | "dev": true, 783 | "dependencies": { 784 | "safe-buffer": "^5.1.0" 785 | } 786 | }, 787 | "node_modules/readdirp": { 788 | "version": "3.6.0", 789 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 790 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 791 | "dev": true, 792 | "dependencies": { 793 | "picomatch": "^2.2.1" 794 | }, 795 | "engines": { 796 | "node": ">=8.10.0" 797 | } 798 | }, 799 | "node_modules/require-directory": { 800 | "version": "2.1.1", 801 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 802 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 803 | "dev": true, 804 | "engines": { 805 | "node": ">=0.10.0" 806 | } 807 | }, 808 | "node_modules/safe-buffer": { 809 | "version": "5.2.1", 810 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 811 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 812 | "dev": true, 813 | "funding": [ 814 | { 815 | "type": "github", 816 | "url": "https://github.com/sponsors/feross" 817 | }, 818 | { 819 | "type": "patreon", 820 | "url": "https://www.patreon.com/feross" 821 | }, 822 | { 823 | "type": "consulting", 824 | "url": "https://feross.org/support" 825 | } 826 | ] 827 | }, 828 | "node_modules/serialize-javascript": { 829 | "version": "6.0.0", 830 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 831 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 832 | "dev": true, 833 | "dependencies": { 834 | "randombytes": "^2.1.0" 835 | } 836 | }, 837 | "node_modules/strip-json-comments": { 838 | "version": "3.1.1", 839 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 840 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 841 | "dev": true, 842 | "engines": { 843 | "node": ">=8" 844 | }, 845 | "funding": { 846 | "url": "https://github.com/sponsors/sindresorhus" 847 | } 848 | }, 849 | "node_modules/supports-color": { 850 | "version": "7.2.0", 851 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 852 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 853 | "dependencies": { 854 | "has-flag": "^4.0.0" 855 | }, 856 | "engines": { 857 | "node": ">=8" 858 | } 859 | }, 860 | "node_modules/to-regex-range": { 861 | "version": "5.0.1", 862 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 863 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 864 | "dev": true, 865 | "dependencies": { 866 | "is-number": "^7.0.0" 867 | }, 868 | "engines": { 869 | "node": ">=8.0" 870 | } 871 | }, 872 | "node_modules/which": { 873 | "version": "2.0.2", 874 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 875 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 876 | "dev": true, 877 | "dependencies": { 878 | "isexe": "^2.0.0" 879 | }, 880 | "bin": { 881 | "node-which": "bin/node-which" 882 | }, 883 | "engines": { 884 | "node": ">= 8" 885 | } 886 | }, 887 | "node_modules/workerpool": { 888 | "version": "6.2.0", 889 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", 890 | "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", 891 | "dev": true 892 | }, 893 | "node_modules/wrap-ansi": { 894 | "version": "7.0.0", 895 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 896 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 897 | "dev": true, 898 | "dependencies": { 899 | "ansi-styles": "^4.0.0", 900 | "string-width": "^4.1.0", 901 | "strip-ansi": "^6.0.0" 902 | }, 903 | "engines": { 904 | "node": ">=10" 905 | }, 906 | "funding": { 907 | "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 908 | } 909 | }, 910 | "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { 911 | "version": "3.0.0", 912 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 913 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 914 | "dev": true, 915 | "engines": { 916 | "node": ">=8" 917 | } 918 | }, 919 | "node_modules/wrap-ansi/node_modules/string-width": { 920 | "version": "4.2.2", 921 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 922 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 923 | "dev": true, 924 | "dependencies": { 925 | "emoji-regex": "^8.0.0", 926 | "is-fullwidth-code-point": "^3.0.0", 927 | "strip-ansi": "^6.0.0" 928 | }, 929 | "engines": { 930 | "node": ">=8" 931 | } 932 | }, 933 | "node_modules/wrap-ansi/node_modules/strip-ansi": { 934 | "version": "6.0.0", 935 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 936 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 937 | "dev": true, 938 | "dependencies": { 939 | "ansi-regex": "^5.0.0" 940 | }, 941 | "engines": { 942 | "node": ">=8" 943 | } 944 | }, 945 | "node_modules/wrappy": { 946 | "version": "1.0.2", 947 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 948 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 949 | "dev": true 950 | }, 951 | "node_modules/y18n": { 952 | "version": "5.0.5", 953 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", 954 | "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", 955 | "dev": true, 956 | "engines": { 957 | "node": ">=10" 958 | } 959 | }, 960 | "node_modules/yargs": { 961 | "version": "16.2.0", 962 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 963 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 964 | "dev": true, 965 | "dependencies": { 966 | "cliui": "^7.0.2", 967 | "escalade": "^3.1.1", 968 | "get-caller-file": "^2.0.5", 969 | "require-directory": "^2.1.1", 970 | "string-width": "^4.2.0", 971 | "y18n": "^5.0.5", 972 | "yargs-parser": "^20.2.2" 973 | }, 974 | "engines": { 975 | "node": ">=10" 976 | } 977 | }, 978 | "node_modules/yargs-parser": { 979 | "version": "20.2.4", 980 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 981 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 982 | "dev": true, 983 | "engines": { 984 | "node": ">=10" 985 | } 986 | }, 987 | "node_modules/yargs-unparser": { 988 | "version": "2.0.0", 989 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 990 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 991 | "dev": true, 992 | "dependencies": { 993 | "camelcase": "^6.0.0", 994 | "decamelize": "^4.0.0", 995 | "flat": "^5.0.2", 996 | "is-plain-obj": "^2.1.0" 997 | }, 998 | "engines": { 999 | "node": ">=10" 1000 | } 1001 | }, 1002 | "node_modules/yargs/node_modules/is-fullwidth-code-point": { 1003 | "version": "3.0.0", 1004 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1005 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1006 | "dev": true, 1007 | "engines": { 1008 | "node": ">=8" 1009 | } 1010 | }, 1011 | "node_modules/yargs/node_modules/string-width": { 1012 | "version": "4.2.2", 1013 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1014 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1015 | "dev": true, 1016 | "dependencies": { 1017 | "emoji-regex": "^8.0.0", 1018 | "is-fullwidth-code-point": "^3.0.0", 1019 | "strip-ansi": "^6.0.0" 1020 | }, 1021 | "engines": { 1022 | "node": ">=8" 1023 | } 1024 | }, 1025 | "node_modules/yargs/node_modules/strip-ansi": { 1026 | "version": "6.0.0", 1027 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1028 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1029 | "dev": true, 1030 | "dependencies": { 1031 | "ansi-regex": "^5.0.0" 1032 | }, 1033 | "engines": { 1034 | "node": ">=8" 1035 | } 1036 | }, 1037 | "node_modules/yeow": { 1038 | "version": "0.2.0", 1039 | "resolved": "https://registry.npmjs.org/yeow/-/yeow-0.2.0.tgz", 1040 | "integrity": "sha512-5x8uI1N9GpA4orY6VW31ucfxwnJuTat0GezkqXUNV71M1lnyOznDfxLy6cUd+zM3L59lra3mRKaI5fCLhqvvxA==" 1041 | }, 1042 | "node_modules/yocto-queue": { 1043 | "version": "0.1.0", 1044 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1045 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1046 | "dev": true, 1047 | "engines": { 1048 | "node": ">=10" 1049 | }, 1050 | "funding": { 1051 | "url": "https://github.com/sponsors/sindresorhus" 1052 | } 1053 | } 1054 | }, 1055 | "dependencies": { 1056 | "@ungap/promise-all-settled": { 1057 | "version": "1.1.2", 1058 | "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", 1059 | "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", 1060 | "dev": true 1061 | }, 1062 | "ansi-colors": { 1063 | "version": "4.1.1", 1064 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", 1065 | "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", 1066 | "dev": true 1067 | }, 1068 | "ansi-regex": { 1069 | "version": "5.0.1", 1070 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 1071 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 1072 | "dev": true 1073 | }, 1074 | "ansi-styles": { 1075 | "version": "4.3.0", 1076 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 1077 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 1078 | "requires": { 1079 | "color-convert": "^2.0.1" 1080 | } 1081 | }, 1082 | "anymatch": { 1083 | "version": "3.1.2", 1084 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", 1085 | "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", 1086 | "dev": true, 1087 | "requires": { 1088 | "normalize-path": "^3.0.0", 1089 | "picomatch": "^2.0.4" 1090 | } 1091 | }, 1092 | "argparse": { 1093 | "version": "2.0.1", 1094 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 1095 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 1096 | "dev": true 1097 | }, 1098 | "balanced-match": { 1099 | "version": "1.0.2", 1100 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1101 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1102 | "dev": true 1103 | }, 1104 | "binary-extensions": { 1105 | "version": "2.2.0", 1106 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", 1107 | "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", 1108 | "dev": true 1109 | }, 1110 | "brace-expansion": { 1111 | "version": "1.1.11", 1112 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1113 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1114 | "dev": true, 1115 | "requires": { 1116 | "balanced-match": "^1.0.0", 1117 | "concat-map": "0.0.1" 1118 | } 1119 | }, 1120 | "braces": { 1121 | "version": "3.0.2", 1122 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 1123 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 1124 | "dev": true, 1125 | "requires": { 1126 | "fill-range": "^7.0.1" 1127 | } 1128 | }, 1129 | "browser-stdout": { 1130 | "version": "1.3.1", 1131 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 1132 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 1133 | "dev": true 1134 | }, 1135 | "camelcase": { 1136 | "version": "6.2.0", 1137 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", 1138 | "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", 1139 | "dev": true 1140 | }, 1141 | "chalk": { 1142 | "version": "5.0.0", 1143 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz", 1144 | "integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==" 1145 | }, 1146 | "chalk-template": { 1147 | "version": "0.4.0", 1148 | "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-0.4.0.tgz", 1149 | "integrity": "sha512-/ghrgmhfY8RaSdeo43hNXxpoHAtxdbskUHjPpfqUWGttFgycUhYPGx3YZBCnUCvOa7Doivn1IZec3DEGFoMgLg==", 1150 | "requires": { 1151 | "chalk": "^4.1.2" 1152 | }, 1153 | "dependencies": { 1154 | "chalk": { 1155 | "version": "4.1.2", 1156 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1157 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1158 | "requires": { 1159 | "ansi-styles": "^4.1.0", 1160 | "supports-color": "^7.1.0" 1161 | } 1162 | } 1163 | } 1164 | }, 1165 | "chokidar": { 1166 | "version": "3.5.3", 1167 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", 1168 | "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", 1169 | "dev": true, 1170 | "requires": { 1171 | "anymatch": "~3.1.2", 1172 | "braces": "~3.0.2", 1173 | "fsevents": "~2.3.2", 1174 | "glob-parent": "~5.1.2", 1175 | "is-binary-path": "~2.1.0", 1176 | "is-glob": "~4.0.1", 1177 | "normalize-path": "~3.0.0", 1178 | "readdirp": "~3.6.0" 1179 | } 1180 | }, 1181 | "cliui": { 1182 | "version": "7.0.4", 1183 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", 1184 | "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", 1185 | "dev": true, 1186 | "requires": { 1187 | "string-width": "^4.2.0", 1188 | "strip-ansi": "^6.0.0", 1189 | "wrap-ansi": "^7.0.0" 1190 | }, 1191 | "dependencies": { 1192 | "is-fullwidth-code-point": { 1193 | "version": "3.0.0", 1194 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1195 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1196 | "dev": true 1197 | }, 1198 | "string-width": { 1199 | "version": "4.2.2", 1200 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1201 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1202 | "dev": true, 1203 | "requires": { 1204 | "emoji-regex": "^8.0.0", 1205 | "is-fullwidth-code-point": "^3.0.0", 1206 | "strip-ansi": "^6.0.0" 1207 | } 1208 | }, 1209 | "strip-ansi": { 1210 | "version": "6.0.0", 1211 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1212 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1213 | "dev": true, 1214 | "requires": { 1215 | "ansi-regex": "^5.0.0" 1216 | } 1217 | } 1218 | } 1219 | }, 1220 | "color-convert": { 1221 | "version": "2.0.1", 1222 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 1223 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 1224 | "requires": { 1225 | "color-name": "~1.1.4" 1226 | } 1227 | }, 1228 | "color-name": { 1229 | "version": "1.1.4", 1230 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 1231 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 1232 | }, 1233 | "concat-map": { 1234 | "version": "0.0.1", 1235 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1236 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 1237 | "dev": true 1238 | }, 1239 | "debug": { 1240 | "version": "4.3.3", 1241 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", 1242 | "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", 1243 | "dev": true, 1244 | "requires": { 1245 | "ms": "2.1.2" 1246 | }, 1247 | "dependencies": { 1248 | "ms": { 1249 | "version": "2.1.2", 1250 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1251 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1252 | "dev": true 1253 | } 1254 | } 1255 | }, 1256 | "decamelize": { 1257 | "version": "4.0.0", 1258 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", 1259 | "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", 1260 | "dev": true 1261 | }, 1262 | "diff": { 1263 | "version": "5.0.0", 1264 | "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", 1265 | "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", 1266 | "dev": true 1267 | }, 1268 | "emoji-regex": { 1269 | "version": "8.0.0", 1270 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1271 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1272 | "dev": true 1273 | }, 1274 | "eol": { 1275 | "version": "0.9.1", 1276 | "resolved": "https://registry.npmjs.org/eol/-/eol-0.9.1.tgz", 1277 | "integrity": "sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg==" 1278 | }, 1279 | "escalade": { 1280 | "version": "3.1.1", 1281 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", 1282 | "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", 1283 | "dev": true 1284 | }, 1285 | "escape-string-regexp": { 1286 | "version": "4.0.0", 1287 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 1288 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 1289 | "dev": true 1290 | }, 1291 | "fill-range": { 1292 | "version": "7.0.1", 1293 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 1294 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 1295 | "dev": true, 1296 | "requires": { 1297 | "to-regex-range": "^5.0.1" 1298 | } 1299 | }, 1300 | "find-up": { 1301 | "version": "5.0.0", 1302 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 1303 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 1304 | "dev": true, 1305 | "requires": { 1306 | "locate-path": "^6.0.0", 1307 | "path-exists": "^4.0.0" 1308 | } 1309 | }, 1310 | "flat": { 1311 | "version": "5.0.2", 1312 | "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", 1313 | "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", 1314 | "dev": true 1315 | }, 1316 | "fs.realpath": { 1317 | "version": "1.0.0", 1318 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1319 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1320 | "dev": true 1321 | }, 1322 | "fsevents": { 1323 | "version": "2.3.2", 1324 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", 1325 | "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", 1326 | "dev": true, 1327 | "optional": true 1328 | }, 1329 | "get-caller-file": { 1330 | "version": "2.0.5", 1331 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 1332 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 1333 | "dev": true 1334 | }, 1335 | "glob": { 1336 | "version": "7.2.0", 1337 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", 1338 | "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", 1339 | "dev": true, 1340 | "requires": { 1341 | "fs.realpath": "^1.0.0", 1342 | "inflight": "^1.0.4", 1343 | "inherits": "2", 1344 | "minimatch": "^3.0.4", 1345 | "once": "^1.3.0", 1346 | "path-is-absolute": "^1.0.0" 1347 | } 1348 | }, 1349 | "glob-parent": { 1350 | "version": "5.1.2", 1351 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1352 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1353 | "dev": true, 1354 | "requires": { 1355 | "is-glob": "^4.0.1" 1356 | } 1357 | }, 1358 | "growl": { 1359 | "version": "1.10.5", 1360 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 1361 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 1362 | "dev": true 1363 | }, 1364 | "has-flag": { 1365 | "version": "4.0.0", 1366 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1367 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 1368 | }, 1369 | "he": { 1370 | "version": "1.2.0", 1371 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1372 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1373 | "dev": true 1374 | }, 1375 | "inflight": { 1376 | "version": "1.0.6", 1377 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1378 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1379 | "dev": true, 1380 | "requires": { 1381 | "once": "^1.3.0", 1382 | "wrappy": "1" 1383 | } 1384 | }, 1385 | "inherits": { 1386 | "version": "2.0.4", 1387 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1388 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1389 | "dev": true 1390 | }, 1391 | "is-binary-path": { 1392 | "version": "2.1.0", 1393 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 1394 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 1395 | "dev": true, 1396 | "requires": { 1397 | "binary-extensions": "^2.0.0" 1398 | } 1399 | }, 1400 | "is-extglob": { 1401 | "version": "2.1.1", 1402 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1403 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1404 | "dev": true 1405 | }, 1406 | "is-glob": { 1407 | "version": "4.0.3", 1408 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 1409 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 1410 | "dev": true, 1411 | "requires": { 1412 | "is-extglob": "^2.1.1" 1413 | } 1414 | }, 1415 | "is-number": { 1416 | "version": "7.0.0", 1417 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 1418 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 1419 | "dev": true 1420 | }, 1421 | "is-plain-obj": { 1422 | "version": "2.1.0", 1423 | "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", 1424 | "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", 1425 | "dev": true 1426 | }, 1427 | "is-unicode-supported": { 1428 | "version": "0.1.0", 1429 | "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", 1430 | "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", 1431 | "dev": true 1432 | }, 1433 | "isexe": { 1434 | "version": "2.0.0", 1435 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1436 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1437 | "dev": true 1438 | }, 1439 | "js-yaml": { 1440 | "version": "4.1.0", 1441 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 1442 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 1443 | "dev": true, 1444 | "requires": { 1445 | "argparse": "^2.0.1" 1446 | } 1447 | }, 1448 | "locate-path": { 1449 | "version": "6.0.0", 1450 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 1451 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 1452 | "dev": true, 1453 | "requires": { 1454 | "p-locate": "^5.0.0" 1455 | } 1456 | }, 1457 | "log-symbols": { 1458 | "version": "4.1.0", 1459 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", 1460 | "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", 1461 | "dev": true, 1462 | "requires": { 1463 | "chalk": "^4.1.0", 1464 | "is-unicode-supported": "^0.1.0" 1465 | }, 1466 | "dependencies": { 1467 | "chalk": { 1468 | "version": "4.1.2", 1469 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 1470 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 1471 | "dev": true, 1472 | "requires": { 1473 | "ansi-styles": "^4.1.0", 1474 | "supports-color": "^7.1.0" 1475 | } 1476 | } 1477 | } 1478 | }, 1479 | "minimatch": { 1480 | "version": "3.0.4", 1481 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1482 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1483 | "dev": true, 1484 | "requires": { 1485 | "brace-expansion": "^1.1.7" 1486 | } 1487 | }, 1488 | "mocha": { 1489 | "version": "9.2.0", 1490 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz", 1491 | "integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==", 1492 | "dev": true, 1493 | "requires": { 1494 | "@ungap/promise-all-settled": "1.1.2", 1495 | "ansi-colors": "4.1.1", 1496 | "browser-stdout": "1.3.1", 1497 | "chokidar": "3.5.3", 1498 | "debug": "4.3.3", 1499 | "diff": "5.0.0", 1500 | "escape-string-regexp": "4.0.0", 1501 | "find-up": "5.0.0", 1502 | "glob": "7.2.0", 1503 | "growl": "1.10.5", 1504 | "he": "1.2.0", 1505 | "js-yaml": "4.1.0", 1506 | "log-symbols": "4.1.0", 1507 | "minimatch": "3.0.4", 1508 | "ms": "2.1.3", 1509 | "nanoid": "3.2.0", 1510 | "serialize-javascript": "6.0.0", 1511 | "strip-json-comments": "3.1.1", 1512 | "supports-color": "8.1.1", 1513 | "which": "2.0.2", 1514 | "workerpool": "6.2.0", 1515 | "yargs": "16.2.0", 1516 | "yargs-parser": "20.2.4", 1517 | "yargs-unparser": "2.0.0" 1518 | }, 1519 | "dependencies": { 1520 | "supports-color": { 1521 | "version": "8.1.1", 1522 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", 1523 | "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", 1524 | "dev": true, 1525 | "requires": { 1526 | "has-flag": "^4.0.0" 1527 | } 1528 | } 1529 | } 1530 | }, 1531 | "ms": { 1532 | "version": "2.1.3", 1533 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1534 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1535 | "dev": true 1536 | }, 1537 | "nanoid": { 1538 | "version": "3.2.0", 1539 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", 1540 | "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", 1541 | "dev": true 1542 | }, 1543 | "normalize-path": { 1544 | "version": "3.0.0", 1545 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 1546 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 1547 | "dev": true 1548 | }, 1549 | "once": { 1550 | "version": "1.4.0", 1551 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1552 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1553 | "dev": true, 1554 | "requires": { 1555 | "wrappy": "1" 1556 | } 1557 | }, 1558 | "p-limit": { 1559 | "version": "3.1.0", 1560 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 1561 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 1562 | "dev": true, 1563 | "requires": { 1564 | "yocto-queue": "^0.1.0" 1565 | } 1566 | }, 1567 | "p-locate": { 1568 | "version": "5.0.0", 1569 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 1570 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 1571 | "dev": true, 1572 | "requires": { 1573 | "p-limit": "^3.0.2" 1574 | } 1575 | }, 1576 | "path-exists": { 1577 | "version": "4.0.0", 1578 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 1579 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 1580 | "dev": true 1581 | }, 1582 | "path-is-absolute": { 1583 | "version": "1.0.1", 1584 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1585 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1586 | "dev": true 1587 | }, 1588 | "picomatch": { 1589 | "version": "2.3.1", 1590 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1591 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1592 | "dev": true 1593 | }, 1594 | "randombytes": { 1595 | "version": "2.1.0", 1596 | "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", 1597 | "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", 1598 | "dev": true, 1599 | "requires": { 1600 | "safe-buffer": "^5.1.0" 1601 | } 1602 | }, 1603 | "readdirp": { 1604 | "version": "3.6.0", 1605 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", 1606 | "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", 1607 | "dev": true, 1608 | "requires": { 1609 | "picomatch": "^2.2.1" 1610 | } 1611 | }, 1612 | "require-directory": { 1613 | "version": "2.1.1", 1614 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1615 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1616 | "dev": true 1617 | }, 1618 | "safe-buffer": { 1619 | "version": "5.2.1", 1620 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 1621 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", 1622 | "dev": true 1623 | }, 1624 | "serialize-javascript": { 1625 | "version": "6.0.0", 1626 | "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", 1627 | "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", 1628 | "dev": true, 1629 | "requires": { 1630 | "randombytes": "^2.1.0" 1631 | } 1632 | }, 1633 | "strip-json-comments": { 1634 | "version": "3.1.1", 1635 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1636 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1637 | "dev": true 1638 | }, 1639 | "supports-color": { 1640 | "version": "7.2.0", 1641 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1642 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1643 | "requires": { 1644 | "has-flag": "^4.0.0" 1645 | } 1646 | }, 1647 | "to-regex-range": { 1648 | "version": "5.0.1", 1649 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1650 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1651 | "dev": true, 1652 | "requires": { 1653 | "is-number": "^7.0.0" 1654 | } 1655 | }, 1656 | "which": { 1657 | "version": "2.0.2", 1658 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1659 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1660 | "dev": true, 1661 | "requires": { 1662 | "isexe": "^2.0.0" 1663 | } 1664 | }, 1665 | "workerpool": { 1666 | "version": "6.2.0", 1667 | "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz", 1668 | "integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==", 1669 | "dev": true 1670 | }, 1671 | "wrap-ansi": { 1672 | "version": "7.0.0", 1673 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", 1674 | "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", 1675 | "dev": true, 1676 | "requires": { 1677 | "ansi-styles": "^4.0.0", 1678 | "string-width": "^4.1.0", 1679 | "strip-ansi": "^6.0.0" 1680 | }, 1681 | "dependencies": { 1682 | "is-fullwidth-code-point": { 1683 | "version": "3.0.0", 1684 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1685 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1686 | "dev": true 1687 | }, 1688 | "string-width": { 1689 | "version": "4.2.2", 1690 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1691 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1692 | "dev": true, 1693 | "requires": { 1694 | "emoji-regex": "^8.0.0", 1695 | "is-fullwidth-code-point": "^3.0.0", 1696 | "strip-ansi": "^6.0.0" 1697 | } 1698 | }, 1699 | "strip-ansi": { 1700 | "version": "6.0.0", 1701 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1702 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1703 | "dev": true, 1704 | "requires": { 1705 | "ansi-regex": "^5.0.0" 1706 | } 1707 | } 1708 | } 1709 | }, 1710 | "wrappy": { 1711 | "version": "1.0.2", 1712 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1713 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1714 | "dev": true 1715 | }, 1716 | "y18n": { 1717 | "version": "5.0.5", 1718 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", 1719 | "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", 1720 | "dev": true 1721 | }, 1722 | "yargs": { 1723 | "version": "16.2.0", 1724 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", 1725 | "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", 1726 | "dev": true, 1727 | "requires": { 1728 | "cliui": "^7.0.2", 1729 | "escalade": "^3.1.1", 1730 | "get-caller-file": "^2.0.5", 1731 | "require-directory": "^2.1.1", 1732 | "string-width": "^4.2.0", 1733 | "y18n": "^5.0.5", 1734 | "yargs-parser": "^20.2.2" 1735 | }, 1736 | "dependencies": { 1737 | "is-fullwidth-code-point": { 1738 | "version": "3.0.0", 1739 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 1740 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 1741 | "dev": true 1742 | }, 1743 | "string-width": { 1744 | "version": "4.2.2", 1745 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1746 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1747 | "dev": true, 1748 | "requires": { 1749 | "emoji-regex": "^8.0.0", 1750 | "is-fullwidth-code-point": "^3.0.0", 1751 | "strip-ansi": "^6.0.0" 1752 | } 1753 | }, 1754 | "strip-ansi": { 1755 | "version": "6.0.0", 1756 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1757 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1758 | "dev": true, 1759 | "requires": { 1760 | "ansi-regex": "^5.0.0" 1761 | } 1762 | } 1763 | } 1764 | }, 1765 | "yargs-parser": { 1766 | "version": "20.2.4", 1767 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", 1768 | "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", 1769 | "dev": true 1770 | }, 1771 | "yargs-unparser": { 1772 | "version": "2.0.0", 1773 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", 1774 | "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", 1775 | "dev": true, 1776 | "requires": { 1777 | "camelcase": "^6.0.0", 1778 | "decamelize": "^4.0.0", 1779 | "flat": "^5.0.2", 1780 | "is-plain-obj": "^2.1.0" 1781 | } 1782 | }, 1783 | "yeow": { 1784 | "version": "0.2.0", 1785 | "resolved": "https://registry.npmjs.org/yeow/-/yeow-0.2.0.tgz", 1786 | "integrity": "sha512-5x8uI1N9GpA4orY6VW31ucfxwnJuTat0GezkqXUNV71M1lnyOznDfxLy6cUd+zM3L59lra3mRKaI5fCLhqvvxA==" 1787 | }, 1788 | "yocto-queue": { 1789 | "version": "0.1.0", 1790 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1791 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1792 | "dev": true 1793 | } 1794 | } 1795 | } 1796 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "naz", 3 | "version": "1.2.0", 4 | "description": "an esolang where every instruction is named by a number and a letter", 5 | "type": "module", 6 | "exports": "./index.js", 7 | "scripts": { 8 | "test": "mocha test/no_input.js test/input.js" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/sporeball/naz.git" 13 | }, 14 | "keywords": [ 15 | "esolang" 16 | ], 17 | "author": "sporeball", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/sporeball/naz/issues" 21 | }, 22 | "homepage": "https://github.com/sporeball/naz#readme", 23 | "dependencies": { 24 | "chalk": "^5.0.0", 25 | "chalk-template": "^0.4.0", 26 | "eol": "^0.9.1", 27 | "yeow": "^0.2.0" 28 | }, 29 | "devDependencies": { 30 | "mocha": "^9.2.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /test/common.js: -------------------------------------------------------------------------------- 1 | import parse from '../index.js'; 2 | 3 | import chalk from 'chalk'; 4 | import eol from 'eol'; 5 | import fs from 'fs'; 6 | import path from 'path'; 7 | 8 | let contents; 9 | 10 | export function test (file, input, expected) { 11 | return new Promise(function(resolve, reject) { 12 | contents = eol.crlf(fs.readFileSync(path.join(path.resolve(), `examples/${file}.naz`), {encoding: "utf-8"}, function(){})); 13 | 14 | contents = contents.split("\r\n") 15 | .map(line => line.replace(/^#.*$| +#.*$/gm, '')); 16 | 17 | parse(contents, "", input, false, true).then(function(output) { 18 | if (output.indexOf(`${chalk.red("error:")}`) == 0) { 19 | reject(new Error(output)); 20 | } 21 | output = output.slice(8); 22 | if (output != expected) { 23 | reject(new Error(`${chalk.red("error:")} output was ${output}, expected ${expected}`)); 24 | } else { 25 | resolve(); 26 | } 27 | }); 28 | }).catch(); 29 | } 30 | -------------------------------------------------------------------------------- /test/input.js: -------------------------------------------------------------------------------- 1 | import * as Common from './common.js'; 2 | import { reset } from '../index.js'; 3 | 4 | import chalk from 'chalk'; 5 | 6 | let tests; 7 | 8 | describe("input", function() { 9 | describe("rot13", function() { 10 | this.should = "ROT-13 transform the input"; 11 | tests = [ 12 | {input: "Hello, World!\u0000", expected: "Uryyb, Jbeyq!"}, 13 | {input: "!@#$%^&*()\u0000", expected: "!@#$%^&*()"}, 14 | ]; 15 | tests.forEach(function(test) { 16 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 17 | await Common.test("rot13", test.input, test.expected); 18 | }); 19 | }); 20 | }); 21 | describe("prime", function() { 22 | this.should = "test if a number is prime"; 23 | tests = [ 24 | {input: "007", expected: "1"}, 25 | {input: "035", expected: "0"}, 26 | {input: "227", expected: "1"}, 27 | {input: "001", expected: "0"}, 28 | ]; 29 | tests.forEach(function(test) { 30 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 31 | await Common.test("prime", test.input, test.expected); 32 | }); 33 | }); 34 | }); 35 | describe("cg/compactify", function() { 36 | this.should = "remove all vowels after the first character"; 37 | tests = [ 38 | {input: "i\u0000", expected: "i"}, 39 | {input: "ate\u0000", expected: "at"}, 40 | {input: "potato\u0000", expected: "ptt"} 41 | ]; 42 | tests.forEach(function(test) { 43 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 44 | await Common.test("cg/compactify", test.input, test.expected); 45 | }); 46 | }); 47 | }); 48 | describe("cg/doublespeak", function() { 49 | this.should = "output each character twice"; 50 | tests = [ 51 | {input: "Double speak!\u0000", expected: "DDoouubbllee ssppeeaakk!!"}, 52 | ]; 53 | tests.forEach(function(test) { 54 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 55 | await Common.test("cg/doublespeak", test.input, test.expected); 56 | }); 57 | }); 58 | }); 59 | describe("cg/fullwidth", function() { 60 | this.should = "output each character with a space after it"; 61 | tests = [ 62 | {input: "Full width text\u0000", expected: "F u l l w i d t h t e x t "}, 63 | ]; 64 | tests.forEach(function(test) { 65 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 66 | await Common.test("cg/fullwidth", test.input, test.expected); 67 | }); 68 | }); 69 | }); 70 | describe("cg/howhappy", function() { 71 | this.should = "output the happiness of the input emoticon"; 72 | tests = [ 73 | {input: ":(", expected: "0"}, 74 | {input: ":-|", expected: "1"}, 75 | {input: ":)", expected: "2"}, 76 | {input: ":-D", expected: "3"} 77 | ]; 78 | tests.forEach(function(test) { 79 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 80 | await Common.test("cg/howhappy", test.input, test.expected); 81 | }); 82 | }); 83 | }); 84 | describe("cg/lowercase", function() { 85 | this.should = "convert the input string to lowercase"; 86 | tests = [ 87 | {input: "HELLO, WORLD\u0000", expected: "hello, world"}, 88 | {input: "!!!\u0000", expected: "!!!"} 89 | ]; 90 | tests.forEach(function(test) { 91 | it(`${test.input} ${chalk.gray("->")} ${test.expected}`, async function() { 92 | await Common.test("cg/lowercase", test.input, test.expected); 93 | }); 94 | }); 95 | }); 96 | 97 | afterEach(async function() { 98 | reset(); 99 | }); 100 | }); 101 | -------------------------------------------------------------------------------- /test/no_input.js: -------------------------------------------------------------------------------- 1 | import * as Common from './common.js'; 2 | import { reset } from '../index.js'; 3 | 4 | describe("no_input", function() { 5 | describe("helloworld", function() { 6 | it("should output 'Hello, World!'", async function() { 7 | await Common.test("helloworld", "", "Hello, World!"); 8 | }); 9 | }); 10 | describe("cg/333", function() { 11 | it("should output '333666999'", async function() { 12 | await Common.test("cg/333", "", "333666999"); 13 | }); 14 | }); 15 | 16 | afterEach(async function() { 17 | reset(); 18 | }); 19 | }); 20 | --------------------------------------------------------------------------------