commit 45f7d8ea6f0736a109042b3fb2b0bb30cab6d3ae Author: Alexander Yakovlev Date: Fri Jul 10 16:23:16 2020 +0700 Initial commit with tests diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..06dde11 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = 0 +trim_trailing_whitespace = false diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 0000000..8b7d833 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,3 @@ +extends: standard +rules: + "semi": 0 # do not force semicolons diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/ishml.js b/ishml.js new file mode 100644 index 0000000..40f02ec --- /dev/null +++ b/ishml.js @@ -0,0 +1,768 @@ +"use strict" +/* +ISC License + +Copyright 2019, Jennifer L Schmidt + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +https://whitewhalestories.com +*/ + +var ishml = ishml || {} +//var Ishmael = Ishmael || ishml //Call me Ishmael. +ishml.enum=ishml.enum || {} +ishml.enum.mode={all:Symbol('all'),any:Symbol('any'),apt: Symbol('apt')} +ishml.enum.pos= +{ + adjective:Symbol("adjective"), + adverb:Symbol("adverb"), + conjunction:Symbol("conjunction"), + noun:Symbol("noun"), + prefix:Symbol("prefix"), + preposition:Symbol("preposition"), + suffix:Symbol("suffix"), + verb:Symbol("verb") +} +ishml.Interpretation=function Interpretation(gist={},remainder="",valid=true) +{ + if (this instanceof ishml.Interpretation) + { + if (gist instanceof Array) + { + this.gist=gist.slice(0) + } + else + { + if(gist instanceof ishml.Token) + { + this.gist=gist.clone() + } + else + { + this.gist=Object.assign({},gist) + } + } + + this.remainder=remainder.slice() + this.valid=valid + return this + } + else + { + return new Interpretation(gist,remainder) + } +} +ishml.Lexicon=function Lexicon() +{ + if (this instanceof ishml.Lexicon) + { + + Object.defineProperty(this, "trie", {value:{},writable: true}) + return this + } + else + { + return new Lexicon() + } +} + +ishml.Lexicon.prototype.register = function (...someLexemes) +{ + var lexemes=someLexemes + var _as =function(definition) + { + lexemes.forEach((lexeme)=> + { + var _trie = this.trie + for (let i = 0, length =lexeme.length; i < length; i++) + { + var character = lexeme.charAt(i) + _trie = (_trie[character] =_trie[character] || {}) + } + if (!_trie.definitions) + { + _trie.definitions= [] + } + _trie.definitions.push(definition) + }) + return this + } + return {as:_as.bind(this)} +} +ishml.Lexicon.prototype.search = function (searchText, {regex=false,separator=/^\s+/, lax=false, caseSensitive=false, longest=false, full=false}={}) +{ + var _trie = this.trie + var _results = [] + + //trim leading separators. + if (separator && separator.test(searchText)) + { + var trimmedText=searchText.split(separator,2)[1] + } + else + { + var trimmedText=searchText + } + if(regex) + { + var match=trimmedText.match(regex) + if (match) + { + var result={} + var definitions=[] + definitions[0]={fuzzy:true} + result.token=new ishml.Token(match[0],definitions) + result.remainder=trimmedText.slice(match[0].length) + _results.push(result) + + } + return _results + + } + else + { + + for (let i=0; i < trimmedText.length; i++) + { + if (caseSensitive){var character=trimmedText.charAt(i)} + else{var character=trimmedText.charAt(i).toLowerCase()} + if ( ! _trie[character]) + { + if(longest|full) + { + _results= _results.slice(0,1) + if(full && _results[0].remainder.length>0 ){_results=[]} + else { return _results} + } + else + { + return _results + } + } + else + { + if (_trie[character].definitions) + { + if (i0 ){_results=[]} + } + return _results +} + +ishml.Lexicon.prototype.unregister=function(lexeme,definition) +{ + var _lexeme=lexeme.toLowerCase() + var _trie = this.trie + var j=0 + for (let i=0; i < _lexeme.length; i++) + { + var character=_lexeme.charAt(i) + if ( ! _trie[character]) + { + return this + } + else + { + _trie = _trie[character] + } + } + if (definition !== undefined) + { + if (_trie.hasOwnProperty("definitions")) + { + _trie.definitions=_trie.definitions.filter((def)=> + { + var mismatch=Object.entries(definition).some(([key,value])=> + { + if(def[key]!==value) + { + return true + } + }) + if (mismatch){return true} + else {return false} + }) + if (_trie.definitions.length===0 ) + { + delete _trie.definitions + } + } + } + else + { + delete _trie.definitions + } + return this +} +ishml.Parser=function Parser({lexicon,grammar}={}) +{ + if (this instanceof ishml.Parser) + { + this.lexicon=lexicon + this.grammar=grammar + } + else + { + return new Parser({lexicon:lexicon,grammar:grammar}) + } +} +ishml.Parser.prototype.analyze=function(text) +{ + var interpretations=[] + var partialInterpretations=[] + var completeInterpretations=[] + var {snippets:result}=this.grammar.parse(text,this.lexicon) + if (result) + { + interpretations=interpretations.concat(result) + } + interpretations.forEach((interpretation)=> + { + if (interpretation.remainder.length>0) + { + partialInterpretations.push(interpretation) + } + else + { + + completeInterpretations.push(interpretation) + } + }) + if (completeInterpretations.length>0) + { + return {success:true, interpretations:completeInterpretations} + } + else + { + if (partialInterpretations.length>0) + { + return {success:false, interpretations: partialInterpretations.sort(function(first,second){return first.remainder.length - second.remainder.length})} + } + else + { + return { success: false} + } + } +} +ishml.regex=ishml.regex||{} +ishml.regex.word=/(^\w*)(.*)/ +ishml.regex.floatingPointNumber=/^-?([0-9]*[.])?[0-9]+/ +ishml.Rule=function Rule() +{ + if (this instanceof ishml.Rule) + { + + Object.defineProperty(this, "caseSensitive", {value:false, writable: true}) + Object.defineProperty(this, "entire", {value:false, writable: true}) + Object.defineProperty(this, "full", {value:false, writable: true}) + Object.defineProperty(this, "filter", {value:(definition)=>true, writable: true}) + Object.defineProperty(this, "greedy", {value:false, writable: true}) + Object.defineProperty(this, "keep", {value:true, writable: true}) + Object.defineProperty(this, "lax", {value:false, writable: true}) + Object.defineProperty(this, "longest", {value:false, writable: true}) + Object.defineProperty(this, "minimum", {value:1, writable: true}) + Object.defineProperty(this, "maximum", {value:1, writable: true}) + Object.defineProperty(this, "mode", {value:ishml.enum.mode.all, writable: true}) + Object.defineProperty(this, "semantics", {value:(interpretation)=>true, writable: true}) + Object.defineProperty(this, "mismatch", {value:(interpretation)=>false, writable: true}) + Object.defineProperty(this, "separator", {value:/^\s/, writable: true}) + Object.defineProperty(this, "regex", {value:false, writable: true}) + return this + } + else + { + return new Rule() + } +} +ishml.Rule.prototype.clone =function() +{ + var circularReferences=new Set() + + function _clone(rule) + { + var clonedRule= new ishml.Rule().configure({caseSensitive:rule.caseSensitive, entire:rule.entire, filter:rule.filter, full:rule.full, greedy:rule.greedy, keep:rule.keep, lax:rule.lax, longest:rule.longest, minimum:rule.minimum, maximum:rule.maximum, mode:rule.mode, mismatch:rule.mismatch, regex:rule.regex, semantics:rule.semantics, separator:rule.separator}) + var entries=Object.entries(rule) + entries.forEach(([key,value])=> + { + if (circularReferences.has(value)) + { + clonedRule[key]=value + } + else + { + circularReferences.add(value) + clonedRule[key]=_clone(value) + } + + }) + return clonedRule + } + return _clone(this) +} +//DEFECT Entire not documented. +ishml.Rule.prototype.configure =function({caseSensitive, entire,filter, full, greedy, keep, lax, longest, minimum,maximum, mode,mismatch, regex, semantics, separator}={}) +{ + + if(caseSensitive !== undefined){this.caseSensitive=caseSensitive} + if(entire !== undefined){this.entire=entire} + if(filter !== undefined){this.filter=filter} + if(full !== undefined){this.full=full} + if(greedy !== undefined){this.greedy=greedy} + if(keep !== undefined){this.keep=keep} + if(lax !== undefined){this.lax=lax} + if(longest !== undefined){this.longest=longest} + if(minimum !== undefined){this.minimum=minimum} + if(maximum !== undefined){this.maximum=maximum} + if(mode !== undefined){this.mode=mode} + if(mismatch !== undefined){this.mismatch=mismatch} + if(regex !== undefined){this.regex=regex} + if(semantics !== undefined){this.semantics=semantics} + if(separator !== undefined){this.separator=separator} + return this +} +ishml.Rule.prototype.parse =function(text,lexicon) +{ + var someText=text.slice(0) + var results=[] + + var keys=Object.keys(this) + if (keys.length>0) + //non-terminal + { + switch (this.mode) + { + case ishml.enum.mode.all: + if (this.maximum ===1 ){var candidates=[new ishml.Interpretation({},someText)]} + else {var candidates=[new ishml.Interpretation([],someText)]} + var counter = 0 + var phrases=[] + var revisedCandidates=candidates.slice(0) + while (counter + { + var {gist,remainder,valid}=candidate + //SNIP + if (remainder.length>0) + { + var {snippets}=this[key].parse(remainder.slice(0),lexicon) + snippets.forEach((snippet)=> + { + + var phrase=new ishml.Interpretation(gist,snippet.remainder,snippet.valid && valid) + if (this.maximum ===1 ) + { + if(this[key].keep || !phrase.valid){phrase.gist[key]=snippet.gist} + } + else + { + if(phrase.gist.length===counter){phrase.gist.push({})} + if(this[key].keep || !phrase.valid){phrase.gist[counter][key]=snippet.gist} + } + phrases.push(phrase) + + }) + } + }) + if (this[key].minimum===0) + { + + //revisedCandidates=revisedCandidates.concat(phrases.filter(p=>p.valid)) + revisedCandidates=revisedCandidates.concat(phrases.slice(0)) + } + else + { + revisedCandidates=phrases.slice(0) + } + + phrases=[] + } + counter++ + if (revisedCandidates.length===0) + { + break + } + else + { + if (counter >= this.minimum) + { + if (this.greedy){results=revisedCandidates.slice(0)} + else {results=results.concat(revisedCandidates)} + } + } + } + break + case ishml.enum.mode.any: + if (this.maximum ===1 ){var candidates=[new ishml.Interpretation({},someText)]} + else {var candidates=[new ishml.Interpretation([],someText)]} + var revisedCandidates=candidates.slice(0) + for (let key of keys) + { + var counter = 0 + var phrases=[] + + while (counter + { + var {gist,remainder,valid}=candidate + //SNIP + if (remainder.length>0) + { + var {snippets}=this[key].parse(remainder.slice(0),lexicon) + snippets.forEach((snippet)=> + { + + var phrase=new ishml.Interpretation(gist,snippet.remainder,snippet.valid && valid) + if (this.maximum ===1 ) + { + if(this[key].keep || !phrase.valid){phrase.gist=snippet.gist} + } + else + { + if(phrase.gist.length===counter){phrase.gist.push({})} + if(this[key].keep || !phrase.valid){phrase.gist[counter]=snippet.gist} + } + phrases.push(phrase) + + }) + } + + }) + if (this[key].minimum===0) + { + + //revisedCandidates=phrases.filter(p=>p.valid) + revisedCandidates=phrases.slice(0) + } + else + { + revisedCandidates=phrases.slice(0) + } + phrases=[] + counter++ + if (revisedCandidates.length===0){break} + else + { + if (this.greedy){results=revisedCandidates.slice(0)} + else {results=results.concat(revisedCandidates)} + } + } + revisedCandidates=candidates.slice(0) //go see if there are more alternatives that work. + } + break + case ishml.enum.mode.apt: + if (this.maximum ===1 ){var candidates=[new ishml.Interpretation({},someText)]} + else {var candidates=[new ishml.Interpretation([],someText)]} + var revisedCandidates=candidates.slice(0) + for (let key of keys) + { + var counter = 0 + var phrases=[] + + while (counter + { + var {gist,remainder,valid}=candidate + //SNIP + if (remainder.length>0) + { + var {snippets}=this[key].parse(remainder.slice(0),lexicon) + snippets.forEach((snippet)=> + { + + var phrase=new ishml.Interpretation(gist,snippet.remainder,snippet.valid && valid) + if (this.maximum ===1 ) + { + if(this[key].keep || !phrase.valid){phrase.gist=snippet.gist} + } + else + { + if(phrase.gist.length===counter){phrase.gist.push({})} + if(this[key].keep || !phrase.valid){phrase.gist[counter]=snippet.gist} + } + phrases.push(phrase) + + }) + } + + }) + + if (this[key].minimum===0) + { + + revisedCandidates=phrases.slice(0) + } + else + { + revisedCandidates=phrases.slice(0) + } + phrases=[] + counter++ + if (revisedCandidates.length===0){break} + else + { + if (this.greedy){results=revisedCandidates.slice(0)} + else {results=results.concat(revisedCandidates)} + } + } + if (results.length>0){break} //found something that works, stop looking. + revisedCandidates=candidates.slice(0)//try again with next key. + } + break + } + } + else + { + //terminal + + if (this.maximum ===1 ){var candidates=[new ishml.Interpretation({},someText)]} + else {var candidates=[new ishml.Interpretation([],someText)]} + var revisedCandidates=candidates.slice(0) + + var counter = 0 + var phrases=[] + var rule = this + while (counter + { + + var {gist,remainder,valid}=candidate + //SNIP + if (remainder.length>0) + { + var snippets=lexicon.search(remainder, {regex:rule.regex,separator:rule.separator, lax:rule.lax, caseSensitive:rule.caseSensitive, longest:rule.longest, full:rule.full}) + + snippets.forEach((snippet)=> + { + snippet.token.definitions=snippet.token.definitions.filter(this.filter) + if (snippet.token.definitions.length>0) + { + var phrase=new ishml.Interpretation(gist,snippet.remainder,snippet.valid && valid) + if (this.maximum ===1 ) + { + if(this.keep || !phrase.valid){phrase.gist=snippet.token} + } + else + { + if(phrase.gist.length===counter){phrase.gist.push({})} + if(this.keep || !phrase.valid){phrase.gist[counter]=snippet.token} + } + phrases.push(phrase) + } + + }) + } + }) +/* if (this.minimum===0) + { + revisedCandidates=phrases.filter(p=>p.valid) + } + else{ +*/ + revisedCandidates=phrases.slice(0) //} + phrases=[] + counter++ + if (revisedCandidates.length===0) + { + + break + } + else + { + if (this.greedy){results=revisedCandidates.slice(0)} + else {results=results.concat(revisedCandidates)} + } + } + + } + results=results.map(interpretation=> + { + if(interpretation.remainder.length>0 && this.entire) + { + interpretation.valid=false + } + return interpretation + }) + + if (!results.some(interpretation=>interpretation.valid)) + { + if (results.length===0){results=candidates} + results=results.reduce((revisedResults, interpretation) => + { + var revisedInterpretation=this.mismatch(interpretation) + if (revisedInterpretation) + { + if (revisedInterpretation) + { + revisedResults.push(revisedInterpretation) + } + } + return revisedResults + + },[]) + + } + + results=results.reduce((revisedResults, interpretation) => + { + if (interpretation.valid) + { + var revisedInterpretation=this.semantics(interpretation) + if (revisedInterpretation) + { + if (revisedInterpretation === true) + { + revisedResults.push(interpretation) + } + else + { + revisedResults.push(revisedInterpretation) + } + } + } + else + { + revisedResults.push(interpretation) + } + return revisedResults + + },[]) + if (results.length>0) + { + /* var validResults=results.filter((interpretation)=> + { + return interpretation.valid + }) + if (validResults.length>0) + { + return {snippets:validResults} + } + else + { + return {snippets:results} + } + */ + return {snippets:results} + } + else + { + return {snippets:[]} + } +} +ishml.Rule.prototype.snip =function(key,rule) +{ + + if (rule instanceof ishml.Rule) + { + this[key]=rule + } + else + { + this[key]=new ishml.Rule(key) + + this[key].caseSensitive=this.caseSensitive + this[key].full=this.full + this[key].lax=this.lax + this[key].longest=this.longest + this[key].separator=this.separator + + } + return this +} +ishml.Token=function Token(lexeme="",definitions=[]) +{ + if (this instanceof ishml.Token) + { + this.lexeme=lexeme.slice(0) + this.definitions=definitions.slice(0) + return this + } + else + { + return new Token(lexeme,definitions) + } +} +ishml.Token.prototype.clone=function() +{ + return new ishml.Token(this.lexeme,this.definitions) +} +ishml.util={_seed:undefined} + +ishml.util.enumerator=function* (aStart =1) +{ + let i = aStart; + while (true) yield i++ +} + +ishml.util.formatId=function(id) +{ + if(id) + { + if (typeof(id)==="string"){return id.replace(/\s+/g, '_')} + else{return id.id.replace(/\s+/g, '_')} + } + else + { + return "auto" + ishml.util.autoid.next().value.toString() + } +} +ishml.util.autoid=ishml.util.enumerator() +ishml.util.random = function() +{ + this._seed = this._seed * 16807 % 2147483647 + return (this._seed-1)/2147483646 +} +ishml.util.reseed = function(aSeed=Math.floor(Math.random() * 2147483648)) +{ + var seed=aSeed % 2147483647 + if (seed <= 0){seed += 2147483646} + this._seed=seed +} +ishml.util.shuffle=function(anArray,aCount=undefined) +{ + var array=anArray.slice(0) + var m = array.length + var count=aCount||array.length + for (let i=0; i < count; i++) + { + let randomIndex = Math.floor(this.random() * m--) + let item = array[m] + array[m] = array[randomIndex] + array[randomIndex] = item + } + return array.slice(-count) +} + +module.exports = ishml diff --git a/package.json b/package.json new file mode 100644 index 0000000..3a8439f --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "scripts": { + "test": "./node_modules/mocha/bin/mocha" + }, + "devDependencies": { + "chai": "^4.2.0", + "eslint": "^7.4.0", + "eslint-config-standard": "^14.1.1", + "mocha": "^8.0.1" + } +} diff --git a/parser.js b/parser.js new file mode 100644 index 0000000..3f4fbbb --- /dev/null +++ b/parser.js @@ -0,0 +1,52 @@ +const ishml = require('./ishml') + +var lexicon = ishml.Lexicon() +lexicon + .register("the", "a", "an").as({ part: "article" }) + .register("take", "steal", "grab", "взять") + .as({ key: "take", part: "verb", prepositions: ["to", "from"] }) + .register("drop", "leave").as({ key: "drop", part: "verb", prepositions: [] }) + .register("wear", "put on").as({ key: "wear", part: "verb", prepositions: [] }) + .register("ring", "перчатки").as({ key: "ring", part: "noun", role: "thing" }) + .register("slipper").as({ key: "slipper", part: "noun", role: "thing" }) + .register("diamond").as({ key: "ring", part: "adjective", role: "thing" }) + .register("diamond jim").as({ key: "jim", part: "noun", role: "npc" }) + .register("jim").as({ key: "james", part: "noun", role: "npc" }) + .register("ruby", "рубиновые").as({ key: "ring", part: "adjective", role: "thing" }) + .register("ruby").as({ key: "ruby", part: "noun", role: "thing" }) + .register("ruby").as({ key: "slipper", part: "adjective", role: "thing" }) + .register("glass").as({ key: "slipper", part: "adjective", role: "thing" }) + .register("glass").as({ key: "tumbler", part: "noun", role: "thing" }) + .register("looking glass").as({ key: "mirror", part: "noun", role: "thing" }) + .register("good looking").as({ key: "tumbler", part: "adjective", role: "thing" }) + .register("good").as({ key: "mirror", part: "adjective", role: "thing" }) + .register("tumbler").as({ key: "tumbler", part: "noun", role: "thing" }) + .register("ruby").as({ key: "miss_ruby", part: "noun", role: "npc" }) + .register("sam").as({ key: "sam", part: "noun", role: "npc" }) + .register("from").as({ key: "from", part: "preposition" }) + .register("to").as({ key: "to", part: "preposition" }) + + +//Create a set of nested rules which mirror the wanted syntax tree. +var grammar = ishml.Rule() +grammar.snip("verb").snip("nounPhrase") +grammar.nounPhrase.snip("article").snip("adjectives").snip("noun") + +//Configure behavior of some of the rules with .configure(). + +grammar.verb.configure({ filter: (definition) => definition.part === "verb" }) + +grammar.nounPhrase.article + .configure({ minimum: 0, filter: (definition) => definition.part === "article" }) + +grammar.nounPhrase.adjectives + .configure( + { + minimum: 0, maximum: Infinity, + filter: (definition) => definition.part === "adjective" + }) + +//Create a parser +var parser = ishml.Parser({ lexicon, grammar }) + +module.exports = parser diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..8b76915 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,1393 @@ +devDependencies: + chai: 4.2.0 + eslint: 7.4.0 + eslint-config-standard: 14.1.1_eslint@7.4.0 + mocha: 8.0.1 +lockfileVersion: 5.1 +packages: + /@babel/code-frame/7.10.4: + dependencies: + '@babel/highlight': 7.10.4 + dev: true + resolution: + integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== + /@babel/helper-validator-identifier/7.10.4: + dev: true + resolution: + integrity: sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== + /@babel/highlight/7.10.4: + dependencies: + '@babel/helper-validator-identifier': 7.10.4 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + resolution: + integrity: sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== + /@types/color-name/1.1.1: + dev: true + resolution: + integrity: sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + /acorn-jsx/5.2.0_acorn@7.3.1: + dependencies: + acorn: 7.3.1 + dev: true + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 + resolution: + integrity: sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + /acorn/7.3.1: + dev: true + engines: + node: '>=0.4.0' + hasBin: true + resolution: + integrity: sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA== + /ajv/6.12.3: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.2.2 + dev: true + resolution: + integrity: sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA== + /ansi-colors/4.1.1: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + /ansi-regex/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + /ansi-regex/4.1.0: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + /ansi-regex/5.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + /ansi-styles/3.2.1: + dependencies: + color-convert: 1.9.3 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + /ansi-styles/4.2.1: + dependencies: + '@types/color-name': 1.1.1 + color-convert: 2.0.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== + /anymatch/3.1.1: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.2.2 + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== + /argparse/1.0.10: + dependencies: + sprintf-js: 1.0.3 + dev: true + resolution: + integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + /array.prototype.map/1.0.2: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.17.6 + es-array-method-boxes-properly: 1.0.0 + is-string: 1.0.5 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw== + /assertion-error/1.1.0: + dev: true + resolution: + integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + /astral-regex/1.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + /balanced-match/1.0.0: + dev: true + resolution: + integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= + /binary-extensions/2.1.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== + /brace-expansion/1.1.11: + dependencies: + balanced-match: 1.0.0 + concat-map: 0.0.1 + dev: true + resolution: + integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + /braces/3.0.2: + dependencies: + fill-range: 7.0.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + /browser-stdout/1.3.1: + dev: true + resolution: + integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + /callsites/3.1.0: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + /camelcase/5.3.1: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + /chai/4.2.0: + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 3.0.1 + get-func-name: 2.0.0 + pathval: 1.1.0 + type-detect: 4.0.8 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== + /chalk/2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + /chalk/4.1.0: + dependencies: + ansi-styles: 4.2.1 + supports-color: 7.1.0 + dev: true + engines: + node: '>=10' + resolution: + integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + /check-error/1.0.2: + dev: true + resolution: + integrity: sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + /chokidar/3.3.1: + dependencies: + anymatch: 3.1.1 + braces: 3.0.2 + glob-parent: 5.1.1 + is-binary-path: 2.1.0 + is-glob: 4.0.1 + normalize-path: 3.0.0 + readdirp: 3.3.0 + dev: true + engines: + node: '>= 8.10.0' + optionalDependencies: + fsevents: 2.1.3 + resolution: + integrity: sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + /cliui/5.0.0: + dependencies: + string-width: 3.1.0 + strip-ansi: 5.2.0 + wrap-ansi: 5.1.0 + dev: true + resolution: + integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + /color-convert/1.9.3: + dependencies: + color-name: 1.1.3 + dev: true + resolution: + integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + /color-convert/2.0.1: + dependencies: + color-name: 1.1.4 + dev: true + engines: + node: '>=7.0.0' + resolution: + integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + /color-name/1.1.3: + dev: true + resolution: + integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + /color-name/1.1.4: + dev: true + resolution: + integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + /concat-map/0.0.1: + dev: true + resolution: + integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + /cross-spawn/7.0.3: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + engines: + node: '>= 8' + resolution: + integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + /debug/3.2.6: + dependencies: + ms: 2.1.2 + dev: true + resolution: + integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + /debug/4.1.1: + dependencies: + ms: 2.1.2 + dev: true + resolution: + integrity: sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + /decamelize/1.2.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + /deep-eql/3.0.1: + dependencies: + type-detect: 4.0.8 + dev: true + engines: + node: '>=0.12' + resolution: + integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + /deep-is/0.1.3: + dev: true + resolution: + integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + /define-properties/1.1.3: + dependencies: + object-keys: 1.1.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + /diff/4.0.2: + dev: true + engines: + node: '>=0.3.1' + resolution: + integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + /doctrine/3.0.0: + dependencies: + esutils: 2.0.3 + dev: true + engines: + node: '>=6.0.0' + resolution: + integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + /emoji-regex/7.0.3: + dev: true + resolution: + integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + /enquirer/2.3.6: + dependencies: + ansi-colors: 4.1.1 + dev: true + engines: + node: '>=8.6' + resolution: + integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + /es-abstract/1.17.6: + dependencies: + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.1 + is-callable: 1.2.0 + is-regex: 1.1.0 + object-inspect: 1.8.0 + object-keys: 1.1.1 + object.assign: 4.1.0 + string.prototype.trimend: 1.0.1 + string.prototype.trimstart: 1.0.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw== + /es-array-method-boxes-properly/1.0.0: + dev: true + resolution: + integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA== + /es-get-iterator/1.1.0: + dependencies: + es-abstract: 1.17.6 + has-symbols: 1.0.1 + is-arguments: 1.0.4 + is-map: 2.0.1 + is-set: 2.0.1 + is-string: 1.0.5 + isarray: 2.0.5 + dev: true + resolution: + integrity: sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ== + /es-to-primitive/1.2.1: + dependencies: + is-callable: 1.2.0 + is-date-object: 1.0.2 + is-symbol: 1.0.3 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + /escape-string-regexp/1.0.5: + dev: true + engines: + node: '>=0.8.0' + resolution: + integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + /eslint-config-standard/14.1.1_eslint@7.4.0: + dependencies: + eslint: 7.4.0 + dev: true + peerDependencies: + eslint: '>=6.2.2' + eslint-plugin-import: '>=2.18.0' + eslint-plugin-node: '>=9.1.0' + eslint-plugin-promise: '>=4.2.1' + eslint-plugin-standard: '>=4.0.0' + resolution: + integrity: sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg== + /eslint-scope/5.1.0: + dependencies: + esrecurse: 4.2.1 + estraverse: 4.3.0 + dev: true + engines: + node: '>=8.0.0' + resolution: + integrity: sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w== + /eslint-utils/2.1.0: + dependencies: + eslint-visitor-keys: 1.3.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + /eslint-visitor-keys/1.3.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + /eslint/7.4.0: + dependencies: + '@babel/code-frame': 7.10.4 + ajv: 6.12.3 + chalk: 4.1.0 + cross-spawn: 7.0.3 + debug: 4.1.1 + doctrine: 3.0.0 + enquirer: 2.3.6 + eslint-scope: 5.1.0 + eslint-utils: 2.1.0 + eslint-visitor-keys: 1.3.0 + espree: 7.1.0 + esquery: 1.3.1 + esutils: 2.0.3 + file-entry-cache: 5.0.1 + functional-red-black-tree: 1.0.1 + glob-parent: 5.1.1 + globals: 12.4.0 + ignore: 4.0.6 + import-fresh: 3.2.1 + imurmurhash: 0.1.4 + is-glob: 4.0.1 + js-yaml: 3.14.0 + json-stable-stringify-without-jsonify: 1.0.1 + levn: 0.4.1 + lodash: 4.17.19 + minimatch: 3.0.4 + natural-compare: 1.4.0 + optionator: 0.9.1 + progress: 2.0.3 + regexpp: 3.1.0 + semver: 7.3.2 + strip-ansi: 6.0.0 + strip-json-comments: 3.1.0 + table: 5.4.6 + text-table: 0.2.0 + v8-compile-cache: 2.1.1 + dev: true + engines: + node: ^10.12.0 || >=12.0.0 + hasBin: true + resolution: + integrity: sha512-gU+lxhlPHu45H3JkEGgYhWhkR9wLHHEXC9FbWFnTlEkbKyZKWgWRLgf61E8zWmBuI6g5xKBph9ltg3NtZMVF8g== + /espree/7.1.0: + dependencies: + acorn: 7.3.1 + acorn-jsx: 5.2.0_acorn@7.3.1 + eslint-visitor-keys: 1.3.0 + dev: true + engines: + node: ^10.12.0 || >=12.0.0 + resolution: + integrity: sha512-dcorZSyfmm4WTuTnE5Y7MEN1DyoPYy1ZR783QW1FJoenn7RailyWFsq/UL6ZAAA7uXurN9FIpYyUs3OfiIW+Qw== + /esprima/4.0.1: + dev: true + engines: + node: '>=4' + hasBin: true + resolution: + integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + /esquery/1.3.1: + dependencies: + estraverse: 5.1.0 + dev: true + engines: + node: '>=0.10' + resolution: + integrity: sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + /esrecurse/4.2.1: + dependencies: + estraverse: 4.3.0 + dev: true + engines: + node: '>=4.0' + resolution: + integrity: sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + /estraverse/4.3.0: + dev: true + engines: + node: '>=4.0' + resolution: + integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + /estraverse/5.1.0: + dev: true + engines: + node: '>=4.0' + resolution: + integrity: sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + /esutils/2.0.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + /fast-deep-equal/3.1.3: + dev: true + resolution: + integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + /fast-json-stable-stringify/2.1.0: + dev: true + resolution: + integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + /fast-levenshtein/2.0.6: + dev: true + resolution: + integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + /file-entry-cache/5.0.1: + dependencies: + flat-cache: 2.0.1 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + /fill-range/7.0.1: + dependencies: + to-regex-range: 5.0.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + /find-up/3.0.0: + dependencies: + locate-path: 3.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + /find-up/4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + /flat-cache/2.0.1: + dependencies: + flatted: 2.0.2 + rimraf: 2.6.3 + write: 1.0.3 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + /flat/4.1.0: + dependencies: + is-buffer: 2.0.4 + dev: true + hasBin: true + resolution: + integrity: sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + /flatted/2.0.2: + dev: true + resolution: + integrity: sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + /fs.realpath/1.0.0: + dev: true + resolution: + integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + /fsevents/2.1.3: + dev: true + engines: + node: ^8.16.0 || ^10.6.0 || >=11.0.0 + optional: true + os: + - darwin + resolution: + integrity: sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + /function-bind/1.1.1: + dev: true + resolution: + integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + /functional-red-black-tree/1.0.1: + dev: true + resolution: + integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + /get-caller-file/2.0.5: + dev: true + engines: + node: 6.* || 8.* || >= 10.* + resolution: + integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + /get-func-name/2.0.0: + dev: true + resolution: + integrity: sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + /glob-parent/5.1.1: + dependencies: + is-glob: 4.0.1 + dev: true + engines: + node: '>= 6' + resolution: + integrity: sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== + /glob/7.1.6: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.0.4 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + resolution: + integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + /globals/12.4.0: + dependencies: + type-fest: 0.8.1 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + /growl/1.10.5: + dev: true + engines: + node: '>=4.x' + resolution: + integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + /has-flag/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + /has-flag/4.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + /has-symbols/1.0.1: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== + /has/1.0.3: + dependencies: + function-bind: 1.1.1 + dev: true + engines: + node: '>= 0.4.0' + resolution: + integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + /he/1.2.0: + dev: true + hasBin: true + resolution: + integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + /ignore/4.0.6: + dev: true + engines: + node: '>= 4' + resolution: + integrity: sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + /import-fresh/3.2.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + /imurmurhash/0.1.4: + dev: true + engines: + node: '>=0.8.19' + resolution: + integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o= + /inflight/1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + resolution: + integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + /inherits/2.0.4: + dev: true + resolution: + integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + /is-arguments/1.0.4: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== + /is-binary-path/2.1.0: + dependencies: + binary-extensions: 2.1.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + /is-buffer/2.0.4: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + /is-callable/1.2.0: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw== + /is-date-object/1.0.2: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== + /is-extglob/2.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + /is-fullwidth-code-point/2.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + /is-glob/4.0.1: + dependencies: + is-extglob: 2.1.1 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + /is-map/2.0.1: + dev: true + resolution: + integrity: sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw== + /is-number/7.0.0: + dev: true + engines: + node: '>=0.12.0' + resolution: + integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + /is-regex/1.1.0: + dependencies: + has-symbols: 1.0.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw== + /is-set/2.0.1: + dev: true + resolution: + integrity: sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA== + /is-string/1.0.5: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== + /is-symbol/1.0.3: + dependencies: + has-symbols: 1.0.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + /isarray/2.0.5: + dev: true + resolution: + integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + /isexe/2.0.0: + dev: true + resolution: + integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + /iterate-iterator/1.0.1: + dev: true + resolution: + integrity: sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw== + /iterate-value/1.0.2: + dependencies: + es-get-iterator: 1.1.0 + iterate-iterator: 1.0.1 + dev: true + resolution: + integrity: sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ== + /js-tokens/4.0.0: + dev: true + resolution: + integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + /js-yaml/3.13.1: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: true + hasBin: true + resolution: + integrity: sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + /js-yaml/3.14.0: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: true + hasBin: true + resolution: + integrity: sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== + /json-schema-traverse/0.4.1: + dev: true + resolution: + integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + /json-stable-stringify-without-jsonify/1.0.1: + dev: true + resolution: + integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + /levn/0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + /locate-path/3.0.0: + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + /locate-path/5.0.0: + dependencies: + p-locate: 4.1.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + /lodash/4.17.19: + dev: true + resolution: + integrity: sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== + /log-symbols/3.0.0: + dependencies: + chalk: 2.4.2 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + /minimatch/3.0.4: + dependencies: + brace-expansion: 1.1.11 + dev: true + resolution: + integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + /minimist/1.2.5: + dev: true + resolution: + integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + /mkdirp/0.5.5: + dependencies: + minimist: 1.2.5 + dev: true + hasBin: true + resolution: + integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + /mocha/8.0.1: + dependencies: + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.3.1 + debug: 3.2.6 + diff: 4.0.2 + escape-string-regexp: 1.0.5 + find-up: 4.1.0 + glob: 7.1.6 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 3.13.1 + log-symbols: 3.0.0 + minimatch: 3.0.4 + ms: 2.1.2 + object.assign: 4.1.0 + promise.allsettled: 1.0.2 + serialize-javascript: 3.0.0 + strip-json-comments: 3.0.1 + supports-color: 7.1.0 + which: 2.0.2 + wide-align: 1.1.3 + workerpool: 6.0.0 + yargs: 13.3.2 + yargs-parser: 13.1.2 + yargs-unparser: 1.6.0 + dev: true + engines: + node: '>= 10.12.0' + hasBin: true + resolution: + integrity: sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg== + /ms/2.1.2: + dev: true + resolution: + integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + /natural-compare/1.4.0: + dev: true + resolution: + integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + /normalize-path/3.0.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + /object-inspect/1.8.0: + dev: true + resolution: + integrity: sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA== + /object-keys/1.1.1: + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + /object.assign/4.1.0: + dependencies: + define-properties: 1.1.3 + function-bind: 1.1.1 + has-symbols: 1.0.1 + object-keys: 1.1.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + /once/1.4.0: + dependencies: + wrappy: 1.0.2 + dev: true + resolution: + integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + /optionator/0.9.1: + dependencies: + deep-is: 0.1.3 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.3 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + /p-limit/2.3.0: + dependencies: + p-try: 2.2.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + /p-locate/3.0.0: + dependencies: + p-limit: 2.3.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + /p-locate/4.1.0: + dependencies: + p-limit: 2.3.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + /p-try/2.2.0: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + /parent-module/1.0.1: + dependencies: + callsites: 3.1.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + /path-exists/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + /path-exists/4.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + /path-is-absolute/1.0.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + /path-key/3.1.1: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + /pathval/1.1.0: + dev: true + resolution: + integrity: sha1-uULm1L3mUwBe9rcTYd74cn0GReA= + /picomatch/2.2.2: + dev: true + engines: + node: '>=8.6' + resolution: + integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + /prelude-ls/1.2.1: + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + /progress/2.0.3: + dev: true + engines: + node: '>=0.4.0' + resolution: + integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + /promise.allsettled/1.0.2: + dependencies: + array.prototype.map: 1.0.2 + define-properties: 1.1.3 + es-abstract: 1.17.6 + function-bind: 1.1.1 + iterate-value: 1.0.2 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg== + /punycode/2.1.1: + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + /readdirp/3.3.0: + dependencies: + picomatch: 2.2.2 + dev: true + engines: + node: '>=8.10.0' + resolution: + integrity: sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== + /regexpp/3.1.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== + /require-directory/2.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + /require-main-filename/2.0.0: + dev: true + resolution: + integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + /resolve-from/4.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + /rimraf/2.6.3: + dependencies: + glob: 7.1.6 + dev: true + hasBin: true + resolution: + integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + /semver/7.3.2: + dev: true + engines: + node: '>=10' + hasBin: true + resolution: + integrity: sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== + /serialize-javascript/3.0.0: + dev: true + resolution: + integrity: sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw== + /set-blocking/2.0.0: + dev: true + resolution: + integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + /shebang-command/2.0.0: + dependencies: + shebang-regex: 3.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + /shebang-regex/3.0.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + /slice-ansi/2.1.0: + dependencies: + ansi-styles: 3.2.1 + astral-regex: 1.0.0 + is-fullwidth-code-point: 2.0.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + /sprintf-js/1.0.3: + dev: true + resolution: + integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + /string-width/2.1.1: + dependencies: + is-fullwidth-code-point: 2.0.0 + strip-ansi: 4.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + /string-width/3.1.0: + dependencies: + emoji-regex: 7.0.3 + is-fullwidth-code-point: 2.0.0 + strip-ansi: 5.2.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + /string.prototype.trimend/1.0.1: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.17.6 + dev: true + resolution: + integrity: sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g== + /string.prototype.trimstart/1.0.1: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.17.6 + dev: true + resolution: + integrity: sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw== + /strip-ansi/4.0.0: + dependencies: + ansi-regex: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8= + /strip-ansi/5.2.0: + dependencies: + ansi-regex: 4.1.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + /strip-ansi/6.0.0: + dependencies: + ansi-regex: 5.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + /strip-json-comments/3.0.1: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + /strip-json-comments/3.1.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + /supports-color/5.5.0: + dependencies: + has-flag: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + /supports-color/7.1.0: + dependencies: + has-flag: 4.0.0 + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + /table/5.4.6: + dependencies: + ajv: 6.12.3 + lodash: 4.17.19 + slice-ansi: 2.1.0 + string-width: 3.1.0 + dev: true + engines: + node: '>=6.0.0' + resolution: + integrity: sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + /text-table/0.2.0: + dev: true + resolution: + integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + /to-regex-range/5.0.1: + dependencies: + is-number: 7.0.0 + dev: true + engines: + node: '>=8.0' + resolution: + integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + /type-check/0.4.0: + dependencies: + prelude-ls: 1.2.1 + dev: true + engines: + node: '>= 0.8.0' + resolution: + integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + /type-detect/4.0.8: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + /type-fest/0.8.1: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + /uri-js/4.2.2: + dependencies: + punycode: 2.1.1 + dev: true + resolution: + integrity: sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + /v8-compile-cache/2.1.1: + dev: true + resolution: + integrity: sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== + /which-module/2.0.0: + dev: true + resolution: + integrity: sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + /which/2.0.2: + dependencies: + isexe: 2.0.0 + dev: true + engines: + node: '>= 8' + hasBin: true + resolution: + integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + /wide-align/1.1.3: + dependencies: + string-width: 2.1.1 + dev: true + resolution: + integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + /word-wrap/1.2.3: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + /workerpool/6.0.0: + dev: true + resolution: + integrity: sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA== + /wrap-ansi/5.1.0: + dependencies: + ansi-styles: 3.2.1 + string-width: 3.1.0 + strip-ansi: 5.2.0 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + /wrappy/1.0.2: + dev: true + resolution: + integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + /write/1.0.3: + dependencies: + mkdirp: 0.5.5 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + /y18n/4.0.0: + dev: true + resolution: + integrity: sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== + /yargs-parser/13.1.2: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + resolution: + integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + /yargs-unparser/1.6.0: + dependencies: + flat: 4.1.0 + lodash: 4.17.19 + yargs: 13.3.2 + dev: true + engines: + node: '>=6' + resolution: + integrity: sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + /yargs/13.3.2: + dependencies: + cliui: 5.0.0 + find-up: 3.0.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 3.1.0 + which-module: 2.0.0 + y18n: 4.0.0 + yargs-parser: 13.1.2 + dev: true + resolution: + integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== +specifiers: + chai: ^4.2.0 + eslint: ^7.4.0 + eslint-config-standard: ^14.1.1 + mocha: ^8.0.1 diff --git a/test/parser.js b/test/parser.js new file mode 100644 index 0000000..e3e67ed --- /dev/null +++ b/test/parser.js @@ -0,0 +1,129 @@ +const ishml = require('../ishml') +const assert = require('chai').assert + +before(function() { + var lexicon = ishml.Lexicon() + lexicon + .register("взять") + .as({ key: "take", part: "verb", prepositions: ["у"] }) + .register("отдать") + .as({ key: "give", part: "verb", prepositions: [] }) + .register("кольцо") + .as({ key: "ring", part: "noun", role: "thing" }) + .register("рубиновое") + .as({ key: "ring", part: "adjective", role: "thing" }) + .register("мужчина", "мужчины", "мужчине") + .as({ key: "james", part: "noun", role: "npc" }) + .register("женщина", "женщине") + .as({ key: "violet", part: "noun", role: "npc" }) + .register("у", "от") + .as({ key: "from", part: "preposition" }) + .register("и",",",";") + .as({ part: "conjunction" }) + .register("его", "её", "ему") + .as({ part: "pronoun" }) + + // ENGLISH + + .register("the", "a", "an").as({ part: "article" }) + .register("take", "steal", "grab") + .as({ key: "take", part: "verb", prepositions: ["to", "from"] }) + .register("drop", "leave").as({ key: "drop", part: "verb", prepositions: [] }) + .register("wear", "put on").as({ key: "wear", part: "verb", prepositions: [] }) + .register("ring").as({ key: "ring", part: "noun", role: "thing" }) + .register("slipper").as({ key: "slipper", part: "noun", role: "thing" }) + .register("diamond").as({ key: "ring", part: "adjective", role: "thing" }) + .register("diamond jim").as({ key: "jim", part: "noun", role: "npc" }) + .register("jim").as({ key: "james", part: "noun", role: "npc" }) + .register("ruby").as({ key: "ring", part: "adjective", role: "thing" }) + .register("ruby").as({ key: "ruby", part: "noun", role: "thing" }) + .register("ruby").as({ key: "slipper", part: "adjective", role: "thing" }) + .register("glass").as({ key: "slipper", part: "adjective", role: "thing" }) + .register("glass").as({ key: "tumbler", part: "noun", role: "thing" }) + .register("looking glass").as({ key: "mirror", part: "noun", role: "thing" }) + .register("good looking").as({ key: "tumbler", part: "adjective", role: "thing" }) + .register("good").as({ key: "mirror", part: "adjective", role: "thing" }) + .register("tumbler").as({ key: "tumbler", part: "noun", role: "thing" }) + .register("ruby").as({ key: "miss_ruby", part: "noun", role: "npc" }) + .register("sam").as({ key: "sam", part: "noun", role: "npc" }) + .register("from").as({ key: "from", part: "preposition" }) + .register("to").as({ key: "to", part: "preposition" }) + + + //Create a set of nested rules which mirror the wanted syntax tree. + var grammar = ishml.Rule() + grammar.snip("verbs").snip("nounPhrase").snip("conjunction") + grammar.nounPhrase.snip("article").snip("adjectives").snip("noun") + + //Configure behavior of some of the rules with .configure(). + + grammar.verbs.configure({ + minimum: 0, + maximum: Infinity, + filter: (definition) => definition.part === "verb" + }) + + grammar.nounPhrase.article.configure({ + minimum: 0, + filter: (definition) => definition.part === "article" + }) + + grammar.nounPhrase.adjectives.configure({ + minimum: 0, + maximum: Infinity, + filter: (definition) => definition.part === "adjective" + }) + + //Create a parser + this.parser = ishml.Parser({ lexicon, grammar }) +}) + +describe('Парсер', function() { + it('должен понимать простые команды', function() { + const input = "взять кольцо" + const output = this.parser.analyze(input) + const interpretation = output.interpretations[0].gist + + assert.notEmpty(interpretation.verbs) + assert.equal('взять', interpretation.verbs[0].lexeme) + assert.equal('перчатки', interpretation.nounPhrase.noun.lexeme) + }) + + it('should understand simple commands', function() { + const input = "take ring" + const output = this.parser.analyze(input) + const interpretation = output.interpretations[0].gist + + assert.notEmpty(interpretation.verbs) + assert.equal('take', interpretation.verbs[0].lexeme) + assert.equal('ring', interpretation.nounPhrase.noun.lexeme) + }) + + it('должен понимать сложные команды', function() { + const input = "взять рубиновое кольцо у женщины и отдать его мужчине" + const output = this.parser.analyze(input) + const interpretation = output.interpretations[0].gist + console.log(interpretation) + + assert.notEmpty(interpretation.verbs) + assert.equal('взять', interpretation.verbs[0].lexeme) + assert.notEmpty(interpretation.nounPhrase.adjectives) + assert.equal('отдать', interpretation.verbs[0].lexeme) + assert.equal('рубиновые', interpretation.nounPhrase.adjectives[0].lexeme) + assert.equal('перчатки', interpretation.nounPhrase.noun.lexeme) + }) + + it('should understand complex commands', function() { + const input = "take the ruby slipper from woman and give it to him" + const output = this.parser.analyze(input) + const interpretation = output.interpretations[0].gist + console.log(interpretation) + + assert.notEmpty(interpretation.verbs) + assert.equal('take', interpretation.verbs[0].lexeme) + assert.equal('give', interpretation.verbs[1].lexeme) + assert.notEmpty(interpretation.nounPhrase.adjectives) + assert.equal('ruby', interpretation.nounPhrase.adjectives[0].lexeme) + assert.equal('slipper', interpretation.nounPhrase.noun.lexeme) + }) +});