@cucumber/tag-expressions 4.1.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/cjs/package.json +1 -0
  2. package/dist/{src → cjs/src}/index.d.ts +0 -0
  3. package/dist/cjs/src/index.d.ts.map +1 -0
  4. package/dist/cjs/src/index.js +222 -0
  5. package/dist/cjs/src/index.js.map +1 -0
  6. package/dist/cjs/test/errors.test.d.ts +2 -0
  7. package/dist/cjs/test/errors.test.d.ts.map +1 -0
  8. package/dist/cjs/test/errors.test.js +44 -0
  9. package/dist/cjs/test/errors.test.js.map +1 -0
  10. package/dist/cjs/test/evaluations.test.d.ts +2 -0
  11. package/dist/cjs/test/evaluations.test.d.ts.map +1 -0
  12. package/dist/cjs/test/evaluations.test.js +63 -0
  13. package/dist/cjs/test/evaluations.test.js.map +1 -0
  14. package/dist/cjs/test/parsing.test.d.ts +2 -0
  15. package/dist/cjs/test/parsing.test.d.ts.map +1 -0
  16. package/dist/cjs/test/parsing.test.js +47 -0
  17. package/dist/cjs/test/parsing.test.js.map +1 -0
  18. package/dist/cjs/test/testDataDir.d.ts +2 -0
  19. package/dist/cjs/test/testDataDir.d.ts.map +1 -0
  20. package/dist/cjs/test/testDataDir.js +5 -0
  21. package/dist/cjs/test/testDataDir.js.map +1 -0
  22. package/dist/cjs/tsconfig.build-cjs.tsbuildinfo +1 -0
  23. package/dist/esm/src/index.d.ts +12 -0
  24. package/dist/esm/src/index.d.ts.map +1 -0
  25. package/dist/{src → esm/src}/index.js +34 -36
  26. package/dist/esm/src/index.js.map +1 -0
  27. package/dist/esm/test/errors.test.d.ts +2 -0
  28. package/dist/esm/test/errors.test.d.ts.map +1 -0
  29. package/dist/esm/test/errors.test.js +14 -0
  30. package/dist/esm/test/errors.test.js.map +1 -0
  31. package/dist/esm/test/evaluations.test.d.ts +2 -0
  32. package/dist/esm/test/evaluations.test.d.ts.map +1 -0
  33. package/dist/esm/test/evaluations.test.js +19 -0
  34. package/dist/esm/test/evaluations.test.js.map +1 -0
  35. package/dist/esm/test/parsing.test.d.ts +2 -0
  36. package/dist/esm/test/parsing.test.d.ts.map +1 -0
  37. package/dist/esm/test/parsing.test.js +17 -0
  38. package/dist/esm/test/parsing.test.js.map +1 -0
  39. package/dist/esm/test/testDataDir.d.ts +2 -0
  40. package/dist/esm/test/testDataDir.d.ts.map +1 -0
  41. package/dist/esm/test/testDataDir.js +2 -0
  42. package/dist/esm/test/testDataDir.js.map +1 -0
  43. package/dist/esm/tsconfig.build-esm.tsbuildinfo +1 -0
  44. package/package.json +50 -13
  45. package/.github/ISSUE_TEMPLATE.md +0 -5
  46. package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
  47. package/.mocharc.json +0 -6
  48. package/.rsync +0 -3
  49. package/.subrepo +0 -1
  50. package/CONTRIBUTING.md +0 -8
  51. package/LICENSE +0 -21
  52. package/Makefile +0 -1
  53. package/default.mk +0 -87
  54. package/dist/src/index.d.ts.map +0 -1
  55. package/dist/src/index.js.map +0 -1
  56. package/dist/test/tag_expression_parser_test.d.ts +0 -2
  57. package/dist/test/tag_expression_parser_test.d.ts.map +0 -1
  58. package/dist/test/tag_expression_parser_test.js +0 -119
  59. package/dist/test/tag_expression_parser_test.js.map +0 -1
  60. package/dist/tsconfig.build.tsbuildinfo +0 -1
  61. package/src/index.ts +0 -223
  62. package/test/tag_expression_parser_test.ts +0 -122
  63. package/tsconfig.build.json +0 -11
  64. package/tsconfig.json +0 -3
@@ -1,119 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const assert_1 = __importDefault(require("assert"));
7
- const src_1 = __importDefault(require("../src"));
8
- describe('TagExpressionParser', () => {
9
- describe('#parse', () => {
10
- const tests = [
11
- ['', 'true'],
12
- ['a and b', '( a and b )'],
13
- ['a or b', '( a or b )'],
14
- ['not a', 'not ( a )'],
15
- ['( a and b ) or ( c and d )', '( ( a and b ) or ( c and d ) )'],
16
- [
17
- 'not a or b and not c or not d or e and f',
18
- '( ( ( not ( a ) or ( b and not ( c ) ) ) or not ( d ) ) or ( e and f ) )',
19
- ],
20
- [
21
- 'not a\\(\\) or b and not c or not d or e and f',
22
- '( ( ( not ( a\\(\\) ) or ( b and not ( c ) ) ) or not ( d ) ) or ( e and f ) )',
23
- ],
24
- ['a\\\\ and b', '( a\\\\ and b )'],
25
- ['\\a and b', '( a and b )'],
26
- ['a\\ and b', '( a and b )'],
27
- ['a and b\\', '( a and b )'],
28
- ['( a and b\\\\)', '( a and b\\\\ )'],
29
- ['a\\\\\\( and b\\\\\\)', '( a\\\\\\( and b\\\\\\) )'],
30
- ['(a and \\b)', '( a and b )'],
31
- // a or not b
32
- ];
33
- tests.forEach(function (inOut) {
34
- it(inOut[0], function () {
35
- const infix = inOut[0];
36
- const expr = (0, src_1.default)(infix);
37
- assert_1.default.strictEqual(expr.toString(), inOut[1]);
38
- const roundtripTokens = expr.toString();
39
- const roundtripExpr = (0, src_1.default)(roundtripTokens);
40
- assert_1.default.strictEqual(roundtripExpr.toString(), inOut[1]);
41
- });
42
- });
43
- [
44
- ['@a @b or', 'Syntax error. Expected operator'],
45
- ['@a and (@b not)', 'Syntax error. Expected operator'],
46
- ['@a and (@b @c) or', 'Syntax error. Expected operator'],
47
- ['@a and or', 'Syntax error. Expected operand'],
48
- ['or or', 'Syntax error. Expected operand'],
49
- ['a b', 'Syntax error. Expected operator'],
50
- ['( a and b ) )', 'Syntax error. Unmatched )'],
51
- ['( ( a and b )', 'Syntax error. Unmatched ('],
52
- // a or not b
53
- ].forEach(function (inOut) {
54
- it(inOut[0] + ' fails', function () {
55
- const infix = inOut[0];
56
- try {
57
- (0, src_1.default)(infix);
58
- throw new Error('Expected syntax error');
59
- }
60
- catch (expected) {
61
- assert_1.default.strictEqual(expected.message, inOut[1]);
62
- }
63
- });
64
- });
65
- // evaluation
66
- it('evaluates not', function () {
67
- const expr = (0, src_1.default)('not x');
68
- assert_1.default.strictEqual(expr.evaluate(['x']), false);
69
- assert_1.default.strictEqual(expr.evaluate(['y']), true);
70
- });
71
- it('evaluates and', function () {
72
- const expr = (0, src_1.default)('x and y');
73
- assert_1.default.strictEqual(expr.evaluate(['x', 'y']), true);
74
- assert_1.default.strictEqual(expr.evaluate(['y']), false);
75
- assert_1.default.strictEqual(expr.evaluate(['x']), false);
76
- });
77
- it('evaluates or', function () {
78
- const expr = (0, src_1.default)(' x or(y) ');
79
- assert_1.default.strictEqual(expr.evaluate([]), false);
80
- assert_1.default.strictEqual(expr.evaluate(['y']), true);
81
- assert_1.default.strictEqual(expr.evaluate(['x']), true);
82
- });
83
- it('evaluates expressions with escaped chars', function () {
84
- const expr = (0, src_1.default)(' x\\(1\\) or(y\\(2\\)) ');
85
- assert_1.default.strictEqual(expr.evaluate([]), false);
86
- assert_1.default.strictEqual(expr.evaluate(['y(2)']), true);
87
- assert_1.default.strictEqual(expr.evaluate(['x(1)']), true);
88
- assert_1.default.strictEqual(expr.evaluate(['y']), false);
89
- assert_1.default.strictEqual(expr.evaluate(['x']), false);
90
- });
91
- it('evaluates empty expressions to true', function () {
92
- const expr = (0, src_1.default)('');
93
- assert_1.default.strictEqual(expr.evaluate([]), true);
94
- assert_1.default.strictEqual(expr.evaluate(['y']), true);
95
- assert_1.default.strictEqual(expr.evaluate(['x']), true);
96
- });
97
- it('evaluates expressions with escaped backslash', function () {
98
- const expr = (0, src_1.default)('x\\\\ or(y\\\\\\)) or(z\\\\)');
99
- assert_1.default.strictEqual(expr.evaluate([]), false);
100
- assert_1.default.strictEqual(expr.evaluate(['x\\']), true);
101
- assert_1.default.strictEqual(expr.evaluate(['y\\)']), true);
102
- assert_1.default.strictEqual(expr.evaluate(['z\\']), true);
103
- assert_1.default.strictEqual(expr.evaluate(['x']), false);
104
- assert_1.default.strictEqual(expr.evaluate(['y)']), false);
105
- assert_1.default.strictEqual(expr.evaluate(['z']), false);
106
- });
107
- it('evaluates expressions with backslash', function () {
108
- const expr = (0, src_1.default)('\\x or y\\ or z\\');
109
- assert_1.default.strictEqual(expr.evaluate([]), false);
110
- assert_1.default.strictEqual(expr.evaluate(['x']), true);
111
- assert_1.default.strictEqual(expr.evaluate(['y']), true);
112
- assert_1.default.strictEqual(expr.evaluate(['z']), true);
113
- assert_1.default.strictEqual(expr.evaluate(['\\x']), false);
114
- assert_1.default.strictEqual(expr.evaluate(['y\\']), false);
115
- assert_1.default.strictEqual(expr.evaluate(['z\\']), false);
116
- });
117
- });
118
- });
119
- //# sourceMappingURL=tag_expression_parser_test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tag_expression_parser_test.js","sourceRoot":"","sources":["../../test/tag_expression_parser_test.ts"],"names":[],"mappings":";;;;;AAAA,oDAA2B;AAC3B,iDAA0B;AAE1B,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,MAAM,KAAK,GAAG;YACZ,CAAC,EAAE,EAAE,MAAM,CAAC;YACZ,CAAC,SAAS,EAAE,aAAa,CAAC;YAC1B,CAAC,QAAQ,EAAE,YAAY,CAAC;YACxB,CAAC,OAAO,EAAE,WAAW,CAAC;YACtB,CAAC,4BAA4B,EAAE,gCAAgC,CAAC;YAChE;gBACE,0CAA0C;gBAC1C,0EAA0E;aAC3E;YACD;gBACE,gDAAgD;gBAChD,gFAAgF;aACjF;YACD,CAAC,aAAa,EAAE,iBAAiB,CAAC;YAClC,CAAC,WAAW,EAAE,aAAa,CAAC;YAC5B,CAAC,WAAW,EAAE,aAAa,CAAC;YAC5B,CAAC,WAAW,EAAE,aAAa,CAAC;YAC5B,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;YACrC,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;YACtD,CAAC,aAAa,EAAE,aAAa,CAAC;YAC9B,aAAa;SACd,CAAA;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C,EAAE,IAAI,CAAC,CAAA;YAC9C,gBAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YACjD,gBAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;YACjD,gBAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;QACnD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/index.ts","../test/tag_expression_parser_test.ts","../../../node_modules/@types/aria-query/index.d.ts","../../../node_modules/@types/braces/index.d.ts","../../../node_modules/@types/chai/index.d.ts","../../../node_modules/@types/color-name/index.d.ts","../../../node_modules/@types/color-convert/conversions.d.ts","../../../node_modules/@types/color-convert/route.d.ts","../../../node_modules/@types/color-convert/index.d.ts","../../../node_modules/@types/color/index.d.ts","../../../node_modules/@types/elasticlunr/index.d.ts","../../../node_modules/@types/eslint/helpers.d.ts","../../../node_modules/@types/eslint/lib/rules/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/eslint-scope/index.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/querystring/decode.d.ts","../../../node_modules/querystring/encode.d.ts","../../../node_modules/querystring/index.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/glob/index.d.ts","../../../node_modules/@types/glob-base/index.d.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../../../node_modules/@types/html-minifier-terser/index.d.ts","../../../node_modules/@types/is-function/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/@types/js-search/index.d.ts","../../../node_modules/@types/parse5/lib/tree-adapters/default.d.ts","../../../node_modules/@types/parse5/index.d.ts","../../../node_modules/@types/tough-cookie/index.d.ts","../../../node_modules/@types/jsdom/base.d.ts","../../../node_modules/@types/jsdom/ts4.0/index.d.ts","../../../node_modules/@types/jsdom/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/react/global.d.ts","../../../node_modules/csstype/index.d.ts","../../../node_modules/@types/prop-types/index.d.ts","../../../node_modules/@types/scheduler/tracing.d.ts","../../../node_modules/@types/react/index.d.ts","../../../node_modules/@types/markdown-to-jsx/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../../../node_modules/@types/micromatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/@types/mocha/index.d.ts","../../../node_modules/form-data/index.d.ts","../../../node_modules/@types/node-fetch/externals.d.ts","../../../node_modules/@types/node-fetch/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/npmlog/index.d.ts","../../../node_modules/@types/overlayscrollbars/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/pretty-hrtime/index.d.ts","../../../node_modules/@types/qs/index.d.ts","../../../node_modules/@types/reach__router/index.d.ts","../../../node_modules/@types/react-dom/index.d.ts","../../../node_modules/@types/react-syntax-highlighter/index.d.ts","../../../node_modules/@types/scheduler/index.d.ts","../../../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/sinon-chai/index.d.ts","../../../node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/@types/source-list-map/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/stream-buffers/index.d.ts","../../../node_modules/@types/tapable/index.d.ts","../../../node_modules/@types/uglify-js/node_modules/source-map/source-map.d.ts","../../../node_modules/@types/uglify-js/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../../../node_modules/@types/vscode/index.d.ts","../../../node_modules/anymatch/index.d.ts","../../../node_modules/@types/webpack/node_modules/source-map/source-map.d.ts","../../../node_modules/@types/webpack-sources/node_modules/source-map/source-map.d.ts","../../../node_modules/@types/webpack-sources/lib/Source.d.ts","../../../node_modules/@types/webpack-sources/lib/CompatSource.d.ts","../../../node_modules/@types/webpack-sources/lib/ConcatSource.d.ts","../../../node_modules/@types/webpack-sources/lib/OriginalSource.d.ts","../../../node_modules/@types/webpack-sources/lib/PrefixSource.d.ts","../../../node_modules/@types/webpack-sources/lib/RawSource.d.ts","../../../node_modules/@types/webpack-sources/lib/ReplaceSource.d.ts","../../../node_modules/@types/webpack-sources/lib/SizeOnlySource.d.ts","../../../node_modules/@types/webpack-sources/lib/SourceMapSource.d.ts","../../../node_modules/@types/webpack-sources/lib/index.d.ts","../../../node_modules/@types/webpack-sources/lib/CachedSource.d.ts","../../../node_modules/@types/webpack-sources/index.d.ts","../../../node_modules/@types/webpack/index.d.ts","../../../node_modules/@types/webpack-env/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"aa9fb4c70f369237c2f45f9d969c9a59e0eae9a192962eb48581fe864aa609db","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84",{"version":"e54c8715a4954cfdc66cd69489f2b725c09ebf37492dbd91cff0a1688b1159e8","affectsGlobalScope":true},{"version":"51b8b27c21c066bf877646e320bf6a722b80d1ade65e686923cd9d4494aef1ca","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"2c8c5ee58f30e7c944e04ab1fb5506fdbb4dd507c9efa6972cf4b91cec90c503","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"4632665b87204bb1caa8b44d165bce0c50dfab177df5b561b345a567cabacf9a","affectsGlobalScope":true},"11ad1f3abd540ceb381dc68576646e6a2f0b3f0d8b921800949bc146d1c56f73","762155b9a81eff6207f6e7e73b80e53ac2bb9ef4cfda00d3db7bb7ab49772150","5024433f8da3a7968f6d12cffd32f2cefae4442a9ad1c965fa2d23342338b700","40304c033bb6e39f0eb01b106d29523950148dfc3cd547ddb500167871171281",{"version":"0c9d1fd5b43d5e88c277f7f53cffc87778190f2f9a1f57743559421f04fc730b","affectsGlobalScope":true},"f0cb4b3ab88193e3e51e9e2622e4c375955003f1f81239d72c5b7a95415dad3e","92450d617e92f96354d281c8ed5613fd16cacea79eb60b1e9736494b3c057e69","8a9086357fe289efb682dc925358f30b6312c7219a5ca92212857a0a79612012","92bc42ed0e2d41559513fd457ee30d834c2f0fedb9ed5004c029cbf0ad2f8bd9","8dc44c4ad7e254d4404a302e5098e83ab9aae1d65e861c15fb67a7f419051524","13ef762b84fce9c55e11fac658fabf13b38dfb6aac6ddebecf8a5e0374ca0caf",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"0133ebdd17a823ae56861948870cde4dac18dd8818ab641039c85bbb720429e0","0359682c54e487c4cab2b53b2b4d35cc8dea4d9914bc6abcdb5701f8b8e745a4","7d7c8ef7d48a035142c07dae60545ecc0e4af4c337742760cb09726f2f8e31db","e300bf65972ac08167a72787e19d1b43c285c5424707194d0ba64422f6b02c77","82772e5d55062a042a2715a555d347275a663940926fc785705eb082010cb9f6","d555cd63a3fc837840db192596273fdf52fb28092b0a33bec98e89a0334b3a4c",{"version":"dc5f6951bbf5b544349cbdef895c08dee6929818abd27d7d53c38cf1209091b3","affectsGlobalScope":true},"85d545d430795d54a8b2896f67f9aeb7bf19fd74a1469ae0627311eb72f0dfa2","a473cf45c3d9809518f8af913312139d9f4db6887dc554e0d06d0f4e52722e6b","d5afcd002167b6b03d595fb8b9630a00456b6fb9d2c5e8b6aaa30cb31bc44e2b","3d68ecf05475492f041c88395372c3a01b30351619bebcd38287ab185be7f7e4",{"version":"a97ac401f6b334e9b1f6c8ee9319d6e21cc39d2f400e909805dfb8ab5eab0576","affectsGlobalScope":true},"45ac321f2e15d268fd74a90ddaa6467dcaaff2c5b13f95b4b85831520fb7a491","7674b65ac0a3b160232d84464b3486d727415581e5b99ff4aec324500adc98a4","ddd6169dff8e5263397a9399ba7ba92521d3959f8f9dcdc27f24403dc7b751ba","508e1e25ca40ea6cde332d3232c826fcd82f456f45ae535d817754684f048f9e",{"version":"2866a528b2708aa272ec3eaafd3c980abb23aec1ef831cfc5eb2186b98c37ce5","affectsGlobalScope":true},{"version":"8f8f6ee2a0c94077f79439f51640a625ac7e2f5dd6866bd3b5a41705c836adfc","affectsGlobalScope":true},"ee97aed5b4667a5c3003a1da4b108827fc64b888391417617d89b02ff134de9a","839421b494b57cd2bc0074e914130277051850eba6def6c25870056e6652640b","e18a4b529c9a05593e612130554d93a2b78b949cf1cf48c0b183071258f0e95a","88587b5c94b0c4f5d78026e4beeb93383b3933c860d9840b55d6bf47d7b632bb","a473ecd14d9bafbd6a33105524b033237bbf1d6ce2cd81eb71cc54bec2d83d55","9e8947666e44137405fd378f3a8a0515a492e967e552406c02b991c98c78fc61","0cff7901aedfe78e314f7d44088f07e2afa1b6e4f0473a4169b8456ca2fb245d","7a2a3ff87ffd4313a6a2f3b012e801dd249ee58152cedf90c8718dcd2c811fe3","69640cc2e76dad52daeb9914e6b70c5c9a5591a3a65190a2d3ea432cf0015e16","a39a4c527b7a2dc7a2661b711a534c10c76852c5ad6ae320767d3f7d2621b67d","1bb5c9857b2ee32c199dd85bc0f4c0299112485d6e5dc91428eabfdee0dbd68c",{"version":"5daba568741c8ed283d67bf370c626a91e09fdfbc6d4abe22a7f93e2cf5138b9","affectsGlobalScope":true},"7f77304372efe3c9967e5f9ea2061f1b4bf41dc3cda3c83cdd676f2e5af6b7e6","662661bbf9ccd869f3bca82d34234b2abdc95c657e2187c35352d42dddb24c2d","5caa645cc390a0a8d5a031072b6b4e49218c17017cd80a63bd2557b19be13c5f","4c4334eb5d8fae83416a361d787b55a5743916aed8af812a909898bc7333e709","6feb6f75a3e4e017f8e6e12740cf06f18eefcf829284fa310da6c7f4d44fb2eb","4fd3c4debadce3e9ab9dec3eb45f7f5e2e3d4ad65cf975a6d938d883cfb25a50","0953427f9c2498f71dd912fdd8a81b19cf6925de3e1ad67ab9a77b9a0f79bf0b","b709ff1f6d6235f5e9c8dcbce3e683ff24ec35046b232d5a281af083026018d1","7df562288f949945cf69c21cd912100c2afedeeb7cdb219085f7f4b46cb7dde4","9d16690485ff1eb4f6fc57aebe237728fd8e03130c460919da3a35f4d9bd97f5","ad7e61eca7f2f8bf47e72695f9f6663b75e41d87ef49abdb17c0cb843862f8aa","ecba2e44af95b0599c269a92628cec22e752868bce37396740deb51a5c547a26","46a9fb41a8f3bc7539eeebc15a6e04b9e55d7537a081615ad3614220d34c3e0f","ee6a154ecccde26b413e89c97a0b824f25b253c4c50a3c392bcb2b4c6ba9c314","71d6da3b0150ecdcd16c08b3b546fe4cc7f53df642eccfeb03c813ee788fae0c","a364b4a8a015ae377052fa4fac94204d79a69d879567f444c7ceff1b7a18482d","c5ec3b97d9db756c689cd11f4a11eaa9e6077b2768e3e9b54ff727a93c03a909","c14e9e86f18189c7d32b5dd03b4cf3f40bed68f0509dec06d75d41b82c065fe2","bdb07038733b2d74a75ba9c381dcb92774cd6f161ee125bfa921eae7d883ccc9","ad93e960a3a07dff7394bf0c8a558006a9ff2d0725ab28fc33dec227d4cb251e",{"version":"2708349d5a11a5c2e5f3a0765259ebe7ee00cdcc8161cb9990cb4910328442a1","affectsGlobalScope":true},"e0b57467c219609094799676d14077c40e6529c82c6882ea4bd3c29d67d3f56e","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","725b884357ba84171341a8e4cc08edf11417854fd069842ca6d22afb2e340e45","d1ae472dde31ac39e68d52e1e21dcccba3989d146b7b8472f03525d0caad1775","cddf5c26907c0b8378bc05543161c11637b830da9fadf59e02a11e675d11e180","3d2cd8f3047fff04a71e7037a6a4cb9f4accb28dbd8c0d83164d414811025af0","70b34c8420d6226ed565d55f47fe04912d0ca0ad128825c5a06e018a3498db32","de1d6e224048139baf7494237a9231be6bab9e990fb239c7825bfd38b06d8c90","de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","1fe11ac15c436f0f596ccf4f106de840b9aac12726c11ac5363c22beee3946ff","fc37aca06f6b8b296c42412a2e75ab53d30cd1fa8a340a3bb328a723fd678377","201f92d97704e7e17e1c6e208fea976d75ff7b04235b79057891a33c7330bd77","660fa40695c7ca19a59fd09d31d495d952eee946e445a2c455ec63f255ec3050","224b63b6ec3ed8fbabc53e119550862acde02075f1f37dd8822255eee310d994","389303117a81e90897689e7adb4b53a062e68a6fe4067088fae9552907aa28c3",{"version":"d4c4fe14b23180acf25e4a68dc3bb9e5c38233dd3de12a4ab9569e636090ac9b","affectsGlobalScope":true},"96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538",{"version":"ecf78e637f710f340ec08d5d92b3f31b134a46a4fcf2e758690d8c46ce62cba6","affectsGlobalScope":true},"5b1d4ebd62d975c7d3826202f8fac290bac0bae6e04d9e84d1707d7047e108df","f7b46d22a307739c145e5fddf537818038fdfffd580d79ed717f4d4d37249380","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"4262a5a2f37c6b2e08570c70f3b8d5f868e2a2116e227d6bc71ced37fdd4e245","affectsGlobalScope":true},"9c138947e4cf970491111d971aa615db8353c7f0efc72bd84d8ad6e4743079c5","2a2e2c6463bcf3c59f31bc9ab4b6ef963bbf7dffb049cd017e2c1834e3adca63","1a255ad66d2b50f7b42eca69228b9587878cf06900780ad57a306a933c6eaeb4","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05",{"version":"e8bf92aabac2b11e1bf60a0161039cd6f5f0cd9713863ca2289dd7b10eddece8","affectsGlobalScope":true},"736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","208bb742e0f201470da121bc73847c74b62cff4172f38ae5949ae77d6c9c6b71","062bd2910098fc059ba93e347649b3e126c555f7b144033d21d3f8ef63d3e39b","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","fda7ad096a1619fbae01b3d869cc82e29116f22be50133ac8fb08cee21279acd","9751247ee3bbcf1c63592f0f4dafb44559680b2b3e5736b7f0578c6a737d74c8","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","c0a3ea3aee13c4946a6aefce3a6ab9292a40a29f6622cde0fda0b1067a1a1f5f","ba601641fac98c229ccd4a303f747de376d761babb33229bb7153bed9356c9cc","94a274c882504de552300fc5d6be141820041e9e2c530064ea10a0b76e2f905f","b4dfafe583b829a382edccbe32303535d0785f0c02ba7f04418e2a81de97af8a",{"version":"cffd3848b7af4922d70028c805b7df5e8f0eac4a8d2410b0f55b47ca62c6c3a8","affectsGlobalScope":true},"74b0245c42990ed8a849df955db3f4362c81b13f799ebc981b7bec2d5b414a57","6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73",{"version":"b98f6185455945922c7cfdad772ec1c46e5c169a2d71aca6530e041f77665f03","affectsGlobalScope":true},"4aabed97dcdae0cb96cc51b1d46bbd94f24e233580fbe24dbe9019d2bd960f05","67fc055eb86a0632e2e072838f889ffe1754083cb13c8c80a06a7d895d877aae","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","229b8c23448b98db8507667e46f54d20bd1e8425eaa8f3093bf9fecfbab862ec","3833c70307dc3d2b46cb6f2a8b6a90e4d7e7367a21ab18c481d7de0909a43e67","2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","9d74c7330800b325bb19cc8c1a153a612c080a60094e1ab6cfb6e39cf1b88c36","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e",{"version":"b34ad0cd5ebc38052fba8e8cf77567126e7bf05b0255d05a0a89aaffa140eab2","affectsGlobalScope":true},"4fb0b7d532aa6fb850b6cd2f1ee4f00802d877b5c66a51903bc1fb0624126349","2887592574fcdfd087647c539dcb0fbe5af2521270dad4a37f9d17c16190d579","b90c59ac4682368a01c83881b814738eb151de8a58f52eb7edadea2bcffb11b9","8560a87b2e9f8e2c3808c8f6172c9b7eb6c9b08cb9f937db71c285ecf292c81d","ffe3931ff864f28d80ae2f33bd11123ad3d7bad9896b910a1e61504cc093e1f5","083c1bd82f8dc3a1ed6fc9e8eaddf141f7c05df418eca386598821e045253af9","274ebe605bd7f71ce161f9f5328febc7d547a2929f803f04b44ec4a7d8729517","6ca0207e70d985a24396583f55836b10dc181063ab6069733561bfde404d1bad","5908142efeaab38ffdf43927ee0af681ae77e0d7672b956dfb8b6c705dbfe106","f772b188b943549b5c5eb803133314b8aa7689eced80eed0b70e2f30ca07ab9c","0026b816ef05cfbf290e8585820eef0f13250438669107dfc44482bac007b14f","05d64cc1118031b29786632a9a0f6d7cf1dcacb303f27023a466cf3cdc860538","e0fff9119e1a5d2fdd46345734126cd6cb99c2d98a9debf0257047fe3937cc3f","d84398556ba4595ee6be554671da142cfe964cbdebb2f0c517a10f76f2b016c0","e275297155ec3251200abbb334c7f5641fecc68b2a9573e40eed50dff7584762","cd6a7c1c2a6461c6868601ca2144a41f8ee6d4a85d4b4cf1deb651e6c2ebc9e5",{"version":"c856e68ae3c730c5b59b0a5c0c8e951596ae79da7d29c9a1b1a8257109f3f3cc","affectsGlobalScope":true},"f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","6ba73232c9d3267ca36ddb83e335d474d2c0e167481e3dec416c782894e11438","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"downlevelIteration":true,"esModuleInterop":true,"experimentalDecorators":true,"jsx":2,"module":1,"noImplicitAny":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strictNullChecks":false,"target":2},"fileIdsList":[[112,113,114],[39,112,113,114],[40,41,112,113,114],[40,112,113,114],[42,112,113,114],[48,49,112,113,114],[45,46,47,48,112,113,114],[49,112,113,114],[63,97,98,112,113,114],[101,112,113,114],[105,112,113,114],[106,112,113,114],[63,92,97,110,111,113,114],[112,113],[112,114],[112,113,114,120],[37,112,113,114],[66,89,97,112,113,114,126,127],[63,64,71,80,112,113,114],[55,63,71,112,113,114],[90,112,113,114],[59,64,72,112,113,114],[80,112,113,114],[61,63,71,112,113,114],[63,112,113,114],[63,65,80,89,112,113,114],[64,112,113,114],[71,80,89,112,113,114],[63,64,66,71,80,83,89,112,113,114],[66,80,83,89,112,113,114],[51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,89,90,91,92,93,94,95,96,112,113,114],[89,112,113,114],[61,63,80,112,113,114],[53,112,113,114],[85,112,113,114],[78,90,92,112,113,114],[71,112,113,114],[77,112,113,114],[63,65,80,89,92,112,113,114],[109,112,113,114],[110,112,113,114],[112,113,114,120,137],[112,113,114,116,117,118,119],[38,112,113,114,140],[112,113,114,139],[80,97,112,113,114],[112,113,114,147],[97,112,113,114,154,155,156,157,158,159,160,161,162,163,164],[112,113,114,153,154,163],[112,113,114,154,163],[112,113,114,143,153,154,163],[112,113,114,154],[59,112,113,114,153,163],[112,113,114,153,154,155,156,157,158,159,160,161,162,164],[59,97,112,113,114,146,147,148,151,165],[112,113,114,168],[63,80,97,112,113,114],[66,80,97,112,113,114],[86,87,112,113,114],[34,51,112,113,114]],"referencedMap":[[139,1],[36,1],[37,1],[38,1],[40,2],[42,3],[41,4],[39,1],[43,5],[44,1],[50,6],[45,1],[49,7],[46,8],[48,1],[100,1],[99,9],[102,10],[103,1],[104,1],[105,1],[106,11],[107,12],[108,1],[112,13],[114,14],[113,15],[47,1],[115,1],[121,16],[122,10],[123,17],[98,1],[124,1],[125,1],[127,1],[128,18],[51,1],[53,1],[54,1],[55,19],[56,20],[57,21],[58,22],[59,23],[60,24],[61,1],[62,25],[63,25],[64,26],[65,27],[52,1],[96,1],[66,28],[67,29],[68,30],[97,31],[69,25],[70,32],[71,33],[72,1],[73,1],[74,34],[75,35],[76,1],[77,1],[78,25],[79,36],[80,25],[81,1],[82,1],[83,37],[84,1],[85,37],[89,38],[90,1],[91,23],[92,1],[93,1],[94,39],[95,23],[129,1],[130,25],[131,1],[132,1],[110,40],[109,41],[133,1],[118,1],[134,1],[135,16],[136,16],[137,42],[116,1],[120,43],[138,1],[119,1],[141,44],[140,45],[142,1],[143,1],[144,1],[145,46],[146,1],[111,1],[148,47],[147,1],[101,1],[149,1],[150,1],[167,1],[165,48],[164,49],[155,50],[156,51],[157,51],[158,50],[159,50],[160,50],[161,52],[154,53],[162,49],[163,54],[153,1],[166,55],[152,1],[168,1],[169,56],[170,57],[151,1],[117,1],[126,58],[86,1],[87,1],[88,59],[7,1],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[1,1],[33,1],[34,1],[35,60]],"exportedModulesMap":[[139,1],[36,1],[37,1],[38,1],[40,2],[42,3],[41,4],[39,1],[43,5],[44,1],[50,6],[45,1],[49,7],[46,8],[48,1],[100,1],[99,9],[102,10],[103,1],[104,1],[105,1],[106,11],[107,12],[108,1],[112,13],[114,14],[113,15],[47,1],[115,1],[121,16],[122,10],[123,17],[98,1],[124,1],[125,1],[127,1],[128,18],[51,1],[53,1],[54,1],[55,19],[56,20],[57,21],[58,22],[59,23],[60,24],[61,1],[62,25],[63,25],[64,26],[65,27],[52,1],[96,1],[66,28],[67,29],[68,30],[97,31],[69,25],[70,32],[71,33],[72,1],[73,1],[74,34],[75,35],[76,1],[77,1],[78,25],[79,36],[80,25],[81,1],[82,1],[83,37],[84,1],[85,37],[89,38],[90,1],[91,23],[92,1],[93,1],[94,39],[95,23],[129,1],[130,25],[131,1],[132,1],[110,40],[109,41],[133,1],[118,1],[134,1],[135,16],[136,16],[137,42],[116,1],[120,43],[138,1],[119,1],[141,44],[140,45],[142,1],[143,1],[144,1],[145,46],[146,1],[111,1],[148,47],[147,1],[101,1],[149,1],[150,1],[167,1],[165,48],[164,49],[155,50],[156,51],[157,51],[158,50],[159,50],[160,50],[161,52],[154,53],[162,49],[163,54],[153,1],[166,55],[152,1],[168,1],[169,56],[170,57],[151,1],[117,1],[126,58],[86,1],[87,1],[88,59],[7,1],[9,1],[8,1],[2,1],[10,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[3,1],[4,1],[21,1],[18,1],[19,1],[20,1],[22,1],[23,1],[24,1],[5,1],[25,1],[26,1],[27,1],[28,1],[6,1],[29,1],[30,1],[31,1],[32,1],[1,1],[33,1],[34,1],[35,60]],"semanticDiagnosticsPerFile":[139,36,37,38,40,42,41,39,43,44,50,45,49,46,48,100,99,102,103,104,105,106,107,108,112,114,113,47,115,121,122,123,98,124,125,127,128,51,53,54,55,56,57,58,59,60,61,62,63,64,65,52,96,66,67,68,97,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,89,90,91,92,93,94,95,129,130,131,132,110,109,133,118,134,135,136,137,116,120,138,119,141,140,142,143,144,145,146,111,148,147,101,149,150,167,165,164,155,156,157,158,159,160,161,154,162,163,153,166,152,168,169,170,151,117,126,86,87,88,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,29,30,31,32,1,33,34,35]},"version":"4.4.3"}
package/src/index.ts DELETED
@@ -1,223 +0,0 @@
1
- const OPERAND = 'operand'
2
- const OPERATOR = 'operator'
3
- const PREC: { [key: string]: number } = {
4
- '(': -2,
5
- ')': -1,
6
- or: 0,
7
- and: 1,
8
- not: 2,
9
- }
10
- const ASSOC: { [key: string]: string } = {
11
- or: 'left',
12
- and: 'left',
13
- not: 'right',
14
- }
15
-
16
- /**
17
- * Parses infix boolean expression (using Dijkstra's Shunting Yard algorithm)
18
- * and builds a tree of expressions. The root node of the expression is returned.
19
- *
20
- * This expression can be evaluated by passing in an array of literals that resolve to true
21
- */
22
- export default function parse(infix: string): Node {
23
- const tokens = tokenize(infix)
24
- if (tokens.length === 0) {
25
- return new True()
26
- }
27
- const expressions: Node[] = []
28
- const operators: string[] = []
29
- let expectedTokenType = OPERAND
30
-
31
- tokens.forEach(function (token) {
32
- if (isUnary(token)) {
33
- check(expectedTokenType, OPERAND)
34
- operators.push(token)
35
- expectedTokenType = OPERAND
36
- } else if (isBinary(token)) {
37
- check(expectedTokenType, OPERATOR)
38
- while (
39
- operators.length > 0 &&
40
- isOp(peek(operators)) &&
41
- ((ASSOC[token] === 'left' && PREC[token] <= PREC[peek(operators)]) ||
42
- (ASSOC[token] === 'right' && PREC[token] < PREC[peek(operators)]))
43
- ) {
44
- pushExpr(pop(operators), expressions)
45
- }
46
- operators.push(token)
47
- expectedTokenType = OPERAND
48
- } else if ('(' === token) {
49
- check(expectedTokenType, OPERAND)
50
- operators.push(token)
51
- expectedTokenType = OPERAND
52
- } else if (')' === token) {
53
- check(expectedTokenType, OPERATOR)
54
- while (operators.length > 0 && peek(operators) !== '(') {
55
- pushExpr(pop(operators), expressions)
56
- }
57
- if (operators.length === 0) {
58
- throw Error('Syntax error. Unmatched )')
59
- }
60
- if (peek(operators) === '(') {
61
- pop(operators)
62
- }
63
- expectedTokenType = OPERATOR
64
- } else {
65
- check(expectedTokenType, OPERAND)
66
- pushExpr(token, expressions)
67
- expectedTokenType = OPERATOR
68
- }
69
- })
70
-
71
- while (operators.length > 0) {
72
- if (peek(operators) === '(') {
73
- throw Error('Syntax error. Unmatched (')
74
- }
75
- pushExpr(pop(operators), expressions)
76
- }
77
-
78
- return pop(expressions)
79
- }
80
-
81
- function tokenize(expr: string): string[] {
82
- const tokens = []
83
- let isEscaped = false
84
- let token
85
- for (let i = 0; i < expr.length; i++) {
86
- const c = expr.charAt(i)
87
- if ('\\' === c && !isEscaped) {
88
- isEscaped = true
89
- } else {
90
- if (/\s/.test(c)) {
91
- // skip
92
- if (token) {
93
- // end of token
94
- tokens.push(token.join(''))
95
- token = undefined
96
- }
97
- } else {
98
- if ((c === '(' || c === ')') && !isEscaped) {
99
- if (token) {
100
- // end of token
101
- tokens.push(token.join(''))
102
- token = undefined
103
- }
104
- tokens.push(c)
105
- continue
106
- }
107
- token = token ? token : [] // start of token
108
- token.push(c)
109
- }
110
- isEscaped = false
111
- }
112
- }
113
- if (token) {
114
- tokens.push(token.join(''))
115
- }
116
- return tokens
117
- }
118
-
119
- function isUnary(token: string) {
120
- return 'not' === token
121
- }
122
-
123
- function isBinary(token: string) {
124
- return 'or' === token || 'and' === token
125
- }
126
-
127
- function isOp(token: string) {
128
- return ASSOC[token] !== undefined
129
- }
130
-
131
- function check(expectedTokenType: string, tokenType: string) {
132
- if (expectedTokenType !== tokenType) {
133
- throw new Error('Syntax error. Expected ' + expectedTokenType)
134
- }
135
- }
136
-
137
- function peek(stack: string[]) {
138
- return stack[stack.length - 1]
139
- }
140
-
141
- function pop<T>(stack: T[]): T {
142
- if (stack.length === 0) {
143
- throw new Error('empty stack')
144
- }
145
- return stack.pop()
146
- }
147
-
148
- function pushExpr(token: string, stack: Node[]) {
149
- if (token === 'and') {
150
- const rightAndExpr = pop(stack)
151
- stack.push(new And(pop(stack), rightAndExpr))
152
- } else if (token === 'or') {
153
- const rightOrExpr = pop(stack)
154
- stack.push(new Or(pop(stack), rightOrExpr))
155
- } else if (token === 'not') {
156
- stack.push(new Not(pop(stack)))
157
- } else {
158
- stack.push(new Literal(token))
159
- }
160
- }
161
-
162
- interface Node {
163
- evaluate(variables: string[]): boolean
164
- }
165
-
166
- class Literal implements Node {
167
- constructor(private readonly value: string) {}
168
-
169
- public evaluate(variables: string[]) {
170
- return variables.indexOf(this.value) !== -1
171
- }
172
-
173
- public toString() {
174
- return this.value.replace(/\\/g, '\\\\').replace(/\(/g, '\\(').replace(/\)/g, '\\)')
175
- }
176
- }
177
-
178
- class Or implements Node {
179
- constructor(private readonly leftExpr: Node, private readonly rightExpr: Node) {}
180
-
181
- public evaluate(variables: string[]) {
182
- return this.leftExpr.evaluate(variables) || this.rightExpr.evaluate(variables)
183
- }
184
-
185
- public toString() {
186
- return '( ' + this.leftExpr.toString() + ' or ' + this.rightExpr.toString() + ' )'
187
- }
188
- }
189
-
190
- class And implements Node {
191
- constructor(private readonly leftExpr: Node, private readonly rightExpr: Node) {}
192
-
193
- public evaluate(variables: string[]) {
194
- return this.leftExpr.evaluate(variables) && this.rightExpr.evaluate(variables)
195
- }
196
-
197
- public toString() {
198
- return '( ' + this.leftExpr.toString() + ' and ' + this.rightExpr.toString() + ' )'
199
- }
200
- }
201
-
202
- class Not implements Node {
203
- constructor(private readonly expr: Node) {}
204
-
205
- public evaluate(variables: string[]) {
206
- return !this.expr.evaluate(variables)
207
- }
208
-
209
- public toString() {
210
- return 'not ( ' + this.expr.toString() + ' )'
211
- }
212
- }
213
-
214
- class True implements Node {
215
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
216
- public evaluate(variables: string[]) {
217
- return true
218
- }
219
-
220
- public toString() {
221
- return 'true'
222
- }
223
- }
@@ -1,122 +0,0 @@
1
- import assert from 'assert'
2
- import parse from '../src'
3
-
4
- describe('TagExpressionParser', () => {
5
- describe('#parse', () => {
6
- const tests = [
7
- ['', 'true'],
8
- ['a and b', '( a and b )'],
9
- ['a or b', '( a or b )'],
10
- ['not a', 'not ( a )'],
11
- ['( a and b ) or ( c and d )', '( ( a and b ) or ( c and d ) )'],
12
- [
13
- 'not a or b and not c or not d or e and f',
14
- '( ( ( not ( a ) or ( b and not ( c ) ) ) or not ( d ) ) or ( e and f ) )',
15
- ],
16
- [
17
- 'not a\\(\\) or b and not c or not d or e and f',
18
- '( ( ( not ( a\\(\\) ) or ( b and not ( c ) ) ) or not ( d ) ) or ( e and f ) )',
19
- ],
20
- ['a\\\\ and b', '( a\\\\ and b )'],
21
- ['\\a and b', '( a and b )'],
22
- ['a\\ and b', '( a and b )'],
23
- ['a and b\\', '( a and b )'],
24
- ['( a and b\\\\)', '( a and b\\\\ )'],
25
- ['a\\\\\\( and b\\\\\\)', '( a\\\\\\( and b\\\\\\) )'],
26
- ['(a and \\b)', '( a and b )'],
27
- // a or not b
28
- ]
29
- tests.forEach(function (inOut) {
30
- it(inOut[0], function () {
31
- const infix = inOut[0]
32
- const expr = parse(infix)
33
- assert.strictEqual(expr.toString(), inOut[1])
34
-
35
- const roundtripTokens = expr.toString()
36
- const roundtripExpr = parse(roundtripTokens)
37
- assert.strictEqual(roundtripExpr.toString(), inOut[1])
38
- })
39
- })
40
- ;[
41
- ['@a @b or', 'Syntax error. Expected operator'],
42
- ['@a and (@b not)', 'Syntax error. Expected operator'],
43
- ['@a and (@b @c) or', 'Syntax error. Expected operator'],
44
- ['@a and or', 'Syntax error. Expected operand'],
45
- ['or or', 'Syntax error. Expected operand'],
46
- ['a b', 'Syntax error. Expected operator'],
47
- ['( a and b ) )', 'Syntax error. Unmatched )'],
48
- ['( ( a and b )', 'Syntax error. Unmatched ('],
49
- // a or not b
50
- ].forEach(function (inOut) {
51
- it(inOut[0] + ' fails', function () {
52
- const infix = inOut[0]
53
- try {
54
- parse(infix)
55
- throw new Error('Expected syntax error')
56
- } catch (expected) {
57
- assert.strictEqual(expected.message, inOut[1])
58
- }
59
- })
60
- })
61
-
62
- // evaluation
63
-
64
- it('evaluates not', function () {
65
- const expr = parse('not x')
66
- assert.strictEqual(expr.evaluate(['x']), false)
67
- assert.strictEqual(expr.evaluate(['y']), true)
68
- })
69
-
70
- it('evaluates and', function () {
71
- const expr = parse('x and y')
72
- assert.strictEqual(expr.evaluate(['x', 'y']), true)
73
- assert.strictEqual(expr.evaluate(['y']), false)
74
- assert.strictEqual(expr.evaluate(['x']), false)
75
- })
76
-
77
- it('evaluates or', function () {
78
- const expr = parse(' x or(y) ')
79
- assert.strictEqual(expr.evaluate([]), false)
80
- assert.strictEqual(expr.evaluate(['y']), true)
81
- assert.strictEqual(expr.evaluate(['x']), true)
82
- })
83
-
84
- it('evaluates expressions with escaped chars', function () {
85
- const expr = parse(' x\\(1\\) or(y\\(2\\)) ')
86
- assert.strictEqual(expr.evaluate([]), false)
87
- assert.strictEqual(expr.evaluate(['y(2)']), true)
88
- assert.strictEqual(expr.evaluate(['x(1)']), true)
89
- assert.strictEqual(expr.evaluate(['y']), false)
90
- assert.strictEqual(expr.evaluate(['x']), false)
91
- })
92
-
93
- it('evaluates empty expressions to true', function () {
94
- const expr = parse('')
95
- assert.strictEqual(expr.evaluate([]), true)
96
- assert.strictEqual(expr.evaluate(['y']), true)
97
- assert.strictEqual(expr.evaluate(['x']), true)
98
- })
99
-
100
- it('evaluates expressions with escaped backslash', function () {
101
- const expr = parse('x\\\\ or(y\\\\\\)) or(z\\\\)')
102
- assert.strictEqual(expr.evaluate([]), false)
103
- assert.strictEqual(expr.evaluate(['x\\']), true)
104
- assert.strictEqual(expr.evaluate(['y\\)']), true)
105
- assert.strictEqual(expr.evaluate(['z\\']), true)
106
- assert.strictEqual(expr.evaluate(['x']), false)
107
- assert.strictEqual(expr.evaluate(['y)']), false)
108
- assert.strictEqual(expr.evaluate(['z']), false)
109
- })
110
-
111
- it('evaluates expressions with backslash', function () {
112
- const expr = parse('\\x or y\\ or z\\')
113
- assert.strictEqual(expr.evaluate([]), false)
114
- assert.strictEqual(expr.evaluate(['x']), true)
115
- assert.strictEqual(expr.evaluate(['y']), true)
116
- assert.strictEqual(expr.evaluate(['z']), true)
117
- assert.strictEqual(expr.evaluate(['\\x']), false)
118
- assert.strictEqual(expr.evaluate(['y\\']), false)
119
- assert.strictEqual(expr.evaluate(['z\\']), false)
120
- })
121
- })
122
- })
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.build.json",
3
- "compilerOptions": {
4
- "rootDir": ".",
5
- "outDir": "dist"
6
- },
7
- "include": [
8
- "src",
9
- "test"
10
- ]
11
- }
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json"
3
- }