From 9a5e885d7158e5798a59aaff10da0d94a6e85a7b Mon Sep 17 00:00:00 2001 From: Rastislav Wagner Date: Tue, 10 Apr 2018 12:55:26 +0200 Subject: [PATCH] Refactor plugins - Create Core and UI plugins for base and LSP functionality. Fixes #143 Signed-off-by: Rastislav Wagner --- .../.gitignore | 0 .../META-INF/MANIFEST.MF | 17 +- .../build.properties | 0 .../plugin.properties | 2 + .../pom.xml | 2 +- .../core/Fabric8AnalysisCoreActivator.java} | 12 +- .../core/Fabric8AnalysisPreferences.java | 21 +- .../core/api}/RecommenderAPIException.java | 2 +- .../core/api}/RecommenderAPIProvider.java | 9 +- .../core/api}/ThreeScaleAPIException.java | 2 +- .../core/api}/ThreeScaleAPIProvider.java | 4 +- .../eclipse/core/data/AnalyticsAuthData.java | 2 +- .../eclipse/core/data/ThreeScaleData.java | 2 +- .../core/internal/AnalyticsAuthService.java | 18 +- .../eclipse/core/internal/PomContentBody.java | 2 +- .../eclipse/core/job/LoginToOSIOJob.java | 45 + .../eclipse/core/job/RetrieveResultsJob.java | 12 +- .../core/job/SendToFabric8AnalysisJob.java | 8 +- .../.gitignore | 7 + .../META-INF/MANIFEST.MF | 21 + .../build.properties | 7 + .../plugin.properties | 0 .../plugin.xml | 20 + .../pom.xml | 11 +- .../server/VERSION | 1 + .../server/collector.js | 190 + .../server/collector.js.map | 1 + .../server/consumers.js | 132 + .../server/consumers.js.map | 1 + .../server/json.js | 145 + .../server/json.js.map | 1 + .../.bin/installServerIntoExtension | 119 + .../server/node_modules/.bin/sshpk-conv | 201 + .../server/node_modules/.bin/sshpk-sign | 191 + .../server/node_modules/.bin/sshpk-verify | 166 + .../server/node_modules/.bin/uuid | 65 + .../server/node_modules/ajv/.tonic_example.js | 20 + .../server/node_modules/ajv/LICENSE | 22 + .../server/node_modules/ajv/README.md | 1327 +++ .../node_modules/ajv/dist/ajv.bundle.js | 7345 +++++++++++++++++ .../server/node_modules/ajv/dist/ajv.min.js | 3 + .../node_modules/ajv/dist/ajv.min.js.map | 1 + .../node_modules/ajv/dist/nodent.min.js | 2 + .../node_modules/ajv/dist/regenerator.min.js | 2 + .../server/node_modules/ajv/lib/$data.js | 49 + .../server/node_modules/ajv/lib/ajv.d.ts | 358 + .../server/node_modules/ajv/lib/ajv.js | 502 ++ .../server/node_modules/ajv/lib/cache.js | 26 + .../node_modules/ajv/lib/compile/_rules.js | 31 + .../node_modules/ajv/lib/compile/async.js | 90 + .../node_modules/ajv/lib/compile/equal.js | 3 + .../ajv/lib/compile/error_classes.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 135 + .../node_modules/ajv/lib/compile/index.js | 380 + .../node_modules/ajv/lib/compile/resolve.js | 271 + .../node_modules/ajv/lib/compile/rules.js | 58 + .../ajv/lib/compile/schema_obj.js | 9 + .../ajv/lib/compile/ucs2length.js | 20 + .../node_modules/ajv/lib/compile/util.js | 267 + .../node_modules/ajv/lib/dot/_limit.jst | 96 + .../node_modules/ajv/lib/dot/_limitItems.jst | 10 + .../node_modules/ajv/lib/dot/_limitLength.jst | 10 + .../ajv/lib/dot/_limitProperties.jst | 10 + .../server/node_modules/ajv/lib/dot/allOf.jst | 34 + .../server/node_modules/ajv/lib/dot/anyOf.jst | 48 + .../node_modules/ajv/lib/dot/coerce.def | 61 + .../server/node_modules/ajv/lib/dot/const.jst | 11 + .../node_modules/ajv/lib/dot/contains.jst | 57 + .../node_modules/ajv/lib/dot/custom.jst | 191 + .../node_modules/ajv/lib/dot/defaults.def | 32 + .../node_modules/ajv/lib/dot/definitions.def | 199 + .../node_modules/ajv/lib/dot/dependencies.jst | 80 + .../server/node_modules/ajv/lib/dot/enum.jst | 30 + .../node_modules/ajv/lib/dot/errors.def | 194 + .../node_modules/ajv/lib/dot/format.jst | 106 + .../server/node_modules/ajv/lib/dot/items.jst | 100 + .../node_modules/ajv/lib/dot/missing.def | 39 + .../node_modules/ajv/lib/dot/multipleOf.jst | 20 + .../server/node_modules/ajv/lib/dot/not.jst | 43 + .../server/node_modules/ajv/lib/dot/oneOf.jst | 44 + .../node_modules/ajv/lib/dot/pattern.jst | 14 + .../node_modules/ajv/lib/dot/properties.jst | 327 + .../ajv/lib/dot/propertyNames.jst | 54 + .../server/node_modules/ajv/lib/dot/ref.jst | 85 + .../node_modules/ajv/lib/dot/required.jst | 108 + .../node_modules/ajv/lib/dot/uniqueItems.jst | 38 + .../node_modules/ajv/lib/dot/validate.jst | 272 + .../node_modules/ajv/lib/dotjs/README.md | 3 + .../node_modules/ajv/lib/dotjs/_limit.js | 149 + .../node_modules/ajv/lib/dotjs/_limitItems.js | 76 + .../ajv/lib/dotjs/_limitLength.js | 81 + .../ajv/lib/dotjs/_limitProperties.js | 76 + .../node_modules/ajv/lib/dotjs/allOf.js | 43 + .../node_modules/ajv/lib/dotjs/anyOf.js | 73 + .../node_modules/ajv/lib/dotjs/const.js | 55 + .../node_modules/ajv/lib/dotjs/contains.js | 81 + .../node_modules/ajv/lib/dotjs/custom.js | 226 + .../ajv/lib/dotjs/dependencies.js | 167 + .../server/node_modules/ajv/lib/dotjs/enum.js | 65 + .../node_modules/ajv/lib/dotjs/format.js | 149 + .../node_modules/ajv/lib/dotjs/items.js | 140 + .../node_modules/ajv/lib/dotjs/multipleOf.js | 76 + .../server/node_modules/ajv/lib/dotjs/not.js | 83 + .../node_modules/ajv/lib/dotjs/oneOf.js | 70 + .../node_modules/ajv/lib/dotjs/pattern.js | 74 + .../node_modules/ajv/lib/dotjs/properties.js | 468 ++ .../ajv/lib/dotjs/propertyNames.js | 81 + .../server/node_modules/ajv/lib/dotjs/ref.js | 123 + .../node_modules/ajv/lib/dotjs/required.js | 268 + .../node_modules/ajv/lib/dotjs/uniqueItems.js | 71 + .../node_modules/ajv/lib/dotjs/validate.js | 458 + .../server/node_modules/ajv/lib/keyword.js | 135 + .../node_modules/ajv/lib/patternGroups.js | 36 + .../node_modules/ajv/lib/refs/$data.json | 17 + .../ajv/lib/refs/json-schema-draft-04.json | 150 + .../ajv/lib/refs/json-schema-draft-06.json | 154 + .../ajv/lib/refs/json-schema-v5.json | 250 + .../server/node_modules/ajv/package.json | 169 + .../node_modules/ajv/scripts/.eslintrc.yml | 3 + .../server/node_modules/ajv/scripts/bundle.js | 61 + .../node_modules/ajv/scripts/compile-dots.js | 73 + .../server/node_modules/ajv/scripts/info | 10 + .../node_modules/ajv/scripts/prepare-tests | 9 + .../node_modules/ajv/scripts/travis-gh-pages | 23 + .../server/node_modules/asn1/.npmignore | 2 + .../server/node_modules/asn1/.travis.yml | 4 + .../server/node_modules/asn1/LICENSE | 19 + .../server/node_modules/asn1/README.md | 50 + .../node_modules/asn1/lib/ber/errors.js | 13 + .../server/node_modules/asn1/lib/ber/index.js | 27 + .../node_modules/asn1/lib/ber/reader.js | 261 + .../server/node_modules/asn1/lib/ber/types.js | 36 + .../node_modules/asn1/lib/ber/writer.js | 316 + .../server/node_modules/asn1/lib/index.js | 20 + .../server/node_modules/asn1/package.json | 98 + .../node_modules/asn1/tst/ber/reader.test.js | 208 + .../node_modules/asn1/tst/ber/writer.test.js | 370 + .../server/node_modules/assert-plus/AUTHORS | 6 + .../node_modules/assert-plus/CHANGES.md | 14 + .../server/node_modules/assert-plus/README.md | 162 + .../server/node_modules/assert-plus/assert.js | 211 + .../node_modules/assert-plus/package.json | 120 + .../server/node_modules/async/.jshintrc | 24 + .../server/node_modules/async/.travis.yml | 5 + .../server/node_modules/async/CHANGELOG.md | 16 + .../server/node_modules/async/LICENSE | 19 + .../server/node_modules/async/README.md | 1720 ++++ .../server/node_modules/async/bower.json | 40 + .../server/node_modules/async/component.json | 17 + .../server/node_modules/async/lib/async.js | 1283 +++ .../server/node_modules/async/package.json | 125 + .../async/support/sync-package-managers.js | 53 + .../server/node_modules/asynckit/LICENSE | 21 + .../server/node_modules/asynckit/README.md | 233 + .../server/node_modules/asynckit/bench.js | 76 + .../server/node_modules/asynckit/index.js | 6 + .../server/node_modules/asynckit/lib/abort.js | 29 + .../server/node_modules/asynckit/lib/async.js | 34 + .../server/node_modules/asynckit/lib/defer.js | 26 + .../node_modules/asynckit/lib/iterate.js | 75 + .../asynckit/lib/readable_asynckit.js | 91 + .../asynckit/lib/readable_parallel.js | 25 + .../asynckit/lib/readable_serial.js | 25 + .../asynckit/lib/readable_serial_ordered.js | 29 + .../server/node_modules/asynckit/lib/state.js | 37 + .../node_modules/asynckit/lib/streamify.js | 141 + .../node_modules/asynckit/lib/terminator.js | 29 + .../server/node_modules/asynckit/package.json | 126 + .../server/node_modules/asynckit/parallel.js | 43 + .../server/node_modules/asynckit/serial.js | 17 + .../node_modules/asynckit/serialOrdered.js | 75 + .../server/node_modules/asynckit/stream.js | 21 + .../server/node_modules/aws-sign2/LICENSE | 55 + .../server/node_modules/aws-sign2/README.md | 4 + .../server/node_modules/aws-sign2/index.js | 212 + .../node_modules/aws-sign2/package.json | 85 + .../server/node_modules/aws4/.npmignore | 4 + .../server/node_modules/aws4/.tern-port | 1 + .../server/node_modules/aws4/.travis.yml | 5 + .../server/node_modules/aws4/LICENSE | 19 + .../server/node_modules/aws4/README.md | 523 ++ .../server/node_modules/aws4/aws4.js | 332 + .../server/node_modules/aws4/lru.js | 96 + .../server/node_modules/aws4/package.json | 140 + .../node_modules/bcrypt-pbkdf/README.md | 39 + .../server/node_modules/bcrypt-pbkdf/index.js | 556 ++ .../node_modules/bcrypt-pbkdf/package.json | 84 + .../server/node_modules/boom/LICENSE | 29 + .../server/node_modules/boom/README.md | 760 ++ .../server/node_modules/boom/lib/index.js | 433 + .../server/node_modules/boom/package.json | 104 + .../server/node_modules/caseless/LICENSE | 28 + .../server/node_modules/caseless/README.md | 45 + .../server/node_modules/caseless/index.js | 67 + .../server/node_modules/caseless/package.json | 100 + .../server/node_modules/caseless/test.js | 67 + .../server/node_modules/co/History.md | 172 + .../server/node_modules/co/LICENSE | 22 + .../server/node_modules/co/Readme.md | 212 + .../server/node_modules/co/index.js | 237 + .../server/node_modules/co/package.json | 106 + .../server/node_modules/colors/.travis.yml | 6 + .../node_modules/colors/MIT-LICENSE.txt | 23 + .../server/node_modules/colors/ReadMe.md | 167 + .../colors/examples/normal-usage.js | 74 + .../colors/examples/safe-string.js | 76 + .../server/node_modules/colors/lib/colors.js | 176 + .../node_modules/colors/lib/custom/trap.js | 45 + .../node_modules/colors/lib/custom/zalgo.js | 104 + .../colors/lib/extendStringPrototype.js | 118 + .../server/node_modules/colors/lib/index.js | 12 + .../node_modules/colors/lib/maps/america.js | 12 + .../node_modules/colors/lib/maps/rainbow.js | 13 + .../node_modules/colors/lib/maps/random.js | 8 + .../node_modules/colors/lib/maps/zebra.js | 5 + .../server/node_modules/colors/lib/styles.js | 77 + .../colors/lib/system/supports-colors.js | 61 + .../server/node_modules/colors/package.json | 87 + .../server/node_modules/colors/safe.js | 9 + .../colors/screenshots/colors.png | Bin 0 -> 79787 bytes .../node_modules/colors/tests/basic-test.js | 50 + .../node_modules/colors/tests/safe-test.js | 45 + .../colors/themes/generic-logging.js | 12 + .../node_modules/combined-stream/License | 19 + .../node_modules/combined-stream/Readme.md | 138 + .../combined-stream/lib/combined_stream.js | 188 + .../node_modules/combined-stream/package.json | 101 + .../server/node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 ++ .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 94 + .../server/node_modules/core-util-is/test.js | 68 + .../server/node_modules/cryptiles/.npmignore | 3 + .../server/node_modules/cryptiles/LICENSE | 28 + .../server/node_modules/cryptiles/README.md | 19 + .../node_modules/cryptiles/lib/index.js | 88 + .../cryptiles/node_modules/boom/LICENSE | 29 + .../cryptiles/node_modules/boom/README.md | 784 ++ .../cryptiles/node_modules/boom/lib/index.js | 457 + .../cryptiles/node_modules/boom/package.json | 113 + .../node_modules/cryptiles/package.json | 112 + .../server/node_modules/cycle/README.md | 49 + .../server/node_modules/cycle/cycle.js | 170 + .../server/node_modules/cycle/package.json | 81 + .../server/node_modules/dashdash/CHANGES.md | 364 + .../server/node_modules/dashdash/LICENSE.txt | 24 + .../server/node_modules/dashdash/README.md | 574 ++ .../dashdash/etc/dashdash.bash_completion.in | 389 + .../node_modules/dashdash/lib/dashdash.js | 1055 +++ .../server/node_modules/dashdash/package.json | 125 + .../node_modules/delayed-stream/.npmignore | 1 + .../node_modules/delayed-stream/License | 19 + .../node_modules/delayed-stream/Makefile | 7 + .../node_modules/delayed-stream/Readme.md | 141 + .../delayed-stream/lib/delayed_stream.js | 107 + .../node_modules/delayed-stream/package.json | 97 + .../server/node_modules/ecc-jsbn/.npmignore | 15 + .../server/node_modules/ecc-jsbn/LICENSE | 21 + .../server/node_modules/ecc-jsbn/README.md | 8 + .../server/node_modules/ecc-jsbn/index.js | 57 + .../node_modules/ecc-jsbn/lib/LICENSE-jsbn | 40 + .../server/node_modules/ecc-jsbn/lib/ec.js | 561 ++ .../server/node_modules/ecc-jsbn/lib/sec.js | 170 + .../server/node_modules/ecc-jsbn/package.json | 90 + .../server/node_modules/ecc-jsbn/test.js | 14 + .../server/node_modules/extend/.eslintrc | 17 + .../server/node_modules/extend/.jscs.json | 175 + .../server/node_modules/extend/.npmignore | 1 + .../server/node_modules/extend/.travis.yml | 179 + .../server/node_modules/extend/CHANGELOG.md | 77 + .../server/node_modules/extend/LICENSE | 23 + .../server/node_modules/extend/README.md | 81 + .../server/node_modules/extend/component.json | 32 + .../server/node_modules/extend/index.js | 86 + .../server/node_modules/extend/package.json | 114 + .../node_modules/extsprintf/.gitmodules | 0 .../server/node_modules/extsprintf/.npmignore | 2 + .../server/node_modules/extsprintf/LICENSE | 19 + .../server/node_modules/extsprintf/Makefile | 24 + .../node_modules/extsprintf/Makefile.targ | 285 + .../server/node_modules/extsprintf/README.md | 46 + .../node_modules/extsprintf/jsl.node.conf | 137 + .../node_modules/extsprintf/lib/extsprintf.js | 183 + .../node_modules/extsprintf/package.json | 78 + .../server/node_modules/eyes/LICENSE | 20 + .../server/node_modules/eyes/Makefile | 4 + .../server/node_modules/eyes/README.md | 73 + .../server/node_modules/eyes/lib/eyes.js | 236 + .../server/node_modules/eyes/package.json | 95 + .../node_modules/eyes/test/eyes-test.js | 56 + .../fast-deep-equal/.eslintrc.yml | 25 + .../node_modules/fast-deep-equal/.npmignore | 60 + .../node_modules/fast-deep-equal/.travis.yml | 8 + .../node_modules/fast-deep-equal/LICENSE | 21 + .../node_modules/fast-deep-equal/README.md | 55 + .../fast-deep-equal/benchmark/.eslintrc.yml | 5 + .../fast-deep-equal/benchmark/index.js | 56 + .../node_modules/fast-deep-equal/index.js | 43 + .../node_modules/fast-deep-equal/package.json | 114 + .../fast-deep-equal/spec/.eslintrc.yml | 5 + .../fast-deep-equal/spec/index.spec.js | 18 + .../fast-deep-equal/spec/tests.js | 320 + .../fast-json-stable-stringify/.eslintrc.yml | 26 + .../fast-json-stable-stringify/.npmignore | 4 + .../fast-json-stable-stringify/.travis.yml | 8 + .../fast-json-stable-stringify/LICENSE | 18 + .../fast-json-stable-stringify/README.md | 119 + .../benchmark/index.js | 31 + .../benchmark/test.json | 137 + .../example/key_cmp.js | 7 + .../example/nested.js | 3 + .../fast-json-stable-stringify/example/str.js | 3 + .../example/value_cmp.js | 7 + .../fast-json-stable-stringify/index.js | 59 + .../fast-json-stable-stringify/package.json | 114 + .../fast-json-stable-stringify/test/cmp.js | 13 + .../fast-json-stable-stringify/test/nested.js | 44 + .../fast-json-stable-stringify/test/str.js | 46 + .../test/to-json.js | 22 + .../server/node_modules/forever-agent/LICENSE | 55 + .../node_modules/forever-agent/README.md | 4 + .../node_modules/forever-agent/index.js | 138 + .../node_modules/forever-agent/package.json | 88 + .../server/node_modules/form-data/License | 19 + .../server/node_modules/form-data/README.md | 234 + .../node_modules/form-data/README.md.bak | 234 + .../node_modules/form-data/lib/browser.js | 2 + .../node_modules/form-data/lib/form_data.js | 457 + .../node_modules/form-data/lib/populate.js | 10 + .../node_modules/form-data/package.json | 145 + .../server/node_modules/getpass/.npmignore | 8 + .../server/node_modules/getpass/.travis.yml | 9 + .../server/node_modules/getpass/LICENSE | 18 + .../server/node_modules/getpass/README.md | 32 + .../server/node_modules/getpass/lib/index.js | 123 + .../server/node_modules/getpass/package.json | 86 + .../server/node_modules/har-schema/LICENSE | 13 + .../server/node_modules/har-schema/README.md | 49 + .../har-schema/lib/afterRequest.json | 30 + .../har-schema/lib/beforeRequest.json | 30 + .../node_modules/har-schema/lib/browser.json | 20 + .../node_modules/har-schema/lib/cache.json | 21 + .../node_modules/har-schema/lib/content.json | 29 + .../node_modules/har-schema/lib/cookie.json | 36 + .../node_modules/har-schema/lib/creator.json | 20 + .../node_modules/har-schema/lib/entry.json | 53 + .../node_modules/har-schema/lib/har.json | 13 + .../node_modules/har-schema/lib/header.json | 20 + .../node_modules/har-schema/lib/index.js | 22 + .../node_modules/har-schema/lib/log.json | 36 + .../node_modules/har-schema/lib/page.json | 32 + .../har-schema/lib/pageTimings.json | 18 + .../node_modules/har-schema/lib/postData.json | 43 + .../node_modules/har-schema/lib/query.json | 20 + .../node_modules/har-schema/lib/request.json | 57 + .../node_modules/har-schema/lib/response.json | 54 + .../node_modules/har-schema/lib/timings.json | 42 + .../node_modules/har-schema/package.json | 122 + .../server/node_modules/har-validator/LICENSE | 13 + .../node_modules/har-validator/README.md | 54 + .../node_modules/har-validator/lib/async.js | 98 + .../node_modules/har-validator/lib/error.js | 17 + .../node_modules/har-validator/lib/promise.js | 95 + .../node_modules/har-validator/package.json | 110 + .../server/node_modules/hawk/.npmignore | 5 + .../server/node_modules/hawk/LICENSE | 28 + .../server/node_modules/hawk/README.md | 637 ++ .../server/node_modules/hawk/client.js | 3 + .../server/node_modules/hawk/dist/browser.js | 793 ++ .../server/node_modules/hawk/lib/browser.js | 653 ++ .../server/node_modules/hawk/lib/client.js | 394 + .../server/node_modules/hawk/lib/crypto.js | 128 + .../server/node_modules/hawk/lib/index.js | 17 + .../server/node_modules/hawk/lib/server.js | 550 ++ .../server/node_modules/hawk/lib/utils.js | 186 + .../server/node_modules/hawk/package.json | 114 + .../server/node_modules/hoek/.npmignore | 3 + .../server/node_modules/hoek/LICENSE | 32 + .../server/node_modules/hoek/README.md | 30 + .../server/node_modules/hoek/lib/escape.js | 168 + .../server/node_modules/hoek/lib/index.js | 974 +++ .../server/node_modules/hoek/package.json | 106 + .../http-signature/.dir-locals.el | 6 + .../node_modules/http-signature/.npmignore | 7 + .../node_modules/http-signature/CHANGES.md | 46 + .../node_modules/http-signature/LICENSE | 18 + .../node_modules/http-signature/README.md | 79 + .../http-signature/http_signing.md | 363 + .../node_modules/http-signature/lib/index.js | 29 + .../node_modules/http-signature/lib/parser.js | 315 + .../node_modules/http-signature/lib/signer.js | 401 + .../node_modules/http-signature/lib/utils.js | 112 + .../node_modules/http-signature/lib/verify.js | 88 + .../node_modules/http-signature/package.json | 120 + .../node_modules/is-typedarray/LICENSE.md | 18 + .../node_modules/is-typedarray/README.md | 16 + .../node_modules/is-typedarray/index.js | 41 + .../node_modules/is-typedarray/package.json | 90 + .../server/node_modules/is-typedarray/test.js | 34 + .../server/node_modules/isstream/.jshintrc | 59 + .../server/node_modules/isstream/.npmignore | 1 + .../server/node_modules/isstream/.travis.yml | 12 + .../server/node_modules/isstream/LICENSE.md | 11 + .../server/node_modules/isstream/README.md | 66 + .../server/node_modules/isstream/isstream.js | 27 + .../server/node_modules/isstream/package.json | 94 + .../server/node_modules/isstream/test.js | 168 + .../server/node_modules/jsbn/.npmignore | 2 + .../server/node_modules/jsbn/LICENSE | 40 + .../server/node_modules/jsbn/README.md | 175 + .../server/node_modules/jsbn/example.html | 12 + .../server/node_modules/jsbn/example.js | 3 + .../server/node_modules/jsbn/index.js | 1357 +++ .../server/node_modules/jsbn/package.json | 90 + .../json-schema-traverse/.eslintrc.yml | 27 + .../json-schema-traverse/.npmignore | 60 + .../json-schema-traverse/.travis.yml | 8 + .../node_modules/json-schema-traverse/LICENSE | 21 + .../json-schema-traverse/README.md | 69 + .../json-schema-traverse/index.js | 81 + .../json-schema-traverse/package.json | 106 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 102 + .../server/node_modules/json-schema/README.md | 5 + .../json-schema/draft-00/hyper-schema | 68 + .../json-schema/draft-00/json-ref | 26 + .../node_modules/json-schema/draft-00/links | 33 + .../node_modules/json-schema/draft-00/schema | 155 + .../json-schema/draft-01/hyper-schema | 68 + .../json-schema/draft-01/json-ref | 26 + .../node_modules/json-schema/draft-01/links | 33 + .../node_modules/json-schema/draft-01/schema | 155 + .../json-schema/draft-02/hyper-schema | 68 + .../json-schema/draft-02/json-ref | 26 + .../node_modules/json-schema/draft-02/links | 35 + .../node_modules/json-schema/draft-02/schema | 166 + .../json-schema/draft-03/examples/address | 20 + .../json-schema/draft-03/examples/calendar | 53 + .../json-schema/draft-03/examples/card | 105 + .../json-schema/draft-03/examples/geo | 8 + .../json-schema/draft-03/examples/interfaces | 23 + .../json-schema/draft-03/hyper-schema | 60 + .../json-schema/draft-03/json-ref | 26 + .../node_modules/json-schema/draft-03/links | 35 + .../node_modules/json-schema/draft-03/schema | 174 + .../json-schema/draft-04/hyper-schema | 60 + .../node_modules/json-schema/draft-04/links | 41 + .../node_modules/json-schema/draft-04/schema | 189 + .../json-schema/draft-zyp-json-schema-03.xml | 1120 +++ .../json-schema/draft-zyp-json-schema-04.xml | 1072 +++ .../node_modules/json-schema/lib/links.js | 66 + .../node_modules/json-schema/lib/validate.js | 273 + .../node_modules/json-schema/package.json | 100 + .../node_modules/json-schema/test/tests.js | 95 + .../json-stringify-safe/.npmignore | 1 + .../json-stringify-safe/CHANGELOG.md | 14 + .../node_modules/json-stringify-safe/LICENSE | 15 + .../node_modules/json-stringify-safe/Makefile | 35 + .../json-stringify-safe/README.md | 52 + .../json-stringify-safe/package.json | 102 + .../json-stringify-safe/stringify.js | 27 + .../json-stringify-safe/test/mocha.opts | 2 + .../test/stringify_test.js | 246 + .../server/node_modules/jsprim/CHANGES.md | 49 + .../node_modules/jsprim/CONTRIBUTING.md | 19 + .../server/node_modules/jsprim/LICENSE | 19 + .../server/node_modules/jsprim/README.md | 287 + .../server/node_modules/jsprim/lib/jsprim.js | 735 ++ .../server/node_modules/jsprim/package.json | 86 + .../server/node_modules/mime-db/HISTORY.md | 343 + .../server/node_modules/mime-db/LICENSE | 22 + .../server/node_modules/mime-db/README.md | 94 + .../server/node_modules/mime-db/db.json | 6966 ++++++++++++++++ .../server/node_modules/mime-db/index.js | 11 + .../server/node_modules/mime-db/package.json | 140 + .../server/node_modules/mime-types/HISTORY.md | 247 + .../server/node_modules/mime-types/LICENSE | 23 + .../server/node_modules/mime-types/README.md | 108 + .../server/node_modules/mime-types/index.js | 188 + .../node_modules/mime-types/package.json | 130 + .../server/node_modules/oauth-sign/LICENSE | 55 + .../server/node_modules/oauth-sign/README.md | 4 + .../server/node_modules/oauth-sign/index.js | 136 + .../node_modules/oauth-sign/package.json | 98 + .../node_modules/parser-toolkit/.npmignore | 5 + .../node_modules/parser-toolkit/.travis.yml | 8 + .../node_modules/parser-toolkit/AUTHORS | 1 + .../node_modules/parser-toolkit/LICENSE | 34 + .../node_modules/parser-toolkit/README.md | 71 + .../node_modules/parser-toolkit/Scanner.js | 97 + .../node_modules/parser-toolkit/ScannerRE2.js | 114 + .../parser-toolkit/bottomUp/Grammar.js | 106 + .../parser-toolkit/bottomUp/Parser.js | 95 + .../parser-toolkit/bottomUp/Parser2.js | 82 + .../node_modules/parser-toolkit/bower.json | 11 + .../node_modules/parser-toolkit/package.json | 96 + .../node_modules/parser-toolkit/tests/csv.js | 20 + .../node_modules/parser-toolkit/tests/expr.js | 146 + .../parser-toolkit/tests/expr2.js | 109 + .../node_modules/parser-toolkit/tests/json.js | 33 + .../parser-toolkit/tests/perf_lexer.js | 177 + .../parser-toolkit/tests/perf_regex.js | 117 + .../parser-toolkit/tests/printGrammar.js | 74 + .../parser-toolkit/tests/sample.json | 3315 ++++++++ .../parser-toolkit/tests/sample.json.gz | Bin 0 -> 153726 bytes .../parser-toolkit/tests/test_csv.js | 31 + .../parser-toolkit/tests/test_expr.js | 33 + .../parser-toolkit/tests/test_expr2.js | 33 + .../parser-toolkit/tests/test_json.js | 41 + .../parser-toolkit/tests/test_jsons.js | 43 + .../parser-toolkit/tests/test_jsonsc.js | 57 + .../parser-toolkit/tests/test_jsonsc_re2.js | 60 + .../parser-toolkit/topDown/Grammar.js | 192 + .../parser-toolkit/topDown/Parser.js | 72 + .../node_modules/performance-now/.npmignore | 1 + .../performance-now/.tm_properties | 7 + .../node_modules/performance-now/.travis.yml | 6 + .../node_modules/performance-now/README.md | 30 + .../performance-now/lib/performance-now.js | 36 + .../lib/performance-now.js.map | 10 + .../node_modules/performance-now/license.txt | 7 + .../node_modules/performance-now/package.json | 99 + .../performance-now/src/index.d.ts | 8 + .../src/performance-now.coffee | 17 + .../performance-now/test/mocha.opts | 3 + .../test/performance-now.coffee | 43 + .../performance-now/test/scripts.coffee | 27 + .../test/scripts/delayed-call.coffee | 11 + .../test/scripts/delayed-require.coffee | 12 + .../test/scripts/difference.coffee | 6 + .../test/scripts/initial-value.coffee | 10 + .../node_modules/punycode/LICENSE-MIT.txt | 20 + .../server/node_modules/punycode/README.md | 176 + .../server/node_modules/punycode/package.json | 127 + .../server/node_modules/punycode/punycode.js | 533 ++ .../server/node_modules/qs/.editorconfig | 30 + .../server/node_modules/qs/.eslintignore | 1 + .../server/node_modules/qs/.eslintrc | 19 + .../server/node_modules/qs/CHANGELOG.md | 221 + .../server/node_modules/qs/LICENSE | 28 + .../server/node_modules/qs/README.md | 475 ++ .../server/node_modules/qs/dist/qs.js | 627 ++ .../server/node_modules/qs/lib/formats.js | 18 + .../server/node_modules/qs/lib/index.js | 11 + .../server/node_modules/qs/lib/parse.js | 174 + .../server/node_modules/qs/lib/stringify.js | 210 + .../server/node_modules/qs/lib/utils.js | 202 + .../server/node_modules/qs/package.json | 123 + .../server/node_modules/qs/test/.eslintrc | 15 + .../server/node_modules/qs/test/index.js | 7 + .../server/node_modules/qs/test/parse.js | 573 ++ .../server/node_modules/qs/test/stringify.js | 596 ++ .../server/node_modules/qs/test/utils.js | 34 + .../server/node_modules/request/CHANGELOG.md | 674 ++ .../server/node_modules/request/LICENSE | 55 + .../server/node_modules/request/README.md | 1097 +++ .../server/node_modules/request/index.js | 155 + .../server/node_modules/request/lib/auth.js | 167 + .../node_modules/request/lib/cookies.js | 38 + .../request/lib/getProxyFromURI.js | 79 + .../server/node_modules/request/lib/har.js | 205 + .../node_modules/request/lib/helpers.js | 66 + .../node_modules/request/lib/multipart.js | 112 + .../server/node_modules/request/lib/oauth.js | 148 + .../node_modules/request/lib/querystring.js | 50 + .../node_modules/request/lib/redirect.js | 154 + .../server/node_modules/request/lib/tunnel.js | 175 + .../server/node_modules/request/package.json | 165 + .../server/node_modules/request/request.js | 1552 ++++ .../node_modules/safe-buffer/.travis.yml | 7 + .../server/node_modules/safe-buffer/LICENSE | 21 + .../server/node_modules/safe-buffer/README.md | 584 ++ .../server/node_modules/safe-buffer/index.js | 62 + .../node_modules/safe-buffer/package.json | 104 + .../server/node_modules/safe-buffer/test.js | 101 + .../server/node_modules/sax/LICENSE | 41 + .../server/node_modules/sax/README.md | 225 + .../server/node_modules/sax/lib/sax.js | 1565 ++++ .../server/node_modules/sax/package.json | 136 + .../server/node_modules/sntp/.npmignore | 3 + .../server/node_modules/sntp/LICENSE | 28 + .../server/node_modules/sntp/README.md | 68 + .../server/node_modules/sntp/lib/index.js | 412 + .../server/node_modules/sntp/package.json | 100 + .../server/node_modules/sshpk/.npmignore | 9 + .../server/node_modules/sshpk/.travis.yml | 11 + .../server/node_modules/sshpk/LICENSE | 18 + .../server/node_modules/sshpk/README.md | 698 ++ .../server/node_modules/sshpk/bin/sshpk-conv | 201 + .../server/node_modules/sshpk/bin/sshpk-sign | 191 + .../node_modules/sshpk/bin/sshpk-verify | 166 + .../server/node_modules/sshpk/lib/algs.js | 168 + .../node_modules/sshpk/lib/certificate.js | 377 + .../server/node_modules/sshpk/lib/dhe.js | 411 + .../node_modules/sshpk/lib/ed-compat.js | 96 + .../server/node_modules/sshpk/lib/errors.js | 84 + .../node_modules/sshpk/lib/fingerprint.js | 161 + .../node_modules/sshpk/lib/formats/auto.js | 73 + .../sshpk/lib/formats/openssh-cert.js | 322 + .../node_modules/sshpk/lib/formats/pem.js | 186 + .../node_modules/sshpk/lib/formats/pkcs1.js | 320 + .../node_modules/sshpk/lib/formats/pkcs8.js | 505 ++ .../node_modules/sshpk/lib/formats/rfc4253.js | 146 + .../sshpk/lib/formats/ssh-private.js | 261 + .../node_modules/sshpk/lib/formats/ssh.js | 114 + .../sshpk/lib/formats/x509-pem.js | 77 + .../node_modules/sshpk/lib/formats/x509.js | 726 ++ .../server/node_modules/sshpk/lib/identity.js | 277 + .../server/node_modules/sshpk/lib/index.js | 39 + .../server/node_modules/sshpk/lib/key.js | 274 + .../node_modules/sshpk/lib/private-key.js | 254 + .../node_modules/sshpk/lib/signature.js | 313 + .../node_modules/sshpk/lib/ssh-buffer.js | 148 + .../server/node_modules/sshpk/lib/utils.js | 288 + .../node_modules/sshpk/man/man1/sshpk-conv.1 | 135 + .../node_modules/sshpk/man/man1/sshpk-sign.1 | 81 + .../sshpk/man/man1/sshpk-verify.1 | 68 + .../server/node_modules/sshpk/package.json | 133 + .../node_modules/stack-trace/.npmignore | 1 + .../server/node_modules/stack-trace/License | 19 + .../server/node_modules/stack-trace/Makefile | 11 + .../server/node_modules/stack-trace/Readme.md | 98 + .../stack-trace/lib/stack-trace.js | 136 + .../node_modules/stack-trace/package.json | 101 + .../node_modules/stream-json/.editorconfig | 13 + .../node_modules/stream-json/.npmignore | 5 + .../node_modules/stream-json/.travis.yml | 10 + .../server/node_modules/stream-json/AUTHORS | 1 + .../node_modules/stream-json/AltParser.js | 675 ++ .../node_modules/stream-json/ClassicParser.js | 72 + .../server/node_modules/stream-json/Combo.js | 492 ++ .../node_modules/stream-json/Emitter.js | 20 + .../server/node_modules/stream-json/Filter.js | 159 + .../node_modules/stream-json/Grammar.js | 33 + .../server/node_modules/stream-json/LICENSE | 34 + .../server/node_modules/stream-json/Packer.js | 70 + .../server/node_modules/stream-json/Parser.js | 431 + .../server/node_modules/stream-json/README.md | 649 ++ .../server/node_modules/stream-json/Source.js | 38 + .../node_modules/stream-json/Streamer.js | 131 + .../server/node_modules/stream-json/main.js | 17 + .../node_modules/stream-json/package.json | 113 + .../node_modules/stream-json/tests/Counter.js | 49 + .../stream-json/tests/ReadString.js | 24 + .../stream-json/tests/manual/StreamPrinter.js | 21 + .../stream-json/tests/manual/TokenPrinter.js | 17 + .../stream-json/tests/manual/test_chunk.js | 42 + .../stream-json/tests/manual/test_escaped.js | 81 + .../stream-json/tests/manual/test_filter.js | 18 + .../stream-json/tests/manual/test_main.js | 32 + .../stream-json/tests/manual/test_packer.js | 18 + .../stream-json/tests/manual/test_parser.js | 14 + .../stream-json/tests/manual/test_plain.js | 63 + .../stream-json/tests/manual/test_source.js | 34 + .../stream-json/tests/manual/test_streamer.js | 16 + .../stream-json/tests/sample.json.gz | Bin 0 -> 53141 bytes .../stream-json/tests/test_alternative.js | 54 + .../stream-json/tests/test_array.js | 47 + .../stream-json/tests/test_assembler.js | 41 + .../stream-json/tests/test_classic.js | 54 + .../stream-json/tests/test_combo.js | 292 + .../stream-json/tests/test_emitter.js | 55 + .../stream-json/tests/test_escaped.js | 36 + .../stream-json/tests/test_filter.js | 45 + .../stream-json/tests/test_filter_objects.js | 72 + .../stream-json/tests/test_filtered_array.js | 118 + .../stream-json/tests/test_object.js | 59 + .../stream-json/tests/test_packer.js | 54 + .../stream-json/tests/test_parser.js | 49 + .../stream-json/tests/test_primitives.js | 66 + .../stream-json/tests/test_sliding.js | 73 + .../stream-json/tests/test_source.js | 47 + .../stream-json/tests/test_streamer.js | 47 + .../node_modules/stream-json/tests/tests.js | 25 + .../stream-json/utils/Assembler.js | 58 + .../stream-json/utils/FilterObjects.js | 38 + .../stream-json/utils/StreamArray.js | 58 + .../stream-json/utils/StreamFilteredArray.js | 128 + .../stream-json/utils/StreamObject.js | 65 + .../node_modules/stringstream/.npmignore | 15 + .../node_modules/stringstream/.travis.yml | 4 + .../node_modules/stringstream/LICENSE.txt | 22 + .../node_modules/stringstream/README.md | 38 + .../node_modules/stringstream/example.js | 27 + .../node_modules/stringstream/package.json | 85 + .../node_modules/stringstream/stringstream.js | 102 + .../server/node_modules/tough-cookie/LICENSE | 27 + .../node_modules/tough-cookie/README.md | 509 ++ .../node_modules/tough-cookie/lib/cookie.js | 1341 +++ .../node_modules/tough-cookie/lib/memstore.js | 170 + .../tough-cookie/lib/pathMatch.js | 61 + .../tough-cookie/lib/permuteDomain.js | 56 + .../tough-cookie/lib/pubsuffix.js | 98 + .../node_modules/tough-cookie/lib/store.js | 71 + .../node_modules/tough-cookie/package.json | 135 + .../server/node_modules/tunnel-agent/LICENSE | 55 + .../node_modules/tunnel-agent/README.md | 4 + .../server/node_modules/tunnel-agent/index.js | 244 + .../node_modules/tunnel-agent/package.json | 102 + .../server/node_modules/tweetnacl/.npmignore | 4 + .../server/node_modules/tweetnacl/AUTHORS.md | 28 + .../node_modules/tweetnacl/CHANGELOG.md | 221 + .../server/node_modules/tweetnacl/LICENSE | 24 + .../tweetnacl/PULL_REQUEST_TEMPLATE.md | 20 + .../server/node_modules/tweetnacl/README.md | 459 + .../node_modules/tweetnacl/nacl-fast.js | 2388 ++++++ .../node_modules/tweetnacl/nacl-fast.min.js | 2 + .../server/node_modules/tweetnacl/nacl.d.ts | 98 + .../server/node_modules/tweetnacl/nacl.js | 1175 +++ .../server/node_modules/tweetnacl/nacl.min.js | 1 + .../node_modules/tweetnacl/package.json | 121 + .../server/node_modules/uuid/.eslintrc.json | 47 + .../server/node_modules/uuid/AUTHORS | 5 + .../server/node_modules/uuid/CHANGELOG.md | 57 + .../server/node_modules/uuid/LICENSE.md | 21 + .../server/node_modules/uuid/README.md | 293 + .../server/node_modules/uuid/README_js.md | 280 + .../server/node_modules/uuid/bin/uuid | 65 + .../server/node_modules/uuid/index.js | 8 + .../node_modules/uuid/lib/bytesToUuid.js | 23 + .../node_modules/uuid/lib/md5-browser.js | 216 + .../server/node_modules/uuid/lib/md5.js | 25 + .../node_modules/uuid/lib/rng-browser.js | 32 + .../server/node_modules/uuid/lib/rng.js | 8 + .../node_modules/uuid/lib/sha1-browser.js | 89 + .../server/node_modules/uuid/lib/sha1.js | 25 + .../server/node_modules/uuid/lib/v35.js | 53 + .../server/node_modules/uuid/package.json | 131 + .../server/node_modules/uuid/v1.js | 109 + .../server/node_modules/uuid/v3.js | 4 + .../server/node_modules/uuid/v4.js | 29 + .../server/node_modules/uuid/v5.js | 3 + .../server/node_modules/verror/.npmignore | 9 + .../server/node_modules/verror/CHANGES.md | 28 + .../node_modules/verror/CONTRIBUTING.md | 19 + .../server/node_modules/verror/LICENSE | 19 + .../server/node_modules/verror/README.md | 528 ++ .../server/node_modules/verror/lib/verror.js | 451 + .../server/node_modules/verror/package.json | 85 + .../node_modules/vscode-jsonrpc/.npmignore | 9 + .../node_modules/vscode-jsonrpc/License.txt | 11 + .../node_modules/vscode-jsonrpc/README.md | 46 + .../vscode-jsonrpc/lib/cancellation.d.ts | 21 + .../vscode-jsonrpc/lib/cancellation.js | 89 + .../vscode-jsonrpc/lib/events.d.ts | 44 + .../node_modules/vscode-jsonrpc/lib/events.js | 180 + .../node_modules/vscode-jsonrpc/lib/is.d.ts | 10 + .../node_modules/vscode-jsonrpc/lib/is.js | 47 + .../node_modules/vscode-jsonrpc/lib/main.d.ts | 65 + .../node_modules/vscode-jsonrpc/lib/main.js | 499 ++ .../vscode-jsonrpc/lib/messageReader.d.ts | 49 + .../vscode-jsonrpc/lib/messageReader.js | 238 + .../vscode-jsonrpc/lib/messageWriter.d.ts | 31 + .../vscode-jsonrpc/lib/messageWriter.js | 108 + .../vscode-jsonrpc/lib/messages.d.ts | 115 + .../vscode-jsonrpc/lib/messages.js | 81 + .../node_modules/vscode-jsonrpc/package.json | 124 + .../vscode-jsonrpc/thirdpartynotices.txt | 31 + .../vscode-languageserver-types/.npmignore | 9 + .../vscode-languageserver-types/License.txt | 11 + .../vscode-languageserver-types/README.md | 10 + .../vscode-languageserver-types/lib/main.d.ts | 965 +++ .../vscode-languageserver-types/lib/main.js | 708 ++ .../vscode-languageserver-types/package.json | 113 + .../vscode-languageserver/.npmignore | 9 + .../vscode-languageserver/License.txt | 11 + .../vscode-languageserver/README.md | 10 + .../bin/installServerIntoExtension | 119 + .../vscode-languageserver/lib/files.d.ts | 10 + .../vscode-languageserver/lib/files.js | 220 + .../vscode-languageserver/lib/main.d.ts | 435 + .../vscode-languageserver/lib/main.js | 506 ++ .../vscode-languageserver/lib/protocol.d.ts | 758 ++ .../vscode-languageserver/lib/protocol.js | 347 + .../vscode-languageserver/lib/resolve.d.ts | 6 + .../vscode-languageserver/lib/resolve.js | 19 + .../vscode-languageserver/lib/utils/is.d.ts | 12 + .../vscode-languageserver/lib/utils/is.js | 54 + .../vscode-languageserver/package.json | 126 + .../thirdpartynotices.txt | 31 + .../server/node_modules/winston/CHANGELOG.md | 203 + .../server/node_modules/winston/LICENSE | 19 + .../server/node_modules/winston/README.md | 848 ++ .../node_modules/winston/lib/winston.js | 164 + .../winston/lib/winston/common.js | 495 ++ .../winston/lib/winston/config.js | 68 + .../winston/lib/winston/config/cli-config.js | 35 + .../winston/lib/winston/config/npm-config.js | 27 + .../lib/winston/config/syslog-config.js | 31 + .../winston/lib/winston/container.js | 128 + .../winston/lib/winston/exception.js | 56 + .../winston/lib/winston/logger.js | 729 ++ .../winston/lib/winston/transports.js | 36 + .../winston/lib/winston/transports/console.js | 130 + .../winston/lib/winston/transports/file.js | 684 ++ .../winston/lib/winston/transports/http.js | 240 + .../winston/lib/winston/transports/memory.js | 89 + .../lib/winston/transports/transport.js | 135 + .../server/node_modules/winston/package.json | 125 + .../node_modules/winston/test/helpers.js | 256 + .../winston/test/transports/console-test.js | 202 + .../test/transports/file-archive-test.js | 83 + .../test/transports/file-maxfiles-test.js | 102 + .../test/transports/file-maxsize-test.js | 82 + .../winston/test/transports/file-open-test.js | 57 + .../test/transports/file-stress-test.js | 72 + .../test/transports/file-tailrolling-test.js | 92 + .../winston/test/transports/file-test.js | 134 + .../winston/test/transports/http-test.js | 70 + .../winston/test/transports/memory-test.js | 31 + .../winston/test/transports/transport.js | 212 + .../server/node_modules/xml2object/.npmignore | 3 + .../server/node_modules/xml2object/LICENSE | 13 + .../node_modules/xml2object/lib/xml2object.js | 199 + .../node_modules/xml2object/package.json | 95 + .../server/node_modules/xml2object/readme.md | 153 + .../xml2object/test/cdata-test.js | 25 + .../xml2object/test/error-test.js | 24 + .../node_modules/xml2object/test/file-test.js | 47 + .../test/fixture/input01_simple.xml | 10 + .../test/fixture/input02_invalid.xml | 1 + .../xml2object/test/fixture/input03_CDATA.xml | 15 + .../test/fixture/input04_namespace.xml | 10 + .../xml2object/test/fixture/input101.xml | 0 .../xml2object/test/namespace-test.js | 55 + .../node_modules/xml2object/test/pipe-test.js | 27 + .../node_modules/xml2object/test/root-test.js | 25 + .../xml2object/test/stream-test.js | 75 + .../server/server.js | 282 + .../server/server.js.map | 1 + .../server/utils.js | 44 + .../server/utils.js.map | 1 + .../core/Fabric8AnalysisLSPCoreActivator.java | 70 + .../core/Fabric8AnalysisLSPPreferences.java | 29 + ...ric8AnalyticsStreamConnectionProvider.java | 33 +- .../.gitignore | 7 + .../META-INF/MANIFEST.MF | 20 + .../build.properties | 8 + .../plugin.properties | 0 .../plugin.xml | 16 + .../pom.xml | 13 + .../ui/Fabric8AnalysisLSPUIActivator.java} | 16 +- .../eclipse/lsp/ui/LSPService.java | 44 + .../eclipse/lsp/ui/LoginListener.java | 42 + .../.gitignore | 0 .../META-INF/MANIFEST.MF | 27 + .../build.properties | 1 - .../icons/osio-16x16.png | Bin .../plugin.properties | 3 + .../plugin.xml | 46 +- .../pom.xml | 13 + ...c8analytics.eclipse.ui.login.listener.exsd | 102 + ...alytics.eclipse.ui.service.preference.exsd | 85 + .../ui/Fabric8AnalysisUIActivator.java | 119 + .../eclipse/ui/OSIOLoginListener.java | 7 + .../eclipse/ui/OSIOService.java | 11 + .../ui/ServiceEnablementException.java | 25 + .../ui/internal/AnalysesJobHandler.java | 26 +- .../ui/internal/MessageDialogUtils.java | 14 +- .../ui/internal/WorkspaceFilesFinder.java | 5 +- .../ui/internal/auth/AuthorizeHandler.java | 63 + .../auth}/GetAnalyticsAuthDataJob.java | 13 +- .../ui/internal/pom}/EditorComposite.java | 12 +- .../ui/internal/pom}/Fabric8FormPage.java | 2 +- .../pom}/Fabric8PomEditorFactory.java | 6 +- .../Fabric8AnalysisPreferencePage.java | 71 + .../ui/internal/view}/StackAnalysesView.java | 4 +- .../internal/view/StackAnalysisHandler.java} | 22 +- .../templates/index.html | 0 .../META-INF/MANIFEST.MF | 31 - .../lsp/eclipse/ui/AuthorizeHandler.java | 100 - .../ui/Fabric8AnalysisPreferencePage.java | 73 - plugins/pom.xml | 7 +- .../META-INF/MANIFEST.MF | 12 +- .../build.properties | 0 .../pom.xml | 3 +- .../tests/RecommenderAPIProviderTest.java | 10 +- .../core/tests/ThreeScaleAPIProviderTest.java | 8 +- .../META-INF/MANIFEST.MF | 23 + .../build.properties | 0 .../pom.xml | 3 +- .../resources/securepass | 0 ...AnalyticsStreamConnectionProviderTest.java | 24 +- ...lyticsStreamConnectionProviderWrapper.java | 6 +- .../META-INF/MANIFEST.MF | 14 +- .../build.properties | 4 + .../pom.xml | 60 + .../resources/securepass | 1 + .../ui/tests/WorkspaceFilesFinderTest.java | 4 +- .../META-INF/MANIFEST.MF | 6 +- tests/pom.xml | 5 +- 893 files changed, 123630 insertions(+), 428 deletions(-) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core => com.redhat.fabric8analytics.eclipse.core}/.gitignore (100%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core => com.redhat.fabric8analytics.eclipse.core}/META-INF/MANIFEST.MF (53%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core => com.redhat.fabric8analytics.eclipse.core}/build.properties (100%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.core/plugin.properties rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core => com.redhat.fabric8analytics.eclipse.core}/pom.xml (86%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisLSCoreActivator.java => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisCoreActivator.java} (83%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/Fabric8AnalysisPreferences.java (68%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api}/RecommenderAPIException.java (95%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api}/RecommenderAPIProvider.java (94%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api}/ThreeScaleAPIException.java (95%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api}/ThreeScaleAPIProvider.java (95%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/data/AnalyticsAuthData.java (95%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/data/ThreeScaleData.java (92%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/internal/AnalyticsAuthService.java (85%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/internal/PomContentBody.java (95%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/LoginToOSIOJob.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/job/RetrieveResultsJob.java (75%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics}/eclipse/core/job/SendToFabric8AnalysisJob.java (87%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/.gitignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/META-INF/MANIFEST.MF create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/build.properties rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.core => com.redhat.fabric8analytics.eclipse.lsp.core}/plugin.properties (100%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.xml rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.lsp.core}/pom.xml (85%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/VERSION create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js.map create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/installServerIntoExtension create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-conv create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-sign create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-verify create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/uuid create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/.tonic_example.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.bundle.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.min.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.min.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/nodent.min.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/regenerator.min.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/$data.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/ajv.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/ajv.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/cache.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/_rules.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/async.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/equal.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/error_classes.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/formats.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/resolve.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/rules.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/schema_obj.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/ucs2length.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/compile/util.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/_limit.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/_limitItems.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/_limitLength.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/_limitProperties.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/allOf.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/anyOf.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/coerce.def create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/const.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/contains.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/custom.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/defaults.def create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/definitions.def create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/dependencies.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/enum.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/errors.def create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/format.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/items.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/missing.def create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/multipleOf.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/not.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/oneOf.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/pattern.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/properties.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/propertyNames.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/ref.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/required.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/uniqueItems.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dot/validate.jst create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/_limit.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/_limitItems.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/_limitLength.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/_limitProperties.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/allOf.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/anyOf.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/const.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/contains.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/custom.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/dependencies.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/enum.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/format.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/items.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/multipleOf.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/not.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/oneOf.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/pattern.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/properties.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/propertyNames.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/ref.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/required.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/uniqueItems.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/dotjs/validate.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/keyword.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/patternGroups.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/refs/$data.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/refs/json-schema-draft-04.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/refs/json-schema-draft-06.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/lib/refs/json-schema-v5.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/bundle.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/compile-dots.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/info create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/prepare-tests create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/scripts/travis-gh-pages create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/ber/errors.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/ber/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/ber/reader.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/ber/types.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/ber/writer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/tst/ber/reader.test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asn1/tst/ber/writer.test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/assert-plus/AUTHORS create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/assert-plus/CHANGES.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/assert-plus/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/assert-plus/assert.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/assert-plus/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/.jshintrc create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/bower.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/component.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/lib/async.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/package.json create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/support/sync-package-managers.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/bench.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/abort.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/async.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/defer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/iterate.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/readable_asynckit.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/readable_parallel.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/readable_serial.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/readable_serial_ordered.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/state.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/streamify.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/lib/terminator.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/parallel.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/serial.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/serialOrdered.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/asynckit/stream.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws-sign2/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws-sign2/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws-sign2/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws-sign2/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/.tern-port create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/aws4.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/lru.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/aws4/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/bcrypt-pbkdf/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/bcrypt-pbkdf/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/bcrypt-pbkdf/package.json create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/boom/LICENSE create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/boom/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/boom/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/boom/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/caseless/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/caseless/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/caseless/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/caseless/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/caseless/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/co/History.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/co/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/co/Readme.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/co/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/co/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/MIT-LICENSE.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/ReadMe.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/examples/normal-usage.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/examples/safe-string.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/colors.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/custom/trap.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/custom/zalgo.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/extendStringPrototype.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/maps/america.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/maps/rainbow.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/maps/random.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/maps/zebra.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/styles.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/lib/system/supports-colors.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/safe.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/screenshots/colors.png create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/tests/basic-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/tests/safe-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/colors/themes/generic-logging.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/combined-stream/License create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/combined-stream/Readme.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/combined-stream/lib/combined_stream.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/combined-stream/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/float.patch create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/lib/util.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/core-util-is/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/.npmignore create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/LICENSE create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/lib/index.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/node_modules/boom/LICENSE create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/node_modules/boom/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/node_modules/boom/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/node_modules/boom/package.json create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cryptiles/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cycle/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cycle/cycle.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/cycle/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/CHANGES.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/LICENSE.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/etc/dashdash.bash_completion.in create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/lib/dashdash.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/dashdash/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/License create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/Makefile create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/Readme.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/lib/delayed_stream.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/delayed-stream/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/lib/LICENSE-jsbn create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/lib/ec.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/lib/sec.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ecc-jsbn/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/.eslintrc create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/.jscs.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/component.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extend/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/.gitmodules create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/Makefile create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/Makefile.targ create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/jsl.node.conf create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/lib/extsprintf.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/extsprintf/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/Makefile create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/lib/eyes.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/eyes/test/eyes-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/benchmark/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/benchmark/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/spec/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/spec/index.spec.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-deep-equal/spec/tests.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/benchmark/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/benchmark/test.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/example/key_cmp.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/example/nested.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/example/str.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/example/value_cmp.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/test/cmp.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/test/nested.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/test/str.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/fast-json-stable-stringify/test/to-json.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/forever-agent/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/forever-agent/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/forever-agent/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/forever-agent/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/License create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/README.md.bak create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/lib/browser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/lib/form_data.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/lib/populate.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/form-data/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/getpass/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/afterRequest.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/beforeRequest.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/browser.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/cache.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/content.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/cookie.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/creator.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/entry.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/har.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/header.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/log.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/page.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/pageTimings.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/postData.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/query.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/request.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/response.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/lib/timings.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-schema/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/lib/async.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/lib/error.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/lib/promise.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/har-validator/package.json create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/.npmignore create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/LICENSE create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/client.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/dist/browser.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/browser.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/client.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/crypto.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/index.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/server.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/lib/utils.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hawk/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/lib/escape.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/hoek/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/.dir-locals.el create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/CHANGES.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/http_signing.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/lib/parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/lib/signer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/lib/utils.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/lib/verify.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/http-signature/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/is-typedarray/LICENSE.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/is-typedarray/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/is-typedarray/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/is-typedarray/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/is-typedarray/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/.jshintrc create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/LICENSE.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/isstream.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/isstream/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/example.html create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/example.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/index.spec.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/hyper-schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/json-ref create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/links create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/hyper-schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/json-ref create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/links create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/hyper-schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/json-ref create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/links create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/address create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/calendar create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/card create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/geo create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/interfaces create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/hyper-schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/json-ref create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/links create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/hyper-schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/links create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/schema create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-03.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-04.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/links.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/validate.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/test/tests.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/Makefile create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/stringify.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/mocha.opts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/stringify_test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CHANGES.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CONTRIBUTING.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/lib/jsprim.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/HISTORY.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/db.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/HISTORY.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/AUTHORS create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/Scanner.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/ScannerRE2.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Grammar.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser2.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bower.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/csv.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr2.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/json.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_lexer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_regex.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/printGrammar.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json.gz create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_csv.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_expr.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_expr2.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_json.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsons.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc_re2.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Grammar.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.tm_properties create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/license.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/index.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/performance-now.coffee create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/mocha.opts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/performance-now.coffee create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts.coffee create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-call.coffee create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-require.coffee create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/difference.coffee create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/LICENSE-MIT.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/punycode.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.editorconfig create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintrc create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/dist/qs.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/formats.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/parse.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/stringify.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/utils.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/.eslintrc create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/parse.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/stringify.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/utils.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/auth.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/cookies.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/getProxyFromURI.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/har.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/helpers.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/multipart.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/oauth.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/querystring.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/redirect.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/tunnel.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/request.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/lib/sax.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/package.json create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sntp/.npmignore create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sntp/LICENSE create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sntp/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sntp/lib/index.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sntp/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/bin/sshpk-conv create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/bin/sshpk-sign create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/bin/sshpk-verify create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/algs.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/certificate.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/dhe.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/ed-compat.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/errors.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/fingerprint.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/auto.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/openssh-cert.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/pem.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/pkcs1.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/pkcs8.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/rfc4253.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/ssh-private.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/ssh.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/x509-pem.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/formats/x509.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/identity.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/key.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/private-key.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/signature.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/ssh-buffer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/lib/utils.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/man/man1/sshpk-conv.1 create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/man/man1/sshpk-sign.1 create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/man/man1/sshpk-verify.1 create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sshpk/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/License create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/Makefile create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/Readme.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/lib/stack-trace.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stack-trace/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/.editorconfig create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/AUTHORS create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/AltParser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/ClassicParser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Combo.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Emitter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Filter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Grammar.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Packer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Source.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/Streamer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/main.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/Counter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/ReadString.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/StreamPrinter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/TokenPrinter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_chunk.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_escaped.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_filter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_main.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_packer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_plain.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_source.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/manual/test_streamer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/sample.json.gz create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_alternative.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_array.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_assembler.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_classic.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_combo.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_emitter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_escaped.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_filter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_filter_objects.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_filtered_array.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_object.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_packer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_parser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_primitives.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_sliding.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_source.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/test_streamer.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/tests/tests.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/utils/Assembler.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/utils/FilterObjects.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/utils/StreamArray.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/utils/StreamFilteredArray.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stream-json/utils/StreamObject.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/.travis.yml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/LICENSE.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/example.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/stringstream/stringstream.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/cookie.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/memstore.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/pathMatch.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/permuteDomain.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/pubsuffix.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/lib/store.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tough-cookie/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tunnel-agent/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tunnel-agent/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tunnel-agent/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tunnel-agent/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/AUTHORS.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.min.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.min.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/.eslintrc.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/AUTHORS create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/LICENSE.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README_js.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/bin/uuid create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/index.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/bytesToUuid.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5-browser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng-browser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1-browser.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/v35.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v1.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v3.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v4.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v5.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CHANGES.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CONTRIBUTING.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/lib/verror.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/License.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/thirdpartynotices.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/License.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/License.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/README.md create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/bin/installServerIntoExtension create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.d.ts create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/thirdpartynotices.txt create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/CHANGELOG.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/README.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/common.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/cli-config.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/npm-config.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/syslog-config.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/container.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/exception.js create mode 100755 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/logger.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/console.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/file.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/http.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/memory.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/transport.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/helpers.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/console-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-archive-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxfiles-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxsize-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-open-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-stress-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-tailrolling-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/http-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/memory-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/transport.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/.npmignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/LICENSE create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/lib/xml2object.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/package.json create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/readme.md create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/cdata-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/error-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/file-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input01_simple.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input02_invalid.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input03_CDATA.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input04_namespace.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input101.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/namespace-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/pipe-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/root-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/stream-test.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js.map create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPCoreActivator.java create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPPreferences.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core}/Fabric8AnalyticsStreamConnectionProvider.java (82%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/.gitignore create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/META-INF/MANIFEST.MF create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/build.properties rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.lsp.ui}/plugin.properties (100%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/pom.xml rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisLSUIActivator.java => com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/Fabric8AnalysisLSPUIActivator.java} (82%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LSPService.java create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LoginListener.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.ui}/.gitignore (100%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/META-INF/MANIFEST.MF rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.ui}/build.properties (91%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.ui}/icons/osio-16x16.png (100%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.properties rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.ui}/plugin.xml (62%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/pom.xml create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.login.listener.exsd create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.service.preference.exsd create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/Fabric8AnalysisUIActivator.java create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOLoginListener.java create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOService.java create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/ServiceEnablementException.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics}/eclipse/ui/internal/AnalysesJobHandler.java (76%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics}/eclipse/ui/internal/MessageDialogUtils.java (79%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics}/eclipse/ui/internal/WorkspaceFilesFinder.java (97%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/AuthorizeHandler.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth}/GetAnalyticsAuthDataJob.java (77%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom}/EditorComposite.java (89%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom}/Fabric8FormPage.java (97%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom}/Fabric8PomEditorFactory.java (78%) create mode 100644 plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/preferences/Fabric8AnalysisPreferencePage.java rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view}/StackAnalysesView.java (94%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/ExitHandler.java => com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysisHandler.java} (80%) rename plugins/{com.redhat.fabric8analytics.lsp.eclipse.ui => com.redhat.fabric8analytics.eclipse.ui}/templates/index.html (100%) delete mode 100644 plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/META-INF/MANIFEST.MF delete mode 100644 plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/AuthorizeHandler.java delete mode 100644 plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisPreferencePage.java rename tests/{com.redhat.fabric8analytics.lsp.eclipse.core.tests => com.redhat.fabric8analytics.eclipse.core.tests}/META-INF/MANIFEST.MF (61%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.core.tests => com.redhat.fabric8analytics.eclipse.core.tests}/build.properties (100%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.core.tests => com.redhat.fabric8analytics.eclipse.core.tests}/pom.xml (89%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics}/eclipse/core/tests/RecommenderAPIProviderTest.java (97%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics}/eclipse/core/tests/ThreeScaleAPIProviderTest.java (95%) create mode 100644 tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/META-INF/MANIFEST.MF rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests => com.redhat.fabric8analytics.eclipse.lsp.core.tests}/build.properties (100%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests => com.redhat.fabric8analytics.eclipse.lsp.core.tests}/pom.xml (92%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests => com.redhat.fabric8analytics.eclipse.lsp.core.tests}/resources/securepass (100%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core}/tests/Fabric8AnalyticsStreamConnectionProviderTest.java (83%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui => com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core}/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java (81%) rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests => com.redhat.fabric8analytics.eclipse.ui.tests}/META-INF/MANIFEST.MF (55%) create mode 100644 tests/com.redhat.fabric8analytics.eclipse.ui.tests/build.properties create mode 100644 tests/com.redhat.fabric8analytics.eclipse.ui.tests/pom.xml create mode 100644 tests/com.redhat.fabric8analytics.eclipse.ui.tests/resources/securepass rename tests/{com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp => com.redhat.fabric8analytics.eclipse.ui.tests/src/com/redhat/fabric8analytics}/eclipse/ui/tests/WorkspaceFilesFinderTest.java (98%) diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/.gitignore b/plugins/com.redhat.fabric8analytics.eclipse.core/.gitignore similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/.gitignore rename to plugins/com.redhat.fabric8analytics.eclipse.core/.gitignore diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/META-INF/MANIFEST.MF b/plugins/com.redhat.fabric8analytics.eclipse.core/META-INF/MANIFEST.MF similarity index 53% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/META-INF/MANIFEST.MF rename to plugins/com.redhat.fabric8analytics.eclipse.core/META-INF/MANIFEST.MF index 61abbcb..b6e10e6 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/META-INF/MANIFEST.MF +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/META-INF/MANIFEST.MF @@ -1,13 +1,12 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name -Bundle-SymbolicName: com.redhat.fabric8analytics.lsp.eclipse.core;singleton:=true +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.core;singleton:=true Bundle-Version: 0.0.1.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.lsp4e;bundle-version="0.3.0", - org.eclipse.core.runtime, +Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources;bundle-version="3.12.0", org.apache.httpcomponents.httpclient;bundle-version="4.5.2", org.apache.httpcomponents.httpcore;bundle-version="4.4.6", @@ -18,13 +17,13 @@ Require-Bundle: org.eclipse.lsp4e;bundle-version="0.3.0", org.eclipse.m2e.core, org.eclipse.m2e.maven.runtime, org.jboss.tools.openshift.io.core -Eclipse-BundleShape: dir -Bundle-Activator: com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator +Bundle-Activator: com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator Bundle-ActivationPolicy: lazy Bundle-ClassPath: . -Export-Package: com.redhat.fabric8analytics.lsp.eclipse.core, - com.redhat.fabric8analytics.lsp.eclipse.core.job, - com.redhat.fabric8analytics.lsp.eclipse.core.data, - com.redhat.fabric8analytics.lsp.eclipse.core.internal;x-friends:=com.redhat.fabric8analytics.lsp.eclipse.ui +Export-Package: com.redhat.fabric8analytics.eclipse.core, + com.redhat.fabric8analytics.eclipse.core.data, + com.redhat.fabric8analytics.eclipse.core.internal;x-friends:="com.redhat.fabric8analytics.eclipse.lsp.core, com.redhat.fabric8analytics.eclipse.ui, com.redhat.fabric8analytics.eclipse.lsp.ui", + com.redhat.fabric8analytics.eclipse.core.job, + com.redhat.fabric8analytics.eclipse.core.api diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/build.properties b/plugins/com.redhat.fabric8analytics.eclipse.core/build.properties similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/build.properties rename to plugins/com.redhat.fabric8analytics.eclipse.core/build.properties diff --git a/plugins/com.redhat.fabric8analytics.eclipse.core/plugin.properties b/plugins/com.redhat.fabric8analytics.eclipse.core/plugin.properties new file mode 100644 index 0000000..3a72a5e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/plugin.properties @@ -0,0 +1,2 @@ +Bundle-Name=Fabric8Analytics Core Plugin +Bundle-Vendor=JBoss by Red Hat \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/pom.xml b/plugins/com.redhat.fabric8analytics.eclipse.core/pom.xml similarity index 86% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/pom.xml rename to plugins/com.redhat.fabric8analytics.eclipse.core/pom.xml index 990d179..b223fb6 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/pom.xml +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/pom.xml @@ -6,7 +6,7 @@ 0.0.1-SNAPSHOT - com.redhat.fabric8analytics.lsp.eclipse.core + com.redhat.fabric8analytics.eclipse.core eclipse-plugin diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisLSCoreActivator.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisCoreActivator.java similarity index 83% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisLSCoreActivator.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisCoreActivator.java index da542d2..49080ba 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisLSCoreActivator.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisCoreActivator.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Plugin; @@ -19,17 +19,17 @@ /** * The activator class controls the plug-in life cycle */ -public class Fabric8AnalysisLSCoreActivator extends Plugin { +public class Fabric8AnalysisCoreActivator extends Plugin { - public static final String PLUGIN_ID = "com.redhat.fabric8analytics.lsp.eclipse.core"; + public static final String PLUGIN_ID = "com.redhat.fabric8analytics.eclipse.core"; // The shared instance - private static Fabric8AnalysisLSCoreActivator plugin; + private static Fabric8AnalysisCoreActivator plugin; /** * The constructor */ - public Fabric8AnalysisLSCoreActivator() { + public Fabric8AnalysisCoreActivator() { } @Override @@ -49,7 +49,7 @@ public void stop(BundleContext context) throws Exception { * * @return the shared instance */ - public static Fabric8AnalysisLSCoreActivator getDefault() { + public static Fabric8AnalysisCoreActivator getDefault() { return plugin; } diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisPreferences.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisPreferences.java similarity index 68% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisPreferences.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisPreferences.java index 34bac55..863be41 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/Fabric8AnalysisPreferences.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/Fabric8AnalysisPreferences.java @@ -8,18 +8,17 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.equinox.security.storage.ISecurePreferences; import org.eclipse.equinox.security.storage.SecurePreferencesFactory; import org.eclipse.equinox.security.storage.StorageException; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; public class Fabric8AnalysisPreferences { - public static final String LSP_SERVER_ENABLED = "fabric8AnalysisPreferences.LSP_ENABLED"; public static final String PROD_URL = "fabric8AnalysisPreferences.PROD_URL"; public static final String STAGE_URL = "fabric8AnalysisPreferences.STAGE_URL"; public static final String USER_KEY = "fabric8AnalysisPreferences.USER_KEY"; @@ -39,28 +38,20 @@ public static Fabric8AnalysisPreferences getInstance() { return instance; } - public boolean isLSPServerEnabled() { - return InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).getBoolean(LSP_SERVER_ENABLED, false); - } - - public void setLSPServerEnabled(boolean enabled) { - InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).putBoolean(LSP_SERVER_ENABLED, enabled); - } - public String getProdURL() { - return InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).get(PROD_URL, null); + return InstanceScope.INSTANCE.getNode(Fabric8AnalysisCoreActivator.PLUGIN_ID).get(PROD_URL, null); } public void setProdURL(String prodURL) { - InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).put(PROD_URL, prodURL); + InstanceScope.INSTANCE.getNode(Fabric8AnalysisCoreActivator.PLUGIN_ID).put(PROD_URL, prodURL); } public String getStageURL() { - return InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).get(STAGE_URL, null); + return InstanceScope.INSTANCE.getNode(Fabric8AnalysisCoreActivator.PLUGIN_ID).get(STAGE_URL, null); } public void setStageURL(String stageURL) { - InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID).put(STAGE_URL, stageURL); + InstanceScope.INSTANCE.getNode(Fabric8AnalysisCoreActivator.PLUGIN_ID).put(STAGE_URL, stageURL); } public String getUserKey() throws StorageException { diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIException.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIException.java similarity index 95% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIException.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIException.java index b985309..2f449d5 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIException.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIException.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core.api; import org.json.JSONObject; diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIProvider.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIProvider.java similarity index 94% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIProvider.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIProvider.java index ec78357..5d6b52a 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/RecommenderAPIProvider.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/RecommenderAPIProvider.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core.api; import java.io.File; @@ -31,8 +31,9 @@ import org.json.JSONException; import org.json.JSONObject; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.PomContentBody; +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.internal.PomContentBody; /** * Provides access to Recommender API server @@ -132,7 +133,7 @@ public boolean analysesFinished(String jobId) throws RecommenderAPIException { int responseCode = response.getStatusLine().getStatusCode(); // TODO - for debug purposes - should be removed later - Fabric8AnalysisLSCoreActivator.getDefault().logInfo("F8 server response code: " + responseCode); + Fabric8AnalysisCoreActivator.getDefault().logInfo("F8 server response code: " + responseCode); if (responseCode == HttpStatus.SC_OK) { return true; diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIException.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIException.java similarity index 95% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIException.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIException.java index bfe7522..fbd5ab4 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIException.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIException.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core.api; import org.json.JSONObject; diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIProvider.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIProvider.java similarity index 95% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIProvider.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIProvider.java index fb91720..0646b4f 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/ThreeScaleAPIProvider.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/api/ThreeScaleAPIProvider.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core; +package com.redhat.fabric8analytics.eclipse.core.api; import java.io.IOException; @@ -22,7 +22,7 @@ import org.json.JSONException; import org.json.JSONObject; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; /** * Provides access to 3scale service diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/AnalyticsAuthData.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/AnalyticsAuthData.java similarity index 95% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/AnalyticsAuthData.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/AnalyticsAuthData.java index 46ed2f5..891788b 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/AnalyticsAuthData.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/AnalyticsAuthData.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.data; +package com.redhat.fabric8analytics.eclipse.core.data; public class AnalyticsAuthData { diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/ThreeScaleData.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/ThreeScaleData.java similarity index 92% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/ThreeScaleData.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/ThreeScaleData.java index 0d5778b..8347c67 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/data/ThreeScaleData.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/data/ThreeScaleData.java @@ -1,4 +1,4 @@ -package com.redhat.fabric8analytics.lsp.eclipse.core.data; +package com.redhat.fabric8analytics.eclipse.core.data; /** * Stores 3scale data. diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/AnalyticsAuthService.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/AnalyticsAuthService.java similarity index 85% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/AnalyticsAuthService.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/AnalyticsAuthService.java index 8941ca0..5b6b174 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/AnalyticsAuthService.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/AnalyticsAuthService.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.internal; +package com.redhat.fabric8analytics.eclipse.core.internal; import java.util.List; @@ -21,12 +21,12 @@ import org.jboss.tools.openshift.io.core.AccountStatus; import org.jboss.tools.openshift.io.core.model.IAccount; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisPreferences; -import com.redhat.fabric8analytics.lsp.eclipse.core.ThreeScaleAPIException; -import com.redhat.fabric8analytics.lsp.eclipse.core.ThreeScaleAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator; +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisPreferences; +import com.redhat.fabric8analytics.eclipse.core.api.ThreeScaleAPIException; +import com.redhat.fabric8analytics.eclipse.core.api.ThreeScaleAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; public class AnalyticsAuthService { @@ -78,7 +78,7 @@ public AnalyticsAuthData getAnalyticsAuthData(IProgressMonitor progressMonitor) try { threeScaleData = registerThreeScale(monitor, token); } catch (ThreeScaleAPIException e) { - Fabric8AnalysisLSCoreActivator.getDefault().logError("Unable to get data from 3scale", e); + Fabric8AnalysisCoreActivator.getDefault().logError("Unable to get data from 3scale", e); return null; } } @@ -101,7 +101,7 @@ public AnalyticsAuthData login(IProgressMonitor progressMonitor) throws StorageE try { threeScaleData = registerThreeScale(monitor, token); } catch (ThreeScaleAPIException e) { - Fabric8AnalysisLSCoreActivator.getDefault().logError("Unable to get data from 3scale", e); + Fabric8AnalysisCoreActivator.getDefault().logError("Unable to get data from 3scale", e); return null; } } diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/PomContentBody.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/PomContentBody.java similarity index 95% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/PomContentBody.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/PomContentBody.java index a547bf9..9bd4d79 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/internal/PomContentBody.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/internal/PomContentBody.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.internal; +package com.redhat.fabric8analytics.eclipse.core.internal; import java.io.IOException; import java.io.OutputStream; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/LoginToOSIOJob.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/LoginToOSIOJob.java new file mode 100644 index 0000000..8f72b3b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/LoginToOSIOJob.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ +package com.redhat.fabric8analytics.eclipse.core.job; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.equinox.security.storage.StorageException; + +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; + +public class LoginToOSIOJob extends Job { + + private AnalyticsAuthData analyticsAuthData; + + public LoginToOSIOJob() { + super("Login to Openshift.io"); + } + + @Override + protected IStatus run(IProgressMonitor progressMonitor) { + try { + analyticsAuthData = AnalyticsAuthService.getInstance().login(progressMonitor); + } catch (StorageException e) { + return new Status(IStatus.ERROR, Fabric8AnalysisCoreActivator.PLUGIN_ID, "Error occured while storing Fabric8Analytics data", e); + } + return Status.OK_STATUS; + } + + public AnalyticsAuthData getAnalyticsAuthData() { + return analyticsAuthData; + } + + } \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/RetrieveResultsJob.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/RetrieveResultsJob.java similarity index 75% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/RetrieveResultsJob.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/RetrieveResultsJob.java index 3372dcd..54d07e2 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/RetrieveResultsJob.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/RetrieveResultsJob.java @@ -8,16 +8,16 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.job; +package com.redhat.fabric8analytics.eclipse.core.job; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIException; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIException; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; public class RetrieveResultsJob extends Job { @@ -35,10 +35,10 @@ public RetrieveResultsJob(RecommenderAPIProvider provider, String jobID) { protected IStatus run(IProgressMonitor monitor) { try { if (!provider.analysesFinished(jobID)) { - return new Status(IStatus.INFO, Fabric8AnalysisLSCoreActivator.PLUGIN_ID, "Analysis is not ready yet"); + return new Status(IStatus.INFO, Fabric8AnalysisCoreActivator.PLUGIN_ID, "Analysis is not ready yet"); } } catch (RecommenderAPIException e) { - return new Status(IStatus.ERROR, Fabric8AnalysisLSCoreActivator.PLUGIN_ID, + return new Status(IStatus.ERROR, Fabric8AnalysisCoreActivator.PLUGIN_ID, "Error during communication with analytics server", e); } diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/SendToFabric8AnalysisJob.java b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/SendToFabric8AnalysisJob.java similarity index 87% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/SendToFabric8AnalysisJob.java rename to plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/SendToFabric8AnalysisJob.java index 8834137..ce91940 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/src/com/redhat/fabric8analytics/lsp/eclipse/core/job/SendToFabric8AnalysisJob.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.core/src/com/redhat/fabric8analytics/eclipse/core/job/SendToFabric8AnalysisJob.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.job; +package com.redhat.fabric8analytics.eclipse.core.job; import java.io.StringWriter; import java.util.HashMap; @@ -26,8 +26,8 @@ import org.eclipse.m2e.core.project.IMavenProjectFacade; import org.eclipse.m2e.core.project.IMavenProjectRegistry; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.Fabric8AnalysisCoreActivator; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; public class SendToFabric8AnalysisJob extends Job { @@ -61,7 +61,7 @@ protected IStatus run(IProgressMonitor monitor) { jobID = provider.requestAnalyses(effectivePomFiles, license); } catch (Exception e) { - return new Status(Status.ERROR, Fabric8AnalysisLSCoreActivator.PLUGIN_ID, "Error during communication with server", e); + return new Status(Status.ERROR, Fabric8AnalysisCoreActivator.PLUGIN_ID, "Error during communication with server", e); } return Status.OK_STATUS; } diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/.gitignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/.gitignore new file mode 100644 index 0000000..aa623da --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/.gitignore @@ -0,0 +1,7 @@ +/bin/ +/.settings/ +/.project +/.classpath +target/ +server* +**/.DS_Store diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/META-INF/MANIFEST.MF b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/META-INF/MANIFEST.MF new file mode 100644 index 0000000..97ebc72 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.lsp.core;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.lsp4e;bundle-version="0.3.0", + org.eclipse.core.runtime, + org.eclipse.core.resources;bundle-version="3.12.0", + org.apache.commons.io;bundle-version="2.2.0", + org.eclipse.equinox.security, + com.redhat.fabric8analytics.eclipse.core +Eclipse-BundleShape: dir +Bundle-ActivationPolicy: lazy +Bundle-Activator: com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalysisLSPCoreActivator +Bundle-ClassPath: . +Export-Package: com.redhat.fabric8analytics.eclipse.lsp.core + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/build.properties b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/build.properties new file mode 100644 index 0000000..cddd92f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + plugin.properties,\ + .,\ +src.includes = * +src.excludes = src diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.core/plugin.properties b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.properties similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.core/plugin.properties rename to plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.properties diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.xml new file mode 100644 index 0000000..f786541 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/plugin.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/pom.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/pom.xml similarity index 85% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/pom.xml rename to plugins/com.redhat.fabric8analytics.eclipse.lsp.core/pom.xml index ddf3e56..6769ab9 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/pom.xml +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/pom.xml @@ -1,5 +1,4 @@ - + 4.0.0 com.redhat.fabric8analytics.eclipse @@ -7,10 +6,10 @@ 0.0.1-SNAPSHOT - com.redhat.fabric8analytics.lsp.eclipse.ui + com.redhat.fabric8analytics.eclipse.lsp.core eclipse-plugin - - + + org.eclipse.tycho @@ -47,4 +46,4 @@ - \ No newline at end of file + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/VERSION b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/VERSION new file mode 100644 index 0000000..81340c7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/VERSION @@ -0,0 +1 @@ +0.0.4 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js new file mode 100644 index 0000000..3cfcd47 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js @@ -0,0 +1,190 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Pavel Odvody 2016 + * Licensed under the Apache-2.0 License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const json_1 = require("./json"); +const Xml2Object = require("xml2object"); +/* By default the collector is going to process these dependency keys */ +const DefaultClasses = ["dependencies", "devDependencies", "optionalDependencies"]; +/* Dependency class that can be created from `IKeyValueEntry` */ +class Dependency { + constructor(dependency) { + this.name = { + value: dependency.key, + position: dependency.key_position + }; + this.version = { + value: dependency.value.object, + position: dependency.value_position + }; + } +} +/* Process entries found in the JSON files and collect all dependency + * related information */ +class DependencyCollector { + constructor(classes) { + this.classes = classes; + this.classes = classes || DefaultClasses; + } + collect(file) { + return __awaiter(this, void 0, void 0, function* () { + let parser = new json_1.StreamingParser(file); + let dependencies = []; + let tree = yield parser.parse(); + let top_level = tree.children[0]; + /* Iterate over all keys, select those in which we're interested as defined + by `classes`, and map each item to a new `Dependency` object */ + for (const p of top_level.properties) { + if (this.classes.indexOf(p.key) > -1) { + for (const dependency of p.value.object) { + dependencies.push(new Dependency(dependency)); + } + } + } + return dependencies; + }); + } +} +exports.DependencyCollector = DependencyCollector; +class NaivePyParser { + constructor(objSam) { + this.dependencies = []; + this.isDependency = false; + this.objSam = objSam; + this.parser = this.createPyParser(); + } + createPyParser() { + let deps = this.dependencies; + this.objSam.forEach(function (obj) { + let entry = new json_1.KeyValueEntry(obj["pkgName"], { line: 0, column: 0 }); + entry.value = new json_1.Variant(json_1.ValueType.String, obj["version"]); + entry.value_position = { line: obj["line"], column: obj["pos"] }; + let dep = new Dependency(entry); + deps.push(dep); + }); + } + parse() { + return this.dependencies; + } +} +let toObject = (arr) => { + let rv = []; + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== undefined) { + let line = arr[i].replace(/\s/g, ''); + let lineArr; + let lineStr; + if (line.indexOf('#') !== -1) { + lineArr = line.split("#"); + lineStr = lineArr[0]; + } + else { + lineStr = line; + } + let subArr = lineStr.split(/[==,>=]+/); + let subObj = {}; + subObj["pkgName"] = subArr[0]; + subObj["version"] = subArr[1] || ""; + subObj["line"] = i + 1; + subObj["column"] = subArr[0].length + 2; + rv.push(subObj); + } + } + return rv; +}; +/* Process entries found in the txt files and collect all dependency + * related information */ +class ReqDependencyCollector { + constructor(classes = ["dependencies"]) { + this.classes = classes; + } + collect(contents) { + return __awaiter(this, void 0, void 0, function* () { + let tempArr = contents.split("\n"); + let objSam = toObject(tempArr); + let parser = new NaivePyParser(objSam); + let dependencies = parser.parse(); + return dependencies; + }); + } +} +exports.ReqDependencyCollector = ReqDependencyCollector; +class NaivePomXmlSaxParser { + constructor(stream) { + this.dependencies = []; + this.isDependency = false; + this.versionStartLine = 0; + this.versionStartColumn = 0; + this.stream = stream; + this.parser = this.createParser(); + } + createParser() { + let parser = new Xml2Object(["dependency"], { strict: true, trackPosition: true }); + let deps = this.dependencies; + let versionLine = this.versionStartLine; + let versionColumn = this.versionStartColumn; + parser.on("object", function (name, obj) { + if (obj.hasOwnProperty("groupId") && obj.hasOwnProperty("artifactId") && obj.hasOwnProperty("version")) { + let ga = `${obj["groupId"]}:${obj["artifactId"]}`; + let entry = new json_1.KeyValueEntry(ga, { line: 0, column: 0 }); + entry.value = new json_1.Variant(json_1.ValueType.String, obj["version"]); + entry.value_position = { line: versionLine, column: versionColumn }; + let dep = new Dependency(entry); + deps.push(dep); + } + }); + parser.saxStream.on("opentag", function (node) { + if (node.name == "dependency") { + this.isDependency = true; + } + if (this.isDependency && node.name == "version") { + versionLine = parser.saxStream._parser.line + 1; + versionColumn = parser.saxStream._parser.column + 1; + } + }); + parser.saxStream.on("closetag", function (nodeName) { + // TODO: nested deps! + if (nodeName == "dependency") { + this.isDependency = false; + } + }); + parser.on("error", function (e) { + // the XML document doesn't have to be well-formed, that's fine + parser.error = null; + }); + return parser; + } + parse() { + try { + this.stream.pipe(this.parser.saxStream); + } + catch (e) { + console.error(e.message); + } + return this.dependencies; + } +} +class PomXmlDependencyCollector { + constructor(classes = ["dependencies"]) { + this.classes = classes; + } + collect(file) { + return __awaiter(this, void 0, void 0, function* () { + let parser = new NaivePomXmlSaxParser(file); + let dependencies = parser.parse(); + return dependencies; + }); + } +} +exports.PomXmlDependencyCollector = PomXmlDependencyCollector; +//# sourceMappingURL=collector.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js.map new file mode 100644 index 0000000..fecf627 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/collector.js.map @@ -0,0 +1 @@ +{"version":3,"file":"collector.js","sourceRoot":"","sources":["../src/collector.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js new file mode 100644 index 0000000..1dad870 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js @@ -0,0 +1,132 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Pavel Odvody 2016 + * Licensed under the Apache-2.0 License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const utils_1 = require("./utils"); +; +/* Bind & return the part of `obj` as described by `desc` */ +let bind_object = (obj, desc) => { + let bind = obj; + for (let elem of desc.path) { + if (elem in bind) { + bind = bind[elem]; + } + else { + return null; + } + } + return bind; +}; +; +; +; +; +/* Diagnostics pipeline implementation */ +class DiagnosticsPipeline { + constructor(classes, dependency, config, diags) { + this.items = classes.map((i) => { return new i(dependency, config); }); + this.dependency = dependency; + this.config = config; + this.diagnostics = diags; + } + run(data) { + for (let item of this.items) { + if (item.consume(data)) { + for (let d of item.produce()) + this.diagnostics.push(d); + } + } + return this.diagnostics; + } +} +exports.DiagnosticsPipeline = DiagnosticsPipeline; +; +/* A consumer that uses the binding interface to consume a metadata object */ +class AnalysisConsumer { + constructor(config) { + this.config = config; + this.changeTo = null; + } + consume(data) { + if (this.binding != null) { + this.item = bind_object(data, this.binding); + } + else { + this.item = data; + } + if (this.changeToBinding != null) { + this.changeTo = bind_object(data, this.changeToBinding); + } + return this.item != null; + } +} +; +/* We've received an empty/unfinished result, display that analysis is pending */ +class EmptyResultEngine extends AnalysisConsumer { + constructor(context, config) { + super(config); + this.context = context; + } + produce() { + if (this.item == {} || + this.item.finished_at === undefined || + this.item.finished_at == null) { + return [{ + severity: 3 /* Information */, + range: utils_1.get_range(this.context.version), + message: `Package ${this.context.name.value}-${this.context.version.value} - analysis is pending`, + source: 'Component Analysis' + }]; + } + else { + return []; + } + } +} +exports.EmptyResultEngine = EmptyResultEngine; +/* Report CVEs in found dependencies */ +class SecurityEngine extends AnalysisConsumer { + constructor(context, config) { + super(config); + this.context = context; + this.binding = { path: ['result', 'recommendation', 'component-analyses', 'cve'] }; + /* recommendation to use a different version */ + this.changeToBinding = { path: ['result', 'recommendation', 'change_to'] }; + } + produce() { + if (this.item.length > 0) { + let cveList = []; + for (let cve of this.item) { + cveList.push(cve['id']); + } + let cves = cveList.join(' '); + let diagnostic = { + severity: 1 /* Error */, + range: utils_1.get_range(this.context.version), + message: `Package ${this.context.name.value}-${this.context.version.value} is vulnerable: ${cves}`, + source: 'Component Analysis' + }; + // TODO: this can be done lazily + if (this.changeTo != null) { + let command = { + title: "Switch to recommended version " + this.changeTo, + command: "lsp.applyTextEdit", + arguments: [{ range: diagnostic.range, newText: this.changeTo }] + }; + diagnostic.message += ". Recommendation: use version " + this.changeTo; + codeActionsMap[diagnostic.message] = command; + } + return [diagnostic]; + } + else { + return []; + } + } +} +exports.SecurityEngine = SecurityEngine; +; +let codeActionsMap = new Map(); +exports.codeActionsMap = codeActionsMap; +//# sourceMappingURL=consumers.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js.map new file mode 100644 index 0000000..8698da2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/consumers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"consumers.js","sourceRoot":"","sources":["../src/consumers.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js new file mode 100644 index 0000000..3cb3bf4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js @@ -0,0 +1,145 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Pavel Odvody 2016 + * Licensed under the Apache-2.0 License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +/* Since the following modules are written in regular JS we can't use TS's import statement + so we need to `require` those the JS way */ +let Parser = require("stream-json/ClassicParser"), Streamer = require("stream-json/Streamer"), Emitter = require("stream-json/Emitter"), Packer = require("stream-json/Packer"); +/* Determine to which class the emitted token belongs */ +var TokenMarker; +(function (TokenMarker) { + TokenMarker[TokenMarker["Invalid"] = 0] = "Invalid"; + TokenMarker[TokenMarker["Key"] = 1] = "Key"; + TokenMarker[TokenMarker["Value"] = 2] = "Value"; +})(TokenMarker || (TokenMarker = {})); +; +/* Determine what is the value */ +var ValueType; +(function (ValueType) { + ValueType[ValueType["Invalid"] = 0] = "Invalid"; + ValueType[ValueType["String"] = 1] = "String"; + ValueType[ValueType["Integer"] = 2] = "Integer"; + ValueType[ValueType["Float"] = 3] = "Float"; + ValueType[ValueType["Array"] = 4] = "Array"; + ValueType[ValueType["Object"] = 5] = "Object"; + ValueType[ValueType["Boolean"] = 6] = "Boolean"; + ValueType[ValueType["Null"] = 7] = "Null"; +})(ValueType || (ValueType = {})); +exports.ValueType = ValueType; +; +; +; +; +class Variant { + constructor(type, object) { + this.type = type; + this.object = object; + } +} +exports.Variant = Variant; +class KeyValueEntry { + constructor(k, pos) { + this.key = k; + this.key_position = pos; + } +} +exports.KeyValueEntry = KeyValueEntry; +class Scope { + constructor(parent) { + this.children = []; + this.properties = []; + this.parent = parent; + this.marker = TokenMarker.Invalid; + this.last = null; + } + add_scope() { + let new_scope = new Scope(this); + this.children.push(new_scope); + /* We're creating a new scope, but since the current key has + undefined value it means the new scope (or the contents therein) *is* the value */ + if (this.last !== null && this.last.value == undefined) { + this.last.value = new Variant(ValueType.Object, new_scope.properties); + this.properties.push(this.last); + } + return new_scope; + } + consume(token) { + switch (this.marker) { + case TokenMarker.Key: + this.last = new KeyValueEntry(token.value, { line: token.line, column: token.pos }); + this.marker = TokenMarker.Invalid; + break; + case TokenMarker.Value: + this.last.value = new Variant(ValueType.String, token.value); + this.last.value_position = { line: token.line, column: token.pos }; + this.properties.push(this.last); + this.marker = TokenMarker.Invalid; + break; + default: + break; + } + } + leave() { + return this.parent; + } + /* used mainly for debug purposes */ + print() { + console.log(this.properties); + this.children.forEach((scope) => { scope.print(); }); + } +} +; +class StreamingParser { + constructor(file) { + this.file = file; + } + parse() { + return __awaiter(this, void 0, void 0, function* () { + let scope = new Scope(), parser = new Parser(), stream = new Streamer(), emitter = new Emitter(), packer = new Packer({ packKeys: true, packStrings: true, packNumbers: true }); + let root = scope; + /* In the following code we observe two event streams, one defined by parser + and the other one by emitter. The difference here is that parser produces raw tokens + with positional information as to where in the file the token is declared, but since + this stream is very low level and contains tokens like ", [, ] etc. we need to correlate + events from this stream with the events produced by the emitter stream which gives + us much finer granularity in handling the underlying JSON structure. + + The correlation of the events itself is handled by the `Scope` which in essence + implements a finite state machine to make sense of the two event streams. */ + parser.on("data", function (x) { + if (scope.marker != TokenMarker.Invalid) { + scope.consume(x); + } + }); + parser.on("error", function (e) { + // the JSON document doesn't have to be well-formed, that's fine + }); + emitter.on("startKey", function () { scope.marker = TokenMarker.Key; }); + /* We don't care about numbers, nulls, arrays and booleans thus far */ + emitter.on("startString", function () { scope.marker = TokenMarker.Value; }); + emitter.on("startObject", function () { scope = scope.add_scope(); }); + emitter.on("endObject", function () { scope = scope.leave(); }); + this.file + .pipe(parser) + .pipe(stream) + .pipe(packer) + .pipe(emitter); + return new Promise(resolve => { + emitter.on("finish", () => resolve(root)); + }); + }); + } +} +exports.StreamingParser = StreamingParser; +; +//# sourceMappingURL=json.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js.map new file mode 100644 index 0000000..152b4af --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/json.js.map @@ -0,0 +1 @@ +{"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/installServerIntoExtension b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/installServerIntoExtension new file mode 100755 index 0000000..af90d26 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/installServerIntoExtension @@ -0,0 +1,119 @@ +#!/usr/bin/env node + +var path = require('path'); +var fs = require('fs'); +var cp = require('child_process'); + +var extensionDirectory = process.argv[2]; +if (!extensionDirectory) { + console.error('No extension directory provided.'); + process.exit(1) +} +extensionDirectory = path.resolve(extensionDirectory) +if (!fs.existsSync(extensionDirectory)) { + console.error('Extension directory ' + extensionDirectory + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var packageFile = process.argv[3]; +if (!packageFile) { + console.error('No package.json file provided.'); + process.exit(1); +} +packageFile = path.resolve(packageFile); +if (!fs.existsSync(packageFile)) { + console.error('Package file ' + packageFile + ' doesn\'t exist on disk.'); + process.exit(1); +} +var tsconfigFile = process.argv[4]; +if (!tsconfigFile) { + console.error('No tsconfig.json file provided'); + process.exit(1); +} +tsconfigFile = path.resolve(tsconfigFile); +if (!fs.existsSync(tsconfigFile)) { + console.error('tsconfig file ' + tsconfigFile + ' doesn\'t exist on disk.') + process.exit(1); +} + +var extensionServerDirectory = path.join(extensionDirectory, 'server') + +json = require(tsconfigFile); +var compilerOptions = json.compilerOptions; +if (compilerOptions) { + var outDir = compilerOptions.outDir; + if (!outDir || path.join(path.dirname(tsconfigFile), outDir) !== extensionServerDirectory) { + console.error('outDir in ' + process.argv[4] + ' must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(tsconfigFile), outDir)); + console.error('Please change outDir in ' + process.argv[4] + ' to ' + path.relative(path.dirname(tsconfigFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } +} + +var launchFile = path.join(path.dirname(packageFile), '.vscode', 'launch.json'); +if (fs.existsSync(launchFile)) { + try { + json = JSON.parse(stripComments(fs.readFileSync(launchFile, 'utf8').toString())); + var configurations = json.configurations; + if (configurations) { + configurations.forEach(function(config) { + if (config.request === 'attach' && config.type === 'node') { + var outDir = config.outDir; + var resolvedOutDir = outDir; + if (resolvedOutDir) { + var workspaceRoot = path.dirname(packageFile); + resolvedOutDir = resolvedOutDir.replace(/\$\{workspaceRoot\}/g, workspaceRoot); + if (path.isAbsolute(resolvedOutDir)) { + resolvedOutDir = path.normalize(resolvedOutDir); + } else { + resolvedOutDir = path.join(workspaceRoot, outDir); + } + } + if (!resolvedOutDir || resolvedOutDir !== extensionServerDirectory) { + console.error('outDir in ./.vscode/launch.json must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(packageFile), outDir)); + console.error('Please change outDir in ./.vscode/launch.json to ' + path.relative(path.dirname(packageFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } + } + }) + } + } catch (error) { + console.warn('Couldn\'t check launch.json file. Reading the file failed with: ' + error.message); + } +} + +function stripComments(content) { + var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + var result = content.replace(regexp, function (match, m1, m2, m3, m4) { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ""; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + var length_1 = m4.length; + if (length_1 > 2 && m4[length_1 - 1] === '\n') { + return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ""; + } + } + else { + // We match a string + return match; + } + }); + return result; +} + +if (!fs.existsSync(extensionServerDirectory)) { + fs.mkdirSync(extensionServerDirectory); +} + +var dest = path.join(extensionServerDirectory, 'package.json'); +console.log('Copying package.json to extension\'s server location...'); +fs.writeFileSync(dest, fs.readFileSync(packageFile)); + +console.log('Updating server npm modules into extension\'s server location...'); +cp.execSync('npm update --production --prefix ' + extensionServerDirectory); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-conv b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-conv new file mode 100755 index 0000000..444045a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-conv @@ -0,0 +1,201 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); +var tty = require('tty'); +var readline = require('readline'); +var getPassword = require('getpass').getPass; + +var options = [ + { + names: ['outformat', 't'], + type: 'string', + help: 'Output format' + }, + { + names: ['informat', 'T'], + type: 'string', + help: 'Input format' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input file name (default stdin)' + }, + { + names: ['out', 'o'], + type: 'string', + help: 'Output file name (default stdout)' + }, + { + names: ['private', 'p'], + type: 'bool', + help: 'Produce a private key as output' + }, + { + names: ['derive', 'd'], + type: 'string', + help: 'Output a new key derived from this one, with given algo' + }, + { + names: ['identify', 'i'], + type: 'bool', + help: 'Print key metadata instead of converting' + }, + { + names: ['comment', 'c'], + type: 'string', + help: 'Set key comment, if output format supports' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-conv: error: %s', e.message); + process.exit(1); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-conv: converts between SSH key formats\n'); + console.error(help); + console.error('\navailable formats:'); + console.error(' - pem, pkcs1 eg id_rsa'); + console.error(' - ssh eg id_rsa.pub'); + console.error(' - pkcs8 format you want for openssl'); + console.error(' - openssh like output of ssh-keygen -o'); + console.error(' - rfc4253 raw OpenSSH wire format'); + process.exit(1); + } + + /* + * Key derivation can only be done on private keys, so use of the -d + * option necessarily implies -p. + */ + if (opts.derive) + opts.private = true; + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-conv: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var outFile = process.stdout; + + try { + if (opts.out && !opts.identify) { + fs.accessSync(path.dirname(opts.out), fs.W_OK); + outFile = fs.createWriteStream(opts.out); + } + } catch (e) { + console.error('sshpk-conv: error opening output file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var bufs = []; + inFile.on('readable', function () { + var data; + while ((data = inFile.read())) + bufs.push(data); + }); + var parseOpts = {}; + parseOpts.filename = inFileName; + inFile.on('end', function processKey() { + var buf = Buffer.concat(bufs); + var fmt = 'auto'; + if (opts.informat) + fmt = opts.informat; + var f = sshpk.parseKey; + if (opts.private) + f = sshpk.parsePrivateKey; + try { + var key = f(buf, fmt, parseOpts); + } catch (e) { + if (e.name === 'KeyEncryptedError') { + getPassword(function (err, pw) { + if (err) { + console.log('sshpk-conv: ' + + err.name + ': ' + + err.message); + process.exit(1); + } + parseOpts.passphrase = pw; + processKey(); + }); + return; + } + console.error('sshpk-conv: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (opts.derive) + key = key.derive(opts.derive); + + if (opts.comment) + key.comment = opts.comment; + + if (!opts.identify) { + fmt = undefined; + if (opts.outformat) + fmt = opts.outformat; + outFile.write(key.toBuffer(fmt)); + if (fmt === 'ssh' || + (!opts.private && fmt === undefined)) + outFile.write('\n'); + outFile.once('drain', function () { + process.exit(0); + }); + } else { + var kind = 'public'; + if (sshpk.PrivateKey.isPrivateKey(key)) + kind = 'private'; + console.log('%s: a %d bit %s %s key', inFileName, + key.size, key.type.toUpperCase(), kind); + if (key.type === 'ecdsa') + console.log('ECDSA curve: %s', key.curve); + if (key.comment) + console.log('Comment: %s', key.comment); + console.log('Fingerprint:'); + console.log(' ' + key.fingerprint().toString()); + console.log(' ' + key.fingerprint('md5').toString()); + process.exit(0); + } + }); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-sign b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-sign new file mode 100755 index 0000000..673fc98 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-sign @@ -0,0 +1,191 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); +var getPassword = require('getpass').getPass; + +var options = [ + { + names: ['hash', 'H'], + type: 'string', + help: 'Hash algorithm (sha1, sha256, sha384, sha512)' + }, + { + names: ['verbose', 'v'], + type: 'bool', + help: 'Display verbose info about key and hash used' + }, + { + names: ['identity', 'i'], + type: 'string', + help: 'Path to key to use' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input filename' + }, + { + names: ['out', 'o'], + type: 'string', + help: 'Output filename' + }, + { + names: ['format', 't'], + type: 'string', + help: 'Signature format (asn1, ssh, raw)' + }, + { + names: ['binary', 'b'], + type: 'bool', + help: 'Output raw binary instead of base64' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +var parseOpts = {}; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-sign: error: %s', e.message); + process.exit(1); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-sign: sign data using an SSH key\n'); + console.error(help); + process.exit(1); + } + + if (!opts.identity) { + var help = parser.help({}).trimRight(); + console.error('sshpk-sign: the -i or --identity option ' + + 'is required\n'); + console.error(help); + process.exit(1); + } + + var keyData = fs.readFileSync(opts.identity); + parseOpts.filename = opts.identity; + + run(); +} + +function run() { + var key; + try { + key = sshpk.parsePrivateKey(keyData, 'auto', parseOpts); + } catch (e) { + if (e.name === 'KeyEncryptedError') { + getPassword(function (err, pw) { + parseOpts.passphrase = pw; + run(); + }); + return; + } + console.error('sshpk-sign: error loading private key "' + + opts.identity + '": ' + e.name + ': ' + e.message); + process.exit(1); + } + + var hash = opts.hash || key.defaultHashAlgorithm(); + + var signer; + try { + signer = key.createSign(hash); + } catch (e) { + console.error('sshpk-sign: error creating signer: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (opts.verbose) { + console.error('sshpk-sign: using %s-%s with a %d bit key', + key.type, hash, key.size); + } + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-sign: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + var outFile = process.stdout; + + try { + if (opts.out && !opts.identify) { + fs.accessSync(path.dirname(opts.out), fs.W_OK); + outFile = fs.createWriteStream(opts.out); + } + } catch (e) { + console.error('sshpk-sign: error opening output file' + + ': ' + e.name + ': ' + e.message); + process.exit(1); + } + + inFile.pipe(signer); + inFile.on('end', function () { + var sig; + try { + sig = signer.sign(); + } catch (e) { + console.error('sshpk-sign: error signing data: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + var fmt = opts.format || 'asn1'; + var output; + try { + output = sig.toBuffer(fmt); + if (!opts.binary) + output = output.toString('base64'); + } catch (e) { + console.error('sshpk-sign: error converting signature' + + ' to ' + fmt + ' format: ' + e.name + ': ' + + e.message); + process.exit(1); + } + + outFile.write(output); + if (!opts.binary) + outFile.write('\n'); + outFile.once('drain', function () { + process.exit(0); + }); + }); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-verify b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-verify new file mode 100755 index 0000000..a1669f4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/sshpk-verify @@ -0,0 +1,166 @@ +#!/usr/bin/env node +// -*- mode: js -*- +// vim: set filetype=javascript : +// Copyright 2015 Joyent, Inc. All rights reserved. + +var dashdash = require('dashdash'); +var sshpk = require('../lib/index'); +var fs = require('fs'); +var path = require('path'); + +var options = [ + { + names: ['hash', 'H'], + type: 'string', + help: 'Hash algorithm (sha1, sha256, sha384, sha512)' + }, + { + names: ['verbose', 'v'], + type: 'bool', + help: 'Display verbose info about key and hash used' + }, + { + names: ['identity', 'i'], + type: 'string', + help: 'Path to (public) key to use' + }, + { + names: ['file', 'f'], + type: 'string', + help: 'Input filename' + }, + { + names: ['format', 't'], + type: 'string', + help: 'Signature format (asn1, ssh, raw)' + }, + { + names: ['signature', 's'], + type: 'string', + help: 'base64-encoded signature data' + }, + { + names: ['help', 'h'], + type: 'bool', + help: 'Shows this help text' + } +]; + +if (require.main === module) { + var parser = dashdash.createParser({ + options: options + }); + + try { + var opts = parser.parse(process.argv); + } catch (e) { + console.error('sshpk-verify: error: %s', e.message); + process.exit(3); + } + + if (opts.help || opts._args.length > 1) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: sign data using an SSH key\n'); + console.error(help); + process.exit(3); + } + + if (!opts.identity) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: the -i or --identity option ' + + 'is required\n'); + console.error(help); + process.exit(3); + } + + if (!opts.signature) { + var help = parser.help({}).trimRight(); + console.error('sshpk-verify: the -s or --signature option ' + + 'is required\n'); + console.error(help); + process.exit(3); + } + + var keyData = fs.readFileSync(opts.identity); + + var key; + try { + key = sshpk.parseKey(keyData); + } catch (e) { + console.error('sshpk-verify: error loading key "' + + opts.identity + '": ' + e.name + ': ' + e.message); + process.exit(2); + } + + var fmt = opts.format || 'asn1'; + var sigData = new Buffer(opts.signature, 'base64'); + + var sig; + try { + sig = sshpk.parseSignature(sigData, key.type, fmt); + } catch (e) { + console.error('sshpk-verify: error parsing signature: ' + + e.name + ': ' + e.message); + process.exit(2); + } + + var hash = opts.hash || key.defaultHashAlgorithm(); + + var verifier; + try { + verifier = key.createVerify(hash); + } catch (e) { + console.error('sshpk-verify: error creating verifier: ' + + e.name + ': ' + e.message); + process.exit(2); + } + + if (opts.verbose) { + console.error('sshpk-verify: using %s-%s with a %d bit key', + key.type, hash, key.size); + } + + var inFile = process.stdin; + var inFileName = 'stdin'; + + var inFilePath; + if (opts.file) { + inFilePath = opts.file; + } else if (opts._args.length === 1) { + inFilePath = opts._args[0]; + } + + if (inFilePath) + inFileName = path.basename(inFilePath); + + try { + if (inFilePath) { + fs.accessSync(inFilePath, fs.R_OK); + inFile = fs.createReadStream(inFilePath); + } + } catch (e) { + console.error('sshpk-verify: error opening input file' + + ': ' + e.name + ': ' + e.message); + process.exit(2); + } + + inFile.pipe(verifier); + inFile.on('end', function () { + var ret; + try { + ret = verifier.verify(sig); + } catch (e) { + console.error('sshpk-verify: error verifying data: ' + + e.name + ': ' + e.message); + process.exit(1); + } + + if (ret) { + console.error('OK'); + process.exit(0); + } + + console.error('NOT OK'); + process.exit(1); + }); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/uuid b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/uuid new file mode 100755 index 0000000..502626e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/.bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/.tonic_example.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/.tonic_example.js new file mode 100644 index 0000000..aa11812 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/.tonic_example.js @@ -0,0 +1,20 @@ +var Ajv = require('ajv'); +var ajv = new Ajv({allErrors: true}); + +var schema = { + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "number", "maximum": 3 } + } +}; + +var validate = ajv.compile(schema); + +test({"foo": "abc", "bar": 2}); +test({"foo": 2, "bar": 4}); + +function test(data) { + var valid = validate(data); + if (valid) console.log('Valid!'); + else console.log('Invalid: ' + ajv.errorsText(validate.errors)); +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/LICENSE new file mode 100644 index 0000000..8105396 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/README.md new file mode 100644 index 0000000..387c81d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/README.md @@ -0,0 +1,1327 @@ +Ajv logo + +# Ajv: Another JSON Schema Validator + +The fastest JSON Schema validator for Node.js and browser with draft 6 support. + + +[![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) +[![npm version](https://badge.fury.io/js/ajv.svg)](https://www.npmjs.com/package/ajv) +[![npm@beta](https://img.shields.io/npm/v/ajv/beta.svg)](https://github.com/epoberezkin/ajv/tree/beta) +[![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) +[![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) +[![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) + + +__Please note__: Ajv [version 6](https://github.com/epoberezkin/ajv/tree/beta) with [JSON Schema draft-07](http://json-schema.org/work-in-progress) support is released. Use `npm install ajv@beta` to install. + + +## Using version 5 + +[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published. + +[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas). + +__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` + + +## Contents + +- [Performance](#performance) +- [Features](#features) +- [Getting started](#getting-started) +- [Frequently Asked Questions](https://github.com/epoberezkin/ajv/blob/master/FAQ.md) +- [Using in browser](#using-in-browser) +- [Command line interface](#command-line-interface) +- Validation + - [Keywords](#validation-keywords) + - [Formats](#formats) + - [Combining schemas with $ref](#ref) + - [$data reference](#data-reference) + - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) + - [Defining custom keywords](#defining-custom-keywords) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) + - [Asynchronous validation](#asynchronous-validation) +- Modifying data during validation + - [Filtering data](#filtering-data) + - [Assigning defaults](#assigning-defaults) + - [Coercing data types](#coercing-data-types) +- API + - [Methods](#api) + - [Options](#options) + - [Validation errors](#validation-errors) +- [Related packages](#related-packages) +- [Packages using Ajv](#some-packages-using-ajv) +- [Tests, Contributing, History, License](#tests) + + +## Performance + +Ajv generates code using [doT templates](https://github.com/olado/doT) to turn JSON schemas into super-fast validation functions that are efficient for v8 optimization. + +Currently Ajv is the fastest and the most standard compliant validator according to these benchmarks: + +- [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark) - 50% faster than the second place +- [jsck benchmark](https://github.com/pandastrike/jsck#benchmarks) - 20-190% faster +- [z-schema benchmark](https://rawgit.com/zaggino/z-schema/master/benchmark/results.html) +- [themis benchmark](https://cdn.rawgit.com/playlyfe/themis/master/benchmark/results.html) + + +Performance of different validators by [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark): + +[![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=32,4,1&chs=600x416&chxl=-1:|djv|ajv|json-schema-validator-generator|jsen|is-my-json-valid|themis|z-schema|jsck|skeemas|json-schema-library|tv4&chd=t:100,98,72.1,66.8,50.1,15.1,6.1,3.8,1.2,0.7,0.2)](https://github.com/ebdrup/json-schema-benchmark/blob/master/README.md#performance) + + +## Features + +- Ajv implements full JSON Schema [draft 6](http://json-schema.org/) and draft 4 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) + - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) + - support of circular references between schemas + - correct string lengths for strings with unicode pairs (can be turned off) + - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off) + - [validates schemas against meta-schema](#api-validateschema) +- supports [browsers](#using-in-browser) and Node.js 0.10-8.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation +- "All errors" validation mode with [option allErrors](#options) +- [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages +- i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package +- [filtering data](#filtering-data) from additional properties +- [assigning defaults](#assigning-defaults) to missing properties and items +- [coercing data](#coercing-data-types) to the types specified in `type` keywords +- [custom keywords](#defining-custom-keywords) +- draft-6 keywords `const`, `contains` and `propertyNames` +- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords +- [asynchronous validation](#asynchronous-validation) of custom formats and keywords + +Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). + + +## Install + +``` +npm install ajv +``` + +or to install [version 6](https://github.com/epoberezkin/ajv/tree/beta): + +``` +npm install ajv@beta +``` + + +## Getting started + +Try it in the Node.js REPL: https://tonicdev.com/npm/ajv + + +The fastest validation call: + +```javascript +var Ajv = require('ajv'); +var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} +var validate = ajv.compile(schema); +var valid = validate(data); +if (!valid) console.log(validate.errors); +``` + +or with less code + +```javascript +// ... +var valid = ajv.validate(schema, data); +if (!valid) console.log(ajv.errors); +// ... +``` + +or + +```javascript +// ... +var valid = ajv.addSchema(schema, 'mySchema') + .validate('mySchema', data); +if (!valid) console.log(ajv.errorsText()); +// ... +``` + +See [API](#api) and [Options](#options) for more details. + +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. + +The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). + +__Please note__: every time a validation function or `ajv.validate` are called `errors` property is overwritten. You need to copy `errors` array reference to another variable if you want to use it later (e.g., in the callback). See [Validation errors](#validation-errors) + + +## Using in browser + +You can require Ajv directly from the code you browserify - in this case Ajv will be a part of your bundle. + +If you need to use Ajv in several bundles you can create a separate UMD bundle using `npm run bundle` script (thanks to [siddo420](https://github.com/siddo420)). + +Then you need to load Ajv in the browser: +```html + +``` + +This bundle can be used with different module systems; it creates global `Ajv` if no module system is found. + +The browser bundle is available on [cdnjs](https://cdnjs.com/libraries/ajv). + +Ajv is tested with these browsers: + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/epoberezkin.svg)](https://saucelabs.com/u/epoberezkin) + +__Please note__: some frameworks, e.g. Dojo, may redefine global require in such way that is not compatible with CommonJS module format. In such case Ajv bundle has to be loaded before the framework and then you can use global Ajv (see issue [#234](https://github.com/epoberezkin/ajv/issues/234)). + + +## Command line interface + +CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ajv-cli). It supports: + +- compiling JSON-schemas to test their validity +- BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) +- validating data file(s) against JSON-schema +- testing expected validity of data against JSON-schema +- referenced schemas +- custom meta-schemas +- files in JSON and JavaScript format +- all Ajv options +- reporting changes in data after validation in [JSON-patch](https://tools.ietf.org/html/rfc6902) format + + +## Validation keywords + +Ajv supports all validation keywords from draft 4 of JSON-schema standard: + +- [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) +- [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf +- [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format +- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minProperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf + +With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard: + +- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-proposed) - conditional validation with a sequence of if/then clauses +- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. + +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. + + +## Formats + +The following formats are supported for string validation with "format" keyword: + +- _date_: full-date according to [RFC3339](http://tools.ietf.org/html/rfc3339#section-5.6). +- _time_: time with optional time-zone. +- _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). +- _uri_: full uri with optional protocol. +- _url_: [URL record](https://url.spec.whatwg.org/#concept-url). +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) +- _email_: email address. +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _ipv4_: IP address v4. +- _ipv6_: IP address v6. +- _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. +- _uuid_: Universally Unique IDentifier according to [RFC4122](http://tools.ietf.org/html/rfc4122). +- _json-pointer_: JSON-pointer according to [RFC6901](https://tools.ietf.org/html/rfc6901). +- _relative-json-pointer_: relative JSON-pointer according to [this draft](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00). + +There are two modes of format validation: `fast` and `full`. This mode affects formats `date`, `time`, `date-time`, `uri`, `email`, and `hostname`. See [Options](#options) for details. + +You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. + +The option `unknownFormats` allows changing the default behaviour when an unknown format is encountered. In this case Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. + +You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). + + +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +```javascript +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +```javascript +var ajv = new Ajv; +var validate = ajv.addSchema(defsSchema) + .compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitly adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + +## $data reference + +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. + +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. + +The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). + +Examples. + +This schema requires that the value in property `smaller` is less or equal than the value in the property larger: + +```javascript +var ajv = new Ajv({$data: true}); + +var schema = { + "properties": { + "smaller": { + "type": "number", + "maximum": { "$data": "1/larger" } + }, + "larger": { "type": "number" } + } +}; + +var validData = { + smaller: 5, + larger: 7 +}; + +ajv.validate(schema, validData); // true +``` + +This schema requires that the properties have the same format as their field names: + +```javascript +var schema = { + "additionalProperties": { + "type": "string", + "format": { "$data": "0#" } + } +}; + +var validData = { + 'date-time': '1963-06-19T08:30:06.283185Z', + email: 'joe.bloggs@example.com' +} +``` + +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. + + +## $merge and $patch keywords + +With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). + +To add keywords `$merge` and `$patch` to Ajv instance use this code: + +```javascript +require('ajv-merge-patch')(ajv); +``` + +Examples. + +Using `$merge`: + +```json +{ + "$merge": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": { + "properties": { "q": { "type": "number" } } + } + } +} +``` + +Using `$patch`: + +```json +{ + "$patch": { + "source": { + "type": "object", + "properties": { "p": { "type": "string" } }, + "additionalProperties": false + }, + "with": [ + { "op": "add", "path": "/properties/q", "value": { "type": "number" } } + ] + } +} +``` + +The schemas above are equivalent to this schema: + +```json +{ + "type": "object", + "properties": { + "p": { "type": "string" }, + "q": { "type": "number" } + }, + "additionalProperties": false +} +``` + +The properties `source` and `with` in the keywords `$merge` and `$patch` can use absolute or relative `$ref` to point to other schemas previously added to the Ajv instance or to the fragments of the current schema. + +See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) for more information. + + +## Defining custom keywords + +The advantages of using custom keywords are: + +- allow creating validation scenarios that cannot be expressed using JSON Schema +- simplify your schemas +- help bringing a bigger part of the validation logic to your schemas +- make your schemas more expressive, less verbose and closer to your application domain +- implement custom data processors that modify your data (`modifying` option MUST be used in keyword definition) and/or create side effects while the data is being validated + +If a keyword is used only for side-effects and its validation result is pre-defined, use option `valid: true/false` in keyword definition to simplify both generated code (no error handling in case of `valid: true`) and your keyword functions (no need to return any validation result). + +The concerns you have to be aware of when extending JSON-schema standard with custom keywords are the portability and understanding of your schemas. You will have to support these custom keywords on other platforms and to properly document these keywords so that everybody can understand them in your schemas. + +You can define custom keywords with [addKeyword](#api-addkeyword) method. Keywords are defined on the `ajv` instance level - new instances will not have previously defined keywords. + +Ajv allows defining keywords with: +- validation function +- compilation function +- macro function +- inline compilation function that should return code (as string) that will be inlined in the currently compiled schema. + +Example. `range` and `exclusiveRange` keywords using compiled schema: + +```javascript +ajv.addKeyword('range', { + type: 'number', + compile: function (sch, parentSchema) { + var min = sch[0]; + var max = sch[1]; + + return parentSchema.exclusiveRange === true + ? function (data) { return data > min && data < max; } + : function (data) { return data >= min && data <= max; } + } +}); + +var schema = { "range": [2, 4], "exclusiveRange": true }; +var validate = ajv.compile(schema); +console.log(validate(2.01)); // true +console.log(validate(3.99)); // true +console.log(validate(2)); // false +console.log(validate(4)); // false +``` + +Several custom keywords (typeof, instanceof, range and propertyNames) are defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package - they can be used for your schemas and as a starting point for your own custom keywords. + +See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. + + +## Asynchronous schema compilation + +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). + +Example: + +```javascript +var ajv = new Ajv({ loadSchema: loadSchema }); + +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... +}); + +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); +} +``` + +__Please note__: [Option](#options) `missingRefs` should NOT be set to `"ignore"` or `"fail"` for asynchronous compilation to work. + + +## Asynchronous validation + +Example in Node.js REPL: https://tonicdev.com/esp/ajv-asynchronous-validation + +You can define custom formats and keywords that perform validation asynchronously by accessing database or some other service. You should add `async: true` in the keyword or format definition (see [addFormat](#api-addformat), [addKeyword](#api-addkeyword) and [Defining custom keywords](#defining-custom-keywords)). + +If your schema uses asynchronous formats/keywords or refers to some schema that contains them it should have `"$async": true` keyword so that Ajv can compile it correctly. If asynchronous format/keyword or reference to asynchronous schema is used in the schema without `$async` keyword Ajv will throw an exception during schema compilation. + +__Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. + +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options). + +The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both synchronous and asynchronous schemas. + +If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle). + +Async functions are currently supported in Chrome 55, Firefox 52, Node.js 7 (with --harmony-async-await) and MS Edge 13 (with flag). + +Generator functions are currently supported in Chrome, Firefox and Node.js. + +If you are using Ajv in other browsers or in older versions of Node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that contains the array of validation errors in `errors` property. + + +Example: + +```javascript +/** + * Default mode is non-transpiled generator function wrapped with `co`. + * Using package ajv-async (https://github.com/epoberezkin/ajv-async) + * you can auto-detect the best async mode. + * In this case, without "async" and "transpile" options + * (or with option {async: true}) + * Ajv will choose the first supported/installed option in this order: + * 1. native async function + * 2. native generator function wrapped with co + * 3. es7 async functions transpiled with nodent + * 4. es7 async functions transpiled with regenerator + */ + +var setupAsync = require('ajv-async'); +var ajv = setupAsync(new Ajv); + +ajv.addKeyword('idExists', { + async: true, + type: 'number', + validate: checkIdExists +}); + + +function checkIdExists(schema, data) { + return knex(schema.table) + .select('id') + .where('id', data) + .then(function (rows) { + return !!rows.length; // true if record is found + }); +} + +var schema = { + "$async": true, + "properties": { + "userId": { + "type": "integer", + "idExists": { "table": "users" } + }, + "postId": { + "type": "integer", + "idExists": { "table": "posts" } + } + } +}; + +var validate = ajv.compile(schema); + +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } +}) +.catch(function (err) { + if (!(err instanceof Ajv.ValidationError)) throw err; + // data is invalid + console.log('Validation errors:', err.errors); +}); +``` + +### Using transpilers with asynchronous validation functions. + +To use a transpiler you should separately install it (or load its bundle in the browser). + +Ajv npm package includes minified browser bundles of regenerator and nodent in dist folder. + + +#### Using nodent + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install nodent` or use `nodent.min.js` from dist folder of npm package. + + +#### Using regenerator + +```javascript +var setupAsync = require('ajv-async'); +var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' }); +setupAsync(ajv); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +`npm install regenerator` or use `regenerator.min.js` from dist folder of npm package. + + +#### Using other transpilers + +```javascript +var ajv = new Ajv({ async: 'es7', processCode: transpileFunc }); +var validate = ajv.compile(schema); // transpiled es7 async function +validate(data).then(successFunc).catch(errorFunc); +``` + +See [Options](#options). + + +#### Comparison of async modes + +|mode|transpile
speed*|run-time
speed*|bundle
size| +|---|:-:|:-:|:-:| +|es7 async
(native)|-|0.75|-| +|generators
(native)|-|1.0|-| +|es7.nodent|1.35|1.1|215Kb| +|es7.regenerator|1.0|2.7|1109Kb| +|regenerator|1.0|3.2|1109Kb| + +\* Relative performance in Node.js 7.x — smaller is better. + +[nodent](https://github.com/MatAtBread/nodent) has several advantages: + +- much smaller browser bundle than regenerator +- almost the same performance of generated code as native generators in Node.js and the latest Chrome +- much better performance than native generators in other browsers +- works in IE 9 (regenerator does not) + + +## Filtering data + +With [option `removeAdditional`](#options) (added by [andyscott](https://github.com/andyscott)) you can filter data during the validation. + +This option modifies original data. + +Example: + +```javascript +var ajv = new Ajv({ removeAdditional: true }); +var schema = { + "additionalProperties": false, + "properties": { + "foo": { "type": "number" }, + "bar": { + "additionalProperties": { "type": "number" }, + "properties": { + "baz": { "type": "string" } + } + } + } +} + +var data = { + "foo": 0, + "additional1": 1, // will be removed; `additionalProperties` == false + "bar": { + "baz": "abc", + "additional2": 2 // will NOT be removed; `additionalProperties` != false + }, +} + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 0, "bar": { "baz": "abc", "additional2": 2 } +``` + +If `removeAdditional` option in the example above were `"all"` then both `additional1` and `additional2` properties would have been removed. + +If the option were `"failing"` then property `additional1` would have been removed regardless of its value and property `additional2` would have been removed only if its value were failing the schema in the inner `additionalProperties` (so in the example above it would have stayed because it passes the schema, but any non-number would have been removed). + +__Please note__: If you use `removeAdditional` option with `additionalProperties` keyword inside `anyOf`/`oneOf` keywords your validation can fail with this schema, for example: + +```json +{ + "type": "object", + "oneOf": [ + { + "properties": { + "foo": { "type": "string" } + }, + "required": [ "foo" ], + "additionalProperties": false + }, + { + "properties": { + "bar": { "type": "integer" } + }, + "required": [ "bar" ], + "additionalProperties": false + } + ] +} +``` + +The intention of the schema above is to allow objects with either the string property "foo" or the integer property "bar", but not with both and not with any other properties. + +With the option `removeAdditional: true` the validation will pass for the object `{ "foo": "abc"}` but will fail for the object `{"bar": 1}`. It happens because while the first subschema in `oneOf` is validated, the property `bar` is removed because it is an additional property according to the standard (because it is not included in `properties` keyword in the same schema). + +While this behaviour is unexpected (issues [#129](https://github.com/epoberezkin/ajv/issues/129), [#134](https://github.com/epoberezkin/ajv/issues/134)), it is correct. To have the expected behaviour (both objects are allowed and additional properties are removed) the schema has to be refactored in this way: + +```json +{ + "type": "object", + "properties": { + "foo": { "type": "string" }, + "bar": { "type": "integer" } + }, + "additionalProperties": false, + "oneOf": [ + { "required": [ "foo" ] }, + { "required": [ "bar" ] } + ] +} +``` + +The schema above is also more efficient - it will compile into a faster function. + + +## Assigning defaults + +With [option `useDefaults`](#options) Ajv will assign values from `default` keyword in the schemas of `properties` and `items` (when it is the array of schemas) to the missing properties and items. + +This option modifies original data. + +__Please note__: by default the default value is inserted in the generated validation code as a literal (starting from v4.0), so the value inserted in the data will be the deep clone of the default in the schema. + +If you need to insert the default value in the data by reference pass the option `useDefaults: "shared"`. + +Inserting defaults by reference can be faster (in case you have an object in `default`) and it allows to have dynamic values in defaults, e.g. timestamp, without recompiling the schema. The side effect is that modifying the default value in any validated data instance will change the default in the schema and in other validated data instances. See example 3 below. + + +Example 1 (`default` in `properties`): + +```javascript +var ajv = new Ajv({ useDefaults: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "string", "default": "baz" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": 1 }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": "baz" } +``` + +Example 2 (`default` in `items`): + +```javascript +var schema = { + "type": "array", + "items": [ + { "type": "number" }, + { "type": "string", "default": "foo" } + ] +} + +var data = [ 1 ]; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // [ 1, "foo" ] +``` + +Example 3 (inserting "defaults" by reference): + +```javascript +var ajv = new Ajv({ useDefaults: 'shared' }); + +var schema = { + properties: { + foo: { + default: { bar: 1 } + } + } +} + +var validate = ajv.compile(schema); + +var data = {}; +console.log(validate(data)); // true +console.log(data); // { foo: { bar: 1 } } + +data.foo.bar = 2; + +var data2 = {}; +console.log(validate(data2)); // true +console.log(data2); // { foo: { bar: 2 } } +``` + +`default` keywords in other cases are ignored: + +- not in `properties` or `items` subschemas +- in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) +- in `if` subschema of `switch` keyword +- in schemas generated by custom macro keywords + + +## Coercing data types + +When you are validating user inputs all your data properties are usually strings. The option `coerceTypes` allows you to have your data types coerced to the types specified in your schema `type` keywords, both to pass the validation and to use the correctly typed data afterwards. + +This option modifies original data. + +__Please note__: if you pass a scalar value to the validating function its type will be coerced and it will pass the validation, but the value of the variable you pass won't be updated because scalars are passed by value. + + +Example 1: + +```javascript +var ajv = new Ajv({ coerceTypes: true }); +var schema = { + "type": "object", + "properties": { + "foo": { "type": "number" }, + "bar": { "type": "boolean" } + }, + "required": [ "foo", "bar" ] +}; + +var data = { "foo": "1", "bar": "false" }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": 1, "bar": false } +``` + +Example 2 (array coercions): + +```javascript +var ajv = new Ajv({ coerceTypes: 'array' }); +var schema = { + "properties": { + "foo": { "type": "array", "items": { "type": "number" } }, + "bar": { "type": "boolean" } + } +}; + +var data = { "foo": "1", "bar": ["false"] }; + +var validate = ajv.compile(schema); + +console.log(validate(data)); // true +console.log(data); // { "foo": [1], "bar": false } +``` + +The coercion rules, as you can see from the example, are different from JavaScript both to validate user input as expected and to have the coercion reversible (to correctly validate cases where different types are defined in subschemas of "anyOf" and other compound keywords). + +See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) for details. + + +## API + +##### new Ajv(Object options) -> Object + +Create Ajv instance. + + +##### .compile(Object schema) -> Function<Object data> + +Generate validating function and cache the compiled schema for future use. + +Validating function returns boolean and has properties `errors` with the errors from the last validation (`null` if there were no errors) and `schema` with the reference to the original schema. + +Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options). + + +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise + +Asynchronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and the callback will be called with an error) when: + +- missing schema can't be loaded (`loadSchema` returns a Promise that rejects). +- a schema containing a missing reference is loaded, but the reference cannot be resolved. +- schema (or some loaded/referenced schema) is invalid. + +The function compiles schema and loads the first missing schema (or meta-schema) until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. + +See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### .validate(Object schema|String key|String ref, data) -> Boolean + +Validate data using passed schema (it will be compiled and cached). + +Instead of the schema you can use the key that was previously passed to `addSchema`, the schema id if it was present in the schema or any previously resolved reference. + +Validation errors will be available in the `errors` property of Ajv instance (`null` if there were no errors). + +__Please note__: every time this method is called the errors are overwritten so you need to copy them to another variable if you want to use them later. + +If the schema is asynchronous (has `$async` keyword on the top level) this method returns a Promise. See [Asynchronous validation](#asynchronous-validation). + + +##### .addSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Add schema(s) to validator instance. This method does not compile schemas (but it still validates them). Because of that dependencies can be added in any order and circular dependencies are supported. It also prevents unnecessary compilation of schemas that are containers for other schemas but not used as a whole. + +Array of schemas can be passed (schemas should have ids), the second parameter will be ignored. + +Key can be passed that can be used to reference the schema and will be used as the schema id if there is no id inside the schema. If the key is not passed, the schema id will be used as the key. + + +Once the schema is added, it (and all the references inside it) can be referenced in other schemas and used to validate data. + +Although `addSchema` does not compile schemas, explicit compilation is not required - the schema will be compiled when it is used first time. + +By default the schema is validated against meta-schema before it is added, and if the schema does not pass validation the exception is thrown. This behaviour is controlled by `validateSchema` option. + +__Please note__: Ajv uses the [method chaining syntax](https://en.wikipedia.org/wiki/Method_chaining) for all methods with the prefix `add*` and `remove*`. +This allows you to do nice things like the following. + +```javascript +var validate = new Ajv().addSchema(schema).addFormat(name, regex).getSchema(uri); +``` + +##### .addMetaSchema(Array<Object>|Object schema [, String key]) -> Ajv + +Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). + +There is no need to explicitly add draft 6 meta schema (http://json-schema.org/draft-06/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. + + +##### .validateSchema(Object schema) -> Boolean + +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. + +By default this method is called automatically when the schema is added, so you rarely need to use it directly. + +If schema doesn't have `$schema` property, it is validated against draft 6 meta-schema (option `meta` should not be false). + +If schema has `$schema` property, then the schema with this id (that should be previously added) is used to validate passed schema. + +Errors will be available at `ajv.errors`. + + +##### .getSchema(String key) -> Function<Object data> + +Retrieve compiled schema previously added with `addSchema` by the key passed to `addSchema` or by its full reference (id). The returned validating function has `schema` property with the reference to the original schema. + + +##### .removeSchema([Object schema|String key|String ref|RegExp pattern]) -> Ajv + +Remove added/cached schema. Even if schema is referenced by other schemas it can be safely removed as dependent schemas have local references. + +Schema can be removed using: +- key passed to `addSchema` +- it's full reference (id) +- RegExp that should match schema id or key (meta-schemas won't be removed) +- actual schema object that will be stable-stringified to remove schema from cache + +If no parameter is passed all schemas but meta-schemas will be removed and the cache will be cleared. + + +##### .addFormat(String name, String|RegExp|Function|Object format) -> Ajv + +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. + +Strings are converted to RegExp. + +Function should return validation result as `true` or `false`. + +If object is passed it should have properties `validate`, `compare` and `async`: + +- _validate_: a string, RegExp or a function as described above. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. + +Custom formats can be also added via `formats` option. + + +##### .addKeyword(String keyword, Object definition) -> Ajv + +Add custom validation keyword to Ajv instance. + +Keyword should be different from all standard JSON schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. + +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. + +Example Keywords: +- `"xyz-example"`: valid, and uses prefix for the xyz project to avoid name collisions. +- `"example"`: valid, but not recommended as it could collide with future versions of JSON schema etc. +- `"3-example"`: invalid as numbers are not allowed to be the first character in a keyword + +Keyword definition is an object with the following properties: + +- _type_: optional string or array of strings with data type(s) that the keyword applies to. If not present, the keyword will apply to all types. +- _validate_: validating function +- _compile_: compiling function +- _macro_: macro function +- _inline_: compiling function that returns code (as string) +- _schema_: an optional `false` value used with "validate" keyword to not pass schema +- _metaSchema_: an optional meta-schema for keyword schema +- _modifying_: `true` MUST be passed if keyword modifies data +- _valid_: pass `true`/`false` to pre-define validation result, the result returned from validation function will be ignored. This option cannot be used with macro keywords. +- _$data_: an optional `true` value to support [$data reference](#data-reference) as the value of custom keyword. The reference will be resolved at validation time. If the keyword has meta-schema it would be extended to allow $data and it will be used to validate the resolved value. Supporting $data reference requires that keyword has validating function (as the only option or in addition to compile, macro or inline function). +- _async_: an optional `true` value if the validation function is asynchronous (whether it is compiled or passed in _validate_ property); in this case it should return a promise that resolves with a value `true` or `false`. This option is ignored in case of "macro" and "inline" keywords. +- _errors_: an optional boolean indicating whether keyword returns errors. If this property is not set Ajv will determine if the errors were set in case of failed validation. + +_compile_, _macro_ and _inline_ are mutually exclusive, only one should be used at a time. _validate_ can be used separately or in addition to them to support $data reference. + +__Please note__: If the keyword is validating data type that is different from the type(s) in its definition, the validation function will not be called (and expanded macro will not be used), so there is no need to check for data type inside validation function or inside schema returned by macro function (unless you want to enforce a specific type and for some reason do not want to use a separate `type` keyword for that). In the same way as standard keywords work, if the keyword does not apply to the data type being validated, the validation of this keyword will succeed. + +See [Defining custom keywords](#defining-custom-keywords) for more details. + + +##### .getKeyword(String keyword) -> Object|Boolean + +Returns custom keyword definition, `true` for pre-defined keywords and `false` if the keyword is unknown. + + +##### .removeKeyword(String keyword) -> Ajv + +Removes custom or pre-defined keyword so you can redefine them. + +While this method can be used to extend pre-defined keywords, it can also be used to completely change their meaning - it may lead to unexpected results. + +__Please note__: schemas compiled before the keyword is removed will continue to work without changes. To recompile schemas use `removeSchema` method and compile them again. + + +##### .errorsText([Array<Object> errors [, Object options]]) -> String + +Returns the text with all errors in a String. + +Options can have properties `separator` (string used to separate errors, ", " by default) and `dataVar` (the variable name that dataPaths are prefixed with, "data" by default). + + +## Options + +Defaults: + +```javascript +{ + // validation and reporting options: + $data: false, + allErrors: false, + verbose: false, + jsonPointers: false, + uniqueItems: true, + unicode: true, + format: 'fast', + formats: {}, + unknownFormats: true, + schemas: {}, + logger: undefined, + // referenced schema options: + schemaId: undefined // recommended '$id' + missingRefs: true, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} + // options to modify validated data: + removeAdditional: false, + useDefaults: false, + coerceTypes: false, + // asynchronous validation options: + async: 'co*', + transpile: undefined, // requires ajv-async package + // advanced options: + meta: true, + validateSchema: true, + addUsedSchema: true, + inlineRefs: true, + passContext: false, + loopRequired: Infinity, + ownProperties: false, + multipleOfPrecision: false, + errorDataPath: 'object', + messages: true, + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined +} +``` + +##### Validation and reporting options + +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). +- _allErrors_: check all rules collecting all errors. Default is to return after the first error. +- _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). +- _jsonPointers_: set `dataPath` property of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. +- _uniqueItems_: validate `uniqueItems` keyword (true by default). +- _unicode_: calculate correct length of strings with unicode pairs (true by default). Pass `false` to use `.length` of strings that is faster, but gives "incorrect" lengths of strings with unicode pairs - each unicode pair is counted as two characters. +- _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. +- _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. +- _unknownFormats_: handling of unknown formats. Option values: + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. +- _logger_: sets the logging method. Default is the global `console` object that should have methods `log`, `warn` and `error`. Option values: + - custom logger - it should have methods `log`, `warn` and `error`. If any of these methods is missing an exception will be thrown. + - `false` - logging is disabled. + + +##### Referenced schema options + +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. +- _missingRefs_: handling of missing referenced schemas. Option values: + - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). + - `"ignore"` - to log error during compilation and always pass validation. + - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. +- _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recommended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). + + +##### Options to modify validated data + +- _removeAdditional_: remove additional properties - see example in [Filtering data](#filtering-data). This option is not used if schema is added with `addMetaSchema` method. Option values: + - `false` (default) - not to remove additional properties + - `"all"` - all additional properties are removed, regardless of `additionalProperties` keyword in schema (and no validation is made for them). + - `true` - only additional properties with `additionalProperties` keyword equal to `false` are removed. + - `"failing"` - additional properties that fail schema validation will be removed (where `additionalProperties` keyword is `false` or schema). +- _useDefaults_: replace missing properties and items with the values from corresponding `default` keywords. Default behaviour is to ignore `default` keywords. This option is not used if schema is added with `addMetaSchema` method. See examples in [Assigning defaults](#assigning-defaults). Option values: + - `false` (default) - do not use defaults + - `true` - insert defaults by value (safer and slower, object literal is used). + - `"shared"` - insert defaults by reference (faster). If the default is an object, it will be shared by all instances of validated data. If you modify the inserted default in the validated data, it will be modified in the schema as well. +- _coerceTypes_: change data type of data to match `type` keyword. See the example in [Coercing data types](#coercing-data-types) and [coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md). Option values: + - `false` (default) - no type coercion. + - `true` - coerce scalar data types. + - `"array"` - in addition to coercions between scalar types, coerce scalar data to an array with one element and vice versa (as required by the schema). + + +##### Asynchronous validation options + +- _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values: + - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled. + - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode` or `transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by: + - Firefox 52, + - Chrome 55, + - Node.js 7 (with `--harmony-async-await`), + - MS Edge 13 (with flag). + - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If `transpile` option is not passed, ajv-async will choose the first of supported/installed async/transpile modes in this order: + - "es7" (native async functions), + - "co*" (native generators with co.wrap), + - "es7"/"nodent", + - "co*"/"regenerator" during the creation of the Ajv instance. + + If none of the options is available the exception will be thrown. +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode. + - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown. + - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async. + + +##### Advanced options + +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: + - `true` (default) - if the validation fails, throw the exception. + - `"log"` - if the validation fails, log error. + - `false` - skip schema validation. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _inlineRefs_: Affects compilation of referenced schemas. Option values: + - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. + - `false` - to not inline referenced schemas (they will be compiled as separate functions). + - integer number - to limit the maximum number of keywords of the schema that will be inlined. +- _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. +- _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). +- _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. +- _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. +- _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used. + + +## Validation errors + +In case of validation failure, Ajv assigns the array of errors to `errors` property of validation function (or to `errors` property of Ajv instance when `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation), the returned promise is rejected with exception `Ajv.ValidationError` that has `errors` property. + + +### Error objects + +Each error is an object with the following properties: + +- _keyword_: validation keyword. +- _dataPath_: the path to the part of the data that was validated. By default `dataPath` uses JavaScript property access notation (e.g., `".prop[1].subProp"`). When the option `jsonPointers` is true (see [Options](#options)) `dataPath` will be set using JSON pointer standard (e.g., `"/prop/1/subProp"`). +- _schemaPath_: the path (JSON-pointer as a URI fragment) to the schema of the keyword that failed validation. +- _params_: the object with the additional information about error that can be used to create custom error messages (e.g., using [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package). See below for parameters set by all keywords. +- _message_: the standard error message (can be excluded with option `messages` set to false). +- _schema_: the schema of the keyword (added with `verbose` option). +- _parentSchema_: the schema containing the keyword (added with `verbose` option) +- _data_: the data validated by the keyword (added with `verbose` option). + +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + + +### Error parameters + +Properties of `params` object in errors depend on the keyword that failed validation. + +- `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). +- `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). +- `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). +- `dependencies` - properties: + - `property` (dependent property), + - `missingProperty` (required missing dependency - only the first one is reported currently) + - `deps` (required dependencies, comma separated list as a string), + - `depsCount` (the number of required dependencies). +- `format` - property `format` (the schema of the keyword). +- `maximum`, `minimum` - properties: + - `limit` (number, the schema of the keyword), + - `exclusive` (boolean, the schema of `exclusiveMaximum` or `exclusiveMinimum`), + - `comparison` (string, comparison operation to compare the data to the limit, with the data on the left and the limit on the right; can be "<", "<=", ">", ">=") +- `multipleOf` - property `multipleOf` (the schema of the keyword) +- `pattern` - property `pattern` (the schema of the keyword) +- `required` - property `missingProperty` (required property that is missing). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). +- `type` - property `type` (required type(s), a string, can be a comma-separated list) +- `uniqueItems` - properties `i` and `j` (indices of duplicate items). +- `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). +- `$ref` - property `ref` with the referenced schema URI. +- custom keywords (in case keyword definition doesn't create errors) - property `keyword` (the keyword name). + + +## Related packages + +- [ajv-async](https://github.com/epoberezkin/ajv-async) - configure async validation mode +- [ajv-cli](https://github.com/jessedc/ajv-cli) - command line interface +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages +- [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages +- [ajv-istanbul](https://github.com/epoberezkin/ajv-istanbul) - instrument generated validation code to measure test coverage of your schemas +- [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - custom validation keywords (if/then/else, select, typeof, etc.) +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch +- [ajv-pack](https://github.com/epoberezkin/ajv-pack) - produces a compact module exporting validation functions + + +## Some packages using Ajv + +- [webpack](https://github.com/webpack/webpack) - a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser +- [jsonscript-js](https://github.com/JSONScript/jsonscript-js) - the interpreter for [JSONScript](http://www.jsonscript.org) - scripted processing of existing endpoints and services +- [osprey-method-handler](https://github.com/mulesoft-labs/osprey-method-handler) - Express middleware for validating requests and responses based on a RAML method object, used in [osprey](https://github.com/mulesoft/osprey) - validating API proxy generated from a RAML definition +- [har-validator](https://github.com/ahmadnassri/har-validator) - HTTP Archive (HAR) validator +- [jsoneditor](https://github.com/josdejong/jsoneditor) - a web-based tool to view, edit, format, and validate JSON http://jsoneditoronline.org +- [JSON Schema Lint](https://github.com/nickcmaynard/jsonschemalint) - a web tool to validate JSON/YAML document against a single JSON-schema http://jsonschemalint.com +- [objection](https://github.com/vincit/objection.js) - SQL-friendly ORM for Node.js +- [table](https://github.com/gajus/table) - formats data into a string table +- [ripple-lib](https://github.com/ripple/ripple-lib) - a JavaScript API for interacting with [Ripple](https://ripple.com) in Node.js and the browser +- [restbase](https://github.com/wikimedia/restbase) - distributed storage with REST API & dispatcher for backend services built to provide a low-latency & high-throughput API for Wikipedia / Wikimedia content +- [hippie-swagger](https://github.com/CacheControl/hippie-swagger) - [Hippie](https://github.com/vesln/hippie) wrapper that provides end to end API testing with swagger validation +- [react-form-controlled](https://github.com/seeden/react-form-controlled) - React controlled form components with validation +- [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages +- [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema +- [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema +- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file +- [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app +- [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter +- [gh-pages-generator](https://github.com/epoberezkin/gh-pages-generator) - multi-page site generator converting markdown files to GitHub pages + + +## Tests + +``` +npm install +git submodule update --init +npm test +``` + +## Contributing + +All validation functions are generated using doT templates in [dot](https://github.com/epoberezkin/ajv/tree/master/lib/dot) folder. Templates are precompiled so doT is not a run-time dependency. + +`npm run build` - compiles templates to [dotjs](https://github.com/epoberezkin/ajv/tree/master/lib/dotjs) folder. + +`npm run watch` - automatically compiles templates when files in dot folder change + +Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/master/CONTRIBUTING.md) + + +## Changes history + +See https://github.com/epoberezkin/ajv/releases + +__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). + +[Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0). + +[Changes in version 4.0.0](https://github.com/epoberezkin/ajv/releases/tag/4.0.0). + +[Changes in version 3.0.0](https://github.com/epoberezkin/ajv/releases/tag/3.0.0). + +[Changes in version 2.0.0](https://github.com/epoberezkin/ajv/releases/tag/2.0.0). + + +## License + +[MIT](https://github.com/epoberezkin/ajv/blob/master/LICENSE) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.bundle.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.bundle.js new file mode 100644 index 0000000..01d5632 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/ajv.bundle.js @@ -0,0 +1,7345 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; + + +module.exports = formats; + +function formats(mode) { + mode = mode == 'full' ? 'full' : 'fast'; + return util.copy(formats[mode]); +} + + +formats.fast = { + // date: http://tools.ietf.org/html/rfc3339#section-5.6 + date: /^\d\d\d\d-[0-1]\d-[0-3]\d$/, + // date-time: http://tools.ietf.org/html/rfc3339#section-5.6 + time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, + 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, + // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js + uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, + 'uri-template': URITEMPLATE, + url: URL, + // email (sources from jsen validator): + // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 + // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + hostname: HOSTNAME, + // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + // uuid: http://tools.ietf.org/html/rfc4122 + uuid: UUID, + // JSON-pointer: https://tools.ietf.org/html/rfc6901 + // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A + 'json-pointer': JSON_POINTER, + // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00 + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +formats.full = { + date: date, + time: time, + 'date-time': date_time, + uri: uri, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + hostname: hostname, + ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, + ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, + regex: regex, + uuid: UUID, + 'json-pointer': JSON_POINTER, + 'relative-json-pointer': RELATIVE_JSON_POINTER +}; + + +function date(str) { + // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 + var matches = str.match(DATE); + if (!matches) return false; + + var month = +matches[1]; + var day = +matches[2]; + return month >= 1 && month <= 12 && day >= 1 && day <= DAYS[month]; +} + + +function time(str, full) { + var matches = str.match(TIME); + if (!matches) return false; + + var hour = matches[1]; + var minute = matches[2]; + var second = matches[3]; + var timeZone = matches[5]; + return hour <= 23 && minute <= 59 && second <= 59 && (!full || timeZone); +} + + +var DATE_TIME_SEPARATOR = /t|\s/i; +function date_time(str) { + // http://tools.ietf.org/html/rfc3339#section-5.6 + var dateTime = str.split(DATE_TIME_SEPARATOR); + return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true); +} + + +function hostname(str) { + // https://tools.ietf.org/html/rfc1034#section-3.5 + // https://tools.ietf.org/html/rfc1123#section-2 + return str.length <= 255 && HOSTNAME.test(str); +} + + +var NOT_URI_FRAGMENT = /\/|:/; +function uri(str) { + // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." + return NOT_URI_FRAGMENT.test(str) && URI.test(str); +} + + +var Z_ANCHOR = /[^\\]\\Z/; +function regex(str) { + if (Z_ANCHOR.test(str)) return false; + try { + new RegExp(str); + return true; + } catch(e) { + return false; + } +} + +},{"./util":12}],7:[function(require,module,exports){ +'use strict'; + +var resolve = require('./resolve') + , util = require('./util') + , errorClasses = require('./error_classes') + , stableStringify = require('fast-json-stable-stringify'); + +var validateGenerator = require('../dotjs/validate'); + +/** + * Functions below are used inside compiled validations function + */ + +var co = require('co'); +var ucs2length = util.ucs2length; +var equal = require('fast-deep-equal'); + +// this error is thrown by async schemas to return validation errors via exception +var ValidationError = errorClasses.Validation; + +module.exports = compile; + + +/** + * Compiles schema to validation function + * @this Ajv + * @param {Object} schema schema object + * @param {Object} root object with information about the root schema for this schema + * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution + * @param {String} baseId base ID for IDs in the schema + * @return {Function} validation function + */ +function compile(schema, root, localRefs, baseId) { + /* jshint validthis: true, evil: true */ + /* eslint no-shadow: 0 */ + var self = this + , opts = this._opts + , refVal = [ undefined ] + , refs = {} + , patterns = [] + , patternsHash = {} + , defaults = [] + , defaultsHash = {} + , customRules = []; + + root = root || { schema: schema, refVal: refVal, refs: refs }; + + var c = checkCompiling.call(this, schema, root, baseId); + var compilation = this._compilations[c.index]; + if (c.compiling) return (compilation.callValidate = callValidate); + + var formats = this._formats; + var RULES = this.RULES; + + try { + var v = localCompile(schema, root, localRefs, baseId); + compilation.validate = v; + var cv = compilation.callValidate; + if (cv) { + cv.schema = v.schema; + cv.errors = null; + cv.refs = v.refs; + cv.refVal = v.refVal; + cv.root = v.root; + cv.$async = v.$async; + if (opts.sourceCode) cv.source = v.source; + } + return v; + } finally { + endCompiling.call(this, schema, root, baseId); + } + + function callValidate() { + var validate = compilation.validate; + var result = validate.apply(null, arguments); + callValidate.errors = validate.errors; + return result; + } + + function localCompile(_schema, _root, localRefs, baseId) { + var isRoot = !_root || (_root && _root.schema == _schema); + if (_root.schema != root.schema) + return compile.call(self, _schema, _root, localRefs, baseId); + + var $async = _schema.$async === true; + + var sourceCode = validateGenerator({ + isTop: true, + schema: _schema, + isRoot: isRoot, + baseId: baseId, + root: _root, + schemaPath: '', + errSchemaPath: '#', + errorPath: '""', + MissingRefError: errorClasses.MissingRef, + RULES: RULES, + validate: validateGenerator, + util: util, + resolve: resolve, + resolveRef: resolveRef, + usePattern: usePattern, + useDefault: useDefault, + useCustomRule: useCustomRule, + opts: opts, + formats: formats, + logger: self.logger, + self: self + }); + + sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + + sourceCode; + + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; + try { + var makeValidate = new Function( + 'self', + 'RULES', + 'formats', + 'root', + 'refVal', + 'defaults', + 'customRules', + 'co', + 'equal', + 'ucs2length', + 'ValidationError', + sourceCode + ); + + validate = makeValidate( + self, + RULES, + formats, + root, + refVal, + defaults, + customRules, + co, + equal, + ucs2length, + ValidationError + ); + + refVal[0] = validate; + } catch(e) { + self.logger.error('Error compiling schema, function code:', sourceCode); + throw e; + } + + validate.schema = _schema; + validate.errors = null; + validate.refs = refs; + validate.refVal = refVal; + validate.root = isRoot ? validate : _root; + if ($async) validate.$async = true; + if (opts.sourceCode === true) { + validate.source = { + code: sourceCode, + patterns: patterns, + defaults: defaults + }; + } + + return validate; + } + + function resolveRef(baseId, ref, isRoot) { + ref = resolve.url(baseId, ref); + var refIndex = refs[ref]; + var _refVal, refCode; + if (refIndex !== undefined) { + _refVal = refVal[refIndex]; + refCode = 'refVal[' + refIndex + ']'; + return resolvedRef(_refVal, refCode); + } + if (!isRoot && root.refs) { + var rootRefId = root.refs[ref]; + if (rootRefId !== undefined) { + _refVal = root.refVal[rootRefId]; + refCode = addLocalRef(ref, _refVal); + return resolvedRef(_refVal, refCode); + } + } + + refCode = addLocalRef(ref); + var v = resolve.call(self, localCompile, root, ref); + if (v === undefined) { + var localSchema = localRefs && localRefs[ref]; + if (localSchema) { + v = resolve.inlineRef(localSchema, opts.inlineRefs) + ? localSchema + : compile.call(self, localSchema, root, localRefs, baseId); + } + } + + if (v === undefined) { + removeLocalRef(ref); + } else { + replaceLocalRef(ref, v); + return resolvedRef(v, refCode); + } + } + + function addLocalRef(ref, v) { + var refId = refVal.length; + refVal[refId] = v; + refs[ref] = refId; + return 'refVal' + refId; + } + + function removeLocalRef(ref) { + delete refs[ref]; + } + + function replaceLocalRef(ref, v) { + var refId = refs[ref]; + refVal[refId] = v; + } + + function resolvedRef(refVal, code) { + return typeof refVal == 'object' || typeof refVal == 'boolean' + ? { code: code, schema: refVal, inline: true } + : { code: code, $async: refVal && refVal.$async }; + } + + function usePattern(regexStr) { + var index = patternsHash[regexStr]; + if (index === undefined) { + index = patternsHash[regexStr] = patterns.length; + patterns[index] = regexStr; + } + return 'pattern' + index; + } + + function useDefault(value) { + switch (typeof value) { + case 'boolean': + case 'number': + return '' + value; + case 'string': + return util.toQuotedString(value); + case 'object': + if (value === null) return 'null'; + var valueStr = stableStringify(value); + var index = defaultsHash[valueStr]; + if (index === undefined) { + index = defaultsHash[valueStr] = defaults.length; + defaults[index] = value; + } + return 'default' + index; + } + } + + function useCustomRule(rule, schema, parentSchema, it) { + var validateSchema = rule.definition.validateSchema; + if (validateSchema && self._opts.validateSchema !== false) { + var valid = validateSchema(schema); + if (!valid) { + var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors); + if (self._opts.validateSchema == 'log') self.logger.error(message); + else throw new Error(message); + } + } + + var compile = rule.definition.compile + , inline = rule.definition.inline + , macro = rule.definition.macro; + + var validate; + if (compile) { + validate = compile.call(self, schema, parentSchema, it); + } else if (macro) { + validate = macro.call(self, schema, parentSchema, it); + if (opts.validateSchema !== false) self.validateSchema(validate, true); + } else if (inline) { + validate = inline.call(self, it, rule.keyword, schema, parentSchema); + } else { + validate = rule.definition.validate; + if (!validate) return; + } + + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + + var index = customRules.length; + customRules[index] = validate; + + return { + code: 'customRule' + index, + validate: validate + }; + } +} + + +/** + * Checks if the schema is currently compiled + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Object} object with properties "index" (compilation index) and "compiling" (boolean) + */ +function checkCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var index = compIndex.call(this, schema, root, baseId); + if (index >= 0) return { index: index, compiling: true }; + index = this._compilations.length; + this._compilations[index] = { + schema: schema, + root: root, + baseId: baseId + }; + return { index: index, compiling: false }; +} + + +/** + * Removes the schema from the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + */ +function endCompiling(schema, root, baseId) { + /* jshint validthis: true */ + var i = compIndex.call(this, schema, root, baseId); + if (i >= 0) this._compilations.splice(i, 1); +} + + +/** + * Index of schema compilation in the currently compiled list + * @this Ajv + * @param {Object} schema schema to compile + * @param {Object} root root object + * @param {String} baseId base schema ID + * @return {Integer} compilation index + */ +function compIndex(schema, root, baseId) { + /* jshint validthis: true */ + for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) { + // high surrogate, and there is a next character + value = str.charCodeAt(pos); + if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate + } + } + return length; +}; + +},{}],12:[function(require,module,exports){ +'use strict'; + + +module.exports = { + copy: copy, + checkDataType: checkDataType, + checkDataTypes: checkDataTypes, + coerceToTypes: coerceToTypes, + toHash: toHash, + getProperty: getProperty, + escapeQuotes: escapeQuotes, + equal: require('fast-deep-equal'), + ucs2length: require('./ucs2length'), + varOccurences: varOccurences, + varReplace: varReplace, + cleanUpCode: cleanUpCode, + finalCleanUpCode: finalCleanUpCode, + schemaHasRules: schemaHasRules, + schemaHasRulesExcept: schemaHasRulesExcept, + toQuotedString: toQuotedString, + getPathExpr: getPathExpr, + getPath: getPath, + getData: getData, + unescapeFragment: unescapeFragment, + unescapeJsonPointer: unescapeJsonPointer, + escapeFragment: escapeFragment, + escapeJsonPointer: escapeJsonPointer +}; + + +function copy(o, to) { + to = to || {}; + for (var key in o) to[key] = o[key]; + return to; +} + + +function checkDataType(dataType, data, negate) { + var EQUAL = negate ? ' !== ' : ' === ' + , AND = negate ? ' || ' : ' && ' + , OK = negate ? '!' : '' + , NOT = negate ? '' : '!'; + switch (dataType) { + case 'null': return data + EQUAL + 'null'; + case 'array': return OK + 'Array.isArray(' + data + ')'; + case 'object': return '(' + OK + data + AND + + 'typeof ' + data + EQUAL + '"object"' + AND + + NOT + 'Array.isArray(' + data + '))'; + case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND + + NOT + '(' + data + ' % 1)' + + AND + data + EQUAL + data + ')'; + default: return 'typeof ' + data + EQUAL + '"' + dataType + '"'; + } +} + + +function checkDataTypes(dataTypes, data) { + switch (dataTypes.length) { + case 1: return checkDataType(dataTypes[0], data, true); + default: + var code = ''; + var types = toHash(dataTypes); + if (types.array && types.object) { + code = types.null ? '(': '(!' + data + ' || '; + code += 'typeof ' + data + ' !== "object")'; + delete types.null; + delete types.array; + delete types.object; + } + if (types.number) delete types.integer; + for (var t in types) + code += (code ? ' && ' : '' ) + checkDataType(t, data, true); + + return code; + } +} + + +var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]); +function coerceToTypes(optionCoerceTypes, dataTypes) { + if (Array.isArray(dataTypes)) { + var types = []; + for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl); + return paths[lvl - up]; + } + + if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl); + data = 'data' + ((lvl - up) || ''); + if (!jsonPointer) return data; + } + + var expr = data; + var segments = jsonPointer.split('/'); + for (var i=0; i', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; + if ($isDataExcl) { + var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), + $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, + $opExpr = 'op' + $lvl, + $opStr = '\' + ' + $opExpr + ' + \''; + out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; + $schemaValueExcl = 'schemaExcl' + $lvl; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; + var $errorKeyword = $exclusiveKeyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + } else { + var $exclIsNumber = typeof $schemaExcl == 'number', + $opStr = $op; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; + } else { + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; + } else { + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } + } + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; + } + } + $errorKeyword = $errorKeyword || $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be ' + ($opStr) + ' '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],14:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxItems' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxItems') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],15:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitLength(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxLength' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + if (it.opts.unicode === false) { + out += ' ' + ($data) + '.length '; + } else { + out += ' ucs2length(' + ($data) + ') '; + } + out += ' ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitLength') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be '; + if ($keyword == 'maxLength') { + out += 'longer'; + } else { + out += 'shorter'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' characters\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],16:[function(require,module,exports){ +'use strict'; +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $op = $keyword == 'maxProperties' ? '>' : '<'; + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { '; + var $errorKeyword = $keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || '_limitProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have '; + if ($keyword == 'maxProperties') { + out += 'more'; + } else { + out += 'less'; + } + out += ' than '; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + ($schema); + } + out += ' properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],17:[function(require,module,exports){ +'use strict'; +module.exports = function generate_allOf(it, $keyword, $ruleType) { + var out = ' '; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $currentBaseId = $it.baseId, + $allSchemasEmpty = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $allSchemasEmpty = false; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($breakOnError) { + if ($allSchemasEmpty) { + out += ' if (true) { '; + } else { + out += ' ' + ($closingBraces.slice(0, -1)) + ' '; + } + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],18:[function(require,module,exports){ +'use strict'; +module.exports = function generate_anyOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $noEmptySchema = $schema.every(function($sch) { + return it.util.schemaHasRules($sch, it.RULES.all); + }); + if ($noEmptySchema) { + var $currentBaseId = $it.baseId; + out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match some schema in anyOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],19:[function(require,module,exports){ +'use strict'; +module.exports = function generate_const(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (!$isData) { + out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';'; + } + out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should be equal to constant\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],21:[function(require,module,exports){ +'use strict'; +module.exports = function generate_custom(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $rule = this, + $definition = 'definition' + $lvl, + $rDef = $rule.definition, + $closingBraces = ''; + var $compile, $inline, $macro, $ruleValidate, $validateCode; + if ($isData && $rDef.$data) { + $validateCode = 'keywordValidate' + $lvl; + var $validateSchema = $rDef.validateSchema; + out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; + } else { + $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; + $schemaValue = 'validate.schema' + $schemaPath; + $validateCode = $ruleValidate.code; + $compile = $rDef.compile; + $inline = $rDef.inline; + $macro = $rDef.macro; + } + var $ruleErrs = $validateCode + '.errors', + $i = 'i' + $lvl, + $ruleErr = 'ruleErr' + $lvl, + $asyncKeyword = $rDef.async; + if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema'); + if (!($inline || $macro)) { + out += '' + ($ruleErrs) + ' = null;'; + } + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } + } + if ($inline) { + if ($rDef.statements) { + out += ' ' + ($ruleValidate.validate) + ' '; + } else { + out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; '; + } + } else if ($macro) { + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + $it.schema = $ruleValidate.validate; + $it.schemaPath = ''; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it).replace(/validate\.schema/g, $validateCode); + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($code); + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + out += ' ' + ($validateCode) + '.call( '; + if (it.opts.passContext) { + out += 'this'; + } else { + out += 'self'; + } + if ($compile || $rDef.schema === false) { + out += ' , ' + ($data) + ' '; + } else { + out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' '; + } + out += ' , (dataPath || \'\')'; + if (it.errorPath != '""') { + out += ' + ' + (it.errorPath); + } + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) '; + var def_callRuleValidate = out; + out = $$outStack.pop(); + if ($rDef.errors === false) { + out += ' ' + ($valid) + ' = '; + if ($asyncKeyword) { + out += '' + (it.yieldAwait); + } + out += '' + (def_callRuleValidate) + '; '; + } else { + if ($asyncKeyword) { + $ruleErrs = 'customErrors' + $lvl; + out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = ' + (it.yieldAwait) + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } '; + } else { + out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; '; + } + } + } + if ($rDef.modifying) { + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; + } + out += '' + ($closingBraces); + if ($rDef.valid) { + if ($breakOnError) { + out += ' if (true) { '; + } + } else { + out += ' if ( '; + if ($rDef.valid === undefined) { + out += ' !'; + if ($macro) { + out += '' + ($nextValid); + } else { + out += '' + ($valid); + } + } else { + out += ' ' + (!$rDef.valid) + ' '; + } + out += ') { '; + $errorKeyword = $rule.keyword; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'custom') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \'' + ($rule.keyword) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should pass "' + ($rule.keyword) + '" keyword validation\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + var def_customError = out; + out = $$outStack.pop(); + if ($inline) { + if ($rDef.errors) { + if ($rDef.errors != 'full') { + out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + '= 0) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); + } + } + var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; + if ($isObject) { + var $async = $format.async === true; + $format = $format.validate; + } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } + if ($async) { + if (!it.async) throw new Error('async format in sync schema'); + var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; + out += ' if (!(' + (it.yieldAwait) + ' ' + ($formatRef) + '(' + ($data) + '))) { '; + } else { + out += ' if (! '; + var $formatRef = 'formats' + it.util.getProperty($schema); + if ($isObject) $formatRef += '.validate'; + if (typeof $format == 'function') { + out += ' ' + ($formatRef) + '(' + ($data) + ') '; + } else { + out += ' ' + ($formatRef) + '.test(' + ($data) + ') '; + } + out += ') { '; + } + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('format') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match format "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],25:[function(require,module,exports){ +'use strict'; +module.exports = function generate_items(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId; + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if (Array.isArray($schema)) { + var $additionalItems = it.schema.additionalItems; + if ($additionalItems === false) { + out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have more than ' + ($schema.length) + ' items\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } + } + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { '; + var $passData = $data + '[' + $i + ']'; + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true); + $it.dataPathArr[$dataNxt] = $i; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if (typeof $additionalItems == 'object' && it.util.schemaHasRules($additionalItems, it.RULES.all)) { + $it.schema = $additionalItems; + $it.schemaPath = it.schemaPath + '.additionalItems'; + $it.errSchemaPath = it.errSchemaPath + '/additionalItems'; + out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } else if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' }'; + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],26:[function(require,module,exports){ +'use strict'; +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + out += 'var division' + ($lvl) + ';if ('; + if ($isData) { + out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \'number\' || '; + } + out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', '; + if (it.opts.multipleOfPrecision) { + out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' '; + } else { + out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') '; + } + out += ' ) '; + if ($isData) { + out += ' ) '; + } + out += ' ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('multipleOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be multiple of '; + if ($isData) { + out += '\' + ' + ($schemaValue); + } else { + out += '' + ($schemaValue) + '\''; + } + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],27:[function(require,module,exports){ +'use strict'; +module.exports = function generate_not(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.createErrors = false; + var $allErrorsOption; + if ($it.opts.allErrors) { + $allErrorsOption = $it.opts.allErrors; + $it.opts.allErrors = false; + } + out += ' ' + (it.validate($it)) + ' '; + $it.createErrors = true; + if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (' + ($nextValid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + if (it.opts.allErrors) { + out += ' } '; + } + } else { + out += ' var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('not') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT be valid\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if ($breakOnError) { + out += ' if (false) { '; + } + } + return out; +} + +},{}],28:[function(require,module,exports){ +'use strict'; +module.exports = function generate_oneOf(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + out += 'var ' + ($errs) + ' = errors;var prevValid' + ($lvl) + ' = false;var ' + ($valid) + ' = false;'; + var $currentBaseId = $it.baseId; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var arr1 = $schema; + if (arr1) { + var $sch, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $sch = arr1[$i += 1]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = $schemaPath + '[' + $i + ']'; + $it.errSchemaPath = $errSchemaPath + '/' + $i; + out += ' ' + (it.validate($it)) + ' '; + $it.baseId = $currentBaseId; + } else { + out += ' var ' + ($nextValid) + ' = true; '; + } + if ($i) { + out += ' if (' + ($nextValid) + ' && prevValid' + ($lvl) + ') ' + ($valid) + ' = false; else { '; + $closingBraces += '}'; + } + out += ' if (' + ($nextValid) + ') ' + ($valid) + ' = prevValid' + ($lvl) + ' = true;'; + } + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should match exactly one schema in oneOf\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; + if (it.opts.allErrors) { + out += ' } '; + } + return out; +} + +},{}],29:[function(require,module,exports){ +'use strict'; +module.exports = function generate_pattern(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema); + out += 'if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; + } + out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('pattern') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: '; + if ($isData) { + out += '' + ($schemaValue); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should match pattern "'; + if ($isData) { + out += '\' + ' + ($schemaValue) + ' + \''; + } else { + out += '' + (it.util.escapeQuotes($schema)); + } + out += '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + (it.util.toQuotedString($schema)); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += '} '; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],30:[function(require,module,exports){ +'use strict'; +module.exports = function generate_properties(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; + var $schemaKeys = Object.keys($schema || {}), + $pProperties = it.schema.patternProperties || {}, + $pPropertyKeys = Object.keys($pProperties), + $aProperties = it.schema.additionalProperties, + $someProperties = $schemaKeys.length || $pPropertyKeys.length, + $noAdditional = $aProperties === false, + $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length, + $removeAdditional = it.opts.removeAdditional, + $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + var $required = it.schema.required; + if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); + if (it.opts.patternGroups) { + var $pgProperties = it.schema.patternGroups || {}, + $pgPropertyKeys = Object.keys($pgProperties); + } + out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } + if ($checkAdditional) { + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + if ($someProperties) { + out += ' var isAdditional' + ($lvl) + ' = !(false '; + if ($schemaKeys.length) { + if ($schemaKeys.length > 5) { + out += ' || validate.schema' + ($schemaPath) + '[' + ($key) + '] '; + } else { + var arr1 = $schemaKeys; + if (arr1) { + var $propertyKey, i1 = -1, + l1 = arr1.length - 1; + while (i1 < l1) { + $propertyKey = arr1[i1 += 1]; + out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' '; + } + } + } + } + if ($pPropertyKeys.length) { + var arr2 = $pPropertyKeys; + if (arr2) { + var $pProperty, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $pProperty = arr2[$i += 1]; + out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') '; + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr3 = $pgPropertyKeys; + if (arr3) { + var $pgProperty, $i = -1, + l3 = arr3.length - 1; + while ($i < l3) { + $pgProperty = arr3[$i += 1]; + out += ' || ' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ') '; + } + } + } + out += ' ); if (isAdditional' + ($lvl) + ') { '; + } + if ($removeAdditional == 'all') { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + var $currentErrorPath = it.errorPath; + var $additionalProperty = '\' + ' + $key + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + } + if ($noAdditional) { + if ($removeAdditional) { + out += ' delete ' + ($data) + '[' + ($key) + ']; '; + } else { + out += ' ' + ($nextValid) + ' = false; '; + var $currErrSchemaPath = $errSchemaPath; + $errSchemaPath = it.errSchemaPath + '/additionalProperties'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('additionalProperties') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \'' + ($additionalProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have additional properties\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' break; '; + } + } + } else if ($additionalIsSchema) { + if ($removeAdditional == 'failing') { + out += ' var ' + ($errs) + ' = errors; '; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + } else { + $it.schema = $aProperties; + $it.schemaPath = it.schemaPath + '.additionalProperties'; + $it.errSchemaPath = it.errSchemaPath + '/additionalProperties'; + $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + } + } + it.errorPath = $currentErrorPath; + } + if ($someProperties) { + out += ' } '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + var $useDefaults = it.opts.useDefaults && !it.compositeRule; + if ($schemaKeys.length) { + var arr4 = $schemaKeys; + if (arr4) { + var $propertyKey, i4 = -1, + l4 = arr4.length - 1; + while (i4 < l4) { + $propertyKey = arr4[i4 += 1]; + var $sch = $schema[$propertyKey]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + var $prop = it.util.getProperty($propertyKey), + $passData = $data + $prop, + $hasDefault = $useDefaults && $sch.default !== undefined; + $it.schema = $sch; + $it.schemaPath = $schemaPath + $prop; + $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey); + $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers); + $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey); + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + $code = it.util.varReplace($code, $nextData, $passData); + var $useData = $passData; + } else { + var $useData = $nextData; + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; '; + } + if ($hasDefault) { + out += ' ' + ($code) + ' '; + } else { + if ($requiredHash && $requiredHash[$propertyKey]) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; + var $currentErrorPath = it.errorPath, + $currErrSchemaPath = $errSchemaPath, + $missingProperty = it.util.escapeQuotes($propertyKey); + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + $errSchemaPath = it.errSchemaPath + '/required'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + $errSchemaPath = $currErrSchemaPath; + it.errorPath = $currentErrorPath; + out += ' } else { '; + } else { + if ($breakOnError) { + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; + } else { + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; + } + } + out += ' ' + ($code) + ' } '; + } + } + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + if (it.opts.patternGroups && $pgPropertyKeys.length) { + var arr6 = $pgPropertyKeys; + if (arr6) { + var $pgProperty, i6 = -1, + l6 = arr6.length - 1; + while (i6 < l6) { + $pgProperty = arr6[i6 += 1]; + var $pgSchema = $pgProperties[$pgProperty], + $sch = $pgSchema.schema; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; + $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } + var $pgMin = $pgSchema.minimum, + $pgMax = $pgSchema.maximum; + if ($pgMin !== undefined || $pgMax !== undefined) { + out += ' var ' + ($valid) + ' = true; '; + var $currErrSchemaPath = $errSchemaPath; + if ($pgMin !== undefined) { + var $limit = $pgMin, + $reason = 'minimum', + $moreOrLess = 'less'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' >= ' + ($pgMin) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/minimum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($pgMax !== undefined) { + out += ' else '; + } + } + if ($pgMax !== undefined) { + var $limit = $pgMax, + $reason = 'maximum', + $moreOrLess = 'more'; + out += ' ' + ($valid) + ' = pgPropCount' + ($lvl) + ' <= ' + ($pgMax) + '; '; + $errSchemaPath = it.errSchemaPath + '/patternGroups/maximum'; + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('patternGroups') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { reason: \'' + ($reason) + '\', limit: ' + ($limit) + ', pattern: \'' + (it.util.escapeQuotes($pgProperty)) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have ' + ($moreOrLess) + ' than ' + ($limit) + ' properties matching pattern "' + (it.util.escapeQuotes($pgProperty)) + '"\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + $errSchemaPath = $currErrSchemaPath; + if ($breakOnError) { + out += ' if (' + ($valid) + ') { '; + $closingBraces += '}'; + } + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; + } + out = it.util.cleanUpCode(out); + return out; +} + +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; + if ($breakOnError) { + out += ' var missing' + ($lvl) + '; '; + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + out += ' var ' + ($valid) + ' = true; '; + if ($isData) { + out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } else { + out += ' if ( '; + var arr2 = $required; + if (arr2) { + var $propertyKey, $i = -1, + l2 = arr2.length - 1; + while ($i < l2) { + $propertyKey = arr2[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; + } + } + out += ') { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + } + } else { + if ($loopRequired) { + if (!$isData) { + out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; '; + } + var $i = 'i' + $lvl, + $propertyPath = 'schema' + $lvl + '[' + $i + ']', + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers); + } + if ($isData) { + out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; + } + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } '; + if ($isData) { + out += ' } '; + } + } else { + var arr3 = $required; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \''; + if (it.opts._errorDataPathProperty) { + out += 'is a required property'; + } else { + out += 'should have required property \\\'' + ($missingProperty) + '\\\''; + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; + } + } + } + } + it.errorPath = $currentErrorPath; + } else if ($breakOnError) { + out += ' if (true) {'; + } + return out; +} + +},{}],34:[function(require,module,exports){ +'use strict'; +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $isData = it.opts.$data && $schema && $schema.$data, + $schemaValue; + if ($isData) { + out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; + $schemaValue = 'schema' + $lvl; + } else { + $schemaValue = $schema; + } + if (($schema || $isData) && it.opts.uniqueItems !== false) { + if ($isData) { + out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { '; + } + out += ' var ' + ($valid) + ' = true; if (' + ($data) + '.length > 1) { var i = ' + ($data) + '.length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } } '; + if ($isData) { + out += ' } '; + } + out += ' if (!' + ($valid) + ') { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } '; + if (it.opts.messages !== false) { + out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' '; + } + if (it.opts.verbose) { + out += ' , schema: '; + if ($isData) { + out += 'validate.schema' + ($schemaPath); + } else { + out += '' + ($schema); + } + out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else { '; + } + } else { + if ($breakOnError) { + out += ' if (true) { '; + } + } + return out; +} + +},{}],35:[function(require,module,exports){ +'use strict'; +module.exports = function generate_validate(it, $keyword, $ruleType) { + var out = ''; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); + if (it.isTop) { + if ($async) { + it.async = true; + var $es7 = it.opts.async == 'es7'; + it.yieldAwait = $es7 ? 'await' : 'yield'; + } + out += ' var validate = '; + if ($async) { + if ($es7) { + out += ' (async function '; + } else { + if (it.opts.async != '*') { + out += 'co.wrap'; + } + out += '(function* '; + } + } else { + out += ' (function '; + } + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; + out += ' var errors = 0; '; + out += ' if (rootData === undefined) rootData = data; '; + } else { + var $lvl = it.level, + $dataLvl = it.dataLevel, + $data = 'data' + ($dataLvl || ''); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); + if ($async && !it.async) throw new Error('async schema in sync schema'); + out += ' var errs_' + ($lvl) + ' = errors;'; + } + var $valid = 'valid' + $lvl, + $breakOnError = !it.opts.allErrors, + $closingBraces1 = '', + $closingBraces2 = ''; + var $errorKeyword; + var $typeSchema = it.schema.type, + $typeIsArray = Array.isArray($typeSchema); + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + it.logger.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type', + $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } + } + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } + out += ' } '; + } + } + if (it.schema.$ref && !$refKeywords) { + out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' '; + if ($breakOnError) { + out += ' } if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } else { + if (it.opts.v5 && it.schema.patternGroups) { + it.logger.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } + var arr2 = it.RULES; + if (arr2) { + var $rulesGroup, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $rulesGroup = arr2[i2 += 1]; + if ($shouldUseGroup($rulesGroup)) { + if ($rulesGroup.type) { + out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data)) + ') { '; + } + if (it.opts.useDefaults && !it.compositeRule) { + if ($rulesGroup.type == 'object' && it.schema.properties) { + var $schema = it.schema.properties, + $schemaKeys = Object.keys($schema); + var arr3 = $schemaKeys; + if (arr3) { + var $propertyKey, i3 = -1, + l3 = arr3.length - 1; + while (i3 < l3) { + $propertyKey = arr3[i3 += 1]; + var $sch = $schema[$propertyKey]; + if ($sch.default !== undefined) { + var $passData = $data + it.util.getProperty($propertyKey); + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) { + var arr4 = it.schema.items; + if (arr4) { + var $sch, $i = -1, + l4 = arr4.length - 1; + while ($i < l4) { + $sch = arr4[$i += 1]; + if ($sch.default !== undefined) { + var $passData = $data + '[' + $i + ']'; + out += ' if (' + ($passData) + ' === undefined) ' + ($passData) + ' = '; + if (it.opts.useDefaults == 'shared') { + out += ' ' + (it.useDefault($sch.default)) + ' '; + } else { + out += ' ' + (JSON.stringify($sch.default)) + ' '; + } + out += '; '; + } + } + } + } + } + var arr5 = $rulesGroup.rules; + if (arr5) { + var $rule, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $rule = arr5[i5 += 1]; + if ($shouldUseRule($rule)) { + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces1) + ' '; + $closingBraces1 = ''; + } + if ($rulesGroup.type) { + out += ' } '; + if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { + out += ' else { '; + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } '; + } + } + if ($breakOnError) { + out += ' if (errors === '; + if ($top) { + out += '0'; + } else { + out += 'errs_' + ($lvl); + } + out += ') { '; + $closingBraces2 += '}'; + } + } + } + } + } + if ($breakOnError) { + out += ' ' + ($closingBraces2) + ' '; + } + if ($top) { + if ($async) { + out += ' if (errors === 0) return data; '; + out += ' else throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; '; + out += ' return errors === 0; '; + } + out += ' }); return validate;'; + } else { + out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; + } + out = it.util.cleanUpCode(out); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); + } + + function $shouldUseGroup($rulesGroup) { + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; + } + + function $shouldUseRule($rule) { + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule)); + } + + function $ruleImplementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; + } + return out; +} + +},{}],36:[function(require,module,exports){ +'use strict'; + +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; +var customRuleCode = require('./dotjs/custom'); + +module.exports = { + add: addKeyword, + get: getKeyword, + remove: removeKeyword +}; + +/** + * Define custom keyword + * @this Ajv + * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords). + * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining + */ +function addKeyword(keyword, definition) { + /* jshint validthis: true */ + /* eslint no-shadow: 0 */ + var RULES = this.RULES; + + if (RULES.keywords[keyword]) + throw new Error('Keyword ' + keyword + ' is already defined'); + + if (!IDENTIFIER.test(keyword)) + throw new Error('Keyword ' + keyword + ' is not a valid identifier'); + + if (definition) { + if (definition.macro && definition.valid !== undefined) + throw new Error('"valid" option cannot be used with macro keywords'); + + var dataType = definition.type; + if (Array.isArray(dataType)) { + var i, len = dataType.length; + for (i=0; i 2) res = slice.call(arguments, 1); + resolve(res); + }); + }); +} + +/** + * Convert an array of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Array} obj + * @return {Promise} + * @api private + */ + +function arrayToPromise(obj) { + return Promise.all(obj.map(toPromise, this)); +} + +/** + * Convert an object of "yieldables" to a promise. + * Uses `Promise.all()` internally. + * + * @param {Object} obj + * @return {Promise} + * @api private + */ + +function objectToPromise(obj){ + var results = new obj.constructor(); + var keys = Object.keys(obj); + var promises = []; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var promise = toPromise.call(this, obj[key]); + if (promise && isPromise(promise)) defer(promise, key); + else results[key] = obj[key]; + } + return Promise.all(promises).then(function () { + return results; + }); + + function defer(promise, key) { + // predefine the key in the result + results[key] = undefined; + promises.push(promise.then(function (res) { + results[key] = res; + })); + } +} + +/** + * Check if `obj` is a promise. + * + * @param {Object} obj + * @return {Boolean} + * @api private + */ + +function isPromise(obj) { + return 'function' == typeof obj.then; +} + +/** + * Check if `obj` is a generator. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ + +function isGenerator(obj) { + return 'function' == typeof obj.next && 'function' == typeof obj.throw; +} + +/** + * Check if `obj` is a generator function. + * + * @param {Mixed} obj + * @return {Boolean} + * @api private + */ +function isGeneratorFunction(obj) { + var constructor = obj.constructor; + if (!constructor) return false; + if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true; + return isGenerator(constructor.prototype); +} + +/** + * Check for plain object. + * + * @param {Mixed} val + * @return {Boolean} + * @api private + */ + +function isObject(val) { + return Object == val.constructor; +} + +},{}],41:[function(require,module,exports){ +'use strict'; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = Array.isArray(a) + , arrB = Array.isArray(b) + , i; + + if (arrA && arrB) { + if (a.length != b.length) return false; + for (i = 0; i < a.length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + if (a && b && typeof a === 'object' && typeof b === 'object') { + var keys = Object.keys(a); + if (keys.length !== Object.keys(b).length) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA && dateB) return a.getTime() == b.getTime(); + if (dateA != dateB) return false; + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA && regexpB) return a.toString() == b.toString(); + if (regexpA != regexpB) return false; + + for (i = 0; i < keys.length; i++) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = 0; i < keys.length; i++) + if(!equal(a[keys[i]], b[keys[i]])) return false; + + return true; + } + + return false; +}; + +},{}],42:[function(require,module,exports){ +'use strict'; + +module.exports = function (data, opts) { + if (!opts) opts = {}; + if (typeof opts === 'function') opts = { cmp: opts }; + var cycles = (typeof opts.cycles === 'boolean') ? opts.cycles : false; + + var cmp = opts.cmp && (function (f) { + return function (node) { + return function (a, b) { + var aobj = { key: a, value: node[a] }; + var bobj = { key: b, value: node[b] }; + return f(aobj, bobj); + }; + }; + })(opts.cmp); + + var seen = []; + return (function stringify (node) { + if (node && node.toJSON && typeof node.toJSON === 'function') { + node = node.toJSON(); + } + + if (node === undefined) return; + if (typeof node == 'number') return isFinite(node) ? '' + node : 'null'; + if (typeof node !== 'object') return JSON.stringify(node); + + var i, out; + if (Array.isArray(node)) { + out = '['; + for (i = 0; i < node.length; i++) { + if (i) out += ','; + out += stringify(node[i]) || 'null'; + } + return out + ']'; + } + + if (node === null) return 'null'; + + if (seen.indexOf(node) !== -1) { + if (cycles) return JSON.stringify('__cycle__'); + throw new TypeError('Converting circular structure to JSON'); + } + + var seenIndex = seen.push(node) - 1; + var keys = Object.keys(node).sort(cmp && cmp(node)); + out = ''; + for (i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = stringify(node[key]); + + if (!value) continue; + if (out) out += ','; + out += JSON.stringify(key) + ':' + value; + } + seen.splice(seenIndex, 1); + return '{' + out + '}'; + })(data); +}; + +},{}],43:[function(require,module,exports){ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); + +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],45:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +// If obj.hasOwnProperty has been overridden, then calling +// obj.hasOwnProperty(prop) will break. +// See: https://github.com/joyent/node/issues/1707 +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +module.exports = function(qs, sep, eq, options) { + sep = sep || '&'; + eq = eq || '='; + var obj = {}; + + if (typeof qs !== 'string' || qs.length === 0) { + return obj; + } + + var regexp = /\+/g; + qs = qs.split(sep); + + var maxKeys = 1000; + if (options && typeof options.maxKeys === 'number') { + maxKeys = options.maxKeys; + } + + var len = qs.length; + // maxKeys <= 0 means that we should not limit keys count + if (maxKeys > 0 && len > maxKeys) { + len = maxKeys; + } + + for (var i = 0; i < len; ++i) { + var x = qs[i].replace(regexp, '%20'), + idx = x.indexOf(eq), + kstr, vstr, k, v; + + if (idx >= 0) { + kstr = x.substr(0, idx); + vstr = x.substr(idx + 1); + } else { + kstr = x; + vstr = ''; + } + + k = decodeURIComponent(kstr); + v = decodeURIComponent(vstr); + + if (!hasOwnProperty(obj, k)) { + obj[k] = v; + } else if (isArray(obj[k])) { + obj[k].push(v); + } else { + obj[k] = [obj[k], v]; + } + } + + return obj; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{}],46:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var stringifyPrimitive = function(v) { + switch (typeof v) { + case 'string': + return v; + + case 'boolean': + return v ? 'true' : 'false'; + + case 'number': + return isFinite(v) ? v : ''; + + default: + return ''; + } +}; + +module.exports = function(obj, sep, eq, name) { + sep = sep || '&'; + eq = eq || '='; + if (obj === null) { + obj = undefined; + } + + if (typeof obj === 'object') { + return map(objectKeys(obj), function(k) { + var ks = encodeURIComponent(stringifyPrimitive(k)) + eq; + if (isArray(obj[k])) { + return map(obj[k], function(v) { + return ks + encodeURIComponent(stringifyPrimitive(v)); + }).join(sep); + } else { + return ks + encodeURIComponent(stringifyPrimitive(obj[k])); + } + }).join(sep); + + } + + if (!name) return ''; + return encodeURIComponent(stringifyPrimitive(name)) + eq + + encodeURIComponent(stringifyPrimitive(obj)); +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +function map (xs, f) { + if (xs.map) return xs.map(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + res.push(f(xs[i], i)); + } + return res; +} + +var objectKeys = Object.keys || function (obj) { + var res = []; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key); + } + return res; +}; + +},{}],47:[function(require,module,exports){ +'use strict'; + +exports.decode = exports.parse = require('./decode'); +exports.encode = exports.stringify = require('./encode'); + +},{"./decode":45,"./encode":46}],48:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var punycode = require('punycode'); +var util = require('./util'); + +exports.parse = urlParse; +exports.resolve = urlResolve; +exports.resolveObject = urlResolveObject; +exports.format = urlFormat; + +exports.Url = Url; + +function Url() { + this.protocol = null; + this.slashes = null; + this.auth = null; + this.host = null; + this.port = null; + this.hostname = null; + this.hash = null; + this.search = null; + this.query = null; + this.pathname = null; + this.path = null; + this.href = null; +} + +// Reference: RFC 3986, RFC 1808, RFC 2396 + +// define these here so at least they only have to be +// compiled once on the first module load. +var protocolPattern = /^([a-z0-9.+-]+:)/i, + portPattern = /:[0-9]*$/, + + // Special case for a simple path URL + simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, + + // RFC 2396: characters reserved for delimiting URLs. + // We actually just auto-escape these. + delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], + + // RFC 2396: characters not allowed for various reasons. + unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), + + // Allowed by RFCs, but cause of XSS attacks. Always escape these. + autoEscape = ['\''].concat(unwise), + // Characters that are never ever allowed in a hostname. + // Note that any invalid chars are also handled, but these + // are the ones that are *expected* to be seen, so we fast-path + // them. + nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), + hostEndingChars = ['/', '?', '#'], + hostnameMaxLen = 255, + hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, + // protocols that can allow "unsafe" and "unwise" chars. + unsafeProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that never have a hostname. + hostlessProtocol = { + 'javascript': true, + 'javascript:': true + }, + // protocols that always contain a // bit. + slashedProtocol = { + 'http': true, + 'https': true, + 'ftp': true, + 'gopher': true, + 'file': true, + 'http:': true, + 'https:': true, + 'ftp:': true, + 'gopher:': true, + 'file:': true + }, + querystring = require('querystring'); + +function urlParse(url, parseQueryString, slashesDenoteHost) { + if (url && util.isObject(url) && url instanceof Url) return url; + + var u = new Url; + u.parse(url, parseQueryString, slashesDenoteHost); + return u; +} + +Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { + if (!util.isString(url)) { + throw new TypeError("Parameter 'url' must be a string, not " + typeof url); + } + + // Copy chrome, IE, opera backslash-handling behavior. + // Back slashes before the query string get converted to forward slashes + // See: https://code.google.com/p/chromium/issues/detail?id=25916 + var queryIndex = url.indexOf('?'), + splitter = + (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', + uSplit = url.split(splitter), + slashRegex = /\\/g; + uSplit[0] = uSplit[0].replace(slashRegex, '/'); + url = uSplit.join(splitter); + + var rest = url; + + // trim before proceeding. + // This is to support parse stuff like " http://foo.com \n" + rest = rest.trim(); + + if (!slashesDenoteHost && url.split('#').length === 1) { + // Try fast path regexp + var simplePath = simplePathPattern.exec(rest); + if (simplePath) { + this.path = rest; + this.href = rest; + this.pathname = simplePath[1]; + if (simplePath[2]) { + this.search = simplePath[2]; + if (parseQueryString) { + this.query = querystring.parse(this.search.substr(1)); + } else { + this.query = this.search.substr(1); + } + } else if (parseQueryString) { + this.search = ''; + this.query = {}; + } + return this; + } + } + + var proto = protocolPattern.exec(rest); + if (proto) { + proto = proto[0]; + var lowerProto = proto.toLowerCase(); + this.protocol = lowerProto; + rest = rest.substr(proto.length); + } + + // figure out if it's got a host + // user@server is *always* interpreted as a hostname, and url + // resolution will treat //foo/bar as host=foo,path=bar because that's + // how the browser resolves relative URLs. + if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { + var slashes = rest.substr(0, 2) === '//'; + if (slashes && !(proto && hostlessProtocol[proto])) { + rest = rest.substr(2); + this.slashes = true; + } + } + + if (!hostlessProtocol[proto] && + (slashes || (proto && !slashedProtocol[proto]))) { + + // there's a hostname. + // the first instance of /, ?, ;, or # ends the host. + // + // If there is an @ in the hostname, then non-host chars *are* allowed + // to the left of the last @ sign, unless some host-ending character + // comes *before* the @-sign. + // URLs are obnoxious. + // + // ex: + // http://a@b@c/ => user:a@b host:c + // http://a@b?@c => user:a host:c path:/?@c + + // v0.12 TODO(isaacs): This is not quite how Chrome does things. + // Review our test case against browsers more comprehensively. + + // find the first instance of any hostEndingChars + var hostEnd = -1; + for (var i = 0; i < hostEndingChars.length; i++) { + var hec = rest.indexOf(hostEndingChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + + // at this point, either we have an explicit point where the + // auth portion cannot go past, or the last @ char is the decider. + var auth, atSign; + if (hostEnd === -1) { + // atSign can be anywhere. + atSign = rest.lastIndexOf('@'); + } else { + // atSign must be in auth portion. + // http://a@b/c@d => host:b auth:a path:/c@d + atSign = rest.lastIndexOf('@', hostEnd); + } + + // Now we have a portion which is definitely the auth. + // Pull that off. + if (atSign !== -1) { + auth = rest.slice(0, atSign); + rest = rest.slice(atSign + 1); + this.auth = decodeURIComponent(auth); + } + + // the host is the remaining to the left of the first non-host char + hostEnd = -1; + for (var i = 0; i < nonHostChars.length; i++) { + var hec = rest.indexOf(nonHostChars[i]); + if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) + hostEnd = hec; + } + // if we still have not hit it, then the entire thing is a host. + if (hostEnd === -1) + hostEnd = rest.length; + + this.host = rest.slice(0, hostEnd); + rest = rest.slice(hostEnd); + + // pull out port. + this.parseHost(); + + // we've indicated that there is a hostname, + // so even if it's empty, it has to be present. + this.hostname = this.hostname || ''; + + // if hostname begins with [ and ends with ] + // assume that it's an IPv6 address. + var ipv6Hostname = this.hostname[0] === '[' && + this.hostname[this.hostname.length - 1] === ']'; + + // validate a little. + if (!ipv6Hostname) { + var hostparts = this.hostname.split(/\./); + for (var i = 0, l = hostparts.length; i < l; i++) { + var part = hostparts[i]; + if (!part) continue; + if (!part.match(hostnamePartPattern)) { + var newpart = ''; + for (var j = 0, k = part.length; j < k; j++) { + if (part.charCodeAt(j) > 127) { + // we replace non-ASCII char with a temporary placeholder + // we need this to make sure size of hostname is not + // broken by replacing non-ASCII by nothing + newpart += 'x'; + } else { + newpart += part[j]; + } + } + // we test again with ASCII char only + if (!newpart.match(hostnamePartPattern)) { + var validParts = hostparts.slice(0, i); + var notHost = hostparts.slice(i + 1); + var bit = part.match(hostnamePartStart); + if (bit) { + validParts.push(bit[1]); + notHost.unshift(bit[2]); + } + if (notHost.length) { + rest = '/' + notHost.join('.') + rest; + } + this.hostname = validParts.join('.'); + break; + } + } + } + } + + if (this.hostname.length > hostnameMaxLen) { + this.hostname = ''; + } else { + // hostnames are always lower case. + this.hostname = this.hostname.toLowerCase(); + } + + if (!ipv6Hostname) { + // IDNA Support: Returns a punycoded representation of "domain". + // It only converts parts of the domain name that + // have non-ASCII characters, i.e. it doesn't matter if + // you call it with a domain that already is ASCII-only. + this.hostname = punycode.toASCII(this.hostname); + } + + var p = this.port ? ':' + this.port : ''; + var h = this.hostname || ''; + this.host = h + p; + this.href += this.host; + + // strip [ and ] from the hostname + // the host field still retains them, though + if (ipv6Hostname) { + this.hostname = this.hostname.substr(1, this.hostname.length - 2); + if (rest[0] !== '/') { + rest = '/' + rest; + } + } + } + + // now rest is set to the post-host stuff. + // chop off any delim chars. + if (!unsafeProtocol[lowerProto]) { + + // First, make 100% sure that any "autoEscape" chars get + // escaped, even if encodeURIComponent doesn't think they + // need to be. + for (var i = 0, l = autoEscape.length; i < l; i++) { + var ae = autoEscape[i]; + if (rest.indexOf(ae) === -1) + continue; + var esc = encodeURIComponent(ae); + if (esc === ae) { + esc = escape(ae); + } + rest = rest.split(ae).join(esc); + } + } + + + // chop off from the tail first. + var hash = rest.indexOf('#'); + if (hash !== -1) { + // got a fragment string. + this.hash = rest.substr(hash); + rest = rest.slice(0, hash); + } + var qm = rest.indexOf('?'); + if (qm !== -1) { + this.search = rest.substr(qm); + this.query = rest.substr(qm + 1); + if (parseQueryString) { + this.query = querystring.parse(this.query); + } + rest = rest.slice(0, qm); + } else if (parseQueryString) { + // no query string, but parseQueryString still requested + this.search = ''; + this.query = {}; + } + if (rest) this.pathname = rest; + if (slashedProtocol[lowerProto] && + this.hostname && !this.pathname) { + this.pathname = '/'; + } + + //to support http.request + if (this.pathname || this.search) { + var p = this.pathname || ''; + var s = this.search || ''; + this.path = p + s; + } + + // finally, reconstruct the href based on what has been validated. + this.href = this.format(); + return this; +}; + +// format a parsed object into a url string +function urlFormat(obj) { + // ensure it's an object, and not a string url. + // If it's an obj, this is a no-op. + // this way, you can call url_format() on strings + // to clean up potentially wonky urls. + if (util.isString(obj)) obj = urlParse(obj); + if (!(obj instanceof Url)) return Url.prototype.format.call(obj); + return obj.format(); +} + +Url.prototype.format = function() { + var auth = this.auth || ''; + if (auth) { + auth = encodeURIComponent(auth); + auth = auth.replace(/%3A/i, ':'); + auth += '@'; + } + + var protocol = this.protocol || '', + pathname = this.pathname || '', + hash = this.hash || '', + host = false, + query = ''; + + if (this.host) { + host = auth + this.host; + } else if (this.hostname) { + host = auth + (this.hostname.indexOf(':') === -1 ? + this.hostname : + '[' + this.hostname + ']'); + if (this.port) { + host += ':' + this.port; + } + } + + if (this.query && + util.isObject(this.query) && + Object.keys(this.query).length) { + query = querystring.stringify(this.query); + } + + var search = this.search || (query && ('?' + query)) || ''; + + if (protocol && protocol.substr(-1) !== ':') protocol += ':'; + + // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. + // unless they had them to begin with. + if (this.slashes || + (!protocol || slashedProtocol[protocol]) && host !== false) { + host = '//' + (host || ''); + if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; + } else if (!host) { + host = ''; + } + + if (hash && hash.charAt(0) !== '#') hash = '#' + hash; + if (search && search.charAt(0) !== '?') search = '?' + search; + + pathname = pathname.replace(/[?#]/g, function(match) { + return encodeURIComponent(match); + }); + search = search.replace('#', '%23'); + + return protocol + host + pathname + search + hash; +}; + +function urlResolve(source, relative) { + return urlParse(source, false, true).resolve(relative); +} + +Url.prototype.resolve = function(relative) { + return this.resolveObject(urlParse(relative, false, true)).format(); +}; + +function urlResolveObject(source, relative) { + if (!source) return relative; + return urlParse(source, false, true).resolveObject(relative); +} + +Url.prototype.resolveObject = function(relative) { + if (util.isString(relative)) { + var rel = new Url(); + rel.parse(relative, false, true); + relative = rel; + } + + var result = new Url(); + var tkeys = Object.keys(this); + for (var tk = 0; tk < tkeys.length; tk++) { + var tkey = tkeys[tk]; + result[tkey] = this[tkey]; + } + + // hash is always overridden, no matter what. + // even href="" will remove it. + result.hash = relative.hash; + + // if the relative url is empty, then there's nothing left to do here. + if (relative.href === '') { + result.href = result.format(); + return result; + } + + // hrefs like //foo/bar always cut to the protocol. + if (relative.slashes && !relative.protocol) { + // take everything except the protocol from relative + var rkeys = Object.keys(relative); + for (var rk = 0; rk < rkeys.length; rk++) { + var rkey = rkeys[rk]; + if (rkey !== 'protocol') + result[rkey] = relative[rkey]; + } + + //urlParse appends trailing / to urls like http://www.example.com + if (slashedProtocol[result.protocol] && + result.hostname && !result.pathname) { + result.path = result.pathname = '/'; + } + + result.href = result.format(); + return result; + } + + if (relative.protocol && relative.protocol !== result.protocol) { + // if it's a known url protocol, then changing + // the protocol does weird things + // first, if it's not file:, then we MUST have a host, + // and if there was a path + // to begin with, then we MUST have a path. + // if it is file:, then the host is dropped, + // because that's known to be hostless. + // anything else is assumed to be absolute. + if (!slashedProtocol[relative.protocol]) { + var keys = Object.keys(relative); + for (var v = 0; v < keys.length; v++) { + var k = keys[v]; + result[k] = relative[k]; + } + result.href = result.format(); + return result; + } + + result.protocol = relative.protocol; + if (!relative.host && !hostlessProtocol[relative.protocol]) { + var relPath = (relative.pathname || '').split('/'); + while (relPath.length && !(relative.host = relPath.shift())); + if (!relative.host) relative.host = ''; + if (!relative.hostname) relative.hostname = ''; + if (relPath[0] !== '') relPath.unshift(''); + if (relPath.length < 2) relPath.unshift(''); + result.pathname = relPath.join('/'); + } else { + result.pathname = relative.pathname; + } + result.search = relative.search; + result.query = relative.query; + result.host = relative.host || ''; + result.auth = relative.auth; + result.hostname = relative.hostname || relative.host; + result.port = relative.port; + // to support http.request + if (result.pathname || result.search) { + var p = result.pathname || ''; + var s = result.search || ''; + result.path = p + s; + } + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; + } + + var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), + isRelAbs = ( + relative.host || + relative.pathname && relative.pathname.charAt(0) === '/' + ), + mustEndAbs = (isRelAbs || isSourceAbs || + (result.host && relative.pathname)), + removeAllDots = mustEndAbs, + srcPath = result.pathname && result.pathname.split('/') || [], + relPath = relative.pathname && relative.pathname.split('/') || [], + psychotic = result.protocol && !slashedProtocol[result.protocol]; + + // if the url is a non-slashed url, then relative + // links like ../.. should be able + // to crawl up to the hostname, as well. This is strange. + // result.protocol has already been set by now. + // Later on, put the first path part into the host field. + if (psychotic) { + result.hostname = ''; + result.port = null; + if (result.host) { + if (srcPath[0] === '') srcPath[0] = result.host; + else srcPath.unshift(result.host); + } + result.host = ''; + if (relative.protocol) { + relative.hostname = null; + relative.port = null; + if (relative.host) { + if (relPath[0] === '') relPath[0] = relative.host; + else relPath.unshift(relative.host); + } + relative.host = null; + } + mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); + } + + if (isRelAbs) { + // it's absolute. + result.host = (relative.host || relative.host === '') ? + relative.host : result.host; + result.hostname = (relative.hostname || relative.hostname === '') ? + relative.hostname : result.hostname; + result.search = relative.search; + result.query = relative.query; + srcPath = relPath; + // fall through to the dot-handling below. + } else if (relPath.length) { + // it's relative + // throw away the existing file, and take the new path instead. + if (!srcPath) srcPath = []; + srcPath.pop(); + srcPath = srcPath.concat(relPath); + result.search = relative.search; + result.query = relative.query; + } else if (!util.isNullOrUndefined(relative.search)) { + // just pull out the search. + // like href='?foo'. + // Put this after the other two cases because it simplifies the booleans + if (psychotic) { + result.hostname = result.host = srcPath.shift(); + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + result.search = relative.search; + result.query = relative.query; + //to support http.request + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.href = result.format(); + return result; + } + + if (!srcPath.length) { + // no path at all. easy. + // we've already handled the other stuff above. + result.pathname = null; + //to support http.request + if (result.search) { + result.path = '/' + result.search; + } else { + result.path = null; + } + result.href = result.format(); + return result; + } + + // if a url ENDs in . or .., then it must get a trailing slash. + // however, if it ends in anything else non-slashy, + // then it must NOT get a trailing slash. + var last = srcPath.slice(-1)[0]; + var hasTrailingSlash = ( + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); + + // strip single dots, resolve double dots to parent dir + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = srcPath.length; i >= 0; i--) { + last = srcPath[i]; + if (last === '.') { + srcPath.splice(i, 1); + } else if (last === '..') { + srcPath.splice(i, 1); + up++; + } else if (up) { + srcPath.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (!mustEndAbs && !removeAllDots) { + for (; up--; up) { + srcPath.unshift('..'); + } + } + + if (mustEndAbs && srcPath[0] !== '' && + (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { + srcPath.unshift(''); + } + + if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { + srcPath.push(''); + } + + var isAbsolute = srcPath[0] === '' || + (srcPath[0] && srcPath[0].charAt(0) === '/'); + + // put the host back + if (psychotic) { + result.hostname = result.host = isAbsolute ? '' : + srcPath.length ? srcPath.shift() : ''; + //occationaly the auth can get stuck only in host + //this especially happens in cases like + //url.resolveObject('mailto:local1@domain1', 'local2@domain2') + var authInHost = result.host && result.host.indexOf('@') > 0 ? + result.host.split('@') : false; + if (authInHost) { + result.auth = authInHost.shift(); + result.host = result.hostname = authInHost.shift(); + } + } + + mustEndAbs = mustEndAbs || (result.host && srcPath.length); + + if (mustEndAbs && !isAbsolute) { + srcPath.unshift(''); + } + + if (!srcPath.length) { + result.pathname = null; + result.path = null; + } else { + result.pathname = srcPath.join('/'); + } + + //to support request.http + if (!util.isNull(result.pathname) || !util.isNull(result.search)) { + result.path = (result.pathname ? result.pathname : '') + + (result.search ? result.search : ''); + } + result.auth = relative.auth || result.auth; + result.slashes = result.slashes || relative.slashes; + result.href = result.format(); + return result; +}; + +Url.prototype.parseHost = function() { + var host = this.host; + var port = portPattern.exec(host); + if (port) { + port = port[0]; + if (port !== ':') { + this.port = port.substr(1); + } + host = host.substr(0, host.length - port.length); + } + if (host) this.hostname = host; +}; + +},{"./util":49,"punycode":44,"querystring":47}],49:[function(require,module,exports){ +'use strict'; + +module.exports = { + isString: function(arg) { + return typeof(arg) === 'string'; + }, + isObject: function(arg) { + return typeof(arg) === 'object' && arg !== null; + }, + isNull: function(arg) { + return arg === null; + }, + isNullOrUndefined: function(arg) { + return arg == null; + } +}; + +},{}],"ajv":[function(require,module,exports){ +'use strict'; + +var compileSchema = require('./compile') + , resolve = require('./compile/resolve') + , Cache = require('./cache') + , SchemaObject = require('./compile/schema_obj') + , stableStringify = require('fast-json-stable-stringify') + , formats = require('./compile/formats') + , rules = require('./compile/rules') + , $dataMetaSchema = require('./$data') + , patternGroups = require('./patternGroups') + , util = require('./compile/util') + , co = require('co'); + +module.exports = Ajv; + +Ajv.prototype.validate = validate; +Ajv.prototype.compile = compile; +Ajv.prototype.addSchema = addSchema; +Ajv.prototype.addMetaSchema = addMetaSchema; +Ajv.prototype.validateSchema = validateSchema; +Ajv.prototype.getSchema = getSchema; +Ajv.prototype.removeSchema = removeSchema; +Ajv.prototype.addFormat = addFormat; +Ajv.prototype.errorsText = errorsText; + +Ajv.prototype._addSchema = _addSchema; +Ajv.prototype._compile = _compile; + +Ajv.prototype.compileAsync = require('./compile/async'); +var customKeyword = require('./keyword'); +Ajv.prototype.addKeyword = customKeyword.add; +Ajv.prototype.getKeyword = customKeyword.get; +Ajv.prototype.removeKeyword = customKeyword.remove; + +var errorClasses = require('./compile/error_classes'); +Ajv.ValidationError = errorClasses.Validation; +Ajv.MissingRefError = errorClasses.MissingRef; +Ajv.$dataMetaSchema = $dataMetaSchema; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ]; +var META_SUPPORT_DATA = ['/properties']; + +/** + * Creates validator instance. + * Usage: `Ajv(opts)` + * @param {Object} opts optional options + * @return {Object} ajv instance + */ +function Ajv(opts) { + if (!(this instanceof Ajv)) return new Ajv(opts); + opts = this._opts = util.copy(opts) || {}; + setLogger(this); + this._schemas = {}; + this._refs = {}; + this._fragments = {}; + this._formats = formats(opts.format); + var schemaUriFormat = this._schemaUriFormat = this._formats['uri-reference']; + this._schemaUriFormatFunc = function (str) { return schemaUriFormat.test(str); }; + + this._cache = opts.cache || new Cache; + this._loadingSchemas = {}; + this._compilations = []; + this.RULES = rules(); + this._getId = chooseGetId(opts); + + opts.loopRequired = opts.loopRequired || Infinity; + if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true; + if (opts.serialize === undefined) opts.serialize = stableStringify; + this._metaOpts = getMetaSchemaOptions(this); + + if (opts.formats) addInitialFormats(this); + addDraft6MetaSchema(this); + if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta); + addInitialSchemas(this); + if (opts.patternGroups) patternGroups(this); +} + + + +/** + * Validate data using schema + * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize. + * @this Ajv + * @param {String|Object} schemaKeyRef key, ref or schema object + * @param {Any} data to be validated + * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`). + */ +function validate(schemaKeyRef, data) { + var v; + if (typeof schemaKeyRef == 'string') { + v = this.getSchema(schemaKeyRef); + if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"'); + } else { + var schemaObj = this._addSchema(schemaKeyRef); + v = schemaObj.validate || this._compile(schemaObj); + } + + var valid = v(data); + if (v.$async === true) + return this._opts.async == '*' ? co(valid) : valid; + this.errors = v.errors; + return valid; +} + + +/** + * Create validating function for passed schema. + * @this Ajv + * @param {Object} schema schema object + * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords. + * @return {Function} validating function + */ +function compile(schema, _meta) { + var schemaObj = this._addSchema(schema, undefined, _meta); + return schemaObj.validate || this._compile(schemaObj); +} + + +/** + * Adds schema to the instance. + * @this Ajv + * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. + * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead. + * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead. + * @return {Ajv} this for method chaining + */ +function addSchema(schema, key, _skipValidation, _meta) { + if (Array.isArray(schema)){ + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i=1&&t<=12&&a>=1&&a<=h[t]}function o(e,r){var t=e.match(u);if(!t)return!1;return t[1]<=23&&t[2]<=59&&t[3]<=59&&(!r||t[5])}function i(e){if(E.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var n=e("./util"),l=/^\d\d\d\d-(\d\d)-(\d\d)$/,h=[0,31,29,31,30,31,30,31,31,30,31,30,31],u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,c=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,f=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,p=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,m=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,v=/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,y=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":f,url:p,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:c,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y},a.full={date:s,time:o,"date-time":function(e){var r=e.split(g);return 2==r.length&&s(r[0])&&o(r[1],!0)},uri:function(e){return P.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":f,url:p,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:function(e){return e.length<=255&&c.test(e)},ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:i,uuid:m,"json-pointer":v,"relative-json-pointer":y};var g=/t|\s/i,P=/\/|:/,E=/[^\\]\\Z/},{"./util":12}],7:[function(e,r,t){"use strict";function a(e,r,t,P){function E(){var e=C.validate,r=e.apply(null,arguments);return E.errors=e.errors,r}function w(e,t,s,f){var P=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call($,e,t,s,f);var E=!0===e.$async,w=p({isTop:!0,schema:e,isRoot:P,baseId:f,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:d.MissingRef,RULES:U,validate:p,util:c,resolve:u,resolveRef:b,usePattern:_,useDefault:x,useCustomRule:F,opts:R,formats:Q,logger:$.logger,self:$});w=h(O,n)+h(I,o)+h(k,i)+h(L,l)+w,R.processCode&&(w=R.processCode(w));var S;try{S=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",w)($,U,Q,r,O,k,L,m,y,v,g),O[0]=S}catch(e){throw $.logger.error("Error compiling schema, function code:",w),e}return S.schema=e,S.errors=null,S.refs=D,S.refVal=O,S.root=P?S:t,E&&(S.$async=!0),!0===R.sourceCode&&(S.source={code:w,patterns:I,defaults:k}),S}function b(e,s,o){s=u.url(e,s);var i,n,l=D[s];if(void 0!==l)return i=O[l],n="refVal["+l+"]",j(i,n);if(!o&&r.refs){var h=r.refs[s];if(void 0!==h)return i=r.refVal[h],n=S(s,i),j(i,n)}n=S(s);var c=u.call($,w,r,s);if(void 0===c){var d=t&&t[s];d&&(c=u.inlineRef(d,R.inlineRefs)?d:a.call($,d,r,t,e))}if(void 0!==c)return function(e,r){O[D[e]]=r}(s,c),j(c,n);!function(e){delete D[e]}(s)}function S(e,r){var t=O.length;return O[t]=r,D[e]=t,"refVal"+t}function j(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function _(e){var r=A[e];return void 0===r&&(r=A[e]=I.length,I[r]=e),"pattern"+r}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return c.toQuotedString(e);case"object":if(null===e)return"null";var r=f(e),t=q[r];return void 0===t&&(t=q[r]=k.length,k[t]=e),"default"+t}}function F(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==$._opts.validateSchema){if(!s(r)){var o="keyword schema is invalid: "+$.errorsText(s.errors);if("log"!=$._opts.validateSchema)throw new Error(o);$.logger.error(o)}}var i,n=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(n)i=n.call($,r,t,a);else if(h)i=h.call($,r,t,a),!1!==R.validateSchema&&$.validateSchema(i,!0);else if(l)i=l.call($,a,e.keyword,r,t);else if(!(i=e.definition.validate))return;if(void 0===i)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=L.length;return L[u]=i,{code:"customRule"+u,validate:i}}var $=this,R=this._opts,O=[void 0],D={},I=[],A={},k=[],q={},L=[],z=function(e,r,t){var a=s.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}.call(this,e,r=r||{schema:e,refVal:O,refs:D},P),C=this._compilations[z.index];if(z.compiling)return C.callValidate=E;var Q=this._formats,U=this.RULES;try{var V=w(e,r,t,P);C.validate=V;var N=C.callValidate;return N&&(N.schema=V.schema,N.errors=null,N.refs=V.refs,N.refVal=V.refVal,N.root=V.root,N.$async=V.$async,R.sourceCode&&(N.source=V.source)),V}finally{(function(e,r,t){var a=s.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}).call(this,e,r,P)}}function s(e,r,t){for(var a=0;a=55296&&r<=56319&&s=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(i="data"+(r-a||""),!s)return i}for(var l=i,h=s.split("/"),c=0;c",y=f?">":"<",g=void 0;if(e.opts.$data&&m&&m.$data){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,w="exclType"+o,b="exclIsNumber"+o,S="' + "+(_="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",s+=" var "+E+"; var "+w+" = typeof "+(P="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";g=p;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var j=s;s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+E+" = "+a+" === undefined || "+P+" "+v+"= "+a+") ? "+c+" "+y+"= "+P+" : "+c+" "+y+" "+a+" ) : ( ("+E+" = "+P+" === true) ? "+c+" "+y+"= "+a+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { var op"+o+" = "+E+" ? '"+v+"' : '"+v+"=';"}else{S=v;if((b="number"==typeof m)&&d){var _="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+v+"= "+a+" ? "+c+" "+y+"= "+m+" : "+c+" "+y+" "+a+" ) || "+c+" !== "+c+") { "}else{b&&void 0===n?(E=!0,g=p,h=e.errSchemaPath+"/"+p,a=m,y+="="):(b&&(a=Math[f?"min":"max"](m,n)),m===(!b||a)?(E=!0,g=p,h=e.errSchemaPath+"/"+p,y+="="):(E=!1,S+="="));_="'"+S+"'";s+=" if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+" "+y+" "+a+" || "+c+" !== "+c+") { "}}g=g||r;var x;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(g||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";j=s;return s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+".length "+("maxItems"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",s+=" "+("maxLength"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;s+="if ( ",d&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+c+").length "+("maxProperties"==r?">":"<")+" "+a+") { ";var f=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(f||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=d?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="";l.level++;var u="valid"+l.level,c=l.baseId,d=!0,f=s;if(f)for(var p,m=-1,v=f.length-1;m=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v,y=(v="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");var P="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+P+"("+u+"))) { "}else{a+=" if (! ";P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=d?""+c:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=d?"' + "+c+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=d?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var w=a;return a=E.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+w+"]); ":" validate.errors = ["+w+"]; return false; ":" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level,v="i"+s,y=f.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+d+" = errors;var "+c+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+c+" = "+u+".length <= "+i.length+"; ";var w=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+c+") { ";var b=b||[];b.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var S=a;a=b.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=w,h&&(p+="}",a+=" else { ")}var j=i;if(j)for(var _,x=-1,F=j.length-1;x "+x+") { ";var $=u+"["+x+"]";f.schema=_,f.schemaPath=n+"["+x+"]",f.errSchemaPath=l+"/"+x,f.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),f.dataPathArr[y]=x;var R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){f.schema=E,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";f.dataPathArr[y]=v;R=e.validate(f);f.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),d=e.opts.$data&&n&&n.$data;d?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",d&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+c+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",d&&(s+=" ) "),s+=" ) { ";var f=f||[];f.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=d?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var p=s;return s=f.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" var "+c+" = errors; ";var p=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1;var m;d.opts.allErrors&&(m=d.opts.allErrors,d.opts.allErrors=!1),a+=" "+e.validate(d)+" ",d.createErrors=!0,m&&(d.opts.allErrors=m),e.compositeRule=d.compositeRule=p,a+=" if ("+f+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,d="errs__"+s,f=e.util.copy(e),p="";f.level++;var m="valid"+f.level;a+="var "+d+" = errors;var prevValid"+s+" = false;var "+c+" = false;";var v=f.baseId,y=e.compositeRule;e.compositeRule=f.compositeRule=!0;var g=i;if(g)for(var P,E=-1,w=g.length-1;E5)a+=" || validate.schema"+n+"["+v+"] ";else{var L=w;if(L)for(var z=-1,C=L.length-1;z= "+ve+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+c+") { ";(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==ye&&(a+=" else ")}if(void 0!==ye){ge=ye,Pe="maximum",Ee="more";a+=" "+c+" = pgPropCount"+s+" <= "+ye+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+c+") { ";var we;(we=we||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+Pe+"', limit: "+ge+", pattern: '"+e.util.escapeQuotes(ce)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Ee+" than "+ge+' properties matching pattern "'+e.util.escapeQuotes(ce)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";B=a;a=we.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+B+"]); ":" validate.errors = ["+B+"]; return false; ":" var err = "+B+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=K,h&&(a+=" if ("+c+") { ",p+="}")}}}}return h&&(a+=" "+p+" if ("+d+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,d=e.util.copy(e);d.level++;var f="valid"+d.level;if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,y="' + "+p+" + '",g="data"+(d.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,w=e.baseId;a+=" var "+c+" = errors; ",E&&(a+=" var "+P+" = undefined; "),a+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",a+=" var startErrs"+s+" = errors; ";var b=p,S=e.compositeRule;e.compositeRule=d.compositeRule=!0;var j=e.validate(d);d.baseId=w,e.util.varOccurences(j,g)<2?a+=" "+e.util.varReplace(j,g,b)+" ":a+=" var "+g+" = "+b+"; "+j+" ",e.compositeRule=d.compositeRule=S,a+=" if (!"+f+") { for (var "+v+"=startErrs"+s+"; "+v+"=e.opts.loopRequired,b=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",w){d||(a+=" var "+f+" = validate.schema"+n+"; ");var S="' + "+(R="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,R,e.opts.jsonPointers)),a+=" var "+c+" = true; ",d&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=" for (var "+x+" = 0; "+x+" < "+f+".length; "+x+"++) { "+c+" = "+u+"["+f+"["+x+"]] !== undefined ",b&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+f+"["+x+"]) "),a+="; if (!"+c+") break; } ",d&&(a+=" } "),a+=" if (!"+c+") { ";($=$||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+S+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;a=$.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var _=p;if(_)for(var x=-1,F=_.length-1;x 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+d+" = false; break outer; } } } } ",f&&(s+=" } "),s+=" if (!"+d+") { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r,t){function a(e){for(var r=e.rules,t=0;t2&&(r=n.call(arguments,1)),t(r)})})}.call(this,e):Array.isArray(e)?function(e){return Promise.all(e.map(s,this))}.call(this,e):function(e){return Object==e.constructor}(e)?function(e){for(var r=new e.constructor,t=Object.keys(e),a=[],i=0;i1&&(a=t[0]+"@",e=t[1]);return a+o((e=e.replace(O,".")).split("."),r).join(".")}function n(e){for(var r,t,a=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(r+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=k(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:E}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function c(e,r,t){var a=0;for(e=t?A(e/j):e>>1,e+=A(e/r);e>I*b>>1;a+=E)e=A(e/I);return A(a+(I+1)*e/(e+S))}function d(e){var r,t,a,o,i,n,u,d,f,p,m=[],v=e.length,y=0,g=x,S=_;for((t=e.lastIndexOf(F))<0&&(t=0),a=0;a=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;o=v&&s("invalid-input"),((d=h(e.charCodeAt(o++)))>=E||d>A((P-y)/n))&&s("overflow"),y+=d*n,f=u<=S?w:u>=S+b?b:u-S,!(dA(P/(p=E-f))&&s("overflow"),n*=p;S=c(y-i,r=m.length+1,0==i),A(y/r)>P-g&&s("overflow"),g+=A(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function f(e){var r,t,a,o,i,l,h,d,f,p,m,v,y,g,S,j=[];for(v=(e=n(e)).length,r=x,t=0,i=_,l=0;l=r&&mA((P-t)/(y=a+1))&&s("overflow"),t+=(h-r)*y,r=h,l=0;lP&&s("overflow"),m==r){for(d=t,f=E;p=f<=i?w:f>=i+b?b:f-i,!(d= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=E-w,A=Math.floor,k=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:n,encode:l},decode:d,encode:f,toASCII:function(e){return i(e,function(e){return R.test(e)?"xn--"+f(e):e})},toUnicode:function(e){return i(e,function(e){return $.test(e)?d(e.slice(4).toLowerCase()):e})}},p&&m)if(r.exports==p)m.exports=y;else for(g in y)y.hasOwnProperty(g)&&(p[g]=y[g]);else a.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var h=e.length;l>0&&h>l&&(h=l);for(var u=0;u=0?(c=m.substr(0,v),d=m.substr(v+1)):(c=m,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),a(i,f)?s(i[f])?i[f].push(p):i[f]=[i[f],p]:i[f]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],46:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),d=["%","/","?",";","#"].concat(c),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},P=e("querystring");a.prototype.parse=function(e,r,t){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?A+="x":A+=I[k];if(!A.match(p)){var L=O.slice(0,_),z=O.slice(_+1),C=I.match(m);C&&(L.push(C[1]),z.unshift(C[2])),z.length&&(u="/"+z.join(".")+u),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),R||(this.hostname=o.toASCII(this.hostname));var Q=this.port?":"+this.port:"";this.host=(this.hostname||"")+Q,this.href+=this.host,R&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[b])for(_=0,D=c.length;_0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return t.search=e.search,t.query=e.query,i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!w.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=w.slice(-1)[0],j=(t.host||e.host||w.length>1)&&("."===S||".."===S)||""===S,_=0,x=w.length;x>=0;x--)"."===(S=w[x])?w.splice(x,1):".."===S?(w.splice(x,1),_++):_&&(w.splice(x,1),_--);if(!P&&!E)for(;_--;_)w.unshift("..");!P||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),j&&"/"!==w.join("/").substr(-1)&&w.push("");var F=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(b){t.hostname=t.host=F?"":w.length?w.shift():"";var $;($=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@"))&&(t.auth=$.shift(),t.host=t.hostname=$.shift())}return(P=P||t.host&&w.length)&&!F&&w.unshift(""),w.length?t.pathname=w.join("/"):(t.pathname=null,t.path=null),i.isNull(t.pathname)&&i.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=l.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":49,punycode:44,querystring:47}],49:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(r){if(!(this instanceof a))return new a(r);r=this._opts=E.copy(r)||{},function(e){var r=e._opts.logger;if(!1===r)e.logger={log:u,warn:u,error:u};else{if(void 0===r&&(r=console),!("object"==typeof r&&r.log&&r.warn&&r.error))throw new Error("logger must implement log, warn and error methods");e.logger=r}}(this),this._schemas={},this._refs={},this._fragments={},this._formats=v(r.format);var t=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return t.test(e)},this._cache=r.cache||new f,this._loadingSchemas={},this._compilations=[],this.RULES=y(),this._getId=function(e){switch(e.schemaId){case"$id":return n;case"id":return i;default:return l}}(r),r.loopRequired=r.loopRequired||1/0,"property"==r.errorDataPath&&(r._errorDataPathProperty=!0),void 0===r.serialize&&(r.serialize=m),this._metaOpts=function(e){for(var r=E.copy(e._opts),t=0;t<_.length;t++)delete r[_[t]];return r}(this),r.formats&&function(e){for(var r in e._opts.formats){var t=e._opts.formats[r];e.addFormat(r,t)}}(this),function(r){var t;r._opts.$data&&(t=e("./refs/$data.json"),r.addMetaSchema(t,t.$id,!0));if(!1===r._opts.meta)return;var a=e("./refs/json-schema-draft-06.json");r._opts.$data&&(a=g(a,x));r.addMetaSchema(a,j,!0),r._refs["http://json-schema.org/schema"]=j}(this),"object"==typeof r.meta&&this.addMetaSchema(r.meta),function(e){var r=e._opts.schemas;if(!r)return;if(Array.isArray(r))e.addSchema(r);else for(var t in r)e.addSchema(r[t],t)}(this),r.patternGroups&&P(this)}function s(e,r){return r=d.normalizeId(r),e._schemas[r]||e._refs[r]||e._fragments[r]}function o(e,r,t){for(var a in r){var s=r[a];s.meta||t&&!t.test(a)||(e._cache.del(s.cacheKey),delete r[a])}}function i(e){return e.$id&&this.logger.warn("schema $id ignored",e.$id),e.id}function n(e){return e.id&&this.logger.warn("schema id ignored",e.id),e.$id}function l(e){if(e.$id&&e.id&&e.$id!=e.id)throw new Error("schema $id is different from id");return e.$id||e.id}function h(e,r){if(e._schemas[r]||e._refs[r])throw new Error('schema with key or id "'+r+'" already exists')}function u(){}var c=e("./compile"),d=e("./compile/resolve"),f=e("./cache"),p=e("./compile/schema_obj"),m=e("fast-json-stable-stringify"),v=e("./compile/formats"),y=e("./compile/rules"),g=e("./$data"),P=e("./patternGroups"),E=e("./compile/util"),w=e("co");r.exports=a,a.prototype.validate=function(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);return!0===t.$async?"*"==this._opts.async?w(s):s:(this.errors=t.errors,s)},a.prototype.compile=function(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)},a.prototype.addSchema=function(e,r,t,a){if(Array.isArray(e)){for(var s=0;s=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(l,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}var o={},a=/^async[\t ]+(return|throw)/,u=/^async[\t ]+function/,c=/^\s*[():;]/,l=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,p=/\s*(get|set)\s*\(/;t.exports=function(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(u,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(u,this,!0)){var c=this.inAsyncFunction;try{return this.inAsyncFunction=!0,this.next(),(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=c}}else if("object"==typeof t&&t.asyncExits&&i(a,this)){this.next();var l;return(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var a,u=this.start,l=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return a=this.parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),n(h),h;if(this.input.slice(p.end).match(c))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,(a=s(this,u-4).parseExprSubscripts()).end<=u))return a=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=a,h=this.finishNodeAt(h,"AwaitExpression",a.end,a.loc&&a.loc.end),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:o}}};if("SequenceExpression"===(a=s(this,this.start,m,!0).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),"FunctionExpression"===a.type||"FunctionDeclaration"===a.type||"ArrowFunctionExpression"===a.type)return"SequenceExpression"===(a=s(this,this.start,m).parseExpression()).type&&(a=a.expressions[0]),"CallExpression"===a.type&&(a=a.callee),a.async=!0,a.start=u,a.loc&&(a.loc.start=l),a.range&&(a.range[0]=u),this.pos=a.end,this.end=a.end,this.endLoc=a.endLoc,this.next(),n(a),a}catch(e){if(e!==o)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("parsePropertyName",function(e){return function(t){t.key&&t.key.name;var i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(c)||(p.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set (value)' cannot be be async"),"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}},{}],3:[function(e,t,n){function r(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}var i=/^async[\t ]+(return|throw)/,s=/^\s*[):;]/,o=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=function(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,a=this.startLoc;if("name"===this.type.label&&t.asyncExits&&function(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(o,"$1 $3")),e.test(r)}(i,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=a),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(i){var s,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if((s=r(this,o-4,c).parseExprSubscripts()).end<=o)return s=r(this,o,c).parseExprSubscripts(),u.argument=s,u=this.finishNodeAt(u,"AwaitExpression",s.end,s.loc&&s.loc.end),this.pos=s.end,this.end=s.end,this.endLoc=s.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var r=t.key&&t.key.name,i=e.apply(this,arguments);return"get"===this.value&&(t.__maybeStaticAsyncGetter=!0),n[this.value]?i:("Identifier"!==i.type||"async"!==i.name&&"async"!==r||function(e,t){return e.lineStart>=t}(this,i.end)||this.input.slice(i.end).match(s)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===i.name?this.raise(i.start,"'set (value)' cannot be be async"):(this.__isAsyncProp=!0,"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async")),i)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}},{}],4:[function(e,t,n){!function(e,r){"object"==typeof n&&void 0!==t?r(n):"function"==typeof define&&define.amd?define(["exports"],r):r(e.acorn=e.acorn||{})}(this,function(e){"use strict";function t(e,t){for(var n=65536,r=0;re)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&x.test(String.fromCharCode(e)):!1!==n&&t(e,E)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&w.test(String.fromCharCode(e)):!1!==n&&(t(e,E)||t(e,S)))))}function i(e,t){return new k(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,_[e]=new k(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return $.call(e,t)}function u(e,t){for(var n=1,r=0;;){T.lastIndex=r;var i=T.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),R(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return R(t.onComment)&&(t.onComment=function(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new j(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}(t,t.onComment)),t}function l(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function p(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}var y={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},m="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",g={5:m,6:m+" const class extends export import super"},v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",b="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",x=new RegExp("["+v+"]"),w=new RegExp("["+v+b+"]");v=b=null;var E=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],S=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],k=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},A={beforeExpr:!0},C={startsExpr:!0},_={},L={num:new k("num",C),regexp:new k("regexp",C),string:new k("string",C),name:new k("name",C),eof:new k("eof"),bracketL:new k("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new k("]"),braceL:new k("{",{beforeExpr:!0,startsExpr:!0}),braceR:new k("}"),parenL:new k("(",{beforeExpr:!0,startsExpr:!0}),parenR:new k(")"),comma:new k(",",A),semi:new k(";",A),colon:new k(":",A),dot:new k("."),question:new k("?",A),arrow:new k("=>",A),template:new k("template"),invalidTemplate:new k("invalidTemplate"),ellipsis:new k("...",A),backQuote:new k("`",C),dollarBraceL:new k("${",{beforeExpr:!0,startsExpr:!0}),eq:new k("=",{beforeExpr:!0,isAssign:!0}),assign:new k("_=",{beforeExpr:!0,isAssign:!0}),incDec:new k("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new k("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=/===/!==",6),relational:i("/<=/>=",7),bitShift:i("<>/>>>",8),plusMin:new k("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new k("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",A),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",A),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",A),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",C),_if:s("if"),_return:s("return",A),_switch:s("switch"),_throw:s("throw",A),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",C),_super:s("super",C),_class:s("class",C),_extends:s("extends",A),_export:s("export"),_import:s("import"),_null:s("null",C),_true:s("true",C),_false:s("false",C),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,T=new RegExp(O.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,P=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,F=Object.prototype,$=F.hasOwnProperty,B=F.toString,R=Array.isArray||function(e){return"[object Array]"===B.call(e)},I=function(e,t){this.line=e,this.column=t};I.prototype.offset=function(e){return new I(this.line,this.column+e)};var j=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},D={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},M={},V=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=l(g[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=y[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=l(r);var s=(r?r+" ":"")+y.strict;this.reservedWordsStrict=l(s),this.reservedWordsStrictBind=l(s+" "+y.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=L.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};V.prototype.isKeyword=function(e){return this.keywords.test(e)},V.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},V.prototype.extend=function(e,t){this[e]=t(this[e])},V.prototype.loadPlugins=function(e){for(var t in e){var n=M[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},V.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var q=V.prototype,U=/^(?:'((?:\\.|[^'])*?)'|"((?:\\.|[^"])*?)"|;)/;q.strictDirective=function(e){for(;;){P.lastIndex=e,e+=P.exec(this.input)[0].length;var t=U.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},q.eat=function(e){return this.type===e&&(this.next(),!0)},q.isContextual=function(e){return this.type===L.name&&this.value===e},q.eatContextual=function(e){return this.value===e&&this.eat(L.name)},q.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},q.canInsertSemicolon=function(){return this.type===L.eof||this.type===L.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},q.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},q.semicolon=function(){this.eat(L.semi)||this.insertSemicolon()||this.unexpected()},q.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},q.expect=function(e){this.eat(e)||this.unexpected()},q.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},q.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},q.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var W={kind:"loop"},G={kind:"switch"};z.isLet=function(){if(this.type!==L.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},z.isAsyncFunction=function(){if(this.type!==L.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;P.lastIndex=this.pos;var e=P.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},z.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=L._var,r="let"),i){case L._break:case L._continue:return this.parseBreakContinueStatement(s,i.keyword);case L._debugger:return this.parseDebuggerStatement(s);case L._do:return this.parseDoStatement(s);case L._for:return this.parseForStatement(s);case L._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case L._class:return e||this.unexpected(),this.parseClass(s,!0);case L._if:return this.parseIfStatement(s);case L._return:return this.parseReturnStatement(s);case L._switch:return this.parseSwitchStatement(s);case L._throw:return this.parseThrowStatement(s);case L._try:return this.parseTryStatement(s);case L._const:case L._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case L._while:return this.parseWhileStatement(s);case L._with:return this.parseWithStatement(s);case L.braceL:return this.parseBlock();case L.semi:return this.parseEmptyStatement(s);case L._export:case L._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===L._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===L.name&&"Identifier"===a.type&&this.eat(L.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},z.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(L.semi)||this.insertSemicolon()?e.label=null:this.type!==L.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r=6?this.eat(L.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},z.parseForStatement=function(e){if(this.next(),this.labels.push(W),this.enterLexicalScope(),this.expect(L.parenL),this.type===L.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===L._var||this.type===L._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new p,s=this.parseExpression(!0,i);return this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},z.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},z.isFunction=function(){return this.type===L._function||this.isAsyncFunction()},z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(L._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},z.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(L.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(L.braceL),this.labels.push(G),this.enterLexicalScope();for(var t,n=!1;this.type!=L.braceR;)if(this.type===L._case||this.type===L._default){var r=this.type===L._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(L.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},z.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var J=[];z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===L._catch){var t=this.startNode();this.next(),this.expect(L.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(L.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(L._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},z.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(W),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},z.parseLabeledStatement=function(e,t,n){for(var r=0,i=this.labels;r=0;o--){var a=this.labels[o];if(a.statementStart!=e.start)break;a.statementStart=this.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},z.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(L.braceL),e&&this.enterLexicalScope();!this.eat(L.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},z.parseFor=function(e,t){return e.init=t,this.expect(L.semi),e.test=this.type===L.semi?null:this.parseExpression(),this.expect(L.semi),e.update=this.type===L.parenR?null:this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},z.parseForIn=function(e,t){var n=this.type===L._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(L.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},z.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var r=this.startNode();if(this.parseVarId(r,n),this.eat(L.eq)?r.init=this.parseMaybeAssign(t):"const"!==n||this.type===L._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==r.id.type||t&&(this.type===L._in||this.isContextual("of"))?r.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(r,"VariableDeclarator")),!this.eat(L.comma))break}return e},z.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},z.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(L.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=L.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==L.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},z.parseFunctionParams=function(e){this.expect(L.parenL),e.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},z.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),r=!1;for(n.body=[],this.expect(L.braceL);!this.eat(L.braceR);)if(!this.eat(L.semi)){var i=this.startNode(),s=this.eat(L.star),o=!1,a=this.type===L.name&&"static"===this.value;this.parsePropertyName(i),i.static=a&&this.type!==L.parenL,i.static&&(s&&this.unexpected(),s=this.eat(L.star),this.parsePropertyName(i)),this.options.ecmaVersion>=8&&!s&&!i.computed&&"Identifier"===i.key.type&&"async"===i.key.name&&this.type!==L.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(i)),i.kind="method";var u=!1;if(!i.computed){var c=i.key;s||o||"Identifier"!==c.type||this.type===L.parenL||"get"!==c.name&&"set"!==c.name||(u=!0,i.kind=c.name,c=this.parsePropertyName(i)),!i.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(r&&this.raise(c.start,"Duplicate constructor in the same class"),u&&this.raise(c.start,"Constructor can't have get/set modifier"),s&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),i.kind="constructor",r=!0)}if(this.parseClassMethod(n,i,s,o),u){var l="get"===i.kind?0:1;if(i.value.params.length!==l){var p=i.value.start;"get"===i.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},z.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},z.parseClassId=function(e,t){e.id=this.type===L.name?this.parseIdent():!0===t?this.unexpected():null},z.parseClassSuper=function(e){e.superClass=this.eat(L._extends)?this.parseExprSubscripts():null},z.parseExport=function(e,t){if(this.next(),this.eat(L.star))return this.expectContextual("from"),e.source=this.type===L.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(L._default)){this.checkExport(t,"default",this.lastTokStart);var n;if(this.type===L._function||(n=this.isAsyncFunction())){var r=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(r,"nullableID",!1,n)}else if(this.type===L._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===L.string?this.parseExprAtom():this.unexpected();else{for(var s=0,o=e.specifiers;s=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0,r=e.properties;n=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0);else{var s=t[n="$"+n];if(s){("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}}},Y.parseExpression=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===L.comma){var s=this.startNodeAt(n,r);for(s.expressions=[i];this.eat(L.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new p,r=!0);var o=this.start,a=this.startLoc;this.type!=L.parenL&&this.type!=L.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||p.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===L.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},Y.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(L.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(L.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},Y.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},Y.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==L._in)&&s>r){var o=this.type===L.logicalOR||this.type===L.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},Y.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},Y.parseMaybeUnary=function(e,t){var n,r=this.start,i=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(),t=!0;else if(this.type.prefix){var s=this.startNode(),o=this.type===L.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(s,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var a=this.startNodeAt(r,i);a.operator=this.value,a.prefix=!1,a.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(a,"UpdateExpression")}}return!t&&this.eat(L.starstar)?this.buildBinary(r,i,n,this.parseMaybeUnary(null,!1),"**",!1):n},Y.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},Y.parseSubscripts=function(e,t,n,r){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon(),s=void 0;;)if((s=this.eat(L.bracketL))||this.eat(L.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=s?this.parseExpression():this.parseIdent(!0),o.computed=!!s,s&&this.expect(L.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!r&&this.eat(L.parenL)){var a=new p,u=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var l=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1,a);if(i&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(a,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),l,!0);this.checkExpressionErrors(a,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=c||this.awaitPos;var h=this.startNodeAt(t,n);h.callee=e,h.arguments=l,e=this.finishNode(h,"CallExpression")}else{if(this.type!==L.backQuote)return e;var f=this.startNodeAt(t,n);f.tag=e,f.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(f,"TaggedTemplateExpression")}},Y.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case L._super:return this.inFunction||this.raise(this.start,"'super' outside of function or class"),t=this.startNode(),this.next(),this.type!==L.dot&&this.type!==L.bracketL&&this.type!==L.parenL&&this.unexpected(),this.finishNode(t,"Super");case L._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case L.name:var r=this.start,i=this.startLoc,s=this.parseIdent(this.type!==L.name);if(this.options.ecmaVersion>=8&&"async"===s.name&&!this.canInsertSemicolon()&&this.eat(L._function))return this.parseFunction(this.startNodeAt(r,i),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(L.arrow))return this.parseArrowExpression(this.startNodeAt(r,i),[s],!1);if(this.options.ecmaVersion>=8&&"async"===s.name&&this.type===L.name)return s=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(L.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(r,i),[s],!0)}return s;case L.regexp:var o=this.value;return t=this.parseLiteral(o.value),t.regex={pattern:o.pattern,flags:o.flags},t;case L.num:case L.string:return this.parseLiteral(this.value);case L._null:case L._true:case L._false:return t=this.startNode(),t.value=this.type===L._null?null:this.type===L._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case L.parenL:var a=this.start,u=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(u)&&(e.parenthesizedAssign=a),e.parenthesizedBind<0&&(e.parenthesizedBind=a)),u;case L.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(L.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case L.braceL:return this.parseObj(!1,e);case L._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case L._class:return this.parseClass(this.startNode(),!1);case L._new:return this.parseNew();case L.backQuote:return this.parseTemplate();default:this.unexpected()}},Y.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},Y.parseParenExpression=function(){this.expect(L.parenL);var e=this.parseExpression();return this.expect(L.parenR),e},Y.parseParenAndDistinguishExpression=function(e){var t,n=this.start,r=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,o,a=this.start,u=this.startLoc,c=[],l=!0,h=!1,f=new p,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==L.parenR;){if(l?l=!1:this.expect(L.comma),i&&this.afterTrailingComma(L.parenR,!0)){h=!0;break}if(this.type===L.ellipsis){s=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===L.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==L.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(L.parenR),e&&!this.canInsertSemicolon()&&this.eat(L.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(n,r,c);c.length&&!h||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,c.length>1?((t=this.startNodeAt(a,u)).expressions=c,this.finishNodeAt(t,"SequenceExpression",m,g)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(n,r);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},Y.parseParenItem=function(e){return e},Y.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Q=[];Y.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(L.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(L.parenL)?e.arguments=this.parseExprList(L.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Q,this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===L.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),n.value={raw:this.value,cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),n.tail=this.type===L.backQuote,this.finishNode(n,"TemplateElement")},Y.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.expect(L.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(L.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,"TemplateLiteral")},Y.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===L.name||this.type===L.num||this.type===L.string||this.type===L.bracketL||this.type.keyword)&&!O.test(this.input.slice(this.lastTokEnd,this.start))},Y.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(L.braceR);){if(r)r=!1;else if(this.expect(L.comma),this.afterTrailingComma(L.braceR))break;var s=this.parseProperty(e,t);this.checkPropClash(s,i),n.properties.push(s)}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},Y.parseProperty=function(e,t){var n,r,i,s,o=this.startNode();return this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,s=this.startLoc),e||(n=this.eat(L.star))),this.parsePropertyName(o),!e&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(o)?(r=!0,this.parsePropertyName(o,t)):r=!1,this.parsePropertyValue(o,e,n,r,i,s,t),this.finishNode(o,"Property")},Y.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===L.colon&&this.unexpected(),this.eat(L.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===L.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(t||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type==L.comma||this.type==L.braceR)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?(this.checkUnreserved(e.key),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===L.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(n||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},Y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(L.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(L.bracketR),e.key;e.computed=!1}return e.key=this.type===L.num||this.type===L.string?this.parseExprAtom():this.parseIdent(!0)},Y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},Y.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(L.parenL),n.params=this.parseBindingList(L.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},Y.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},Y.parseFunctionBody=function(e,t){var n=t&&this.type!==L.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},Y.isSimpleParamList=function(e){for(var t=0,n=e;t0;)t[n]=arguments[n+1];for(var r=0,i=t;r=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,n=this.type;n.keyword&&e==L.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},L.parenR.updateContext=L.braceR.updateContext=function(){if(1!=this.context.length){var e=this.context.pop();e===re.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},L.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0},L.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0},L.parenL.updateContext=function(e){var t=e===L._if||e===L._for||e===L._with||e===L._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0},L.incDec.updateContext=function(){},L._function.updateContext=L._class.updateContext=function(e){e.beforeExpr&&e!==L.semi&&e!==L._else&&(e!==L.colon&&e!==L.braceL||this.curContext()!==re.b_stat)?this.context.push(re.f_expr):this.context.push(re.f_stat),this.exprAllowed=!1},L.backQuote.updateContext=function(){this.curContext()===re.q_tmpl?this.context.pop():this.context.push(re.q_tmpl),this.exprAllowed=!1},L.star.updateContext=function(e){if(e==L._function){var t=this.context.length-1;this.context[t]===re.f_expr?this.context[t]=re.f_expr_gen:this.context[t]=re.f_gen}this.exprAllowed=!0},L.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var se=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new j(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},oe=V.prototype,ae="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);oe.next=function(){this.options.onToken&&this.options.onToken(new se(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},oe.getToken=function(){return this.next(),new se(this)},"undefined"!=typeof Symbol&&(oe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===L.eof,value:t}}}}),oe.curContext=function(){return this.context[this.context.length-1]},oe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(L.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},oe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},oe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},oe.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations){T.lastIndex=t;for(var r;(r=T.exec(this.input))&&r.index8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.pos}}},oe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},oe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(L.ellipsis)):(++this.pos,this.finishToken(L.dot))},oe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(L.assign,2):this.finishOp(L.slash,1)},oe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?L.star:L.modulo;return this.options.ecmaVersion>=7&&42==e&&42===t&&(++n,r=L.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(L.assign,n+1):this.finishOp(r,n)},oe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?L.logicalOR:L.logicalAND,2):61===t?this.finishOp(L.assign,2):this.finishOp(124===e?L.bitwiseOR:L.bitwiseAND,1)},oe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(L.assign,2):this.finishOp(L.bitwiseXOR,1)},oe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!=t||this.inModule||62!=this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!O.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(L.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(L.assign,2):this.finishOp(L.plusMin,1)},oe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(L.assign,n+1):this.finishOp(L.bitShift,n)):33!=t||60!=e||this.inModule||45!=this.input.charCodeAt(this.pos+2)||45!=this.input.charCodeAt(this.pos+3)?(61===t&&(n=2),this.finishOp(L.relational,n)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},oe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(L.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(L.arrow)):this.finishOp(61===e?L.eq:L.prefix,1)},oe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(L.parenL);case 41:return++this.pos,this.finishToken(L.parenR);case 59:return++this.pos,this.finishToken(L.semi);case 44:return++this.pos,this.finishToken(L.comma);case 91:return++this.pos,this.finishToken(L.bracketL);case 93:return++this.pos,this.finishToken(L.bracketR);case 123:return++this.pos,this.finishToken(L.braceL);case 125:return++this.pos,this.finishToken(L.braceR);case 58:return++this.pos,this.finishToken(L.colon);case 63:return++this.pos,this.finishToken(L.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(L.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(L.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},oe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var ue=!!f("￿","u");oe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(O.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(ue?u="u":(a=(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return ae||(f(a,u,r,this),l=f(s,o)),this.finishToken(L.regexp,{pattern:s,flags:o,value:l})},oe.readInt=function(e,t){for(var n=this.pos,r=0,i=0,s=null==t?1/0:t;i=97?o-97+10:o>=65?o-65+10:o>=48&&o<=57?o-48:1/0)>=e)break;++this.pos,r=r*e+a}return this.pos===n||null!=t&&this.pos-n!==t?null:r},oe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(L.num,t)},oe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?this.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(L.num,o)},oe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},oe.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;92===r?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(o(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(L.string,t)};var ce={};oe.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==ce)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},oe.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw ce;this.raise(e,t)},oe.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==L.template&&this.type!==L.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(L.template,e)):36===n?(this.pos+=2,this.finishToken(L.dollarBraceL)):(++this.pos,this.finishToken(L.backQuote));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(o(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},oe.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.invalidStringToken(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},oe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.invalidStringToken(t,"Bad character escape sequence"),n},oe.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos=s)&&a[c](t,n,e),(null==r||t.start==r)&&(null==s||t.end==s)&&o(c,t))throw new i(t,n)}(n,u)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeAround=function(n,r,s,o,a){s=t(s),o||(o=e.base);try{!function e(t,n,a){var u=a||t.type;if(!(t.start>r||t.end=r&&s(u,t))throw new i(t,n);o[u](t,n,e)}}(n,a)}catch(e){if(e instanceof i)return e;throw e}},e.findNodeBefore=function(n,r,s,o,a){s=t(s),o||(o=e.base);var u;return function e(t,n,a){if(!(t.start>r)){var c=a||t.type;t.end<=r&&(!u||u.node.end0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return o[e>>18&63]+o[e>>12&63]+o[e>>6&63]+o[63&e]}function s(e,t,n){for(var r,s=[],o=t;o0?c-4:c;var l=0;for(t=0;t>16&255,o[l++]=i>>8&255,o[l++]=255&i;return 2===s?(i=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,o[l++]=255&i):1===s&&(i=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,o[l++]=i>>8&255,o[l++]=255&i),o},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",a=[],u=0,c=n-r;uc?c:u+16383));return 1===r?(t=e[n-1],i+=o[t>>2],i+=o[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=o[t>>10],i+=o[t>>4&63],i+=o[t<<2&63],i+="="),a.push(i),a.join("")};for(var o=[],a=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,p=c.length;lB)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return a(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,n){if(t<0||e.byteLength=B)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+B.toString(16)+" bytes");return 0|e}function l(e,t){if(i.isBuffer(e))return e.length;if(N(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return _(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(e).length;default:if(r)return _(e).length;t=(""+t).toLowerCase(),r=!0}}function p(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,n){var r=e.length;(!t||t<0)&&(t=0);(!n||n<0||n>r)&&(n=r);for(var i="",s=t;s2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,P(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:d(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):d(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;hi&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o>8,i=n%256,s.push(i),s.push(r);return s}(t,e.length-n),e,n,r)}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rn)throw new RangeError("Trying to access beyond buffer length")}function S(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function k(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function A(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),$.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),$.write(e,t,n,r,52,8),n+8}function _(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function L(e){return F.toByteArray(function(e){if((e=e.trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function N(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function P(e){return e!=e}var F=e("base64-js"),$=e("ieee754");n.Buffer=i,n.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},n.INSPECT_MAX_BYTES=50;var B=2147483647;n.kMaxLength=B,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return function(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}(e,t,n)},i.allocUnsafe=function(e){return a(e)},i.allocUnsafeSlow=function(e){return a(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return m(this,e,t,n);case"ascii":return g(this,e,t,n);case"latin1":case"binary":return v(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],i=1,s=0;++s=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),$.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),$.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,!r){S(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);S(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||S(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return A(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return A(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],10:[function(e,t,n){(function(n){function r(){}function i(e){this.covers={},this._ident=i.prototype.version+"_"+Math.random(),this.setOptions(e||{})}var s=e("./lib/parser"),o=e("./lib/arboriculture"),a=e("./lib/output");i.prototype.smCache={},i.prototype.setOptions=function(e){return this.log=!1===e.log?r:e.log||this.log,this.options=function(e){var t={};return e.forEach(function(e){if(e&&"object"==typeof e)for(var n in e)t[n]=e[n]}),t}([this.options,e]),delete this.options.log,this},i.prototype.version=e("./package.json").version,i.prototype.isThenable=function(e){return e&&e instanceof Object&&"function"==typeof e.then},i.prototype.compile=function(e,t,n,s){"object"==typeof n&&void 0===s&&(s=n),s=s||{};for(var o in i.initialCodeGenOpts)o in s||(s[o]=i.initialCodeGenOpts[o]);var a=this.parse(e,t,null,s);return this.asynchronize(a,null,s,this.log||r),this.prettyPrint(a,s),a},i.prototype.parse=function(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=s.parse(i.origCode,r&&r.parser),r.babelTree&&s.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(o.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var a=i.origCode.substr(e.pos-e.loc.column);a=a.split("\n")[0],e.message+=" "+t+" (nodent)\n"+a+"\n"+a.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}},i.prototype.asynchronize=o.asynchronize,i.prototype.printNode=o.printNode,i.prototype.prettyPrint=function(t,r){var i=t.filename?t.filename.split("/"):["anonymous"],s=i.pop(),o=a(t.ast,r&&r.sourcemap?{map:{startLine:r.mapStartLine||0,file:s+"(original)",sourceMapRoot:i.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(r&&r.sourcemap)try{var u="",c=o.map.toJSON();if(c){var l=e("source-map").SourceMapConsumer;t.sourcemap=c,this.smCache[t.filename]={map:c,smc:new l(c)},u="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+function(e){return(e instanceof n?e:new n(e.toString(),"binary")).toString("base64")}(JSON.stringify(c))+"\n"}t.code=o.code+u}catch(e){t.code=o}else t.code=o;return t},i.prototype.getDefaultCompileOptions=void 0,Object.defineProperty(i.prototype,"Promise",{get:function(){return initOpts.log("Warning: nodent.Promise is deprecated. Use nodent.Thenable instead"),Thenable},enumerable:!1,configurable:!1}),i.initialCodeGenOpts={noRuntime:!1,lazyThenables:!1,es6target:!1,noUseDirective:!1,wrapAwait:null,mapStartLine:0,sourcemap:!0,engine:!1,parser:{sourceType:"script"},$return:"$return",$error:"$error",$arguments:"$args",$asyncspawn:"$asyncspawn",$asyncbind:"$asyncbind",generatedSymbolPrefix:"$",$makeThenable:"$makeThenable"},t.exports=i}).call(this,e("buffer").Buffer)},{"./lib/arboriculture":11,"./lib/output":12,"./lib/parser":13,"./package.json":25,buffer:8,"source-map":24}],11:[function(e,t,n){"use strict";function r(e){if(!e)return"";if(Array.isArray(e))return e.map(r).join("|\n");try{return m(e)}catch(t){return t.message+": "+(e&&e.type)}}function i(e){if(Array.isArray(e))return e.map(function(e){return i(e)});var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function s(e,t){e!==t&&(e.__proto__=Object.getPrototypeOf(t),Object.keys(e).forEach(function(t){t in g||delete e[t]}),Object.keys(t).forEach(function(n){n in e||(e[n]=t[n])}))}function o(){}function a(e){return e?(b.node=e,b):{}}function u(e,t,n){if(!e)return null;if(t&&"object"==typeof t){var r=Object.keys(t);return u(e,function(e){return r.every(function(n){return e[n]==t[n]})})}var i,s={};if(Array.isArray(e)){for(var o=0;o0){if(!o)return t(e);delete e.async}return void(!o&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:k(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):a(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!a(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(a(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:k(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function P(e,t){return Array.isArray(e)?e.map(function(e){return P(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(c(e.alternate)||c(e.consequent))){h(E("condOp"));s(e,_(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function F(e,t){return Array.isArray(e)?e.map(function(e){return F(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&c(e.right)){var r,i=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}s(e,_(y.part(r,[i,e.left,e.right]).body))}},t),e)}function $(e,t,n){if("SwitchCase"!==e.type&&a(e).isBlockStatement)for(var r=0;r { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===i?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:w,exit:P,idIter:E,idContinuation:A,idStep:S}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[pe.asyncbind,A,S,P,E,b(1===i)]).expr,o.push({type:"ReturnStatement",argument:N}),o.push({$label:e.$label,type:"FunctionDeclaration",id:E,params:[],body:{type:"BlockStatement",body:d}}),f&&o.push({type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:[f,L]}}),!l||"VariableDeclaration"!==l.type||"let"!==l.kind&&"const"!==l.kind?(o.push(v),t[0].replace(o.map(r))):("const"===l.kind&&(l.kind="let"),t[0].replace([{type:"BlockStatement",body:o.map(r)},r(v)]))}}function G(e){if(!a(e).isFunction)throw new Error("Cannot examine non-Function node types for async exits");return u(e.body,function(e){return"Identifier"===e.type&&(e.name===n.$return||e.name===n.$error)||I(e)&&a(e).isAsync},function(e){return!(a(e).isFunction&&(e.$wasAsync||a(e).isAsync))})}function J(t){return y.treeWalker(t,function(t,r,i){var s=x(t);if(r(),s&&a(s).isAsync){if("set"==t.kind){var o=new SyntaxError(v(s)+"method 'async set' cannot be invoked",e.filename,t.start);throw o.pos=t.start,o.loc=t.loc.start,o}s.async=!1;var u=w(s);G(s)||0!==s.body.body.length&&"ReturnStatement"===s.body.body[s.body.body.length-1].type||s.body.body.push({type:"ReturnStatement"});var c=m(S({type:"FunctionExpression",params:[pe.return,pe.error],body:J(N(s.body,i)),$wasAsync:!0},n),n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0));n.promises?s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:{type:"NewExpression",callee:h("Promise"),arguments:[c]}}]}:s.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:c}]},u&&D(s.body.body,[he])}})}function H(e){return y.treeWalker(e,function(e,t,r){if(t(),a(e).isAsync&&a(e).isFunction){var i;(i=x(r[0].parent))&&a(i).isAsync&&"get"===r[0].parent.kind&&X(r[0].parent.key),delete e.async;var s=w(e),o=S({type:"FunctionExpression",params:[pe.return,pe.error],$wasAsync:!0},n),u=[{self:o}].concat(r);return a(e.body).isBlockStatement?(G(e)||0!==e.body.body.length&&"ReturnStatement"===e.body.body[e.body.body.length-1].type||e.body.body.push({type:"ReturnStatement"}),o.body={type:"BlockStatement",body:e.body.body.map(function(e){return N(e,u)})}):(o.body={type:"BlockStatement",body:[N({type:"ReturnStatement",argument:e.body},u)]},e.expression=!1),o=m(o,n.promises||n.generators||n.engine?null:b(!n.lazyThenables||0)),n.promises&&(o={type:"NewExpression",callee:h("Promise"),arguments:[o]}),o={type:"BlockStatement",body:[{type:"ReturnStatement",loc:e.loc,argument:o}]},s&&D(o.body,[he]),void(e.body=o)}}),e}function Y(e){if(Array.isArray(e))return e.map(Y);var t=0;return y.treeWalker(e,function(e,n,r){if("ThrowStatement"!==e.type&&"ReturnStatement"!==e.type||e.$mapped){if(a(e).isFunction)return t++,n(e),void t--}else if(t>0&&a(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?pe.error:pe.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function Q(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:pe.return,error:pe.error,asyncspawn:pe.asyncspawn,body:Y(e).concat(t?[{type:"ReturnStatement",argument:pe.return}]:[])}).body[0]}function X(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+r(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function Z(e,t){function r(e,t){y.treeWalker(e,function(n,r,i){n!==e&&a(n).isFunction||(a(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function o(e){var t=n.promises;n.promises=!0,A(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,i){n();var l,p,h;if(a(e).isAsync&&a(e).isFunction){var f;(f=x(i[0].parent))&&a(f).isAsync&&"get"===i[0].parent.kind&&X(i[0].parent.key),(p=G(e))?(c(p,e.body),o(e)):t?"get"!==i[0].parent.kind&&r(e,!0):(delete(l=e).async,h=w(l),r(l,!1),(l=u(l)).body=Q(l.body.body,p),h&&D(l.body.body,[he]),l.id&&"ExpressionStatement"===i[0].parent.type?(l.type="FunctionDeclaration",i[1].replace(l)):i[0].replace(l))}else(l=x(e))&&a(l).isAsync&&((p=G(l))?(c(p,l),o(e)):t&&"get"!==e.kind||(t?o(e):(e.async=!1,h=w(l),r(l,!1),s(l,u(l)),l.body=Q(l.body.body,p)),h&&D(l.body.body,[he])))});var l=i(n);return n.engine=!1,n.generators=!1,ie(e),ne(e),j(e,l.engine),F(e),P(e),V(e,[M,W,B,R,$]),q(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function K(e,t,n){var r=[];return y.treeWalker(e,function(i,s,o){if(i===e)return s();t(i,o)?r.push([].concat(o)):n||a(i).isScope||s()}),r}function ee(e,t){var n=[],r={};if((e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type})).length){var s={};e.forEach(function(e){function t(e){e in s?r[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:r}}function te(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(te(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return te(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(te(t))},[]);case"ObjectProperty":case"Property":return te(e.value);case"RestElement":case"RestProperty":return te(e.argument)}}function ne(e){function t(e){return u(e,function(e){return"AssignmentExpression"===e.type})}function n(e){return function(t,n){if("VariableDeclaration"===t.type&&(t.kind=t.kind||"var")&&e.indexOf(t.kind)>=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function o(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(a(e).isAsync||!e.$continuation)}var l={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,r){function o(e){h.length&&(e.argument={type:"SequenceExpression",expressions:h.map(function(e){var t=i(e);return s(e,e.left),t}).concat(e.argument)},h=[])}var u;if(n(),e.type in l&&!e.$hoisted){var p=l[e.type](e),h=[];for(u=0;u0;u--)if(e.declarations[u]&&e.declarations[u].init&&c(e.declarations[u].init)){var f={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(u)},d=r[0];if(!("index"in d))throw new Error("VariableDeclaration not in a block");d.parent[d.field].splice(d.index+1,0,f)}}),function(e){function t(e){d(v(e)+"Possible assignment to 'const "+r(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===i[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===i[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===i[e.key.name]&&t(e)})}}var i={};y.treeWalker(e,function(e,t,r){var s=a(e).isBlockStatement;if(s){i=Object.create(i);for(var o=0;o=0&&"ReturnStatement"===r[1].self.type){var s=e.$thisCallName,o=i(ce[s].def.body.body);ce[s].$inlined=!0,a(r[1].self).isJump||o.push({type:"ReturnStatement"}),r[1].replace(o)}});var n=Object.keys(ce).map(function(e){return ce[e].$inlined&&ce[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||u(e,function(e){return a(e).isES6},!0))){var r=oe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var i=r;if(r=r||oe(e)){t();var s="Program"===e.type?e:e.body,o=K(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();r=i}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var ce={},le=1,pe={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){pe[e.slice(1)]=h(n[e])});var he=y.part("var $0 = arguments",[pe.arguments]).body[0];return n.engine?(e.ast=re(e.ast,!0),e.ast=Z(e.ast,n.engine),e.ast=se(e.ast),ue(e.ast)):n.generators?(e.ast=re(e.ast),e.ast=Z(e.ast),e.ast=se(e.ast),ue(e.ast)):(e.ast=re(e.ast),A(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&s(e,b(e.value))}),e}var y=e("./parser"),m=e("./output"),g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:r,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,0,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}},{"./output":12,"./parser":13}],12:[function(e,t,n){"use strict";function r(e){if("NewExpression"===e.type&&e.arguments&&e.arguments.length)return 19;var t=h[e.type]||h[e.type+e.operator]||h[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}var i,s,o,a,u,c,l=e("source-map").SourceMapGenerator;if("".repeat)c=function(e,t){return t&&e?e.repeat(t):""};else{var p={};c=function(e,t){if(!t||!e)return"";var n=""+e+t;if(!p[n]){for(var r=[];t--;)r.push(e);p[n]=r.join("")}return p[n]}}var h={ExpressionStatement:-1,Identifier:21,Literal:21,BooleanLiteral:21,RegExpLiteral:21,NumericLiteral:21,StringLiteral:21,NullLiteral:21,ThisExpression:21,SuperExpression:21,ObjectExpression:21,ClassExpression:21,MemberExpression:19,CallExpression:18,NewExpression:18,ArrayExpression:17.5,FunctionExpression:17.5,FunctionDeclaration:17.5,ArrowFunctionExpression:17.5,"UpdateExpression++":17,"UpdateExpression--":17,"UpdateExpression++prefix":16,"UpdateExpression--prefix":16,UnaryExpression:16,AwaitExpression:16,"BinaryExpression**":15,"BinaryExpression*":15,"BinaryExpression/":15,"BinaryExpression%":15,"BinaryExpression+":14,"BinaryExpression-":14,"BinaryExpression<<":13,"BinaryExpression>>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},f={type:"comma-separated-list"},d={out:function(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))},expr:function(e,t,n,i){2===i||r(n)0)for(var r=n.length,i=0;i0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r0){t.write(null,s);for(var a=0,u=n.length;a0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i0){for(var s=0;s0)for(var r=0;r ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:s=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:s,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,f,s),((i+=1)=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:a,ObjectExpression:function(e,t){var n,r=c(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++ut.wrapColumn&&t.write(null,t.lineEnd,c(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,f,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i0)for(var i=r.length,s=0;s1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:o=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:o,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.expr(t,e,e.callee,"CallExpression"===e.callee.type||"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),this.argumentList(e,t)},MemberExpression:function(e,t){!("ObjectExpression"===e.object.type||e.object.type.match(/Literal$/)&&e.object.raw&&e.object.raw.match(/^[0-9]/))&&("ArrayExpression"===e.object.type||"CallExpression"===e.object.type||"NewExpression"===e.object.type||r(e)<=r(e.object))?this.out(e.object,t,e.object.type):(t.write(null,"("),this.out(e.object,t,e.object.type),t.write(null,")")),e.computed?(t.write(e,"["),this.out(e.property,t,e.property.type),t.write(null,"]")):(t.write(e,"."),this.out(e.property,t,e.property.type))},Identifier:function(e,t){t.write(e,e.name)},Literal:function(e,t){t.write(e,e.raw)},NullLiteral:function(e,t){t.write(e,"null")},BooleanLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},StringLiteral:function(e,t){t.write(e,JSON.stringify(e.value))},RegExpLiteral:function(e,t){t.write(e,e.extra.raw||"/"+e.pattern+"/"+e.flags)},NumericLiteral:function(e,t){t.write(e,JSON.stringify(e.value))}};t.exports=function(e,t,n){var r="",i=[],s=(t=t||{}).map&&new l(t.map);s&&t.map.sourceContent&&s.setSourceContent(t.map.file,t.map.sourceContent);var o="",a=[],u=[],p={inForInit:0,lineLength:function(){return r.length},sourceAt:function(e,t){return n?n.substring(e,t):"/* Omitted Non-standard node */"},write:function(e){o=arguments[arguments.length-1];for(var n=1;n=0&&r({self:i,parent:e,field:u[c],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:u[c]})}})},n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(o.version)<4)&&(c||(parseInt(o.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(o),c=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var a in n)"noNodentExtensions"!==a&&(s[a]=n[a]);var u=o.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}var o=e("acorn"),a=e("acorn/dist/walk").make({AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;r=0)return t}else{var n=i.toSetString(e);if(s.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},r.prototype.at=function(e){if(e>=0&&e>>=5)>0&&(t|=32),n+=r.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var i,s,o=e.length,a=0,u=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),a+=(s&=31)<>1;return 1==(1&e)?-t:t}(a),n.rest=t}},{"./base64":16}],16:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],18:[function(e,t,n){function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");r.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},r.prototype.add=function(e){!function(e,t){var n=e.generatedLine,r=t.generatedLine,s=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=r},{"./util":23}],19:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t,n,s){if(n=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,(i.prototype=Object.create(r.prototype)).consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,(o.prototype=Object.create(r.prototype)).constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":14,"./base64-vlq":15,"./mapping-list":18,"./util":23}],22:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[a]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?s.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,u=e.split(o),c=0,l=function(){function e(){return c=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(t=u.join("/"))&&(t=a?"/":"."),s?(s.path=t,i(s)):t}function o(e){return e}function a(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}n.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var c=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,l=/^data:.+\,.+$/;n.urlParse=r,n.urlGenerate=i,n.normalize=s,n.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=r(t),o=r(e);if(o&&(e=o.path||"/"),n&&!n.scheme)return o&&(n.scheme=o.scheme),i(n);if(n||t.match(l))return t;if(o&&!o.host&&!o.path)return o.host=t,i(o);var a="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return o?(o.path=a,i(o)):a},n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(c)},n.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));n.toSetString=p?o:function(e){return a(e)?"$"+e:e},n.fromSetString=p?o:function(e){return a(e)?e.slice(1):e},n.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)||n?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!=(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},n.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)||n?r:0!=(r=e.source-t.source)?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},n.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=u(e.source,t.source))?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:u(e.name,t.name)}},{}],24:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":20,"./lib/source-map-generator":21,"./lib/source-node":22}],25:[function(e,t,n){t.exports={_args:[[{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent"]],_from:"nodent-compiler@>=3.1.5",_id:"nodent-compiler@3.1.5",_inCache:!0,_location:"/nodent-compiler",_nodeVersion:"8.9.1",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/nodent-compiler-3.1.5.tgz_1511792299537_0.15715787676163018"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"5.5.1",_phantomChildren:{},_requested:{raw:"nodent-compiler@>=3.1.5",scope:null,escapedName:"nodent-compiler",name:"nodent-compiler",rawSpec:">=3.1.5",spec:">=3.1.5",type:"range"},_requiredBy:["/nodent"],_resolved:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz",_shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",_shrinkwrap:null,_spec:"nodent-compiler@>=3.1.5",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/nodent",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{integrity:"sha512-Istg796un2lALiy/eFNnLbAEMovQqrtpVqXVY8PKs6ycsyBbK480D55misJBQ1QxvstcJ7Hk9xbSVkV8lIi+tg==",shasum:"8c09289eacf7256bda89c2b88941681d5cccf80c",tarball:"https://registry.npmjs.org/nodent-compiler/-/nodent-compiler-3.1.5.tgz"},engines:"node >= 0.10.0",gitHead:"93054f019902e2b107e7be681836273f35a02614",homepage:"https://github.com/MatAtBread/nodent-compiler#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"compiler.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent-compiler",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent-compiler.git"},scripts:{test:"node tests/basic.js # Please install 'nodent' and test the compiler fully from there."},version:"3.1.5"}},{}],26:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if((o=t.call(s,n)).done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":27,"./zousan":28}],27:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function s(e){this._resolver=e,this.then=i}return n.prototype={resolve:r,reject:r,then:function(e,t){this.resolve=e,this.reject=t}},s.resolve=function(e){return s.isThenable(e)?e:{then:function(t){return t(e)}}},s.isThenable=e,s}},{}],28:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u1)for(var n=1;n= 8.8",https:!0,_http_server:">= 0.11",_linklist:"< 8",module:!0,net:!0,os:!0,path:!0,perf_hooks:">= 8.5",process:">= 1",punycode:!0,querystring:!0,readline:!0,repl:!0,stream:!0,string_decoder:!0,sys:!0,timers:!0,tls:!0,tty:!0,url:!0,util:!0,v8:">= 1",vm:!0,zlib:!0}},{}],37:[function(e,t,n){(function(n){function r(e){if(!0===e)return!0;for(var t=e.split(" "),n=t[0],r=t[1].split("."),s=0;s<3;++s){var o=Number(i[s]||0),a=Number(r[s]||0);if(o!==a)return"<"===n?o="===n&&o>=a}return!1}var i=n.versions&&n.versions.node&&n.versions.node.split(".")||[],s=e("./core.json"),o={};for(var a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o[a]=r(s[a]));t.exports=o}).call(this,e("_process"))},{"./core.json":36,_process:32}],38:[function(e,t,n){var r=e("path"),i=e("fs"),s=r.parse||e("path-parse");t.exports=function(e,t){var n=t&&t.moduleDirectory?[].concat(t.moduleDirectory):["node_modules"],o=r.resolve(e);if(t&&!1===t.preserveSymlinks)try{o=i.realpathSync(o)}catch(e){if("ENOENT"!==e.code)throw e}var a="/";/^([A-Za-z]:)/.test(o)?a="":/^\\\\/.test(o)&&(a="\\\\");for(var u=[o],c=s(o);c.dir!==u[u.length-1];)u.push(c.dir),c=s(c.dir);var l=u.reduce(function(e,t){return e.concat(n.map(function(e){return r.join(a,t,e)}))},[]);return t&&t.paths?l.concat(t.paths):l}},{fs:7,path:30,"path-parse":31}],39:[function(e,t,n){var r=e("./core"),i=e("fs"),s=e("path"),o=e("./caller.js"),a=e("./node-modules-paths.js");t.exports=function(e,t){function n(e){if(l(e))return e;for(var t=0;t"))}return Object.keys(hostOptions).forEach(function(k){"host"===parseOpts[k]&&(parseOpts[k]=function(){try{return eval(hostOptions[k]),!0}catch(e){return!1}}())}),parseOpts.promises||parseOpts.es7||parseOpts.generators||parseOpts.engine?((parseOpts.promises||parseOpts.es7)&&parseOpts.generators&&(log("No valid 'use nodent' directive, assumed -es7 mode"),parseOpts=optionSets.es7),(parseOpts.generators||parseOpts.engine)&&(parseOpts.promises=!0),parseOpts.promises&&(parseOpts.es7=!0),parseOpts):null}function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function compileNodentedFile(e,t){return t=t||e.log,function(n,r,i){var s=stripBOM(fs.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||parseCompilerOptions(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function asyncify(e){return e=e||Thenable,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function generateRequestHandler(e,t,n){var r={},i=this;t||(t=/\.njs$/),n?n.compiler||(n.compiler={}):n={compiler:{}};var s=copyObj([NodentCompiler.initialCodeGenOpts,n.compiler]);return function(o,a,u){function c(e){a.statusCode=500,a.write(e.toString()),a.end()}if(r[o.url])return a.setHeader("Content-Type",r[o.url].contentType),n.setHeaders&&n.setHeaders(a),a.write(r[o.url].output),void a.end();if(!(o.url.match(t)||n.htmlScriptRegex&&o.url.match(n.htmlScriptRegex)))return u&&u();var l=e+o.url;if(n.extensions&&!fs.existsSync(l))for(var p=0;p=0?this.covers[n]=require(e):this.covers[n]=require(__dirname+"/covers/"+e)),this.covers[n](this,t)}function prepareMappedStackTrace(e,t){return e+t.map(function(e){var t=e.getFileName();if(t&&NodentCompiler.prototype.smCache[t]){var n=NodentCompiler.prototype.smCache[t].smc.originalPositionFor({line:e.getLineNumber(),column:e.getColumnNumber()});if(n&&n.line){var r=e.toString();return"\n at "+r.substring(0,r.length-1)+" => …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}).join("")}function setGlobalEnvironment(e){var t={};t[defaultCodeGenOpts.$asyncbind]={value:$asyncbind,writable:!0,enumerable:!1,configurable:!0},t[defaultCodeGenOpts.$asyncspawn]={value:$asyncspawn,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}defaultCodeGenOpts[defaultCodeGenOpts.$error]in global||(global[defaultCodeGenOpts[defaultCodeGenOpts.$error]]=globalErrorHandler),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return asyncify(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return Thenable.isThenable(this)},writable:!0,configurable:!0}}),Object[defaultCodeGenOpts.$makeThenable]=Thenable.resolve}function initialize(e){function t(n,r){if(!r.match(/nodent\/nodent\.js$/)){if(r.match(/node_modules\/nodent\/.*\.js$/))return stdJSLoader(n,r);for(var o=0;ot[n])return 1}return 0}(u.version,NodentCompiler.prototype.version)<0&&(u.originalNodentLoader=n.exports,n.exports=function(){var t=require.extensions[".js"],n=u.originalNodentLoader.apply(this,arguments);return u.jsCompiler=require.extensions[".js"],require.extensions[".js"]=t,setGlobalEnvironment(e),n},Object.keys(u.originalNodentLoader).forEach(function(e){n.exports[e]=u.originalNodentLoader[e]}),i.push(u),i=i.sort(function(e,t){return t.path.length-e.path.length})))}function n(t){if(Array.isArray(t))return t.forEach(n);if(require.extensions[t]){Object.keys(e).filter(function(t){return compiler[t]!=e[t]}).length&&e.log("File extension "+t+" already configured for async/await compilation.")}require.extensions[t]=compileNodentedFile(compiler,e.log)}if(e){for(var r in e)if("use"!==r&&!config.hasOwnProperty(r))throw new Error("NoDent: unknown option: "+r+"="+JSON.stringify(e[r]))}else e={};compiler?compiler.setOptions(e):(Object.keys(config).forEach(function(t){t in e||(e[t]=config[t])}),compiler=new NodentCompiler(e)),e.dontMapStackTraces||(Error.prepareStackTrace=prepareMappedStackTrace),setGlobalEnvironment(e);var i=[];if(!e.dontInstallRequireHook){if(!stdJSLoader){stdJSLoader=require.extensions[".js"];var s=compileNodentedFile(compiler,e.log);require.extensions[".js"]=t}e.extension&&n(e.extension)}return e.use&&(Array.isArray(e.use)?(e.log("Warning: nodent({use:[...]}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),e.use.length&&e.use.forEach(function(e){compiler[e]=compiler.require(e)})):(e.log("Warning: nodent({use:{...}}) is deprecated. Use nodent.require(module,options)\n"+(new Error).stack.split("\n")[2]),Object.keys(e.use).forEach(function(t){compiler[t]=compiler.require(t,e.use[t])}))),compiler}function runFromCLI(){function e(e,n){try{var s,o;if(r.fromast){if(e=JSON.parse(e),s={origCode:"",filename:t,ast:e},!(o=parseCompilerOptions(e,i.log))){var a=r.use?'"use nodent-'+r.use+'";':'"use nodent";';o=parseCompilerOptions(a,i.log),console.warn("/* "+t+": No 'use nodent*' directive, assumed "+a+" */")}}else(o=parseCompilerOptions(r.use?'"use nodent-'+r.use+'";':e,i.log))||(o=parseCompilerOptions('"use nodent";',i.log),r.dest||console.warn("/* "+t+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),s=i.parse(e,t,o);if(r.parseast||r.pretty||i.asynchronize(s,void 0,o,i.log),i.prettyPrint(s,o),r.out||r.pretty||r.dest){if(r.dest&&!n)throw new Error("Can't write unknown file to "+r.dest);var u="";r.runtime&&(u+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",u+="global.$error = global.$error || "+global.$error.toString()+";\n"),u+=s.code,n&&r.dest?(fs.writeFileSync(r.dest+n,u),console.log("Compiled",r.dest+n)):console.log(u)}(r.minast||r.parseast)&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),r.ast&&console.log(JSON.stringify(s.ast,function(e,t){return"$"===e[0]?void 0:t},0)),r.exec&&new Function(s.code)()}catch(e){console.error(e)}}var t,n=require("path"),r=(process.env.NODENT_OPTS&&JSON.parse(process.env.NODENT_OPTS),function(e){for(var t=[],n=e||2;n0",engine:"(async ()=>0)",noRuntime:"Promise"};NodentCompiler.prototype.Thenable=Thenable,NodentCompiler.prototype.EagerThenable=$asyncbind.EagerThenableFactory,NodentCompiler.prototype.asyncify=asyncify,NodentCompiler.prototype.require=requireCover,NodentCompiler.prototype.generateRequestHandler=generateRequestHandler,NodentCompiler.prototype.$asyncspawn=$asyncspawn,NodentCompiler.prototype.$asyncbind=$asyncbind,NodentCompiler.prototype.parseCompilerOptions=parseCompilerOptions,$asyncbind.call($asyncbind);var compiler;initialize.setDefaultCompileOptions=function(e,t){return e&&Object.keys(e).forEach(function(t){if(!(t in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+t);defaultCodeGenOpts[t]=e[t]}),t&&Object.keys(t).forEach(function(e){if(!(e in t))throw new Error("NoDent: unknown configuration option: "+e);config[e]=t[e]}),initialize},initialize.setCompileOptions=function(e,t){return optionSet[e]=optionSet[e]||copyObj([defaultCodeGenOpts]),t&&Object.keys(t).forEach(function(n){if(!(n in defaultCodeGenOpts))throw new Error("NoDent: unknown compiler option: "+n);optionSet[e][n]=t[n]}),initialize},initialize.asyncify=asyncify,initialize.Thenable=$asyncbind.Thenable,initialize.EagerThenable=$asyncbind.EagerThenableFactory,module.exports=initialize,require.main===module&&process.argv.length>=3&&runFromCLI()}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},"/node_modules/nodent")},{"./htmlScriptParser":29,_process:32,fs:7,"nodent-compiler":10,"nodent-runtime":26,path:30,resolve:33}]},{},[]); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/regenerator.min.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/regenerator.min.js new file mode 100644 index 0000000..ef3b8be --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/ajv/dist/regenerator.min.js @@ -0,0 +1,2 @@ +/* regenerator 0.12.2: Source transformer enabling ECMAScript 6 generator functions (yield) in JavaScript-of-today (ES5) */ +require=function e(t,r,n){function i(a,o){if(!r[a]){if(!t[a]){var u="function"==typeof require&&require;if(!o&&u)return u(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};t[a][0].call(c.exports,function(e){var r=t[a][1][e];return i(r||e)},c,c.exports,e,t,r,n)}return r[a].exports}for(var s="function"==typeof require&&require,a=0;a=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!h(e[a],t[a],r,n))return!1;return!0}(e,t,r,o))}return r?e===t:e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function d(e,t,r){h(e,t,!0)&&c(e,t,r,"notDeepStrictEqual",d)}function m(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&c(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&g.isError(i),o=!e&&i&&!r;if((a&&s&&m(i,r)||o)&&c(i,r,"Got unwanted exception"+n),e&&i&&r&&!m(i,r)||!e&&i)throw i}var g=e("util/"),b=Object.prototype.hasOwnProperty,v=Array.prototype.slice,x="foo"===function(){}.name,E=t.exports=p,A=/\s*function\s+([^\(\s]*)\s*/;E.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return u(l(e.actual),128)+" "+e.operator+" "+u(l(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||c;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},g.inherits(E.AssertionError,Error),E.fail=c,E.ok=p,E.equal=function(e,t,r){e!=t&&c(e,t,r,"==",E.equal)},E.notEqual=function(e,t,r){e==t&&c(e,t,r,"!=",E.notEqual)},E.deepEqual=function(e,t,r){h(e,t,!1)||c(e,t,r,"deepEqual",E.deepEqual)},E.deepStrictEqual=function(e,t,r){h(e,t,!0)||c(e,t,r,"deepStrictEqual",E.deepStrictEqual)},E.notDeepEqual=function(e,t,r){h(e,t,!1)&&c(e,t,r,"notDeepEqual",E.notDeepEqual)},E.notDeepStrictEqual=d,E.strictEqual=function(e,t,r){e!==t&&c(e,t,r,"===",E.strictEqual)},E.notStrictEqual=function(e,t,r){e===t&&c(e,t,r,"!==",E.notStrictEqual)},E.throws=function(e,t,r){y(!0,e,t,r)},E.doesNotThrow=function(e,t,r){y(!1,e,t,r)},E.ifError=function(e){if(e)throw e};var D=Object.keys||function(e){var t=[];for(var r in e)b.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":613}],2:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],3:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./babel":2,"./flow":9}],4:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")).Type,n=r.def,i=r.or,s=t.use(e("../lib/shared")),a=s.defaults,o=s.geq;n("Printable").field("loc",i(n("SourceLocation"),null),a.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),a.null,!0),n("SourceLocation").build("start","end","source").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),a.null),n("Position").build("line","column").field("line",o(1)).field("column",o(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),a.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),a.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),a.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,a.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],a.emptyArray).field("finalizer",i(n("BlockStatement"),null),a.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),a.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null)),n("Expression").bases("Node","Pattern"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,a.true);var l=i("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",l).field("left",n("Expression")).field("right",n("Expression"));var c=i("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",n("Pattern")).field("right",n("Expression"));var p=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean);var h=i("||","&&");n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),n("Literal").bases("Node","Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp)).field("regex",i({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}},{"../lib/shared":18,"../lib/types":19}],5:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":19,"./core":4}],6:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":18,"../lib/types":19,"./core":4}],7:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":18,"../lib/types":19,"./es6":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":18,"../lib/types":19,"./es7":7}],11:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":18,"../lib/types":19,"./core":4}],12:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":13,"./lib/node-path":14,"./lib/path":16,"./lib/path-visitor":15,"./lib/types":19}],13:[function(e,t,r){t.exports=function(t){function r(e,t,r){return u.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(u.check(e)?function(e,t,r){u.assert(e);var n=e.length;if(!u.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;su)return!0;if(s===u&&"right"===this.name){if(r.right!==t)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&l.check(t.value)&&"object"===this.name&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===t;case"ConditionalExpression":return"test"===this.name&&r.test===t;case"MemberExpression":return"object"===this.name&&r.object===t;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===t)return i(t)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var d={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){d[e]=t})}),f.canBeFirstInStatement=function(){var e=this.node;return!o.FunctionExpression.check(e)&&!o.ObjectExpression.check(e)},f.firstInStatement=function(){return function(e){for(var t,r;e.parent;e=e.parent){if(t=e.node,r=e.parent.node,o.BlockStatement.check(r)&&"body"===e.parent.name&&0===e.name){if(r.body[0]!==t)throw new Error("Nodes must be equal");return!0}if(o.ExpressionStatement.check(r)&&"expression"===e.name){if(r.expression!==t)throw new Error("Nodes must be equal");return!0}if(o.SequenceExpression.check(r)&&"expressions"===e.parent.name&&0===e.name){if(r.expressions[0]!==t)throw new Error("Nodes must be equal")}else if(o.CallExpression.check(r)&&"callee"===e.name){if(r.callee!==t)throw new Error("Nodes must be equal")}else if(o.MemberExpression.check(r)&&"object"===e.name){if(r.object!==t)throw new Error("Nodes must be equal")}else if(o.ConditionalExpression.check(r)&&"test"===e.name){if(r.test!==t)throw new Error("Nodes must be equal")}else if(n(r)&&"left"===e.name){if(r.left!==t)throw new Error("Nodes must be equal")}else{if(!o.UnaryExpression.check(r)||r.prefix||"argument"!==e.name)return!1;if(r.argument!==t)throw new Error("Nodes must be equal")}}return!0}(this)},r}},{"./path":16,"./scope":17,"./types":19}],15:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=function(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=a.computeSupertypeLookupTable(t),i=Object.create(null),s=(t=Object.keys(n)).length,o=0;o=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("")}(this),l.check(i)){for(var u=i.length,c=o(this.parentPath,a-1,this.name+1),p=[this.name,1],h=0;h=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":19}],19:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return S.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":D.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return x[r]=i,t&&"function"==typeof t.constructor&&(b.push(t.constructor),v.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(D.check(t))return e.fromArray(t);if(S.check(t))return e.fromObject(t);if(A.check(t)){var n=b.indexOf(t);return n>=0?v[n]:new e(t,r)}return new e(function(e){return e===t},_.check(r)?function(){return t+""}:r)}function s(e,t,r,i){if(!(this instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");E.assert(e);var a={name:{value:e},type:{value:t=n(t)},hidden:{value:!!i}};A.check(r)&&(a.defaultFn={value:r}),Object.defineProperties(this,a)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return(e=p(e)).replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e,t){return Object.keys(t).forEach(function(r){e[r]=t[r]}),e}var y={},g=e.prototype;y.Type=e,g.assert=function(e,r){if(!this.check(e,r)){var n=t(e);throw new Error(n+" does not match type "+this)}return!0},g.toString=function(){var e=this.name;return E.check(e)?e:A.check(e)?e.call(this)+"":e+" type"};var b=[],v=[],x={};y.builtInTypes=x;var E=r("truthy","string"),A=r(function(){},"function"),D=r([],"array"),S=r({},"object"),C=(r(/./,"RegExp"),r(new Date,"Date"),r(3,"number")),_=(r(!0,"boolean"),r(null,"null"),r(void 0,"undefined"));e.or=function(){for(var t=[],r=arguments.length,i=0;i=0&&function(e){var t=h(e);if(!T[t]){var r=T[p(e)];r&&(T[t]=function(){return T.expressionStatement(r.apply(T,arguments))})}}(e.typeName)}},y.finalize=function(){Object.keys(k).forEach(function(e){k[e].finalize()})},y}},{}],20:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":2,"./def/babel6":3,"./def/core":4,"./def/e4x":5,"./def/es6":6,"./def/es7":7,"./def/esprima":8,"./def/flow":9,"./def/jsx":10,"./def/mozilla":11,"./fork":12}],21:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return t.replace(a.default,function(){for(var t=arguments.length,r=Array(t),n=0;n3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&u.default.supportsColor||n.forceColor,a=u.default;n.forceColor&&(a=new u.default.constructor({enabled:!0}));var o=function(e,t){return s?e(t):t},c=function(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}(a);s&&(e=i(c,e));var p=n.linesAbove||2,h=n.linesBelow||3,f=e.split(l),d=Math.max(t-(p+1),0),m=Math.min(f.length,t+h);t||r||(d=0,m=f.length);var y=String(m).length,g=f.slice(d,m).map(function(e,n){var i=d+1+n,s=" "+(" "+i).slice(-y)+" | ";if(i===t){var a="";if(r){var u=e.slice(0,r-1).replace(/[^\t]/g," ");a=["\n ",o(c.gutter,s.replace(/\d/g," ")),u,o(c.marker,"^")].join("")}return[o(c.marker,">"),o(c.gutter,s),e,a].join("")}return" "+o(c.gutter,s)+e}).join("\n");return s?a.reset(g):g};var s=e("js-tokens"),a=n(s),o=n(e("esutils")),u=n(e("chalk")),l=/\r\n|[\n\r\u2028\u2029]/,c=/^[a-z][\w-]*$/i,p=/^[()\[\]{}]$/;t.exports=r.default},{chalk:24,esutils:28,"js-tokens":322}],22:[function(e,t,r){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g}},{}],23:[function(e,t,r){"use strict";Object.defineProperty(t,"exports",{enumerable:!0,get:function(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}})},{}],24:[function(e,t,r){(function(r){"use strict";function n(e){this.enabled=e&&void 0!==e.enabled?e.enabled:l}function i(e){var t=function(){return function(){var e=arguments,t=e.length,r=0!==t&&String(arguments[0]);if(t>1)for(var n=1;n=97&&o<=122||o>=65&&o<=90||36===o||95===o;for(a=new Array(128),o=0;o<128;++o)a[o]=o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||36===o||95===o;t.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return e>=48&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&i.indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(t){return t<128?s[t]:n.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES5:function(t){return t<128?a[t]:n.NonAsciiIdentifierPart.test(e(t))},isIdentifierStartES6:function(t){return t<128?s[t]:r.NonAsciiIdentifierStart.test(e(t))},isIdentifierPartES6:function(t){return t<128?a[t]:r.NonAsciiIdentifierPart.test(e(t))}}}()},{}],27:[function(e,t,r){!function(){"use strict";function r(e,t){return!(!t&&"yield"===e)&&n(e,t)}function n(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function i(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!l.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=o(n,i)}if(!s(n))return!1;s=l.isIdentifierPartES6}return!0}var l=e("./code");t.exports={isKeywordES5:r,isKeywordES6:n,isReservedWordES5:i,isReservedWordES6:s,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:a,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return a(e)&&!i(e,t)},isIdentifierES6:function(e,t){return u(e)&&!s(e,t)}}}()},{"./code":26}],28:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":25,"./code":26,"./keyword":27}],29:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":22}],30:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,x(h.default.readFileSync(e,"utf8"),t)};var h=i(e("fs")),f=n(e("../util")),d=n(e("babel-messages")),m=n(e("babel-types")),y=i(e("babel-traverse")),g=i(e("../transformation/file/options/option-manager")),b=i(e("../transformation/pipeline"));r.util=f,r.messages=d,r.types=m,r.traverse=y.default,r.OptionManager=g.default,r.Pipeline=b.default;var v=new b.default,x=(r.analyse=v.analyse.bind(v),r.transform=v.transform.bind(v));r.transformFromAst=v.transformFromAst.bind(v)},{"../../package":73,"../helpers/resolve-plugin":38,"../helpers/resolve-preset":39,"../tools/build-external-helpers":42,"../transformation/file":43,"../transformation/file/options/config":47,"../transformation/file/options/option-manager":49,"../transformation/pipeline":54,"../util":57,"babel-messages":110,"babel-template":139,"babel-traverse":143,"babel-types":180,fs:193}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){return["babel-plugin-"+e,e]},t.exports=r.default},{}],34:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t},t.exports=r.default},{}],35:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.default=function(e,t){if(e&&t)return(0,s.default)(e,t,function(e,t){if(t&&Array.isArray(e)){var r=t.slice(0),n=e,s=Array.isArray(n),a=0;for(n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var s=n(e("lodash/mergeWith"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"lodash/mergeWith":527}],36:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return n.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":180}],37:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){return e.reduce(function(e,r){return e||(0,n.default)(r,t)},null)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("./resolve"));t.exports=r.default},{"./resolve":40}],38:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-plugin-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":33,"./resolve-from-possible-names":37,_process:550}],39:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,s.default)((0,a.default)(e),t)};var s=i(e("./resolve-from-possible-names")),a=i(e("./get-possible-preset-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":34,"./resolve-from-possible-names":37,_process:550}],40:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/helpers/typeof"));r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===a.default?"undefined":(0,s.default)(a.default)))return null;var r=u[t];if(!r){r=new a.default;var i=o.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=a.default._nodeModulePaths(t),u[t]=r}try{return a.default._resolveFilename(e,r)}catch(e){return null}};var a=i(e("module")),o=i(e("path")),u={};t.exports=r.default}).call(this,e("_process"))},{_process:550,"babel-runtime/helpers/typeof":138,module:193,path:546}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/map")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=function(e){function t(){(0,s.default)(this,t);var r=(0,a.default)(this,e.call(this));return r.dynamicData={},r}return(0,o.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(i.default);r.default=u,t.exports=r.default},{"babel-runtime/core-js/map":122,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],42:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=h.functionExpression(null,[h.identifier("global")],h.blockStatement(r)),i=h.program([h.expressionStatement(h.callExpression(n,[u.get("selfGlobal")]))]);return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.assignmentExpression("=",h.memberExpression(h.identifier("global"),e),h.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.identifier("global"))])),t(r),h.program([f({FACTORY_PARAMETERS:h.identifier("global"),BROWSER_ARGUMENTS:h.assignmentExpression("=",h.memberExpression(h.identifier("root"),e),h.objectExpression([])),COMMON_ARGUMENTS:h.identifier("exports"),AMD_ARGUMENTS:h.arrayExpression([h.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:h.identifier("this")})])}function o(e,t){var r=[];return r.push(h.variableDeclaration("var",[h.variableDeclarator(e,h.objectExpression([]))])),t(r),r.push(h.expressionStatement(e)),h.program(r)}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=h.identifier("babelHelpers"),n=void 0,i={global:s,umd:a,var:o}[t];if(!i)throw new Error(c.get("unsupportedOutputType",t));return n=i(r,function(t){return function(e,t,r){u.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=h.identifier(n);e.push(h.expressionStatement(h.assignmentExpression("=",h.memberExpression(t,i),u.get(n))))}})}(t,r,e)}),(0,l.default)(n).code};var u=i(e("babel-helpers")),l=n(e("babel-generator")),c=i(e("babel-messages")),p=n(e("babel-template")),h=i(e("babel-types")),f=(0,p.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":85,"babel-helpers":109,"babel-messages":110,"babel-template":139,"babel-types":180}],43:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck")),l=i(e("babel-runtime/helpers/possibleConstructorReturn")),c=i(e("babel-runtime/helpers/inherits")),p=i(e("babel-helpers")),h=n(e("./metadata")),f=i(e("convert-source-map")),d=i(e("./options/option-manager")),m=i(e("../plugin-pass")),y=e("babel-traverse"),g=i(y),b=i(e("source-map")),v=i(e("babel-generator")),x=i(e("babel-code-frame")),E=i(e("lodash/defaults")),A=i(e("./logger")),D=i(e("../../store")),S=e("babylon"),C=n(e("../../util")),_=i(e("path")),w=n(e("babel-types")),k=i(e("../../helpers/resolve")),F=i(e("../internal-plugins/block-hoist")),T=i(e("../internal-plugins/shadow-functions")),P=/^#!.*/,B=[[F.default],[T.default]],O={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},N=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,u.default)(this,n);var i=(0,l.default)(this,r.call(this));return i.pipeline=t,i.log=new A.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,o.default)((0,a.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new y.Hub(i),i}return(0,c.default)(n,r),n.prototype.getMetadata=function(){var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var a=i;if(w.isModuleDeclaration(a)){e=!0;break}}e&&this.path.traverse(h,this)},n.prototype.initOptions=function(e){(e=new d.default(this.log,this.pipeline).init(e)).inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=_.default.basename(e.filename,_.default.extname(e.filename)),e.ignore=C.arrayify(e.ignore,C.regexify),e.only&&(e.only=C.arrayify(e.only,C.regexify)),(0,E.default)(e,{moduleRoot:e.sourceRoot}),(0,E.default)(e,{sourceRoot:e.moduleRoot}),(0,E.default)(e,{filenameRelative:e.filename});var t=_.default.basename(e.filenameRelative);return(0,E.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){var t=[],r=[],n=e.plugins.concat(B),i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o,l=u[0],c=u[1];t.push(l.visitor),r.push(new m.default(this,l,c)),l.manipulateOptions&&l.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(t),this.pluginPasses.push(r)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(w.importNamespaceSpecifier(i)):"default"===t?s.push(w.importDefaultSpecifier(i)):s.push(w.importSpecifier(i,w.identifier(t)));var a=w.importDeclaration(s,w.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return w.memberExpression(n,w.identifier(e));var s=(0,p.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return w.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=w.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,g.default)(e,O,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new b.default.SourceMapConsumer(t),n=new b.default.SourceMapConsumer(e),i=new b.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=S.parse,i=this.opts.parserOpts;if(i&&(i=(0,o.default)({},this.parserOpts,i)).parser){if("string"==typeof i.parser){var s=_.default.dirname(this.opts.filename)||t.cwd(),a=(0,k.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,S.parse)(e,i)}}}this.log.debug("Parse start");var u=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),u},n.prototype._addAst=function(e){this.path=y.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a,u=o.plugin[e];u&&u.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=f.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=f.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=P.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(P,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=v.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=_.default.dirname(this.opts.filename)||t.cwd(),u=(0,k.default)(s,a);if(!u)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(u).print}this.log.debug("Generation start");var l=s(n,r.generatorOpts?(0,o.default)(r,r.generatorOpts):r,this.code);return i.code=l.code,i.map=l.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+f.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(D.default);r.default=N,r.File=N}).call(this,e("_process"))},{"../../helpers/resolve":40,"../../store":41,"../../util":57,"../internal-plugins/block-hoist":52,"../internal-plugins/shadow-functions":53,"../plugin-pass":55,"./logger":44,"./metadata":45,"./options/option-manager":49,_process:550,"babel-code-frame":21,"babel-generator":85,"babel-helpers":109,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/assign":124,"babel-runtime/core-js/object/create":125,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"babel-types":180,babylon:188,"convert-source-map":58,"lodash/defaults":495,path:546,"source-map":72}],44:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("debug/node")),a=(0,s.default)("babel:verbose"),o=(0,s.default)("babel"),u=[],l=function(){function e(t,r){(0,i.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),u.indexOf(e)>=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){a.enabled&&a(this._buildMessage(e))},e.prototype.debug=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134,"debug/node":59}],45:[function(e,t,r){"use strict";r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.ExportDeclaration=function(e,t){var r=e.node,s=r.source?r.source.value:null,a=t.metadata.modules.exports,o=e.get("declaration");if(o.isStatement()){var u=o.getBindingIdentifiers();for(var l in u)a.exported.push(l),a.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers){var c=r.specifiers,p=Array.isArray(c),h=0;for(c=p?c:(0,n.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f,m=d.exported.name;a.exported.push(m),i.isExportDefaultSpecifier(d)&&a.specifiers.push({kind:"external",local:m,exported:m,source:s}),i.isExportNamespaceSpecifier(d)&&a.specifiers.push({kind:"external-namespace",exported:m,source:s});var y=d.local;y&&(s&&a.specifiers.push({kind:"external",local:y.name,exported:m,source:s}),s||a.specifiers.push({kind:"local",local:y.name,exported:m}))}}e.isExportAllDeclaration()&&a.specifiers.push({kind:"external-all",source:s})},r.Scope=function(e){e.skip()};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,i=[],s=[];t.metadata.modules.imports.push({source:r.source.value,imported:s,specifiers:i});var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,n.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(s.push("default"),i.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;s.push(h),i.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(s.push("*"),i.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],46:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=f[e];return null==t?f[e]=h.default.existsSync(e):t}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/assign")),o=i(e("babel-runtime/helpers/classCallCheck"));r.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new m(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&p.default.dirname(r)}),n.configs};var u=i(e("../../../helpers/resolve")),l=i(e("json5")),c=i(e("path-is-absolute")),p=i(e("path")),h=i(e("fs")),f={},d={},m=function(){function e(t){(0,o.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,c.default)(e)||(e=p.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=p.default.dirname(e));){if(!t){var i=p.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=p.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=p.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=h.default.readFileSync(e,"utf8").split("\n");(t=t.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e})).length&&this.mergeConfig({options:{ignore:t},alias:e,dirname:p.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=h.default.readFileSync(e,"utf8"),i=void 0;try{i=d[n]=d[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:p.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,a.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var o=(0,u.default)(t.extends,s);o?this.addConfig(o):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var l=void 0,c=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(l=t.env[c],delete t.env),this.mergeConfig({options:l,alias:r+".env."+c,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":40,_process:550,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,fs:193,json5:324,path:546,"path-is-absolute":547}],47:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],48:[function(e,t,r){"use strict";r.__esModule=!0,r.config=void 0,r.normaliseOptions=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var s=i.default[t];if(s&&s.alias&&(s=i.default[s.alias]),s){var a=n[s.type];a&&(r=a(r)),e[t]=r}}}return e};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./parsers")),i=function(e){return e&&e.__esModule?e:{default:e}}(e("./config"));r.config=i.default},{"./config":47,"./parsers":50}],49:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=s(e("babel-runtime/helpers/objectWithoutProperties")),o=s(e("babel-runtime/core-js/json/stringify")),u=s(e("babel-runtime/core-js/object/assign")),l=s(e("babel-runtime/core-js/get-iterator")),c=s(e("babel-runtime/helpers/typeof")),p=s(e("babel-runtime/helpers/classCallCheck")),h=i(e("../../../api/node")),f=s(e("../../plugin")),d=i(e("babel-messages")),m=e("./index"),y=s(e("../../../helpers/resolve-plugin")),g=s(e("../../../helpers/resolve-preset")),b=s(e("lodash/cloneDeepWith")),v=s(e("lodash/clone")),x=s(e("../../../helpers/merge")),E=s(e("./config")),A=s(e("./removed")),D=s(e("./build-config-chain")),S=s(e("path")),C=function(){function t(e){(0,p.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){var s=t.memoisedPlugins,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.container===e)return p.plugin}var m=void 0;if("object"===(void 0===(m="function"==typeof e?e(h):e)?"undefined":(0,c.default)(m))){var y=new f.default(m,i);return t.memoisedPlugins.push({container:e,plugin:y}),y}throw new TypeError(d.get("pluginNotObject",r,n,void 0===m?"undefined":(0,c.default)(m))+r+n)},t.createBareOptions=function(){var e={};for(var t in E.default){var r=E.default[t];e[t]=(0,v.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof f.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new TypeError(d.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,c.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,y.default)(a,n);if(!l)throw new ReferenceError(d.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,l=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,c.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var p=(0,b.default)(i,function(e){if(e instanceof f.default)return e});l=l||n.cwd(),o=o||a;for(var h in p){if(!E.default[h]&&this.log)if(A.default[h])this.log.error("Using removed Babel 5 option: "+a+"."+h+" - "+A.default[h].message,ReferenceError);else{var d="Unknown option: "+a+"."+h+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(d+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,m.normaliseOptions)(p),p.plugins&&(p.plugins=t.normalisePlugins(o,l,p.plugins)),p.presets&&(p.passPerPreset?p.presets=this.resolvePresets(p.presets,l,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:l})}):(this.mergePresets(p.presets,l),delete p.presets)),i===s?(0,u.default)(s,p):(0,x.default)(s||this.options,p)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:S.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,o.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var u=void 0;try{if("string"==typeof t){if(!(u=(0,g.default)(t,r)))throw new Error("Couldn't find preset "+(0,o.default)(t)+" relative to directory "+(0,o.default)(r));t=e(u)}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var l=t;l.__esModule;t=(0,a.default)(l,["__esModule"])}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,o.default)(i)+" passed to "+(u||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(h,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,u)}catch(e){throw u&&(e.message+=" (While processing preset: "+(0,o.default)(u)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in E.default){var r=E.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.default)(e,this.log),r=Array.isArray(t),n=0;for(t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=C,C.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":32,"../../../helpers/merge":35,"../../../helpers/resolve-plugin":38,"../../../helpers/resolve-preset":39,"../../plugin":56,"./build-config-chain":46,"./config":47,"./index":48,"./removed":51,_process:550,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/assign":124,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/objectWithoutProperties":136,"babel-runtime/helpers/typeof":138,"lodash/clone":491,"lodash/cloneDeepWith":493,path:546}],50:[function(e,t,r){"use strict";r.__esModule=!0,r.filename=void 0,r.boolean=function(e){return!!e},r.booleanString=function(e){return i.booleanify(e)},r.list=function(e){return i.list(e)};var n=function(e){return e&&e.__esModule?e:{default:e}}(e("slash")),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../../../util"));r.filename=n.default},{"../../../util":57,slash:603}],51:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../plugin")),s=n(e("lodash/sortBy"));r.default=new i.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new a.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,s.default)(e);var n=new o.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=u,t.exports=r.default},{"../helpers/normalize-ast":36,"./file":43,"./plugin":56,"babel-runtime/helpers/classCallCheck":134}],55:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("../store")),u=(n(e("./file")),function(e){function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t);var o=(0,s.default)(this,e.call(this));return o.plugin=n,o.key=n.key,o.file=r,o.opts=a,o}return(0,a.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(o.default));r.default=u,t.exports=r.default},{"../store":41,"./file":43,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137}],56:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=n(e("./file/options/option-manager")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=n(e("../store")),p=n(e("babel-traverse")),h=n(e("lodash/assign")),f=n(e("lodash/clone")),d=["enter","exit"],m=function(e){function t(r,n){(0,s.default)(this,t);var i=(0,a.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,h.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,f.default)(i.take("visitor"))||{}),i}return(0,o.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),s=0;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}if(l){var c=l.apply(this,n);null!=c&&(e=c)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=u.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=p.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(l.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){var t=d,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return p.default.explode(e),e},t}(c.default);r.default=m,t.exports=r.default},{"../store":41,"./file/options/option-manager":49,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"babel-traverse":143,"lodash/assign":488,"lodash/clone":491}],57:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=m.default.extname(e);return(0,f.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e,t){return e?"boolean"==typeof e?a([e],t):"string"==typeof e?a(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function o(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var u=n(e("babel-runtime/core-js/get-iterator")),l=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return l.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return l.inspect}}),r.canCompile=i,r.list=s,r.regexify=function(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(c.default).join("|"),"i")),"string"==typeof e){e=(0,y.default)(e),((0,p.default)(e,"./")||(0,p.default)(e,"*/"))&&(e=e.slice(2)),(0,p.default)(e,"**/")&&(e=e.slice(3));var t=h.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,d.default)(e))return e;throw new TypeError("illegal type for regexify")},r.arrayify=a,r.booleanify=function(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e},r.shouldIgnore=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,u.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(o(a,e))return!1}return!0}if(t.length){var l=t,c=Array.isArray(l),p=0;for(l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}if(o(h,e))return!0}}return!1};var c=n(e("lodash/escapeRegExp")),p=n(e("lodash/startsWith")),h=n(e("minimatch")),f=n(e("lodash/includes")),d=n(e("lodash/isRegExp")),m=n(e("path")),y=n(e("slash"));i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":120,"lodash/escapeRegExp":497,"lodash/includes":507,"lodash/isRegExp":519,"lodash/startsWith":532,minimatch:542,path:546,slash:603,util:613}],58:[function(e,t,r){(function(t){"use strict";function n(e,n){(n=n||{}).isFileComment&&(e=function(e,t){var n=r.mapFileCommentRegex.exec(e),a=n[1]||n[2],o=s.resolve(t,a);try{return i.readFileSync(o,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+o+"\n"+e)}}(e,n.commentFileDir)),n.hasComment&&(e=function(e){return e.split(",").pop()}(e)),n.isEncoded&&(e=function(e){return new t(e,"base64").toString()}(e)),(n.isJSON||n.isEncoded)&&(e=JSON.parse(e)),this.sourcemap=e}var i=e("fs"),s=e("path");Object.defineProperty(r,"commentRegex",{get:function(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}}),n.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},n.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},n.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;charset=utf-8;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},n.prototype.toObject=function(){return JSON.parse(this.toJSON())},n.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)},n.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},n.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new n(e)},r.fromJSON=function(e){return new n(e,{isJSON:!0})},r.fromBase64=function(e){return new n(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new n(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new n(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e){var t=e.match(r.commentRegex);return t?r.fromComment(t.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(r.mapFileCommentRegex);return n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return e.replace(r.commentRegex,"")},r.removeMapFileComments=function(e){return e.replace(r.mapFileCommentRegex,"")},r.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}}).call(this,e("buffer").Buffer)},{buffer:194,fs:193,path:546}],59:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":61}],60:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,n=+new Date,s=n-(i||n);e.diff=s,e.prev=i,e.curr=n,i=n;for(var a=new Array(arguments.length),o=0;o=0)return t}else{var r=i.toSetString(e);if(s.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e>>=5)>0&&(t|=32),r+=n.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var i,s,a=e.length,o=0,u=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(s=n.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));i=!!(32&s),o+=(s&=31)<>1;return 1==(1&e)?-t:t}(o),r.rest=t}},{"./base64":64}],64:[function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],66:[function(e,t,r){function n(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=e("./util");n.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},n.prototype.add=function(e){!function(e,t){var r=e.generatedLine,n=t.generatedLine,s=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=s||i.compareByGeneratedPositionsInflated(e,t)<=0}(this._last,e)?(this._sorted=!1,this._array.push(e)):(this._last=e,this._array.push(e))},n.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=n},{"./util":71}],67:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t,r,s){if(r=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,(i.prototype=Object.create(n.prototype)).consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,(a.prototype=Object.create(n.prototype)).constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":62,"./base64-vlq":63,"./mapping-list":66,"./util":71}],70:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=0,c=function(){function e(){return l=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(t=u.join("/"))&&(t=o?"/":"."),s?(s.path=t,i(s)):t}function a(e){return e}function o(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function u(e,t){return e===t?0:e>t?1:-1}r.getArg=function(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')};var l=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,c=/^data:.+\,.+$/;r.urlParse=n,r.urlGenerate=i,r.normalize=s,r.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var r=n(t),a=n(e);if(a&&(e=a.path||"/"),r&&!r.scheme)return a&&(r.scheme=a.scheme),i(r);if(r||t.match(c))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var o="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=o,i(a)):o},r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(l)},r.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)};var p=!("__proto__"in Object.create(null));r.toSetString=p?a:function(e){return o(e)?"$"+e:e},r.fromSetString=p?a:function(e){return o(e)?e.slice(1):e},r.compareByOriginalPositions=function(e,t,r){var n=e.source-t.source;return 0!==n?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)||r?n:0!=(n=e.generatedColumn-t.generatedColumn)?n:0!=(n=e.generatedLine-t.generatedLine)?n:e.name-t.name},r.compareByGeneratedPositionsDeflated=function(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!=(n=e.generatedColumn-t.generatedColumn)||r?n:0!=(n=e.source-t.source)?n:0!=(n=e.originalLine-t.originalLine)?n:0!=(n=e.originalColumn-t.originalColumn)?n:e.name-t.name},r.compareByGeneratedPositionsInflated=function(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!=(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=u(e.source,t.source))?r:0!=(r=e.originalLine-t.originalLine)?r:0!=(r=e.originalColumn-t.originalColumn)?r:u(e.name,t.name)}},{}],72:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":68,"./lib/source-map-generator":69,"./lib/source-node":70}],73:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.26.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"s3://npm-registry-packages",tmp:"tmp/babel-core-6.26.0.tgz_1502898861183_0.43529116874560714"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"4.6.1",_phantomChildren:{ms:"2.0.0"},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",_shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/Documents/JSON/ajv/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.26.0","babel-generator":"^6.26.0","babel-helpers":"^6.24.1","babel-messages":"^6.23.0","babel-register":"^6.26.0","babel-runtime":"^6.26.0","babel-template":"^6.26.0","babel-traverse":"^6.26.0","babel-types":"^6.26.0",babylon:"^6.18.0","convert-source-map":"^1.5.0",debug:"^2.6.8",json5:"^0.5.1",lodash:"^4.17.4",minimatch:"^3.0.4","path-is-absolute":"^1.0.1",private:"^0.1.7",slash:"^1.0.0","source-map":"^0.5.6"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.26.0","babel-helper-transform-fixture-test-runner":"^6.26.0","babel-polyfill":"^6.26.0"},directories:{},dist:{shasum:"af32f78b31a6fcef119c87b0fd8d9753f03a0bb8",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"thejameskyle",email:"me@thejameskyle.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"danez",email:"daniel@tschinder.de"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.26.0"}},{}],74:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("trim-right")),a=/^[ \t]+$/,o=function(){function e(t){(0,i.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,s.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&a.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r")}function a(){this.space(),this.token("|"),this.space()}r.__esModule=!0,r.TypeParameterDeclaration=r.StringLiteralTypeAnnotation=r.NumericLiteralTypeAnnotation=r.GenericTypeAnnotation=r.ClassImplements=void 0,r.AnyTypeAnnotation=function(){this.word("any")},r.ArrayTypeAnnotation=function(e){this.print(e.elementType,e),this.token("["),this.token("]")},r.BooleanTypeAnnotation=function(){this.word("boolean")},r.BooleanLiteralTypeAnnotation=function(e){this.word(e.value?"true":"false")},r.NullLiteralTypeAnnotation=function(){this.word("null")},r.DeclareClass=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("class"),this.space(),this._interfaceish(e)},r.DeclareFunction=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation.typeAnnotation,e),this.semicolon()},r.DeclareInterface=function(e){this.word("declare"),this.space(),this.InterfaceDeclaration(e)},r.DeclareModule=function(e){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(e.id,e),this.space(),this.print(e.body,e)},r.DeclareModuleExports=function(e){this.word("declare"),this.space(),this.word("module"),this.token("."),this.word("exports"),this.print(e.typeAnnotation,e)},r.DeclareTypeAlias=function(e){this.word("declare"),this.space(),this.TypeAlias(e)},r.DeclareOpaqueType=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.OpaqueType(e)},r.DeclareVariable=function(e,t){u.isDeclareExportDeclaration(t)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(e.id,e),this.print(e.id.typeAnnotation,e),this.semicolon()},r.DeclareExportDeclaration=function(e){this.word("declare"),this.space(),this.word("export"),this.space(),e.default&&(this.word("default"),this.space()),function(e){if(e.declaration){var t=e.declaration;this.print(t,e),u.isStatement(t)||this.semicolon()}else this.token("{"),e.specifiers.length&&(this.space(),this.printList(e.specifiers,e),this.space()),this.token("}"),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}.apply(this,arguments)},r.ExistentialTypeParam=function(){this.token("*")},r.FunctionTypeAnnotation=function(e,t){this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e),e.rest&&(e.params.length&&(this.token(","),this.space()),this.token("..."),this.print(e.rest,e)),this.token(")"),"ObjectTypeCallProperty"===t.type||"DeclareFunction"===t.type?this.token(":"):(this.space(),this.token("=>")),this.space(),this.print(e.returnType,e)},r.FunctionTypeParam=function(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)},r.InterfaceExtends=n,r._interfaceish=function(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)},r._variance=function(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")},r.InterfaceDeclaration=function(e){this.word("interface"),this.space(),this._interfaceish(e)},r.IntersectionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:i})},r.MixedTypeAnnotation=function(){this.word("mixed")},r.EmptyTypeAnnotation=function(){this.word("empty")},r.NullableTypeAnnotation=function(e){this.token("?"),this.print(e.typeAnnotation,e)};var o=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),r.NumberTypeAnnotation=function(){this.word("number")},r.StringTypeAnnotation=function(){this.word("string")},r.ThisTypeAnnotation=function(){this.word("this")},r.TupleTypeAnnotation=function(e){this.token("["),this.printList(e.types,e),this.token("]")},r.TypeofTypeAnnotation=function(e){this.word("typeof"),this.space(),this.print(e.argument,e)},r.TypeAlias=function(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()},r.OpaqueType=function(e){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),e.supertype&&(this.token(":"),this.space(),this.print(e.supertype,e)),e.impltype&&(this.space(),this.token("="),this.space(),this.print(e.impltype,e)),this.semicolon()},r.TypeAnnotation=function(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)},r.TypeParameter=function(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))},r.TypeParameterInstantiation=s,r.ObjectTypeAnnotation=function(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")},r.ObjectTypeCallProperty=function(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)},r.ObjectTypeIndexer=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeProperty=function(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)},r.ObjectTypeSpreadProperty=function(e){this.token("..."),this.print(e.argument,e)},r.QualifiedTypeIdentifier=function(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)},r.UnionTypeAnnotation=function(e){this.printJoin(e.types,e,{separator:a})},r.TypeCastExpression=function(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")},r.VoidTypeAnnotation=function(){this.word("void")};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ClassImplements=n,r.GenericTypeAnnotation=n,r.TypeParameterDeclaration=s},{"./types":84,"babel-types":180}],79:[function(e,t,r){"use strict";function n(){this.space()}r.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.JSXAttribute=function(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))},r.JSXIdentifier=function(e){this.word(e.name)},r.JSXNamespacedName=function(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)},r.JSXMemberExpression=function(e){this.print(e.object,e),this.token("."),this.print(e.property,e)},r.JSXSpreadAttribute=function(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")},r.JSXExpressionContainer=function(e){this.token("{"),this.print(e.expression,e),this.token("}")},r.JSXSpreadChild=function(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")},r.JSXText=function(e){this.token(e.value)},r.JSXElement=function(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();var r=e.children,n=Array.isArray(r),s=0;for(r=n?r:(0,i.default)(r);;){var a;if(n){if(s>=r.length)break;a=r[s++]}else{if((s=r.next()).done)break;a=s.value}var o=a;this.print(o,e)}this.dedent(),this.print(e.closingElement,e)}},r.JSXOpeningElement=function(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:n})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")},r.JSXClosingElement=function(e){this.token("")},r.JSXEmptyExpression=function(){}},{"babel-runtime/core-js/get-iterator":120}],80:[function(e,t,r){"use strict";function n(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=function(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)},r._method=function(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)},r.FunctionExpression=n,r.ArrowFunctionExpression=function(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&i.isIdentifier(t)&&!function(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.FunctionDeclaration=n},{"babel-types":180}],81:[function(e,t,r){"use strict";function n(e){if(e.declaration){var t=e.declaration;this.print(t,e),i.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var s=r[0];if(!i.isExportDefaultSpecifier(s)&&!i.isExportNamespaceSpecifier(s))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}r.__esModule=!0,r.ImportSpecifier=function(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))},r.ImportDefaultSpecifier=function(e){this.print(e.local,e)},r.ExportDefaultSpecifier=function(e){this.print(e.exported,e)},r.ExportSpecifier=function(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))},r.ExportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)},r.ExportAllDeclaration=function(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()},r.ExportNamedDeclaration=function(){this.word("export"),this.space(),n.apply(this,arguments)},r.ExportDefaultDeclaration=function(){this.word("export"),this.space(),this.word("default"),this.space(),n.apply(this,arguments)},r.ImportDeclaration=function(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!i.isImportDefaultSpecifier(r)&&!i.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()},r.ImportNamespaceSpecifier=function(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],82:[function(e,t,r){"use strict";function n(e){return u.isStatement(e.body)?n(e.body):e}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function s(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function a(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.WithStatement=function(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)},r.IfStatement=function(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&u.isIfStatement(n(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))},r.ForStatement=function(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)},r.WhileStatement=function(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)},r.DoWhileStatement=function(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()},r.LabeledStatement=function(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)},r.TryStatement=function(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))},r.CatchClause=function(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)},r.SwitchStatement=function(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")},r.SwitchCase=function(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))},r.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},r.VariableDeclaration=function(e,t){this.word(e.kind),this.space();var r=!1;if(!u.isFor(t)){var n=e.declarations,i=Array.isArray(n),l=0;for(n=i?n:(0,o.default)(n);;){var c;if(i){if(l>=n.length)break;c=n[l++]}else{if((l=n.next()).done)break;c=l.value}c.init&&(r=!0)}}var p=void 0;r&&(p="const"===e.kind?a:s),this.printList(e.declarations,e,{separator:p}),(!u.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()},r.VariableDeclarator=function(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=l("in"),r.ForOfStatement=l("of"),r.ForAwaitStatement=l("await"),r.ContinueStatement=i("continue"),r.ReturnStatement=i("return","argument"),r.BreakStatement=i("break"),r.ThrowStatement=i("throw","argument")},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],83:[function(e,t,r){"use strict";r.__esModule=!0,r.TaggedTemplateExpression=function(e){this.print(e.tag,e),this.print(e.quasi,e)},r.TemplateElement=function(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)},r.TemplateLiteral=function(e){for(var t=e.quasis,r=0;r0&&this.space(),this.print(i,e),n1&&void 0!==arguments[1]?arguments[1]:{},a=arguments[2];(0,i.default)(this,t);var c=r.tokens||[],p=function(e,t,r){var n=" ";if(e&&"string"==typeof e){var i=(0,o.default)(e).indent;i&&" "!==i&&(n=i)}var s={auxiliaryCommentBefore:t.auxiliaryCommentBefore,auxiliaryCommentAfter:t.auxiliaryCommentAfter,shouldPrintComment:t.shouldPrintComment,retainLines:t.retainLines,retainFunctionParens:t.retainFunctionParens,comments:null==t.comments||t.comments,compact:t.compact,minified:t.minified,concise:t.concise,quotes:t.quotes||function(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i=3)break}}return r.single>r.double?"single":"double"}(e,r),jsonCompatibleStrings:t.jsonCompatibleStrings,indent:{adjustMultilineComment:!0,style:n,base:0},flowCommaSeparator:t.flowCommaSeparator};return s.minified?(s.compact=!0,s.shouldPrintComment=s.shouldPrintComment||function(){return s.comments}):s.shouldPrintComment=s.shouldPrintComment||function(e){return s.comments||e.indexOf("@license")>=0||e.indexOf("@preserve")>=0},"auto"===s.compact&&(s.compact=e.length>5e5,s.compact&&console.error("[BABEL] "+l.get("codeGeneratorDeopt",t.filename,"500KB"))),s.compact&&(s.indent.adjustMultilineComment=!1),s}(a,n,c),h=n.sourceMaps?new u.default(n,a):null,f=(0,s.default)(this,e.call(this,p,h,c));return f.ast=r,f}return(0,a.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(n(e("./printer")).default);r.CodeGenerator=function(){function e(t,r,n){(0,i.default)(this,e),this._generator=new c(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":89,"./source-map":90,"babel-messages":110,"babel-runtime/helpers/classCallCheck":134,"babel-runtime/helpers/inherits":135,"babel-runtime/helpers/possibleConstructorReturn":137,"detect-indent":311}],86:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}var r={},n=(0,c.default)(e),i=Array.isArray(n),s=0;for(n=i?n:(0,l.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a,u=f.FLIPPED_ALIAS_KEYS[o];if(u){var p=u,h=Array.isArray(p),d=0;for(p=h?p:(0,l.default)(p);;){var m;if(h){if(d>=p.length)break;m=p[d++]}else{if((d=p.next()).done)break;m=d.value}t(m,e[o])}}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!f.isCallExpression(e)||!!f.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;f.isExpressionStatement(e)&&(e=e.expression);var n=a(m,e,t);if(!n){var i=a(y,e,t);if(i)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a],l=e[--a];a>0;){if(u.isExpressionStatement(l,{expression:o})||u.isTaggedTemplateExpression(l)||s&&u.isExportDefaultDeclaration(l,{declaration:o})||n&&u.isArrowFunctionExpression(l,{body:o}))return!0;if(!(u.isCallExpression(l,{callee:o})||u.isSequenceExpression(l)&&l.expressions[0]===o||u.isMemberExpression(l,{object:o})||u.isConditional(l,{test:o})||u.isBinary(l,{left:o})||u.isAssignmentExpression(l,{left:o})))return!1;o=l,l=e[--a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=function(e,t){return u.isMemberExpression(t)&&t.object===e},r.ObjectExpression=function(e,t,r){return o(r,{considerArrow:!0})},r.DoExpression=function(e,t,r){return o(r)},r.Binary=function(e,t){if((u.isCallExpression(t)||u.isNewExpression(t))&&t.callee===e||u.isUnaryLike(t)||u.isMemberExpression(t)&&t.object===e||u.isAwaitExpression(t))return!0;if(u.isBinary(t)){var r=t.operator,n=l[r],i=e.operator,s=l[i];if(n===s&&t.right===e&&!u.isLogicalExpression(t)||n>s)return!0}return!1},r.BinaryExpression=function(e,t){return"in"===e.operator&&(u.isVariableDeclarator(t)||u.isFor(t))},r.SequenceExpression=function(e,t){return!(u.isForStatement(t)||u.isThrowStatement(t)||u.isReturnStatement(t)||u.isIfStatement(t)&&t.test===e||u.isWhileStatement(t)&&t.test===e||u.isForInStatement(t)&&t.right===e||u.isSwitchStatement(t)&&t.discriminant===e||u.isExpressionStatement(t)&&t.expression===e)},r.YieldExpression=i,r.ClassExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.UnaryLike=s,r.FunctionExpression=function(e,t,r){return o(r,{considerDefaultExports:!0})},r.ArrowFunctionExpression=function(e,t){return!!(u.isExportDeclaration(t)||u.isBinaryExpression(t)||u.isLogicalExpression(t)||u.isUnaryExpression(t)||u.isTaggedTemplateExpression(t))||s(e,t)},r.ConditionalExpression=a,r.AssignmentExpression=function(e){return!!u.isObjectPattern(e.left)||a.apply(void 0,arguments)};var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=i},{"babel-types":180}],88:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):o.isBinary(e)||o.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):o.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):o.isFunction(e)?t.hasFunction=!0:o.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return o.isMemberExpression(e)?i(e.object)||i(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?i(e.callee):!(!o.isBinary(e)&&!o.isAssignmentExpression(e))&&(o.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{default:e}}(e("lodash/map")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(o.isFunction(e.left)||o.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(o.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t0?new g.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,f.default)(+e)&&!E.test(e)&&!v.test(e)&&!x.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else{var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,p.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,h.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=y.needsWhitespaceAfter;e&&(c=y.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,d.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length){var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this._printComment(s)}}},e}();r.default=A;for(var D=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],S=0;S=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],","===(r=n[i+1]).type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./util":101,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./base64":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{dup:65}],96:[function(e,t,r){arguments[4][66][0].apply(r,arguments)},{"./util":101,dup:66}],97:[function(e,t,r){arguments[4][67][0].apply(r,arguments)},{dup:67}],98:[function(e,t,r){arguments[4][68][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./binary-search":95,"./quick-sort":97,"./util":101,dup:68}],99:[function(e,t,r){arguments[4][69][0].apply(r,arguments)},{"./array-set":92,"./base64-vlq":93,"./mapping-list":96,"./util":101,dup:69}],100:[function(e,t,r){arguments[4][70][0].apply(r,arguments)},{"./source-map-generator":99,"./util":101,dup:70}],101:[function(e,t,r){arguments[4][71][0].apply(r,arguments)},{dup:71}],102:[function(e,t,r){arguments[4][72][0].apply(r,arguments)},{"./lib/source-map-consumer":98,"./lib/source-map-generator":99,"./lib/source-node":100,dup:72}],103:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.objectExpression([]);return(0,s.default)(e).forEach(function(r){var n=e[r],i=u.objectExpression([]),a=u.objectProperty(n._key,i,n._computed);(0,s.default)(n).forEach(function(e){var t=n[e];if("_"!==e[0]){var r=t;(u.isClassMethod(t)||u.isClassProperty(t))&&(t=t.value);var s=u.objectProperty(u.identifier(e),t);u.inheritsComments(s,r),u.removeComments(r),i.properties.push(s)}}),t.properties.push(a)}),t}r.__esModule=!0;var s=n(e("babel-runtime/core-js/object/keys"));r.push=function(e,t,r,n,i){var s=u.toKeyAlias(t),l={};if((0,o.default)(e,s)&&(l=e[s]),e[s]=l,l._inherits=l._inherits||[],l._inherits.push(t),l._key=t.key,t.computed&&(l._computed=!0),t.decorators){var c=l.decorators=l.decorators||u.arrayExpression([]);c.elements=c.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(l.value||l.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var p=void 0,h=void 0;(u.isObjectProperty(t)||u.isObjectMethod(t)||u.isClassMethod(t))&&(p=u.toComputedKey(t,t.key)),u.isObjectProperty(t)||u.isClassProperty(t)?h=t.value:(u.isObjectMethod(t)||u.isClassMethod(t))&&((h=u.functionExpression(null,t.params,t.body,t.generator,t.async)).returnType=t.returnType);var f=function(e){return!u.isClassMethod(e)&&!u.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}(t);return r&&"value"===f||(r=f),i&&u.isStringLiteral(p)&&("value"===r||"initializer"===r)&&u.isFunctionExpression(h)&&(h=(0,a.default)({id:p,node:h,scope:i})),h&&(u.inheritsComments(h,t),l[r]=h),l},r.hasComputed=function(e){for(var t in e)if(e[t]._computed)return!0;return!1},r.toComputedObjectFromClass=function(e){for(var t=u.arrayExpression([]),r=0;r1&&void 0!==arguments[1]&&arguments[1];(0,o.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return p.callExpression(this.file.addHelper("set"),[a(this.getObjectRef(),this.isStatic),r?e:p.stringLiteral(e.name),t,p.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return p.callExpression(this.file.addHelper("get"),[a(this.getObjectRef(),this.isStatic),t?e:p.stringLiteral(e.name),p.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(f,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||p.identifier("Function");return t.property===e?void 0:p.isCallExpression(t,{callee:e})?void 0:p.isMemberExpression(t)&&!r.static?p.memberExpression(n,p.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!p.isMemberExpression(r))return;if(!p.isSuper(r.object))return;return p.appendToMemberExpression(r,p.identifier("call")),t.arguments.unshift(p.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[p.variableDeclaration("var",[p.variableDeclarator(e,r.left)]),p.expressionStatement(p.assignmentExpression("=",r.left,p.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,a=e.node;if(function(e,t){return!!p.isSuper(e)&&!p.isMemberExpression(t,{computed:!1})&&!p.isCallExpression(t,{callee:e})}(a,i))throw e.buildCodeFrameError(c.get("classesIllegalBareSuper"));if(p.isCallExpression(a)){var o=a.callee;if(p.isSuper(o))return;s(o)&&(t=o.property,r=o.computed,n=a.arguments)}else if(p.isMemberExpression(a)&&p.isSuper(a.object))t=a.property,r=a.computed;else{if(p.isUpdateExpression(a)&&s(a.argument)){var u=p.binaryExpression(a.operator[0],a.argument,p.numericLiteral(1));if(a.prefix)return this.specHandleAssignmentExpression(null,e,u);var l=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(l,e,u).concat(p.expressionStatement(l))}if(p.isAssignmentExpression(a)&&s(a.left))return this.specHandleAssignmentExpression(null,e,a)}if(t){var h=this.getSuperProperty(t,r);return n?this.optimiseCall(h,n):h}},e.prototype.optimiseCall=function(e,t){var r=p.thisExpression();return r[h]=!0,(0,l.default)(e,r,t)},e}();r.default=d,t.exports=r.default},{"babel-helper-optimise-call-expression":106,"babel-messages":110,"babel-runtime/core-js/symbol":129,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],108:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-template")),i={};r.default=i,i.typeof=(0,n.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),i.jsx=(0,n.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),i.asyncIterator=(0,n.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),i.asyncGenerator=(0,n.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),i.asyncGeneratorDelegate=(0,n.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),i.asyncToGenerator=(0,n.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),i.classCallCheck=(0,n.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),i.createClass=(0,n.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),i.defineEnumerableProperties=(0,n.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),i.defaults=(0,n.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),i.defineProperty=(0,n.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),i.extends=(0,n.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),i.get=(0,n.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),i.inherits=(0,n.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),i.instanceof=(0,n.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),i.interopRequireDefault=(0,n.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),i.interopRequireWildcard=(0,n.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),i.newArrowCheck=(0,n.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),i.objectDestructuringEmpty=(0,n.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),i.objectWithoutProperties=(0,n.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),i.possibleConstructorReturn=(0,n.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),i.selfGlobal=(0,n.default)('\n typeof global === "undefined" ? self : global\n'),i.set=(0,n.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),i.slicedToArray=(0,n.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),i.slicedToArrayLoose=(0,n.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),i.taggedTemplateLiteral=(0,n.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),i.taggedTemplateLiteralLoose=(0,n.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),i.temporalRef=(0,n.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),i.temporalUndefined=(0,n.default)("\n ({})\n"),i.toArray=(0,n.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),i.toConsumableArray=(0,n.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":139}],109:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=n(e("babel-runtime/core-js/object/keys"));r.get=i;var a=n(e("./helpers"));r.list=(0,s.default)(a.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":108,"babel-runtime/core-js/object/keys":127}],110:[function(e,t,r){"use strict";function n(e){return e.map(function(e){if(null!=e&&e.inspect)return e.inspect();try{return(0,i.default)(e)||e+""}catch(t){return s.inspect(e)}})}r.__esModule=!0,r.MESSAGES=void 0;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/json/stringify"));r.get=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),s=1;s4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!h.isFor(r))for(var s=0;s0&&e.traverse(g,t),e.skip()}},p.visitor]),g=c.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},p.visitor]),b={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(a(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=h.sequenceExpression(n)}}else if(e.isFor())a(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(a(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return h.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},v={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},x={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},E={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(E,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(E,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=function(e){return h.isBreakStatement(e)?"break":h.isContinueStatement(e)?"continue":void 0}(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(h.isBreakStatement(r)&&h.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=h.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=h.objectExpression([h.objectProperty(h.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&((s=h.returnStatement(s))[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(h.inherits(s,r)))}}},A=function(){function e(t,r,n,i,s){(0,l.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,u.default)(null),this.hasLetReferences=!1,this.letReferences=(0,u.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=h.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(h.isFunction(this.parent)||h.isProgram(this.block))this.updateScopeInfo();else if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!h.isLabeledStatement(this.loopParent)?h.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,f.default)(t),s=(0,f.default)(t),a=this.blockPath.isSwitchStatement(),o=h.functionExpression(null,i,h.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(h.variableDeclaration("var",[h.variableDeclarator(u,o)])));var l=h.callExpression(u,s),p=this.scope.generateUidIdentifier("ret");c.default.hasType(o.body,this.scope,"YieldExpression",h.FUNCTION_TYPES)&&(o.generator=!0,l=h.yieldExpression(l,!0));c.default.hasType(o.body,this.scope,"AwaitExpression",h.FUNCTION_TYPES)&&(o.async=!0,l=h.awaitExpression(l)),this.buildClosure(p,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(h.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,x,t);for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=c.push(i,e,r,this.file,n);return t&&(s.enumerable=h.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){var e=!1,t=this.path.get("body.body"),r=Array.isArray(t),n=0;for(t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}if(e=i.equals("kind","constructor"))break}if(!e){var a=void 0,o=void 0;if(this.isDerived){var u=f().expression;a=u.params,o=u.body}else a=[],o=h.blockStatement([]);this.path.get("body").unshiftContainer("body",h.classMethod("constructor",h.identifier("constructor"),a,o))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),h.inherits(this.constructor,this.userConstructor),h.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){var e=this.path.get("body.body"),t=Array.isArray(e),r=0;for(e=t?e:(0,s.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var i=n,a=i.node;if(i.isClassProperty())throw i.buildCodeFrameError("Missing class properties transform.");if(a.decorators)throw i.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(h.isClassMethod(a)){var o="constructor"===a.kind;if(o&&(i.traverse(m,this),!this.hasBareSuper&&this.isDerived))throw i.buildCodeFrameError("missing super() call in constructor");var l=new u.default({forceSuperMemoisation:o,methodPath:i,methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),o?this.pushConstructor(l,a,i):this.pushMethod(a,i)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=c.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=c.toClassObject(this.staticMutatorMap)),t||r){t&&(t=c.toComputedObjectFromClass(t)),r&&(r=c.toComputedObjectFromClass(r));var n=h.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,a,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}var f=this.superThises,d=Array.isArray(f),m=0;for(f=d?f:(0,s.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.replaceWith(a)}var b=function(t){return h.callExpression(e.file.addHelper("possibleConstructorReturn"),[a].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",h.returnStatement(n?a:b()));var x=this.superReturns,E=Array.isArray(x),A=0;for(x=E?x:(0,s.default)(x);;){var D;if(E){if(A>=x.length)break;D=x[A++]}else{if((A=x.next()).done)break;D=A.value}var S=D;if(S.node.argument){var C=S.scope.generateDeclaredUidIdentifier("ret");S.get("argument").replaceWithMultiple([h.assignmentExpression("=",C,S.node.argument),b(C)])}else S.get("argument").replaceWith(b())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,h.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,h.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(h.expressionStatement(h.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=g,t.exports=r.default},{"babel-helper-define-map":103,"babel-helper-optimise-call-expression":106,"babel-helper-replace-supers":107,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-template":139,"babel-traverse":143,"babel-types":180}],119:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":196}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":197}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":199}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":200}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":201}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":202}],127:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":203}],128:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":204}],129:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":206}],130:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":205}],131:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":207}],132:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":208}],133:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":209}],134:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],135:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/object/set-prototype-of")),s=n(e("../core-js/object/create")),a=n(e("../helpers/typeof"));r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":125,"../core-js/object/set-prototype-of":128,"../helpers/typeof":138}],136:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],137:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":138}],138:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/symbol/iterator")),s=n(e("../core-js/symbol")),a="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};r.default="function"==typeof s.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":129,"../core-js/symbol/iterator":131}],139:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/symbol"));r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,o.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=c.parse(e,t),i=l.default.removeProperties(i,{preserveComments:t.preserveComments}),l.default.cheap(i,function(e){e[h]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r1?r.body:r.body[0]}(n(),t)}};var a=i(e("lodash/cloneDeep")),o=i(e("lodash/assign")),u=i(e("lodash/has")),l=i(e("babel-traverse")),c=n(e("babylon")),p=n(e("babel-types")),h="_fromTemplate",f=(0,s.default)(),d={noScope:!0,enter:function(e,t){var r=e.node;if(r[f])return e.skip();p.isExpressionStatement(r)&&(r=r.expression);var n=void 0;if(p.isIdentifier(r)&&r[h])if((0,u.default)(t[0],r.name))n=t[0][r.name];else if("$"===r.name[0]){var i=+r.name.slice(1);t[i]&&(n=t[i])}null===n&&e.remove(),n&&(n[f]=!0,e.replaceInline(n))},exit:function(e){var t=e.node;t.loc||l.default.clearNode(t)}};t.exports=r.default},{"babel-runtime/core-js/symbol":129,"babel-traverse":143,"babel-types":180,babylon:188,"lodash/assign":488,"lodash/cloneDeep":492,"lodash/has":504}],140:[function(e,t,r){"use strict";function n(){r.path=new s.default}function i(){r.scope=new s.default}r.__esModule=!0,r.scope=r.path=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/weak-map"));r.clear=function(){n(),i()},r.clearPath=n,r.clearScope=i;r.path=new s.default,r.scope=new s.default},{"babel-runtime/core-js/weak-map":132}],141:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/helpers/classCallCheck")),o=i(e("./path")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),l="test"===n.env.NODE_ENV,c=function(){function e(t,r,n,i){(0,a.default)(this,e),this.queue=null,this.parentPath=i,this.scope=t,this.state=n,this.opts=r}return e.prototype.shouldVisit=function(e){var t=this.opts;if(t.enter||t.exit)return!0;if(t[e.type])return!0;var r=u.VISITOR_KEYS[e.type];if(!r||!r.length)return!1;var n=r,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return o.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(l&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}var c=e,p=Array.isArray(c),h=0;for(c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}f.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=c,t.exports=r.default}).call(this,e("_process"))},{"./path":150,_process:550,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],142:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck"));r.default=function e(t,r){(0,n.default)(this,e),this.file=t,this.options=r},t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],143:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));h.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=i(e("babel-runtime/core-js/get-iterator")),u=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(u).default}});var l=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(l).default}});var c=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(c).default}}),r.default=s;var p=i(e("./context")),h=n(e("./visitors")),f=n(e("babel-messages")),d=i(e("lodash/includes")),m=n(e("babel-types")),y=n(e("./cache"));r.visitors=h,s.visitors=h,s.verify=h.verify,s.explode=h.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return m.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=m.VISITOR_KEYS[e.type];if(a){var u=new p.default(r,t,n,i),l=a,c=Array.isArray(l),h=0;for(l=c?l:(0,o.default)(l);;){var f;if(c){if(h>=l.length)break;f=l[h++]}else{if((h=l.next()).done)break;f=h.value}var d=f;if((!s||!s[d])&&u.visit(e,d))return}}},s.clearNode=function(e,t){m.removeProperties(e,t),y.path.delete(e)},s.removeProperties=function(e,t){return m.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,d.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},(s.clearCache=function(){y.clear()}).clearPath=y.clearPath,s.clearCache.clearScope=y.clearScope,s.copyCache=function(e,t){y.path.has(e)&&y.path.set(t,y.path.get(e))}},{"./cache":140,"./context":141,"./hub":142,"./path":150,"./scope":162,"./visitors":164,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],144:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.findParent=function(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null},r.find=function(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null},r.getFunctionParent=function(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})},r.getStatementParent=function(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)},r.getEarliestCommonAncestorFrom=function(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){var n=void 0,a=s.VISITOR_KEYS[e.type],o=r,u=Array.isArray(o),l=0;for(o=u?o:(0,i.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c[t+1];n?p.listKey&&n.listKey===p.listKey&&p.keya.indexOf(p.parentKey)&&(n=p):n=p}return n})},r.getDeepestCommonAncestorFrom=function(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,s=void 0,a=void 0,o=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}if(d[l]!==c)break e}s=l,a=c}if(a)return t?t(a,s,o):a;throw new Error("Couldn't find intersection")},r.getAncestry=function(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t},r.isAncestor=function(e){return e.isDescendant(this)},r.isDescendant=function(e){return!!this.findParent(function(t){return t===e})},r.inType=function(){for(var e=this;e;){var t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(e.node.type===a)return!0}e=e.parentPath}return!1},r.inShadow=function(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}};var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n(e("./index"))},{"./index":150,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],145:[function(e,t,r){"use strict";r.__esModule=!0,r.shareCommentsWithSiblings=function(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}},r.addComment=function(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])},r.addComments=function(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}},{}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.call=function(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])},r._call=function(e){if(!e)return!1;var t=e,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}var a=s;if(a){var o=this.node;if(!o)return!0;if(a.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+a);if(this.node!==o)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1},r.isBlacklisted=function(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1},r.visit=function(){return!!this.node&&!this.isBlacklisted()&&(!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),s.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))},r.skip=function(){this.shouldSkip=!0},r.skipKey=function(e){this.skipKeys[e]=!0},r.stop=function(){this.shouldStop=!0,this.shouldSkip=!0},r.setScope=function(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}},r.setContext=function(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this},r.resync=function(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())},r._resyncParent=function(){this.parentPath&&(this.parent=this.parentPath.node)},r._resyncKey=function(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed){var t=this.contexts,r=Array.isArray(t),n=0;for(t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}s.maybeQueue(e)}}},r._getQueueContexts=function(){for(var e=this,t=this.contexts;!t.length;)t=(e=e.parentPath).contexts;return t};var s=n(e("../index"))},{"../index":143,"babel-runtime/core-js/get-iterator":120}],147:[function(e,t,r){"use strict";r.__esModule=!0,r.toComputedKey=function(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||n.isIdentifier(t)&&(t=n.stringLiteral(t.name)),t},r.ensureBlock=function(){return n.ensureBlock(this.node)},r.arrowFunctionToShadowed=function(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":180}],148:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator")),a=n(e("babel-runtime/core-js/map"));r.evaluateTruthy=function(){var e=this.evaluate();if(e.confident)return!!e.value},r.evaluate=function(){function e(e){n&&(l=e,n=!1)}function r(a){var l=a.node;if(c.has(l)){var p=c.get(l);return p.resolved?p.value:void e(a)}var h={resolved:!1};c.set(l,h);var f=function(a){if(n){var l=a.node;if(a.isSequenceExpression()){var c=a.get("expressions");return r(c[c.length-1])}if(a.isStringLiteral()||a.isNumericLiteral()||a.isBooleanLiteral())return l.value;if(a.isNullLiteral())return null;if(a.isTemplateLiteral()){for(var p="",h=0,f=a.get("expressions"),d=l.quasis,m=Array.isArray(d),y=0,d=m?d:(0,s.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!n)break;p+=b.value.cooked;var v=f[h++];v&&(p+=String(r(v)))}if(!n)return;return p}if(a.isConditionalExpression()){var x=r(a.get("test"));if(!n)return;return r(x?a.get("consequent"):a.get("alternate"))}if(a.isExpressionWrapper())return r(a.get("expression"));if(a.isMemberExpression()&&!a.parentPath.isCallExpression({callee:l})){var E=a.get("property"),A=a.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,S=void 0===D?"undefined":(0,i.default)(D);if("number"===S||"string"===S)return D[E.node.name]}}if(a.isReferencedIdentifier()){var C=a.scope.getBinding(l.name);if(C&&C.constantViolations.length>0)return e(C.path);if(C&&a.node.start=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;if(!(j=j.evaluate()).confident)return e(j);F.push(j.value)}return F}if(a.isObjectExpression()){for(var I={},L=a.get("properties"),M=L,R=Array.isArray(M),V=0,M=R?M:(0,s.default)(M);;){var U;if(R){if(V>=M.length)break;U=M[V++]}else{if((V=M.next()).done)break;U=V.value}var q=U;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(!(X=X.evaluate()).confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(a.isLogicalExpression()){var K=n,z=r(a.get("left")),Y=n;n=K;var H=r(a.get("right")),$=n;switch(n=Y&&$,l.operator){case"||":if(z&&Y)return n=!0,z;if(!n)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(n=!0),!n)return;return z&&H}}if(a.isBinaryExpression()){var Q=r(a.get("left"));if(!n)return;var Z=r(a.get("right"));if(!n)return;switch(l.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<>":return Q>>Z;case">>>":return Q>>>Z}}if(a.isCallExpression()){var ee=a.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!a.scope.getBinding(ee.node.name,!0)&&o.indexOf(ee.node.name)>=0&&(re=t[l.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&o.indexOf(ne.node.name)>=0&&u.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,i.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=a.get("arguments").map(r);if(!n)return;return re.apply(te,ae)}}e(a)}}(a);return n&&(h.resolved=!0,h.value=f),f}var n=!0,l=void 0,c=new a.default,p=r(this);return n||(p=void 0),{confident:n,deopt:l,value:p}};var o=["String","Number","Math"],u=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/helpers/typeof":138}],149:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/object/create")),s=n(e("babel-runtime/core-js/get-iterator"));r.getStatementParent=function(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e},r.getOpposite=function(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0},r.getCompletionRecords=function(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e},r.getSibling=function(e){return a.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})},r.getPrevSibling=function(){return this.getSibling(this.key-1)},r.getNextSibling=function(){return this.getSibling(this.key+1)},r.getAllNextSiblings=function(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r},r.getAllPrevSiblings=function(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r},r.get=function(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)},r._getKey=function(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,o){return a.default.get({listKey:e,parentPath:r,parent:n,container:i,key:o}).setContext(t)}):a.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)},r._getPattern=function(e,t){var r=this,n=e,i=Array.isArray(n),a=0;for(n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r="."===u?r.parentPath:Array.isArray(r)?r[u]:r.get(u,t)}return r},r.getBindingIdentifiers=function(e){return o.getBindingIdentifiers(this.node,e)},r.getOuterBindingIdentifiers=function(e){return o.getOuterBindingIdentifiers(this.node,e)},r.getBindingIdentifierPaths=function(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=[].concat(this),n=(0,i.default)(null);r.length;){var s=r.shift();if(s&&s.node){var a=o.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())e?(n[s.node.name]=n[s.node.name]||[]).push(s):n[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&r.push(u)}else{if(t){if(s.isFunctionDeclaration()){r.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,c.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){f.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){m.enabled&&m(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=y,(0,p.default)(y.prototype,e("./ancestry")),(0,p.default)(y.prototype,e("./inference")),(0,p.default)(y.prototype,e("./replacement")),(0,p.default)(y.prototype,e("./evaluation")),(0,p.default)(y.prototype,e("./conversion")),(0,p.default)(y.prototype,e("./introspection")),(0,p.default)(y.prototype,e("./context")),(0,p.default)(y.prototype,e("./removal")),(0,p.default)(y.prototype,e("./modification")),(0,p.default)(y.prototype,e("./family")),(0,p.default)(y.prototype,e("./comments"));var g=function(){if(v){if(x>=b.length)return"break";E=b[x++]}else{if((x=b.next()).done)return"break";E=x.value}var e=E,t="is"+e;y.prototype[t]=function(e){return f[t](this.node,e)},y.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}},b=f.TYPES,v=Array.isArray(b),x=0;for(b=v?b:(0,s.default)(b);;){var E;if("break"===g())break}var A=function(e){if("_"===e[0])return"continue";f.TYPES.indexOf(e)<0&&f.TYPES.push(e);var t=o[e];y.prototype["is"+e]=function(e){return t.checkPath(this,e)}};for(var D in o){A(D)}t.exports=r.default},{"../cache":140,"../index":143,"../scope":162,"./ancestry":144,"./comments":145,"./context":146,"./conversion":147,"./evaluation":148,"./family":149,"./inference":151,"./introspection":154,"./lib/virtual-types":157,"./modification":158,"./removal":159,"./replacement":160,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,debug:165,invariant:318,"lodash/assign":488}],151:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e,t,r){if("string"===e)return o.isStringTypeAnnotation(t);if("number"===e)return o.isNumberTypeAnnotation(t);if("boolean"===e)return o.isBooleanTypeAnnotation(t);if("any"===e)return o.isAnyTypeAnnotation(t);if("mixed"===e)return o.isMixedTypeAnnotation(t);if("empty"===e)return o.isEmptyTypeAnnotation(t);if("void"===e)return o.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}r.__esModule=!0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.getTypeAnnotation=function(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||o.anyTypeAnnotation();return o.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e},r._getTypeAnnotation=function(){var e=this.node;if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=a[e.type];return t?t.call(this,e):(t=a[this.parentPath.type])&&t.validParent?this.parentPath.getTypeAnnotation():void 0}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?o.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?o.anyTypeAnnotation():o.voidTypeAnnotation()}},r.isBaseType=function(e,t){return i(e,this.getTypeAnnotation(),t)},r.couldBeBaseType=function(e){var t=this.getTypeAnnotation();if(o.isAnyTypeAnnotation(t))return!0;if(o.isUnionTypeAnnotation(t)){var r=t.types,n=Array.isArray(r),a=0;for(r=n?r:(0,s.default)(r);;){var u;if(n){if(a>=r.length)break;u=r[a++]}else{if((a=r.next()).done)break;u=a.value}var l=u;if(o.isAnyTypeAnnotation(l)||i(e,l,!0))return!0}return!1}return i(e,t,!0)},r.baseTypeStrictlyMatches=function(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!o.isAnyTypeAnnotation(t)&&o.isFlowBaseAnnotation(t))return e.type===t.type},r.isGenericType=function(e){var t=this.getTypeAnnotation();return o.isGenericTypeAnnotation(t)&&o.isIdentifier(t.id,{name:e})};var a=n(e("./inferers")),o=n(e("babel-types"))},{"./inferers":153,"babel-runtime/core-js/get-iterator":120,"babel-types":180}],152:[function(e,t,r){"use strict";function n(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){var n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function i(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():o.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?o.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,u=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,u=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,u=i),(u||a)&&(u=u.resolve()).isLiteral()){if("string"==typeof u.node.value&&a.get("argument").isIdentifier({name:e}))return o.createTypeAnnotationBasedOnTypeof(u.node.value)}}}function s(e,t){var r=function(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}(e);if(r){var n=[r.get("test")],a=[];do{var u=n.shift().resolve();if(u.isLogicalExpression()&&(n.push(u.get("left")),n.push(u.get("right"))),u.isBinaryExpression()){var l=i(t,u);l&&a.push(l)}}while(n.length);return a.length?{typeAnnotation:o.createUnionTypeAnnotation(a),ifStatement:r}:s(r,t)}}r.__esModule=!0;var a=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:function(e,t){var r=e.scope.getBinding(t),i=[];e.typeAnnotation=o.unionTypeAnnotation(i);var u=[],l=n(r,e,u),c=s(e,t);if(c){var p=n(r,c.ifStatement);l=l.filter(function(e){return p.indexOf(e)<0}),i.push(c.typeAnnotation)}if(l.length){var h=l=l.concat(u),f=Array.isArray(h),d=0;for(h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m;i.push(y.getTypeAnnotation())}}if(i.length)return o.createUnionTypeAnnotation(i)}(this,e.name):"undefined"===e.name?o.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?o.numberTypeAnnotation():void e.name}};var o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-types":180}],153:[function(e,t,r){"use strict";function n(e){return e.typeAnnotation}function i(){return l.genericTypeAnnotation(l.identifier("Array"))}function s(){return i()}function a(){return l.genericTypeAnnotation(l.identifier("Function"))}function o(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?l.genericTypeAnnotation(l.identifier("AsyncIterator")):l.genericTypeAnnotation(l.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var u=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(u).default}}),r.VariableDeclarator=function(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0},r.TypeCastExpression=n,r.NewExpression=function(e){if(this.get("callee").isIdentifier())return l.genericTypeAnnotation(e.callee)},r.TemplateLiteral=function(){return l.stringTypeAnnotation()},r.UnaryExpression=function(e){var t=e.operator;return"void"===t?l.voidTypeAnnotation():l.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?l.numberTypeAnnotation():l.STRING_UNARY_OPERATORS.indexOf(t)>=0?l.stringTypeAnnotation():l.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?l.booleanTypeAnnotation():void 0},r.BinaryExpression=function(e){var t=e.operator;if(l.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return l.numberTypeAnnotation();if(l.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return l.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?l.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?l.stringTypeAnnotation():l.unionTypeAnnotation([l.stringTypeAnnotation(),l.numberTypeAnnotation()])}},r.LogicalExpression=function(){return l.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])},r.ConditionalExpression=function(){return l.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])},r.SequenceExpression=function(){return this.get("expressions").pop().getTypeAnnotation()},r.AssignmentExpression=function(){return this.get("right").getTypeAnnotation()},r.UpdateExpression=function(e){var t=e.operator;if("++"===t||"--"===t)return l.numberTypeAnnotation()},r.StringLiteral=function(){return l.stringTypeAnnotation()},r.NumericLiteral=function(){return l.numberTypeAnnotation()},r.BooleanLiteral=function(){return l.booleanTypeAnnotation()},r.NullLiteral=function(){return l.nullLiteralTypeAnnotation()},r.RegExpLiteral=function(){return l.genericTypeAnnotation(l.identifier("RegExp"))},r.ObjectExpression=function(){return l.genericTypeAnnotation(l.identifier("Object"))},r.ArrayExpression=i,r.RestElement=s,r.CallExpression=function(){return o(this.get("callee"))},r.TaggedTemplateExpression=function(){return o(this.get("tag"))};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n.validParent=!0,s.validParent=!0,r.FunctionExpression=a,r.ArrowFunctionExpression=a,r.FunctionDeclaration=a,r.ClassExpression=a,r.ClassDeclaration=a},{"./inferer-reference":152,"babel-types":180}],154:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}r.__esModule=!0,r.is=void 0;var s=n(e("babel-runtime/core-js/get-iterator"));r.matchesPattern=function(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(o.isIdentifier(a)){if(!r(a.name))return!1}else if(o.isLiteral(a)){if(!r(a.value))return!1}else{if(o.isMemberExpression(a)){if(a.computed&&!o.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!o.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length},r.has=i,r.isStatic=function(){return this.scope.isStatic(this.node)},r.isnt=function(e){return!this.has(e)},r.equals=function(e,t){return this.node[e]===t},r.isNodeType=function(e){return o.isType(this.type,e)},r.canHaveVariableDeclarationOrExpression=function(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()},r.canSwapBetweenExpressionAndStatement=function(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?o.isBlockStatement(e):!!this.isBlockStatement()&&o.isExpression(e))},r.isCompletionRecord=function(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0},r.isStatementOrBlock=function(){return!this.parentPath.isLabeledStatement()&&!o.isBlockStatement(this.container)&&(0,a.default)(o.STATEMENT_OR_BLOCK_KEYS,this.key)},r.referencesImport=function(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!(!i.isImportDeclaration()||i.node.source.value!==e||t&&(!n.isImportDefaultSpecifier()||"default"!==t)&&(!n.isImportNamespaceSpecifier()||"*"!==t)&&(!n.isImportSpecifier()||n.node.imported.name!==t))},r.getSource=function(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""},r.willIMaybeExecuteBefore=function(e){return"after"!==this._guessExecutionStatusRelativeTo(e)},r._guessExecutionStatusRelativeTo=function(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,u=void 0,l=void 0;for(l=0;l=0){a=c;break}}if(!a)return"before";var p=i[u-1],h=s[l-1];return p&&h?p.listKey&&p.container===h.container?p.key>h.key?"before":"after":o.VISITOR_KEYS[p.type].indexOf(p.key)>o.VISITOR_KEYS[h.type].indexOf(h.key)?"before":"after":"before"},r._guessExecutionStatusRelativeToDifferentFunctions=function(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";var n=r.referencePaths,i=n,a=Array.isArray(i),o=0;for(i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u;if("callee"!==l.key||!l.parentPath.isCallExpression())return}var c=void 0,p=n,h=Array.isArray(p),f=0;for(p=h?p:(0,s.default)(p);;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;if(!m.find(function(e){return e.node===t.node})){var y=this._guessExecutionStatusRelativeTo(m);if(c){if(c!==y)return}else c=y}}return c}},r.resolve=function(e,t){return this._resolve(e,t)||this},r._resolve=function(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!o.isLiteral(i))return;var a=i.value,u=this.get("object").resolve(e,t);if(u.isObjectExpression()){var l=u.get("properties"),c=Array.isArray(l),p=0;for(l=c?l:(0,s.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}}else if(u.isArrayExpression()&&!isNaN(+a)){var y=u.get("elements")[a];if(y)return y.resolve(e,t)}}}};var a=n(e("lodash/includes")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.is=i},{"babel-runtime/core-js/get-iterator":120,"babel-types":180,"lodash/includes":507}],155:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!a.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},l=function(){function e(t,r){(0,s.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;var s=n.constantViolations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e.parentPath.isExportDeclaration()&&(e=e.parentPath),e}},e.prototype._getAttachmentPath=function(){var e=this.scopes.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return e.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=o.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:o.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=o.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=l,t.exports=r.default},{"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],156:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],157:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":180}],158:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/typeof")),s=n(e("babel-runtime/core-js/get-iterator"));r.insertBefore=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r._containerInsert=function(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d.setScope(),d.debug(function(){return"Inserted."});var m=l,y=Array.isArray(m),g=0;for(m=y?m:(0,s.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}b.maybeQueue(d,!0)}}return r},r._containerInsertBefore=function(e){return this._containerInsert(this.key,e)},r._containerInsertAfter=function(e){return this._containerInsert(this.key+1,e)},r._maybePopFromStatements=function(e){var t=e[e.length-1];(l.isIdentifier(t)||l.isExpressionStatement(t)&&l.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()},r.insertAfter=function(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(l.expressionStatement(l.assignmentExpression("=",t,this.node))),e.push(l.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(l.blockStatement(e))}return[this]},r.updateSiblingKeys=function(e,t){if(this.parent)for(var r=a.path.get(this.parent),n=0;n=e&&(i.key+=t)}},r._verifyNodeList=function(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:this.scope;return new o.default(this,e).run()};var a=e("../cache"),o=n(e("./lib/hoister")),u=n(e("./index")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"../cache":140,"./index":150,"./lib/hoister":155,"babel-runtime/core-js/get-iterator":120,"babel-runtime/helpers/typeof":138,"babel-types":180}],159:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.remove=function(){this._assertUnremoved(),this.resync(),this._callRemovalHooks()?this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved())},r._callRemovalHooks=function(){var e=i.hooks,t=Array.isArray(e),r=0;for(e=t?e:(0,n.default)(e);;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{if((r=e.next()).done)break;s=r.value}if(s(this,this.parentPath))return!0}},r._remove=function(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)},r._markRemoved=function(){this.shouldSkip=!0,this.removed=!0,this.node=null},r._assertUnremoved=function(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")};var i=e("./lib/removal-hooks")},{"./lib/removal-hooks":156,"babel-runtime/core-js/get-iterator":120}],160:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.replaceWithMultiple=function(e){this.resync(),e=this._verifyNodeList(e),l.inheritLeadingComments(e[0],this.node),l.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()},r.replaceWithSourceString=function(e){this.resync();try{e="("+e+")",e=(0,u.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,s.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,a.default.removeProperties(e),this.replaceWith(e)},r.replaceWith=function(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof o.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!l.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&l.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||this.parentPath.isExportDefaultDeclaration()||(e=l.expressionStatement(e))),this.isNodeType("Expression")&&l.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(l.inheritsComments(e,t),l.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}},r._replaceWith=function(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?l.validate(this.parent,this.key,[e]):l.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e},r.replaceExpressionWithStatements=function(e){this.resync();var t=l.toSequenceExpression(e,this.scope);if(l.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=l.functionExpression(null,[],l.blockStatement(e));n.shadow=!0,this.replaceWith(l.callExpression(n,[])),this.traverse(c);var s=this.get("callee").getCompletionRecords(),a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.isExpressionStatement()){var h=p.findParent(function(e){return e.isLoop()});if(h){var f=h.getData("expressionReplacementReturnUid");if(f)f=l.identifier(f.name);else{var d=this.get("callee");f=d.scope.generateDeclaredUidIdentifier("ret"),d.get("body").pushContainer("body",l.returnStatement(f)),h.setData("expressionReplacementReturnUid",f)}p.get("expression").replaceWith(l.assignmentExpression("=",f,p.node.expression))}else p.replaceWith(l.returnStatement(p.node.expression))}}return this.node}this.replaceWith(t)}},r.replaceInline=function(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)};var s=n(e("babel-code-frame")),a=n(e("../index")),o=n(e("./index")),u=e("babylon"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),c={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});var n=[],s=e.node.declarations,a=Array.isArray(s),o=0;for(s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;c.init&&n.push(l.expressionStatement(l.assignmentExpression("=",c.id,c.init)))}e.replaceWithMultiple(n)}}}},{"../index":143,"./index":150,"babel-code-frame":21,"babel-runtime/core-js/get-iterator":120,"babel-types":180,babylon:188}],161:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){var r=t.existing,i=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,n.default)(this,e),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":134}],162:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(v.isModuleDeclaration(e))if(e.source)s(e.source,t);else if(e.specifiers&&e.specifiers.length){var r=e.specifiers,n=Array.isArray(r),i=0;for(r=n?r:(0,c.default)(r);;){var a;if(n){if(i>=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}s(a,t)}}else e.declaration&&s(e.declaration,t);else if(v.isModuleSpecifier(e))s(e.local,t);else if(v.isMemberExpression(e))s(e.object,t),s(e.property,t);else if(v.isIdentifier(e))t.push(e.name);else if(v.isLiteral(e))t.push(e.value);else if(v.isCallExpression(e))s(e.callee,t);else if(v.isObjectExpression(e)||v.isObjectPattern(e)){var o=e.properties,u=Array.isArray(o),l=0;for(o=u?o:(0,c.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if((l=o.next()).done)break;p=l.value}var h=p;s(h.key||h.argument,t)}}}r.__esModule=!0;var a=i(e("babel-runtime/core-js/object/keys")),o=i(e("babel-runtime/core-js/object/create")),u=i(e("babel-runtime/core-js/map")),l=i(e("babel-runtime/helpers/classCallCheck")),c=i(e("babel-runtime/core-js/get-iterator")),p=i(e("lodash/includes")),h=i(e("lodash/repeat")),f=i(e("./lib/renamer")),d=i(e("../index")),m=i(e("lodash/defaults")),y=n(e("babel-messages")),g=i(e("./binding")),b=i(e("globals")),v=n(e("babel-types")),x=e("../cache"),E=0,A={For:function(e){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(v.isClassDeclaration(n)||v.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(v.isVariableDeclaration(n)){var a=n.declarations,o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l,h=v.getBindingIdentifiers(p);for(var f in h){var d=r.getBinding(f);d&&d.reference(e)}}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){var t=e.get("body"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;s.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(s)}}},D=0,S=function(){function e(t,r){if((0,l.default)(this,e),r&&r.block===t.node)return r;var n=function(e,t,r){var n=x.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),x.scope.has(e.node)||x.scope.set(e.node,n)}(t,r,this);if(n)return n;this.uid=D++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new u.default}return e.prototype.traverse=function(e,t,r){(0,d.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return v.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=v.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;v.isAssignmentExpression(e)?r=e.left:v.isVariableDeclarator(e)?r=e.id:(v.isObjectProperty(r)||v.isObjectMethod(r))&&(r=r.key);var n=[];s(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(v.isThisExpression(e)||v.isSuper(e))return!0;if(v.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,y.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new f.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,h.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(v.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(v.isArrayExpression(e))return e;if(v.isIdentifier(e,{name:"arguments"}))return v.callExpression(v.memberExpression(v.memberExpression(v.memberExpression(v.identifier("Array"),v.identifier("prototype")),v.identifier("slice")),v.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(v.numericLiteral(t)),i="slicedToArray"),v.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration()){var t=e.get("declarations"),r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.registerBinding(e.node.kind,s)}}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration()){var a=e.get("specifiers"),o=Array.isArray(a),u=0;for(a=o?a:(0,c.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var p=l;this.registerBinding("module",p)}}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?v.unaryExpression("void",v.numericLiteral(0),!0):v.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration()){var n=t.get("declarations"),i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.registerBinding(e,o)}}else{var u=this.getProgramParent(),l=t.getBindingIdentifiers(!0);for(var p in l){var h=l[p],f=Array.isArray(h),d=0;for(h=f?h:(0,c.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m,b=this.getOwnBinding(p);if(b){if(b.identifier===y)continue;this.checkBlockScopedCollisions(b,e,p,y)}b&&b.path.isFlow()&&(b=null),u.references[p]=!0,this.bindings[p]=new g.default({identifier:y,existing:b,scope:this,path:r,kind:e})}}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(v.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(v.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(v.isClassBody(e)){var n=e.body,i=Array.isArray(n),s=0;for(n=i?n:(0,c.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(v.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(v.isArrayExpression(e)){var u=e.elements,l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(!this.isPure(f,t))return!1}return!0}if(v.isObjectExpression(e)){var d=e.properties,m=Array.isArray(d),y=0;for(d=m?d:(0,c.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return v.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):v.isClassProperty(e)||v.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):v.isUnaryExpression(e)?this.isPure(e.argument,t):v.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){E++,this._crawl(),E--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,o.default)(null),this.bindings=(0,o.default)(null),this.globals=(0,o.default)(null),this.uids=(0,o.default)(null),this.data=(0,o.default)(null),e.isLoop()){var t=v.FOR_INIT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[v.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction()){var u=e.get("params"),l=Array.isArray(u),p=0;for(u=l?u:(0,c.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;this.registerBinding("param",f)}}e.isCatchClause()&&this.registerBinding("let",e);if(!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(A,d),this.crawling=!1;var m=d.assignments,y=Array.isArray(m),g=0;for(m=y?m:(0,c.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}var x=b,E=x.getBindingIdentifiers(),D=void 0;for(var S in E)x.scope.getBinding(S)||(D=D||x.scope.getProgramParent()).addGlobal(E[S]);x.scope.registerConstantViolation(x)}var C=d.references,_=Array.isArray(C),w=0;for(C=_?C:(0,c.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k,T=F.scope.getBinding(F.node.name);T?T.reference(F):F.scope.getProgramParent().addGlobal(F.node)}var P=d.constantViolations,B=Array.isArray(P),O=0;for(P=B?P:(0,c.default)(P);;){var N;if(B){if(O>=P.length)break;N=P[O++]}else{if((O=P.next()).done)break;N=O.value}var j=N;j.scope.registerConstantViolation(j)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(v.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=v.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=v.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,o.default)(null),t=this;do{(0,m.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){var e=(0,o.default)(null),t=arguments,r=Array.isArray(t),n=0;for(t=r?t:(0,c.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=this;do{for(var u in a.bindings){var l=a.bindings[u];l.kind===s&&(e[u]=l)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===E&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 7. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,p.default)(e.globals,t))||!(r||!(0,p.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();S.globals=(0,a.default)(b.default.builtin),S.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=S,t.exports=r.default},{"../cache":140,"../index":143,"./binding":161,"./lib/renamer":163,"babel-messages":110,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/map":122,"babel-runtime/core-js/object/create":125,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/classCallCheck":134,"babel-types":180,globals:168,"lodash/defaults":495,"lodash/includes":507,"lodash/repeat":530}],163:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=(n(e("../binding")),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))),a={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},o=function(){function e(t,r,n){(0,i.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var a in n){var o=a===this.oldName?this.newName:a,u=r?"default":a;i.push(s.exportSpecifier(s.identifier(o),s.identifier(u)))}if(i.length){var l=s.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});s&&this.maybeConvertFromExportDeclaration(s),i.traverse(e||i.block,a,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type},e}();r.default=o,t.exports=r.default},{"../binding":161,"babel-runtime/helpers/classCallCheck":134,"babel-types":180}],164:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!l(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];var i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,f.default)(i);;){var p;if(s){if(o>=i.length)break;p=i[o++]}else{if((o=i.next()).done)break;p=o.value}e[p]=n}}}a(e),delete e.__esModule,function(e){for(var t in e)if(!l(t)){var r=e[t];"function"==typeof r&&(e[t]={enter:r})}}(e),u(e);var m=(0,h.default)(e),b=Array.isArray(m),v=0;for(m=b?m:(0,f.default)(m);;){var x;if(b){if(v>=m.length)break;x=m[v++]}else{if((v=m.next()).done)break;x=v.value}var E=x;if(!l(E)){var A=d[E];if(A){var D=e[E];for(var S in D)D[S]=function(e,t){var r=function(r){if(e.checkPath(r))return t.apply(this,arguments)};return r.toString=function(){return t.toString()},r}(A,D[S]);if(delete e[E],A.types){var C=A.types,_=Array.isArray(C),w=0;for(C=_?C:(0,f.default)(C);;){var k;if(_){if(w>=C.length)break;k=C[w++]}else{if((w=C.next()).done)break;k=w.value}var F=k;e[F]?c(e[F],D):e[F]=D}}else c(e,D)}}}for(var T in e)if(!l(T)){var P=e[T],B=y.FLIPPED_ALIAS_KEYS[T],O=y.DEPRECATED_KEYS[T];if(O&&(console.trace("Visitor defined for "+T+" but it has been renamed to "+O),B=[O]),B){delete e[T];var N=B,j=Array.isArray(N),I=0;for(N=j?N:(0,f.default)(N);;){var L;if(j){if(I>=N.length)break;L=N[I++]}else{if((I=N.next()).done)break;L=I.value}var M=L,R=e[M];R?c(R,P):e[M]=(0,g.default)(P)}}}for(var V in e)l(V)||u(e[V]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(m.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!l(t)){if(y.TYPES.indexOf(t)<0)throw new Error(m.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,p.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(m.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){var r=[].concat(t),n=Array.isArray(r),i=0;for(r=n?r:(0,f.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("function"!=typeof a)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===a?"undefined":(0,p.default)(a)))}}function u(e){e.enter&&!Array.isArray(e.enter)&&(e.enter=[e.enter]),e.exit&&!Array.isArray(e.exit)&&(e.exit=[e.exit])}function l(e){return"_"===e[0]||("enter"===e||"exit"===e||"shouldSkip"===e||("blacklist"===e||"noScope"===e||"skipKeys"===e))}function c(e,t){for(var r in t)e[r]=[].concat(e[r]||[],t[r])}r.__esModule=!0;var p=i(e("babel-runtime/helpers/typeof")),h=i(e("babel-runtime/core-js/object/keys")),f=i(e("babel-runtime/core-js/get-iterator"));r.explode=s,r.verify=a,r.merge=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":166,_process:550}],166:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60,ms:543}],167:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,cancelIdleCallback:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,createImageBitmap:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,spyOnProperty:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],168:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":167}],169:[function(e,t,r){"use strict";r.__esModule=!0,r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/symbol/for")),i=(r.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],r.FLATTENABLE_KEYS=["body","expressions"],r.FOR_INIT_KEYS=["left","init"],r.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"],r.LOGICAL_OPERATORS=["||","&&"],r.UPDATE_OPERATORS=["++","--"],r.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),s=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],a=r.COMPARISON_BINARY_OPERATORS=[].concat(s,["in","instanceof"]),o=r.BOOLEAN_BINARY_OPERATORS=[].concat(a,i),u=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(r.BINARY_OPERATORS=["+"].concat(u,o),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(l,c,p),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,n.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,n.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":130}],170:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t,r){var n=[],s=!0,a=e,o=Array.isArray(a),u=0;for(a=o?a:(0,l.default)(a);;){var c;if(o){if(u>=a.length)break;c=a[u++]}else{if((u=a.next()).done)break;c=u.value}var p=c;if(s=!1,h.isExpression(p))n.push(p);else if(h.isExpressionStatement(p))n.push(p.expression);else if(h.isVariableDeclaration(p)){if("var"!==p.kind)return;var f=p.declarations,d=Array.isArray(f),m=0;for(f=d?f:(0,l.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if((m=f.next()).done)break;y=m.value}var g=y,b=h.getBindingIdentifiers(g);for(var v in b)r.push({kind:p.kind,id:b[v]});g.init&&n.push(h.assignmentExpression("=",g.id,g.init))}s=!0}else if(h.isIfStatement(p)){var x=p.consequent?i([p.consequent],t,r):t.buildUndefinedNode(),E=p.alternate?i([p.alternate],t,r):t.buildUndefinedNode();if(!x||!E)return;n.push(h.conditionalExpression(p.test,x,E))}else if(h.isBlockStatement(p)){var A=i(p.body,t,r);if(!A)return;n.push(A)}else{if(!h.isEmptyStatement(p))return;s=!0}}return s&&n.push(t.buildUndefinedNode()),1===n.length?n[0]:h.sequenceExpression(n)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?s.increment()+"":(r=h.isIdentifier(t)?t.name:h.isStringLiteral(t)?(0,u.default)(t.value):(0,u.default)(h.removePropertiesDeep(h.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function a(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),h.isValidIdentifier(e)||(e="_"+e),e||"_"}r.__esModule=!0;var o=n(e("babel-runtime/core-js/number/max-safe-integer")),u=n(e("babel-runtime/core-js/json/stringify")),l=n(e("babel-runtime/core-js/get-iterator"));r.toComputedKey=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||h.isIdentifier(t)&&(t=h.stringLiteral(t.name)),t},r.toSequenceExpression=function(e,t){if(e&&e.length){var r=[],n=i(e,t,r);if(n){var s=r,a=Array.isArray(s),o=0;for(s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var c=u;t.push(c)}return n}}},r.toKeyAlias=s,r.toIdentifier=a,r.toBindingIdentifierName=function(e){return"eval"!==(e=a(e))&&"arguments"!==e||(e="_"+e),e},r.toStatement=function(e,t){if(h.isStatement(e))return e;var r=!1,n=void 0;if(h.isClass(e))r=!0,n="ClassDeclaration";else if(h.isFunction(e))r=!0,n="FunctionDeclaration";else if(h.isAssignmentExpression(e))return h.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e},r.toExpression=function(e){if(h.isExpressionStatement(e)&&(e=e.expression),h.isExpression(e))return e;if(h.isClass(e)?e.type="ClassExpression":h.isFunction(e)&&(e.type="FunctionExpression"),!h.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e},r.toBlock=function(e,t){return h.isBlockStatement(e)?e:(h.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(h.isStatement(e)||(e=h.isFunction(t)?h.returnStatement(e):h.expressionStatement(e)),e=[e]),h.blockStatement(e))},r.valueToNode=function(e){if(void 0===e)return h.identifier("undefined");if(!0===e||!1===e)return h.booleanLiteral(e);if(null===e)return h.nullLiteral();if("string"==typeof e)return h.stringLiteral(e);if("number"==typeof e)return h.numericLiteral(e);if((0,p.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return h.regExpLiteral(t,r)}if(Array.isArray(e))return h.arrayExpression(e.map(h.valueToNode));if((0,c.default)(e)){var n=[];for(var i in e){var s=void 0;s=h.isValidIdentifier(i)?h.identifier(i):h.stringLiteral(i),n.push(h.objectProperty(s,h.valueToNode(e[i])))}return h.objectExpression(n)}throw new Error("don't know how to turn this value into a node")};var c=n(e("lodash/isPlainObject")),p=n(e("lodash/isRegExp")),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));s.uid=0,s.increment=function(){return s.uid>=o.default?s.uid=0:s.uid++}},{"./index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/number/max-safe-integer":123,"lodash/isPlainObject":518,"lodash/isRegExp":519}],171:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),i=e("../constants"),s=e("./index"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);(0,a.default)("ArrayExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,a.default)("AssignmentExpression",{fields:{operator:{validate:(0,s.assertValueType)("string")},left:{validate:(0,s.assertNodeType)("LVal")},right:{validate:(0,s.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,a.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.BINARY_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,a.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,s.assertNodeType)("DirectiveLiteral")}}}),(0,a.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}}),(0,a.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,a.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,a.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,a.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Expression")},alternate:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,a.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("DebuggerStatement",{aliases:["Statement"]}),(0,a.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,a.default)("EmptyStatement",{aliases:["Statement"]}),(0,a.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,a.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,s.assertNodeType)("Program")}}}),(0,a.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,s.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,s.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},update:{validate:(0,s.assertNodeType)("Expression"),optional:!0},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,a.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,s.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}}}),(0,a.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){n.isValidIdentifier(r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,s.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,s.assertValueType)("string")},flags:{validate:(0,s.assertValueType)("string"),default:""}}}),(0,a.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,s.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,s.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,a.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}}}),(0,a.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,a.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,a.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,a.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,s.assertNodeType)("Expression","Pattern","RestElement")},shorthand:{validate:(0,s.assertValueType)("boolean"),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,a.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression"),optional:!0}}}),(0,a.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,a.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}}}),(0,a.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,s.assertNodeType)("Expression")},cases:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("SwitchCase")))}}}),(0,a.default)("ThisExpression",{aliases:["Expression"]}),(0,a.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,s.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,a.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,a.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("var","let","const"))},declarations:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("VariableDeclarator")))}}}),(0,a.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,s.assertNodeType)("LVal")},init:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}}),(0,a.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":169,"../index":180,"./index":175}],172:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Identifier","Pattern","RestElement")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],173:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],174:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareExportDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("OpaqueType",{visitor:["id","typeParameters","impltype","supertype"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":175}],175:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,u.default)(e)}function s(e){function t(t,r,n){if(!(i(n)===e))throw new TypeError("Property "+r+" expected type of "+e+" but got "+i(n))}return t.type=e,t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var a=n(e("babel-runtime/core-js/get-iterator")),o=n(e("babel-runtime/core-js/json/stringify")),u=n(e("babel-runtime/helpers/typeof"));r.assertEach=function(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i=s.length)break;p=s[c++]}else{if((c=s.next()).done)break;p=c.value}var h=p;if(l.is(h,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=u.length)break;h=u[p++]}else{if((p=u.next()).done)break;h=p.value}var f=h;if(i(n)===f||l.is(f,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,o.default)(r)+" but instead got "+(0,o.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=e.length)break;i=e[n++]}else{if((n=e.next()).done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&m[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(d[t.deprecatedAlias]=e);var n=t.visitor.concat(t.builder),o=Array.isArray(n),u=0;for(n=o?n:(0,a.default)(n);;){var l;if(o){if(u>=n.length)break;l=n[u++]}else{if((u=n.next()).done)break;l=u.value}var y=l;t.fields[y]=t.fields[y]||{}}for(var g in t.fields){var b=t.fields[g];-1===t.builder.indexOf(g)&&(b.optional=!0),void 0===b.default?b.default=null:b.validate||(b.validate=s(i(b.default)))}c[e]=t.visitor,f[e]=t.builder,h[e]=t.fields,p[e]=t.aliases,m[e]=t};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),c=r.VISITOR_KEYS={},p=r.ALIAS_KEYS={},h=r.NODE_FIELDS={},f=r.BUILDER_KEYS={},d=r.DEPRECATED_KEYS={},m={}},{"../index":180,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/helpers/typeof":138}],176:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":171,"./es2015":172,"./experimental":173,"./flow":174,"./index":175,"./jsx":177,"./misc":178}],177:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":175}],178:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":175}],179:[function(e,t,r){"use strict";function n(e){for(var t={},r={},s=[],a=[],o=0;o=0)){if(i.isAnyTypeAnnotation(u))return[u];if(i.isFlowBaseAnnotation(u))r[u.type]=u;else if(i.isUnionTypeAnnotation(u))s.indexOf(u.types)<0&&(e=e.concat(u.types),s.push(u.types));else if(i.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=n(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else a.push(u)}}for(var p in r)a.push(r[p]);for(var h in t)a.push(t[h]);return a}r.__esModule=!0,r.createUnionTypeAnnotation=function(e){var t=n(e);return 1===t.length?t[0]:i.unionTypeAnnotation(t)},r.removeTypeDuplicates=n,r.createTypeAnnotationBasedOnTypeof=function(e){if("string"===e)return i.stringTypeAnnotation();if("number"===e)return i.numberTypeAnnotation();if("undefined"===e)return i.voidTypeAnnotation();if("boolean"===e)return i.booleanTypeAnnotation();if("function"===e)return i.genericTypeAnnotation(i.identifier("Function"));if("object"===e)return i.genericTypeAnnotation(i.identifier("Object"));if("symbol"===e)return i.genericTypeAnnotation(i.identifier("Symbol"));throw new Error("Invalid typeof value")};var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"))},{"./index":180}],180:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=F["is"+e];t||(t=F["is"+e]=function(t,r){return F.is(e,t,r)}),F["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,b.default)(e)+" with option "+(0,b.default)(n))}}function s(e,t){if(e===t)return!0;if(F.ALIAS_KEYS[t])return!1;var r=F.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;var n=r,i=Array.isArray(n),s=0;for(n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(e===a)return!0}}return!1}function a(e,t,r){if(e){var n=F.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function o(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function u(e,t){p("trailingComments",e,t)}function l(e,t){p("leadingComments",e,t)}function c(e,t){p("innerComments",e,t)}function p(e,t,r){t&&r&&(t[e]=(0,_.default)([].concat(t[e],r[e]).filter(Boolean)))}function h(e){return!(!e||!w.VISITOR_KEYS[e.type])}function f(e,t,r){if(e){var n=F.VISITOR_KEYS[e.type];if(n){t(e,r=r||{});var i=n,s=Array.isArray(i),a=0;for(i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=e[o];if(Array.isArray(u)){var l=u,c=Array.isArray(l),p=0;for(l=c?l:(0,y.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}f(h,t,r)}}else f(u,t,r)}}}}function d(e,t){var r=(t=t||{}).preserveComments?O:N,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null!=e[a]&&(e[a]=void 0)}for(var o in e)"_"===o[0]&&null!=e[o]&&(e[o]=void 0);var u=(0,m.default)(e),l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}e[p]=null}}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var m=n(e("babel-runtime/core-js/object/get-own-property-symbols")),y=n(e("babel-runtime/core-js/get-iterator")),g=n(e("babel-runtime/core-js/object/keys")),b=n(e("babel-runtime/core-js/json/stringify")),v=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return v.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return v.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return v.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return v.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return v.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return v.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return v.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return v.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return v.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return v.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return v.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return v.NOT_LOCAL_BINDING}}),r.is=function(e,t,r){return!!t&&!!s(t.type,e)&&(void 0===r||F.shallowEqual(t,r))},r.isType=s,r.validate=a,r.shallowEqual=function(e,t){var r=(0,g.default)(t),n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(e[a]!==t[a])return!1}return!0},r.appendToMemberExpression=function(e,t,r){return e.object=F.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e},r.prependToMemberExpression=function(e,t){return e.object=F.memberExpression(t,e.object),e},r.ensureBlock=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=F.toBlock(e[t],e)},r.clone=o,r.cloneWithoutLoc=function(e){var t=o(e);return delete t.loc,t},r.cloneDeep=function(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=F.cloneDeep(n):Array.isArray(n)&&(n=n.map(F.cloneDeep))),t[r]=n}return t},r.buildMatchMemberExpression=function(e,t){var r=e.split(".");return function(e){if(!F.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(F.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!F.isStringLiteral(s)){if(F.isMemberExpression(s)){if(s.computed&&!F.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}},r.removeComments=function(e){var t=F.COMMENT_KEYS,r=Array.isArray(t),n=0;for(t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}delete e[i]}return e},r.inheritsComments=function(e,t){return u(e,t),l(e,t),c(e,t),e},r.inheritTrailingComments=u,r.inheritLeadingComments=l,r.inheritInnerComments=c,r.inherits=function(e,t){if(!e||!t)return e;var r=F.INHERIT_KEYS.optional,n=Array.isArray(r),i=0;for(r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);var u=F.INHERIT_KEYS.force,l=Array.isArray(u),c=0;for(u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;e[h]=t[h]}return F.inheritsComments(e,t),e},r.assertNode=function(e){if(!h(e))throw new TypeError("Not a valid node "+(e&&e.type))},r.isNode=h,r.traverseFast=f,r.removeProperties=d,r.removePropertiesDeep=function(e,t){return f(e,d,t),e};var x=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return x.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return x.getOuterBindingIdentifiers}});var E=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return E.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return E.isReferenced}}),Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return E.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return E.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return E.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return E.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return E.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return E.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return E.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return E.isNodesEquivalent}});var A=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return A.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return A.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return A.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return A.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return A.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return A.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return A.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return A.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return A.valueToNode}});var D=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return D.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return D.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return D.createTypeAnnotationBasedOnTypeof}});var S=n(e("to-fast-properties")),C=n(e("lodash/clone")),_=n(e("lodash/uniq"));e("./definitions/init");var w=e("./definitions"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./react")),F=r;r.VISITOR_KEYS=w.VISITOR_KEYS,r.ALIAS_KEYS=w.ALIAS_KEYS,r.NODE_FIELDS=w.NODE_FIELDS,r.BUILDER_KEYS=w.BUILDER_KEYS,r.DEPRECATED_KEYS=w.DEPRECATED_KEYS,r.react=k;for(var T in F.VISITOR_KEYS)i(T);F.FLIPPED_ALIAS_KEYS={},(0,g.default)(F.ALIAS_KEYS).forEach(function(e){F.ALIAS_KEYS[e].forEach(function(t){(F.FLIPPED_ALIAS_KEYS[t]=F.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,g.default)(F.FLIPPED_ALIAS_KEYS).forEach(function(e){F[e.toUpperCase()+"_TYPES"]=F.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,g.default)(F.VISITOR_KEYS).concat((0,g.default)(F.FLIPPED_ALIAS_KEYS)).concat((0,g.default)(F.DEPRECATED_KEYS));(0,g.default)(F.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;var n=0,i=r,s=Array.isArray(i),o=0;for(i=s?i:(0,y.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}var l=u,c=F.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,C.default)(c.default)),t[l]=p}for(var h in t)a(t,h,t[h]);return t}var r=F.BUILDER_KEYS[e];F[e]=t,F[e[0].toLowerCase()+e.slice(1)]=t});var P=function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=F.DEPRECATED_KEYS[e];F[e]=F[e[0].toLowerCase()+e.slice(1)]=t(F[r]),F["is"+e]=t(F["is"+r]),F["assert"+e]=t(F["assert"+r])};for(var B in F.DEPRECATED_KEYS)P(B);(0,S.default)(F),(0,S.default)(F.VISITOR_KEYS);var O=["tokens","start","end","loc","raw","rawValue"],N=F.COMMENT_KEYS.concat(["comments"]).concat(O)},{"./constants":169,"./converters":170,"./definitions":175,"./definitions/init":176,"./flow":179,"./react":181,"./retrievers":182,"./validators":183,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/json/stringify":121,"babel-runtime/core-js/object/get-own-property-symbols":126,"babel-runtime/core-js/object/keys":127,"lodash/clone":491,"lodash/uniq":540,"to-fast-properties":607}],181:[function(e,t,r){"use strict";function n(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,s=0;s=r.length)break;l=r[u++]}else{if((u=r.next()).done)break;l=u.value}var p=l;if((0,a.default)(e[p])!==(0,a.default)(t[p]))return!1;if(Array.isArray(e[p])){if(!Array.isArray(t[p]))return!1;if(e[p].length!==t[p].length)return!1;for(var h=0;h=0)return!0}else if(i===e)return!0}return!1},r.isReferenced=function(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var r=t.params,n=Array.isArray(r),i=0;for(r=n?r:(0,o.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0},r.isValidIdentifier=function(e){return"string"==typeof e&&!l.default.keyword.isReservedWordES6(e,!0)&&"await"!==e&&l.default.keyword.isIdentifierNameES6(e)},r.isLet=function(e){return c.isVariableDeclaration(e)&&("var"!==e.kind||e[p.BLOCK_SCOPED_SYMBOL])},r.isBlockScoped=function(e){return c.isFunctionDeclaration(e)||c.isClassDeclaration(e)||c.isLet(e)},r.isVar=function(e){return c.isVariableDeclaration(e,{kind:"var"})&&!e[p.BLOCK_SCOPED_SYMBOL]},r.isSpecifierDefault=function(e){return c.isImportDefaultSpecifier(e)||c.isIdentifier(e.imported||e.exported,{name:"default"})},r.isScope=function(e,t){return(!c.isBlockStatement(e)||!c.isFunction(t,{body:e}))&&c.isScopable(e)},r.isImmutable=function(e){return!!c.isType(e.type,"Immutable")||!!c.isIdentifier(e)&&"undefined"===e.name},r.isNodesEquivalent=i;var u=e("./retrievers"),l=n(e("esutils")),c=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index")),p=e("./constants")},{"./constants":169,"./index":180,"./retrievers":182,"babel-runtime/core-js/get-iterator":120,"babel-runtime/core-js/object/keys":127,"babel-runtime/helpers/typeof":138,esutils:187}],184:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],185:[function(e,t,r){arguments[4][26][0].apply(r,arguments)},{dup:26}],186:[function(e,t,r){arguments[4][27][0].apply(r,arguments)},{"./code":185,dup:27}],187:[function(e,t,r){arguments[4][28][0].apply(r,arguments)},{"./ast":184,"./code":185,"./keyword":186,dup:28}],188:[function(e,t,r){"use strict";function n(e){return e=e.split(" "),function(t){return e.indexOf(t)>=0}}function i(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&g.test(String.fromCharCode(e)):i(e,v)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&b.test(String.fromCharCode(e)):i(e,v)||i(e,x))))}function o(e){return 10===e||13===e||8232===e||8233===e}function u(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function l(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function c(e){return e[e.length-1]}function p(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function h(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?h(e.object)+"."+h(e.property):void 0}Object.defineProperty(r,"__esModule",{value:!0});var f={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},d=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),m="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",y="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",g=new RegExp("["+m+"]"),b=new RegExp("["+m+y+"]");m=y=null;var v=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],x=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],E={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},S=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},C=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},_=!0,w=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};D(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},k=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return D(this,t),n.keyword=r,C(this,e.call(this,r,n))}return S(t,e),t}(w),F=function(e){function t(r,n){return D(this,t),C(this,e.call(this,r,{beforeExpr:_,binop:n}))}return S(t,e),t}(w),T={num:new w("num",{startsExpr:!0}),regexp:new w("regexp",{startsExpr:!0}),string:new w("string",{startsExpr:!0}),name:new w("name",{startsExpr:!0}),eof:new w("eof"),bracketL:new w("[",{beforeExpr:_,startsExpr:!0}),bracketR:new w("]"),braceL:new w("{",{beforeExpr:_,startsExpr:!0}),braceBarL:new w("{|",{beforeExpr:_,startsExpr:!0}),braceR:new w("}"),braceBarR:new w("|}"),parenL:new w("(",{beforeExpr:_,startsExpr:!0}),parenR:new w(")"),comma:new w(",",{beforeExpr:_}),semi:new w(";",{beforeExpr:_}),colon:new w(":",{beforeExpr:_}),doubleColon:new w("::",{beforeExpr:_}),dot:new w("."),question:new w("?",{beforeExpr:_}),arrow:new w("=>",{beforeExpr:_}),template:new w("template"),ellipsis:new w("...",{beforeExpr:_}),backQuote:new w("`",{startsExpr:!0}),dollarBraceL:new w("${",{beforeExpr:_,startsExpr:!0}),at:new w("@"),eq:new w("=",{beforeExpr:_,isAssign:!0}),assign:new w("_=",{beforeExpr:_,isAssign:!0}),incDec:new w("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new w("prefix",{beforeExpr:_,prefix:!0,startsExpr:!0}),logicalOR:new F("||",1),logicalAND:new F("&&",2),bitwiseOR:new F("|",3),bitwiseXOR:new F("^",4),bitwiseAND:new F("&",5),equality:new F("==/!=",6),relational:new F("",7),bitShift:new F("<>",8),plusMin:new w("+/-",{beforeExpr:_,binop:9,prefix:!0,startsExpr:!0}),modulo:new F("%",10),star:new F("*",10),slash:new F("/",10),exponent:new w("**",{beforeExpr:_,binop:11,rightAssociative:!0})},P={break:new k("break"),case:new k("case",{beforeExpr:_}),catch:new k("catch"),continue:new k("continue"),debugger:new k("debugger"),default:new k("default",{beforeExpr:_}),do:new k("do",{isLoop:!0,beforeExpr:_}),else:new k("else",{beforeExpr:_}),finally:new k("finally"),for:new k("for",{isLoop:!0}),function:new k("function",{startsExpr:!0}),if:new k("if"),return:new k("return",{beforeExpr:_}),switch:new k("switch"),throw:new k("throw",{beforeExpr:_}),try:new k("try"),var:new k("var"),let:new k("let"),const:new k("const"),while:new k("while",{isLoop:!0}),with:new k("with"),new:new k("new",{beforeExpr:_,startsExpr:!0}),this:new k("this",{startsExpr:!0}),super:new k("super",{startsExpr:!0}),class:new k("class"),extends:new k("extends",{beforeExpr:_}),export:new k("export"),import:new k("import",{startsExpr:!0}),yield:new k("yield",{beforeExpr:_,startsExpr:!0}),null:new k("null",{startsExpr:!0}),true:new k("true",{startsExpr:!0}),false:new k("false",{startsExpr:!0}),in:new k("in",{beforeExpr:_,binop:7}),instanceof:new k("instanceof",{beforeExpr:_,binop:7}),typeof:new k("typeof",{beforeExpr:_,prefix:!0,startsExpr:!0}),void:new k("void",{beforeExpr:_,prefix:!0,startsExpr:!0}),delete:new k("delete",{beforeExpr:_,prefix:!0,startsExpr:!0})};Object.keys(P).forEach(function(e){T["_"+e]=P[e]});var B=/\r\n?|\n|\u2028|\u2029/,O=new RegExp(B.source,"g"),N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,j=function e(t,r,n,i){D(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},I={braceStatement:new j("{",!1),braceExpression:new j("{",!0),templateQuasi:new j("${",!0),parenStatement:new j("(",!1),parenExpression:new j("(",!0),template:new j("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new j("function",!0)};T.parenR.updateContext=T.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===I.braceStatement&&this.curContext()===I.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===I.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},T.name.updateContext=function(e){this.state.exprAllowed=!1,e!==T._let&&e!==T._const&&e!==T._var||B.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},T.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?I.braceStatement:I.braceExpression),this.state.exprAllowed=!0},T.dollarBraceL.updateContext=function(){this.state.context.push(I.templateQuasi),this.state.exprAllowed=!0},T.parenL.updateContext=function(e){var t=e===T._if||e===T._for||e===T._with||e===T._while;this.state.context.push(t?I.parenStatement:I.parenExpression),this.state.exprAllowed=!0},T.incDec.updateContext=function(){},T._function.updateContext=function(){this.curContext()!==I.braceStatement&&this.state.context.push(I.functionExpression),this.state.exprAllowed=!1},T.backQuote.updateContext=function(){this.curContext()===I.template?this.state.context.pop():this.state.context.push(I.template),this.state.exprAllowed=!1};var L=function e(t,r){D(this,e),this.line=t,this.column=r},M=function e(t,r){D(this,e),this.start=t,this.end=r},R=function(){function e(){D(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=T.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[I.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new L(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),V={},U=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],q=function(e){function t(r,n){D(this,t),r=function(e){var t={};for(var r in E)t[r]=e&&r in e?e[r]:E[r];return t}(r);var i=C(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return S(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:f[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&U.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(V).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=V[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e})).unshift("estree");var r=e,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=V[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(function(){function e(t,r){D(this,e),this.state=new R,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new function e(t){D(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new M(t.startLoc,t.endLoc)}(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return d(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(T.num)||this.match(T.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(T.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);if(e<=55295||e>=57344)return e;return(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new M(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,O.lastIndex=t;for(var n=void 0;(n=O.exec(this.input))&&n.index8&&e<14||e>=5760&&N.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(T.ellipsis)):(++this.state.pos,this.finishToken(T.dot))},e.prototype.readToken_slash=function(){if(this.state.exprAllowed)return++this.state.pos,this.readRegexp();return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?T.star:T.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=T.exponent),61===n&&(r++,t=T.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?T.logicalOR:T.logicalAND,2):61===t?this.finishOp(T.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(T.braceBarR,2):this.finishOp(124===e?T.bitwiseOR:T.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.assign,2):this.finishOp(T.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&B.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(T.incDec,2):61===t?this.finishOp(T.assign,2):this.finishOp(T.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(T.assign,r+1):this.finishOp(T.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(T.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(T.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(T.arrow)):this.finishOp(61===e?T.eq:T.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(T.parenL);case 41:return++this.state.pos,this.finishToken(T.parenR);case 59:return++this.state.pos,this.finishToken(T.semi);case 44:return++this.state.pos,this.finishToken(T.comma);case 91:return++this.state.pos,this.finishToken(T.bracketL);case 93:return++this.state.pos,this.finishToken(T.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.braceBarL,2):(++this.state.pos,this.finishToken(T.braceL));case 125:return++this.state.pos,this.finishToken(T.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(T.doubleColon,2):(++this.state.pos,this.finishToken(T.colon));case 63:return++this.state.pos,this.finishToken(T.question);case 64:return++this.state.pos,this.finishToken(T.at);case 96:return++this.state.pos,this.finishToken(T.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(T.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+u(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(B.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(T.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(T.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.state.pos);46!==i||r||(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.state.pos))&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(T.num,o)},e.prototype.readCodePoint=function(e){var t=void 0;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(o(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(T.template)?36===n?(this.state.pos+=2,this.finishToken(T.dollarBraceL)):(++this.state.pos,this.finishToken(T.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(o(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:u(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":A(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var X=q.prototype;X.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,T.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var J={kind:"loop"},W={kind:"switch"};X.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},X.parseStatement=function(e,t){this.match(T.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case T._break:case T._continue:return this.parseBreakContinueStatement(n,r.keyword);case T._debugger:return this.parseDebuggerStatement(n);case T._do:return this.parseDoStatement(n);case T._for:return this.parseForStatement(n);case T._function:return e||this.unexpected(),this.parseFunctionStatement(n);case T._class:return e||this.unexpected(),this.parseClass(n,!0);case T._if:return this.parseIfStatement(n);case T._return:return this.parseReturnStatement(n);case T._switch:return this.parseSwitchStatement(n);case T._throw:return this.parseThrowStatement(n);case T._try:return this.parseTryStatement(n);case T._let:case T._const:e||this.unexpected();case T._var:return this.parseVarStatement(n,r);case T._while:return this.parseWhileStatement(n);case T._with:return this.parseWithStatement(n);case T.braceL:return this.parseBlock();case T.semi:return this.parseEmptyStatement(n);case T._export:case T._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===T.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: \"module\"'")),r===T._import?this.parseImport(n):this.parseExport(n);case T.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(T._function)&&!this.canInsertSemicolon())return this.expect(T._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===T.name&&"Identifier"===a.type&&this.eat(T.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},X.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},X.parseDecorators=function(e){for(;this.match(T.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(T._export)||this.match(T._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},X.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},X.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(T.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(T._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},X.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},X.parseBlock=function(e){var t=this.startNode();return this.expect(T.braceL),this.parseBlockBody(t,e,!1,T.braceR),this.finishNode(t,"BlockStatement")},X.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},X.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},X.parseFor=function(e,t){return e.init=t,this.expect(T.semi),e.test=this.match(T.semi)?null:this.parseExpression(),this.expect(T.semi),e.update=this.match(T.parenR)?null:this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},X.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(T._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(T.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},X.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(T.eq)?n.init=this.parseMaybeAssign(t):r!==T._const||this.match(T._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(T._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(T.comma))break}return e},X.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},X.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(T.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(T.name)||this.match(T._yield)||this.unexpected(),(this.match(T.name)||this.match(T._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},X.parseFunctionParams=function(e){this.expect(T.parenL),e.params=this.parseBindingList(T.parenR)},X.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},X.isClassProperty=function(){return this.match(T.eq)||this.match(T.semi)||this.match(T.braceR)},X.isClassMethod=function(){return this.match(T.parenL)},X.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},X.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(T.braceL);!this.eat(T.braceR);)if(this.eat(T.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(T.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(T.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(T.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(T.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(T.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(T.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(T.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},X.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(T.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},X.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},X.parseClassId=function(e,t,r){this.match(T.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},X.parseClassSuper=function(e){e.superClass=this.eat(T._extends)?this.parseExprSubscripts():null},X.parseExport=function(e){if(this.next(),this.match(T.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(T.comma)&&this.lookahead().type===T.star){this.expect(T.comma);var n=this.startNode();this.expect(T.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(T._default)){var i=this.startNode(),s=!1;return this.eat(T._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(T._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},X.parseExportDeclaration=function(){return this.parseStatement(!0)},X.isExportDefaultSpecifier=function(){if(this.match(T.name))return"async"!==this.state.value;if(!this.match(T._default))return!1;var e=this.lookahead();return e.type===T.comma||e.type===T.name&&"from"===e.value},X.parseExportSpecifiersMaybe=function(e){this.eat(T.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},X.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(T.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},X.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},X.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length){var n=e.specifiers,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type){var u=e.declaration.declarations,l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},X.checkDeclaration=function(e){if("ObjectPattern"===e.type){var t=e.properties,r=Array.isArray(t),n=0;for(t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.checkDeclaration(s)}}else if("ArrayPattern"===e.type){var a=e.elements,o=Array.isArray(a),u=0;for(a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},X.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},X.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},X.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;var n=this.match(T._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},X.parseImport=function(e){return this.eat(T._import),this.match(T.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(T.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},X.parseImportSpecifiers=function(e){var t=!0;if(this.match(T.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(T.comma))return}if(this.match(T.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(T.braceL);!this.eat(T.braceR);){if(t)t=!1;else if(this.eat(T.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(T.comma),this.eat(T.braceR))break;this.parseImportSpecifier(e)}},X.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},X.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var z=q.prototype;z.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";var n=e.properties,i=Array.isArray(n),s=0;for(n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},z.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":var c=e.elements,p=Array.isArray(c),h=0;for(c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var Y=q.prototype;Y.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},Y.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(T.eof)||this.unexpected(),e},Y.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(T.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(T.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},Y.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(T._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(T.parenL)||this.match(T.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(T.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},Y.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},Y.parseConditional=function(e,t,r,n){if(this.eat(T.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(T.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},Y.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},Y.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(T._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===T.logicalOR||o===T.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},Y.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(T.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==T.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},Y.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},Y.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(T.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(T.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(T.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(T.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(T.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(T.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(T.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},Y.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;this.match(T.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},Y.shouldParseAsyncArrow=function(){return this.match(T.arrow)},Y.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(T.arrow),this.parseArrowExpression(e,t.arguments,!0)},Y.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},Y.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case T._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(T.parenL)||this.match(T.bracketL)||this.match(T.dot)||this.unexpected(),this.match(T.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case T._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(T.parenL)||this.unexpected(null,T.parenL),this.finishNode(r,"Import");case T._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case T._yield:this.state.inGenerator&&this.unexpected();case T.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(T._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(T.name)){var a=[this.parseIdentifier()];return this.expect(T.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(T.arrow)?this.parseArrowExpression(r,[s]):s;case T._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case T.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case T.num:return this.parseLiteral(this.state.value,"NumericLiteral");case T.string:return this.parseLiteral(this.state.value,"StringLiteral");case T._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case T._true:case T._false:return r=this.startNode(),r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteral");case T.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case T.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(T.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case T.braceL:return this.parseObj(!1,e);case T._function:return this.parseFunctionExpression();case T.at:this.parseDecorators();case T._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case T._new:return this.parseNew();case T.backQuote:return this.parseTemplate(!1);case T.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},Y.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(T.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},Y.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},Y.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},Y.parseParenExpression=function(){this.expect(T.parenL);var e=this.parseExpression();return this.expect(T.parenR),e},Y.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(T.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(T.parenR);){if(l)l=!1;else if(this.expect(T.comma,u.start||null),this.match(T.parenR)){p=this.state.start;break}if(this.match(T.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),h,f));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(T.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){var g=a,b=Array.isArray(g),v=0;for(g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if((v=g.next()).done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?((n=this.startNodeAt(i,s)).expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},Y.shouldParseArrow=function(){return!this.canInsertSemicolon()},Y.parseArrow=function(e){if(this.eat(T.arrow))return e},Y.parseParenItem=function(e){return e},Y.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(T.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(T.parenL)?(e.arguments=this.parseExprList(T.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},Y.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(T.backQuote),this.finishNode(t,"TemplateElement")},Y.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(T.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(T.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},Y.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(T.braceR);){if(i)i=!1;else if(this.expect(T.comma),this.eat(T.braceR))break;for(;this.match(T.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(T.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(T.braceR))break;if(this.match(T.comma)&&this.lookahead().type===T.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(T.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(T.colon)||this.match(T.parenL)||this.match(T.braceR)||this.match(T.eq)||this.match(T.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(T.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},Y.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(T.string)||this.match(T.num)||this.match(T.bracketL)||this.match(T.name)||this.state.type.keyword)},Y.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},Y.parseObjectMethod=function(e,t,r,n){return r||t||this.match(T.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},Y.parseObjectProperty=function(e,t,r,n,i){return this.eat(T.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(T.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},Y.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},Y.parsePropertyName=function(e){if(this.eat(T.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(T.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},Y.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},Y.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(T.parenL),e.params=this.parseBindingList(T.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},Y.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},Y.isStrictBody=function(e,t){if(!t&&e.body.directives.length){var r=e.body.directives,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if("use strict"===s.value.value)return!0}}return!1},Y.parseFunctionBody=function(e,t){var r=t&&!this.match(T.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");var p=e.params,h=Array.isArray(p),f=0;for(p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},Y.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(T.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},Y.parseExprListItem=function(e,t,r){return e&&this.match(T.comma)?null:this.match(T.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},Y.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(T.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},Y.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(f.strict(e)||n&&f.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},Y.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(T.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},Y.parseYield=function(){var e=this.startNode();return this.next(),this.match(T.semi)||this.canInsertSemicolon()||!this.match(T.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(T.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var H=q.prototype,$=["leadingComments","trailingComments","innerComments"],Q=function(){function e(t,r,n){D(this,e),this.type="",this.start=t,this.end=0,this.loc=new M(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)$.indexOf(r)<0&&(t[r]=this[r]);return t},e}();H.startNode=function(){return new Q(this.state.start,this.state.startLoc,this.filename)},H.startNodeAt=function(e,t){return new Q(e,t,this.filename)},H.finishNode=function(e,t){return l.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},H.finishNodeAt=function(e,t,r,n){return l.call(this,e,t,r,n)};q.prototype.raise=function(e,t){var r=function(e,t){for(var r=1,n=0;;){O.lastIndex=n;var i=O.exec(e);if(!(i&&i.index0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=c(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&c(t).start>=e.start&&(r=t.pop());t.length>0&&c(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&this.state.leadingComments.length>0){var u=c(this.state.leadingComments);if("ObjectProperty"===r.type){if(u.start>=e.start&&this.state.commentPreviousNode){for(a=0;a0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}else if("CallExpression"===e.type&&e.arguments&&e.arguments.length){var l=c(e.arguments);l&&u.start>=l.start&&u.end<=e.end&&this.state.commentPreviousNode&&this.state.leadingComments.length>0&&(l.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}}if(n){if(n.leadingComments)if(n!==e&&c(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(c(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;se.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),0===(i=this.state.leadingComments.slice(s)).length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&c(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var ee=q.prototype;ee.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ee.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ee.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var te=["any","mixed","empty","bool","boolean","number","string","void","null"],re=q.prototype;re.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||T.colon);var r=this.flowParseType();return this.state.inType=t,r},re.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(T.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(T.parenL)?(e.expression=this.parseExpression(),this.expect(T.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},re.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(T.colon);var t=null,r=null;return this.match(T.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(T.modulo)&&(r=this.flowParsePredicate())),[t,r]},re.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},re.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(T.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(T.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},re.flowParseDeclare=function(e){return this.match(T._class)?this.flowParseDeclareClass(e):this.match(T._function)?this.flowParseDeclareFunction(e):this.match(T._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===T.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("opaque")?this.flowParseDeclareOpaqueType(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):this.match(T._export)?this.flowParseDeclareExportDeclaration(e):void this.unexpected()},re.flowParseDeclareExportDeclaration=function(e){if(this.expect(T._export),this.isContextual("opaque"))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");throw this.unexpected()},re.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},re.flowParseDeclareModule=function(e){this.next(),this.match(T.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(T.braceL);!this.match(T.braceR);){var n=this.startNode();if(this.match(T._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(T.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},re.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(T.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},re.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},re.flowParseDeclareOpaqueType=function(e){return this.next(),this.flowParseOpaqueType(e,!0),this.finishNode(e,"DeclareOpaqueType")},re.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},re.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(T._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(T.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},re.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},re.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},re.flowParseRestrictedIdentifier=function(e){return te.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},re.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(T.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},re.flowParseOpaqueType=function(e,t){return this.expectContextual("type"),e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(T.colon)&&(e.supertype=this.flowParseTypeInitialiser(T.colon)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(T.eq)),this.semicolon(),this.finishNode(e,"OpaqueType")},re.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(T.eq)&&(this.eat(T.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},re.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(T.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(T.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},re.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(T.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},re.flowParseObjectPropertyKey=function(){return this.match(T.num)||this.match(T.string)?this.parseExprAtom():this.parseIdentifier(!0)},re.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(T.bracketL),this.lookahead().type===T.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(T.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},re.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(T.parenL);!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(T.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},re.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},re.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},re.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(T.braceBarL)?(this.expect(T.braceBarL),u=T.braceBarR,l=!0):(this.expect(T.braceL),u=T.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,p=this.state.start,h=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==T.colon&&(this.next(),o=!0);var f=this.state.start,d=this.flowParseVariance();this.match(T.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,d)):this.match(T.parenL)||this.isRelational("<")?(d&&this.unexpected(f),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(T.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),d&&this.unexpected(d.start,"Spread properties cannot have variance"),this.expect(T.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(T.parenL)?(d&&this.unexpected(d.start),i.properties.push(this.flowParseObjectTypeMethod(p,h,o,a))):(this.eat(T.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=d,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},re.flowObjectTypeSemicolon=function(){this.eat(T.semi)||this.eat(T.comma)||this.match(T.braceR)||this.match(T.braceBarR)||this.unexpected()},re.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(T.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},re.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},re.flowParseTypeofType=function(){var e=this.startNode();return this.expect(T._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},re.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(T.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],rest:null};!this.match(T.parenR)&&!this.match(T.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(T.parenR)||this.expect(T.comma);return this.eat(T.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},re.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},re.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case T.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case T.braceL:return this.flowParseObjectType(!1,!1,!0);case T.braceBarL:return this.flowParseObjectType(!1,!0,!0);case T.bracketL:return this.flowParseTupleType();case T.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(T.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case T.parenL:if(this.next(),!this.match(T.parenR)&&!this.match(T.ellipsis))if(this.match(T.name)){var o=this.lookahead().type;s=o!==T.question&&o!==T.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(T.comma)||this.match(T.parenR)&&this.lookahead().type===T.arrow))return this.expect(T.parenR),i;this.eat(T.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(T.parenR),this.expect(T.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case T.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case T._true:case T._false:return r.value=this.match(T._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case T.plusMin:if("-"===this.state.value)return this.next(),this.match(T.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case T.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case T._null:return r.value=this.match(T._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case T._this:return r.value=this.match(T._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case T.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},re.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(T.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(T.bracketL),this.expect(T.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},re.flowParsePrefixType=function(){var e=this.startNode();return this.eat(T.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},re.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(T.arrow)){var t=this.startNodeAt(e.start,e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},re.flowParseIntersectionType=function(){var e=this.startNode();this.eat(T.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(T.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},re.flowParseUnionType=function(){var e=this.startNode();this.eat(T.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(T.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},re.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},re.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},re.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(T.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},re.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},re.flowParseVariance=function(){var e=null;return this.match(T.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ne=String.fromCodePoint;if(!ne){var ie=String.fromCharCode,se=Math.floor;ne=function(){var e=[],t=void 0,r=void 0,n=-1,i=arguments.length;if(!i)return"";for(var s="";++n1114111||se(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(t=55296+((a-=65536)>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=ie.apply(null,e),e.length=0)}return s}}var ae=ne,oe={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ue=/^[\da-fA-F]+$/,le=/^\d+$/;I.j_oTag=new j("...",!0,!0),T.jsxName=new w("jsxName"),T.jsxText=new w("jsxText",{beforeExpr:!0}),T.jsxTagStart=new w("jsxTagStart",{startsExpr:!0}),T.jsxTagEnd=new w("jsxTagEnd"),T.jsxTagStart.updateContext=function(){this.state.context.push(I.j_expr),this.state.context.push(I.j_oTag),this.state.exprAllowed=!1},T.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===I.j_oTag&&e===T.slash||t===I.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===I.j_expr):this.state.exprAllowed=!0};var ce=q.prototype;ce.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(T.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(T.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:o(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ce.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ce.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):o(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(T.string,t)},ce.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(T.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ce.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};V.estree=function(e){e.extend("checkDeclaration",function(e){return function(t){p(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o0){var r=e.body.body,n=Array.isArray(r),i=0;for(r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("stmtToDirective",function(e){return function(t){var r=e.call(this,t),n=t.expression.value;return r.value.value=n,r}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?n-1:0),s=1;s2?n-2:0),s=2;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},V.flow=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(T.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(T.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(T._class)||this.match(T.name)||this.match(T._function)||this.match(T._var)||this.match(T._export))return this.flowParseDeclare(t)}else if(this.match(T.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t);if("opaque"===r.name)return this.flowParseOpaqueType(t,!1)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||this.isContextual("opaque")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(T.name)||"type"!==this.state.value&&"interface"!==this.state.value&&"opaque"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(T.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(T.question)&&(t.optional=!0),this.match(T.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return"ExportNamedDeclaration"===(t=e.call(this,t)).type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(T.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("opaque")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseOpaqueType(n,!1)}if(this.isContextual("interface")){t.exportKind="type";var i=this.startNode();return this.next(),this.flowParseInterface(i)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(T.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i2?n-2:0),s=2;s=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:((i=n.pop())=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],190:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return a[e>>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}function s(e,t,r){for(var n,s=[],a=t;a0?l-4:l;var c=0;for(t=0;t>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===s?(i=o[e.charCodeAt(t)]<<2|o[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===s&&(i=o[e.charCodeAt(t)]<<10|o[e.charCodeAt(t+1)]<<4|o[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,i="",o=[],u=0,l=r-n;ul?l:u+16383));return 1===n?(t=e[r-1],i+=a[t>>2],i+=a[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=a[t>>10],i+=a[t>>4&63],i+=a[t<<2&63],i+="="),o.push(i),o.join("")};for(var a=[],o=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,p=l.length;c=t}function c(e,t){var r=[],i=h("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var f=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),y=f||d,g=i.body.indexOf(",")>=0;if(!y&&!g)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+m+i.post,c(e)):[e];var b;if(y)b=i.body.split(/\.\./);else if(1===(b=s(i.body)).length&&1===(b=c(b[0],!1).map(a)).length){return(E=i.post.length?c(i.post,!1):[""]).map(function(e){return i.pre+b[0]+e})}var v,x=i.pre,E=i.post.length?c(i.post,!1):[""];if(y){var A=n(b[0]),D=n(b[1]),S=Math.max(b[0].length,b[1].length),C=3==b.length?Math.abs(n(b[2])):1,_=u;D0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}v.push(F)}}else v=p(b,function(e){return c(e,!1)});for(var B=0;Bj)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return o(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return T(e)?function(e,t,r){if(t<0||e.byteLength=j)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j.toString(16)+" bytes");return 0|e}function c(e,t){if(i.isBuffer(e))return e.length;if(P(e)||T(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return w(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return k(e).length;default:if(n)return w(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,B(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:d(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):d(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function d(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;lo&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;hi&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function E(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nr)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function S(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,4),N.write(e,t,r,n,23,4),r+4}function _(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,0,r,8),N.write(e,t,r,n,52,8),r+8}function w(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function k(e){return O.toByteArray(function(e){if((e=e.trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function F(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function T(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function P(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function B(e){return e!=e}var O=e("base64-js"),N=e("ieee754");r.Buffer=i,r.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},r.INSPECT_MAX_BYTES=50;var j=2147483647;r.kMaxLength=j,(i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}(e,t,r)},i.allocUnsafe=function(e){return o(e)},i.allocUnsafeSlow=function(e){return o(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return g(this,e,t,r);case"latin1":case"binary":return b(this,e,t,r);case"base64":return v(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||A(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=this[e],i=1,s=0;++s=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||A(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||A(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||A(e,4,this.length),N.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||A(e,8,this.length),N.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){D(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return _(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return _(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;ac;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-absolute-index":275,"./_to-iobject":277,"./_to-length":278}],216:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":218,"./_ctx":226,"./_iobject":240,"./_to-length":278,"./_to-object":279}],217:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":242,"./_is-object":243,"./_wks":285}],218:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":217}],219:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}());t.exports=function(e){var t,r,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?r:s?n(t):"Object"==(a=n(t))&&"function"==typeof t.callee?"Arguments":a}},{"./_cof":220,"./_wks":285}],220:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],221:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_iter-define"),c=e("./_iter-step"),p=e("./_set-species"),h=e("./_descriptors"),f=e("./_meta").fastKey,d=e("./_validate-collection"),m=h?"_s":"size",y=function(e,t){var r,n=f(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,l){var c=e(function(e,n){o(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&u(n,r,e[l],e)});return s(c.prototype,{clear:function(){for(var e=d(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=d(this,t),n=y(r,e);if(n){var i=n.n,s=n.p;delete r._i[n.i],n.r=!0,s&&(s.n=i),i&&(i.p=s),r._f==n&&(r._f=i),r._l==n&&(r._l=s),r[m]--}return!!n},forEach:function(e){d(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!y(d(this,t),e)}}),h&&n(c.prototype,"size",{get:function(){return d(this,t)[m]}}),c},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=f(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){l(e,t,function(e,r){this._t=d(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))},r?"entries":"values",!r,!0),p(t)}}},{"./_an-instance":212,"./_ctx":226,"./_descriptors":228,"./_for-of":234,"./_iter-define":246,"./_iter-step":247,"./_meta":250,"./_object-create":252,"./_object-dp":253,"./_redefine-all":265,"./_set-species":270,"./_validate-collection":282}],222:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":214,"./_classof":219}],223:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=e("./_validate-collection"),h=l(5),f=l(6),d=0,m=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return h(e.a,function(e){return e[0]===t})};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var r=g(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._t=t,e._i=d++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).delete(e):r&&c(r,this._i)&&delete r[this._i]},has:function(e){if(!a(e))return!1;var r=i(e);return!0===r?m(p(this,t)).has(e):r&&c(r,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?m(e).set(t,r):n[e._i]=r,e},ufstore:m}},{"./_an-instance":212,"./_an-object":213,"./_array-methods":216,"./_for-of":234,"./_has":236,"./_is-object":243,"./_meta":250,"./_redefine-all":265,"./_validate-collection":282}],224:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),b||f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":212,"./_array-methods":216,"./_descriptors":228,"./_export":232,"./_fails":233,"./_for-of":234,"./_global":235,"./_hide":237,"./_is-object":243,"./_meta":250,"./_object-dp":253,"./_redefine-all":265,"./_set-to-string-tag":271}],225:[function(e,t,r){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},{}],226:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":210}],227:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],228:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":233}],229:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":235,"./_is-object":243}],230:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],231:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":258,"./_object-keys":261,"./_object-pie":262}],232:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o="prototype",u=function(e,t,r){var l,c,p,h=e&u.F,f=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,g=e&u.W,b=f?i:i[t]||(i[t]={}),v=b[o],x=f?n:d?n[t]:(n[t]||{})[o];f&&(r=t);for(l in r)(c=!h&&x&&void 0!==x[l])&&l in b||(p=c?x[l]:r[l],b[l]=f&&"function"!=typeof x[l]?r[l]:y&&c?s(p,n):g&&x[l]==p?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t[o]=e[o],t}(p):m&&"function"==typeof p?s(Function.call,p):p,m&&((b.virtual||(b.virtual={}))[l]=p,e&u.R&&v&&!v[l]&&a(v,l,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{"./_core":225,"./_ctx":226,"./_global":235,"./_hide":237}],233:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],234:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={};(r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y}).BREAK=l,r.RETURN=c},{"./_an-object":213,"./_ctx":226,"./_is-array-iter":241,"./_iter-call":244,"./_to-length":278,"./core.get-iterator-method":286}],235:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],236:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],237:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":228,"./_object-dp":253,"./_property-desc":264}],238:[function(e,t,r){var n=e("./_global").document;t.exports=n&&n.documentElement},{"./_global":235}],239:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":228,"./_dom-create":229,"./_fails":233}],240:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":220}],241:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":248,"./_wks":285}],242:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":220}],243:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],244:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":213}],245:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":237,"./_object-create":252,"./_property-desc":264,"./_set-to-string-tag":271,"./_wks":285}],246:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",S="values"==y,C=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=!f&&w||A(y),F=y?S?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&E.next&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),S&&w&&"values"!==w.name&&(C=!0,k=function(){return w.call(this)}),n&&!b||!f&&!C&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:S?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||C),t,v);return v}},{"./_export":232,"./_has":236,"./_hide":237,"./_iter-create":245,"./_iterators":248,"./_library":249,"./_object-gpo":259,"./_redefine":266,"./_set-to-string-tag":271,"./_wks":285}],247:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],248:[function(e,t,r){t.exports={}},{}],249:[function(e,t,r){t.exports=!0},{}],250:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=t.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},getWeak:function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},onFreeze:function(e){return l&&p.NEED&&u(e)&&!s(e,n)&&c(e),e}}},{"./_fails":233,"./_has":236,"./_is-object":243,"./_object-dp":253,"./_uid":281}],251:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":233,"./_iobject":240,"./_object-gops":258,"./_object-keys":261,"./_object-pie":262,"./_to-object":279}],252:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write(" + +``` + +## Documentation + +### Collections + +* [`each`](#each) +* [`eachSeries`](#eachSeries) +* [`eachLimit`](#eachLimit) +* [`forEachOf`](#forEachOf) +* [`forEachOfSeries`](#forEachOfSeries) +* [`forEachOfLimit`](#forEachOfLimit) +* [`map`](#map) +* [`mapSeries`](#mapSeries) +* [`mapLimit`](#mapLimit) +* [`filter`](#filter) +* [`filterSeries`](#filterSeries) +* [`reject`](#reject) +* [`rejectSeries`](#rejectSeries) +* [`reduce`](#reduce) +* [`reduceRight`](#reduceRight) +* [`detect`](#detect) +* [`detectSeries`](#detectSeries) +* [`sortBy`](#sortBy) +* [`some`](#some) +* [`every`](#every) +* [`concat`](#concat) +* [`concatSeries`](#concatSeries) + +### Control Flow + +* [`series`](#seriestasks-callback) +* [`parallel`](#parallel) +* [`parallelLimit`](#parallellimittasks-limit-callback) +* [`whilst`](#whilst) +* [`doWhilst`](#doWhilst) +* [`until`](#until) +* [`doUntil`](#doUntil) +* [`forever`](#forever) +* [`waterfall`](#waterfall) +* [`compose`](#compose) +* [`seq`](#seq) +* [`applyEach`](#applyEach) +* [`applyEachSeries`](#applyEachSeries) +* [`queue`](#queue) +* [`priorityQueue`](#priorityQueue) +* [`cargo`](#cargo) +* [`auto`](#auto) +* [`retry`](#retry) +* [`iterator`](#iterator) +* [`apply`](#apply) +* [`nextTick`](#nextTick) +* [`times`](#times) +* [`timesSeries`](#timesSeries) + +### Utils + +* [`memoize`](#memoize) +* [`unmemoize`](#unmemoize) +* [`log`](#log) +* [`dir`](#dir) +* [`noConflict`](#noConflict) + + +## Collections + + + +### each(arr, iterator, callback) + +Applies the function `iterator` to each item in `arr`, in parallel. +The `iterator` is called with an item from the list, and a callback for when it +has finished. If the `iterator` passes an error to its `callback`, the main +`callback` (for the `each` function) is immediately called with the error. + +Note, that since this function applies `iterator` to each item in parallel, +there is no guarantee that the iterator functions will complete in order. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occurred, the `callback` should be run without + arguments or with an explicit `null` argument. The array index is not passed + to the iterator. If you need the index, use [`forEachOf`](#forEachOf). +* `callback(err)` - A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Examples__ + + +```js +// assuming openFiles is an array of file names and saveFile is a function +// to save the modified contents of that file: + +async.each(openFiles, saveFile, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +```js +// assuming openFiles is an array of file names + +async.each(openFiles, function(file, callback) { + + // Perform operation on file here. + console.log('Processing file ' + file); + + if( file.length > 32 ) { + console.log('This file name is too long'); + callback('File name too long'); + } else { + // Do work to process file here + console.log('File processed'); + callback(); + } +}, function(err){ + // if any of the file processing produced an error, err would equal that error + if( err ) { + // One of the iterations produced an error. + // All processing will now stop. + console.log('A file failed to process'); + } else { + console.log('All files have been processed successfully'); + } +}); +``` + +--------------------------------------- + + + +### eachSeries(arr, iterator, callback) + +The same as [`each`](#each), only `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +This means the `iterator` functions will complete in order. + + +--------------------------------------- + + + +### eachLimit(arr, limit, iterator, callback) + +The same as [`each`](#each), only no more than `limit` `iterator`s will be simultaneously +running at any time. + +Note that the items in `arr` are not processed in batches, so there is no guarantee that +the first `limit` `iterator` functions will complete before any others are started. + +__Arguments__ + +* `arr` - An array to iterate over. +* `limit` - The maximum number of `iterator`s to run at any time. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err)` which must be called once it has + completed. If no error has occurred, the callback should be run without + arguments or with an explicit `null` argument. +* `callback(err)` - A callback which is called when all `iterator` functions + have finished, or an error occurs. + +__Example__ + +```js +// Assume documents is an array of JSON objects and requestApi is a +// function that interacts with a rate-limited REST api. + +async.eachLimit(documents, 20, requestApi, function(err){ + // if any of the saves produced an error, err would equal that error +}); +``` + +--------------------------------------- + + + + +### forEachOf(obj, iterator, callback) + +Like `each`, except that it iterates over objects, and passes the key as the second argument to the iterator. + +__Arguments__ + +* `obj` - An object or array to iterate over. +* `iterator(item, key, callback)` - A function to apply to each item in `obj`. +The `key` is the item's key, or index in the case of an array. The iterator is +passed a `callback(err)` which must be called once it has completed. If no +error has occurred, the callback should be run without arguments or with an +explicit `null` argument. +* `callback(err)` - A callback which is called when all `iterator` functions have finished, or an error occurs. + +__Example__ + +```js +var obj = {dev: "/dev.json", test: "/test.json", prod: "/prod.json"}; +var configs = {}; + +async.forEachOf(obj, function (value, key, callback) { + fs.readFile(__dirname + value, "utf8", function (err, data) { + if (err) return callback(err); + try { + configs[key] = JSON.parse(data); + } catch (e) { + return callback(e); + } + callback(); + }) +}, function (err) { + if (err) console.error(err.message); + // configs is now a map of JSON data + doSomethingWith(configs); +}) +``` + +--------------------------------------- + + + + +### forEachOfSeries(obj, iterator, callback) + +Like [`forEachOf`](#forEachOf), except only one `iterator` is run at a time. The order of execution is not guaranteed for objects, but it will be guaranteed for arrays. + +--------------------------------------- + + + + +### forEachOfLimit(obj, limit, iterator, callback) + +Like [`forEachOf`](#forEachOf), except the number of `iterator`s running at a given time is controlled by `limit`. + + +--------------------------------------- + + +### map(arr, iterator, callback) + +Produces a new array of values by mapping each value in `arr` through +the `iterator` function. The `iterator` is called with an item from `arr` and a +callback for when it has finished processing. Each of these callback takes 2 arguments: +an `error`, and the transformed item from `arr`. If `iterator` passes an error to its +callback, the main `callback` (for the `map` function) is immediately called with the error. + +Note, that since this function applies the `iterator` to each item in parallel, +there is no guarantee that the `iterator` functions will complete in order. +However, the results array will be in the same order as the original `arr`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - A callback which is called when all `iterator` + functions have finished, or an error occurs. Results is an array of the + transformed items from the `arr`. + +__Example__ + +```js +async.map(['file1','file2','file3'], fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + +### mapSeries(arr, iterator, callback) + +The same as [`map`](#map), only the `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. + + +--------------------------------------- + + +### mapLimit(arr, limit, iterator, callback) + +The same as [`map`](#map), only no more than `limit` `iterator`s will be simultaneously +running at any time. + +Note that the items are not processed in batches, so there is no guarantee that +the first `limit` `iterator` functions will complete before any others are started. + +__Arguments__ + +* `arr` - An array to iterate over. +* `limit` - The maximum number of `iterator`s to run at any time. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, transformed)` which must be called once + it has completed with an error (which can be `null`) and a transformed item. +* `callback(err, results)` - A callback which is called when all `iterator` + calls have finished, or an error occurs. The result is an array of the + transformed items from the original `arr`. + +__Example__ + +```js +async.mapLimit(['file1','file2','file3'], 1, fs.stat, function(err, results){ + // results is now an array of stats for each file +}); +``` + +--------------------------------------- + + + +### filter(arr, iterator, callback) + +__Alias:__ `select` + +Returns a new array of all the values in `arr` which pass an async truth test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. This operation is +performed in parallel, but the results array will be in the same order as the +original. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The `iterator` is passed a `callback(truthValue)`, which must be called with a + boolean argument once it has completed. +* `callback(results)` - A callback which is called after all the `iterator` + functions have finished. + +__Example__ + +```js +async.filter(['file1','file2','file3'], fs.exists, function(results){ + // results now equals an array of the existing files +}); +``` + +--------------------------------------- + + + +### filterSeries(arr, iterator, callback) + +__Alias:__ `selectSeries` + +The same as [`filter`](#filter) only the `iterator` is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. + +--------------------------------------- + + +### reject(arr, iterator, callback) + +The opposite of [`filter`](#filter). Removes values that pass an `async` truth test. + +--------------------------------------- + + +### rejectSeries(arr, iterator, callback) + +The same as [`reject`](#reject), only the `iterator` is applied to each item in `arr` +in series. + + +--------------------------------------- + + +### reduce(arr, memo, iterator, callback) + +__Aliases:__ `inject`, `foldl` + +Reduces `arr` into a single value using an async `iterator` to return +each successive step. `memo` is the initial state of the reduction. +This function only operates in series. + +For performance reasons, it may make sense to split a call to this function into +a parallel map, and then use the normal `Array.prototype.reduce` on the results. +This function is for situations where each step in the reduction needs to be async; +if you can get the data before reducing it, then it's probably a good idea to do so. + +__Arguments__ + +* `arr` - An array to iterate over. +* `memo` - The initial state of the reduction. +* `iterator(memo, item, callback)` - A function applied to each item in the + array to produce the next step in the reduction. The `iterator` is passed a + `callback(err, reduction)` which accepts an optional error as its first + argument, and the state of the reduction as the second. If an error is + passed to the callback, the reduction is stopped and the main `callback` is + immediately called with the error. +* `callback(err, result)` - A callback which is called after all the `iterator` + functions have finished. Result is the reduced value. + +__Example__ + +```js +async.reduce([1,2,3], 0, function(memo, item, callback){ + // pointless async: + process.nextTick(function(){ + callback(null, memo + item) + }); +}, function(err, result){ + // result is now equal to the last value of memo, which is 6 +}); +``` + +--------------------------------------- + + +### reduceRight(arr, memo, iterator, callback) + +__Alias:__ `foldr` + +Same as [`reduce`](#reduce), only operates on `arr` in reverse order. + + +--------------------------------------- + + +### detect(arr, iterator, callback) + +Returns the first value in `arr` that passes an async truth test. The +`iterator` is applied in parallel, meaning the first iterator to return `true` will +fire the detect `callback` with that result. That means the result might not be +the first item in the original `arr` (in terms of order) that passes the test. + +If order within the original `arr` is important, then look at [`detectSeries`](#detectSeries). + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in `arr`. + The iterator is passed a `callback(truthValue)` which must be called with a + boolean argument once it has completed. +* `callback(result)` - A callback which is called as soon as any iterator returns + `true`, or after all the `iterator` functions have finished. Result will be + the first item in the array that passes the truth test (iterator) or the + value `undefined` if none passed. + +__Example__ + +```js +async.detect(['file1','file2','file3'], fs.exists, function(result){ + // result now equals the first file in the list that exists +}); +``` + +--------------------------------------- + + +### detectSeries(arr, iterator, callback) + +The same as [`detect`](#detect), only the `iterator` is applied to each item in `arr` +in series. This means the result is always the first in the original `arr` (in +terms of array order) that passes the truth test. + + +--------------------------------------- + + +### sortBy(arr, iterator, callback) + +Sorts a list by the results of running each `arr` value through an async `iterator`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, sortValue)` which must be called once it + has completed with an error (which can be `null`) and a value to use as the sort + criteria. +* `callback(err, results)` - A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is the items from + the original `arr` sorted by the values returned by the `iterator` calls. + +__Example__ + +```js +async.sortBy(['file1','file2','file3'], function(file, callback){ + fs.stat(file, function(err, stats){ + callback(err, stats.mtime); + }); +}, function(err, results){ + // results is now the original array of files sorted by + // modified date +}); +``` + +__Sort Order__ + +By modifying the callback parameter the sorting order can be influenced: + +```js +//ascending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x); +}, function(err,result){ + //result callback +} ); + +//descending order +async.sortBy([1,9,3,5], function(x, callback){ + callback(null, x*-1); //<- x*-1 instead of x, turns the order around +}, function(err,result){ + //result callback +} ); +``` + +--------------------------------------- + + +### some(arr, iterator, callback) + +__Alias:__ `any` + +Returns `true` if at least one element in the `arr` satisfies an async test. +_The callback for each iterator call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. Once any iterator +call returns `true`, the main `callback` is immediately called. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a callback(truthValue) which must be + called with a boolean argument once it has completed. +* `callback(result)` - A callback which is called as soon as any iterator returns + `true`, or after all the iterator functions have finished. Result will be + either `true` or `false` depending on the values of the async tests. + +__Example__ + +```js +async.some(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then at least one of the files exists +}); +``` + +--------------------------------------- + + +### every(arr, iterator, callback) + +__Alias:__ `all` + +Returns `true` if every element in `arr` satisfies an async test. +_The callback for each `iterator` call only accepts a single argument of `true` or +`false`; it does not accept an error argument first!_ This is in-line with the +way node libraries work with truth tests like `fs.exists`. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A truth test to apply to each item in the array + in parallel. The iterator is passed a callback(truthValue) which must be + called with a boolean argument once it has completed. +* `callback(result)` - A callback which is called after all the `iterator` + functions have finished. Result will be either `true` or `false` depending on + the values of the async tests. + +__Example__ + +```js +async.every(['file1','file2','file3'], fs.exists, function(result){ + // if result is true then every file exists +}); +``` + +--------------------------------------- + + +### concat(arr, iterator, callback) + +Applies `iterator` to each item in `arr`, concatenating the results. Returns the +concatenated list. The `iterator`s are called in parallel, and the results are +concatenated as they return. There is no guarantee that the results array will +be returned in the original order of `arr` passed to the `iterator` function. + +__Arguments__ + +* `arr` - An array to iterate over. +* `iterator(item, callback)` - A function to apply to each item in `arr`. + The iterator is passed a `callback(err, results)` which must be called once it + has completed with an error (which can be `null`) and an array of results. +* `callback(err, results)` - A callback which is called after all the `iterator` + functions have finished, or an error occurs. Results is an array containing + the concatenated results of the `iterator` function. + +__Example__ + +```js +async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ + // files is now a list of filenames that exist in the 3 directories +}); +``` + +--------------------------------------- + + +### concatSeries(arr, iterator, callback) + +Same as [`concat`](#concat), but executes in series instead of parallel. + + +## Control Flow + + +### series(tasks, [callback]) + +Run the functions in the `tasks` array in series, each one running once the previous +function has completed. If any functions in the series pass an error to its +callback, no more functions are run, and `callback` is immediately called with the value of the error. +Otherwise, `callback` receives an array of results when `tasks` have completed. + +It is also possible to use an object instead of an array. Each property will be +run as a function, and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`series`](#series). + +**Note** that while many implementations preserve the order of object properties, the +[ECMAScript Language Specifcation](http://www.ecma-international.org/ecma-262/5.1/#sec-8.6) +explicitly states that + +> The mechanics and order of enumerating the properties is not specified. + +So if you rely on the order in which your series of functions are executed, and want +this to work on all platforms, consider using an array. + +__Arguments__ + +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the `task` callbacks. + +__Example__ + +```js +async.series([ + function(callback){ + // do some stuff ... + callback(null, 'one'); + }, + function(callback){ + // do some more stuff ... + callback(null, 'two'); + } +], +// optional callback +function(err, results){ + // results is now equal to ['one', 'two'] +}); + + +// an example using an object instead of an array +async.series({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equal to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallel(tasks, [callback]) + +Run the `tasks` array of functions in parallel, without waiting until the previous +function has completed. If any of the functions pass an error to its +callback, the main `callback` is immediately called with the value of the error. +Once the `tasks` have completed, the results are passed to the final `callback` as an +array. + +It is also possible to use an object instead of an array. Each property will be +run as a function and the results will be passed to the final `callback` as an object +instead of an array. This can be a more readable way of handling results from +[`parallel`](#parallel). + + +__Arguments__ + +* `tasks` - An array or object containing functions to run. Each function is passed + a `callback(err, result)` which it must call on completion with an error `err` + (which can be `null`) and an optional `result` value. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the task callbacks. + +__Example__ + +```js +async.parallel([ + function(callback){ + setTimeout(function(){ + callback(null, 'one'); + }, 200); + }, + function(callback){ + setTimeout(function(){ + callback(null, 'two'); + }, 100); + } +], +// optional callback +function(err, results){ + // the results array will equal ['one','two'] even though + // the second function had a shorter timeout. +}); + + +// an example using an object instead of an array +async.parallel({ + one: function(callback){ + setTimeout(function(){ + callback(null, 1); + }, 200); + }, + two: function(callback){ + setTimeout(function(){ + callback(null, 2); + }, 100); + } +}, +function(err, results) { + // results is now equals to: {one: 1, two: 2} +}); +``` + +--------------------------------------- + + +### parallelLimit(tasks, limit, [callback]) + +The same as [`parallel`](#parallel), only `tasks` are executed in parallel +with a maximum of `limit` tasks executing at any time. + +Note that the `tasks` are not executed in batches, so there is no guarantee that +the first `limit` tasks will complete before any others are started. + +__Arguments__ + +* `tasks` - An array or object containing functions to run, each function is passed + a `callback(err, result)` it must call on completion with an error `err` (which can + be `null`) and an optional `result` value. +* `limit` - The maximum number of `tasks` to run at any time. +* `callback(err, results)` - An optional callback to run once all the functions + have completed. This function gets a results array (or object) containing all + the result arguments passed to the `task` callbacks. + +--------------------------------------- + + +### whilst(test, fn, callback) + +Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when stopped, +or an error occurs. + +__Arguments__ + +* `test()` - synchronous truth test to perform before each execution of `fn`. +* `fn(callback)` - A function which is called each time `test` passes. The function is + passed a `callback(err)`, which must be called once it has completed with an + optional `err` argument. +* `callback(err)` - A callback which is called after the test fails and repeated + execution of `fn` has stopped. + +__Example__ + +```js +var count = 0; + +async.whilst( + function () { return count < 5; }, + function (callback) { + count++; + setTimeout(callback, 1000); + }, + function (err) { + // 5 seconds have passed + } +); +``` + +--------------------------------------- + + +### doWhilst(fn, test, callback) + +The post-check version of [`whilst`](#whilst). To reflect the difference in +the order of operations, the arguments `test` and `fn` are switched. + +`doWhilst` is to `whilst` as `do while` is to `while` in plain JavaScript. + +--------------------------------------- + + +### until(test, fn, callback) + +Repeatedly call `fn` until `test` returns `true`. Calls `callback` when stopped, +or an error occurs. + +The inverse of [`whilst`](#whilst). + +--------------------------------------- + + +### doUntil(fn, test, callback) + +Like [`doWhilst`](#doWhilst), except the `test` is inverted. Note the argument ordering differs from `until`. + +--------------------------------------- + + +### forever(fn, errback) + +Calls the asynchronous function `fn` with a callback parameter that allows it to +call itself again, in series, indefinitely. + +If an error is passed to the callback then `errback` is called with the +error, and execution stops, otherwise it will never be called. + +```js +async.forever( + function(next) { + // next is suitable for passing to things that need a callback(err [, whatever]); + // it will result in this function being called again. + }, + function(err) { + // if next is called with a value in its first parameter, it will appear + // in here as 'err', and execution will stop. + } +); +``` + +--------------------------------------- + + +### waterfall(tasks, [callback]) + +Runs the `tasks` array of functions in series, each passing their results to the next in +the array. However, if any of the `tasks` pass an error to their own callback, the +next function is not executed, and the main `callback` is immediately called with +the error. + +__Arguments__ + +* `tasks` - An array of functions to run, each function is passed a + `callback(err, result1, result2, ...)` it must call on completion. The first + argument is an error (which can be `null`) and any further arguments will be + passed as arguments in order to the next task. +* `callback(err, [results])` - An optional callback to run once all the functions + have completed. This will be passed the results of the last task's callback. + + + +__Example__ + +```js +async.waterfall([ + function(callback) { + callback(null, 'one', 'two'); + }, + function(arg1, arg2, callback) { + // arg1 now equals 'one' and arg2 now equals 'two' + callback(null, 'three'); + }, + function(arg1, callback) { + // arg1 now equals 'three' + callback(null, 'done'); + } +], function (err, result) { + // result now equals 'done' +}); +``` + +--------------------------------------- + +### compose(fn1, fn2...) + +Creates a function which is a composition of the passed asynchronous +functions. Each function consumes the return value of the function that +follows. Composing functions `f()`, `g()`, and `h()` would produce the result of +`f(g(h()))`, only this version uses callbacks to obtain the return values. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* `functions...` - the asynchronous functions to compose + + +__Example__ + +```js +function add1(n, callback) { + setTimeout(function () { + callback(null, n + 1); + }, 10); +} + +function mul3(n, callback) { + setTimeout(function () { + callback(null, n * 3); + }, 10); +} + +var add1mul3 = async.compose(mul3, add1); + +add1mul3(4, function (err, result) { + // result now equals 15 +}); +``` + +--------------------------------------- + +### seq(fn1, fn2...) + +Version of the compose function that is more natural to read. +Each function consumes the return value of the previous function. +It is the equivalent of [`compose`](#compose) with the arguments reversed. + +Each function is executed with the `this` binding of the composed function. + +__Arguments__ + +* functions... - the asynchronous functions to compose + + +__Example__ + +```js +// Requires lodash (or underscore), express3 and dresende's orm2. +// Part of an app, that fetches cats of the logged user. +// This example uses `seq` function to avoid overnesting and error +// handling clutter. +app.get('/cats', function(request, response) { + var User = request.models.User; + async.seq( + _.bind(User.get, User), // 'User.get' has signature (id, callback(err, data)) + function(user, fn) { + user.getCats(fn); // 'getCats' has signature (callback(err, data)) + } + )(req.session.user_id, function (err, cats) { + if (err) { + console.error(err); + response.json({ status: 'error', message: err.message }); + } else { + response.json({ status: 'ok', message: 'Cats found', data: cats }); + } + }); +}); +``` + +--------------------------------------- + +### applyEach(fns, args..., callback) + +Applies the provided arguments to each function in the array, calling +`callback` after all functions have completed. If you only provide the first +argument, then it will return a function which lets you pass in the +arguments as if it were a single function call. + +__Arguments__ + +* `fns` - the asynchronous functions to all call with the same arguments +* `args...` - any number of separate arguments to pass to the function +* `callback` - the final argument should be the callback, called when all + functions have completed processing + + +__Example__ + +```js +async.applyEach([enableSearch, updateSchema], 'bucket', callback); + +// partial application example: +async.each( + buckets, + async.applyEach([enableSearch, updateSchema]), + callback +); +``` + +--------------------------------------- + + +### applyEachSeries(arr, args..., callback) + +The same as [`applyEach`](#applyEach) only the functions are applied in series. + +--------------------------------------- + + +### queue(worker, concurrency) + +Creates a `queue` object with the specified `concurrency`. Tasks added to the +`queue` are processed in parallel (up to the `concurrency` limit). If all +`worker`s are in progress, the task is queued until one becomes available. +Once a `worker` completes a `task`, that `task`'s callback is called. + +__Arguments__ + +* `worker(task, callback)` - An asynchronous function for processing a queued + task, which must call its `callback(err)` argument when finished, with an + optional `error` as an argument. +* `concurrency` - An `integer` for determining how many `worker` functions should be + run in parallel. + +__Queue objects__ + +The `queue` object returned by this function has the following properties and +methods: + +* `length()` - a function returning the number of items waiting to be processed. +* `started` - a function returning whether or not any items have been pushed and processed by the queue +* `running()` - a function returning the number of items currently being processed. +* `idle()` - a function returning false if there are items waiting or being processed, or true if not. +* `concurrency` - an integer for determining how many `worker` functions should be + run in parallel. This property can be changed after a `queue` is created to + alter the concurrency on-the-fly. +* `push(task, [callback])` - add a new task to the `queue`. Calls `callback` once + the `worker` has finished processing the task. Instead of a single task, a `tasks` array + can be submitted. The respective callback is used for every task in the list. +* `unshift(task, [callback])` - add a new task to the front of the `queue`. +* `saturated` - a callback that is called when the `queue` length hits the `concurrency` limit, + and further tasks will be queued. +* `empty` - a callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - a callback that is called when the last item from the `queue` has returned from the `worker`. +* `paused` - a boolean for determining whether the queue is in a paused state +* `pause()` - a function that pauses the processing of tasks until `resume()` is called. +* `resume()` - a function that resumes the processing of queued tasks when the queue is paused. +* `kill()` - a function that removes the `drain` callback and empties remaining tasks from the queue forcing it to go idle. + +__Example__ + +```js +// create a queue object with concurrency 2 + +var q = async.queue(function (task, callback) { + console.log('hello ' + task.name); + callback(); +}, 2); + + +// assign a callback +q.drain = function() { + console.log('all items have been processed'); +} + +// add some items to the queue + +q.push({name: 'foo'}, function (err) { + console.log('finished processing foo'); +}); +q.push({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); + +// add some items to the queue (batch-wise) + +q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { + console.log('finished processing item'); +}); + +// add some items to the front of the queue + +q.unshift({name: 'bar'}, function (err) { + console.log('finished processing bar'); +}); +``` + + +--------------------------------------- + + +### priorityQueue(worker, concurrency) + +The same as [`queue`](#queue) only tasks are assigned a priority and completed in ascending priority order. There are two differences between `queue` and `priorityQueue` objects: + +* `push(task, priority, [callback])` - `priority` should be a number. If an array of + `tasks` is given, all tasks will be assigned the same priority. +* The `unshift` method was removed. + +--------------------------------------- + + +### cargo(worker, [payload]) + +Creates a `cargo` object with the specified payload. Tasks added to the +cargo will be processed altogether (up to the `payload` limit). If the +`worker` is in progress, the task is queued until it becomes available. Once +the `worker` has completed some tasks, each callback of those tasks is called. +Check out [this animation](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) for how `cargo` and `queue` work. + +While [queue](#queue) passes only one task to one of a group of workers +at a time, cargo passes an array of tasks to a single worker, repeating +when the worker is finished. + +__Arguments__ + +* `worker(tasks, callback)` - An asynchronous function for processing an array of + queued tasks, which must call its `callback(err)` argument when finished, with + an optional `err` argument. +* `payload` - An optional `integer` for determining how many tasks should be + processed per round; if omitted, the default is unlimited. + +__Cargo objects__ + +The `cargo` object returned by this function has the following properties and +methods: + +* `length()` - A function returning the number of items waiting to be processed. +* `payload` - An `integer` for determining how many tasks should be + process per round. This property can be changed after a `cargo` is created to + alter the payload on-the-fly. +* `push(task, [callback])` - Adds `task` to the `queue`. The callback is called + once the `worker` has finished processing the task. Instead of a single task, an array of `tasks` + can be submitted. The respective callback is used for every task in the list. +* `saturated` - A callback that is called when the `queue.length()` hits the concurrency and further tasks will be queued. +* `empty` - A callback that is called when the last item from the `queue` is given to a `worker`. +* `drain` - A callback that is called when the last item from the `queue` has returned from the `worker`. + +__Example__ + +```js +// create a cargo object with payload 2 + +var cargo = async.cargo(function (tasks, callback) { + for(var i=0; i +### auto(tasks, [callback]) + +Determines the best order for running the functions in `tasks`, based on their +requirements. Each function can optionally depend on other functions being completed +first, and each function is run as soon as its requirements are satisfied. + +If any of the functions pass an error to their callback, it will not +complete (so any other functions depending on it will not run), and the main +`callback` is immediately called with the error. Functions also receive an +object containing the results of functions which have completed so far. + +Note, all functions are called with a `results` object as a second argument, +so it is unsafe to pass functions in the `tasks` object which cannot handle the +extra argument. + +For example, this snippet of code: + +```js +async.auto({ + readData: async.apply(fs.readFile, 'data.txt', 'utf-8') +}, callback); +``` + +will have the effect of calling `readFile` with the results object as the last +argument, which will fail: + +```js +fs.readFile('data.txt', 'utf-8', cb, {}); +``` + +Instead, wrap the call to `readFile` in a function which does not forward the +`results` object: + +```js +async.auto({ + readData: function(cb, results){ + fs.readFile('data.txt', 'utf-8', cb); + } +}, callback); +``` + +__Arguments__ + +* `tasks` - An object. Each of its properties is either a function or an array of + requirements, with the function itself the last item in the array. The object's key + of a property serves as the name of the task defined by that property, + i.e. can be used when specifying requirements for other tasks. + The function receives two arguments: (1) a `callback(err, result)` which must be + called when finished, passing an `error` (which can be `null`) and the result of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions. +* `callback(err, results)` - An optional callback which is called when all the + tasks have been completed. It receives the `err` argument if any `tasks` + pass an error to their callback. Results are always returned; however, if + an error occurs, no further `tasks` will be performed, and the results + object will only contain partial results. + + +__Example__ + +```js +async.auto({ + get_data: function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + make_folder: function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + }, + write_file: ['get_data', 'make_folder', function(callback, results){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + callback(null, 'filename'); + }], + email_link: ['write_file', function(callback, results){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + // results.write_file contains the filename returned by write_file. + callback(null, {'file':results.write_file, 'email':'user@example.com'}); + }] +}, function(err, results) { + console.log('err = ', err); + console.log('results = ', results); +}); +``` + +This is a fairly trivial example, but to do this using the basic parallel and +series functions would look like this: + +```js +async.parallel([ + function(callback){ + console.log('in get_data'); + // async code to get some data + callback(null, 'data', 'converted to array'); + }, + function(callback){ + console.log('in make_folder'); + // async code to create a directory to store a file in + // this is run at the same time as getting the data + callback(null, 'folder'); + } +], +function(err, results){ + async.series([ + function(callback){ + console.log('in write_file', JSON.stringify(results)); + // once there is some data and the directory exists, + // write the data to a file in the directory + results.push('filename'); + callback(null); + }, + function(callback){ + console.log('in email_link', JSON.stringify(results)); + // once the file is written let's email a link to it... + callback(null, {'file':results.pop(), 'email':'user@example.com'}); + } + ]); +}); +``` + +For a complicated series of `async` tasks, using the [`auto`](#auto) function makes adding +new tasks much easier (and the code more readable). + + +--------------------------------------- + + +### retry([times = 5], task, [callback]) + +Attempts to get a successful response from `task` no more than `times` times before +returning an error. If the task is successful, the `callback` will be passed the result +of the successful task. If all attempts fail, the callback will be passed the error and +result (if any) of the final attempt. + +__Arguments__ + +* `times` - An integer indicating how many times to attempt the `task` before giving up. Defaults to 5. +* `task(callback, results)` - A function which receives two arguments: (1) a `callback(err, result)` + which must be called when finished, passing `err` (which can be `null`) and the `result` of + the function's execution, and (2) a `results` object, containing the results of + the previously executed functions (if nested inside another control flow). +* `callback(err, results)` - An optional callback which is called when the + task has succeeded, or after the final failed attempt. It receives the `err` and `result` arguments of the last attempt at completing the `task`. + +The [`retry`](#retry) function can be used as a stand-alone control flow by passing a +callback, as shown below: + +```js +async.retry(3, apiMethod, function(err, result) { + // do something with the result +}); +``` + +It can also be embeded within other control flow functions to retry individual methods +that are not as reliable, like this: + +```js +async.auto({ + users: api.getUsers.bind(api), + payments: async.retry(3, api.getPayments.bind(api)) +}, function(err, results) { + // do something with the results +}); +``` + + +--------------------------------------- + + +### iterator(tasks) + +Creates an iterator function which calls the next function in the `tasks` array, +returning a continuation to call the next one after that. It's also possible to +“peek” at the next iterator with `iterator.next()`. + +This function is used internally by the `async` module, but can be useful when +you want to manually control the flow of functions in series. + +__Arguments__ + +* `tasks` - An array of functions to run. + +__Example__ + +```js +var iterator = async.iterator([ + function(){ sys.p('one'); }, + function(){ sys.p('two'); }, + function(){ sys.p('three'); } +]); + +node> var iterator2 = iterator(); +'one' +node> var iterator3 = iterator2(); +'two' +node> iterator3(); +'three' +node> var nextfn = iterator2.next(); +node> nextfn(); +'three' +``` + +--------------------------------------- + + +### apply(function, arguments..) + +Creates a continuation function with some arguments already applied. + +Useful as a shorthand when combined with other control flow functions. Any arguments +passed to the returned function are added to the arguments originally passed +to apply. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to automatically apply when the + continuation is called. + +__Example__ + +```js +// using apply + +async.parallel([ + async.apply(fs.writeFile, 'testfile1', 'test1'), + async.apply(fs.writeFile, 'testfile2', 'test2'), +]); + + +// the same process without using apply + +async.parallel([ + function(callback){ + fs.writeFile('testfile1', 'test1', callback); + }, + function(callback){ + fs.writeFile('testfile2', 'test2', callback); + } +]); +``` + +It's possible to pass any number of additional arguments when calling the +continuation: + +```js +node> var fn = async.apply(sys.puts, 'one'); +node> fn('two', 'three'); +one +two +three +``` + +--------------------------------------- + + +### nextTick(callback), setImmediate(callback) + +Calls `callback` on a later loop around the event loop. In Node.js this just +calls `process.nextTick`; in the browser it falls back to `setImmediate(callback)` +if available, otherwise `setTimeout(callback, 0)`, which means other higher priority +events may precede the execution of `callback`. + +This is used internally for browser-compatibility purposes. + +__Arguments__ + +* `callback` - The function to call on a later loop around the event loop. + +__Example__ + +```js +var call_order = []; +async.nextTick(function(){ + call_order.push('two'); + // call_order now equals ['one','two'] +}); +call_order.push('one') +``` + + +### times(n, callback) + +Calls the `callback` function `n` times, and accumulates results in the same manner +you would use with [`map`](#map). + +__Arguments__ + +* `n` - The number of times to run the function. +* `iterator` - The function to call `n` times. +* `callback` - see [`map`](#map) + +__Example__ + +```js +// Pretend this is some complicated async factory +var createUser = function(id, callback) { + callback(null, { + id: 'user' + id + }) +} +// generate 5 users +async.times(5, function(n, next){ + createUser(n, function(err, user) { + next(err, user) + }) +}, function(err, users) { + // we should now have 5 users +}); +``` + + +### timesSeries(n, callback) + +The same as [`times`](#times), only the iterator is applied to each item in `arr` in +series. The next `iterator` is only called once the current one has completed. +The results array will be in the same order as the original. + + +## Utils + + +### memoize(fn, [hasher]) + +Caches the results of an `async` function. When creating a hash to store function +results against, the callback is omitted from the hash and an optional hash +function can be used. + +If no hash function is specified, the first argument is used as a hash key, which may work reasonably if it is a string or a data type that converts to a distinct string. Note that objects and arrays will not behave reasonably. Neither will cases where the other arguments are significant. In such cases, specify your own hash function. + +The cache of results is exposed as the `memo` property of the function returned +by `memoize`. + +__Arguments__ + +* `fn` - The function to proxy and cache results from. +* `hasher` - An optional function for generating a custom hash for storing + results. It has all the arguments applied to it apart from the callback, and + must be synchronous. + +__Example__ + +```js +var slow_fn = function (name, callback) { + // do something + callback(null, result); +}; +var fn = async.memoize(slow_fn); + +// fn can now be used as if it were slow_fn +fn('some name', function () { + // callback +}); +``` + + +### unmemoize(fn) + +Undoes a [`memoize`](#memoize)d function, reverting it to the original, unmemoized +form. Handy for testing. + +__Arguments__ + +* `fn` - the memoized function + + +### log(function, arguments) + +Logs the result of an `async` function to the `console`. Only works in Node.js or +in browsers that support `console.log` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.log` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, 'hello ' + name); + }, 1000); +}; +``` +```js +node> async.log(hello, 'world'); +'hello world' +``` + +--------------------------------------- + + +### dir(function, arguments) + +Logs the result of an `async` function to the `console` using `console.dir` to +display the properties of the resulting object. Only works in Node.js or +in browsers that support `console.dir` and `console.error` (such as FF and Chrome). +If multiple arguments are returned from the async function, `console.dir` is +called on each argument in order. + +__Arguments__ + +* `function` - The function you want to eventually apply all arguments to. +* `arguments...` - Any number of arguments to apply to the function. + +__Example__ + +```js +var hello = function(name, callback){ + setTimeout(function(){ + callback(null, {hello: name}); + }, 1000); +}; +``` +```js +node> async.dir(hello, 'world'); +{hello: 'world'} +``` + +--------------------------------------- + + +### noConflict() + +Changes the value of `async` back to its original value, returning a reference to the +`async` object. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/bower.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/bower.json new file mode 100644 index 0000000..9e4156d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/bower.json @@ -0,0 +1,40 @@ +{ + "name": "async", + "description": "Higher-order functions and common patterns for asynchronous code", + "version": "1.0.0", + "main": "lib/async.js", + "keywords": [ + "async", + "callback", + "utility", + "module" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/caolan/async.git" + }, + "devDependencies": { + "benchmark": "~1.0.0", + "jshint": "~2.7.0", + "lodash": ">=2.4.1", + "mkdirp": "~0.5.1", + "nodeunit": ">0.0.0", + "uglify-js": "1.2.x" + }, + "moduleType": [ + "amd", + "globals", + "node" + ], + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "authors": [ + "Caolan McMahon" + ] +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/component.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/component.json new file mode 100644 index 0000000..c876b0a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/component.json @@ -0,0 +1,17 @@ +{ + "name": "async", + "description": "Higher-order functions and common patterns for asynchronous code", + "version": "1.0.0", + "keywords": [ + "async", + "callback", + "utility", + "module" + ], + "license": "MIT", + "main": "lib/async.js", + "repository": "caolan/async", + "scripts": [ + "lib/async.js" + ] +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/lib/async.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/lib/async.js new file mode 100644 index 0000000..1e76ee8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/async/lib/async.js @@ -0,0 +1,1283 @@ +/*! + * async + * https://github.com/caolan/async + * + * Copyright 2010-2014 Caolan McMahon + * Released under the MIT license + */ +(function () { + + var async = {}; + var noop = function () {}; + + // global on the server, window in the browser + var root, previous_async; + + if (typeof window == 'object' && this === window) { + root = window; + } + else if (typeof global == 'object' && this === global) { + root = global; + } + else { + root = this; + } + + if (root != null) { + previous_async = root.async; + } + + async.noConflict = function () { + root.async = previous_async; + return async; + }; + + function only_once(fn) { + var called = false; + return function() { + if (called) throw new Error("Callback was already called."); + called = true; + fn.apply(root, arguments); + }; + } + + //// cross-browser compatiblity functions //// + + var _toString = Object.prototype.toString; + + var _isArray = Array.isArray || function (obj) { + return _toString.call(obj) === '[object Array]'; + }; + + var _each = function (arr, iterator) { + var index = -1, + length = arr.length; + + while (++index < length) { + iterator(arr[index], index, arr); + } + }; + + var _map = function (arr, iterator) { + var index = -1, + length = arr.length, + result = Array(length); + + while (++index < length) { + result[index] = iterator(arr[index], index, arr); + } + return result; + }; + + var _reduce = function (arr, iterator, memo) { + _each(arr, function (x, i, a) { + memo = iterator(memo, x, i, a); + }); + return memo; + }; + + var _forEachOf = function (object, iterator) { + _each(_keys(object), function (key) { + iterator(object[key], key); + }); + }; + + var _keys = Object.keys || function (obj) { + var keys = []; + for (var k in obj) { + if (obj.hasOwnProperty(k)) { + keys.push(k); + } + } + return keys; + }; + + var _baseSlice = function (arr, start) { + start = start || 0; + var index = -1; + var length = arr.length; + + if (start) { + length -= start; + length = length < 0 ? 0 : length; + } + var result = Array(length); + + while (++index < length) { + result[index] = arr[index + start]; + } + return result; + }; + + //// exported async module functions //// + + //// nextTick implementation with browser-compatible fallback //// + + // capture the global reference to guard against fakeTimer mocks + var _setImmediate; + if (typeof setImmediate === 'function') { + _setImmediate = setImmediate; + } + + if (typeof process === 'undefined' || !(process.nextTick)) { + if (_setImmediate) { + async.nextTick = function (fn) { + // not a direct alias for IE10 compatibility + _setImmediate(fn); + }; + async.setImmediate = async.nextTick; + } + else { + async.nextTick = function (fn) { + setTimeout(fn, 0); + }; + async.setImmediate = async.nextTick; + } + } + else { + async.nextTick = process.nextTick; + if (_setImmediate) { + async.setImmediate = function (fn) { + // not a direct alias for IE10 compatibility + _setImmediate(fn); + }; + } + else { + async.setImmediate = async.nextTick; + } + } + + async.each = function (arr, iterator, callback) { + callback = callback || noop; + if (!arr.length) { + return callback(); + } + var completed = 0; + _each(arr, function (x) { + iterator(x, only_once(done) ); + }); + function done(err) { + if (err) { + callback(err); + callback = noop; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(); + } + } + } + }; + async.forEach = async.each; + + async.eachSeries = function (arr, iterator, callback) { + callback = callback || noop; + if (!arr.length) { + return callback(); + } + var completed = 0; + var iterate = function () { + iterator(arr[completed], function (err) { + if (err) { + callback(err); + callback = noop; + } + else { + completed += 1; + if (completed >= arr.length) { + callback(); + } + else { + iterate(); + } + } + }); + }; + iterate(); + }; + async.forEachSeries = async.eachSeries; + + + async.eachLimit = function (arr, limit, iterator, callback) { + var fn = _eachLimit(limit); + fn.apply(null, [arr, iterator, callback]); + }; + async.forEachLimit = async.eachLimit; + + var _eachLimit = function (limit) { + + return function (arr, iterator, callback) { + callback = callback || noop; + if (!arr.length || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= arr.length) { + return callback(); + } + + while (running < limit && started < arr.length) { + started += 1; + running += 1; + iterator(arr[started - 1], function (err) { + if (err) { + callback(err); + callback = noop; + } + else { + completed += 1; + running -= 1; + if (completed >= arr.length) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + + async.forEachOf = async.eachOf = function (object, iterator, callback) { + callback = callback || function () {}; + var size = object.length || _keys(object).length; + var completed = 0; + if (!size) { + return callback(); + } + _forEachOf(object, function (value, key) { + iterator(object[key], key, function (err) { + if (err) { + callback(err); + callback = function () {}; + } else { + completed += 1; + if (completed === size) { + callback(null); + } + } + }); + }); + }; + + async.forEachOfSeries = async.eachOfSeries = function (obj, iterator, callback) { + callback = callback || function () {}; + var keys = _keys(obj); + var size = keys.length; + if (!size) { + return callback(); + } + var completed = 0; + var iterate = function () { + var sync = true; + var key = keys[completed]; + iterator(obj[key], key, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + if (completed >= size) { + callback(null); + } + else { + if (sync) { + async.nextTick(iterate); + } + else { + iterate(); + } + } + } + }); + sync = false; + }; + iterate(); + }; + + + + async.forEachOfLimit = async.eachOfLimit = function (obj, limit, iterator, callback) { + _forEachOfLimit(limit)(obj, iterator, callback); + }; + + var _forEachOfLimit = function (limit) { + + return function (obj, iterator, callback) { + callback = callback || function () {}; + var keys = _keys(obj); + var size = keys.length; + if (!size || limit <= 0) { + return callback(); + } + var completed = 0; + var started = 0; + var running = 0; + + (function replenish () { + if (completed >= size) { + return callback(); + } + + while (running < limit && started < size) { + started += 1; + running += 1; + var key = keys[started - 1]; + iterator(obj[key], key, function (err) { + if (err) { + callback(err); + callback = function () {}; + } + else { + completed += 1; + running -= 1; + if (completed >= size) { + callback(); + } + else { + replenish(); + } + } + }); + } + })(); + }; + }; + + + var doParallel = function (fn) { + return function () { + var args = _baseSlice(arguments); + return fn.apply(null, [async.each].concat(args)); + }; + }; + var doParallelLimit = function(limit, fn) { + return function () { + var args = _baseSlice(arguments); + return fn.apply(null, [_eachLimit(limit)].concat(args)); + }; + }; + var doSeries = function (fn) { + return function () { + var args = _baseSlice(arguments); + return fn.apply(null, [async.eachSeries].concat(args)); + }; + }; + + + var _asyncMap = function (eachfn, arr, iterator, callback) { + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + if (!callback) { + eachfn(arr, function (x, callback) { + iterator(x.value, function (err) { + callback(err); + }); + }); + } else { + var results = []; + eachfn(arr, function (x, callback) { + iterator(x.value, function (err, v) { + results[x.index] = v; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + async.map = doParallel(_asyncMap); + async.mapSeries = doSeries(_asyncMap); + async.mapLimit = function (arr, limit, iterator, callback) { + return _mapLimit(limit)(arr, iterator, callback); + }; + + var _mapLimit = function(limit) { + return doParallelLimit(limit, _asyncMap); + }; + + // reduce only has a series version, as doing reduce in parallel won't + // work in many situations. + async.reduce = function (arr, memo, iterator, callback) { + async.eachSeries(arr, function (x, callback) { + iterator(memo, x, function (err, v) { + memo = v; + callback(err); + }); + }, function (err) { + callback(err, memo); + }); + }; + // inject alias + async.inject = async.reduce; + // foldl alias + async.foldl = async.reduce; + + async.reduceRight = function (arr, memo, iterator, callback) { + var reversed = _map(arr, function (x) { + return x; + }).reverse(); + async.reduce(reversed, memo, iterator, callback); + }; + // foldr alias + async.foldr = async.reduceRight; + + var _filter = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.filter = doParallel(_filter); + async.filterSeries = doSeries(_filter); + // select alias + async.select = async.filter; + async.selectSeries = async.filterSeries; + + var _reject = function (eachfn, arr, iterator, callback) { + var results = []; + arr = _map(arr, function (x, i) { + return {index: i, value: x}; + }); + eachfn(arr, function (x, callback) { + iterator(x.value, function (v) { + if (!v) { + results.push(x); + } + callback(); + }); + }, function (err) { + callback(_map(results.sort(function (a, b) { + return a.index - b.index; + }), function (x) { + return x.value; + })); + }); + }; + async.reject = doParallel(_reject); + async.rejectSeries = doSeries(_reject); + + var _detect = function (eachfn, arr, iterator, main_callback) { + eachfn(arr, function (x, callback) { + iterator(x, function (result) { + if (result) { + main_callback(x); + main_callback = noop; + } + else { + callback(); + } + }); + }, function (err) { + main_callback(); + }); + }; + async.detect = doParallel(_detect); + async.detectSeries = doSeries(_detect); + + async.some = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (v) { + main_callback(true); + main_callback = noop; + } + callback(); + }); + }, function (err) { + main_callback(false); + }); + }; + // any alias + async.any = async.some; + + async.every = function (arr, iterator, main_callback) { + async.each(arr, function (x, callback) { + iterator(x, function (v) { + if (!v) { + main_callback(false); + main_callback = noop; + } + callback(); + }); + }, function (err) { + main_callback(true); + }); + }; + // all alias + async.all = async.every; + + async.sortBy = function (arr, iterator, callback) { + async.map(arr, function (x, callback) { + iterator(x, function (err, criteria) { + if (err) { + callback(err); + } + else { + callback(null, {value: x, criteria: criteria}); + } + }); + }, function (err, results) { + if (err) { + return callback(err); + } + else { + var fn = function (left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + }; + callback(null, _map(results.sort(fn), function (x) { + return x.value; + })); + } + }); + }; + + async.auto = function (tasks, callback) { + callback = callback || noop; + var keys = _keys(tasks); + var remainingTasks = keys.length; + if (!remainingTasks) { + return callback(); + } + + var results = {}; + + var listeners = []; + var addListener = function (fn) { + listeners.unshift(fn); + }; + var removeListener = function (fn) { + for (var i = 0; i < listeners.length; i += 1) { + if (listeners[i] === fn) { + listeners.splice(i, 1); + return; + } + } + }; + var taskComplete = function () { + remainingTasks--; + _each(listeners.slice(0), function (fn) { + fn(); + }); + }; + + addListener(function () { + if (!remainingTasks) { + var theCallback = callback; + // prevent final callback from calling itself if it errors + callback = noop; + + theCallback(null, results); + } + }); + + _each(keys, function (k) { + var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; + var taskCallback = function (err) { + var args = _baseSlice(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + if (err) { + var safeResults = {}; + _each(_keys(results), function(rkey) { + safeResults[rkey] = results[rkey]; + }); + safeResults[k] = args; + callback(err, safeResults); + // stop subsequent errors hitting callback multiple times + callback = noop; + } + else { + results[k] = args; + async.setImmediate(taskComplete); + } + }; + var requires = task.slice(0, Math.abs(task.length - 1)) || []; + // prevent dead-locks + var len = requires.length; + var dep; + while (len--) { + if (!(dep = tasks[requires[len]])) { + throw new Error('Has inexistant dependency'); + } + if (_isArray(dep) && !!~dep.indexOf(k)) { + throw new Error('Has cyclic dependencies'); + } + } + var ready = function () { + return _reduce(requires, function (a, x) { + return (a && results.hasOwnProperty(x)); + }, true) && !results.hasOwnProperty(k); + }; + if (ready()) { + task[task.length - 1](taskCallback, results); + } + else { + var listener = function () { + if (ready()) { + removeListener(listener); + task[task.length - 1](taskCallback, results); + } + }; + addListener(listener); + } + }); + }; + + async.retry = function(times, task, callback) { + var DEFAULT_TIMES = 5; + var attempts = []; + // Use defaults if times not passed + if (typeof times === 'function') { + callback = task; + task = times; + times = DEFAULT_TIMES; + } + // Make sure times is a number + times = parseInt(times, 10) || DEFAULT_TIMES; + var wrappedTask = function(wrappedCallback, wrappedResults) { + var retryAttempt = function(task, finalAttempt) { + return function(seriesCallback) { + task(function(err, result){ + seriesCallback(!err || finalAttempt, {err: err, result: result}); + }, wrappedResults); + }; + }; + while (times) { + attempts.push(retryAttempt(task, !(times-=1))); + } + async.series(attempts, function(done, data){ + data = data[data.length - 1]; + (wrappedCallback || callback)(data.err, data.result); + }); + }; + // If a callback is passed, run this as a controll flow + return callback ? wrappedTask() : wrappedTask; + }; + + async.waterfall = function (tasks, callback) { + callback = callback || noop; + if (!_isArray(tasks)) { + var err = new Error('First argument to waterfall must be an array of functions'); + return callback(err); + } + if (!tasks.length) { + return callback(); + } + var wrapIterator = function (iterator) { + return function (err) { + if (err) { + callback.apply(null, arguments); + callback = noop; + } + else { + var args = _baseSlice(arguments, 1); + var next = iterator.next(); + if (next) { + args.push(wrapIterator(next)); + } + else { + args.push(callback); + } + async.setImmediate(function () { + iterator.apply(null, args); + }); + } + }; + }; + wrapIterator(async.iterator(tasks))(); + }; + + var _parallel = function(eachfn, tasks, callback) { + callback = callback || noop; + if (_isArray(tasks)) { + eachfn.map(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = _baseSlice(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + eachfn.each(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = _baseSlice(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.parallel = function (tasks, callback) { + _parallel({ map: async.map, each: async.each }, tasks, callback); + }; + + async.parallelLimit = function(tasks, limit, callback) { + _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); + }; + + async.series = function (tasks, callback) { + callback = callback || noop; + if (_isArray(tasks)) { + async.mapSeries(tasks, function (fn, callback) { + if (fn) { + fn(function (err) { + var args = _baseSlice(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + callback.call(null, err, args); + }); + } + }, callback); + } + else { + var results = {}; + async.eachSeries(_keys(tasks), function (k, callback) { + tasks[k](function (err) { + var args = _baseSlice(arguments, 1); + if (args.length <= 1) { + args = args[0]; + } + results[k] = args; + callback(err); + }); + }, function (err) { + callback(err, results); + }); + } + }; + + async.iterator = function (tasks) { + var makeCallback = function (index) { + var fn = function () { + if (tasks.length) { + tasks[index].apply(null, arguments); + } + return fn.next(); + }; + fn.next = function () { + return (index < tasks.length - 1) ? makeCallback(index + 1): null; + }; + return fn; + }; + return makeCallback(0); + }; + + async.apply = function (fn) { + var args = _baseSlice(arguments, 1); + return function () { + return fn.apply( + null, args.concat(_baseSlice(arguments)) + ); + }; + }; + + var _concat = function (eachfn, arr, fn, callback) { + var r = []; + eachfn(arr, function (x, cb) { + fn(x, function (err, y) { + r = r.concat(y || []); + cb(err); + }); + }, function (err) { + callback(err, r); + }); + }; + async.concat = doParallel(_concat); + async.concatSeries = doSeries(_concat); + + async.whilst = function (test, iterator, callback) { + if (test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.whilst(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doWhilst = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + var args = _baseSlice(arguments, 1); + if (test.apply(null, args)) { + async.doWhilst(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.until = function (test, iterator, callback) { + if (!test()) { + iterator(function (err) { + if (err) { + return callback(err); + } + async.until(test, iterator, callback); + }); + } + else { + callback(); + } + }; + + async.doUntil = function (iterator, test, callback) { + iterator(function (err) { + if (err) { + return callback(err); + } + var args = _baseSlice(arguments, 1); + if (!test.apply(null, args)) { + async.doUntil(iterator, test, callback); + } + else { + callback(); + } + }); + }; + + async.queue = function (worker, concurrency) { + if (concurrency === undefined) { + concurrency = 1; + } + else if(concurrency === 0) { + throw new Error('Concurrency must not be zero'); + } + function _insert(q, data, pos, callback) { + if (!q.started){ + q.started = true; + } + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + if (q.drain) { + q.drain(); + } + }); + } + _each(data, function(task) { + var item = { + data: task, + callback: typeof callback === 'function' ? callback : null + }; + + if (pos) { + q.tasks.unshift(item); + } else { + q.tasks.push(item); + } + + if (q.saturated && q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + var workers = 0; + var q = { + tasks: [], + concurrency: concurrency, + saturated: null, + empty: null, + drain: null, + started: false, + paused: false, + push: function (data, callback) { + _insert(q, data, false, callback); + }, + kill: function () { + q.drain = null; + q.tasks = []; + }, + unshift: function (data, callback) { + _insert(q, data, true, callback); + }, + process: function () { + if (!q.paused && workers < q.concurrency && q.tasks.length) { + var task = q.tasks.shift(); + if (q.empty && q.tasks.length === 0) { + q.empty(); + } + workers += 1; + var next = function () { + workers -= 1; + if (task.callback) { + task.callback.apply(task, arguments); + } + if (q.drain && q.tasks.length + workers === 0) { + q.drain(); + } + q.process(); + }; + var cb = only_once(next); + worker(task.data, cb); + } + }, + length: function () { + return q.tasks.length; + }, + running: function () { + return workers; + }, + idle: function() { + return q.tasks.length + workers === 0; + }, + pause: function () { + if (q.paused === true) { return; } + q.paused = true; + }, + resume: function () { + if (q.paused === false) { return; } + q.paused = false; + var resumeCount = Math.min(q.concurrency, q.tasks.length); + // Need to call q.process once per concurrent + // worker to preserve full concurrency after pause + for (var w = 1; w <= resumeCount; w++) { + async.setImmediate(q.process); + } + } + }; + return q; + }; + + async.priorityQueue = function (worker, concurrency) { + + function _compareTasks(a, b){ + return a.priority - b.priority; + } + + function _binarySearch(sequence, item, compare) { + var beg = -1, + end = sequence.length - 1; + while (beg < end) { + var mid = beg + ((end - beg + 1) >>> 1); + if (compare(item, sequence[mid]) >= 0) { + beg = mid; + } else { + end = mid - 1; + } + } + return beg; + } + + function _insert(q, data, priority, callback) { + if (!q.started){ + q.started = true; + } + if (!_isArray(data)) { + data = [data]; + } + if(data.length === 0) { + // call drain immediately if there are no tasks + return async.setImmediate(function() { + if (q.drain) { + q.drain(); + } + }); + } + _each(data, function(task) { + var item = { + data: task, + priority: priority, + callback: typeof callback === 'function' ? callback : null + }; + + q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); + + if (q.saturated && q.tasks.length === q.concurrency) { + q.saturated(); + } + async.setImmediate(q.process); + }); + } + + // Start with a normal queue + var q = async.queue(worker, concurrency); + + // Override push to accept second parameter representing priority + q.push = function (data, priority, callback) { + _insert(q, data, priority, callback); + }; + + // Remove unshift function + delete q.unshift; + + return q; + }; + + async.cargo = function (worker, payload) { + var working = false, + tasks = []; + + var cargo = { + tasks: tasks, + payload: payload, + saturated: null, + empty: null, + drain: null, + drained: true, + push: function (data, callback) { + if (!_isArray(data)) { + data = [data]; + } + _each(data, function(task) { + tasks.push({ + data: task, + callback: typeof callback === 'function' ? callback : null + }); + cargo.drained = false; + if (cargo.saturated && tasks.length === payload) { + cargo.saturated(); + } + }); + async.setImmediate(cargo.process); + }, + process: function process() { + if (working) return; + if (tasks.length === 0) { + if(cargo.drain && !cargo.drained) cargo.drain(); + cargo.drained = true; + return; + } + + var ts = typeof payload === 'number' ? + tasks.splice(0, payload) : + tasks.splice(0, tasks.length); + + var ds = _map(ts, function (task) { + return task.data; + }); + + if(cargo.empty) cargo.empty(); + working = true; + worker(ds, function () { + working = false; + + var args = arguments; + _each(ts, function (data) { + if (data.callback) { + data.callback.apply(null, args); + } + }); + + process(); + }); + }, + length: function () { + return tasks.length; + }, + running: function () { + return working; + } + }; + return cargo; + }; + + var _console_fn = function (name) { + return function (fn) { + var args = _baseSlice(arguments, 1); + fn.apply(null, args.concat([function (err) { + var args = _baseSlice(arguments, 1); + if (typeof console !== 'undefined') { + if (err) { + if (console.error) { + console.error(err); + } + } + else if (console[name]) { + _each(args, function (x) { + console[name](x); + }); + } + } + }])); + }; + }; + async.log = _console_fn('log'); + async.dir = _console_fn('dir'); + /*async.info = _console_fn('info'); + async.warn = _console_fn('warn'); + async.error = _console_fn('error');*/ + + async.memoize = function (fn, hasher) { + var memo = {}; + var queues = {}; + hasher = hasher || function (x) { + return x; + }; + var memoized = function () { + var args = _baseSlice(arguments); + var callback = args.pop(); + var key = hasher.apply(null, args); + if (key in memo) { + async.nextTick(function () { + callback.apply(null, memo[key]); + }); + } + else if (key in queues) { + queues[key].push(callback); + } + else { + queues[key] = [callback]; + fn.apply(null, args.concat([function () { + memo[key] = _baseSlice(arguments); + var q = queues[key]; + delete queues[key]; + for (var i = 0, l = q.length; i < l; i++) { + q[i].apply(null, arguments); + } + }])); + } + }; + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + }; + + async.unmemoize = function (fn) { + return function () { + return (fn.unmemoized || fn).apply(null, arguments); + }; + }; + + async.times = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.map(counter, iterator, callback); + }; + + async.timesSeries = function (count, iterator, callback) { + var counter = []; + for (var i = 0; i < count; i++) { + counter.push(i); + } + return async.mapSeries(counter, iterator, callback); + }; + + async.seq = function (/* functions... */) { + var fns = arguments; + return function () { + var that = this; + var args = _baseSlice(arguments); + var callback = args.pop(); + async.reduce(fns, args, function (newargs, fn, cb) { + fn.apply(that, newargs.concat([function () { + var err = arguments[0]; + var nextargs = _baseSlice(arguments, 1); + cb(err, nextargs); + }])); + }, + function (err, results) { + callback.apply(that, [err].concat(results)); + }); + }; + }; + + async.compose = function (/* functions... */) { + return async.seq.apply(null, Array.prototype.reverse.call(arguments)); + }; + + var _applyEach = function (eachfn, fns /*args...*/) { + var go = function () { + var that = this; + var args = _baseSlice(arguments); + var callback = args.pop(); + return eachfn(fns, function (fn, cb) { + fn.apply(that, args.concat([cb])); + }, + callback); + }; + if (arguments.length > 2) { + var args = _baseSlice(arguments, 2); + return go.apply(this, args); + } + else { + return go; + } + }; + async.applyEach = doParallel(_applyEach); + async.applyEachSeries = doSeries(_applyEach); + + async.forever = function (fn, callback) { + function next(err) { + if (err) { + if (callback) { + return callback(err); + } + throw err; + } + fn(next); + } + next(); + }; + + // Node.js + if (typeof module !== 'undefined' && module.exports) { + module.exports = async; + } + // AMD / RequireJS + else if (typeof define !== 'undefined' && define.amd) { + define([], function () { + return async; + }); + } + // included directly via + + \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/example.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/example.js new file mode 100644 index 0000000..664c1b4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/example.js @@ -0,0 +1,3 @@ +var BigInteger = require('./'); +var a = new BigInteger('91823918239182398123'); +console.log(a.bitLength()); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/index.js new file mode 100644 index 0000000..973226d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/index.js @@ -0,0 +1,1357 @@ +(function(){ + + // Copyright (c) 2005 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Basic JavaScript BN library - subset useful for RSA encryption. + + // Bits per digit + var dbits; + + // JavaScript engine analysis + var canary = 0xdeadbeefcafe; + var j_lm = ((canary&0xffffff)==0xefcafe); + + // (public) Constructor + function BigInteger(a,b,c) { + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); + } + + // return new, unset BigInteger + function nbi() { return new BigInteger(null); } + + // am: Compute w_j += (x*this_i), propagate carries, + // c is initial carry, returns final carry. + // c < 3*dvalue, x < 2*dvalue, this_i < dvalue + // We need to select the fastest one that works in this environment. + + // am1: use a single mult and divide to get the high bits, + // max digit bits should be 26 because + // max internal value = 2*dvalue^2-2*dvalue (< 2^53) + function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this[i++]+w[j]+c; + c = Math.floor(v/0x4000000); + w[j++] = v&0x3ffffff; + } + return c; + } + // am2 avoids a big mult-and-extract completely. + // Max digit bits should be <= 30 because we do bitwise ops + // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) + function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this[i]&0x7fff; + var h = this[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w[j++] = l&0x3fffffff; + } + return c; + } + // Alternately, set max digit bits to 28 since some + // browsers slow down when dealing with 32-bit numbers. + function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this[i]&0x3fff; + var h = this[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w[j++] = l&0xfffffff; + } + return c; + } + var inBrowser = typeof navigator !== "undefined"; + if(inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; + } + else if(inBrowser && j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; + } + else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; + } + + BigInteger.prototype.DB = dbits; + BigInteger.prototype.DM = ((1<= 0; --i) r[i] = this[i]; + r.t = this.t; + r.s = this.s; + } + + // (protected) set from integer value x, -DV <= x < DV + function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this[0] = x; + else if(x < -1) this[0] = x+this.DV; + else this.t = 0; + } + + // return bigint initialized to value + function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + + // (protected) set from string and radix + function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this[this.t++] = x; + else if(sh+k > this.DB) { + this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } + else + this[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this[this.t-1] == c) --this.t; + } + + // (public) return string representation in given radix + function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this[i]&((1<>(p+=this.DB-k); + } + else { + d = (this[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; + } + + // (public) -this + function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + + // (public) |this| + function bnAbs() { return (this.s<0)?this.negate():this; } + + // (public) return + if this > a, - if this < a, 0 if equal + function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this[i]-a[i]) != 0) return r; + return 0; + } + + // returns bit length of the integer x + function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; + } + + // (public) return the number of bits in "this" + function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM)); + } + + // (protected) r = this << n*DB + function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r[i+n] = this[i]; + for(i = n-1; i >= 0; --i) r[i] = 0; + r.t = this.t+n; + r.s = this.s; + } + + // (protected) r = this >> n*DB + function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r[i-n] = this[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; + } + + // (protected) r = this << n + function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r[i+ds+1] = (this[i]>>cbs)|c; + c = (this[i]&bm)<= 0; --i) r[i] = 0; + r[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); + } + + // (protected) r = this >> n + function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r[i-ds-1] |= (this[i]&bm)<>bs; + } + if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c -= a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r[i++] = this.DV+c; + else if(c > 0) r[i++] = c; + r.t = i; + r.clamp(); + } + + // (protected) r = this * a, r != this,a (HAC 14.12) + // "this" should be the larger one if appropriate. + function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); + } + + // (protected) r = this^2, r != this (HAC 14.16) + function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x[i],r,2*i,0,1); + if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r[i+x.t] -= x.DV; + r[i+x.t+1] = 1; + } + } + if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1); + r.s = 0; + r.clamp(); + } + + // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) + // r != q, this != m. q or r may be null. + function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } + else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2); + if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); + } + + // (public) this mod a + function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; + } + + // Modular reduction using "classic" algorithm + function Classic(m) { this.m = m; } + function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; + } + function cRevert(x) { return x; } + function cReduce(x) { x.divRemTo(this.m,null,x); } + function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + Classic.prototype.convert = cConvert; + Classic.prototype.revert = cRevert; + Classic.prototype.reduce = cReduce; + Classic.prototype.mulTo = cMulTo; + Classic.prototype.sqrTo = cSqrTo; + + // (protected) return "-1/this % 2^DB"; useful for Mont. reduction + // justification: + // xy == 1 (mod m) + // xy = 1+km + // xy(2-xy) = (1+km)(1-km) + // x[y(2-xy)] = 1-k^2m^2 + // x[y(2-xy)] == 1 (mod m^2) + // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 + // should reduce x and y(2-xy) by m^2 at each step to keep size bounded. + // JS multiply "overflows" differently from C/C++, so care is needed here. + function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; + } + + // Montgomery reduction + function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; + } + + // xR mod m + function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; + } + + // x/R mod m + function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; + } + + // x = x/R mod m (HAC 14.32) + function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x[i]*mp mod DV + var j = x[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = "x^2/R mod m"; x != r + function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = "xy/R mod m"; x,y != r + function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Montgomery.prototype.convert = montConvert; + Montgomery.prototype.revert = montRevert; + Montgomery.prototype.reduce = montReduce; + Montgomery.prototype.mulTo = montMulTo; + Montgomery.prototype.sqrTo = montSqrTo; + + // (protected) true iff this is even + function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; } + + // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) + function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); + } + + // (public) this^e % m, 0 <= e < 2^32 + function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); + } + + // protected + BigInteger.prototype.copyTo = bnpCopyTo; + BigInteger.prototype.fromInt = bnpFromInt; + BigInteger.prototype.fromString = bnpFromString; + BigInteger.prototype.clamp = bnpClamp; + BigInteger.prototype.dlShiftTo = bnpDLShiftTo; + BigInteger.prototype.drShiftTo = bnpDRShiftTo; + BigInteger.prototype.lShiftTo = bnpLShiftTo; + BigInteger.prototype.rShiftTo = bnpRShiftTo; + BigInteger.prototype.subTo = bnpSubTo; + BigInteger.prototype.multiplyTo = bnpMultiplyTo; + BigInteger.prototype.squareTo = bnpSquareTo; + BigInteger.prototype.divRemTo = bnpDivRemTo; + BigInteger.prototype.invDigit = bnpInvDigit; + BigInteger.prototype.isEven = bnpIsEven; + BigInteger.prototype.exp = bnpExp; + + // public + BigInteger.prototype.toString = bnToString; + BigInteger.prototype.negate = bnNegate; + BigInteger.prototype.abs = bnAbs; + BigInteger.prototype.compareTo = bnCompareTo; + BigInteger.prototype.bitLength = bnBitLength; + BigInteger.prototype.mod = bnMod; + BigInteger.prototype.modPowInt = bnModPowInt; + + // "constants" + BigInteger.ZERO = nbv(0); + BigInteger.ONE = nbv(1); + + // Copyright (c) 2005-2009 Tom Wu + // All Rights Reserved. + // See "LICENSE" for details. + + // Extended JavaScript BN functions, required for RSA private ops. + + // Version 1.1: new BigInteger("0", 10) returns "proper" zero + // Version 1.2: square() API, isProbablePrime fix + + // (public) + function bnClone() { var r = nbi(); this.copyTo(r); return r; } + + // (public) return value as integer + function bnIntValue() { + if(this.s < 0) { + if(this.t == 1) return this[0]-this.DV; + else if(this.t == 0) return -1; + } + else if(this.t == 1) return this[0]; + else if(this.t == 0) return 0; + // assumes 16 < DB < 32 + return ((this[1]&((1<<(32-this.DB))-1))<>24; } + + // (public) return value as short (assumes DB>=16) + function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; } + + // (protected) return x s.t. r^x < DV + function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + + // (public) 0 if this == 0, 1 if this > 0 + function bnSigNum() { + if(this.s < 0) return -1; + else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0; + else return 1; + } + + // (protected) convert to radix string + function bnpToRadix(b) { + if(b == null) b = 10; + if(this.signum() == 0 || b < 2 || b > 36) return "0"; + var cs = this.chunkSize(b); + var a = Math.pow(b,cs); + var d = nbv(a), y = nbi(), z = nbi(), r = ""; + this.divRemTo(d,y,z); + while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); + } + return z.intValue().toString(b) + r; + } + + // (protected) convert from radix string + function bnpFromRadix(s,b) { + this.fromInt(0); + if(b == null) b = 10; + var cs = this.chunkSize(b); + var d = Math.pow(b,cs), mi = false, j = 0, w = 0; + for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } + } + if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); + } + if(mi) BigInteger.ZERO.subTo(this,this); + } + + // (protected) alternate constructor + function bnpFromNumber(a,b,c) { + if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } + } + else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this[i]&((1<>(p+=this.DB-8); + } + else { + d = (this[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } + } + return r; + } + + function bnEquals(a) { return(this.compareTo(a)==0); } + function bnMin(a) { return(this.compareTo(a)<0)?this:a; } + function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + + // (protected) r = this op a (bitwise) + function bnpBitwiseTo(a,op,r) { + var i, f, m = Math.min(a.t,this.t); + for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]); + if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r[i] = op(this[i],f); + r.t = this.t; + } + else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r[i] = op(f,a[i]); + r.t = a.t; + } + r.s = op(this.s,a.s); + r.clamp(); + } + + // (public) this & a + function op_and(x,y) { return x&y; } + function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + + // (public) this | a + function op_or(x,y) { return x|y; } + function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + + // (public) this ^ a + function op_xor(x,y) { return x^y; } + function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + + // (public) this & ~a + function op_andnot(x,y) { return x&~y; } + function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + + // (public) ~this + function bnNot() { + var r = nbi(); + for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i]; + r.t = this.t; + r.s = ~this.s; + return r; + } + + // (public) this << n + function bnShiftLeft(n) { + var r = nbi(); + if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); + return r; + } + + // (public) this >> n + function bnShiftRight(n) { + var r = nbi(); + if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); + return r; + } + + // return index of lowest 1-bit in x, x < 2^31 + function lbit(x) { + if(x == 0) return -1; + var r = 0; + if((x&0xffff) == 0) { x >>= 16; r += 16; } + if((x&0xff) == 0) { x >>= 8; r += 8; } + if((x&0xf) == 0) { x >>= 4; r += 4; } + if((x&3) == 0) { x >>= 2; r += 2; } + if((x&1) == 0) ++r; + return r; + } + + // (public) returns index of lowest 1-bit (or -1 if none) + function bnGetLowestSetBit() { + for(var i = 0; i < this.t; ++i) + if(this[i] != 0) return i*this.DB+lbit(this[i]); + if(this.s < 0) return this.t*this.DB; + return -1; + } + + // return number of 1 bits in x + function cbit(x) { + var r = 0; + while(x != 0) { x &= x-1; ++r; } + return r; + } + + // (public) return number of set bits + function bnBitCount() { + var r = 0, x = this.s&this.DM; + for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x); + return r; + } + + // (public) true iff nth bit is set + function bnTestBit(n) { + var j = Math.floor(n/this.DB); + if(j >= this.t) return(this.s!=0); + return((this[j]&(1<<(n%this.DB)))!=0); + } + + // (protected) this op (1<>= this.DB; + } + if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } + else { + c += this.s; + while(i < a.t) { + c += a[i]; + r[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; + } + r.s = (c<0)?-1:0; + if(c > 0) r[i++] = c; + else if(c < -1) r[i++] = this.DV+c; + r.t = i; + r.clamp(); + } + + // (public) this + a + function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + + // (public) this - a + function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + + // (public) this * a + function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + + // (public) this^2 + function bnSquare() { var r = nbi(); this.squareTo(r); return r; } + + // (public) this / a + function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + + // (public) this % a + function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + + // (public) [this/a,this%a] + function bnDivideAndRemainder(a) { + var q = nbi(), r = nbi(); + this.divRemTo(a,q,r); + return new Array(q,r); + } + + // (protected) this *= n, this >= 0, 1 < n < DV + function bnpDMultiply(n) { + this[this.t] = this.am(0,n-1,this,0,0,this.t); + ++this.t; + this.clamp(); + } + + // (protected) this += n << w words, this >= 0 + function bnpDAddOffset(n,w) { + if(n == 0) return; + while(this.t <= w) this[this.t++] = 0; + this[w] += n; + while(this[w] >= this.DV) { + this[w] -= this.DV; + if(++w >= this.t) this[this.t++] = 0; + ++this[w]; + } + } + + // A "null" reducer + function NullExp() {} + function nNop(x) { return x; } + function nMulTo(x,y,r) { x.multiplyTo(y,r); } + function nSqrTo(x,r) { x.squareTo(r); } + + NullExp.prototype.convert = nNop; + NullExp.prototype.revert = nNop; + NullExp.prototype.mulTo = nMulTo; + NullExp.prototype.sqrTo = nSqrTo; + + // (public) this^e + function bnPow(e) { return this.exp(e,new NullExp()); } + + // (protected) r = lower n words of "this * a", a.t <= n + // "this" should be the larger one if appropriate. + function bnpMultiplyLowerTo(a,n,r) { + var i = Math.min(this.t+a.t,n); + r.s = 0; // assumes a,this >= 0 + r.t = i; + while(i > 0) r[--i] = 0; + var j; + for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t); + for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i); + r.clamp(); + } + + // (protected) r = "this * a" without lower n words, n > 0 + // "this" should be the larger one if appropriate. + function bnpMultiplyUpperTo(a,n,r) { + --n; + var i = r.t = this.t+a.t-n; + r.s = 0; // assumes a,this >= 0 + while(--i >= 0) r[i] = 0; + for(i = Math.max(n-this.t,0); i < a.t; ++i) + r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n); + r.clamp(); + r.drShiftTo(1,r); + } + + // Barrett modular reduction + function Barrett(m) { + // setup Barrett + this.r2 = nbi(); + this.q3 = nbi(); + BigInteger.ONE.dlShiftTo(2*m.t,this.r2); + this.mu = this.r2.divide(m); + this.m = m; + } + + function barrettConvert(x) { + if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); + else if(x.compareTo(this.m) < 0) return x; + else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } + } + + function barrettRevert(x) { return x; } + + // x = x mod m (HAC 14.42) + function barrettReduce(x) { + x.drShiftTo(this.m.t-1,this.r2); + if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } + this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); + this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); + while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); + x.subTo(this.r2,x); + while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + } + + // r = x^2 mod m; x != r + function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + + // r = x*y mod m; x,y != r + function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + + Barrett.prototype.convert = barrettConvert; + Barrett.prototype.revert = barrettRevert; + Barrett.prototype.reduce = barrettReduce; + Barrett.prototype.mulTo = barrettMulTo; + Barrett.prototype.sqrTo = barrettSqrTo; + + // (public) this^e % m (HAC 14.85) + function bnModPow(e,m) { + var i = e.bitLength(), k, r = nbv(1), z; + if(i <= 0) return r; + else if(i < 18) k = 1; + else if(i < 48) k = 3; + else if(i < 144) k = 4; + else if(i < 768) k = 5; + else k = 6; + if(i < 8) + z = new Classic(m); + else if(m.isEven()) + z = new Barrett(m); + else + z = new Montgomery(m); + + // precomputation + var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } + } + + var j = e.t-1, w, is1 = true, r2 = nbi(), t; + i = nbits(e[j])-1; + while(j >= 0) { + if(i >= k1) w = (e[j]>>(i-k1))&km; + else { + w = (e[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } + else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); + } + while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } + else { + y.subTo(x,y); + y.rShiftTo(1,y); + } + } + if(g > 0) y.lShiftTo(g,y); + return y; + } + + // (protected) this % n, n < 2^26 + function bnpModInt(n) { + if(n <= 0) return 0; + var d = this.DV%n, r = (this.s<0)?n-1:0; + if(this.t > 0) + if(d == 0) r = this[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n; + return r; + } + + // (public) 1/this % m (HAC 14.61) + function bnModInverse(m) { + var ac = m.isEven(); + if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; + var u = m.clone(), v = this.clone(); + var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); + while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } + else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } + else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } + else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } + } + if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; + if(d.compareTo(m) >= 0) return d.subtract(m); + if(d.signum() < 0) d.addTo(m,d); else return d; + if(d.signum() < 0) return d.add(m); else return d; + } + + var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997]; + var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + + // (public) test primality with certainty >= 1-.5^t + function bnIsProbablePrime(t) { + var i, x = this.abs(); + if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x[0] == lowprimes[i]) return true; + return false; + } + if(x.isEven()) return false; + i = 1; + while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; + } + return x.millerRabin(t); + } + + // (protected) true if probably prime (HAC 4.24, Miller-Rabin) + function bnpMillerRabin(t) { + var n1 = this.subtract(BigInteger.ONE); + var k = n1.getLowestSetBit(); + if(k <= 0) return false; + var r = n1.shiftRight(k); + t = (t+1)>>1; + if(t > lowprimes.length) t = lowprimes.length; + var a = nbi(); + for(var i = 0; i < t; ++i) { + //Pick bases at random, instead of starting at 2 + a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } + } + return true; + } + + // protected + BigInteger.prototype.chunkSize = bnpChunkSize; + BigInteger.prototype.toRadix = bnpToRadix; + BigInteger.prototype.fromRadix = bnpFromRadix; + BigInteger.prototype.fromNumber = bnpFromNumber; + BigInteger.prototype.bitwiseTo = bnpBitwiseTo; + BigInteger.prototype.changeBit = bnpChangeBit; + BigInteger.prototype.addTo = bnpAddTo; + BigInteger.prototype.dMultiply = bnpDMultiply; + BigInteger.prototype.dAddOffset = bnpDAddOffset; + BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; + BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; + BigInteger.prototype.modInt = bnpModInt; + BigInteger.prototype.millerRabin = bnpMillerRabin; + + // public + BigInteger.prototype.clone = bnClone; + BigInteger.prototype.intValue = bnIntValue; + BigInteger.prototype.byteValue = bnByteValue; + BigInteger.prototype.shortValue = bnShortValue; + BigInteger.prototype.signum = bnSigNum; + BigInteger.prototype.toByteArray = bnToByteArray; + BigInteger.prototype.equals = bnEquals; + BigInteger.prototype.min = bnMin; + BigInteger.prototype.max = bnMax; + BigInteger.prototype.and = bnAnd; + BigInteger.prototype.or = bnOr; + BigInteger.prototype.xor = bnXor; + BigInteger.prototype.andNot = bnAndNot; + BigInteger.prototype.not = bnNot; + BigInteger.prototype.shiftLeft = bnShiftLeft; + BigInteger.prototype.shiftRight = bnShiftRight; + BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; + BigInteger.prototype.bitCount = bnBitCount; + BigInteger.prototype.testBit = bnTestBit; + BigInteger.prototype.setBit = bnSetBit; + BigInteger.prototype.clearBit = bnClearBit; + BigInteger.prototype.flipBit = bnFlipBit; + BigInteger.prototype.add = bnAdd; + BigInteger.prototype.subtract = bnSubtract; + BigInteger.prototype.multiply = bnMultiply; + BigInteger.prototype.divide = bnDivide; + BigInteger.prototype.remainder = bnRemainder; + BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; + BigInteger.prototype.modPow = bnModPow; + BigInteger.prototype.modInverse = bnModInverse; + BigInteger.prototype.pow = bnPow; + BigInteger.prototype.gcd = bnGCD; + BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + + // JSBN-specific extension + BigInteger.prototype.square = bnSquare; + + // Expose the Barrett function + BigInteger.prototype.Barrett = Barrett + + // BigInteger interfaces not implemented in jsbn: + + // BigInteger(int signum, byte[] magnitude) + // double doubleValue() + // float floatValue() + // int hashCode() + // long longValue() + // static BigInteger valueOf(long val) + + // Random number generator - requires a PRNG backend, e.g. prng4.js + + // For best results, put code like + // + // in your main HTML document. + + var rng_state; + var rng_pool; + var rng_pptr; + + // Mix in a 32-bit integer into the pool + function rng_seed_int(x) { + rng_pool[rng_pptr++] ^= x & 255; + rng_pool[rng_pptr++] ^= (x >> 8) & 255; + rng_pool[rng_pptr++] ^= (x >> 16) & 255; + rng_pool[rng_pptr++] ^= (x >> 24) & 255; + if(rng_pptr >= rng_psize) rng_pptr -= rng_psize; + } + + // Mix in the current time (w/milliseconds) into the pool + function rng_seed_time() { + rng_seed_int(new Date().getTime()); + } + + // Initialize the pool with junk if needed. + if(rng_pool == null) { + rng_pool = new Array(); + rng_pptr = 0; + var t; + if(typeof window !== "undefined" && window.crypto) { + if (window.crypto.getRandomValues) { + // Use webcrypto if available + var ua = new Uint8Array(32); + window.crypto.getRandomValues(ua); + for(t = 0; t < 32; ++t) + rng_pool[rng_pptr++] = ua[t]; + } + else if(navigator.appName == "Netscape" && navigator.appVersion < "5") { + // Extract entropy (256 bits) from NS4 RNG if available + var z = window.crypto.random(32); + for(t = 0; t < z.length; ++t) + rng_pool[rng_pptr++] = z.charCodeAt(t) & 255; + } + } + while(rng_pptr < rng_psize) { // extract some randomness from Math.random() + t = Math.floor(65536 * Math.random()); + rng_pool[rng_pptr++] = t >>> 8; + rng_pool[rng_pptr++] = t & 255; + } + rng_pptr = 0; + rng_seed_time(); + //rng_seed_int(window.screenX); + //rng_seed_int(window.screenY); + } + + function rng_get_byte() { + if(rng_state == null) { + rng_seed_time(); + rng_state = prng_newstate(); + rng_state.init(rng_pool); + for(rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) + rng_pool[rng_pptr] = 0; + rng_pptr = 0; + //rng_pool = null; + } + // TODO: allow reseeding after first request + return rng_state.next(); + } + + function rng_get_bytes(ba) { + var i; + for(i = 0; i < ba.length; ++i) ba[i] = rng_get_byte(); + } + + function SecureRandom() {} + + SecureRandom.prototype.nextBytes = rng_get_bytes; + + // prng4.js - uses Arcfour as a PRNG + + function Arcfour() { + this.i = 0; + this.j = 0; + this.S = new Array(); + } + + // Initialize arcfour context from key, an array of ints, each from [0..255] + function ARC4init(key) { + var i, j, t; + for(i = 0; i < 256; ++i) + this.S[i] = i; + j = 0; + for(i = 0; i < 256; ++i) { + j = (j + this.S[i] + key[i % key.length]) & 255; + t = this.S[i]; + this.S[i] = this.S[j]; + this.S[j] = t; + } + this.i = 0; + this.j = 0; + } + + function ARC4next() { + var t; + this.i = (this.i + 1) & 255; + this.j = (this.j + this.S[this.i]) & 255; + t = this.S[this.i]; + this.S[this.i] = this.S[this.j]; + this.S[this.j] = t; + return this.S[(t + this.S[this.i]) & 255]; + } + + Arcfour.prototype.init = ARC4init; + Arcfour.prototype.next = ARC4next; + + // Plug in your RNG constructor here + function prng_newstate() { + return new Arcfour(); + } + + // Pool size must be a multiple of 4 and greater than 32. + // An array of bytes the size of the pool will be passed to init() + var rng_psize = 256; + + BigInteger.SecureRandom = SecureRandom; + BigInteger.BigInteger = BigInteger; + if (typeof exports !== 'undefined') { + exports = module.exports = BigInteger; + } else { + this.BigInteger = BigInteger; + this.SecureRandom = SecureRandom; + } + +}).call(this); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/package.json new file mode 100644 index 0000000..dbdf286 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsbn/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "jsbn@~0.1.0", + "scope": null, + "escapedName": "jsbn", + "name": "jsbn", + "rawSpec": "~0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/sshpk" + ] + ], + "_from": "jsbn@>=0.1.0 <0.2.0", + "_id": "jsbn@0.1.1", + "_inCache": true, + "_location": "/jsbn", + "_nodeVersion": "6.3.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/jsbn-0.1.1.tgz_1486886593983_0.3002306066919118" + }, + "_npmUser": { + "name": "andyperlitch", + "email": "andyperlitch@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "jsbn@~0.1.0", + "scope": null, + "escapedName": "jsbn", + "name": "jsbn", + "rawSpec": "~0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/ecc-jsbn", + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "_shasum": "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513", + "_shrinkwrap": null, + "_spec": "jsbn@~0.1.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/sshpk", + "author": { + "name": "Tom Wu" + }, + "bugs": { + "url": "https://github.com/andyperlitch/jsbn/issues" + }, + "dependencies": {}, + "description": "The jsbn library is a fast, portable implementation of large-number math in pure JavaScript, enabling public-key crypto and other applications on desktop and mobile browsers.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513", + "tarball": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" + }, + "gitHead": "ed7e7ab56bd2b8a4447bc0c1ef08548b6dad89a2", + "homepage": "https://github.com/andyperlitch/jsbn#readme", + "keywords": [ + "biginteger", + "bignumber", + "big", + "integer" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "andyperlitch", + "email": "andyperlitch@gmail.com" + } + ], + "name": "jsbn", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/andyperlitch/jsbn.git" + }, + "scripts": { + "test": "mocha test.js" + }, + "version": "0.1.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.eslintrc.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.eslintrc.yml new file mode 100644 index 0000000..ab1762d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.eslintrc.yml @@ -0,0 +1,27 @@ +extends: eslint:recommended +env: + node: true + browser: true +rules: + block-scoped-var: 2 + complexity: [2, 13] + curly: [2, multi-or-nest, consistent] + dot-location: [2, property] + dot-notation: 2 + indent: [2, 2, SwitchCase: 1] + linebreak-style: [2, unix] + new-cap: 2 + no-console: [2, allow: [warn, error]] + no-else-return: 2 + no-eq-null: 2 + no-fallthrough: 2 + no-invalid-this: 2 + no-return-assign: 2 + no-shadow: 1 + no-trailing-spaces: 2 + no-use-before-define: [2, nofunc] + quotes: [2, single, avoid-escape] + semi: [2, always] + strict: [2, global] + valid-jsdoc: [2, requireReturn: false] + no-control-regex: 0 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.npmignore new file mode 100644 index 0000000..d093557 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.npmignore @@ -0,0 +1,60 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +.DS_Store diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.travis.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.travis.yml new file mode 100644 index 0000000..7ddce74 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "4" + - "6" + - "7" + - "8" +after_script: + - coveralls < coverage/lcov.info diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/LICENSE new file mode 100644 index 0000000..7f15435 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Evgeny Poberezkin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/README.md new file mode 100644 index 0000000..d4286a2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/README.md @@ -0,0 +1,69 @@ +# json-schema-traverse +Traverse JSON Schema passing each schema object to callback + +[![Build Status](https://travis-ci.org/epoberezkin/json-schema-traverse.svg?branch=master)](https://travis-ci.org/epoberezkin/json-schema-traverse) +[![npm version](https://badge.fury.io/js/json-schema-traverse.svg)](https://www.npmjs.com/package/json-schema-traverse) +[![Coverage Status](https://coveralls.io/repos/github/epoberezkin/json-schema-traverse/badge.svg?branch=master)](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master) + + +## Install + +``` +npm install json-schema-traverse +``` + + +## Usage + +```javascript +const traverse = require('json-schema-traverse'); +const schema = { + properties: { + foo: {type: 'string'}, + bar: {type: 'integer'} + } +}; + +traverse(schema, cb); +// cb is called 3 times with: +// 1. root schema +// 2. {type: 'string'} +// 3. {type: 'integer'} +``` + +Callback function is called for each schema object (not including draft-06 boolean schemas), including the root schema. Schema references ($ref) are not resolved, they are passed as is. + +Callback is passed these parameters: + +- _schema_: the current schema object +- _JSON pointer_: from the root schema to the current schema object +- _root schema_: the schema passed to `traverse` object +- _parent JSON pointer_: from the root schema to the parent schema object (see below) +- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.) +- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema +- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'` + + +## Traverse objects in all unknown keywords + +```javascript +const traverse = require('json-schema-traverse'); +const schema = { + mySchema: { + minimum: 1, + maximum: 2 + } +}; + +traverse(schema, {allKeys: true}, cb); +// cb is called 2 times with: +// 1. root schema +// 2. mySchema +``` + +Without option `allKeys: true` callback will be called only with root schema. + + +## License + +[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/index.js new file mode 100644 index 0000000..79eeb6a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/index.js @@ -0,0 +1,81 @@ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i=0.3.0 <0.4.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/ajv" + ] + ], + "_from": "json-schema-traverse@>=0.3.0 <0.4.0", + "_id": "json-schema-traverse@0.3.1", + "_inCache": true, + "_location": "/json-schema-traverse", + "_nodeVersion": "6.9.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/json-schema-traverse-0.3.1.tgz_1498261856588_0.601617609616369" + }, + "_npmUser": { + "name": "esp", + "email": "e.poberezkin@me.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "json-schema-traverse@^0.3.0", + "scope": null, + "escapedName": "json-schema-traverse", + "name": "json-schema-traverse", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/ajv" + ], + "_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "_shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", + "_shrinkwrap": null, + "_spec": "json-schema-traverse@^0.3.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/ajv", + "author": { + "name": "Evgeny Poberezkin" + }, + "bugs": { + "url": "https://github.com/epoberezkin/json-schema-traverse/issues" + }, + "dependencies": {}, + "description": "Traverse JSON Schema passing each schema object to callback", + "devDependencies": { + "coveralls": "^2.13.1", + "eslint": "^3.19.0", + "mocha": "^3.4.2", + "nyc": "^11.0.2", + "pre-commit": "^1.2.2" + }, + "directories": {}, + "dist": { + "shasum": "349a6d44c53a51de89b40805c5d5e59b417d3340", + "tarball": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz" + }, + "gitHead": "f0a6627655525debea519dc8ebb4cf35f3c8e85f", + "homepage": "https://github.com/epoberezkin/json-schema-traverse#readme", + "keywords": [ + "JSON-Schema", + "traverse", + "iterate" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "esp", + "email": "e.poberezkin@me.com" + } + ], + "name": "json-schema-traverse", + "nyc": { + "exclude": [ + "**/spec/**", + "node_modules" + ], + "reporter": [ + "lcov", + "text-summary" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/epoberezkin/json-schema-traverse.git" + }, + "scripts": { + "eslint": "eslint index.js spec", + "test": "npm run eslint && nyc npm run test-spec", + "test-spec": "mocha spec -R spec" + }, + "version": "0.3.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/.eslintrc.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/.eslintrc.yml new file mode 100644 index 0000000..3344da7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/.eslintrc.yml @@ -0,0 +1,6 @@ +parserOptions: + ecmaVersion: 6 +globals: + beforeEach: false + describe: false + it: false diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/fixtures/schema.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/fixtures/schema.js new file mode 100644 index 0000000..c51430c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/fixtures/schema.js @@ -0,0 +1,125 @@ +'use strict'; + +var schema = { + additionalItems: subschema('additionalItems'), + items: subschema('items'), + contains: subschema('contains'), + additionalProperties: subschema('additionalProperties'), + propertyNames: subschema('propertyNames'), + not: subschema('not'), + allOf: [ + subschema('allOf_0'), + subschema('allOf_1'), + { + items: [ + subschema('items_0'), + subschema('items_1'), + ] + } + ], + anyOf: [ + subschema('anyOf_0'), + subschema('anyOf_1'), + ], + oneOf: [ + subschema('oneOf_0'), + subschema('oneOf_1'), + ], + definitions: { + foo: subschema('definitions_foo'), + bar: subschema('definitions_bar'), + }, + properties: { + foo: subschema('properties_foo'), + bar: subschema('properties_bar'), + }, + patternProperties: { + foo: subschema('patternProperties_foo'), + bar: subschema('patternProperties_bar'), + }, + dependencies: { + foo: subschema('dependencies_foo'), + bar: subschema('dependencies_bar'), + }, + required: ['foo', 'bar'] +}; + + +function subschema(keyword) { + var sch = { + properties: {}, + additionalProperties: false, + additionalItems: false, + anyOf: [ + {format: 'email'}, + {format: 'hostname'} + ] + }; + sch.properties['foo_' + keyword] = {title: 'foo'}; + sch.properties['bar_' + keyword] = {title: 'bar'}; + return sch; +} + + +module.exports = { + schema: schema, + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + expectedCalls: [[schema, '', schema, undefined, undefined, undefined, undefined]] + .concat(expectedCalls('additionalItems')) + .concat(expectedCalls('items')) + .concat(expectedCalls('contains')) + .concat(expectedCalls('additionalProperties')) + .concat(expectedCalls('propertyNames')) + .concat(expectedCalls('not')) + .concat(expectedCallsChild('allOf', 0)) + .concat(expectedCallsChild('allOf', 1)) + .concat([ + [schema.allOf[2], '/allOf/2', schema, '', 'allOf', schema, 2], + [schema.allOf[2].items[0], '/allOf/2/items/0', schema, '/allOf/2', 'items', schema.allOf[2], 0], + [schema.allOf[2].items[0].properties.foo_items_0, '/allOf/2/items/0/properties/foo_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'foo_items_0'], + [schema.allOf[2].items[0].properties.bar_items_0, '/allOf/2/items/0/properties/bar_items_0', schema, '/allOf/2/items/0', 'properties', schema.allOf[2].items[0], 'bar_items_0'], + [schema.allOf[2].items[0].anyOf[0], '/allOf/2/items/0/anyOf/0', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 0], + [schema.allOf[2].items[0].anyOf[1], '/allOf/2/items/0/anyOf/1', schema, '/allOf/2/items/0', 'anyOf', schema.allOf[2].items[0], 1], + + [schema.allOf[2].items[1], '/allOf/2/items/1', schema, '/allOf/2', 'items', schema.allOf[2], 1], + [schema.allOf[2].items[1].properties.foo_items_1, '/allOf/2/items/1/properties/foo_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'foo_items_1'], + [schema.allOf[2].items[1].properties.bar_items_1, '/allOf/2/items/1/properties/bar_items_1', schema, '/allOf/2/items/1', 'properties', schema.allOf[2].items[1], 'bar_items_1'], + [schema.allOf[2].items[1].anyOf[0], '/allOf/2/items/1/anyOf/0', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 0], + [schema.allOf[2].items[1].anyOf[1], '/allOf/2/items/1/anyOf/1', schema, '/allOf/2/items/1', 'anyOf', schema.allOf[2].items[1], 1] + ]) + .concat(expectedCallsChild('anyOf', 0)) + .concat(expectedCallsChild('anyOf', 1)) + .concat(expectedCallsChild('oneOf', 0)) + .concat(expectedCallsChild('oneOf', 1)) + .concat(expectedCallsChild('definitions', 'foo')) + .concat(expectedCallsChild('definitions', 'bar')) + .concat(expectedCallsChild('properties', 'foo')) + .concat(expectedCallsChild('properties', 'bar')) + .concat(expectedCallsChild('patternProperties', 'foo')) + .concat(expectedCallsChild('patternProperties', 'bar')) + .concat(expectedCallsChild('dependencies', 'foo')) + .concat(expectedCallsChild('dependencies', 'bar')) +}; + + +function expectedCalls(keyword) { + return [ + [schema[keyword], `/${keyword}`, schema, '', keyword, schema, undefined], + [schema[keyword].properties[`foo_${keyword}`], `/${keyword}/properties/foo_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `foo_${keyword}`], + [schema[keyword].properties[`bar_${keyword}`], `/${keyword}/properties/bar_${keyword}`, schema, `/${keyword}`, 'properties', schema[keyword], `bar_${keyword}`], + [schema[keyword].anyOf[0], `/${keyword}/anyOf/0`, schema, `/${keyword}`, 'anyOf', schema[keyword], 0], + [schema[keyword].anyOf[1], `/${keyword}/anyOf/1`, schema, `/${keyword}`, 'anyOf', schema[keyword], 1] + ]; +} + + +function expectedCallsChild(keyword, i) { + return [ + [schema[keyword][i], `/${keyword}/${i}`, schema, '', keyword, schema, i], + [schema[keyword][i].properties[`foo_${keyword}_${i}`], `/${keyword}/${i}/properties/foo_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `foo_${keyword}_${i}`], + [schema[keyword][i].properties[`bar_${keyword}_${i}`], `/${keyword}/${i}/properties/bar_${keyword}_${i}`, schema, `/${keyword}/${i}`, 'properties', schema[keyword][i], `bar_${keyword}_${i}`], + [schema[keyword][i].anyOf[0], `/${keyword}/${i}/anyOf/0`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 0], + [schema[keyword][i].anyOf[1], `/${keyword}/${i}/anyOf/1`, schema, `/${keyword}/${i}`, 'anyOf', schema[keyword][i], 1] + ]; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/index.spec.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/index.spec.js new file mode 100644 index 0000000..7e66143 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema-traverse/spec/index.spec.js @@ -0,0 +1,102 @@ +'use strict'; + +var traverse = require('../index'); +var assert = require('assert'); + +describe('json-schema-traverse', function() { + var calls; + + beforeEach(function() { + calls = []; + }); + + it('should traverse all keywords containing schemas recursively', function() { + var schema = require('./fixtures/schema').schema; + var expectedCalls = require('./fixtures/schema').expectedCalls; + + traverse(schema, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + describe('allKeys option', function() { + var schema = { + someObject: { + minimum: 1, + maximum: 2 + } + }; + + it('should traverse objects with allKeys: true option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined], + [schema.someObject, '/someObject', schema, '', 'someObject', schema, undefined] + ]; + + traverse(schema, {allKeys: true}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects with allKeys: false option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, {allKeys: false}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT traverse objects without allKeys option', function() { + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema, '', schema, undefined, undefined, undefined, undefined] + ]; + + traverse(schema, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + + + it('should NOT travers objects in standard keywords which value is not a schema', function() { + var schema2 = { + const: {foo: 'bar'}, + enum: ['a', 'b'], + required: ['foo'], + another: { + + }, + patternProperties: {}, // will not traverse - no properties + dependencies: true, // will not traverse - invalid + properties: { + smaller: { + type: 'number' + }, + larger: { + type: 'number', + minimum: {$data: '1/smaller'} + } + } + }; + + // schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex + var expectedCalls = [ + [schema2, '', schema2, undefined, undefined, undefined, undefined], + [schema2.another, '/another', schema2, '', 'another', schema2, undefined], + [schema2.properties.smaller, '/properties/smaller', schema2, '', 'properties', schema2, 'smaller'], + [schema2.properties.larger, '/properties/larger', schema2, '', 'properties', schema2, 'larger'], + ]; + + traverse(schema2, {allKeys: true}, callback); + assert.deepStrictEqual(calls, expectedCalls); + }); + }); + + + function callback() { + calls.push(Array.prototype.slice.call(arguments)); + } +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/README.md new file mode 100644 index 0000000..ccc591b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/README.md @@ -0,0 +1,5 @@ +JSON Schema is a repository for the JSON Schema specification, reference schemas and a CommonJS implementation of JSON Schema (not the only JavaScript implementation of JSON Schema, JSV is another excellent JavaScript validator). + +Code is licensed under the AFL or BSD license as part of the Persevere +project which is administered under the Dojo foundation, +and all contributions require a Dojo CLA. \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/hyper-schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/hyper-schema new file mode 100644 index 0000000..12fe26b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "dot-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/json-ref b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/json-ref new file mode 100644 index 0000000..0c825bc --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/links b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/links new file mode 100644 index 0000000..c9b5517 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/links @@ -0,0 +1,33 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/schema new file mode 100644 index 0000000..a3a2144 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-00/schema @@ -0,0 +1,155 @@ +{ + "$schema" : "http://json-schema.org/draft-00/hyper-schema#", + "id" : "http://json-schema.org/draft-00/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1 + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "maxDecimal" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/hyper-schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/hyper-schema new file mode 100644 index 0000000..66e835b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "dot-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/json-ref b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/json-ref new file mode 100644 index 0000000..f2ad55b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/links b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/links new file mode 100644 index 0000000..cb183c4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/links @@ -0,0 +1,33 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/schema new file mode 100644 index 0000000..e6b6aea --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-01/schema @@ -0,0 +1,155 @@ +{ + "$schema" : "http://json-schema.org/draft-01/hyper-schema#", + "id" : "http://json-schema.org/draft-01/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1 + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "maxDecimal" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/hyper-schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/hyper-schema new file mode 100644 index 0000000..2d2bc68 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/hyper-schema @@ -0,0 +1,68 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, + "optional" : true + }, + + "fragmentResolution" : { + "type" : "string", + "optional" : true, + "default" : "slash-delimited" + }, + + "root" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pathStart" : { + "type" : "string", + "optional" : true, + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "optional" : true, + "format" : "media-type" + }, + + "alternate" : { + "type" : "array", + "items" : {"$ref" : "#"}, + "optional" : true + } + }, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "slash-delimited", + "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/json-ref b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/json-ref new file mode 100644 index 0000000..2b23fcd --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/json-ref#", + + "items" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + }, + + { + "href" : "{id}", + "rel" : "self" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/links b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/links new file mode 100644 index 0000000..ab971b7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/links @@ -0,0 +1,35 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string" + }, + + "rel" : { + "type" : "string" + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET", + "optional" : true + }, + + "enctype" : { + "type" : "string", + "requires" : "method", + "optional" : true + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, + "optional" : true + } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/schema new file mode 100644 index 0000000..cc2b669 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-02/schema @@ -0,0 +1,166 @@ +{ + "$schema" : "http://json-schema.org/draft-02/hyper-schema#", + "id" : "http://json-schema.org/draft-02/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "optional" : true, + "uniqueItems" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + }, + + "optional" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "optional" : true, + "default" : {} + }, + + "requires" : { + "type" : ["string", {"$ref" : "#"}], + "optional" : true + }, + + "minimum" : { + "type" : "number", + "optional" : true + }, + + "maximum" : { + "type" : "number", + "optional" : true + }, + + "minimumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "minimum", + "default" : true + }, + + "maximumCanEqual" : { + "type" : "boolean", + "optional" : true, + "requires" : "maximum", + "default" : true + }, + + "minItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "optional" : true, + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "optional" : true, + "default" : false + }, + + "pattern" : { + "type" : "string", + "optional" : true, + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "optional" : true, + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer", + "optional" : true + }, + + "enum" : { + "type" : "array", + "optional" : true, + "minItems" : 1, + "uniqueItems" : true + }, + + "title" : { + "type" : "string", + "optional" : true + }, + + "description" : { + "type" : "string", + "optional" : true + }, + + "format" : { + "type" : "string", + "optional" : true + }, + + "contentEncoding" : { + "type" : "string", + "optional" : true + }, + + "default" : { + "type" : "any", + "optional" : true + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "minimumCanEqual" : false, + "optional" : true, + "default" : 1 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : {"type" : "string"}, + "optional" : true, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "optional" : true, + "default" : {} + } + }, + + "optional" : true, + "default" : {} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/address b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/address new file mode 100644 index 0000000..401f20f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/address @@ -0,0 +1,20 @@ +{ + "description" : "An Address following the convention of http://microformats.org/wiki/hcard", + "type" : "object", + "properties" : { + "post-office-box" : { "type" : "string" }, + "extended-address" : { "type" : "string" }, + "street-address" : { "type":"string" }, + "locality" : { "type" : "string", "required" : true }, + "region" : { "type" : "string", "required" : true }, + "postal-code" : { "type" : "string" }, + "country-name" : { "type" : "string", "required" : true } + }, + "dependencies" : { + "post-office-box" : "street-address", + "extended-address" : "street-address", + "street-address" : "region", + "locality" : "region", + "region" : "country-name" + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/calendar b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/calendar new file mode 100644 index 0000000..0ec47c2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/calendar @@ -0,0 +1,53 @@ +{ + "description" : "A representation of an event", + "type" : "object", + "properties" : { + "dtstart" : { + "format" : "date-time", + "type" : "string", + "description" : "Event starting time", + "required":true + }, + "summary" : { + "type":"string", + "required":true + }, + "location" : { + "type" : "string" + }, + "url" : { + "type" : "string", + "format" : "url" + }, + "dtend" : { + "format" : "date-time", + "type" : "string", + "description" : "Event ending time" + }, + "duration" : { + "format" : "date", + "type" : "string", + "description" : "Event duration" + }, + "rdate" : { + "format" : "date-time", + "type" : "string", + "description" : "Recurrence date" + }, + "rrule" : { + "type" : "string", + "description" : "Recurrence rule" + }, + "category" : { + "type" : "string" + }, + "description" : { + "type" : "string" + }, + "geo" : { "$ref" : "http://json-schema.org/draft-03/geo" } + } +} + + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/card b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/card new file mode 100644 index 0000000..a5667ff --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/card @@ -0,0 +1,105 @@ +{ + "description":"A representation of a person, company, organization, or place", + "type":"object", + "properties":{ + "fn":{ + "description":"Formatted Name", + "type":"string" + }, + "familyName":{ + "type":"string", + "required":true + }, + "givenName":{ + "type":"string", + "required":true + }, + "additionalName":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "honorificPrefix":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "honorificSuffix":{ + "type":"array", + "items":{ + "type":"string" + } + }, + "nickname":{ + "type":"string" + }, + "url":{ + "type":"string", + "format":"url" + }, + "email":{ + "type":"object", + "properties":{ + "type":{ + "type":"string" + }, + "value":{ + "type":"string", + "format":"email" + } + } + }, + "tel":{ + "type":"object", + "properties":{ + "type":{ + "type":"string" + }, + "value":{ + "type":"string", + "format":"phone" + } + } + }, + "adr":{"$ref" : "http://json-schema.org/address"}, + "geo":{"$ref" : "http://json-schema.org/geo"}, + "tz":{ + "type":"string" + }, + "photo":{ + "format":"image", + "type":"string" + }, + "logo":{ + "format":"image", + "type":"string" + }, + "sound":{ + "format":"attachment", + "type":"string" + }, + "bday":{ + "type":"string", + "format":"date" + }, + "title":{ + "type":"string" + }, + "role":{ + "type":"string" + }, + "org":{ + "type":"object", + "properties":{ + "organizationName":{ + "type":"string" + }, + "organizationUnit":{ + "type":"string" + } + } + } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/geo b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/geo new file mode 100644 index 0000000..4357a90 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/geo @@ -0,0 +1,8 @@ +{ + "description" : "A geographical coordinate", + "type" : "object", + "properties" : { + "latitude" : { "type" : "number" }, + "longitude" : { "type" : "number" } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/interfaces b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/interfaces new file mode 100644 index 0000000..b8532f2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/examples/interfaces @@ -0,0 +1,23 @@ +{ + "extends":"http://json-schema.org/hyper-schema", + "description":"A schema for schema interface definitions that describe programmatic class structures using JSON schema syntax", + "properties":{ + "methods":{ + "type":"object", + "description":"This defines the set of methods available to the class instances", + "additionalProperties":{ + "type":"object", + "description":"The definition of the method", + "properties":{ + "parameters":{ + "type":"array", + "description":"The set of parameters that should be passed to the method when it is called", + "items":{"$ref":"#"}, + "required": true + }, + "returns":{"$ref":"#"} + } + } + } + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/hyper-schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/hyper-schema new file mode 100644 index 0000000..38ca2e1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/hyper-schema @@ -0,0 +1,60 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, + "id" : "http://json-schema.org/draft-03/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} + }, + + "fragmentResolution" : { + "type" : "string", + "default" : "slash-delimited" + }, + + "root" : { + "type" : "boolean", + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "default" : false + }, + + "contentEncoding" : { + "type" : "string" + }, + + "pathStart" : { + "type" : "string", + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "format" : "media-type" + } + }, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "slash-delimited" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/json-ref b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/json-ref new file mode 100644 index 0000000..66e08f2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/json-ref @@ -0,0 +1,26 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "id" : "http://json-schema.org/draft-03/json-ref#", + + "additionalItems" : {"$ref" : "#"}, + "additionalProperties" : {"$ref" : "#"}, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "dot-delimited" +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/links b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/links new file mode 100644 index 0000000..9fa63f9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/links @@ -0,0 +1,35 @@ +{ + "$schema" : "http://json-schema.org/draft-03/hyper-schema#", + "id" : "http://json-schema.org/draft-03/links#", + "type" : "object", + + "properties" : { + "href" : { + "type" : "string", + "required" : true, + "format" : "link-description-object-template" + }, + + "rel" : { + "type" : "string", + "required" : true + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET" + }, + + "enctype" : { + "type" : "string", + "requires" : "method" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} + } + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/schema new file mode 100644 index 0000000..29d9469 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-03/schema @@ -0,0 +1,174 @@ +{ + "$schema" : "http://json-schema.org/draft-03/schema#", + "id" : "http://json-schema.org/draft-03/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true, + "default" : "any" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "patternProperties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalItems" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "required" : { + "type" : "boolean", + "default" : false + }, + + "dependencies" : { + "type" : "object", + "additionalProperties" : { + "type" : ["string", "array", {"$ref" : "#"}], + "items" : { + "type" : "string" + } + }, + "default" : {} + }, + + "minimum" : { + "type" : "number" + }, + + "maximum" : { + "type" : "number" + }, + + "exclusiveMinimum" : { + "type" : "boolean", + "default" : false + }, + + "exclusiveMaximum" : { + "type" : "boolean", + "default" : false + }, + + "minItems" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "default" : false + }, + + "pattern" : { + "type" : "string", + "format" : "regex" + }, + + "minLength" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer" + }, + + "enum" : { + "type" : "array", + "minItems" : 1, + "uniqueItems" : true + }, + + "default" : { + "type" : "any" + }, + + "title" : { + "type" : "string" + }, + + "description" : { + "type" : "string" + }, + + "format" : { + "type" : "string" + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "exclusiveMinimum" : true, + "default" : 1 + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "id" : { + "type" : "string", + "format" : "uri" + }, + + "$ref" : { + "type" : "string", + "format" : "uri" + }, + + "$schema" : { + "type" : "string", + "format" : "uri" + } + }, + + "dependencies" : { + "exclusiveMinimum" : "minimum", + "exclusiveMaximum" : "maximum" + }, + + "default" : {} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/hyper-schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/hyper-schema new file mode 100644 index 0000000..63fb34d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/hyper-schema @@ -0,0 +1,60 @@ +{ + "$schema" : "http://json-schema.org/draft-04/hyper-schema#", + "extends" : {"$ref" : "http://json-schema.org/draft-04/schema#"}, + "id" : "http://json-schema.org/draft-04/hyper-schema#", + + "properties" : { + "links" : { + "type" : "array", + "items" : {"$ref" : "http://json-schema.org/draft-04/links#"} + }, + + "fragmentResolution" : { + "type" : "string", + "default" : "json-pointer" + }, + + "root" : { + "type" : "boolean", + "default" : false + }, + + "readonly" : { + "type" : "boolean", + "default" : false + }, + + "contentEncoding" : { + "type" : "string" + }, + + "pathStart" : { + "type" : "string", + "format" : "uri" + }, + + "mediaType" : { + "type" : "string", + "format" : "media-type" + } + }, + + "links" : [ + { + "href" : "{id}", + "rel" : "self" + }, + + { + "href" : "{$ref}", + "rel" : "full" + }, + + { + "href" : "{$schema}", + "rel" : "describedby" + } + ], + + "fragmentResolution" : "json-pointer" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/links b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/links new file mode 100644 index 0000000..6c06d29 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/links @@ -0,0 +1,41 @@ +{ + "$schema" : "http://json-schema.org/draft-04/hyper-schema#", + "id" : "http://json-schema.org/draft-04/links#", + "type" : "object", + + "properties" : { + "rel" : { + "type" : "string" + }, + + "href" : { + "type" : "string" + }, + + "template" : { + "type" : "string" + }, + + "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, + + "method" : { + "type" : "string", + "default" : "GET" + }, + + "enctype" : { + "type" : "string" + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} + } + }, + + "required" : ["rel", "href"], + + "dependencies" : { + "enctype" : "method" + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/schema b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/schema new file mode 100644 index 0000000..4231b16 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-04/schema @@ -0,0 +1,189 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema#", + "id" : "http://json-schema.org/draft-04/schema#", + "type" : "object", + + "properties" : { + "type" : { + "type" : [ + { + "id" : "#simple-type", + "type" : "string", + "enum" : ["object", "array", "string", "number", "boolean", "null", "any"] + }, + "array" + ], + "items" : { + "type" : [ + {"$ref" : "#simple-type"}, + {"$ref" : "#"} + ] + }, + "uniqueItems" : true, + "default" : "any" + }, + + "disallow" : { + "type" : ["string", "array"], + "items" : { + "type" : ["string", {"$ref" : "#"}] + }, + "uniqueItems" : true + }, + + "extends" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "enum" : { + "type" : "array", + "minItems" : 1, + "uniqueItems" : true + }, + + "minimum" : { + "type" : "number" + }, + + "maximum" : { + "type" : "number" + }, + + "exclusiveMinimum" : { + "type" : "boolean", + "default" : false + }, + + "exclusiveMaximum" : { + "type" : "boolean", + "default" : false + }, + + "divisibleBy" : { + "type" : "number", + "minimum" : 0, + "exclusiveMinimum" : true, + "default" : 1 + }, + + "minLength" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxLength" : { + "type" : "integer" + }, + + "pattern" : { + "type" : "string" + }, + + "items" : { + "type" : [{"$ref" : "#"}, "array"], + "items" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalItems" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "minItems" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxItems" : { + "type" : "integer", + "minimum" : 0 + }, + + "uniqueItems" : { + "type" : "boolean", + "default" : false + }, + + "properties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "patternProperties" : { + "type" : "object", + "additionalProperties" : {"$ref" : "#"}, + "default" : {} + }, + + "additionalProperties" : { + "type" : [{"$ref" : "#"}, "boolean"], + "default" : {} + }, + + "minProperties" : { + "type" : "integer", + "minimum" : 0, + "default" : 0 + }, + + "maxProperties" : { + "type" : "integer", + "minimum" : 0 + }, + + "required" : { + "type" : "array", + "items" : { + "type" : "string" + } + }, + + "dependencies" : { + "type" : "object", + "additionalProperties" : { + "type" : ["string", "array", {"$ref" : "#"}], + "items" : { + "type" : "string" + } + }, + "default" : {} + }, + + "id" : { + "type" : "string" + }, + + "$ref" : { + "type" : "string" + }, + + "$schema" : { + "type" : "string" + }, + + "title" : { + "type" : "string" + }, + + "description" : { + "type" : "string" + }, + + "default" : { + "type" : "any" + } + }, + + "dependencies" : { + "exclusiveMinimum" : "minimum", + "exclusiveMaximum" : "maximum" + }, + + "default" : {} +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-03.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-03.xml new file mode 100644 index 0000000..cf60620 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-03.xml @@ -0,0 +1,1120 @@ + + + + + + + + + + + + + + + +]> + + + + + + + + + A JSON Media Type for Describing the Structure and Meaning of JSON Documents + + + SitePen (USA) +
+ + 530 Lytton Avenue + Palo Alto, CA 94301 + USA + + +1 650 968 8787 + kris@sitepen.com +
+
+ + +
+ + + Calgary, AB + Canada + + gary.court@gmail.com +
+
+ + + Internet Engineering Task Force + JSON + Schema + JavaScript + Object + Notation + Hyper Schema + Hypermedia + + + + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + + +
+ + +
+ + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + +
+ +
+ + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be + interpreted as described in RFC 2119. + +
+ + + +
+ + JSON Schema defines the media type "application/schema+json" for + describing the structure of other + JSON documents. JSON Schema is JSON-based and includes facilities + for describing the structure of JSON documents in terms of + allowable values, descriptions, and interpreting relations with other resources. + + + JSON Schema format is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary + concerned with describing a JSON structure and specifying valid elements + in the structure. The second definition is the Hyper Schema specification + which is intended define elements in a structure that can be interpreted as + hyperlinks. + Hyper Schema builds on JSON Schema to describe the hyperlink structure of + other JSON documents and elements of interaction. This allows user agents to be able to successfully navigate + JSON documents based on their schemas. + + + Cumulatively JSON Schema acts as a meta-document that can be used to define the required type and constraints on + property values, as well as define the meaning of the property values + for the purpose of describing a resource and determining hyperlinks + within the representation. + +
+ An example JSON Schema that describes products might look like: + + + + + This schema defines the properties of the instance JSON documents, + the required properties (id, name, and price), as well as an optional + property (tags). This also defines the link relations of the instance + JSON documents. + +
+ +
+ + For this specification, schema will be used to denote a JSON Schema + definition, and an instance refers to a JSON value that the schema + will be describing and validating. + +
+ +
+ + The JSON Schema media type does not attempt to dictate the structure of JSON + representations that contain data, but rather provides a separate format + for flexibly communicating how a JSON representation should be + interpreted and validated, such that user agents can properly understand + acceptable structures and extrapolate hyperlink information + with the JSON document. It is acknowledged that JSON documents come + in a variety of structures, and JSON is unique in that the structure + of stored data structures often prescribes a non-ambiguous definite + JSON representation. Attempting to force a specific structure is generally + not viable, and therefore JSON Schema allows for a great flexibility + in the structure of the JSON data that it describes. + + + This specification is protocol agnostic. + The underlying protocol (such as HTTP) should sufficiently define the + semantics of the client-server interface, the retrieval of resource + representations linked to by JSON representations, and modification of + those resources. The goal of this + format is to sufficiently describe JSON structures such that one can + utilize existing information available in existing JSON + representations from a large variety of services that leverage a representational state transfer + architecture using existing protocols. + +
+
+ +
+ + JSON Schema instances are correlated to their schema by the "describedby" + relation, where the schema is defined to be the target of the relation. + Instance representations may be of the "application/json" media type or + any other subtype. Consequently, dictating how an instance + representation should specify the relation to the schema is beyond the normative scope + of this document (since this document specifically defines the JSON + Schema media type, and no other), but it is recommended that instances + specify their schema so that user agents can interpret the instance + representation and messages may retain the self-descriptive + characteristic, avoiding the need for out-of-band information about + instance data. Two approaches are recommended for declaring the + relation to the schema that describes the meaning of a JSON instance's (or collection + of instances) structure. A MIME type parameter named + "profile" or a relation of "describedby" (which could be defined by a Link header) may be used: + +
+ + + +
+ + or if the content is being transferred by a protocol (such as HTTP) that + provides headers, a Link header can be used: + +
+ +; rel="describedby" +]]> + +
+ + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is defined by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. When collections contain heterogeneous + instances, the "pathStart" attribute MAY be specified in the + schema to disambiguate which schema should be applied for each item in the + collection. However, ultimately, the mechanism for referencing a schema is up to the + media type of the instance documents (if they choose to specify that schemas + can be referenced). +
+ +
+ + JSON Schemas can themselves be described using JSON Schemas. + A self-describing JSON Schema for the core JSON Schema can + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-03/schema for the draft-03 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema + or http://json-schema.org/draft-03/hyper-schema. All schemas + used within a protocol with media type definitions + SHOULD include a MIME parameter that refers to the self-descriptive + hyper schema or another schema that extends this hyper schema: + +
+ + + +
+
+
+
+ +
+ + A JSON Schema is a JSON Object that defines various attributes + (including usage and valid values) of a JSON value. JSON + Schema has recursive capabilities; there are a number of elements + in the structure that allow for nested JSON Schemas. + + +
+ An example JSON Schema definition could look like: + + + +
+ + + A JSON Schema object may have any of the following properties, called schema + attributes (all attributes are optional): + + +
+ + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute can take one of two forms: + + + + A string indicating a primitive or simple type. The following are acceptable string values: + + + Value MUST be a string. + Value MUST be a number, floating point numbers are allowed. + Value MUST be an integer, no floating point numbers are allowed. This is a subset of the number type. + Value MUST be a boolean. + Value MUST be an object. + Value MUST be an array. + Value MUST be null. Note this is mainly for purpose of being able use union types to define nullability. If this type is not included in a union, null values are not allowed (the primitives listed above do not allow nulls on their own). + Value MAY be of any type including null. + + + If the property is not defined or is not in this list, then any type of value is acceptable. + Other type values MAY be used for custom purposes, but minimal validators of the specification + implementation can allow any instance value on unknown type values. + + + + An array of two or more simple type definitions. Each item in the array MUST be a simple type definition or a schema. + The instance value is valid if it is of the same type as one of the simple type definitions, or valid by one of the schemas, in the array. + + + + +
+ For example, a schema that defines if an instance can be a string or a number would be: + + +
+
+ +
+ This attribute is an object with property definitions that define the valid values of instance object property values. When the instance value is an object, the property values of the instance object MUST conform to the property definitions in this object. In this object, each property definition's value MUST be a schema, and the property's name MUST be the name of the instance property that it defines. The instance property value MUST be valid according to the schema from the property definition. Properties are considered unordered, the order of the instance properties MAY be in any order. +
+ +
+ This attribute is an object that defines the schema for a set of property names of an object instance. The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. +
+ +
+ This attribute defines a schema for all properties that are not explicitly defined in an object type definition. If specified, the value MUST be a schema or a boolean. If false is provided, no additional properties are allowed beyond the properties defined in the schema. The default value is an empty schema which allows any value for additional properties. +
+ +
+ This attribute defines the allowed items in an instance array, and MUST be a schema or an array of schemas. The default value is an empty schema which allows any value for items in the instance array. + When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. + When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST conform to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute using the same rules as "additionalProperties" for objects. +
+ +
+ This provides a definition for additional items in an array instance when tuple definitions of the items is provided. This can be false to indicate additional items in the array are not allowed, or it can be a schema that defines the schema of the additional items. +
+ +
+ This attribute indicates if the instance must have a value, and not be undefined. This is false by default, making the instance optional. +
+ +
+ This attribute is an object that defines the requirements of a property on an instance object. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). + + The dependency value can take one of two forms: + + + + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. + If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. + + + If the dependency value is a schema, then the instance object MUST be valid against the schema. + + + +
+ +
+ This attribute defines the minimum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute defines the maximum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. +
+ +
+ This attribute defines the minimum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the maximum number of values in an array when the array is the instance value. +
+ +
+ This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). + + Two instance are consider equal if they are both of the same type and: + + + are null; or + are booleans/numbers/strings and have the same value; or + are arrays, contains the same number of items, and each item in the array is equal to the corresponding item in the other array; or + are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. + + +
+ +
+ When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 +
+ +
+ When the instance value is a string, this defines the minimum length of the string. +
+ +
+ When the instance value is a string, this defines the maximum length of the string. +
+ +
+ This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". +
+ +
+ This attribute defines the default value of the instance when the instance is undefined. +
+ +
+ This attribute is a string that provides a short description of the instance property. +
+ +
+ This attribute is a string that provides a full description of the of purpose the instance property. +
+ +
+ This property defines the type of data, content type, or microformat to be expected in the instance property values. A format attribute MAY be one of the values listed below, and if so, SHOULD adhere to the semantics describing for the format. A format SHOULD only be used to give meaning to primitive types (string, integer, number, or boolean). Validators MAY (but are not required to) validate that the instance values conform to a format. + + + The following formats are predefined: + + + This SHOULD be a date in ISO 8601 format of YYYY-MM-DDThh:mm:ssZ in UTC time. This is the recommended form of date/timestamp. + This SHOULD be a date in the format of YYYY-MM-DD. It is recommended that you use the "date-time" format instead of "date" unless you need to transfer only the date part. + This SHOULD be a time in the format of hh:mm:ss. It is recommended that you use the "date-time" format instead of "time" unless you need to transfer only the time part. + This SHOULD be the difference, measured in milliseconds, between the specified time and midnight, 00:00 of January 1, 1970 UTC. The value SHOULD be a number (integer or float). + A regular expression, following the regular expression specification from ECMA 262/Perl 5. + This is a CSS color (like "#FF0000" or "red"), based on CSS 2.1. + This is a CSS style definition (like "color: red; background-color:#FFF"), based on CSS 2.1. + This SHOULD be a phone number (format MAY follow E.123). + This value SHOULD be a URI. + This SHOULD be an email address. + This SHOULD be an ip version 4 address. + This SHOULD be an ip version 6 address. + This SHOULD be a host-name. + + + + Additional custom formats MAY be created. These custom formats MAY be expressed as an URI, and this URI MAY reference a schema of that format. +
+ +
+ This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. +
+ +
+ This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. +
+ +
+ The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. + + Conceptually, the behavior of extends can be seen as validating an + instance against all constraints in the extending schema as well as + the extended schema(s). More optimized implementations that merge + schemas are possible, but are not required. Some examples of using "extends": + +
+ + + +
+ +
+ + + +
+
+
+ +
+ + This attribute defines the current URI of this schema (this attribute is + effectively a "self" link). This URI MAY be relative or absolute. If + the URI is relative it is resolved against the current URI of the parent + schema it is contained in. If this schema is not contained in any + parent schema, the current URI of the parent schema is held to be the + URI under which this schema was addressed. If id is missing, the current URI of a schema is + defined to be that of the parent schema. The current URI of the schema + is also used to construct relative references such as for $ref. + +
+ +
+ + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. + +
+ +
+ + This attribute defines a URI of a JSON Schema that is the schema of the current schema. + When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. + + + + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. + +
+
+ +
+ + The following attributes are specified in addition to those + attributes that already provided by the core schema with the specific + purpose of informing user agents of relations between resources based + on JSON data. Just as with JSON + schema attributes, all the attributes in hyper schemas are optional. + Therefore, an empty object is a valid (non-informative) schema, and + essentially describes plain JSON (no constraints on the structures). + Addition of attributes provides additive information for user agents. + + +
+ + The value of the links property MUST be an array, where each item + in the array is a link description object which describes the link + relations of the instances. + + +
+ + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the + instances of the schema, and can be parameterized by the instance + values. The link description format can be used on its own in + regular (non-schema documents), and use of this format can + be declared by referencing the normative link description + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: + http://json-schema.org/links (latest version) or + http://json-schema.org/draft-03/links (draft-03 version). + + +
+ + The value of the "href" link description property + indicates the target URI of the related resource. The value + of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 + and MAY be a relative URI. The base URI to be used for relative resolution + SHOULD be the URI used to retrieve the instance object (not the schema) + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance + object, if property values exist for the corresponding variables + in the template (otherwise they MAY be provided from alternate sources, like user input). + + + + Instance property values SHOULD be substituted into the URIs where + matching braces ('{', '}') are found surrounding zero or more characters, + creating an expanded URI. Instance property value substitutions are resolved + by using the text between the braces to denote the property name + from the instance to get the value to substitute. + +
+ For example, if an href value is defined: + + + + Then it would be resolved by replace the value of the "id" property value from the instance object. +
+ +
+ If the value of the "id" property was "45", the expanded URI would be: + + + +
+ + If matching braces are found with the string "@" (no quotes) between the braces, then the + actual instance value SHOULD be used to replace the braces, rather than a property value. + This should only be used in situations where the instance is a scalar (string, + boolean, or number), and not for objects or arrays. +
+
+ +
+ + The value of the "rel" property indicates the name of the + relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. + + + + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: + + + + If the relation value is "self", when this property is encountered in + the instance object, the object represents a resource and the instance object is + treated as a full representation of the target resource identified by + the specified URI. + + + + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. + + + + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. + + + + This relation indicates that the target of the link + SHOULD be treated as the root or the body of the representation for the + purposes of user agent interaction or fragment resolution. All other + properties of the instance objects can be regarded as meta-data + descriptions for the data. + + + + + + The following relations are applicable for schemas (the schema as the "from" resource in the relation): + + + This indicates the target resource that represents collection of instances of a schema. + This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). + + + + +
+ For example, if a schema is defined: + + + +
+ +
+ And if a collection of instance resource's JSON representation was retrieved: + + + +
+ + This would indicate that for the first item in the collection, its own + (self) URI would resolve to "/Resource/thing" and the first item's "up" + relation SHOULD be resolved to the resource at "/Resource/parent". + The "children" collection would be located at "/Resource/?upId=thing". +
+
+ +
+ This property value is a schema that defines the expected structure of the JSON representation of the target of the link. +
+ +
+ + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a + means for submitting extra (often user supplied) information to send to a server. + + +
+ + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). + This defaults to "GET". + +
+ +
+ + If present, this property indicates a query media type format that the server + supports for querying or posting to the collection of instances at the target + resource. The query can be + suffixed to the target URI to query the collection with + property-based constraints on the resources that SHOULD be returned from + the server or used to post data to the resource (depending on the method). + +
+ For example, with the following schema: + + + + This indicates that the client can query the server for instances that have a specific name. +
+ +
+ For example: + + + +
+ + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is + the default media type. +
+
+ +
+ + This attribute contains a schema which defines the acceptable structure of the submitted + request (for a GET request, this schema would define the properties for the query string + and for a POST request, this would define the body). + +
+
+
+
+ +
+ + This property indicates the fragment resolution protocol to use for + resolving fragment identifiers in URIs within the instance + representations. This applies to the instance object URIs and all + children of the instance object's URIs. The default fragment resolution + protocol is "slash-delimited", which is defined below. Other fragment + resolution protocols MAY be used, but are not defined in this document. + + + + The fragment identifier is based on RFC 2396, Sec 5, and defines the + mechanism for resolving references to entities within a document. + + +
+ + With the slash-delimited fragment resolution protocol, the fragment + identifier is interpreted as a series of property reference tokens that start with and + are delimited by the "/" character (\x2F). Each property reference token + is a series of unreserved or escaped URI characters. Each property + reference token SHOULD be interpreted, starting from the beginning of + the fragment identifier, as a path reference in the target JSON + structure. The final target value of the fragment can be determined by + starting with the root of the JSON structure from the representation of + the resource identified by the pre-fragment URI. If the target is a JSON + object, then the new target is the value of the property with the name + identified by the next property reference token in the fragment. If the + target is a JSON array, then the target is determined by finding the + item in array the array with the index defined by the next property + reference token (which MUST be a number). The target is successively + updated for each property reference token, until the entire fragment has + been traversed. + + + + Property names SHOULD be URI-encoded. In particular, any "/" in a + property name MUST be encoded to avoid being interpreted as a property + delimiter. + + + +
+ For example, for the following JSON representation: + + + +
+ +
+ The following fragment identifiers would be resolved: + + + +
+
+
+ +
+ + The dot-delimited fragment resolution protocol is the same as + slash-delimited fragment resolution protocol except that the "." character + (\x2E) is used as the delimiter between property names (instead of "/") and + the path does not need to start with a ".". For example, #.foo and #foo are a valid fragment + identifiers for referencing the value of the foo propery. + +
+
+ +
+ This attribute indicates that the instance property SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. +
+ +
+ If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. +
+ +
+ + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + and is relative to the instance's URI. + + + + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by + determining if the URI of the instance begins with the the value of the "pathStart" + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable + to all the instances for which it is referenced. + +
+ +
+ This attribute defines the media type of the instance representations that this schema is defining. +
+
+ +
+ + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. + However, an additional issue is that when link relation of "self" + is used to denote a full representation of an object, the user agent + SHOULD NOT consider the representation to be the authoritative representation + of the resource denoted by the target URI if the target URI is not + equivalent to or a sub-path of the the URI used to request the resource + representation which contains the target URI with the "self" link. + +
+ For example, if a hyper schema was defined: + + + +
+ +
+ And a resource was requested from somesite.com: + + + +
+ +
+ With a response of: + + + +
+
+
+ +
+ The proposed MIME media type for JSON Schema is "application/schema+json". + Type name: application + Subtype name: schema+json + Required parameters: profile + + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the + meta-schema). Normally the value would be http://json-schema.org/draft-03/hyper-schema, + but it is allowable to use other schemas that extend the hyper schema's meta- + schema. + + Optional parameters: pretty + The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. + +
+ + This registry is maintained by IANA per RFC 4287 and this specification adds + four values: "full", "create", "instances", "root". New + assignments are subject to IESG Approval, as outlined in RFC 5226. + Requests should be made by email to IANA, which will then forward the + request to the IESG, requesting approval. + +
+
+
+ + + + + &rfc2045; + &rfc2119; + &rfc2396; + &rfc3339; + &rfc3986; + &rfc4287; + + + &rfc2616; + &rfc4627; + &rfc5226; + &iddiscovery; + &uritemplate; + &linkheader; + &html401; + &css21; + + +
+ + + + + Added example and verbiage to "extends" attribute. + Defined slash-delimited to use a leading slash. + Made "root" a relation instead of an attribute. + Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). + Added more explanation of nullability. + Removed "alternate" attribute. + Upper cased many normative usages of must, may, and should. + Replaced the link submission "properties" attribute to "schema" attribute. + Replaced "optional" attribute with "required" attribute. + Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. + Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. + Replaced "requires" attribute with "dependencies" attribute. + Moved "contentEncoding" attribute to hyper schema. + Added "additionalItems" attribute. + Added "id" attribute. + Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. + Added "patternProperties" attribute. + Schema URIs are now namespace versioned. + Added "$ref" and "$schema" attributes. + + + + + + Replaced "maxDecimal" attribute with "divisibleBy" attribute. + Added slash-delimited fragment resolution protocol and made it the default. + Added language about using links outside of schemas by referencing its normative URI. + Added "uniqueItems" attribute. + Added "targetSchema" attribute to link description object. + + + + + + Fixed category and updates from template. + + + + + + Initial draft. + + + + +
+ +
+ + + Should we give a preference to MIME headers over Link headers (or only use one)? + Should "root" be a MIME parameter? + Should "format" be renamed to "mediaType" or "contentType" to reflect the usage MIME media types that are allowed? + How should dates be handled? + + +
+
+
diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-04.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-04.xml new file mode 100644 index 0000000..8ede6bf --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/draft-zyp-json-schema-04.xml @@ -0,0 +1,1072 @@ + + + + + + + + + + + + + + +]> + + + + + + + + + A JSON Media Type for Describing the Structure and Meaning of JSON Documents + + + SitePen (USA) +
+ + 530 Lytton Avenue + Palo Alto, CA 94301 + USA + + +1 650 968 8787 + kris@sitepen.com +
+
+ + +
+ + + Calgary, AB + Canada + + gary.court@gmail.com +
+
+ + + Internet Engineering Task Force + JSON + Schema + JavaScript + Object + Notation + Hyper Schema + Hypermedia + + + + JSON (JavaScript Object Notation) Schema defines the media type "application/schema+json", + a JSON based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + + +
+ + +
+ + JSON (JavaScript Object Notation) Schema is a JSON media type for defining + the structure of JSON data. JSON Schema provides a contract for what JSON + data is required for a given application and how to interact with it. JSON + Schema is intended to define validation, documentation, hyperlink + navigation, and interaction control of JSON data. + +
+ +
+ + + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", + "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be + interpreted as described in RFC 2119. + + + + The terms "JSON", "JSON text", "JSON value", "member", "element", "object", + "array", "number", "string", "boolean", "true", "false", and "null" in this + document are to be interpreted as defined in RFC 4627. + + + + This specification also uses the following defined terms: + + + A JSON Schema object. + Equivalent to "JSON value" as defined in RFC 4627. + Equivalent to "member" as defined in RFC 4627. + Equivalent to "element" as defined in RFC 4627. + A property of a JSON Schema object. + + +
+ +
+ + JSON Schema defines the media type "application/schema+json" for + describing the structure of JSON text. JSON Schemas are also written in JSON and includes facilities + for describing the structure of JSON in terms of + allowable values, descriptions, and interpreting relations with other resources. + + + This document is organized into several separate definitions. The first + definition is the core schema specification. This definition is primary + concerned with describing a JSON structure and specifying valid elements + in the structure. The second definition is the Hyper Schema specification + which is intended to define elements in a structure that can be interpreted as + hyperlinks. + Hyper Schema builds on JSON Schema to describe the hyperlink structure of + JSON values. This allows user agents to be able to successfully navigate + documents containing JSON based on their schemas. + + + Cumulatively JSON Schema acts as meta-JSON that can be used to define the + required type and constraints on JSON values, as well as define the meaning + of the JSON values for the purpose of describing a resource and determining + hyperlinks within the representation. + +
+ An example JSON Schema that describes products might look like: + + + + + This schema defines the properties of the instance, + the required properties (id, name, and price), as well as an optional + property (tags). This also defines the link relations of the instance. + +
+ +
+ + The JSON Schema media type does not attempt to dictate the structure of JSON + values that contain data, but rather provides a separate format + for flexibly communicating how a JSON value should be + interpreted and validated, such that user agents can properly understand + acceptable structures and extrapolate hyperlink information + from the JSON. It is acknowledged that JSON values come + in a variety of structures, and JSON is unique in that the structure + of stored data structures often prescribes a non-ambiguous definite + JSON representation. Attempting to force a specific structure is generally + not viable, and therefore JSON Schema allows for a great flexibility + in the structure of the JSON data that it describes. + + + This specification is protocol agnostic. + The underlying protocol (such as HTTP) should sufficiently define the + semantics of the client-server interface, the retrieval of resource + representations linked to by JSON representations, and modification of + those resources. The goal of this + format is to sufficiently describe JSON structures such that one can + utilize existing information available in existing JSON + representations from a large variety of services that leverage a representational state transfer + architecture using existing protocols. + +
+
+ +
+ + JSON values are correlated to their schema by the "describedby" + relation, where the schema is the target of the relation. + JSON values MUST be of the "application/json" media type or + any other subtype. Consequently, dictating how a JSON value should + specify the relation to the schema is beyond the normative scope + of this document since this document specifically defines the JSON + Schema media type, and no other. It is RECOMMNENDED that JSON values + specify their schema so that user agents can interpret the instance + and retain the self-descriptive characteristics. This avoides the need for out-of-band information about + instance data. Two approaches are recommended for declaring the + relation to the schema that describes the meaning of a JSON instance's (or collection + of instances) structure. A MIME type parameter named + "profile" or a relation of "describedby" (which could be specified by a Link header) may be used: + +
+ + + +
+ + or if the content is being transferred by a protocol (such as HTTP) that + provides headers, a Link header can be used: + +
+ +; rel="describedby" +]]> + +
+ + Instances MAY specify multiple schemas, to indicate all the schemas that + are applicable to the data, and the data SHOULD be valid by all the schemas. + The instance data MAY have multiple schemas + that it is described by (the instance data SHOULD be valid for those schemas). + Or if the document is a collection of instances, the collection MAY contain + instances from different schemas. The mechanism for referencing a schema is + determined by the media type of the instance (if it provides a method for + referencing schemas). +
+ +
+ + JSON Schemas can themselves be described using JSON Schemas. + A self-describing JSON Schema for the core JSON Schema can + be found at http://json-schema.org/schema for the latest version or + http://json-schema.org/draft-04/schema for the draft-04 version. The hyper schema + self-description can be found at http://json-schema.org/hyper-schema + or http://json-schema.org/draft-04/hyper-schema. All schemas + used within a protocol with a media type specified SHOULD include a MIME parameter that refers to the self-descriptive + hyper schema or another schema that extends this hyper schema: + +
+ + + +
+
+
+
+ +
+ + A JSON Schema is a JSON object that defines various attributes + (including usage and valid values) of a JSON value. JSON + Schema has recursive capabilities; there are a number of elements + in the structure that allow for nested JSON Schemas. + + +
+ An example JSON Schema could look like: + + + +
+ + + A JSON Schema object MAY have any of the following optional properties: + + + + + +
+ + This attribute defines what the primitive type or the schema of the instance MUST be in order to validate. + This attribute can take one of two forms: + + + + A string indicating a primitive or simple type. The string MUST be one of the following values: + + + Instance MUST be an object. + Instance MUST be an array. + Instance MUST be a string. + Instance MUST be a number, including floating point numbers. + Instance MUST be the JSON literal "true" or "false". + Instance MUST be the JSON literal "null". Note that without this type, null values are not allowed. + Instance MAY be of any type, including null. + + + + + An array of one or more simple or schema types. + The instance value is valid if it is of the same type as one of the simple types, or valid by one of the schemas, in the array. + + + + If this attribute is not specified, then all value types are accepted. + + +
+ For example, a schema that defines if an instance can be a string or a number would be: + + +
+
+ +
+ + This attribute is an object with properties that specify the schemas for the properties of the instance object. + In this attribute's object, each property value MUST be a schema. + When the instance value is an object, the value of the instance's properties MUST be valid according to the schemas with the same property names specified in this attribute. + Objects are unordered, so therefore the order of the instance properties or attribute properties MUST NOT determine validation success. + +
+ +
+ + This attribute is an object that defines the schema for a set of property names of an object instance. + The name of each property of this attribute's object is a regular expression pattern in the ECMA 262/Perl 5 format, while the value is a schema. + If the pattern matches the name of a property on the instance object, the value of the instance's property MUST be valid against the pattern name's schema value. + +
+ +
+ This attribute specifies how any instance property that is not explicitly defined by either the "properties" or "patternProperties" attributes (hereafter referred to as "additional properties") is handled. If specified, the value MUST be a schema or a boolean. + If a schema is provided, then all additional properties MUST be valid according to the schema. + If false is provided, then no additional properties are allowed. + The default value is an empty schema, which allows any value for additional properties. +
+ +
+ This attribute provides the allowed items in an array instance. If specified, this attribute MUST be a schema or an array of schemas. + When this attribute value is a schema and the instance value is an array, then all the items in the array MUST be valid according to the schema. + When this attribute value is an array of schemas and the instance value is an array, each position in the instance array MUST be valid according to the schema in the corresponding position for this array. This called tuple typing. When tuple typing is used, additional items are allowed, disallowed, or constrained by the "additionalItems" attribute the same way as "additionalProperties" for objects is. +
+ +
+ This attribute specifies how any item in the array instance that is not explicitly defined by "items" (hereafter referred to as "additional items") is handled. If specified, the value MUST be a schema or a boolean. + If a schema is provided: + + If the "items" attribute is unspecified, then all items in the array instance must be valid against this schema. + If the "items" attribute is a schema, then this attribute is ignored. + If the "items" attribute is an array (during tuple typing), then any additional items MUST be valid against this schema. + + + If false is provided, then any additional items in the array are not allowed. + The default value is an empty schema, which allows any value for additional items. +
+ +
+ This attribute is an array of strings that defines all the property names that must exist on the object instance. +
+ +
+ This attribute is an object that specifies the requirements of a property on an object instance. If an object instance has a property with the same name as a property in this attribute's object, then the instance must be valid against the attribute's property value (hereafter referred to as the "dependency value"). + + The dependency value can take one of two forms: + + + + If the dependency value is a string, then the instance object MUST have a property with the same name as the dependency value. + If the dependency value is an array of strings, then the instance object MUST have a property with the same name as each string in the dependency value's array. + + + If the dependency value is a schema, then the instance object MUST be valid against the schema. + + + +
+ +
+ This attribute defines the minimum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute defines the maximum value of the instance property when the type of the instance value is a number. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "minimum" attribute. This is false by default, meaning the instance value can be greater then or equal to the minimum value. +
+ +
+ This attribute indicates if the value of the instance (if the instance is a number) can not equal the number defined by the "maximum" attribute. This is false by default, meaning the instance value can be less then or equal to the maximum value. +
+ +
+ This attribute defines the minimum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the maximum number of values in an array when the array is the instance value. +
+ +
+ This attribute defines the minimum number of properties required on an object instance. +
+ +
+ This attribute defines the maximum number of properties the object instance can have. +
+ +
+ This attribute indicates that all items in an array instance MUST be unique (contains no two identical values). + + Two instance are consider equal if they are both of the same type and: + + + are null; or + are booleans/numbers/strings and have the same value; or + are arrays, contains the same number of items, and each item in the array is equal to the item at the corresponding index in the other array; or + are objects, contains the same property names, and each property in the object is equal to the corresponding property in the other object. + + +
+ +
+ When the instance value is a string, this provides a regular expression that a string instance MUST match in order to be valid. Regular expressions SHOULD follow the regular expression specification from ECMA 262/Perl 5 +
+ +
+ When the instance value is a string, this defines the minimum length of the string. +
+ +
+ When the instance value is a string, this defines the maximum length of the string. +
+ +
+ This provides an enumeration of all possible values that are valid for the instance property. This MUST be an array, and each item in the array represents a possible value for the instance value. If this attribute is defined, the instance value MUST be one of the values in the array in order for the schema to be valid. Comparison of enum values uses the same algorithm as defined in "uniqueItems". +
+ +
+ This attribute defines the default value of the instance when the instance is undefined. +
+ +
+ This attribute is a string that provides a short description of the instance property. +
+ +
+ This attribute is a string that provides a full description of the of purpose the instance property. +
+ +
+ This attribute defines what value the number instance must be divisible by with no remainder (the result of the division must be an integer.) The value of this attribute SHOULD NOT be 0. +
+ +
+ This attribute takes the same values as the "type" attribute, however if the instance matches the type or if this value is an array and the instance matches any type or schema in the array, then this instance is not valid. +
+ +
+ The value of this property MUST be another schema which will provide a base schema which the current schema will inherit from. The inheritance rules are such that any instance that is valid according to the current schema MUST be valid according to the referenced schema. This MAY also be an array, in which case, the instance MUST be valid for all the schemas in the array. A schema that extends another schema MAY define additional attributes, constrain existing attributes, or add other constraints. + + Conceptually, the behavior of extends can be seen as validating an + instance against all constraints in the extending schema as well as + the extended schema(s). More optimized implementations that merge + schemas are possible, but are not required. Some examples of using "extends": + +
+ + + +
+ +
+ + + +
+
+
+ +
+ + This attribute defines the current URI of this schema (this attribute is + effectively a "self" link). This URI MAY be relative or absolute. If + the URI is relative it is resolved against the current URI of the parent + schema it is contained in. If this schema is not contained in any + parent schema, the current URI of the parent schema is held to be the + URI under which this schema was addressed. If id is missing, the current URI of a schema is + defined to be that of the parent schema. The current URI of the schema + is also used to construct relative references such as for $ref. + +
+ +
+ + This attribute defines a URI of a schema that contains the full representation of this schema. + When a validator encounters this attribute, it SHOULD replace the current schema with the schema referenced by the value's URI (if known and available) and re-validate the instance. + This URI MAY be relative or absolute, and relative URIs SHOULD be resolved against the URI of the current schema. + +
+ +
+ + This attribute defines a URI of a JSON Schema that is the schema of the current schema. + When this attribute is defined, a validator SHOULD use the schema referenced by the value's URI (if known and available) when resolving Hyper Schemalinks. + + + + A validator MAY use this attribute's value to determine which version of JSON Schema the current schema is written in, and provide the appropriate validation features and behavior. + Therefore, it is RECOMMENDED that all schema authors include this attribute in their schemas to prevent conflicts with future JSON Schema specification changes. + +
+
+ +
+ + The following attributes are specified in addition to those + attributes that already provided by the core schema with the specific + purpose of informing user agents of relations between resources based + on JSON data. Just as with JSON + schema attributes, all the attributes in hyper schemas are optional. + Therefore, an empty object is a valid (non-informative) schema, and + essentially describes plain JSON (no constraints on the structures). + Addition of attributes provides additive information for user agents. + + +
+ + The value of the links property MUST be an array, where each item + in the array is a link description object which describes the link + relations of the instances. + + + + +
+ + A link description object is used to describe link relations. In + the context of a schema, it defines the link relations of the + instances of the schema, and can be parameterized by the instance + values. The link description format can be used without JSON Schema, + and use of this format can + be declared by referencing the normative link description + schema as the the schema for the data structure that uses the + links. The URI of the normative link description schema is: + http://json-schema.org/links (latest version) or + http://json-schema.org/draft-04/links (draft-04 version). + + +
+ + The value of the "href" link description property + indicates the target URI of the related resource. The value + of the instance property SHOULD be resolved as a URI-Reference per RFC 3986 + and MAY be a relative URI. The base URI to be used for relative resolution + SHOULD be the URI used to retrieve the instance object (not the schema) + when used within a schema. Also, when links are used within a schema, the URI + SHOULD be parametrized by the property values of the instance + object, if property values exist for the corresponding variables + in the template (otherwise they MAY be provided from alternate sources, like user input). + + + + Instance property values SHOULD be substituted into the URIs where + matching braces ('{', '}') are found surrounding zero or more characters, + creating an expanded URI. Instance property value substitutions are resolved + by using the text between the braces to denote the property name + from the instance to get the value to substitute. + +
+ For example, if an href value is defined: + + + + Then it would be resolved by replace the value of the "id" property value from the instance object. +
+ +
+ If the value of the "id" property was "45", the expanded URI would be: + + + +
+ + If matching braces are found with the string "@" (no quotes) between the braces, then the + actual instance value SHOULD be used to replace the braces, rather than a property value. + This should only be used in situations where the instance is a scalar (string, + boolean, or number), and not for objects or arrays. +
+
+ +
+ + The value of the "rel" property indicates the name of the + relation to the target resource. The relation to the target SHOULD be interpreted as specifically from the instance object that the schema (or sub-schema) applies to, not just the top level resource that contains the object within its hierarchy. If a resource JSON representation contains a sub object with a property interpreted as a link, that sub-object holds the relation with the target. A relation to target from the top level resource MUST be indicated with the schema describing the top level JSON representation. + + + + Relationship definitions SHOULD NOT be media type dependent, and users are encouraged to utilize existing accepted relation definitions, including those in existing relation registries (see RFC 4287). However, we define these relations here for clarity of normative interpretation within the context of JSON hyper schema defined relations: + + + + If the relation value is "self", when this property is encountered in + the instance object, the object represents a resource and the instance object is + treated as a full representation of the target resource identified by + the specified URI. + + + + This indicates that the target of the link is the full representation for the instance object. The object that contains this link possibly may not be the full representation. + + + + This indicates the target of the link is the schema for the instance object. This MAY be used to specifically denote the schemas of objects within a JSON object hierarchy, facilitating polymorphic type data structures. + + + + This relation indicates that the target of the link + SHOULD be treated as the root or the body of the representation for the + purposes of user agent interaction or fragment resolution. All other + properties of the instance objects can be regarded as meta-data + descriptions for the data. + + + + + + The following relations are applicable for schemas (the schema as the "from" resource in the relation): + + + This indicates the target resource that represents collection of instances of a schema. + This indicates a target to use for creating new instances of a schema. This link definition SHOULD be a submission link with a non-safe method (like POST). + + + + +
+ For example, if a schema is defined: + + + +
+ +
+ And if a collection of instance resource's JSON representation was retrieved: + + + +
+ + This would indicate that for the first item in the collection, its own + (self) URI would resolve to "/Resource/thing" and the first item's "up" + relation SHOULD be resolved to the resource at "/Resource/parent". + The "children" collection would be located at "/Resource/?upId=thing". +
+
+ +
+ This property value is a string that defines the templating language used in the "href" attribute. If no templating language is defined, then the default Link Description Object templating langauge is used. +
+ +
+ This property value is a schema that defines the expected structure of the JSON representation of the target of the link. +
+ +
+ + The following properties also apply to link definition objects, and + provide functionality analogous to HTML forms, in providing a + means for submitting extra (often user supplied) information to send to a server. + + +
+ + This attribute defines which method can be used to access the target resource. + In an HTTP environment, this would be "GET" or "POST" (other HTTP methods + such as "PUT" and "DELETE" have semantics that are clearly implied by + accessed resources, and do not need to be defined here). + This defaults to "GET". + +
+ +
+ + If present, this property indicates a query media type format that the server + supports for querying or posting to the collection of instances at the target + resource. The query can be + suffixed to the target URI to query the collection with + property-based constraints on the resources that SHOULD be returned from + the server or used to post data to the resource (depending on the method). + +
+ For example, with the following schema: + + + + This indicates that the client can query the server for instances that have a specific name. +
+ +
+ For example: + + + +
+ + If no enctype or method is specified, only the single URI specified by + the href property is defined. If the method is POST, "application/json" is + the default media type. +
+
+ +
+ + This attribute contains a schema which defines the acceptable structure of the submitted + request (for a GET request, this schema would define the properties for the query string + and for a POST request, this would define the body). + +
+
+
+
+ +
+ + This property indicates the fragment resolution protocol to use for + resolving fragment identifiers in URIs within the instance + representations. This applies to the instance object URIs and all + children of the instance object's URIs. The default fragment resolution + protocol is "json-pointer", which is defined below. Other fragment + resolution protocols MAY be used, but are not defined in this document. + + + + The fragment identifier is based on RFC 3986, Sec 5, and defines the + mechanism for resolving references to entities within a document. + + +
+ The "json-pointer" fragment resolution protocol uses a JSON Pointer to resolve fragment identifiers in URIs within instance representations. +
+
+ + + +
+ This attribute indicates that the instance value SHOULD NOT be changed. Attempts by a user agent to modify the value of this property are expected to be rejected by a server. +
+ +
+ If the instance property value is a string, this attribute defines that the string SHOULD be interpreted as binary data and decoded using the encoding named by this schema property. RFC 2045, Sec 6.1 lists the possible values for this property. +
+ +
+ + This attribute is a URI that defines what the instance's URI MUST start with in order to validate. + The value of the "pathStart" attribute MUST be resolved as per RFC 3986, Sec 5, + and is relative to the instance's URI. + + + + When multiple schemas have been referenced for an instance, the user agent + can determine if this schema is applicable for a particular instance by + determining if the URI of the instance begins with the the value of the "pathStart" + attribute. If the URI of the instance does not start with this URI, + or if another schema specifies a starting URI that is longer and also matches the + instance, this schema SHOULD NOT be applied to the instance. Any schema + that does not have a pathStart attribute SHOULD be considered applicable + to all the instances for which it is referenced. + +
+ +
+ This attribute defines the media type of the instance representations that this schema is defining. +
+
+ +
+ + This specification is a sub-type of the JSON format, and + consequently the security considerations are generally the same as RFC 4627. + However, an additional issue is that when link relation of "self" + is used to denote a full representation of an object, the user agent + SHOULD NOT consider the representation to be the authoritative representation + of the resource denoted by the target URI if the target URI is not + equivalent to or a sub-path of the the URI used to request the resource + representation which contains the target URI with the "self" link. + +
+ For example, if a hyper schema was defined: + + + +
+ +
+ And a resource was requested from somesite.com: + + + +
+ +
+ With a response of: + + + +
+
+
+ +
+ The proposed MIME media type for JSON Schema is "application/schema+json". + Type name: application + Subtype name: schema+json + Required parameters: profile + + The value of the profile parameter SHOULD be a URI (relative or absolute) that + refers to the schema used to define the structure of this structure (the + meta-schema). Normally the value would be http://json-schema.org/draft-04/hyper-schema, + but it is allowable to use other schemas that extend the hyper schema's meta- + schema. + + Optional parameters: pretty + The value of the pretty parameter MAY be true or false to indicate if additional whitespace has been included to make the JSON representation easier to read. + +
+ + This registry is maintained by IANA per RFC 4287 and this specification adds + four values: "full", "create", "instances", "root". New + assignments are subject to IESG Approval, as outlined in RFC 5226. + Requests should be made by email to IANA, which will then forward the + request to the IESG, requesting approval. + +
+
+
+ + + + + &rfc2045; + &rfc2119; + &rfc3339; + &rfc3986; + &rfc4287; + + + JSON Pointer + + ForgeRock US, Inc. + + + SitePen (USA) + + + + + + + &rfc2616; + &rfc4627; + &rfc5226; + &iddiscovery; + &uritemplate; + &linkheader; + &html401; + &css21; + + +
+ + + + + Changed "required" attribute to an array of strings. + Removed "format" attribute. + Added "minProperties" and "maxProperties" attributes. + Replaced "slash-delimited" fragment resolution with "json-pointer". + Added "template" LDO attribute. + Removed irrelevant "Open Issues" section. + Merged Conventions and Terminology sections. + Defined terms used in specification. + Removed "integer" type in favor of {"type":"number", "divisibleBy":1}. + Restricted "type" to only the core JSON types. + Improved wording of many sections. + + + + + + Added example and verbiage to "extends" attribute. + Defined slash-delimited to use a leading slash. + Made "root" a relation instead of an attribute. + Removed address values, and MIME media type from format to reduce confusion (mediaType already exists, so it can be used for MIME types). + Added more explanation of nullability. + Removed "alternate" attribute. + Upper cased many normative usages of must, may, and should. + Replaced the link submission "properties" attribute to "schema" attribute. + Replaced "optional" attribute with "required" attribute. + Replaced "maximumCanEqual" attribute with "exclusiveMaximum" attribute. + Replaced "minimumCanEqual" attribute with "exclusiveMinimum" attribute. + Replaced "requires" attribute with "dependencies" attribute. + Moved "contentEncoding" attribute to hyper schema. + Added "additionalItems" attribute. + Added "id" attribute. + Switched self-referencing variable substitution from "-this" to "@" to align with reserved characters in URI template. + Added "patternProperties" attribute. + Schema URIs are now namespace versioned. + Added "$ref" and "$schema" attributes. + + + + + + Replaced "maxDecimal" attribute with "divisibleBy" attribute. + Added slash-delimited fragment resolution protocol and made it the default. + Added language about using links outside of schemas by referencing its normative URI. + Added "uniqueItems" attribute. + Added "targetSchema" attribute to link description object. + + + + + + Fixed category and updates from template. + + + + + + Initial draft. + + + + +
+
+
diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/links.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/links.js new file mode 100644 index 0000000..8a87f02 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/links.js @@ -0,0 +1,66 @@ +/** + * JSON Schema link handler + * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) + * Licensed under the MIT (MIT-LICENSE.txt) license. + */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], function () { + return factory(); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals + root.jsonSchemaLinks = factory(); + } +}(this, function () {// setup primitive classes to be JSON Schema types +var exports = {}; +exports.cacheLinks = true; +exports.getLink = function(relation, instance, schema){ + // gets the URI of the link for the given relation based on the instance and schema + // for example: + // getLink( + // "brother", + // {"brother_id":33}, + // {links:[{rel:"brother", href:"Brother/{brother_id}"}]}) -> + // "Brother/33" + var links = schema.__linkTemplates; + if(!links){ + links = {}; + var schemaLinks = schema.links; + if(schemaLinks && schemaLinks instanceof Array){ + schemaLinks.forEach(function(link){ + /* // TODO: allow for multiple same-name relations + if(links[link.rel]){ + if(!(links[link.rel] instanceof Array)){ + links[link.rel] = [links[link.rel]]; + } + }*/ + links[link.rel] = link.href; + }); + } + if(exports.cacheLinks){ + schema.__linkTemplates = links; + } + } + var linkTemplate = links[relation]; + return linkTemplate && exports.substitute(linkTemplate, instance); +}; + +exports.substitute = function(linkTemplate, instance){ + return linkTemplate.replace(/\{([^\}]*)\}/g, function(t, property){ + var value = instance[decodeURIComponent(property)]; + if(value instanceof Array){ + // the value is an array, it should produce a URI like /Table/(4,5,8) and store.get() should handle that as an array of values + return '(' + value.join(',') + ')'; + } + return value; + }); +}; +return exports; +})); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/validate.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/validate.js new file mode 100644 index 0000000..e4dc151 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/lib/validate.js @@ -0,0 +1,273 @@ +/** + * JSONSchema Validator - Validates JavaScript objects using JSON Schemas + * (http://www.json.com/json-schema-proposal/) + * + * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) + * Licensed under the MIT (MIT-LICENSE.txt) license. +To use the validator call the validate function with an instance object and an optional schema object. +If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), +that schema will be used to validate and the schema parameter is not necessary (if both exist, +both validations will occur). +The validate method will return an array of validation errors. If there are no errors, then an +empty list will be returned. A validation error will have two properties: +"property" which indicates which property had the error +"message" which indicates what the error was + */ +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], function () { + return factory(); + }); + } else if (typeof module === 'object' && module.exports) { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals + root.jsonSchema = factory(); + } +}(this, function () {// setup primitive classes to be JSON Schema types +var exports = validate +exports.Integer = {type:"integer"}; +var primitiveConstructors = { + String: String, + Boolean: Boolean, + Number: Number, + Object: Object, + Array: Array, + Date: Date +} +exports.validate = validate; +function validate(/*Any*/instance,/*Object*/schema) { + // Summary: + // To use the validator call JSONSchema.validate with an instance object and an optional schema object. + // If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), + // that schema will be used to validate and the schema parameter is not necessary (if both exist, + // both validations will occur). + // The validate method will return an object with two properties: + // valid: A boolean indicating if the instance is valid by the schema + // errors: An array of validation errors. If there are no errors, then an + // empty list will be returned. A validation error will have two properties: + // property: which indicates which property had the error + // message: which indicates what the error was + // + return validate(instance, schema, {changing: false});//, coerce: false, existingOnly: false}); + }; +exports.checkPropertyChange = function(/*Any*/value,/*Object*/schema, /*String*/property) { + // Summary: + // The checkPropertyChange method will check to see if an value can legally be in property with the given schema + // This is slightly different than the validate method in that it will fail if the schema is readonly and it will + // not check for self-validation, it is assumed that the passed in value is already internally valid. + // The checkPropertyChange method will return the same object type as validate, see JSONSchema.validate for + // information. + // + return validate(value, schema, {changing: property || "property"}); + }; +var validate = exports._validate = function(/*Any*/instance,/*Object*/schema,/*Object*/options) { + + if (!options) options = {}; + var _changing = options.changing; + + function getType(schema){ + return schema.type || (primitiveConstructors[schema.name] == schema && schema.name.toLowerCase()); + } + var errors = []; + // validate a value against a property definition + function checkProp(value, schema, path,i){ + + var l; + path += path ? typeof i == 'number' ? '[' + i + ']' : typeof i == 'undefined' ? '' : '.' + i : i; + function addError(message){ + errors.push({property:path,message:message}); + } + + if((typeof schema != 'object' || schema instanceof Array) && (path || typeof schema != 'function') && !(schema && getType(schema))){ + if(typeof schema == 'function'){ + if(!(value instanceof schema)){ + addError("is not an instance of the class/constructor " + schema.name); + } + }else if(schema){ + addError("Invalid schema/property definition " + schema); + } + return null; + } + if(_changing && schema.readonly){ + addError("is a readonly field, it can not be changed"); + } + if(schema['extends']){ // if it extends another schema, it must pass that schema as well + checkProp(value,schema['extends'],path,i); + } + // validate a value against a type definition + function checkType(type,value){ + if(type){ + if(typeof type == 'string' && type != 'any' && + (type == 'null' ? value !== null : typeof value != type) && + !(value instanceof Array && type == 'array') && + !(value instanceof Date && type == 'date') && + !(type == 'integer' && value%1===0)){ + return [{property:path,message:(typeof value) + " value found, but a " + type + " is required"}]; + } + if(type instanceof Array){ + var unionErrors=[]; + for(var j = 0; j < type.length; j++){ // a union type + if(!(unionErrors=checkType(type[j],value)).length){ + break; + } + } + if(unionErrors.length){ + return unionErrors; + } + }else if(typeof type == 'object'){ + var priorErrors = errors; + errors = []; + checkProp(value,type,path); + var theseErrors = errors; + errors = priorErrors; + return theseErrors; + } + } + return []; + } + if(value === undefined){ + if(schema.required){ + addError("is missing and it is required"); + } + }else{ + errors = errors.concat(checkType(getType(schema),value)); + if(schema.disallow && !checkType(schema.disallow,value).length){ + addError(" disallowed value was matched"); + } + if(value !== null){ + if(value instanceof Array){ + if(schema.items){ + var itemsIsArray = schema.items instanceof Array; + var propDef = schema.items; + for (i = 0, l = value.length; i < l; i += 1) { + if (itemsIsArray) + propDef = schema.items[i]; + if (options.coerce) + value[i] = options.coerce(value[i], propDef); + errors.concat(checkProp(value[i],propDef,path,i)); + } + } + if(schema.minItems && value.length < schema.minItems){ + addError("There must be a minimum of " + schema.minItems + " in the array"); + } + if(schema.maxItems && value.length > schema.maxItems){ + addError("There must be a maximum of " + schema.maxItems + " in the array"); + } + }else if(schema.properties || schema.additionalProperties){ + errors.concat(checkObj(value, schema.properties, path, schema.additionalProperties)); + } + if(schema.pattern && typeof value == 'string' && !value.match(schema.pattern)){ + addError("does not match the regex pattern " + schema.pattern); + } + if(schema.maxLength && typeof value == 'string' && value.length > schema.maxLength){ + addError("may only be " + schema.maxLength + " characters long"); + } + if(schema.minLength && typeof value == 'string' && value.length < schema.minLength){ + addError("must be at least " + schema.minLength + " characters long"); + } + if(typeof schema.minimum !== undefined && typeof value == typeof schema.minimum && + schema.minimum > value){ + addError("must have a minimum value of " + schema.minimum); + } + if(typeof schema.maximum !== undefined && typeof value == typeof schema.maximum && + schema.maximum < value){ + addError("must have a maximum value of " + schema.maximum); + } + if(schema['enum']){ + var enumer = schema['enum']; + l = enumer.length; + var found; + for(var j = 0; j < l; j++){ + if(enumer[j]===value){ + found=1; + break; + } + } + if(!found){ + addError("does not have a value in the enumeration " + enumer.join(", ")); + } + } + if(typeof schema.maxDecimal == 'number' && + (value.toString().match(new RegExp("\\.[0-9]{" + (schema.maxDecimal + 1) + ",}")))){ + addError("may only have " + schema.maxDecimal + " digits of decimal places"); + } + } + } + return null; + } + // validate an object against a schema + function checkObj(instance,objTypeDef,path,additionalProp){ + + if(typeof objTypeDef =='object'){ + if(typeof instance != 'object' || instance instanceof Array){ + errors.push({property:path,message:"an object is required"}); + } + + for(var i in objTypeDef){ + if(objTypeDef.hasOwnProperty(i)){ + var value = instance[i]; + // skip _not_ specified properties + if (value === undefined && options.existingOnly) continue; + var propDef = objTypeDef[i]; + // set default + if(value === undefined && propDef["default"]){ + value = instance[i] = propDef["default"]; + } + if(options.coerce && i in instance){ + value = instance[i] = options.coerce(value, propDef); + } + checkProp(value,propDef,path,i); + } + } + } + for(i in instance){ + if(instance.hasOwnProperty(i) && !(i.charAt(0) == '_' && i.charAt(1) == '_') && objTypeDef && !objTypeDef[i] && additionalProp===false){ + if (options.filter) { + delete instance[i]; + continue; + } else { + errors.push({property:path,message:(typeof value) + "The property " + i + + " is not defined in the schema and the schema does not allow additional properties"}); + } + } + var requires = objTypeDef && objTypeDef[i] && objTypeDef[i].requires; + if(requires && !(requires in instance)){ + errors.push({property:path,message:"the presence of the property " + i + " requires that " + requires + " also be present"}); + } + value = instance[i]; + if(additionalProp && (!(objTypeDef && typeof objTypeDef == 'object') || !(i in objTypeDef))){ + if(options.coerce){ + value = instance[i] = options.coerce(value, additionalProp); + } + checkProp(value,additionalProp,path,i); + } + if(!_changing && value && value.$schema){ + errors = errors.concat(checkProp(value,value.$schema,path,i)); + } + } + return errors; + } + if(schema){ + checkProp(instance,schema,'',_changing || ''); + } + if(!_changing && instance && instance.$schema){ + checkProp(instance,instance.$schema,'',''); + } + return {valid:!errors.length,errors:errors}; +}; +exports.mustBeValid = function(result){ + // summary: + // This checks to ensure that the result is valid and will throw an appropriate error message if it is not + // result: the result returned from checkPropertyChange or validate + if(!result.valid){ + throw new TypeError(result.errors.map(function(error){return "for property " + error.property + ': ' + error.message;}).join(", \n")); + } +} + +return exports; +})); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/package.json new file mode 100644 index 0000000..6b987c5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "json-schema@0.2.3", + "scope": null, + "escapedName": "json-schema", + "name": "json-schema", + "rawSpec": "0.2.3", + "spec": "0.2.3", + "type": "version" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/jsprim" + ] + ], + "_from": "json-schema@0.2.3", + "_id": "json-schema@0.2.3", + "_inCache": true, + "_location": "/json-schema", + "_nodeVersion": "6.1.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/json-schema-0.2.3.tgz_1473699189380_0.7420965158380568" + }, + "_npmUser": { + "name": "kriszyp", + "email": "kriszyp@gmail.com" + }, + "_npmVersion": "3.8.9", + "_phantomChildren": {}, + "_requested": { + "raw": "json-schema@0.2.3", + "scope": null, + "escapedName": "json-schema", + "name": "json-schema", + "rawSpec": "0.2.3", + "spec": "0.2.3", + "type": "version" + }, + "_requiredBy": [ + "/jsprim" + ], + "_resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "_shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13", + "_shrinkwrap": null, + "_spec": "json-schema@0.2.3", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/jsprim", + "author": { + "name": "Kris Zyp" + }, + "bugs": { + "url": "https://github.com/kriszyp/json-schema/issues" + }, + "dependencies": {}, + "description": "JSON Schema validation and specifications", + "devDependencies": { + "vows": "*" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "b480c892e59a2f05954ce727bd3f2a4e882f9e13", + "tarball": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz" + }, + "gitHead": "07ae2c618b5f581dbc108e065f4f95dcf0a1d85f", + "homepage": "https://github.com/kriszyp/json-schema#readme", + "keywords": [ + "json", + "schema" + ], + "licenses": [ + { + "type": "AFLv2.1", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L43" + }, + { + "type": "BSD", + "url": "http://trac.dojotoolkit.org/browser/dojo/trunk/LICENSE#L13" + } + ], + "main": "./lib/validate.js", + "maintainers": [ + { + "name": "kriszyp", + "email": "kriszyp@gmail.com" + } + ], + "name": "json-schema", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/kriszyp/json-schema.git" + }, + "scripts": { + "test": "echo TESTS DISABLED vows --spec test/*.js" + }, + "version": "0.2.3" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/test/tests.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/test/tests.js new file mode 100644 index 0000000..2938aea --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-schema/test/tests.js @@ -0,0 +1,95 @@ +var assert = require('assert'); +var vows = require('vows'); +var path = require('path'); +var fs = require('fs'); + +var validate = require('../lib/validate').validate; + + +var revision = 'draft-03'; +var schemaRoot = path.join(__dirname, '..', revision); +var schemaNames = ['schema', 'hyper-schema', 'links', 'json-ref' ]; +var schemas = {}; + +schemaNames.forEach(function(name) { + var file = path.join(schemaRoot, name); + schemas[name] = loadSchema(file); +}); + +schemaNames.forEach(function(name) { + var s, n = name+'-nsd', f = path.join(schemaRoot, name); + schemas[n] = loadSchema(f); + s = schemas[n]; + delete s['$schema']; +}); + +function loadSchema(path) { + var data = fs.readFileSync(path, 'utf-8'); + var schema = JSON.parse(data); + return schema; +} + +function resultIsValid() { + return function(result) { + assert.isObject(result); + //assert.isBoolean(result.valid); + assert.equal(typeof(result.valid), 'boolean'); + assert.isArray(result.errors); + for (var i = 0; i < result.errors.length; i++) { + assert.notEqual(result.errors[i], null, 'errors['+i+'] is null'); + } + } +} + +function assertValidates(doc, schema) { + var context = {}; + + context[': validate('+doc+', '+schema+')'] = { + topic: validate(schemas[doc], schemas[schema]), + 'returns valid result': resultIsValid(), + 'with valid=true': function(result) { assert.equal(result.valid, true); }, + 'and no errors': function(result) { + // XXX work-around for bug in vows: [null] chokes it + if (result.errors[0] == null) assert.fail('(errors contains null)'); + assert.length(result.errors, 0); + } + }; + + return context; +} + +function assertSelfValidates(doc) { + var context = {}; + + context[': validate('+doc+')'] = { + topic: validate(schemas[doc]), + 'returns valid result': resultIsValid(), + 'with valid=true': function(result) { assert.equal(result.valid, true); }, + 'and no errors': function(result) { assert.length(result.errors, 0); } + }; + + return context; +} + +var suite = vows.describe('JSON Schema').addBatch({ + 'Core-NSD self-validates': assertSelfValidates('schema-nsd'), + 'Core-NSD/Core-NSD': assertValidates('schema-nsd', 'schema-nsd'), + 'Core-NSD/Core': assertValidates('schema-nsd', 'schema'), + + 'Core self-validates': assertSelfValidates('schema'), + 'Core/Core': assertValidates('schema', 'schema'), + + 'Hyper-NSD self-validates': assertSelfValidates('hyper-schema-nsd'), + 'Hyper self-validates': assertSelfValidates('hyper-schema'), + 'Hyper/Hyper': assertValidates('hyper-schema', 'hyper-schema'), + 'Hyper/Core': assertValidates('hyper-schema', 'schema'), + + 'Links-NSD self-validates': assertSelfValidates('links-nsd'), + 'Links self-validates': assertSelfValidates('links'), + 'Links/Hyper': assertValidates('links', 'hyper-schema'), + 'Links/Core': assertValidates('links', 'schema'), + + 'Json-Ref self-validates': assertSelfValidates('json-ref'), + 'Json-Ref/Hyper': assertValidates('json-ref', 'hyper-schema'), + 'Json-Ref/Core': assertValidates('json-ref', 'schema') +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/.npmignore new file mode 100644 index 0000000..17d6b36 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/.npmignore @@ -0,0 +1 @@ +/*.tgz diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/CHANGELOG.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/CHANGELOG.md new file mode 100644 index 0000000..42bcb60 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/CHANGELOG.md @@ -0,0 +1,14 @@ +## Unreleased +- Fixes stringify to only take ancestors into account when checking + circularity. + It previously assumed every visited object was circular which led to [false + positives][issue9]. + Uses the tiny serializer I wrote for [Must.js][must] a year and a half ago. +- Fixes calling the `replacer` function in the proper context (`thisArg`). +- Fixes calling the `cycleReplacer` function in the proper context (`thisArg`). +- Speeds serializing by a factor of + Big-O(h-my-god-it-linearly-searched-every-object) it had ever seen. Searching + only the ancestors for a circular references speeds up things considerably. + +[must]: https://github.com/moll/js-must +[issue9]: https://github.com/isaacs/json-stringify-safe/issues/9 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/LICENSE new file mode 100644 index 0000000..19129e3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +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. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/Makefile b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/Makefile new file mode 100644 index 0000000..36088c7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/Makefile @@ -0,0 +1,35 @@ +NODE_OPTS = +TEST_OPTS = + +love: + @echo "Feel like makin' love." + +test: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot $(TEST_OPTS) + +spec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec $(TEST_OPTS) + +autotest: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R dot --watch $(TEST_OPTS) + +autospec: + @node $(NODE_OPTS) ./node_modules/.bin/_mocha -R spec --watch $(TEST_OPTS) + +pack: + @file=$$(npm pack); echo "$$file"; tar tf "$$file" + +publish: + npm publish + +tag: + git tag "v$$(node -e 'console.log(require("./package").version)')" + +clean: + rm -f *.tgz + npm prune --production + +.PHONY: love +.PHONY: test spec autotest autospec +.PHONY: pack publish tag +.PHONY: clean diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/README.md new file mode 100644 index 0000000..a11f302 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/README.md @@ -0,0 +1,52 @@ +# json-stringify-safe + +Like JSON.stringify, but doesn't throw on circular references. + +## Usage + +Takes the same arguments as `JSON.stringify`. + +```javascript +var stringify = require('json-stringify-safe'); +var circularObj = {}; +circularObj.circularRef = circularObj; +circularObj.list = [ circularObj, circularObj ]; +console.log(stringify(circularObj, null, 2)); +``` + +Output: + +```json +{ + "circularRef": "[Circular]", + "list": [ + "[Circular]", + "[Circular]" + ] +} +``` + +## Details + +``` +stringify(obj, serializer, indent, decycler) +``` + +The first three arguments are the same as to JSON.stringify. The last +is an argument that's only used when the object has been seen already. + +The default `decycler` function returns the string `'[Circular]'`. +If, for example, you pass in `function(k,v){}` (return nothing) then it +will prune cycles. If you pass in `function(k,v){ return {foo: 'bar'}}`, +then cyclical objects will always be represented as `{"foo":"bar"}` in +the result. + +``` +stringify.getSerialize(serializer, decycler) +``` + +Returns a serializer that can be used elsewhere. This is the actual +function that's passed to JSON.stringify. + +**Note** that the function returned from `getSerialize` is stateful for now, so +do **not** use it more than once. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/package.json new file mode 100644 index 0000000..6e5dd21 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "json-stringify-safe@~5.0.1", + "scope": null, + "escapedName": "json-stringify-safe", + "name": "json-stringify-safe", + "rawSpec": "~5.0.1", + "spec": ">=5.0.1 <5.1.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "json-stringify-safe@>=5.0.1 <5.1.0", + "_id": "json-stringify-safe@5.0.1", + "_inCache": true, + "_location": "/json-stringify-safe", + "_nodeVersion": "2.0.1", + "_npmUser": { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + "_npmVersion": "2.10.0", + "_phantomChildren": {}, + "_requested": { + "raw": "json-stringify-safe@~5.0.1", + "scope": null, + "escapedName": "json-stringify-safe", + "name": "json-stringify-safe", + "rawSpec": "~5.0.1", + "spec": ">=5.0.1 <5.1.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "_shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", + "_shrinkwrap": null, + "_spec": "json-stringify-safe@~5.0.1", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/json-stringify-safe/issues" + }, + "contributors": [ + { + "name": "Andri Möll", + "email": "andri@dot.ee", + "url": "http://themoll.com" + } + ], + "dependencies": {}, + "description": "Like JSON.stringify, but doesn't blow up on circular refs.", + "devDependencies": { + "mocha": ">= 2.1.0 < 3", + "must": ">= 0.12 < 0.13", + "sinon": ">= 1.12.2 < 2" + }, + "directories": {}, + "dist": { + "shasum": "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb", + "tarball": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" + }, + "gitHead": "3890dceab3ad14f8701e38ca74f38276abc76de5", + "homepage": "https://github.com/isaacs/json-stringify-safe", + "keywords": [ + "json", + "stringify", + "circular", + "safe" + ], + "license": "ISC", + "main": "stringify.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "moll", + "email": "andri@dot.ee" + } + ], + "name": "json-stringify-safe", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/json-stringify-safe.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "5.0.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/stringify.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/stringify.js new file mode 100644 index 0000000..124a452 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/stringify.js @@ -0,0 +1,27 @@ +exports = module.exports = stringify +exports.getSerialize = serializer + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces) +} + +function serializer(replacer, cycleReplacer) { + var stack = [], keys = [] + + if (cycleReplacer == null) cycleReplacer = function(key, value) { + if (stack[0] === value) return "[Circular ~]" + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]" + } + + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this) + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this) + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key) + if (~stack.indexOf(value)) value = cycleReplacer.call(this, key, value) + } + else stack.push(value) + + return replacer == null ? value : replacer.call(this, key, value) + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/mocha.opts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/mocha.opts new file mode 100644 index 0000000..2544e58 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/mocha.opts @@ -0,0 +1,2 @@ +--recursive +--require must diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/stringify_test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/stringify_test.js new file mode 100644 index 0000000..5b32583 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/json-stringify-safe/test/stringify_test.js @@ -0,0 +1,246 @@ +var Sinon = require("sinon") +var stringify = require("..") +function jsonify(obj) { return JSON.stringify(obj, null, 2) } + +describe("Stringify", function() { + it("must stringify circular objects", function() { + var obj = {name: "Alice"} + obj.self = obj + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + + it("must stringify circular objects with intermediaries", function() { + var obj = {name: "Alice"} + obj.identity = {self: obj} + var json = stringify(obj, null, 2) + json.must.eql(jsonify({name: "Alice", identity: {self: "[Circular ~]"}})) + }) + + it("must stringify circular objects deeper", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.self = obj.child + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", self: "[Circular ~.child]"} + })) + }) + + it("must stringify circular objects deeper with intermediaries", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + obj.child.identity = {self: obj.child} + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + child: {name: "Bob", identity: {self: "[Circular ~.child]"}} + })) + }) + + it("must stringify circular objects in an array", function() { + var obj = {name: "Alice"} + obj.self = [obj, obj] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", self: ["[Circular ~]", "[Circular ~]"] + })) + }) + + it("must stringify circular objects deeper in an array", function() { + var obj = {name: "Alice", children: [{name: "Bob"}, {name: "Eve"}]} + obj.children[0].self = obj.children[0] + obj.children[1].self = obj.children[1] + + stringify(obj, null, 2).must.eql(jsonify({ + name: "Alice", + children: [ + {name: "Bob", self: "[Circular ~.children.0]"}, + {name: "Eve", self: "[Circular ~.children.1]"} + ] + })) + }) + + it("must stringify circular arrays", function() { + var obj = [] + obj.push(obj) + obj.push(obj) + var json = stringify(obj, null, 2) + json.must.eql(jsonify(["[Circular ~]", "[Circular ~]"])) + }) + + it("must stringify circular arrays with intermediaries", function() { + var obj = [] + obj.push({name: "Alice", self: obj}) + obj.push({name: "Bob", self: obj}) + + stringify(obj, null, 2).must.eql(jsonify([ + {name: "Alice", self: "[Circular ~]"}, + {name: "Bob", self: "[Circular ~]"} + ])) + }) + + it("must stringify repeated objects in objects", function() { + var obj = {} + var alice = {name: "Alice"} + obj.alice1 = alice + obj.alice2 = alice + + stringify(obj, null, 2).must.eql(jsonify({ + alice1: {name: "Alice"}, + alice2: {name: "Alice"} + })) + }) + + it("must stringify repeated objects in arrays", function() { + var alice = {name: "Alice"} + var obj = [alice, alice] + var json = stringify(obj, null, 2) + json.must.eql(jsonify([{name: "Alice"}, {name: "Alice"}])) + }) + + it("must call given decycler and use its output", function() { + var obj = {} + obj.a = obj + obj.b = obj + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: 2}, null, 2)) + + decycle.callCount.must.equal(2) + decycle.thisValues[0].must.equal(obj) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.thisValues[1].must.equal(obj) + decycle.args[1][0].must.equal("b") + decycle.args[1][1].must.equal(obj) + }) + + it("must call replacer and use its output", function() { + var obj = {name: "Alice", child: {name: "Bob"}} + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", child: {name: "Bob!"}})) + + replacer.callCount.must.equal(4) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("child") + replacer.args[2][1].must.equal(obj.child) + replacer.thisValues[3].must.equal(obj.child) + replacer.args[3][0].must.equal("name") + replacer.args[3][1].must.equal("Bob") + }) + + it("must call replacer after describing circular references", function() { + var obj = {name: "Alice"} + obj.self = obj + + var replacer = Sinon.spy(bangString) + var json = stringify(obj, replacer, 2) + json.must.eql(jsonify({name: "Alice!", self: "[Circular ~]!"})) + + replacer.callCount.must.equal(3) + replacer.args[0][0].must.equal("") + replacer.args[0][1].must.equal(obj) + replacer.thisValues[1].must.equal(obj) + replacer.args[1][0].must.equal("name") + replacer.args[1][1].must.equal("Alice") + replacer.thisValues[2].must.equal(obj) + replacer.args[2][0].must.equal("self") + replacer.args[2][1].must.equal("[Circular ~]") + }) + + it("must call given decycler and use its output for nested objects", + function() { + var obj = {} + obj.a = obj + obj.b = {self: obj} + + var decycle = Sinon.spy(function() { return decycle.callCount }) + var json = stringify(obj, null, 2, decycle) + json.must.eql(jsonify({a: 1, b: {self: 2}})) + + decycle.callCount.must.equal(2) + decycle.args[0][0].must.equal("a") + decycle.args[0][1].must.equal(obj) + decycle.args[1][0].must.equal("self") + decycle.args[1][1].must.equal(obj) + }) + + it("must use decycler's output when it returned null", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() { return null } + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + self: null, + selves: [null, null] + })) + }) + + it("must use decycler's output when it returned undefined", function() { + var obj = {a: "b"} + obj.self = obj + obj.selves = [obj, obj] + + function decycle() {} + stringify(obj, null, 2, decycle).must.eql(jsonify({ + a: "b", + selves: [null, null] + })) + }) + + it("must throw given a decycler that returns a cycle", function() { + var obj = {} + obj.self = obj + var err + function identity(key, value) { return value } + try { stringify(obj, null, 2, identity) } catch (ex) { err = ex } + err.must.be.an.instanceof(TypeError) + }) + + describe(".getSerialize", function() { + it("must stringify circular objects", function() { + var obj = {a: "b"} + obj.circularRef = obj + obj.list = [obj, obj] + + var json = JSON.stringify(obj, stringify.getSerialize(), 2) + json.must.eql(jsonify({ + "a": "b", + "circularRef": "[Circular ~]", + "list": ["[Circular ~]", "[Circular ~]"] + })) + }) + + // This is the behavior as of Mar 3, 2015. + // The serializer function keeps state inside the returned function and + // so far I'm not sure how to not do that. JSON.stringify's replacer is not + // called _after_ serialization. + xit("must return a function that could be called twice", function() { + var obj = {name: "Alice"} + obj.self = obj + + var json + var serializer = stringify.getSerialize() + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + + json = JSON.stringify(obj, serializer, 2) + json.must.eql(jsonify({name: "Alice", self: "[Circular ~]"})) + }) + }) +}) + +function bangString(key, value) { + return typeof value == "string" ? value + "!" : value +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CHANGES.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CHANGES.md new file mode 100644 index 0000000..c52d39d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CHANGES.md @@ -0,0 +1,49 @@ +# Changelog + +## not yet released + +None yet. + +## v1.4.1 (2017-08-02) + +* #21 Update verror dep +* #22 Update extsprintf dependency +* #23 update contribution guidelines + +## v1.4.0 (2017-03-13) + +* #7 Add parseInteger() function for safer number parsing + +## v1.3.1 (2016-09-12) + +* #13 Incompatible with webpack + +## v1.3.0 (2016-06-22) + +* #14 add safer version of hasOwnProperty() +* #15 forEachKey() should ignore inherited properties + +## v1.2.2 (2015-10-15) + +* #11 NPM package shouldn't include any code that does `require('JSV')` +* #12 jsl.node.conf missing definition for "module" + +## v1.2.1 (2015-10-14) + +* #8 odd date parsing behaviour + +## v1.2.0 (2015-10-13) + +* #9 want function for returning RFC1123 dates + +## v1.1.0 (2015-09-02) + +* #6 a new suite of hrtime manipulation routines: `hrtimeAdd()`, + `hrtimeAccum()`, `hrtimeNanosec()`, `hrtimeMicrosec()` and + `hrtimeMillisec()`. + +## v1.0.0 (2015-09-01) + +First tracked release. Includes everything in previous releases, plus: + +* #4 want function for merging objects diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CONTRIBUTING.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CONTRIBUTING.md new file mode 100644 index 0000000..750cef8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing + +This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new +changes. Anyone can submit changes. To get started, see the [cr.joyent.us user +guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). +This repo does not use GitHub pull requests. + +See the [Joyent Engineering +Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general +best practices expected in this repository. + +Contributions should be "make prepush" clean. The "prepush" target runs the +"check" target, which requires these separate tools: + +* https://github.com/davepacheco/jsstyle +* https://github.com/davepacheco/javascriptlint + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/LICENSE new file mode 100644 index 0000000..cbc0bb3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2012, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/README.md new file mode 100644 index 0000000..b3f28a4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/README.md @@ -0,0 +1,287 @@ +# jsprim: utilities for primitive JavaScript types + +This module provides miscellaneous facilities for working with strings, +numbers, dates, and objects and arrays of these basic types. + + +### deepCopy(obj) + +Creates a deep copy of a primitive type, object, or array of primitive types. + + +### deepEqual(obj1, obj2) + +Returns whether two objects are equal. + + +### isEmpty(obj) + +Returns true if the given object has no properties and false otherwise. This +is O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)). + +### hasKey(obj, key) + +Returns true if the given object has an enumerable, non-inherited property +called `key`. [For information on enumerability and ownership of properties, see +the MDN +documentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties) + +### forEachKey(obj, callback) + +Like Array.forEach, but iterates enumerable, owned properties of an object +rather than elements of an array. Equivalent to: + + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + callback(key, obj[key]); + } + } + + +### flattenObject(obj, depth) + +Flattens an object up to a given level of nesting, returning an array of arrays +of length "depth + 1", where the first "depth" elements correspond to flattened +columns and the last element contains the remaining object . For example: + + flattenObject({ + 'I': { + 'A': { + 'i': { + 'datum1': [ 1, 2 ], + 'datum2': [ 3, 4 ] + }, + 'ii': { + 'datum1': [ 3, 4 ] + } + }, + 'B': { + 'i': { + 'datum1': [ 5, 6 ] + }, + 'ii': { + 'datum1': [ 7, 8 ], + 'datum2': [ 3, 4 ], + }, + 'iii': { + } + } + }, + 'II': { + 'A': { + 'i': { + 'datum1': [ 1, 2 ], + 'datum2': [ 3, 4 ] + } + } + } + }, 3) + +becomes: + + [ + [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ], + [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ], + [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ], + [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ], + [ 'I', 'B', 'iii', {} ], + [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ] + ] + +This function is strict: "depth" must be a non-negative integer and "obj" must +be a non-null object with at least "depth" levels of nesting under all keys. + + +### flattenIter(obj, depth, func) + +This is similar to `flattenObject` except that instead of returning an array, +this function invokes `func(entry)` for each `entry` in the array that +`flattenObject` would return. `flattenIter(obj, depth, func)` is logically +equivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this +version never constructs the full array. Its memory usage is O(depth) rather +than O(n) (where `n` is the number of flattened elements). + +There's another difference between `flattenObject` and `flattenIter` that's +related to the special case where `depth === 0`. In this case, `flattenObject` +omits the array wrapping `obj` (which is regrettable). + + +### pluck(obj, key) + +Fetch nested property "key" from object "obj", traversing objects as needed. +For example, `pluck(obj, "foo.bar.baz")` is roughly equivalent to +`obj.foo.bar.baz`, except that: + +1. If traversal fails, the resulting value is undefined, and no error is + thrown. For example, `pluck({}, "foo.bar")` is just undefined. +2. If "obj" has property "key" directly (without traversing), the + corresponding property is returned. For example, + `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also + true recursively, so `pluck({ 'a': { 'foo.bar': 1 } }, 'a.foo.bar')` is + also 1, not undefined. + + +### randElt(array) + +Returns an element from "array" selected uniformly at random. If "array" is +empty, throws an Error. + + +### startsWith(str, prefix) + +Returns true if the given string starts with the given prefix and false +otherwise. + + +### endsWith(str, suffix) + +Returns true if the given string ends with the given suffix and false +otherwise. + + +### parseInteger(str, options) + +Parses the contents of `str` (a string) as an integer. On success, the integer +value is returned (as a number). On failure, an error is **returned** describing +why parsing failed. + +By default, leading and trailing whitespace characters are not allowed, nor are +trailing characters that are not part of the numeric representation. This +behaviour can be toggled by using the options below. The empty string (`''`) is +not considered valid input. If the return value cannot be precisely represented +as a number (i.e., is smaller than `Number.MIN_SAFE_INTEGER` or larger than +`Number.MAX_SAFE_INTEGER`), an error is returned. Additionally, the string +`'-0'` will be parsed as the integer `0`, instead of as the IEEE floating point +value `-0`. + +This function accepts both upper and lowercase characters for digits, similar to +`parseInt()`, `Number()`, and [strtol(3C)](https://illumos.org/man/3C/strtol). + +The following may be specified in `options`: + +Option | Type | Default | Meaning +------------------ | ------- | ------- | --------------------------- +base | number | 10 | numeric base (radix) to use, in the range 2 to 36 +allowSign | boolean | true | whether to interpret any leading `+` (positive) and `-` (negative) characters +allowImprecise | boolean | false | whether to accept values that may have lost precision (past `MAX_SAFE_INTEGER` or below `MIN_SAFE_INTEGER`) +allowPrefix | boolean | false | whether to interpret the prefixes `0b` (base 2), `0o` (base 8), `0t` (base 10), or `0x` (base 16) +allowTrailing | boolean | false | whether to ignore trailing characters +trimWhitespace | boolean | false | whether to trim any leading or trailing whitespace/line terminators +leadingZeroIsOctal | boolean | false | whether a leading zero indicates octal + +Note that if `base` is unspecified, and `allowPrefix` or `leadingZeroIsOctal` +are, then the leading characters can change the default base from 10. If `base` +is explicitly specified and `allowPrefix` is true, then the prefix will only be +accepted if it matches the specified base. `base` and `leadingZeroIsOctal` +cannot be used together. + +**Context:** It's tricky to parse integers with JavaScript's built-in facilities +for several reasons: + +- `parseInt()` and `Number()` by default allow the base to be specified in the + input string by a prefix (e.g., `0x` for hex). +- `parseInt()` allows trailing nonnumeric characters. +- `Number(str)` returns 0 when `str` is the empty string (`''`). +- Both functions return incorrect values when the input string represents a + valid integer outside the range of integers that can be represented precisely. + Specifically, `parseInt('9007199254740993')` returns 9007199254740992. +- Both functions always accept `-` and `+` signs before the digit. +- Some older JavaScript engines always interpret a leading 0 as indicating + octal, which can be surprising when parsing input from users who expect a + leading zero to be insignificant. + +While each of these may be desirable in some contexts, there are also times when +none of them are wanted. `parseInteger()` grants greater control over what +input's permissible. + +### iso8601(date) + +Converts a Date object to an ISO8601 date string of the form +"YYYY-MM-DDTHH:MM:SS.sssZ". This format is not customizable. + + +### parseDateTime(str) + +Parses a date expressed as a string, as either a number of milliseconds since +the epoch or any string format that Date accepts, giving preference to the +former where these two sets overlap (e.g., strings containing small numbers). + + +### hrtimeDiff(timeA, timeB) + +Given two hrtime readings (as from Node's `process.hrtime()`), where timeA is +later than timeB, compute the difference and return that as an hrtime. It is +illegal to invoke this for a pair of times where timeB is newer than timeA. + +### hrtimeAdd(timeA, timeB) + +Add two hrtime intervals (as from Node's `process.hrtime()`), returning a new +hrtime interval array. This function does not modify either input argument. + + +### hrtimeAccum(timeA, timeB) + +Add two hrtime intervals (as from Node's `process.hrtime()`), storing the +result in `timeA`. This function overwrites (and returns) the first argument +passed in. + + +### hrtimeNanosec(timeA), hrtimeMicrosec(timeA), hrtimeMillisec(timeA) + +This suite of functions converts a hrtime interval (as from Node's +`process.hrtime()`) into a scalar number of nanoseconds, microseconds or +milliseconds. Results are truncated, as with `Math.floor()`. + + +### validateJsonObject(schema, object) + +Uses JSON validation (via JSV) to validate the given object against the given +schema. On success, returns null. On failure, *returns* (does not throw) a +useful Error object. + + +### extraProperties(object, allowed) + +Check an object for unexpected properties. Accepts the object to check, and an +array of allowed property name strings. If extra properties are detected, an +array of extra property names is returned. If no properties other than those +in the allowed list are present on the object, the returned array will be of +zero length. + +### mergeObjects(provided, overrides, defaults) + +Merge properties from objects "provided", "overrides", and "defaults". The +intended use case is for functions that accept named arguments in an "args" +object, but want to provide some default values and override other values. In +that case, "provided" is what the caller specified, "overrides" are what the +function wants to override, and "defaults" contains default values. + +The function starts with the values in "defaults", overrides them with the +values in "provided", and then overrides those with the values in "overrides". +For convenience, any of these objects may be falsey, in which case they will be +ignored. The input objects are never modified, but properties in the returned +object are not deep-copied. + +For example: + + mergeObjects(undefined, { 'objectMode': true }, { 'highWaterMark': 0 }) + +returns: + + { 'objectMode': true, 'highWaterMark': 0 } + +For another example: + + mergeObjects( + { 'highWaterMark': 16, 'objectMode': 7 }, /* from caller */ + { 'objectMode': true }, /* overrides */ + { 'highWaterMark': 0 }); /* default */ + +returns: + + { 'objectMode': true, 'highWaterMark': 16 } + + +# Contributing + +See separate [contribution guidelines](CONTRIBUTING.md). diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/lib/jsprim.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/lib/jsprim.js new file mode 100644 index 0000000..f7d0d81 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/lib/jsprim.js @@ -0,0 +1,735 @@ +/* + * lib/jsprim.js: utilities for primitive JavaScript types + */ + +var mod_assert = require('assert-plus'); +var mod_util = require('util'); + +var mod_extsprintf = require('extsprintf'); +var mod_verror = require('verror'); +var mod_jsonschema = require('json-schema'); + +/* + * Public interface + */ +exports.deepCopy = deepCopy; +exports.deepEqual = deepEqual; +exports.isEmpty = isEmpty; +exports.hasKey = hasKey; +exports.forEachKey = forEachKey; +exports.pluck = pluck; +exports.flattenObject = flattenObject; +exports.flattenIter = flattenIter; +exports.validateJsonObject = validateJsonObjectJS; +exports.validateJsonObjectJS = validateJsonObjectJS; +exports.randElt = randElt; +exports.extraProperties = extraProperties; +exports.mergeObjects = mergeObjects; + +exports.startsWith = startsWith; +exports.endsWith = endsWith; + +exports.parseInteger = parseInteger; + +exports.iso8601 = iso8601; +exports.rfc1123 = rfc1123; +exports.parseDateTime = parseDateTime; + +exports.hrtimediff = hrtimeDiff; +exports.hrtimeDiff = hrtimeDiff; +exports.hrtimeAccum = hrtimeAccum; +exports.hrtimeAdd = hrtimeAdd; +exports.hrtimeNanosec = hrtimeNanosec; +exports.hrtimeMicrosec = hrtimeMicrosec; +exports.hrtimeMillisec = hrtimeMillisec; + + +/* + * Deep copy an acyclic *basic* Javascript object. This only handles basic + * scalars (strings, numbers, booleans) and arbitrarily deep arrays and objects + * containing these. This does *not* handle instances of other classes. + */ +function deepCopy(obj) +{ + var ret, key; + var marker = '__deepCopy'; + + if (obj && obj[marker]) + throw (new Error('attempted deep copy of cyclic object')); + + if (obj && obj.constructor == Object) { + ret = {}; + obj[marker] = true; + + for (key in obj) { + if (key == marker) + continue; + + ret[key] = deepCopy(obj[key]); + } + + delete (obj[marker]); + return (ret); + } + + if (obj && obj.constructor == Array) { + ret = []; + obj[marker] = true; + + for (key = 0; key < obj.length; key++) + ret.push(deepCopy(obj[key])); + + delete (obj[marker]); + return (ret); + } + + /* + * It must be a primitive type -- just return it. + */ + return (obj); +} + +function deepEqual(obj1, obj2) +{ + if (typeof (obj1) != typeof (obj2)) + return (false); + + if (obj1 === null || obj2 === null || typeof (obj1) != 'object') + return (obj1 === obj2); + + if (obj1.constructor != obj2.constructor) + return (false); + + var k; + for (k in obj1) { + if (!obj2.hasOwnProperty(k)) + return (false); + + if (!deepEqual(obj1[k], obj2[k])) + return (false); + } + + for (k in obj2) { + if (!obj1.hasOwnProperty(k)) + return (false); + } + + return (true); +} + +function isEmpty(obj) +{ + var key; + for (key in obj) + return (false); + return (true); +} + +function hasKey(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (Object.prototype.hasOwnProperty.call(obj, key)); +} + +function forEachKey(obj, callback) +{ + for (var key in obj) { + if (hasKey(obj, key)) { + callback(key, obj[key]); + } + } +} + +function pluck(obj, key) +{ + mod_assert.equal(typeof (key), 'string'); + return (pluckv(obj, key)); +} + +function pluckv(obj, key) +{ + if (obj === null || typeof (obj) !== 'object') + return (undefined); + + if (obj.hasOwnProperty(key)) + return (obj[key]); + + var i = key.indexOf('.'); + if (i == -1) + return (undefined); + + var key1 = key.substr(0, i); + if (!obj.hasOwnProperty(key1)) + return (undefined); + + return (pluckv(obj[key1], key.substr(i + 1))); +} + +/* + * Invoke callback(row) for each entry in the array that would be returned by + * flattenObject(data, depth). This is just like flattenObject(data, + * depth).forEach(callback), except that the intermediate array is never + * created. + */ +function flattenIter(data, depth, callback) +{ + doFlattenIter(data, depth, [], callback); +} + +function doFlattenIter(data, depth, accum, callback) +{ + var each; + var key; + + if (depth === 0) { + each = accum.slice(0); + each.push(data); + callback(each); + return; + } + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + for (key in data) { + each = accum.slice(0); + each.push(key); + doFlattenIter(data[key], depth - 1, each, callback); + } +} + +function flattenObject(data, depth) +{ + if (depth === 0) + return ([ data ]); + + mod_assert.ok(data !== null); + mod_assert.equal(typeof (data), 'object'); + mod_assert.equal(typeof (depth), 'number'); + mod_assert.ok(depth >= 0); + + var rv = []; + var key; + + for (key in data) { + flattenObject(data[key], depth - 1).forEach(function (p) { + rv.push([ key ].concat(p)); + }); + } + + return (rv); +} + +function startsWith(str, prefix) +{ + return (str.substr(0, prefix.length) == prefix); +} + +function endsWith(str, suffix) +{ + return (str.substr( + str.length - suffix.length, suffix.length) == suffix); +} + +function iso8601(d) +{ + if (typeof (d) == 'number') + d = new Date(d); + mod_assert.ok(d.constructor === Date); + return (mod_extsprintf.sprintf('%4d-%02d-%02dT%02d:%02d:%02d.%03dZ', + d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate(), + d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), + d.getUTCMilliseconds())); +} + +var RFC1123_MONTHS = [ + 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; +var RFC1123_DAYS = [ + 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; + +function rfc1123(date) { + return (mod_extsprintf.sprintf('%s, %02d %s %04d %02d:%02d:%02d GMT', + RFC1123_DAYS[date.getUTCDay()], date.getUTCDate(), + RFC1123_MONTHS[date.getUTCMonth()], date.getUTCFullYear(), + date.getUTCHours(), date.getUTCMinutes(), + date.getUTCSeconds())); +} + +/* + * Parses a date expressed as a string, as either a number of milliseconds since + * the epoch or any string format that Date accepts, giving preference to the + * former where these two sets overlap (e.g., small numbers). + */ +function parseDateTime(str) +{ + /* + * This is irritatingly implicit, but significantly more concise than + * alternatives. The "+str" will convert a string containing only a + * number directly to a Number, or NaN for other strings. Thus, if the + * conversion succeeds, we use it (this is the milliseconds-since-epoch + * case). Otherwise, we pass the string directly to the Date + * constructor to parse. + */ + var numeric = +str; + if (!isNaN(numeric)) { + return (new Date(numeric)); + } else { + return (new Date(str)); + } +} + + +/* + * Number.*_SAFE_INTEGER isn't present before node v0.12, so we hardcode + * the ES6 definitions here, while allowing for them to someday be higher. + */ +var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; +var MIN_SAFE_INTEGER = Number.MIN_SAFE_INTEGER || -9007199254740991; + + +/* + * Default options for parseInteger(). + */ +var PI_DEFAULTS = { + base: 10, + allowSign: true, + allowPrefix: false, + allowTrailing: false, + allowImprecise: false, + trimWhitespace: false, + leadingZeroIsOctal: false +}; + +var CP_0 = 0x30; +var CP_9 = 0x39; + +var CP_A = 0x41; +var CP_B = 0x42; +var CP_O = 0x4f; +var CP_T = 0x54; +var CP_X = 0x58; +var CP_Z = 0x5a; + +var CP_a = 0x61; +var CP_b = 0x62; +var CP_o = 0x6f; +var CP_t = 0x74; +var CP_x = 0x78; +var CP_z = 0x7a; + +var PI_CONV_DEC = 0x30; +var PI_CONV_UC = 0x37; +var PI_CONV_LC = 0x57; + + +/* + * A stricter version of parseInt() that provides options for changing what + * is an acceptable string (for example, disallowing trailing characters). + */ +function parseInteger(str, uopts) +{ + mod_assert.string(str, 'str'); + mod_assert.optionalObject(uopts, 'options'); + + var baseOverride = false; + var options = PI_DEFAULTS; + + if (uopts) { + baseOverride = hasKey(uopts, 'base'); + options = mergeObjects(options, uopts); + mod_assert.number(options.base, 'options.base'); + mod_assert.ok(options.base >= 2, 'options.base >= 2'); + mod_assert.ok(options.base <= 36, 'options.base <= 36'); + mod_assert.bool(options.allowSign, 'options.allowSign'); + mod_assert.bool(options.allowPrefix, 'options.allowPrefix'); + mod_assert.bool(options.allowTrailing, + 'options.allowTrailing'); + mod_assert.bool(options.allowImprecise, + 'options.allowImprecise'); + mod_assert.bool(options.trimWhitespace, + 'options.trimWhitespace'); + mod_assert.bool(options.leadingZeroIsOctal, + 'options.leadingZeroIsOctal'); + + if (options.leadingZeroIsOctal) { + mod_assert.ok(!baseOverride, + '"base" and "leadingZeroIsOctal" are ' + + 'mutually exclusive'); + } + } + + var c; + var pbase = -1; + var base = options.base; + var start; + var mult = 1; + var value = 0; + var idx = 0; + var len = str.length; + + /* Trim any whitespace on the left side. */ + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + + /* Check the number for a leading sign. */ + if (options.allowSign) { + if (str[idx] === '-') { + idx += 1; + mult = -1; + } else if (str[idx] === '+') { + idx += 1; + } + } + + /* Parse the base-indicating prefix if there is one. */ + if (str[idx] === '0') { + if (options.allowPrefix) { + pbase = prefixToBase(str.charCodeAt(idx + 1)); + if (pbase !== -1 && (!baseOverride || pbase === base)) { + base = pbase; + idx += 2; + } + } + + if (pbase === -1 && options.leadingZeroIsOctal) { + base = 8; + } + } + + /* Parse the actual digits. */ + for (start = idx; idx < len; ++idx) { + c = translateDigit(str.charCodeAt(idx)); + if (c !== -1 && c < base) { + value *= base; + value += c; + } else { + break; + } + } + + /* If we didn't parse any digits, we have an invalid number. */ + if (start === idx) { + return (new Error('invalid number: ' + JSON.stringify(str))); + } + + /* Trim any whitespace on the right side. */ + if (options.trimWhitespace) { + while (idx < len && isSpace(str.charCodeAt(idx))) { + ++idx; + } + } + + /* Check for trailing characters. */ + if (idx < len && !options.allowTrailing) { + return (new Error('trailing characters after number: ' + + JSON.stringify(str.slice(idx)))); + } + + /* If our value is 0, we return now, to avoid returning -0. */ + if (value === 0) { + return (0); + } + + /* Calculate our final value. */ + var result = value * mult; + + /* + * If the string represents a value that cannot be precisely represented + * by JavaScript, then we want to check that: + * + * - We never increased the value past MAX_SAFE_INTEGER + * - We don't make the result negative and below MIN_SAFE_INTEGER + * + * Because we only ever increment the value during parsing, there's no + * chance of moving past MAX_SAFE_INTEGER and then dropping below it + * again, losing precision in the process. This means that we only need + * to do our checks here, at the end. + */ + if (!options.allowImprecise && + (value > MAX_SAFE_INTEGER || result < MIN_SAFE_INTEGER)) { + return (new Error('number is outside of the supported range: ' + + JSON.stringify(str.slice(start, idx)))); + } + + return (result); +} + + +/* + * Interpret a character code as a base-36 digit. + */ +function translateDigit(d) +{ + if (d >= CP_0 && d <= CP_9) { + /* '0' to '9' -> 0 to 9 */ + return (d - PI_CONV_DEC); + } else if (d >= CP_A && d <= CP_Z) { + /* 'A' - 'Z' -> 10 to 35 */ + return (d - PI_CONV_UC); + } else if (d >= CP_a && d <= CP_z) { + /* 'a' - 'z' -> 10 to 35 */ + return (d - PI_CONV_LC); + } else { + /* Invalid character code */ + return (-1); + } +} + + +/* + * Test if a value matches the ECMAScript definition of trimmable whitespace. + */ +function isSpace(c) +{ + return (c === 0x20) || + (c >= 0x0009 && c <= 0x000d) || + (c === 0x00a0) || + (c === 0x1680) || + (c === 0x180e) || + (c >= 0x2000 && c <= 0x200a) || + (c === 0x2028) || + (c === 0x2029) || + (c === 0x202f) || + (c === 0x205f) || + (c === 0x3000) || + (c === 0xfeff); +} + + +/* + * Determine which base a character indicates (e.g., 'x' indicates hex). + */ +function prefixToBase(c) +{ + if (c === CP_b || c === CP_B) { + /* 0b/0B (binary) */ + return (2); + } else if (c === CP_o || c === CP_O) { + /* 0o/0O (octal) */ + return (8); + } else if (c === CP_t || c === CP_T) { + /* 0t/0T (decimal) */ + return (10); + } else if (c === CP_x || c === CP_X) { + /* 0x/0X (hexadecimal) */ + return (16); + } else { + /* Not a meaningful character */ + return (-1); + } +} + + +function validateJsonObjectJS(schema, input) +{ + var report = mod_jsonschema.validate(input, schema); + + if (report.errors.length === 0) + return (null); + + /* Currently, we only do anything useful with the first error. */ + var error = report.errors[0]; + + /* The failed property is given by a URI with an irrelevant prefix. */ + var propname = error['property']; + var reason = error['message'].toLowerCase(); + var i, j; + + /* + * There's at least one case where the property error message is + * confusing at best. We work around this here. + */ + if ((i = reason.indexOf('the property ')) != -1 && + (j = reason.indexOf(' is not defined in the schema and the ' + + 'schema does not allow additional properties')) != -1) { + i += 'the property '.length; + if (propname === '') + propname = reason.substr(i, j - i); + else + propname = propname + '.' + reason.substr(i, j - i); + + reason = 'unsupported property'; + } + + var rv = new mod_verror.VError('property "%s": %s', propname, reason); + rv.jsv_details = error; + return (rv); +} + +function randElt(arr) +{ + mod_assert.ok(Array.isArray(arr) && arr.length > 0, + 'randElt argument must be a non-empty array'); + + return (arr[Math.floor(Math.random() * arr.length)]); +} + +function assertHrtime(a) +{ + mod_assert.ok(a[0] >= 0 && a[1] >= 0, + 'negative numbers not allowed in hrtimes'); + mod_assert.ok(a[1] < 1e9, 'nanoseconds column overflow'); +} + +/* + * Compute the time elapsed between hrtime readings A and B, where A is later + * than B. hrtime readings come from Node's process.hrtime(). There is no + * defined way to represent negative deltas, so it's illegal to diff B from A + * where the time denoted by B is later than the time denoted by A. If this + * becomes valuable, we can define a representation and extend the + * implementation to support it. + */ +function hrtimeDiff(a, b) +{ + assertHrtime(a); + assertHrtime(b); + mod_assert.ok(a[0] > b[0] || (a[0] == b[0] && a[1] >= b[1]), + 'negative differences not allowed'); + + var rv = [ a[0] - b[0], 0 ]; + + if (a[1] >= b[1]) { + rv[1] = a[1] - b[1]; + } else { + rv[0]--; + rv[1] = 1e9 - (b[1] - a[1]); + } + + return (rv); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of nanoseconds. + */ +function hrtimeNanosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e9 + a[1])); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of microseconds. + */ +function hrtimeMicrosec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e6 + a[1] / 1e3)); +} + +/* + * Convert a hrtime reading from the array format returned by Node's + * process.hrtime() into a scalar number of milliseconds. + */ +function hrtimeMillisec(a) +{ + assertHrtime(a); + + return (Math.floor(a[0] * 1e3 + a[1] / 1e6)); +} + +/* + * Add two hrtime readings A and B, overwriting A with the result of the + * addition. This function is useful for accumulating several hrtime intervals + * into a counter. Returns A. + */ +function hrtimeAccum(a, b) +{ + assertHrtime(a); + assertHrtime(b); + + /* + * Accumulate the nanosecond component. + */ + a[1] += b[1]; + if (a[1] >= 1e9) { + /* + * The nanosecond component overflowed, so carry to the seconds + * field. + */ + a[0]++; + a[1] -= 1e9; + } + + /* + * Accumulate the seconds component. + */ + a[0] += b[0]; + + return (a); +} + +/* + * Add two hrtime readings A and B, returning the result as a new hrtime array. + * Does not modify either input argument. + */ +function hrtimeAdd(a, b) +{ + assertHrtime(a); + + var rv = [ a[0], a[1] ]; + + return (hrtimeAccum(rv, b)); +} + + +/* + * Check an object for unexpected properties. Accepts the object to check, and + * an array of allowed property names (strings). Returns an array of key names + * that were found on the object, but did not appear in the list of allowed + * properties. If no properties were found, the returned array will be of + * zero length. + */ +function extraProperties(obj, allowed) +{ + mod_assert.ok(typeof (obj) === 'object' && obj !== null, + 'obj argument must be a non-null object'); + mod_assert.ok(Array.isArray(allowed), + 'allowed argument must be an array of strings'); + for (var i = 0; i < allowed.length; i++) { + mod_assert.ok(typeof (allowed[i]) === 'string', + 'allowed argument must be an array of strings'); + } + + return (Object.keys(obj).filter(function (key) { + return (allowed.indexOf(key) === -1); + })); +} + +/* + * Given three sets of properties "provided" (may be undefined), "overrides" + * (required), and "defaults" (may be undefined), construct an object containing + * the union of these sets with "overrides" overriding "provided", and + * "provided" overriding "defaults". None of the input objects are modified. + */ +function mergeObjects(provided, overrides, defaults) +{ + var rv, k; + + rv = {}; + if (defaults) { + for (k in defaults) + rv[k] = defaults[k]; + } + + if (provided) { + for (k in provided) + rv[k] = provided[k]; + } + + if (overrides) { + for (k in overrides) + rv[k] = overrides[k]; + } + + return (rv); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/package.json new file mode 100644 index 0000000..b6cbc6e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/jsprim/package.json @@ -0,0 +1,86 @@ +{ + "_args": [ + [ + { + "raw": "jsprim@^1.2.2", + "scope": null, + "escapedName": "jsprim", + "name": "jsprim", + "rawSpec": "^1.2.2", + "spec": ">=1.2.2 <2.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/http-signature" + ] + ], + "_from": "jsprim@>=1.2.2 <2.0.0", + "_id": "jsprim@1.4.1", + "_inCache": true, + "_location": "/jsprim", + "_nodeVersion": "0.10.45", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/jsprim-1.4.1.tgz_1501691396911_0.08959000837057829" + }, + "_npmUser": { + "name": "dap", + "email": "dap@cs.brown.edu" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "jsprim@^1.2.2", + "scope": null, + "escapedName": "jsprim", + "name": "jsprim", + "rawSpec": "^1.2.2", + "spec": ">=1.2.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/http-signature" + ], + "_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "_shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2", + "_shrinkwrap": null, + "_spec": "jsprim@^1.2.2", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/http-signature", + "bugs": { + "url": "https://github.com/joyent/node-jsprim/issues" + }, + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + }, + "description": "utilities for primitive JavaScript types", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2", + "tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz" + }, + "engines": [ + "node >=0.6.0" + ], + "gitHead": "f7d80a9e8e3f79c0b76448ad9ceab252fb309b32", + "homepage": "https://github.com/joyent/node-jsprim#readme", + "license": "MIT", + "main": "./lib/jsprim.js", + "maintainers": [ + { + "name": "dap", + "email": "dap@cs.brown.edu" + } + ], + "name": "jsprim", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/joyent/node-jsprim.git" + }, + "scripts": {}, + "version": "1.4.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/HISTORY.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..b2870c4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/HISTORY.md @@ -0,0 +1,343 @@ +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..a7ae8ee --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/LICENSE @@ -0,0 +1,22 @@ + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/README.md new file mode 100644 index 0000000..320c1c9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/README.md @@ -0,0 +1,94 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][travis-image]][travis-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a database of all mime types. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [RawGit](https://rawgit.com/). It is recommended to replace +`master` with [a release tag](https://github.com/jshttp/mime-db/tags) as the +JSON format may change in the future. + +``` +https://cdn.rawgit.com/jshttp/mime-db/master/db.json +``` + +## Usage + +```js +var db = require('mime-db'); + +// grab data on .js files +var data = db['application/javascript']; +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom.json` or +`src/custom-suffix.json`. + +The `src/custom.json` file is a JSON object with the MIME type as the keys +and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` for + if the data represented by the time is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptible_. + +To update the build, run `npm run build`. + +## Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +[npm-version-image]: https://img.shields.io/npm/v/mime-db.svg +[npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg +[npm-url]: https://npmjs.org/package/mime-db +[travis-image]: https://img.shields.io/travis/jshttp/mime-db/master.svg +[travis-url]: https://travis-ci.org/jshttp/mime-db +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-db/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://img.shields.io/node/v/mime-db.svg +[node-url]: http://nodejs.org/download/ diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/db.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/db.json new file mode 100644 index 0000000..0fc2a72 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/db.json @@ -0,0 +1,6966 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana" + }, + "application/3gpp-ims+xml": { + "source": "iana" + }, + "application/a2l": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana" + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "extensions": ["atomsvc"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana" + }, + "application/bacnet-xdd+zip": { + "source": "iana" + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana" + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana" + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/cbor": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana" + }, + "application/ccxml+xml": { + "source": "iana", + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana" + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana" + }, + "application/cellml+xml": { + "source": "iana" + }, + "application/cfw": { + "source": "iana" + }, + "application/clue_info+xml": { + "source": "iana" + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana" + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana" + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana" + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana" + }, + "application/cstadata+xml": { + "source": "iana" + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "extensions": ["mpd"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana" + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana" + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "extensions": ["dbk"] + }, + "application/dskpp+xml": { + "source": "iana" + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/emergencycalldata.comment+xml": { + "source": "iana" + }, + "application/emergencycalldata.control+xml": { + "source": "iana" + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana" + }, + "application/emergencycalldata.veds+xml": { + "source": "iana" + }, + "application/emma+xml": { + "source": "iana", + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana" + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana" + }, + "application/epub+zip": { + "source": "iana", + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana" + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false, + "extensions": ["woff"] + }, + "application/font-woff2": { + "compressible": false, + "extensions": ["woff2"] + }, + "application/framework-attributes+xml": { + "source": "iana" + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana" + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana" + }, + "application/ibe-pkg-reply+xml": { + "source": "iana" + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana" + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana" + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana" + }, + "application/kpml-response+xml": { + "source": "iana" + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana" + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana" + }, + "application/lost+xml": { + "source": "iana", + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana" + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "extensions": ["mads"] + }, + "application/manifest+json": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana" + }, + "application/mathml-presentation+xml": { + "source": "iana" + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana" + }, + "application/mbms-deregister+xml": { + "source": "iana" + }, + "application/mbms-envelope+xml": { + "source": "iana" + }, + "application/mbms-msk+xml": { + "source": "iana" + }, + "application/mbms-msk-response+xml": { + "source": "iana" + }, + "application/mbms-protection-description+xml": { + "source": "iana" + }, + "application/mbms-reception-report+xml": { + "source": "iana" + }, + "application/mbms-register+xml": { + "source": "iana" + }, + "application/mbms-register-response+xml": { + "source": "iana" + }, + "application/mbms-schedule+xml": { + "source": "iana" + }, + "application/mbms-user-service-description+xml": { + "source": "iana" + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana" + }, + "application/media_control+xml": { + "source": "iana" + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mmt-usd+xml": { + "source": "iana" + }, + "application/mods+xml": { + "source": "iana", + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana" + }, + "application/mrb-publish+xml": { + "source": "iana" + }, + "application/msc-ivr+xml": { + "source": "iana" + }, + "application/msc-mixer+xml": { + "source": "iana" + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana" + }, + "application/n-triples": { + "source": "iana" + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana" + }, + "application/news-groupinfo": { + "source": "iana" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana" + }, + "application/nss": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p2p-overlay+xml": { + "source": "iana" + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana" + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana" + }, + "application/pidf-diff+xml": { + "source": "iana" + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana" + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana" + }, + "application/provenance+xml": { + "source": "iana" + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.hpub+zip": { + "source": "iana" + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana" + }, + "application/pskc+xml": { + "source": "iana", + "extensions": ["pskcxml"] + }, + "application/qsig": { + "source": "iana" + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf"] + }, + "application/reginfo+xml": { + "source": "iana", + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana" + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana" + }, + "application/rls-services+xml": { + "source": "iana", + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana" + }, + "application/route-s-tsid+xml": { + "source": "iana" + }, + "application/route-usd+xml": { + "source": "iana" + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana" + }, + "application/samlmetadata+xml": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana" + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/sep+xml": { + "source": "iana" + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana" + }, + "application/simple-filter+xml": { + "source": "iana" + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "extensions": ["srx"] + }, + "application/spirits-event+xml": { + "source": "iana" + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "extensions": ["ssml"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "extensions": ["tei","teicorpus"] + }, + "application/thraud+xml": { + "source": "iana", + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/trig": { + "source": "iana" + }, + "application/ttml+xml": { + "source": "iana" + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana" + }, + "application/urc-ressheet+xml": { + "source": "iana" + }, + "application/urc-targetdesc+xml": { + "source": "iana" + }, + "application/urc-uisocketdesc+xml": { + "source": "iana" + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana" + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana" + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana" + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana" + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana" + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana" + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana" + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana" + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana" + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "extensions": ["mpkg"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avistar+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana" + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana" + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana" + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "extensions": ["wbs"] + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana" + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana" + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume-movie": { + "source": "iana" + }, + "application/vnd.desmume.movie": { + "source": "apache" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana" + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana" + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana" + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana" + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana" + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana" + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana" + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana" + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana" + }, + "application/vnd.etsi.cug+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana" + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana" + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana" + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana" + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana" + }, + "application/vnd.etsi.sci+xml": { + "source": "iana" + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana" + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana" + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana" + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana" + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana" + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana" + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana" + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana" + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana" + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana" + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana" + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana" + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "extensions": ["lasxml"] + }, + "application/vnd.liberty-request+xml": { + "source": "iana" + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "extensions": ["lbe"] + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana" + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana" + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana" + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana" + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana" + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache" + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana" + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana" + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana" + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana" + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana" + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana" + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana" + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana" + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana" + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana" + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana" + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana" + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana" + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana" + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana" + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana" + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana" + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana" + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana" + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana" + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana" + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana" + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana" + }, + "application/vnd.omads-email+xml": { + "source": "iana" + }, + "application/vnd.omads-file+xml": { + "source": "iana" + }, + "application/vnd.omads-folder+xml": { + "source": "iana" + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana" + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "apache", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "apache", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml-template": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "apache", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana" + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana" + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana" + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos+xml": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "apache" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana" + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana" + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana" + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana" + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana" + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana" + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana" + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana" + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana" + }, + "application/vnd.wv.ssp+xml": { + "source": "iana" + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana" + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "extensions": ["vxml"] + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/watcherinfo+xml": { + "source": "iana" + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-otf": { + "source": "apache", + "compressible": true, + "extensions": ["otf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-ttf": { + "source": "apache", + "compressible": true, + "extensions": ["ttf","ttc"] + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "apache", + "extensions": ["der","crt","pem"] + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana" + }, + "application/xaml+xml": { + "source": "apache", + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana" + }, + "application/xcap-caps+xml": { + "source": "iana" + }, + "application/xcap-diff+xml": { + "source": "iana", + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana" + }, + "application/xcap-error+xml": { + "source": "iana" + }, + "application/xcap-ns+xml": { + "source": "iana" + }, + "application/xcon-conference-info+xml": { + "source": "iana" + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana" + }, + "application/xenc+xml": { + "source": "iana", + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache" + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana" + }, + "application/xmpp+xml": { + "source": "iana" + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "extensions": ["xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana" + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana" + }, + "application/yin+xml": { + "source": "iana", + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana" + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana" + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/otf": { + "compressible": true, + "extensions": ["otf"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana" + }, + "image/emf": { + "source": "iana" + }, + "image/fits": { + "source": "iana" + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana" + }, + "image/jp2": { + "source": "iana" + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jpm": { + "source": "iana" + }, + "image/jpx": { + "source": "iana" + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana" + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana" + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tiff","tif"] + }, + "image/tiff-fx": { + "source": "iana" + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana" + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana" + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana" + }, + "image/vnd.valve.source.texture": { + "source": "iana" + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana" + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana" + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana" + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana" + }, + "message/global-delivery-status": { + "source": "iana" + }, + "message/global-disposition-notification": { + "source": "iana" + }, + "message/global-headers": { + "source": "iana" + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana" + }, + "model/3mf": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana" + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana" + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana" + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana" + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana" + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana", + "compressible": false + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/hjson": { + "extensions": ["hjson"] + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana" + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vp8": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/index.js new file mode 100644 index 0000000..551031f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/index.js @@ -0,0 +1,11 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/package.json new file mode 100644 index 0000000..81e3d76 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-db/package.json @@ -0,0 +1,140 @@ +{ + "_args": [ + [ + { + "raw": "mime-db@~1.30.0", + "scope": null, + "escapedName": "mime-db", + "name": "mime-db", + "rawSpec": "~1.30.0", + "spec": ">=1.30.0 <1.31.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/mime-types" + ] + ], + "_from": "mime-db@>=1.30.0 <1.31.0", + "_id": "mime-db@1.30.0", + "_inCache": true, + "_location": "/mime-db", + "_nodeVersion": "6.11.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/mime-db-1.30.0.tgz_1503887330099_0.8198229141999036" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "mime-db@~1.30.0", + "scope": null, + "escapedName": "mime-db", + "name": "mime-db", + "rawSpec": "~1.30.0", + "spec": ">=1.30.0 <1.31.0", + "type": "range" + }, + "_requiredBy": [ + "/mime-types" + ], + "_resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "_shasum": "74c643da2dd9d6a45399963465b26d5ca7d71f01", + "_shrinkwrap": null, + "_spec": "mime-db@~1.30.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/mime-types", + "bugs": { + "url": "https://github.com/jshttp/mime-db/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + }, + { + "name": "Robert Kieffer", + "email": "robert@broofa.com", + "url": "http://github.com/broofa" + } + ], + "dependencies": {}, + "description": "Media Type Database", + "devDependencies": { + "bluebird": "3.5.0", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "1.2.1", + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "gnode": "0.1.2", + "mocha": "1.21.5", + "nyc": "11.1.0", + "raw-body": "2.3.0", + "stream-to-array": "2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "74c643da2dd9d6a45399963465b26d5ca7d71f01", + "tarball": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "gitHead": "e62cf46c206681ca88b2e275f442a9885f1f86e4", + "homepage": "https://github.com/jshttp/mime-db#readme", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "license": "MIT", + "maintainers": [ + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + } + ], + "name": "mime-db", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-db.git" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "gnode scripts/fetch-apache && gnode scripts/fetch-iana && gnode scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "test-travis": "nyc --reporter=text npm test", + "update": "npm run fetch && npm run build" + }, + "version": "1.30.0" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/HISTORY.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..7517c11 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/HISTORY.md @@ -0,0 +1,247 @@ +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Add additional compressible + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/README.md new file mode 100644 index 0000000..571031c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/README.md @@ -0,0 +1,108 @@ +# mime-types + +[![NPM Version][npm-image]][npm-url] +[![NPM Downloads][downloads-image]][downloads-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][travis-image]][travis-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[npm-image]: https://img.shields.io/npm/v/mime-types.svg +[npm-url]: https://npmjs.org/package/mime-types +[node-version-image]: https://img.shields.io/node/v/mime-types.svg +[node-version-url]: https://nodejs.org/en/download/ +[travis-image]: https://img.shields.io/travis/jshttp/mime-types/master.svg +[travis-url]: https://travis-ci.org/jshttp/mime-types +[coveralls-image]: https://img.shields.io/coveralls/jshttp/mime-types/master.svg +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types +[downloads-image]: https://img.shields.io/npm/dm/mime-types.svg +[downloads-url]: https://npmjs.org/package/mime-types diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/package.json new file mode 100644 index 0000000..735a5a1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/mime-types/package.json @@ -0,0 +1,130 @@ +{ + "_args": [ + [ + { + "raw": "mime-types@~2.1.17", + "scope": null, + "escapedName": "mime-types", + "name": "mime-types", + "rawSpec": "~2.1.17", + "spec": ">=2.1.17 <2.2.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "mime-types@>=2.1.17 <2.2.0", + "_id": "mime-types@2.1.17", + "_inCache": true, + "_location": "/mime-types", + "_nodeVersion": "6.11.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/mime-types-2.1.17.tgz_1504322793218_0.6663200033362955" + }, + "_npmUser": { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "mime-types@~2.1.17", + "scope": null, + "escapedName": "mime-types", + "name": "mime-types", + "rawSpec": "~2.1.17", + "spec": ">=2.1.17 <2.2.0", + "type": "range" + }, + "_requiredBy": [ + "/form-data", + "/request" + ], + "_resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "_shasum": "09d7a393f03e995a79f8af857b70a9e0ab16557a", + "_shrinkwrap": null, + "_spec": "mime-types@~2.1.17", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "bugs": { + "url": "https://github.com/jshttp/mime-types/issues" + }, + "contributors": [ + { + "name": "Douglas Christopher Wilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "Jeremiah Senkpiel", + "email": "fishrock123@rocketmail.com", + "url": "https://searchbeam.jit.su" + }, + { + "name": "Jonathan Ong", + "email": "me@jongleberry.com", + "url": "http://jongleberry.com" + } + ], + "dependencies": { + "mime-db": "~1.30.0" + }, + "description": "The ultimate javascript content-type utility.", + "devDependencies": { + "eslint": "3.19.0", + "eslint-config-standard": "10.2.1", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-node": "5.1.1", + "eslint-plugin-promise": "3.5.0", + "eslint-plugin-standard": "3.0.1", + "istanbul": "0.4.5", + "mocha": "1.21.5" + }, + "directories": {}, + "dist": { + "shasum": "09d7a393f03e995a79f8af857b70a9e0ab16557a", + "tarball": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz" + }, + "engines": { + "node": ">= 0.6" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "gitHead": "80039fe78213821c2e9b25132d6b02cc37202e8a", + "homepage": "https://github.com/jshttp/mime-types#readme", + "keywords": [ + "mime", + "types" + ], + "license": "MIT", + "maintainers": [ + { + "name": "fishrock123", + "email": "fishrock123@rocketmail.com" + }, + { + "name": "dougwilson", + "email": "doug@somethingdoug.com" + }, + { + "name": "jongleberry", + "email": "jonathanrichardong@gmail.com" + } + ], + "name": "mime-types", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/jshttp/mime-types.git" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/test.js", + "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot test/test.js" + }, + "version": "2.1.17" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/LICENSE new file mode 100644 index 0000000..a4a9aee --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/README.md new file mode 100644 index 0000000..34c4a85 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/README.md @@ -0,0 +1,4 @@ +oauth-sign +========== + +OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/index.js new file mode 100644 index 0000000..dadcba9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/index.js @@ -0,0 +1,136 @@ +var crypto = require('crypto') + , qs = require('querystring') + ; + +function sha1 (key, body) { + return crypto.createHmac('sha1', key).update(body).digest('base64') +} + +function rsa (key, body) { + return crypto.createSign("RSA-SHA1").update(body).sign(key, 'base64'); +} + +function rfc3986 (str) { + return encodeURIComponent(str) + .replace(/!/g,'%21') + .replace(/\*/g,'%2A') + .replace(/\(/g,'%28') + .replace(/\)/g,'%29') + .replace(/'/g,'%27') + ; +} + +// Maps object to bi-dimensional array +// Converts { foo: 'A', bar: [ 'b', 'B' ]} to +// [ ['foo', 'A'], ['bar', 'b'], ['bar', 'B'] ] +function map (obj) { + var key, val, arr = [] + for (key in obj) { + val = obj[key] + if (Array.isArray(val)) + for (var i = 0; i < val.length; i++) + arr.push([key, val[i]]) + else if (typeof val === "object") + for (var prop in val) + arr.push([key + '[' + prop + ']', val[prop]]); + else + arr.push([key, val]) + } + return arr +} + +// Compare function for sort +function compare (a, b) { + return a > b ? 1 : a < b ? -1 : 0 +} + +function generateBase (httpMethod, base_uri, params) { + // adapted from https://dev.twitter.com/docs/auth/oauth and + // https://dev.twitter.com/docs/auth/creating-signature + + // Parameter normalization + // http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2 + var normalized = map(params) + // 1. First, the name and value of each parameter are encoded + .map(function (p) { + return [ rfc3986(p[0]), rfc3986(p[1] || '') ] + }) + // 2. The parameters are sorted by name, using ascending byte value + // ordering. If two or more parameters share the same name, they + // are sorted by their value. + .sort(function (a, b) { + return compare(a[0], b[0]) || compare(a[1], b[1]) + }) + // 3. The name of each parameter is concatenated to its corresponding + // value using an "=" character (ASCII code 61) as a separator, even + // if the value is empty. + .map(function (p) { return p.join('=') }) + // 4. The sorted name/value pairs are concatenated together into a + // single string by using an "&" character (ASCII code 38) as + // separator. + .join('&') + + var base = [ + rfc3986(httpMethod ? httpMethod.toUpperCase() : 'GET'), + rfc3986(base_uri), + rfc3986(normalized) + ].join('&') + + return base +} + +function hmacsign (httpMethod, base_uri, params, consumer_secret, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return sha1(key, base) +} + +function rsasign (httpMethod, base_uri, params, private_key, token_secret) { + var base = generateBase(httpMethod, base_uri, params) + var key = private_key || '' + + return rsa(key, base) +} + +function plaintext (consumer_secret, token_secret) { + var key = [ + consumer_secret || '', + token_secret || '' + ].map(rfc3986).join('&') + + return key +} + +function sign (signMethod, httpMethod, base_uri, params, consumer_secret, token_secret) { + var method + var skipArgs = 1 + + switch (signMethod) { + case 'RSA-SHA1': + method = rsasign + break + case 'HMAC-SHA1': + method = hmacsign + break + case 'PLAINTEXT': + method = plaintext + skipArgs = 4 + break + default: + throw new Error("Signature method not supported: " + signMethod) + } + + return method.apply(null, [].slice.call(arguments, skipArgs)) +} + +exports.hmacsign = hmacsign +exports.rsasign = rsasign +exports.plaintext = plaintext +exports.sign = sign +exports.rfc3986 = rfc3986 +exports.generateBase = generateBase + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/package.json new file mode 100644 index 0000000..ab335cd --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/oauth-sign/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "oauth-sign@~0.8.2", + "scope": null, + "escapedName": "oauth-sign", + "name": "oauth-sign", + "rawSpec": "~0.8.2", + "spec": ">=0.8.2 <0.9.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "oauth-sign@>=0.8.2 <0.9.0", + "_id": "oauth-sign@0.8.2", + "_inCache": true, + "_location": "/oauth-sign", + "_nodeVersion": "5.9.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/oauth-sign-0.8.2.tgz_1462396399020_0.8175400267355144" + }, + "_npmUser": { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + }, + "_npmVersion": "2.15.3", + "_phantomChildren": {}, + "_requested": { + "raw": "oauth-sign@~0.8.2", + "scope": null, + "escapedName": "oauth-sign", + "name": "oauth-sign", + "rawSpec": "~0.8.2", + "spec": ">=0.8.2 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", + "_shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", + "_shrinkwrap": null, + "_spec": "oauth-sign@~0.8.2", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com", + "url": "http://www.futurealoof.com" + }, + "bugs": { + "url": "https://github.com/mikeal/oauth-sign/issues" + }, + "dependencies": {}, + "description": "OAuth 1 signing. Formerly a vendor lib in mikeal/request, now a standalone module.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "46a6ab7f0aead8deae9ec0565780b7d4efeb9d43", + "tarball": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" + }, + "engines": { + "node": "*" + }, + "files": [ + "index.js" + ], + "gitHead": "0b034206316132f57e26970152c2fb18e71bddd5", + "homepage": "https://github.com/mikeal/oauth-sign#readme", + "license": "Apache-2.0", + "main": "index.js", + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + { + "name": "nylen", + "email": "jnylen@gmail.com" + }, + { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + } + ], + "name": "oauth-sign", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "url": "git+https://github.com/mikeal/oauth-sign.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "0.8.2" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.npmignore new file mode 100644 index 0000000..a9981b1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.npmignore @@ -0,0 +1,5 @@ +node_modules/* +*.sublime-* +report/* +coverage/* +.AppleDouble diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.travis.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.travis.yml new file mode 100644 index 0000000..4db72e3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/.travis.yml @@ -0,0 +1,8 @@ +sudo: false + +language: node_js + +node_js: + - "0.10" + - "0.12" + - "iojs" diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/AUTHORS b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/AUTHORS new file mode 100644 index 0000000..b6f3d04 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/AUTHORS @@ -0,0 +1 @@ +Eugene Lazutkin (http://lazutkin.com/) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/LICENSE new file mode 100644 index 0000000..cb9140f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/LICENSE @@ -0,0 +1,34 @@ +This library is available under the terms of the modified BSD license. No external contributions +are allowed under licenses which are fundamentally incompatible with the BSD license that this library is distributed under. + +The text of the BSD license is reproduced below. + +------------------------------------------------------------------------------- +The "New" BSD License: +********************** + +Copyright (c) 2005-2013, Eugene Lazutkin +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of Eugene Lazutkin nor the names of other contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/README.md new file mode 100644 index 0000000..b0ec526 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/README.md @@ -0,0 +1,71 @@ +# parser-toolkit + +[![Build status][travis-image]][travis-url] +[![Dependencies][deps-image]][deps-url] +[![devDependencies][dev-deps-image]][dev-deps-url] +[![NPM version][npm-image]][npm-url] + + +parser-toolkit is a collection of scanner and parser components, which allows fast creation of efficient parser for custom languages. The main point of a toolkit is to support streamable chunked input. + +A standard-compiant implementation of JSON is included as a test. This is how JSON is defined: + +```js +var ws = {id: "ws", pattern: /\s{1,256}/}, + // numeric tokens + nonZero = {id: "nonZero", pattern: /[1-9]/}, + exponent = {id: "exponent", pattern: /[eE]/}, + numericChunk = {id: "numericChunk", pattern: /\d{1,256}/}, + // string tokens + plainChunk = {id: "plainChunk", pattern: /[^\"\\]{1,256}/}, + escapedChars = {id: "escapedChars", + pattern: /\\(?:[bfnrt\"\\\/]|u[0-9a-fA-F]{4})/}; + +var json = new Grammar({ + main: [rule("ws"), rule("value")], + ws: repeat(ws), + value: [ + any(rule("object"), rule("array"), rule("string"), + rule("number"), ["-", rule("number")], + "true", "false", "null"), + rule("ws") + ], + object: [ + "{", + rule("ws"), + maybe(rule("pair"), + repeat(",", rule("ws"), rule("pair"))), + "}" + ], + pair: [ + rule("string"), rule("ws"), ":", rule("ws"), rule("value") + ], + array: [ + "[", + rule("ws"), + maybe(rule("value"), + repeat(",", rule("ws"), rule("value"))), + "]" + ], + string: ["\"", repeat(any(plainChunk, escapedChars)), "\""], + number: [ + any("0", [nonZero, repeat(numericChunk)]), + maybe(".", repeat(numericChunk)), + maybe(exponent, maybe(any("-", "+")), + numericChunk, repeat(numericChunk)) + ] +}); +``` + +The whole definition is taken verbatim from [JSON.org](http://json.org/). + +The test file `sample.json` is copied as is from an open source project [json-simple](https://code.google.com/p/json-simple/) under Apache License 2.0. + +[npm-image]: https://img.shields.io/npm/v/parser-toolkit.svg +[npm-url]: https://npmjs.org/package/parser-toolkit +[deps-image]: https://img.shields.io/david/uhop/parser-toolkit.svg +[deps-url]: https://david-dm.org/uhop/parser-toolkit +[dev-deps-image]: https://img.shields.io/david/dev/uhop/parser-toolkit.svg +[dev-deps-url]: https://david-dm.org/uhop/parser-toolkit#info=devDependencies +[travis-image]: https://img.shields.io/travis/uhop/parser-toolkit.svg +[travis-url]: https://travis-ci.org/uhop/parser-toolkit diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/Scanner.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/Scanner.js new file mode 100644 index 0000000..93d6bfa --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/Scanner.js @@ -0,0 +1,97 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + function Scanner(){ + this.reset(); + } + + Scanner.prototype = { + + // public interface + + reset: function(){ + this.buffer = ""; + this.line = this.pos = 1; + this.noMore = false; + }, + + addBuffer: function(buffer, noMore){ + this.buffer += Buffer.isBuffer(buffer) ? buffer.toString() : buffer; + this.noMore = noMore; + }, + + isFinished: function(){ + return this.noMore && !this.buffer.length; + }, + + padding: 16, + + // private workings + + newLinePattern: null, // /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/g, + + getToken: function(state, peek){ + var buffer = this.buffer; + if(!buffer){ + // no input data: true/false for more data + return !this.noMore; + } + var m = state.pattern.exec(buffer); + if(!m){ + return null; + } + if(!this.noMore && m[0].length >= buffer.length - this.padding){ + // need more information + return true; + } + var matched = m[0], index = 0; + if(state.tokens.length > 1){ + for(index = 1; !m[index]; ++index); + --index; + } + // prepare the found token + var token = Object.create(state.tokens[index]); + token.value = matched; + token.line = this.line; + token.pos = this.pos; + // update line and position, if it was not a peek + if(!peek){ + var rest = matched.length; + if(this.newLinePattern){ + var self = this; + matched.replace(this.newLinePattern, function(match, offset){ + rest = matched.length - match.length - offset; + ++self.line; + self.pos = 1; + return ""; + }); + }else{ + for(var i = 0, n = rest; i < n; ++i){ + switch(matched.charCodeAt(i)){ + case 0x0A: + case 0x2028: + case 0x2029: + rest = 0; + break; + case 0x0D: + rest = i + 1 < n && matched.charCodeAt(i + 1) === 0x0A ? -1 : 0; + break; + default: + continue; + } + rest += n - i - 1; + ++this.line; + this.pos = 1; + } + } + this.pos += rest; + this.buffer = buffer.substring(matched.length); + } + // done + return token; + } + }; + + return Scanner; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/ScannerRE2.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/ScannerRE2.js new file mode 100644 index 0000000..2eba01b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/ScannerRE2.js @@ -0,0 +1,114 @@ +"use strict"; + +var RE2; + +try { + RE2 = require("re2"); +}catch(e){ /* squelch */ } + +if(RE2){ + var ScannerRE2 =function ScannerRE2(){ + this.reset(); + }; + + ScannerRE2.prototype = { + + // public interface + + reset: function(){ + this.buffer = new Buffer(0); + this.line = this.pos = 1; + this.noMore = false; + }, + + addBuffer: function(buffer, noMore){ + if (buffer.length) { + this.buffer = Buffer.concat([this.buffer, + Buffer.isBuffer(buffer) ? buffer : new Buffer(buffer)]); + } + this.noMore = noMore; + }, + + isFinished: function(){ + return this.noMore && !this.buffer.length; + }, + + padding: 16, + + // private workings + + newLinePattern: /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/g, + + getToken: function(state, peek){ + var buffer = this.buffer; + if(!buffer.length){ + // no input data: true/false for more data + return !this.noMore; + } + if(state.pattern instanceof RegExp){ + state.pattern = new RE2(state.pattern); + } + var m = state.pattern.exec(buffer); + if(!m){ + return null; + } + if(!this.noMore && m[0].length >= buffer.length - this.padding){ + // need more information + return true; + } + var matched = m[0], index = 0; + if(state.tokens.length > 1){ + for(index = 1; !m[index].length; ++index); + --index; + } + // prepare the found token + var token = Object.create(state.tokens[index]); + token.value = matched.toString(); + token.line = this.line; + token.pos = this.pos; + // update line and position, if it was not a peek + if(!peek){ + var rest = 0; +// if(this.newLinePattern){ + if(this.newLinePattern instanceof RegExp){ + this.newLinePattern = new RE2(this.newLinePattern); + } + var self = this; + this.newLinePattern.replace(matched, function(match, offset){ + rest = match.length + offset; + ++self.line; + self.pos = 1; + return ""; + }); +// }else{ + // for(var i = 0, n = rest; i < n; ++i){ + // switch(matched.charCodeAt(i)){ + // case 0x0A: + // case 0x2028: + // case 0x2029: + // rest = 0; + // break; + // case 0x0D: + // rest = i + 1 < n && matched.charCodeAt(i + 1) === 0x0A ? -1 : 0; + // break; + // default: + // continue; + // } + // rest += n - i - 1; + // ++this.line; + // this.pos = 1; + // } +// } + this.pos += token.value.length - rest; + this.buffer = buffer.slice(matched.length); + } + // done + return token; + } + }; + + module.exports = ScannerRE2; +}else{ + console.log("Can't find RE2 (use: npm install re2) -- reverting to RegExp."); + module.exports = require("./Scanner"); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Grammar.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Grammar.js new file mode 100644 index 0000000..b584330 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Grammar.js @@ -0,0 +1,106 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + // Based on the classic stream-based operator precedence parser by Max Motovilov. + // (c) 2000-2013 Max Motovilov, Eugene Lazutkin, used here under the BSD license. + +/* + Grammar is implemented by a naked object: + + { + operator: { // expected state before + "+": { // token name + left: 7000, // input priority + right: 7001, // output priority + pattern: "+", // token's pattern + next: "operand" // state after or falsy if the same as before + } + // ... + }, + operand: { + // ... + }, + brackets: { // a reserved name for a bag of brackets + "(": ")", + "[": "]" + // ... + } + } + + Priority: + + left == 0 -- end of statement + left < right -- left associated operator + left > right -- right associated operator + + A left bracket has the same left priority as its corresponding right bracket's right priority. + + State: + + before == "operand" && after == "operand" -- unary prefix operator + before == "operator" && after == "operator" -- unary postfix operator + before == "operator" && after == "operand" -- binary infix operator + before == "operand" && after == "operator" -- operand +*/ + + function Grammar(grammar){ + var keys = Object.keys(grammar).filter(function(name){ return name !== "brackets"; }); + // convert and copy states + this.brackets = grammar.brackets || {}; + keys.forEach(function(name){ + this[name] = convertState(grammar[name]); + }, this); + } + + // utilities + + function convertState(state){ + var tokens = Object.keys(state).map(function(name){ + var token = Object.create(state[name]); + token.id = name; + if(!token.pattern){ + token.pattern = name; + } + sanitizeToken(token); + return token; + }); + tokens.sort(tokenComparator); + // create a state pattern + var patterns = tokens.map(function(token){ + var pattern = token.pattern.source; + return pattern.substring(4, pattern.length - 1); + }); + return { + tokens: tokens, + pattern: new RegExp(patterns.length == 1 ? + "^(" + patterns[0] + ")" : "^(?:(" + patterns.join(")|(") + "))") + }; + } + + function toRegExpSource(s){ + return /^[a-zA-Z]\w*$/.test(s) ? s + "\\b" : + s.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&"); + } + + function sanitizeToken(token){ + token.literal = typeof token.pattern == "string"; + token.pattern = new RegExp("^(?:" + (token.literal ? + toRegExpSource(token.pattern) : token.pattern.source) + ")"); + } + + function tokenComparator(a, b){ + if(a.literal ^ b.literal){ + return a.literal ? -1 : 1; + } + var ap = a.pattern.source, bp = b.pattern.source; + if(ap.length != bp.length){ + return ap.length < bp.length ? 1 : -1; + } + return ap < bp ? -1 : (ap > bp ? 1 : 0); + } + + // export + + return Grammar; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser.js new file mode 100644 index 0000000..ac22cac --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser.js @@ -0,0 +1,95 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + var consumeReadyState = {consume: 1, bracket: 1, eos: 1}, + eoi = {id: "End of Input", left: -1, right: -1}; + + function Parser(grammar, name){ + this.reset(grammar, name); + } + + Parser.prototype = { + reset: function(grammar, name){ + this.stack = []; + this.state = "supply"; + this.grammar = grammar; + this.expected = name || "main"; + }, + _consume: function(){ + if(this.state == "eos"){ + this.state = "done"; + return this.token; + } + //assert((this.state in consumeReadyState) && this.stack.length); + var token = this.stack.pop(); + if(this.state == "consume"){ + this._decide(); + }else{ + //assert(this.state == "bracket"); + this.stack.push(this.token); + this.state = "supply"; + } + return token; + }, + _decide: function(token){ + if(token){ + //assert(this.state == "supply"); + this.token = token; + } + + var left = this.token.left, + right = this.stack.length ? this.stack[this.stack.length - 1].right : 0; + + if(right < left){ + this.expected = this.token.next; + this.stack.push(this.token); + this.state = "supply"; + }else if(right > left){ + this.state = this.stack.length ? "consume" : "eos"; + }else{ + if(this.stack.length){ + if(this.grammar.brackets[this.stack[this.stack.length - 1].value] === this.token.value){ + this.state = "bracket"; + return; + } + } + throw Error("Unbalanced brackets or an operator is not associative: " + this.token.id); + } + }, + getExpectedState: function(){ + return this.state == "done" ? null : this.grammar[this.expected]; + }, + putToken: function(token, scanner){ + if(token){ + if(!token.ignore){ + //assert(this.state == "supply"); + this._decide(token); + while(this.state in consumeReadyState){ + token = this._consume(); + if(token !== eoi){ + this.onToken(token); + } + } + } + }else{ + this.putToken(eoi, scanner); + if(this.state != "done"){ + throw Error("Can't find a legal token" + + (scanner ? " at (" + scanner.line + ", " + scanner.pos + ") in: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : + scanner.buffer) + "\n" : ".\n") + + "Tried '" + this.expected + "': " + + this.grammar[this.expected].tokens.map(function(token){ + return "'" + token.id + "'"; + }).join(", ") + "."); + } + } + }, + onToken: function(token){ + console.log(token.id + " (" + token.line + ", " + token.pos + "): " + token.value); + } + }; + + return Parser; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser2.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser2.js new file mode 100644 index 0000000..b2eb6d2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bottomUp/Parser2.js @@ -0,0 +1,82 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + var consumeReadyState = {consume: 1, eos: 1}, + eoi = {id: "End of Input", left: -1, right: -1}; + + function Parser2(grammar, name, priority){ + this.reset(grammar, name, priority); + } + + Parser2.prototype = { + reset: function(grammar, name, priority){ + this.stack = []; + this.state = "supply"; + this.grammar = grammar; + this.expected = name || "main"; + this.priority = priority || 0; + }, + _consume: function(){ + if(this.state == "eos"){ + this.state = "done"; + return this.token; + } + //assert((this.state in consumeReadyState) && this.stack.length); + var token = this.stack.pop(); + this._decide(); + return token; + }, + _decide: function(token){ + if(token){ + //assert(this.state == "supply"); + this.token = token; + } + + var left = this.token.left, + right = this.stack.length ? this.stack[this.stack.length - 1].right : this.priority; + + if(right < left){ + this.expected = this.token.next; + this.stack.push(this.token); + this.state = "supply"; + }else{ + this.state = this.stack.length ? "consume" : "eos"; + } + }, + getExpectedState: function(){ + return this.state == "done" ? null : this.grammar[this.expected]; + }, + putToken: function(token, scanner){ + if(token){ + if(!token.ignore){ + //assert(this.state == "supply"); + this._decide(token); + while(this.state in consumeReadyState){ + token = this._consume(); + if(token !== eoi){ + this.onToken(token); + } + } + } + }else{ + this.putToken(eoi, scanner); + if(this.state != "done"){ + throw Error("Can't find a legal token" + + (scanner ? " at (" + scanner.line + ", " + scanner.pos + ") in: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : + scanner.buffer) + "\n" : ".\n") + + "Tried '" + this.expected + "': " + + this.grammar[this.expected].tokens.map(function(token){ + return "'" + token.id + "'"; + }).join(", ") + "."); + } + } + }, + onToken: function(token){ + console.log(token.id + " (" + token.line + ", " + token.pos + "): " + token.value); + } + }; + + return Parser2; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bower.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bower.json new file mode 100644 index 0000000..1dd9f7b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/bower.json @@ -0,0 +1,11 @@ +{ + "name": "parser-toolkit", + "version": "0.0.4", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ] +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/package.json new file mode 100644 index 0000000..4912f2f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "parser-toolkit@>=0.0.3", + "scope": null, + "escapedName": "parser-toolkit", + "name": "parser-toolkit", + "rawSpec": ">=0.0.3", + "spec": ">=0.0.3", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/stream-json" + ] + ], + "_from": "parser-toolkit@>=0.0.3", + "_id": "parser-toolkit@0.0.5", + "_inCache": true, + "_location": "/parser-toolkit", + "_nodeVersion": "3.2.0", + "_npmUser": { + "name": "elazutkin", + "email": "eugene@lazutkin.com" + }, + "_npmVersion": "2.13.3", + "_phantomChildren": {}, + "_requested": { + "raw": "parser-toolkit@>=0.0.3", + "scope": null, + "escapedName": "parser-toolkit", + "name": "parser-toolkit", + "rawSpec": ">=0.0.3", + "spec": ">=0.0.3", + "type": "range" + }, + "_requiredBy": [ + "/stream-json" + ], + "_resolved": "https://registry.npmjs.org/parser-toolkit/-/parser-toolkit-0.0.5.tgz", + "_shasum": "ec4b61729c86318b56ea971bfba6b3c672d62c01", + "_shrinkwrap": null, + "_spec": "parser-toolkit@>=0.0.3", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/stream-json", + "author": { + "name": "Eugene Lazutkin", + "email": "eugene.lazutkin@gmail.com", + "url": "http://lazutkin.com/" + }, + "bugs": { + "url": "http://github.com/uhop/parser-toolkit/issues" + }, + "contributors": [ + { + "name": "Eugene Lazutkin", + "email": "eugene.lazutkin@gmail.com", + "url": "http://lazutkin.com/" + } + ], + "dependencies": {}, + "description": "Toolkit to make streamable scanners and parsers.", + "devDependencies": {}, + "directories": { + "test": "tests" + }, + "dist": { + "shasum": "ec4b61729c86318b56ea971bfba6b3c672d62c01", + "tarball": "https://registry.npmjs.org/parser-toolkit/-/parser-toolkit-0.0.5.tgz" + }, + "gitHead": "9197cbc0815061a9833088d1a8e9a2dda75fc68f", + "github": "http://github.com/uhop/parser-toolkit", + "homepage": "http://github.com/uhop/parser-toolkit", + "keywords": [ + "scanner", + "lexer", + "tokenizer", + "parser" + ], + "license": "BSD-3-Clause", + "maintainers": [ + { + "name": "elazutkin", + "email": "eugene@lazutkin.com" + } + ], + "name": "parser-toolkit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/uhop/parser-toolkit.git" + }, + "scripts": { + "test": "node tests/test_jsonsc.js" + }, + "version": "0.0.5" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/csv.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/csv.js new file mode 100644 index 0000000..52a4ad6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/csv.js @@ -0,0 +1,20 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +(["../topDown/Grammar"], function(Grammar){ + "use strict"; + + var rule = Grammar.rule, any = Grammar.any, maybe = Grammar.maybe, repeat = Grammar.repeat; + + var crlf = {id: "crlf", pattern: /\u000A|\u000D\u000A|\u000D/}, + sep = {id: "sep", pattern: /\,/}, + text = {id: "text", pattern: /[^\"\,\u000A\u000D]{1,256}/}; + + var csv = new Grammar({ + main: [rule("record"), maybe(crlf, maybe(rule("main")))], + record: [rule("field"), repeat(sep, rule("field"))], + field: maybe(any(rule("escaped"), rule("value"))), + escaped: ["\"", repeat(any(text, sep, crlf, "\"\"")), "\""], + value: [text, repeat(text)] + }); + + return csv; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr.js new file mode 100644 index 0000000..da66e53 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr.js @@ -0,0 +1,146 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +(["../bottomUp/Grammar"], function(Grammar){ + "use strict"; + + var expr = new Grammar({ + operand: { + // values + id: { + pattern: /[A-Za-z_\$]\w*/, + left: 12000, + right: 12000, + next: "operator" + }, + num: { + pattern: /(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?|\.\d+(?:[eE][+-]?\d+)?/, + left: 12000, + right: 12000, + next: "operator" + }, + // unary prefix operators + "pre++": { + pattern: "++", + left: 12000, + right: 8001, + next: "operand" + }, + "pre--": { + pattern: "--", + left: 12000, + right: 8001, + next: "operand" + }, + "pre+": { + pattern: "+", + left: 12000, + right: 7001, + next: "operand" + }, + "pre-": { + pattern: "-", + left: 12000, + right: 7001, + next: "operand" + }, + // parentheses + "(": { + left: 12000, + right: 0, + next: "operand" + }, + "[": { + left: 12000, + right: 0, + next: "operand" + }, + // technical + ws: { + pattern: /[\u0009\u000B\u000C\u0020\u00A0\uFEFF]+/, + left: 12000, + right: 12000, + ignore: true + }, + crlf: { + pattern: /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/, + left: 12000, + right: 12000, + ignore: true + } + }, + operator: { + // unary postfix operators + "post++": { + pattern: "++", + left: 8002, + right: 12000, + next: "operator" + }, + "post--": { + pattern: "--", + left: 8002, + right: 12000, + next: "operator" + }, + // parentheses + sub: { + pattern: "[", + left: 9998, + right: 0, + next: "operand" + }, + "]": { + left: 0, + right: 10000, + next: "operator" + }, + call: { + pattern: "(", + left: 8998, + right: 0, + next: "operand" + }, + ")": { + left: 0, + right: 9000, + next: "operator" + }, + // binary operators + "*": { + left: 8000, + right: 8001, + next: "operand" + }, + "/": { + left: 8000, + right: 8001, + next: "operand" + }, + "+": { + left: 7000, + right: 7001, + next: "operand" + }, + "-": { + left: 7000, + right: 7001, + next: "operand" + }, + // technical + ws: { + pattern: /[\u0009\u000B\u000C\u0020\u00A0\uFEFF]+/, + left: 12000, + right: 12000, + ignore: true + }, + crlf: { + pattern: /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/, + left: 12000, + right: 12000, + ignore: true + } + }, + brackets: {"(": ")", "[": "]"} + }); + + return expr; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr2.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr2.js new file mode 100644 index 0000000..0a5f9d0 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/expr2.js @@ -0,0 +1,109 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +(["../bottomUp/Grammar"], function(Grammar){ + "use strict"; + + function operand(pattern){ + return { + pattern: pattern, + left: 0, + right: 0, + next: "operator" + }; + } + + function prefix(priority, pattern){ + return { + pattern: pattern, + left: priority || 70, + right: 0, + next: "operator" + }; + } + + function infix(priority, pattern){ + return { + pattern: pattern, + left: priority, + right: priority, + next: "operand" + }; + } + + function infixr(priority, pattern){ + return { + pattern: pattern, + left: priority, + right: priority - 1, + next: "operand" + }; + } + + function pattern(priority, rule, next){ + return { + pattern: rule[0], + left: priority, + right: 0, + rule: rule, + next: next || "operator" + }; + } + + function maybe(){ + var rule = Array.prototype.slice.call(arguments, 0); + rule.optional = true; + return rule; + } + + function repeat(){ + var rule = Array.prototype.slice.call(arguments, 0); + rule.optional = true; + rule.repeatable = true; + return rule; + } + + var expr = new Grammar({ + operand: { + // values + id: operand(/[A-Za-z_\$]\w*/), + num: operand(/(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?|\.\d+(?:[eE][+-]?\d+)?/), + // unary prefix operators + "pre+": operand("+"), + "pre-": operand("-"), + // parentheses + "(": operand(), + "[": operand(), + // technical + ws: { + pattern: /[\u0009\u000B\u000C\u0020\u00A0\uFEFF]+/, + ignore: true + }, + crlf: { + pattern: /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/, + ignore: true + } + }, + operator: { + // the ternary operator + "?": pattern(20, ["?", 0, ":", 0]), + // binary operators + "*": infix(60), + "/": infix(60), + "+": infix(50), + "-": infix(50), + // parentheses + sub: pattern(80, ["[", 0, "]"]), + call: pattern(80, ["(", maybe(0, repeat(",", 0)), ")"]), + // technical + ws: { + pattern: /[\u0009\u000B\u000C\u0020\u00A0\uFEFF]+/, + ignore: true + }, + crlf: { + pattern: /[\u000A\u2028\u2029]|\u000D\u000A|\u000D/, + ignore: true + } + } + }); + + return expr; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/json.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/json.js new file mode 100644 index 0000000..4ec417d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/json.js @@ -0,0 +1,33 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +(["../topDown/Grammar"], function(Grammar){ + "use strict"; + + var rule = Grammar.rule, any = Grammar.any, maybe = Grammar.maybe, repeat = Grammar.repeat; + + var ws = {id: "ws", pattern: /\s{1,256}/}, + // numeric tokens + nonZero = {id: "nonZero", pattern: /[1-9]/}, + exponent = {id: "exponent", pattern: /[eE]/}, + numericChunk = {id: "numericChunk", pattern: /\d{1,256}/}, + // string tokens + plainChunk = {id: "plainChunk", pattern: /[^\"\\]{1,256}/}, + escapedChars = {id: "escapedChars", pattern: /\\(?:[bfnrt\"\\\/]|u[0-9a-fA-F]{4})/}; + + var json = new Grammar({ + main: [rule("ws"), rule("value")], + ws: repeat(ws), + value: [any(rule("object"), rule("array"), rule("string"), + rule("number"), ["-", rule("number")], "true", "false", "null"), rule("ws")], + object: ["{", rule("ws"), maybe(rule("pair"), + repeat(",", rule("ws"), rule("pair"))), "}"], + pair: [rule("string"), rule("ws"), ":", rule("ws"), rule("value")], + array: ["[", rule("ws"), maybe(rule("value"), + repeat(",", rule("ws"), rule("value"))), "]"], + string: ["\"", repeat(any(plainChunk, escapedChars)), "\""], + number: [any("0", [nonZero, repeat(numericChunk)]), + maybe(".", repeat(numericChunk)), maybe(exponent, maybe(any("-", "+")), + numericChunk, repeat(numericChunk))] + }); + + return json; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_lexer.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_lexer.js new file mode 100644 index 0000000..a0a1a9a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_lexer.js @@ -0,0 +1,177 @@ +var RE2 = require("re2"); + +var SAMPLES = 10000000; + +var MAX_POWER = 32; + +function rand(from, to){ + return from + Math.floor(Math.random() * (to - from)); +} + +function randomNumber(){ + var n = Math.random(); + if(Math.random() < 0.5){ + n = -n; + } + n *= Math.pow(10, rand(0, MAX_POWER)); + return "" + n; +} + +var numberLexer = /^\-?(?:0|[1-9]\d*)(?:\.\d*(?:[eE][+-]?\d+)?)?$/; + +function regexLexer(s){ + return numberLexer.test(s); +} + +var re2NumberLexer = new RE2(numberLexer); + +function re2Lexer(s){ + return re2NumberLexer.test(s); +} + +function manualLexer1(s){ + var i = 0; + // sing + if(s.charAt(0) == "-"){ + ++i; + } + // first number sequence + var ch = s.charAt(i++); + if(ch == "0"){ + ch = s.charAt(i++); + }else{ + if("1" <= ch && ch <= "9"){ + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + }else{ + return false; + } + } + if(!ch){ + return true; + } + // possible fraction + if(ch == "."){ + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + if(!ch){ + return true; + } + } + // possible exponent + if(ch == "e" || ch == "E"){ + ch = s.charAt(i++); + // posible exponent sign + if(ch == "+" || ch == "-"){ + ch = s.charAt(i++); + } + // exponent + if(!ch || "0" > ch || ch > "9"){ + return false; + } + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + if(!ch){ + return true; + } + } + return false; +} + +function manualLexer2(s){ + var i = 0; + // sing + if(s.charAt(0) == "-"){ + ++i; + } + // first number sequence + var ch = s.charAt(i++); + switch(ch){ + case "0": + ch = s.charAt(i++); + break; + case "1": + case "2": + case "3": + case "4": + case "5": + case "6": + case "7": + case "8": + case "9": + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + break; + default: + return false; + } + switch(ch){ + case "": + return true; + case ".": + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + if(!ch){ + return true; + } + break; + } + switch(ch){ + case "e": + case "E": + switch(ch = s.charAt(i++)){ + case "+": + case "-": + ch = s.charAt(i++); + break; + } + // exponent + if(!ch || "0" > ch || ch > "9"){ + return false; + } + while(ch = s.charAt(i++), ch && "0" <= ch && ch <= "9"); + if(!ch){ + return true; + } + } + return false; +} + +function bench(f){ + var snapshot = process.hrtime(); + f(); + var diff = process.hrtime(snapshot); + console.log(f.name + " took " + (diff[0] + diff[1] * 1e-9) + " seconds."); +} + +function benchRegex(){ + for(var i = 0; i < SAMPLES; ++i){ + if(!regexLexer(randomNumber())){ + throw Error("wrong number"); + } + } +} + +function benchRe2(){ + for(var i = 0; i < SAMPLES; ++i){ + if(!re2Lexer(randomNumber())){ + throw Error("wrong number"); + } + } +} + +function benchManual1(){ + for(var i = 0; i < SAMPLES; ++i){ + if(!manualLexer1(randomNumber())){ + throw Error("wrong number"); + } + } +} + +function benchManual2(){ + for(var i = 0; i < SAMPLES; ++i){ + if(!manualLexer2(randomNumber())){ + throw Error("wrong number"); + } + } +} + +bench(benchRegex); +bench(benchRe2); +bench(benchManual1); +bench(benchManual2); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_regex.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_regex.js new file mode 100644 index 0000000..51d1a57 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/perf_regex.js @@ -0,0 +1,117 @@ +var RE2 = require("re2"); + +// let's prepare our search string + +function createRange(from, to){ + var a = ""; + for(var i = from.charCodeAt(), n = to.charCodeAt(0); i <= n; ++i){ + a += String.fromCharCode(i); + } + return a; +} + +var chars = createRange("a", "z") + createRange("A", "Z") + createRange("0", "9"); + +var SAMPLES = 10000000; + +var ALTERNATIVES_MIN = 1; +var ALTERNATIVES_MAX = 10; + +var PATTERN_LENGTH_MIN = 1; +var PATTERN_LENGTH_MAX = 5; + +var D_RATIO = 0.1; +var W_RATIO = 0.1; + +function randomString(n){ + var a = "", l = chars.length; + for(var i = 0; i < n; ++i){ + a += chars.charAt(Math.floor(Math.random() * l)); + } + return a; +} + +function randomPattern(n){ + var a = "", l = chars.length; + for(var i = 0; i < n; ++i){ + var ratio = Math.random(); + if(ratio < D_RATIO){ + a += "\\d"; + continue; + } + ratio -= D_RATIO; + if(ratio < W_RATIO){ + a += "\\w"; + continue; + } + a += chars.charAt(Math.floor(Math.random() * l)); + } + return a; +} + +function rand(from, to){ + return from + Math.floor(Math.random() * (to - from)); +} + +function randomPatternSet(){ + var n = rand(ALTERNATIVES_MIN, ALTERNATIVES_MAX), + p = []; + for(var i = 0; i < n; ++i){ + var l = rand(PATTERN_LENGTH_MIN, PATTERN_LENGTH_MAX); + p.push(randomPattern(l)); + } + return p; +} + +function cvtToRegExpArray(p){ + return p.map(function(pattern){ + return new RE2("^(?:" + pattern + ")"); + //return new RegExp("^(?:" + pattern + ")"); + }); +} + +function cvtToRegExp(p){ + return new RE2("^(?:(" + p.join(")|(") + "))"); + //return new RegExp("^(?:(" + p.join(")|(") + "))"); +} + + +var p = randomPatternSet(); + +function benchArray(patterns){ + var p = cvtToRegExpArray(patterns), pl = p.length; + for(var i = 0; i < SAMPLES; ++i){ + var s = randomString(16); + for(var j = 0; j < pl; ++j){ + var m = p[j].exec(s); + if(m){ + break; + } + } + } +} + +function benchRegExp(patterns){ + var p = cvtToRegExp(patterns), pl = patterns.length; + for(var i = 0; i < SAMPLES; ++i){ + var s = randomString(16); + var m = p.exec(s); + if(m){ + for(var j = 1; j <= pl; ++j){ + if(m[j]){ + break; + } + } + } + } +} + +function bench(f){ + var snapshot = process.hrtime(); + f(); + var diff = process.hrtime(snapshot); + console.log(f.name + " took " + (diff[0] + diff[1] * 1e-9) + " seconds."); +} + +bench(function regex(){ benchRegExp(p); }); +bench(function array(){ benchArray(p); }); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/printGrammar.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/printGrammar.js new file mode 100644 index 0000000..9142cad --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/printGrammar.js @@ -0,0 +1,74 @@ +function printGrammar(grammar){ + var registry = {}; + Object.keys(grammar).forEach(function(name){ + collectRules(grammar[name], registry); + }); + console.log("Grammar: " + Object.keys(grammar).length); + console.log("Registry: " + Object.keys(registry).length); + Object.keys(registry).forEach(function(name){ + printRule(registry[name]); + }); +} + +function collectRules(rule, registry){ + if(!rule.name){ + rule.name = "R" + Object.keys(registry).length; + } + if(registry[rule.name] !== rule){ + registry[rule.name] = rule; + rule.forEach(function(item){ + if(!item.tokens){ + return; + } + item.tokens.forEach(function(token){ + token.nextArray.forEach(function(rule){ + collectRules(rule, registry); + }); + }); + }); + } +} + +function printRule(rule){ + var flags = collectFlags(rule); + console.log(rule.name + ":" + (flags ? " " + flags : "")); + printItem(rule.state); + rule.forEach(printItem); +} + +function collectFlags(item){ + var flags = []; + if(item.any){ + flags.push("any"); + } + if(item.optional){ + flags.push("optional"); + } + if(item.repeatable){ + flags.push("repeatable"); + } + return flags.join(" "); +} + +function printItem(item, index){ + var flags = item ? collectFlags(item) : "NONE", + name = typeof index == "number" ? "item/" + index : "state"; + console.log(" " + name + ":" + (flags ? " " + flags : "")); + if(item){ + console.log(" pattern: " + (item.pattern ? item.pattern.source : "NONE")); + if(item.tokens){ + item.tokens.forEach(function(token){ + var path = token.nextArray.map(function(rule, index){ + return rule.name + "/" + token.nextIndex[index]; + }).join(" "); + console.log(" token: " + token.id + " - " + path); + }); + }else if(item instanceof Array){ + console.log(" rule: " + item.name); + }else{ + console.log(" UNKNOWN: " + item); + } + } +} + +module.exports = printGrammar; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json new file mode 100644 index 0000000..30930e7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json @@ -0,0 +1,3315 @@ +{ + "a": { + "6U閆崬밺뀫颒myj츥휘:$薈mY햚#rz飏+玭V㭢뾿愴YꖚX亥ᮉ푊\u0006垡㐭룝\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null, + "b茤z\\.N": [[ + "ZL:ᅣዎ*Y|猫劁櫕荾Oj为1糕쪥泏S룂w࡛Ᏺ⸥蚙)", + { + "\"䬰ỐwD捾V`邀⠕VD㺝sH6[칑.:醥葹*뻵倻aD\"": true, + "e浱up蔽Cr෠JK軵xCʨ<뜡癙Y獩ケ齈X/螗唻?<蘡+뷄㩤쳖3偑犾&\\첊xz坍崦ݻ鍴\"嵥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false, + "l?Ǩ喳e6㔡$M꼄I,(3᝝縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739, + "o㮚?\"춛㵉<\/﬊ࠃ䃪䝣wp6ἀ䱄[s*S嬈貒pᛥ㰉'돀": [{ + "(QP윤懊FI<ꃣ『䕷[\"珒嶮?%Ḭ壍಻䇟0荤!藲끹bd浶tl\u2049#쯀@僞": {"i妾8홫": { + ",M맃䞛K5nAㆴVN㒊햬$n꩑&ꎝ椞阫?/ṏ세뉪1x쥼㻤㪙`\"$쟒薟B煌܀쨝ଢ଼2掳7㙟鴙X婢\u0002": "Vዉ菈᧷⦌kﮞఈnz*﷜FM\"荭7ꍀ-VR<\/';䁙E9$䩉\f @s?퍪o3^衴cඎ䧪aK鼟q䆨c{䳠5mᒲՙ蘹ᮩ": { + "F㲷JGo⯍P덵x뒳p䘧☔\"+ꨲ吿JfR㔹)4n紬G练Q፞!C|": true, + "p^㫮솎oc.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\፾@Fᭌ\\K": false, + "蟌Tk愙潦伩": { + "a<\/@ᾛ慂侇瘎": -7271305752851720826, + "艓藬/>၄ṯ,XW~㲆w": {"E痧郶)㜓ha朗!N赻瞉駠uC\u20ad辠x퓮⣫P1ࠫLMMX'M刼唳됤": null, + "P쓫晥%k覛ዩIUᇸ滨:噐혲lMR5䋈V梗>%幽u頖\\)쟟": null, + "eg+昉~矠䧞难\b?gQ쭷筝\\eꮠNl{ಢ哭|]Mn銌╥zꖘzⱷ⭤ᮜ^": [ + -1.30142114406914976E17, + -1.7555215491128452E-19, + null, + "渾㨝ߏ牄귛r?돌?w[⚞ӻ~廩輫㼧/", + -4.5737191805302129E18, + null, + "xy࿑M[oc셒竓Ⓔx?뜓y䊦>-D켍(&&?XKkc꩖ﺸᏋ뵞K伕6ী)딀P朁yW揙?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许", + 3808159498143417627, + null, + {"m試\u20df1{G8&뚈h홯J<\/": { + "3ஸ厠zs#1K7:rᥞoꅔꯧ&띇鵼鞫6跜#赿5l'8{7㕳(b/j\"厢aq籀ꏚ\u0015厼稥": [ + -2226135764510113982, + true, + null, + { + "h%'맞S싅Hs&dl슾W0j鿏MםD놯L~S-㇡R쭬%": null, + "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null, + "恇I転;￸B2Y`z\\獓w,놏濐撐埵䂄)!䶢D=ഭ㴟jyY": { + "$ࡘt厛毣ൢI芁<겿骫⫦6tr惺a": [ + 6.385779736989334E-20, + false, + true, + true, + [ + -6.891946211462334E-19, + null, + { + "]-\\Ꟑ1/薓❧Ὂ\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": { + "\"◉B\"pᶉt骔J꩸ᄇᛐi╰栛K쉷㉯鐩!㈐n칍䟅難>盥y铿e୔蒏M貹ヅ8嘋퀯䉶ጥ㏢殊뻳\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false, + "6.瀫cN䇮F㧺?\\椯=ڈT䘆4␘8qv": -3.5687501019676885E-19, + "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTs1c-7(䵢\u2069匏絘ꯉ:l毴汞t戀oෟᵶ뮱፣-醇Jx䙬䐁햢0࣫ᡁgrㄛ": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦi뵲M", + "⏑[\"ugoy^儣횎~U\\섯겜論l2jw஌yD腅̂\u0019": true, + "ⵯɇ䐲᫿࢚!㯢l샅笶戮1꣖0Xe": null, + "劅f넀識b宁焊E찓橵G!ʱ獓뭔雩괛": [{"p⹣켙[q>燣䍃㞽ᩲx:쓤삘7玑퇼0<\/q璂ᑁ[Z\\3䅵䧳\u0011㤧|妱緒C['췓Yꞟ3Z鳱雼P錻BU씧U`ᢶg蓱>.1ӧ譫'L_5V䏵Ц": [ + false, + false, + {"22䂍盥N霂얢躰e9⑩_뵜斌n@B}$괻Yᐱ@䧋V\"☒-諯cV돯ʠ": true, + "Ű螧ᔼ檍鍎땒딜qꄃH뜣<獧ूCY吓⸏>XQ㵡趌o끬k픀빯a(ܵ甏끆୯/6Nᪧ}搚ᆚ짌P牰泱鈷^d꣟#L삀\"㕹襻;k㸊\\f+": true, + "쎣\",|⫝̸阊x庿k잣v庅$鈏괎炔k쬪O_": [ + "잩AzZGz3v愠ꉈⵎ?㊱}S尳௏p\r2>췝IP䘈M)w|\u000eE", + -9222726055990423201, + null, + [ + false, + {"´킮'뮤쯽Wx讐V,6ᩪ1紲aႈ\u205czD": [ + -930994432421097536, + 3157232031581030121, + "l貚PY䃛5@䭄귻m㎮琸f": 1.0318894506812084E-19, + "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶq腽xc(៯夐J5굄䕁Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uญ<\/ಟ룴𥳐ݩ$": 8350772684161555590, + "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦r䰂f矩'-7䡭桥Dz兔V9谶居㺍ᔊ䩯덲.\u001eL0ὅㅷ釣": [{ + "<쯬J卷^숞u࠯䌗艞R9닪g㐾볎a䂈歖意:%鐔|ﵤ|y}>;2,覂⶚啵tb*仛8乒㓶B࿠㯉戩oX 貘5V嗆렽낁߼4h䧛ꍺM空\\b꿋貼": 8478577078537189402, + "VD*|吝z~h譺aᯒ": { + "YI췢K<\/濳xNne玗rJo쾘3핰鴊\"↱AR:ࢷ\"9?\"臁說)?誚ꊏe)_D翾W?&F6J@뺾ꍰNZ醊Z쾈വH嶿?炫㷱鬰M겈᭨b,⻁鈵P䕡䀠८ⱄ홎鄣": { + "@?k2鶖㋮\"Oರ K㨇廪儲\u0017䍾J?);\b*묀㗠섳햭1MC V": null, + "UIICP!BUA`ᢈ㋸~袩㗪⾒=fB﮴l1ꡛ죘R辂여ҳ7쮡<䩲`熕8頁": 4481809488267626463, + "Y?+8먙ᚔ鋳蜩럶1㥔y璜౩`": [ + null, + 1.2850335807501874E-19, + "~V2", + 2035406654801997866, + { + "<숻1>\"": -8062468865199390827, + "M㿣E]}qwG莎Gn᝶(ꔙ\\D⬲iꇲs寢t駇S뀡ꢜ": false, + "pꝤ㎏9W%>M;-U璏f(^j1?&RB隧 忓b똊E": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}鷧XﻘMツb䕖;㪻", + "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼YᰟH3镔ᴚ斦\\鏑r*2橱G⼔F/.j": true, + "RK좬뎂a홠f*f㱉ᮍ⦋潙㨋Gu곌SGI3I뿐\\F',)t`荁蘯囯ﮉ裲뇟쥼_ገ驪▵撏ᕤV": 1.52738225997956557E18, + "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤閍銤唫ၕb<\/w踲䔼u솆맚,䝒ᝳ'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿0\\<=(uL䷍刨쑪>俆揓Cy襸Q힆䆭涷<\/ᐱ0ɧ䗾䚹\\ኜ?ꄢᇘ`䴢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+g騍X", + "GgG꽬[(嫓몍6\u0004궍宩㙻/>\u0011^辍dT腪hxǑ%ꊇk,8(W⧂結P鬜O": [{ + "M㴾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓⍵/徯O.M㏥ʷD囎⧔쁳휤T??鉬뇙=#ꢫ숣BX䭼<\/d똬졬g榿)eꨋﯪ좇첻\u001a\u0011\";~쓆BH4坋攊7힪", + "iT:L闞椕윚*滛gI≀Wਟඊ'ꢆ縺뱹鮚Nꩁ᧬蕼21줧\\䋯``⍐\\㏱鳨": 1927052677739832894, + "쮁缦腃g]礿Y㬙 fヺSɪ꾾N㞈": [ + null, + null, + { + "!t,灝Y 1䗉罵?c饃호䉂Cᐭ쒘z(즽sZG㬣sഖE4뢜㓕䏞丮Qp簍6EZឪ겛fx'ꩱQ0罣i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [ + -3.3325685522591933E18, + [{"㓁5]A䢕1룥BC?Ꙍ`r룔Ⳛ䙡u伲+\u0001്o": [ + null, + 4975309147809803991, + null, + null, + {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fS෉놁뮔/ꕼ䓈쁺4\\霶䠴ᩢ<\/t4?죵>uD5➶༆쉌럮⢀秙䘥\u20972ETR3濡恆vB? ~鸆\u0005": { + "`閖m璝㥉b뜴?Wf;?DV콜\u2020퍉౓擝宏ZMj3mJ먡-傷뱙yח㸷꥿ ໘u=M읝!5吭L4v\\?ǎ7C홫": null, + "|": false, + "~Ztᛋ䚘\\擭㗝傪W陖+㗶qᵿ蘥ᙄp%䫎)}=⠔6ᮢS湟-螾-mXH?cp": 448751162044282216, + "\u209fad놹j檋䇌ᶾ梕㉝bוּ": {"?苴ꩠD䋓帘5騱qﱖPF?☸珗顒yU ᡫcb䫎 S@㥚gꮒ쎘泴멖\\:I鮱TZ듒ᶨQ3+f7캙\"?\f풾\\o杞紟﻽M.⏎靑OP": [ + -2.6990368911551596E18, + [{"䒖@<᰿<\/⽬tTr腞&G%᳊秩蜰擻f㎳?S㵧\r*k뎾-乢겹隷j軛겷0룁鮁": {")DO0腦:춍逿:1㥨่!蛍樋2": [{ + ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": { + "x捗甠nVq䅦w`CD⦂惺嘴0I#vỵ} \\귂S끴D얾?Ԓj溯\"v餄a": { + "@翙c⢃趚痋i\u0015OQ⍝lq돆Y0pࢥ3쉨䜩^<8g懥0w)]䊑n洺o5쭝QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸XޔFtj;iC": false, + "I&뱋゘|蓔䔕측瓯%6ᗻHW\\N1貇#?僐ᗜgh᭪o'䗈꽹Rc욏/蔳迄༝!0邔䨷푪8疩)[쭶緄㇈୧ፐ": { + "B+:ꉰ`s쾭)빼C羍A䫊pMgjdx䐝Hf9᥸W0!C樃'蘿f䫤סи\u0017Jve? 覝f둀⬣퓉Whk\"஼=չﳐ皆笁BIW虨쫓F廰饞": -642906201042308791, + "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [ + "RK鳗z=袤Pf|[,u욺", + "Ẏᏻ罯뉋⺖锅젯㷻{H䰞쬙-쩓D]~\u0013O㳢gb@揶蔉|kᦂ❗!\u001ebM褐sca쨜襒y⺉룓", + null, + null, + true, + -1.650777344339075E-19, + false, + "☑lꄆs힨꤇]'uTന⌳농].1⋔괁沰\"IWഩ\u0019氜8쟇䔻;3衲恋,窌z펏喁횗?4?C넁问?ᥙ橭{稻Ⴗ_썔", + "n?]讇빽嗁}1孅9#ꭨ靶v\u0014喈)vw祔}룼쮿I", + -2.7033457331882025E18, + { + ";⚃^㱋x:饬ኡj'꧵T☽O㔬RO婎?향ᒭ搩$渣y4i;(Q>꿘e8q": "j~錘}0g;L萺*;ᕭꄮ0l潛烢5H▄쳂ꏒוֹꙶT犘≫x閦웧v", + "~揯\u2018c4職렁E~ᑅቚꈂ?nq뎤.:慹`F햘+%鉎O瀜쟏敛菮⍌浢<\/㮺紿P鳆ࠉ8I-o?#jﮨ7v3Dt赻J9": null, + "ࣝW䌈0ꍎqC逖,횅c၃swj;jJS櫍5槗OaB>D踾Y": {"㒰䵝F%?59.㍈cᕨ흕틎ḏ㋩B=9IېⓌ{:9.yw}呰ㆮ肒᎒tI㾴62\"ዃ抡C﹬B<\/촋jo朣", + [ + -7675533242647793366, + {"ᙧ呃:[㒺쳀쌡쏂H稈㢤\u001dᶗGG-{GHྻຊꡃ哸䵬;$?&d\\⥬こN圴됤挨-'ꕮ$PU%?冕눖i魁q騎Q": [ + false, + [[ + 7929823049157504248, + [[ + true, + "Z菙\u0017'eꕤ᱕l,0\\X\u001c[=雿8蠬L<\/낲긯W99g톉4ퟋb㝺\u0007劁'!麕Q궈oW:@X၎z蘻m絙璩귓죉+3柚怫tS捇蒣䝠-擶D[0=퉿8)q0ٟ", + "唉\nFA椭穒巯\\䥴䅺鿤S#b迅獘 ﶗ꬘\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡ틍\"㙙Eh@oA賑㗠y必Nꊑᗘ", + -2154220236962890773, + -3.2442003245397908E18, + "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄", + -7857990034281549164, + 1.44283696979059942E18, + null, + {"ꫯAw跭喀 ?_9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rỏ": [ + 7.393662029337442E15, + 3564680942654233068, + [ + false, + -5253931502642112194, + "煉\\辎ೆ罍5⒭1䪁䃑s䎢:[e5}峳ﴱn騎3?腳Hyꏃ膼N潭錖,Yᝋ˜YAၓ㬠bG렣䰣:", + true, + null, + { + "⒛'P&%죮|:⫶춞": -3818336746965687085, + "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[ + -8757574841556350607, + -3045234949333270161, + null, + { + "Ꮬr輳>⫇9hU##w@귪A\\C 鋺㘓ꖐ梒뒬묹㹻+郸嬏윤'+g<\/碴,}ꙫ>손;情d齆J䬁ຩ撛챝탹/R澡7剌tꤼ?ặ!`⏲睤\u00002똥଴⟏": null, + "\u20f2ܹe\\tAꥍư\\x当뿖렉禛;G檳ﯪS૰3~㘠#[J<}{奲 5箉⨔{놁<\/釿抋,嚠/曳m&WaOvT赋皺璑텁": [[ + false, + null, + true, + -5.7131445659795661E18, + "萭m䓪D5|3婁ఞ>蠇晼6nﴺPp禽羱DS<睓닫屚삏姿", + true, + [ + -8759747687917306831, + { + ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬ@ᴔ쨺芛髿UT퓻春<\/yꏸ>豚W釺N뜨^?꽴﨟5殺ᗃ翐%>퍂ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013P汴G5썓揘": 4.342729067882445E-18, + "Q^즾眆@AN\u0011Kb榰냎Y#䝀ꀒᳺ'q暇睵s\"!3#I⊆畼寤@HxJ9": false, + "⿾D[)袨㇩i]웪䀤ᛰMvR<蟏㣨": {"v퇓L㪱ꖣ豛톤\\곱#kDTN": [{ + "(쾴䡣,寴ph(C\"㳶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qd鵔": {"娇堰孹L錮h嵅⛤躏顒?CglN束+쨣ﺜ\\MrH": {"獞䎇둃ቲ弭팭^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{ڒ䭷ᶼ靜pI荗虶K$": [{"◖S~躘蒉꫿輜譝Q㽙闐@ᢗ¥E榁iء5┄^B[絮跉ᰥ遙PWi3wㄾⵀDJ9!w㞣ᄎ{듒ꓓb6\\篴??c⼰鶹⟧\\鮇ꮇ": [[ + 654120831325413520, + -1.9562073916357608E-19, + { + "DC(昐衵ἡ긙갵姭|֛[t": 7.6979110359897907E18, + "J␅))嫼❳9Xfd飉j7猬ᩉ+⤻眗벎E鰉Zᄊ63zၝ69}ZᶐL崭ᦥ⡦靚⋛ꎨ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17, + "p꣑팱쒬ꎑ뛡Ꙩ挴恍胔&7ᔈ묒4Hd硶훐㎖zꢼ豍㿢aሃ=<\/湉鵲EӅ%$F!퍶棌孼{O駍਺geu+": ")\u001b잓kŀX쩫A밁®ڣ癦狢)扔弒p}k縕ꩋ,䃉tࣼi", + "ァF肿輸<솄G-䢹䛸ꊏl`Tqꕗ蒞a氷⸅ᴉ蠰]S/{J왲m5{9.uέ~㕚㣹u>x8U讁B덺襪盎QhVS맅킃i识{벂磄Iහ䙅xZy/抍૭Z鲁-霳V据挦ℒ": null, + "㯛|Nꐸb7ⵐb?拠O\u0014ކ?-(EꞨ4ꕷᄤYᯕOW瞺~螸\"욿ќe㺰\"'㌢ƐW\u0004瞕>0?V鷵엳": true, + "뤥G\\迋䠿[庩'꼡\u001aiᩮV쯁ᳪ䦪Ô;倱ନ뛁誈": null, + "쥹䄆䚟Q榁䎐᢭<\/2㕣p}HW蟔|䃏꿈ꚉ锳2Pb7㙑Tⅹᵅ": { + "Y?֭$>#cVBꩨ:>eL蒁務": { + "86柡0po 䏚&-捑Ћ祌<\/휃-G*㶢הּ쩍s㶟餇c걺yu꽎還5*턧簕Og婥SꝐ": null, + "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": { + ";⯭ﱢ!买F⽍柤鶂n䵣V㫚墱2렾ELEl⣆": [ + true, + -3.6479311868339015E-18, + -7270785619461995400, + 3.334081886177621E18, + 2.581457786298155E18, + -6.605252412954115E-20, + -3.9232347037744167E-20, + { + "B6㊕.k1": null, + "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": { + "ᕅ}럡}.@y陪鶁r業'援퀉x䉴ﵴl퍘):씭脴ᥞhiꃰblﲂ䡲엕8߇M㶭0燋標挝-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"a췩v礗X⋈耓ፊf罅靮!㔽YYᣓw澍33⎔芲F|\"䜏T↮輦挑6ᓘL侘?ᅥ]덆1R௯✎餘6ꏽ<\/௨\\?q喷ꁫj~@ulq": {"嗫欆뾔Xꆹ4H㌋F嵧]ࠎ]㠖1ꞤT<$m뫏O i댳0䲝i": {"?෩?\u20cd슮|ꯆjs{?d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:뼣v䊭諱Yj択cVmR䩃㘬T\"N홝*ै%x^F\\_s9보zz4淗?q": [ + null, + "?", + 2941869570821073737, + "{5{殇0䝾g6밖퍋臩綹R$䖭j紋釰7sXI繳漪행y", + false, + "aH磂?뛡#惇d婅?Fe,쐘+늵䍘\"3r瘆唊勐j⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴᝔M2㳗必꧂淲?ゥ젯檢<8끒MidX䏒3᳻Q▮佐UT|⤪봦靏⊏", + [[{ + "颉(&뜸귙{y^\"P퟉춝Ჟ䮭D顡9=?}Y誱<$b뱣RvO8cH煉@tk~4ǂ⤧⩝屋SS;J{vV#剤餓ᯅc?#a6D,s": [ + -7.8781018564821536E16, + true, + [ + -2.28770899315832371E18, + false, + -1.0863912140143876E-20, + -6282721572097446995, + 6767121921199223078, + -2545487755405567831, + false, + null, + -9065970397975641765, + [ + -5.928721243413937E-20, + {"6촊\u001a홯kB0w撨燠룉{绎6⳹!턍贑y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"r䝐7毟ᝰr惃3ꉭE+>僒澐": [ + "Ta쎩aƝt쵯ⰪVb", + [ + -5222472249213580702, + null, + -2851641861541559595, + null, + 4808804630502809099, + 5657671602244269874, + "5犲﨣4mᥣ?yf젫꾯|䋬잁$`Iⳉﴷ扳兝,'c", + false, + [ + null, + { + "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4c5S熯A<\/\6U윲蹴Q=%푫汹\\\u20614b[௒C⒥Xe⊇囙b,服3ss땊뢍i~逇PA쇸1": -2.63273619193485312E17, + "Mq꺋貘k휕=nK硍뫞輩>㾆~἞ࡹ긐榵l⋙Hw뮢帋M엳뢯v⅃^": 1877913476688465125, + "ᶴ뻗`~筗免⚽টW˃⽝b犳䓺Iz篤p;乨A\u20ef쩏?疊m㝀컩뫡b탔鄃ᾈV(遢珳=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄፷Ed&c﯄伮1p": null, + "⯁w4曢\"(欷輡": "\"M᭫]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^", + "㣡Oᄦ昵⫮Y祎S쐐級㭻撥>{I$": -378474210562741663, + "䛒掷留Q%쓗1*1J*끓헩ᦢ﫫哉쩧EↅIcꅡ\\?ⴊl귛顮4": false, + "寔愆샠5]䗄IH贈=d﯊/偶?ॊn%晥D視N򗘈'᫂⚦|X쵩넽z질tskxDQ莮Aoﱻ뛓": true, + "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚?Q绊": -3034854258736382234, + "꺲໣眀)⿷J暘pИfAV삕쳭Nꯗ4々'唄ⶑ伻㷯騑倭D*Ok꧁3b␽_<\/챣Xm톰ၕ䆄`*fl㭀暮滠毡?": [ + "D男p`V뙸擨忝븪9c麺`淂⢦Yw⡢+kzܖ\fY1䬡H歁)벾Z♤溊-혰셢?1<-\u0005;搢Tᐁle\\ᛵߓﭩ榩訝-xJ;巡8깊蠝ﻓU$K": { + "Vꕡ諅搓W=斸s︪vﲜ츧$)iꡟ싉e寳?ጭムVથ嵬i楝Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤t糳]罛逇dṌ֣XHiͦ{": true, + "Ya矲C멗Q9膲墅携휻c\\딶G甔<\/.齵휴": -1.1456247877031811E-19, + "z#.OO￝J": -8263224695871959017, + "崍_3夼ᮟ1F븍뽯ᦓ鴭V豈Ь": [{ + "N蒬74": null, + "yuB?厅vK笗!ᔸcXQ旦컶P-녫mᄉ麟_": "1R@ 톘xa_|﩯遘s槞d!d껀筤⬫薐焵먑D{\\6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMܭ8nX㩴䕅檹E\u0007ﭨN 2 ℆涐ꥏ꠵3▙玽|됨_\u2048", + "恐A C䧩G": {":M큣5e들\\ꍀ恼ᔄ靸|I﨏$)n": { + "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/ೢC쳖?2浓uO.䰴": "ཐ꼋e?``,ᚇ慐^8ꜙNM䂱\u0001IᖙꝧM'vKdꌊH牮r\\O@䊷ᓵ쀆(fy聻i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072l慪y꺜ﲖTj+u", + "뽫hh䈵w>1ⲏ쐭V[ⅎ\\헑벑F_㖝⠗㫇h恽;῝汰ᱼ瀖J옆9RR셏vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O", + null, + 2.0150326776036215E-19, + null, + true, + false, + true, + {"\fa᭶P捤WWc᠟f뚉ᬏ퓗ⳀW睹5:HXH=q7x찙X$)모r뚥ᆟ!Jﳸf": [ + -2995806398034583407, + [ + 6441377066589744683, + "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{谥'꡾뱻:.ꘘ굄奉攼Di᷑K鶲y繈욊阓v㻘}枭캗e矮1c?휐\"4\u0005厑莔뀾墓낝⽴洗ṹ䇃糞@b1\u0016즽Y轹", + { + "1⽕⌰鉟픏M㤭n⧴ỼD#%鐘⊯쿼稁븣몐紧ᅇ㓕ᛖcw嬀~ഌ㖓(0r⧦Q䑕髍ര铂㓻R儮\"@ꇱm❈௿᦯頌8}㿹犴?xn잆꥽R": 2.07321075750427366E18, + "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮荋벲TLP预庰܈G\\O@VD'鱃#乖끺*鑪ꬳ?Mޞdﭹ{␇圯쇜㼞顄︖Y홡g": [{ + "0a,FZ": true, + "2z̬蝣ꧦ驸\u0006L↛Ḣ4๚뿀'?lcwᄧ㐮!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:똍!FBe?鰴㨗0O财I藻ʔWA᫓G쳛u`<\/I": [{ + "$τ5V鴐a뾆両環iZp頻යn븃v": -4869131188151215571, + "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": { + "洤湌鲒)⟻\\䥳va}PeAMnN[": "㐳ɪ/(軆lZR,Cp殍ȮN啷\"3B婴?i=r$펽ᤐ쀸", + "阄R4㒿㯔ڀ69ZᲦ2癁핌噗P崜#\\-쭍袛&鐑/$4童V꩑_ZHA澢fZ3": {"x;P{긳:G閉:9?活H": [ + "繺漮6?z犞焃슳\">ỏ[Ⳛ䌜녏䂹>聵⼶煜Y桥[泥뚩MvK$4jtロ", + "E#갶霠좭㦻ୗ먵F+䪀o蝒ba쮎4X㣵 h", + -335836610224228782, + null, + null, + [ + "r1᫩0>danjY짿bs{", + [ + -9.594464059325631E-23, + 1.0456894622831624E-20, + null, + 5.803973284253454E-20, + -8141787905188892123, + true, + -4735305442504973382, + 9.513150514479281E-20, + "7넳$螔忷㶪}䪪l짴\u0007鹁P鰚HF銏ZJﳴ/⍎1ᷓ忉睇ᜋ쓈x뵠m䷐窥Ꮤ^\u0019ᶌ偭#ヂt☆၃pᎍ臶䟱5$䰵&๵分숝]䝈뉍♂坎\u0011<>", + "C蒑貑藁lﰰ}X喇몛;t밿O7/᯹f\u0015kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??R校s脚", + { + "9珵戬+AU^洘拻ቒy柭床'粙XG鞕᠜繀伪%]hC,$輙?Ut乖Qm떚W8઼}~q⠪rU䤶CQ痗ig@#≲t샌f㈥酧l;y闥ZH斦e⸬]j⸗?ঢ拻퀆滌": null, + "畯}㧢J罚帐VX㨑>1ꢶkT⿄蘥㝑o|<嗸層沈挄GEOM@-䞚䧰$만峬輏䠱V✩5宸-揂D'㗪yP掶7b⠟J㕻SfP?d}v㼂Ꮕ'猘": { + "陓y잀v>╪": null, + "鬿L+7:됑Y=焠U;킻䯌잫!韎ஔ\f": { + "駫WmGጶ": { + "\\~m6狩K": -2586304199791962143, + "ႜࠀ%͑l⿅D.瑢Dk%0紪dḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲鐜6C": { + "_췤a圷1\u000eB-XOy缿請∎$`쳌eZ~杁튻/蜞`塣৙\"⪰\"沒l}蕌\\롃荫氌.望wZ|o!)Hn獝qg}": null, + "kOSܧ䖨钨:಼鉝ꭝO醧S`십`ꓭ쭁ﯢN&Et㺪馻㍢ⅳ㢺崡ຊ蜚锫\\%ahx켨|ż劻ꎄ㢄쐟A躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*b㕷63z": { + ":L5r+T㡲": [{ + "VK泓돲ᮙRy㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇枝7G藯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818, + "`⛝ᘑ$(खꊲ⤖ᄁꤒ䦦3=)]Y㢌跨NĴ驳줟秠++d孳>8ᎊ떩EꡣSv룃 쯫أ?#E|᭙㎐?zv:5祉^⋑V": [ + -1.4691944435285607E-19, + 3.4128661569395795E17, + "㐃촗^G9佭龶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ꩵᛅⳍ搿L팹Lවn=\"慉념ᛮy>!`g!풲晴[/;?[v겁軇}⤳⤁핏∌T㽲R홓遉㓥", + "愰_⮹T䓒妒閤둥?0aB@㈧g焻-#~跬x<\/舁P݄ꐡ=\\׳P\u0015jᳪᢁq;㯏l%᭗;砢觨▝,謁ꍰGy?躤O黩퍋Y㒝a擯\n7覌똟_䔡]fJ晋IAS", + 4367930106786121250, + -4.9421193149720582E17, + null, + { + ";ᄌ똾柉곟ⰺKpፇ䱻ฺ䖝{o~h!eꁿ઻욄ښ\u0002y?xUd\u207c悜ꌭ": [ + 1.6010824122815255E-19, + [ + "宨︩9앉檥pr쇷?WxLb", + "氇9】J玚\u000f옛呲~ 輠1D嬛,*mW3?n휂糊γ虻*ᴫ꾠?q凐趗Ko↦GT铮", + "㶢ថmO㍔k'诔栀Z蛟}GZ钹D", + false, + -6.366995517736813E-20, + -4894479530745302899, + null, + "V%᫡II璅䅛䓎풹ﱢ/pU9se되뛞x梔~C)䨧䩻蜺(g㘚R?/Ự[忓C뾠ࢤc왈邠买?嫥挤풜隊枕", + ",v碍喔㌲쟚蔚톬៓ꭶ", + 3.9625444752577524E-19, + null, + [ + "kO8란뿒䱕馔b臻⍟隨\"㜮鲣Yq5m퐔K#ꢘug㼈ᝦ=P^6탲@䧔%$CqSw铜랊0&m⟭<\/a逎ym\u0013vᯗ": true, + "洫`|XN뤮\u0018詞=紩鴘_sX)㯅鿻Ố싹": 7.168252736947373E-20, + "ꛊ饤ﴏ袁(逊+~⽫얢鈮艬O힉7D筗S곯w操I斞᠈븘蓷x": [[[[ + -7.3136069426336952E18, + -2.13572396712722688E18, + { + "硢3㇩R:o칢行E<=\u0018ၬYuH!\u00044U%卝炼2>\u001eSi$⓷ꒈ'렢gᙫ番ꯒ㛹럥嶀澈v;葷鄕x蓎\\惩+稘UEᖸﳊ㊈壋N嫿⏾挎,袯苷ኢ\\x|3c": 7540762493381776411, + "?!*^ᢏ窯?\u0001ڔꙃw虜돳FgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹㔏똩Ԛ耦Wt轁\\枒^\\ꩵ}}}ꀣD\\]6M_⌫)H豣:36섘㑜": { + ";홗ᰰU஋㙛`D왔ཿЃS회爁\u001b-㢈`봆?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=Rɠ峭q\"5Ἠ婾^>'ls\n8QAK)- Q䲌mo펹L_칍樖庫9꩝쪹ᘹ䑖瀍aK ?*趤f뭓廝p=磕", + "哑z懅ᤏ-ꍹux쀭", + [ + true, + 3998739591332339511, + "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/k鏔䍧2l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ꮧ,O嫚m ࡭`KH葦:粘i]aSU쓙$쐂f+詛頖b", + [{"^<9<箝&絡;%i﫡2攑紴\\켉h쓙-柂䚝ven\u20f7浯-Ꮏ\r^훁䓚헬\u000e?\\ㅡֺJ떷VOt": [{ + "-௄卶k㘆혐஽y⎱㢬sS઄+^瞥h;ᾷj;抭\u0003밫f<\/5Ⱗ裏_朻%*[-撵䷮彈-芈": { + "㩩p3篊G|宮hz䑊o곥j^Co0": [ + 653239109285256503, + {"궲?|\":N1ۿ氃NZ#깩:쇡o8킗ࡊ[\"됸Po핇1(6鰏$膓}⽐*)渽J'DN<썙긘毦끲Ys칖": { + "2Pr?Xjㆠ?搮/?㓦柖馃5뚣Nᦼ|铢r衴㩖\"甝湗ܝ憍": "\"뾯i띇筝牻$珲/4ka $匝휴译zbAᩁꇸ瑅&뵲衯ꎀᆿ7@ꈋ'ᶨH@ᠴl+", + "7뢽뚐v?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dv祴X⼹\\a8y5坆": true, + "o뼄B욞羁hr﷔폘뒚⿛U5pꪴfg!6\\\"爑쏍䢱W<ﶕ\\텣珇oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺翁艩nl F⤿蠜": 1695826030502619742, + "ۊ깖>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]찠?ݾ2饺蹳ぶꌭ訍\"◹ᬁD鯎4e滨T輀ﵣ੃3\u20f3킙D瘮g\\擦+泙ၧ 鬹ﯨַ肋7놷郟lP冝{ߒhড়r5,꓋": null, + "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null, + "䎥eᾆᝦ읉,Jުn岪㥐s搖謽䚔5t㯏㰳㱊ZhD䃭f絕s鋡篟a`Q鬃┦鸳n_靂(E4迠_觅뷝_宪D(NL疶hL追V熑%]v肫=惂!㇫5⬒\u001f喺4랪옑": { + "2a輍85먙R㮧㚪Sm}E2yꆣꫨrRym㐱膶ᔨ\\t綾A☰.焄뙗9<쫷챻䒵셴᭛䮜.<\/慌꽒9叻Ok䰊Z㥪幸k": [ + null, + true, + {"쌞쐍": { + "▟GL K2i뛱iQ\"̠.옛1X$}涺]靎懠ڦ늷?tf灟ݞゟ{": 1.227740268699265E-19, + "꒶]퓚%ฬK❅": [{ + "(ෛ@Ǯっ䧼䵤[aテൖvEnAdU렖뗈@볓yꈪ,mԴ|꟢캁(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2襏B箹)俣eỻw䇄", + "75༂f詳䅫ꐧ鏿 }3\u20b5'∓䝱虀f菼Iq鈆﨤g퍩)BFa왢d0뮪痮M鋡nw∵謊;ꝧf美箈ḋ*\u001c`퇚퐋䳫$!V#N㹲抗ⱉ珎(V嵟鬒_b㳅\u0019": null, + "e_m@(i㜀3ꦗ䕯䭰Oc+-련0뭦⢹苿蟰ꂏSV䰭勢덥.ྈ爑Vd,ᕥ=퀍)vz뱊ꈊB_6듯\"?{㒲&㵞뵫疝돡믈%Qw限,?\r枮\"? N~癃ruࡗdn&": null, + "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pXᭁ 9᪘": -2.423073789014103E18, + "䝄瑄䢸穊f盈᥸,B뾧푗횵B1쟢f\u001f凄": "魖⚝2儉j꼂긾껢嗎0ࢇ纬xI4](੓`蕞;픬\fC\"斒\")2櫷I﹥迧", + "ퟯ詔x悝령+T?Bg⥄섅kOeQ큼㻴*{E靼6氿L缋\u001c둌๶-㥂2==-츫I즃㠐Lg踞ꙂEG貨鞠\"\u0014d'.缗gI-lIb䋱ᎂDy缦?": null, + "紝M㦁犿w浴詟棓쵫G:䜁?V2ힽ7N*n&㖊Nd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹ푍阉~ꅐ쵃#R^\u000bB䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-ま帳あ.j)qgu扐徣ਁZ鼗A9A鸦甈!k蔁喙:3T%&㠘+,䷞|챽v䚞문H<\/醯r셓㶾\\a볜卺zE䝷_죤ဵ뿰᎟CB": [ + 6233512720017661219, + null, + -1638543730522713294, + false, + -8901187771615024724, + [ + 3891351109509829590, + true, + false, + -1.03836679125188032E18, + { + "j랎:g曞ѕᘼ}链N", + -1.1103819473845426E-19, + true, + [ + true, + null, + -7.9091791735309888E17, + true, + {"}蔰鋈+ꐨ啵0?g*사%`J?*": [{ + "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19, + ";饹়❀)皋`噿焒j(3⿏w>偍5X薙婏聿3aFÆÝ": "2,ꓴg?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$珧`m雁瑊ඖ鯬cꙉ梢f묛bB", + "♽n$YjKiXX*GO贩鏃豮祴遞K醞眡}ꗨv嵎꼷0୸+M菋eH徸J꣆:⼐悥B켽迚㯃b諂\u000bjꠜ碱逮m8": [ + "푷᣺ﻯd8ﱖ嬇ភH鹎⡱᱅0g:果6$GQ췎{vᷧYy-脕x偹砡館⮸C蓼ꏚ=軄H犠G谖ES詤Z蠂3l봟hᅭ7䦹1GPQG癸숟~[#駥8zQ뛣J소obg,", + null, + 1513751096373485652, + null, + -6.851466660824754E-19, + {"䩂-⴮2ٰK솖풄꾚ႻP앳1H鷛wmR䗂皎칄?醜<\/&ࠧ㬍X濬䵈K`vJ륒Q/IC묛!;$vϑ": { + "@-ꚗxྐྵ@m瘬\u0010U絨ﮌ驐\\켑寛넆T=tQ㭤L연@脸삯e-:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾萅Pq鐳话T䄐I": -1.80683891195530061E18, + "ᷭዻU~ཷsgSJ`᪅'%㖔n5픆桪砳峣3獮枾䌷⊰呀": { + "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥᐀nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆话〾희紐G'E?飕1f❼텬悚泬먐U睬훶Qs": false, + "(\u20dag8큽튣>^Y{뤋.袊䂓;_g]S\u202a꽬L;^'#땏bႌ?C緡<䝲䲝断ꏏ6\u001asD7IK5Wxo8\u0006p弊⼂ꯍ扵\u0003`뵂픋%ꄰ⫙됶l囏尛+䗅E쟇\\": [ + true, + { + "\n鱿aK㝡␒㼙2촹f;`쾏qIࡔG}㝷䐍瓰w늮*粅9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{㖥0딿벑逦⥻0h薓쯴Ꝼ": [ + 5188716534221998369, + 2579413015347802508, + 9.010794400256652E-21, + -6.5327297761238093E17, + 1.11635352494065523E18, + -6656281618760253655, + { + "": ")?", + "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-o\"徚#": {"M/癟6!oI51ni퐚=댡>xꍨ\u0004 ?": { + "皭": {"⢫䋖>u%w잼<䕏꘍P䋵$魋拝U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼O歵F\\l醴o_欬6籏=D": [ + false, + true, + {"Mt|ꏞD|F궣MQ뵕T,띺k+?㍵i": [ + 7828094884540988137, + false, + { + "!༦鯠,&aﳑ>[euJꏽ綷搐B.h": -7648546591767075632, + "-n켧嘰{7挐毄Y,>❏螵煫乌pv醑Q嶚!|⌝責0왾덢ꏅ蛨S\\)竰'舓Q}A釡5#v": 3344849660672723988, + "8閪麁V=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉惏ै|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\槳W븧J檀C,ᘉ의0俯퀉M;筷ࣴ瓿{늊埂鄧_4揸Nn阼Jੵ˥(社": true, + "o뼀vw)4A뢵(a䵢)p姃뛸\u000fK#KiQp\u0005ꅍ芅쏅": null, + "砥$ꥸ┇耽u斮Gc{z빔깎밇\\숰\u001e괷各㶇쵿_ᴄ+h穢p촀Ნ䃬z䝁酳ӂ31xꔄ1_砚W렘G#2葊P ": [ + -3709692921720865059, + null, + [ + 6669892810652602379, + -135535375466621127, + "뎴iO}Z? 馢녱稹ᄾ䐩rSt帤넆&7i騏멗畖9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5", + 1.10439588726055846E18, + false, + -4349729830749729097, + null, + [ + false, + "_蠢㠝^䟪/D녒㡋ỎC䒈판\u0006એq@O펢%;鹐쏌o戥~A[ꡉ濽ỳ&虃᩾荣唙藍茨Ig楡꒻M窓冉?", + true, + 2.17220752996421728E17, + -5079714907315156164, + -9.960375974658589E-20, + "ᾎ戞༒", + true, + false, + [[ + "ⶉᖌX⧕홇)g엃⹪x뚐癟\u0002", + -5185853871623955469, + { + "L㜤9ợㇶK鐰⋓V뽋˖!斫as|9"፬䆪?7胜&n薑~": -2.11545634977136992E17, + "O8뀩D}캖q萂6༣㏗䈓煮吽ਆᎼDᣘ폛;": false, + "YTᡅ^L㗎cbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$䁗鼒몁~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱B酂?C뇞<5Iޚ讳騕S瞦z": null, + "\\RB?`mG댵鉡幐物䵎有5*e骄T㌓ᛪ琾駒Ku\u001a[柆jUq8⋈5鿋츿myﻗ?雍ux঴?": 5828963951918205428, + "n0晅:黯 xu씪^퓞cB㎊ᬍ⺘٤փ~B岚3㥕擄vᲂ~F?C䶖@$m~忔S왖㲚?챴⊟W#벌{'㰝I䝠縁s樘\\X뢻9핡I6菍ㄛ8쯶]wॽ0L\"q": null, + "x增줖j⦦t䏢᎙㛿Yf鼘~꫓恄4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oŁ쨅孥멁ຖacA㖫借㞝vg싰샂㐜#譞⢤@k]鋰嘘䜾L熶塥_<\/⍾屈ﮊ_mY菹t뙺}Ox=w鮮4S1ꐩמּ'巑", + "㗓蟵ꂾe蠅匳(JP䗏෸\u0089耀왲": [{ + "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3伖\u0005P⋪\"D궣QLn(⚘罩䩢Ŏv䤘尗뼤됛O淽鋋闚r崩a{4箙{煷m6〈": { + "l곺1L": { + "T'ਤ?砅|੬Km]䄩\"(࿶<\/6U爢䫈倔郴l2㴱^줣k'L浖L鰄Rp今鎗⒗C얨M훁㡧ΘX粜뫈N꤇輊㌻켑#㮮샶-䍗룲蠝癜㱐V>=\\I尬癤t=": 7648082845323511446, + "鋞EP:<\/_`ၧe混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿렏㗑yK毢宸p謹h䦹乕U媣\\炤": [[ + "3", + [ + true, + 3.4058271399411134E-20, + true, + "揀+憱f逮@먻BpW曉\u001a㣐⎊$n劈D枤㡞좾\u001aᛁ苔౩闝1B䷒Ṋ݋➐ꀞꐃ磍$t੤_:蘺⮼(#N", + 697483894874368636, + [ + "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*U鍾䏖=䧉뽑单휻ID쿇嘗?ꌸῬ07", + -5.4858784319382006E18, + 7.5467775182251151E18, + -8911128589670029195, + -7531052386005780140, + null, + [ + null, + true, + [[{ + "1欯twG<\/Q:0怯押殃탷聫사<ỗꕧ蚨䡁nDꌕ\u001c녬~蓩鲃g儊>ꏡl㻿/⑷*챳6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?恪&{L掾p+꬜M䏊d娘6": { + "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&ǝ{O*य़iH`U큅ࡓr䩕5ꄸ?`\\᧫?ᮼ?t〟崾훈k薐ì/iy꤃뵰z1<\/AQ#뿩8jJ1z@u䕥": 1.82135747285215155E18, + "ZdN &=d년ᅆ'쑏ⅉ:烋5&៏ᄂ汎来L㯄固{钧u\\㊏튚e摑&t嗄ꖄUb❌?m䴘熚9EW": [{ + "ଛ{i*a(": -8.0314147546006822E17, + "⫾ꃆY\u000e+W`௸ \"M뒶+\\뷐lKE}(NT킶Yj選篒쁶'jNQ硾(똡\\\"逌ⴍy? IRꜘ὞鄬﨧:M\\f⠋Cꚜ쫊ᚴNV^D䕗ㅖἔIao꿬C⍏8": [ + 287156137829026547, + { + "H丞N逕⯲": {"": { + "7-;枮阕梒9ᑄZ": [[[[ + null, + { + "": [[[[ + -7.365909561486078E-19, + 2948694324944243408, + null, + [ + true, + "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦됾g뒠䤈q딄㺿$쮸tᶎ릑弣^鏎<\/Y鷇驜L鿽<\/춋9Mᲆឨ^<\/庲3'l낢", + "c鮦\u001b두\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/ⴃcpkDt誩܅\"Y", + [[ + null, + null, + [ + 3113744396744005402, + true, + "v(y", + { + "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔j㌍3꽂楎䥯뎸먩?": null, + "蠗渗iz鱖w]擪E": 1.2927828494783804E-17, + "튷|䀭n*曎b✿~杤U]Gz鄭kW|㴚#㟗ഠ8u擨": [[ + true, + null, + null, + {"⾪壯톽g7?㥜ώQꑐ㦀恃㧽伓\\*᧰閖樧뢇赸N휶䎈pI氇镊maᬠ탷#X?A+kНM ༑᩟؝?5꧎鰜ṚY즫궔 =ঈ;ﳈ?*s|켦蜌wM笙莔": [ + null, + -3808207793125626469, + [ + -469910450345251234, + 7852761921290328872, + -2.7979740127017492E18, + 1.4458504352519893E-20, + true, + "㽙깹?먏䆢:䴎ۻg殠JBTU⇞}ꄹꗣi#I뵣鉍r혯~脀쏃#釯:场:䔁>䰮o'㼽HZ擓௧nd", + [ + 974441101787238751, + null, + -2.1647718292441327E-19, + 1.03602824249831488E18, + [ + null, + 1.0311977941822604E-17, + false, + true, + { + "": -3.7019778830816707E18, + "E峾恆茍6xLIm縂0n2视֯J-ᤜz+ᨣ跐mYD豍繹⹺䊓몓ﴀE(@詮(!Y膽#᎙2䟓섣A䈀㟎,囪QbK插wcG湎ꤧtG엝x⥏俎j'A一ᯥ뛙6ㅑ鬀": 8999803005418087004, + "よ殳\\zD⧅%Y泥簳Uꈩ*wRL{3#3FYHା[d岀䉯T稉駅䞘礄P:闈W怏ElB㤍喬赔bG䠼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [ + 6.77723657904486E-20, + null, + [ + "ཚ_뷎꾑蹝q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3a㠕i,錃L$氰텰@7녫W㸮?羧W뇧ꃞ,N鋮숪2ɼ콏┍䁲6", + "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ET9j䡡", + "im珊Ճb칧校\\뼾쯀", + 9.555715121193197E-20, + true, + { + "<㫚v6腓㨭e1㕔&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMΉ㕨␰櫈ᱷ5풔蟹&L.첽e鰷쯃劼﫭b#ﭶ퓀7뷄Wr㢈๧Tʴશ㶑澕鍍%": -1810142373373748101, + "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true, + "䫡蓺ꑷ]C蒹㦘\"1ః@呫\u0014NL䏾eg呮፳,r$裢k>/\\?ㄤᇰﻛ쉕1஥'Ċ\" \\_?쨔\"ʾr: 9S䘏禺ᪧꄂ㲄", + [[{ + "*硙^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺띜hꏘ\u001f銿<棔햳▨(궆*=乥b8\\媦䷀뫝}닶ꇭ(Kej䤑M": [{ + "1Ꮼ?>옿I╅C<ގ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌o嶔f9-庒茪珓뷳4": null, + ";lᰳ": "CbB+肻a䄷苝*/볳+/4fq=㰁h6瘉샴4铢Y骐.⌖@哼猎㦞+'gꋸ㒕ߤ㞑(䶒跲ti⑴a硂#No볔", + "t?/jE幸YHT셵⩎K!Eq糦ꗣv刴w\"l$ο:=6:移": { + "z]鑪醊嫗J-Xm銌翁絨c里됏炙Ep㣋鏣똼嚌䀓GP﹖cmf4鹭T䅿꣭姧␸wy6ꦶ;S&(}ᎧKxᾂQ|t뻳k\"d6\"|Ml췆hwLt꼼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'd᧫䳳#NXe3-붋鸿ଢ떓%dK\u0013䲎ꖍYV.裸R⍉rR3蟛\\:젯:南ĺLʆ넕>|텩鴷矔ꋅⒹ{t孶㓑4_": [ + true, + null, + [ + false, + "l怨콈lᏒ", + { + "0w䲏嬧-:`䉅쉇漧\\܂yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19, + "ꯛTẀq纤q嶏V⿣?\"g}ი艹(쥯B T騠I=仵및X": {"KX6颠+&ᅃ^f畒y[": { + "H?뱜^?꤂-⦲1a㋞&ꍃ精Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ KⴙD秼F氮[{'좴:례晰Iq+I쭥_T綺砸GO煝䟪ᚪ`↹l羉q쐼D꽁ᜅ훦: vUV": true, + "u^yﳍ0㱓#[y뜌앸ꊬL㷩?蕶蘾⻍KӼ": -7931695755102841701, + "䤬轉車>\u001c鴵惋\"$쯃྆⇻n뽀G氠S坪]ಲꨍ捇Qxኻ椕駔\\9ࣼ﫻읜磡煮뺪ᶚ볝l㕆t+sζ": [[[ + true, + false, + [ + null, + 3363739578828074923, + true, + { + "\"鸣詩 볰㑵gL㯦῅춝旫}ED辗ﮈI쀤-ꧤ|㠦Z\"娑ᕸ4爏騍㣐\"]쳝Af]茛⬻싦o蚁k䢯䩐菽3廇喑ޅ": 4.5017999150704666E17, + "TYႇ7ʠ值4챳唤~Zo&ݛ": false, + "`塄J袛㭆끺㳀N㺣`꽐嶥KﯝSVᶔ∲퀠獾N딂X\"ᤏhNﬨvI": {"\u20bb㭘I䖵䰼?sw䂷쇪](泒f\"~;꼪Fԝsᝦ": {"p,'ꉂ軿=A蚶?bƉ㏵䅰諬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;䄝䚔cd<情@䞂3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXW욕^x芜堏Ῑ爂뛷꒻t✘Q\b": [[ + "籛&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅岃ᙴ鵣", + 4.317829988264744E15, + 6.013585322002147E-20, + false, + true, + null, + null, + -3.084633632357326E-20, + false, + null, + { + "\"짫愔昻 X\"藣j\"\"먁ཅѻ㘤㬯0晲DU꟒㸃d벀윒l䦾c੻*3": null, + "谈Wm陧阦咟ฯ歖擓N喴㋐銭rCCnVࢥ^♼Ⅾ젲씗刊S༝+_t赔\\b䚍뉨ꬫ6펛cL䊘᜼<\/澤pF懽&H": [ + null, + { + "W\"HDUuΌ퀟M'P4࿰H똆ⰱﮯ<\/凐蘲\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡ퍉ⴰ@?氐醳rj4I6Qt": 6.9090159359219891E17, + "絛ﳛ⺂": {"諰P㗮聦`ZQ?ꫦh*റcb⧱}埌茥h{棩렛툽o3钛5鮁l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0T썗嫷$?\\\"봅늆'%": [ + -2.348150870600346E-19, + [[ + true, + -6619392047819511778, + false, + [[ + -1.2929189982356161E-20, + 1.7417192219309838E-19, + {"?嵲2࿐2\u0001啑㷳c縯": [ + null, + [ + false, + true, + 2578060295690793218, + { + "?\"殃呎#㑑F": true, + "}F炊_殛oU헢兔Ꝉ,赭9703.B数gTz3⏬": { + "5&t3,햓Mݸᵣ㴵;꣫䩍↳#@뫷䠅+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bB讍:왳둛lEh=숾鱠p咐$짏#?g⹷ᗊv㷵.斈u頻\u0018-G.": "뽙m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvC堈\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xg巤9;芔cጐ/ax䊨♢큓r吓㸫೼䢗da᩾\"]屣`", + ":M딪<䢥喠\u0013㖅x9蕐㑂XO]f*Q呰瞊吭VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/섩o渀\"u0y&룣": ">氍緩L/䕑돯Ꟙ蕞^aB뒣+0jK⪄瑨痜LXK^힦1qK{淚t츔X:Vm{2r獁B뾄H첚7氥?쉟䨗ꠂv팳圎踁齀\\", + "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃ獽쮹☒[*0ꑚ㜳": 9022717159376231865, + "ҖaV銣tW+$魿\u20c3亜~뫡ᙰ禿쨽㏡fṼzE/h": "5臐㋇Ჯ쮺? 昨탰Wム밎#'\"崲钅U?幫뺀⍾@4kh>騧\\0ҾEV=爐͌U捀%ꉼ 㮋<{j]{R>:gԩL\u001c瀈锌ﯲﳡꚒ'⫿E4暍㌗뵉X\"H᝜", + "ᱚגּ;s醒}犍SἿ㦣&{T$jkB\\\tḮ앾䤹o<避(tW": "vb⯽䴪䮢@|)", + "⥒퐁껉%惀뗌+녣迺顀q條g⚯i⤭룐M琹j̈́⽜A": -8385214638503106917, + "逨ꊶZ<\/W⫟솪㎮ᘇb?ꠔi\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Mᶖa9韲4$3Ỵ^=쏍煤ፐ돷2䣃%鷠/eQ9頸쥎", + 2398360204813891033, + false, + 3.2658897259932633E-19, + null, + "?ꚃ8Nn㞷幵d䲳䱲뀙ꪛQ瑓鎴]䩋-鰾捡䳡??掊", + false, + -1309779089385483661, + "ᦲxu_/yecR.6芏.ᜇ過 ~", + -5658779764160586501, + "쒌:曠=l썜䢜wk#s蕚\"互㮉m䉤~0듐䋙#G;h숄옥顇෤勹(C7㢅雚㐯L⠅VV簅<", + null, + -4.664877097240962E18, + -4.1931322262828017E18, + { + ",": { + "v㮟麑䄠뤵g{M띮.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂U㏠⾕e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉쁊;%0鎻V(o\f,N鏊%nk郼螺": -1.73631993428376141E18, + "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [ + 4971487283312058201, + 8973067552274458613, + { + "`a揙ᣗ\u0015iBo¸": 4.3236479112537999E18, + "HW&퉡ぁ圍Y?瑡Qy훍q!帰敏s舠㫸zꚗaS歲v`G株巷Jp6킼 (귶鍔⾏⡈>M汐㞍ቴ꙲dv@i㳓ᇆ?黍": [ + null, + 4997607199327183467, + "E㻎蠫ᐾ高䙟蘬洼旾﫠텛㇛?'M$㣒蔸=A_亀绉앭rN帮", + null, + [{ + "Eᑞ)8餧A5u&㗾q?": [ + -1.969987519306507E-19, + null, + [ + 3.42437673373841E-20, + true, + "e걷M墁\"割P␛퍧厀R䱜3ﻴO퓫r﹉⹊", + [ + -8164221302779285367, + [ + true, + null, + "爘y^-?蘞Ⲽꪓa␅ꍨ}I", + 1.4645984996724427E-19, + [{ + "tY좗⧑mrzﺝ㿥ⴖ᥷j諅\u0000q賋譁Ꞅ⮱S\nࡣB/큃굪3Zɑ复o<\/;롋": null, + "彟h浠_|V4䦭Dᙣ♞u쿻=삮㍦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]㱭R굋鈌%栲j分僅ペ䇰w폦p蛃N溈ꡐꏀ?@(GI뉬$ﮄ9誁ꓚ2e甸ڋ[䁺,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[ + "ㅩ拏鈩勥\u000etgWVXs陂規p狵w퓼{뮵_i\u0002ퟑႢ⬐d6鋫F~챿搟\u0096䚼1ۼ칥0꣯儏=鋷牋ⅈꍞ龐", + -7283717290969427831, + true, + [ + 4911644391234541055, + { + "I鈒첽P릜朸W徨觘-Hᎄ퐟⓺>8kr1{겵䍃〛ᬡ̨O귑o䝕'쿡鉕p5": "fv粖RN瞖蛐a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴덋䡫s矷̄?ඣ/;괱絢oWfV<\/\u202cC,㖦0䑾%n賹g&T;|lj_欂N4w", + "짨䠗;䌕u i+r๏0": [{"9䥁\\఩8\"馇z䇔<\/ႡY3e狚쐡\"ุ6ﰆZ遖c\"Ll:ꮾ疣<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;䧐儂䗷ୗ>@e톬": { + "a⑂F鋻Q螰'<퇽Q贝瀧{ᘪ,cP&~䮃Z?gI彃": [ + -1.69158726118025933E18, + [ + "궂z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08Sn昞ꘔ캻禀鴚P謦b{ꓮmN靐Mᥙ5\"睏2냑I\u0011.L&=?6ᄠ뻷X鸌t刑\"#z)o꫚n쳟줋", + null, + 7517598198523963704, + "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒", + null, + null, + 6645782462773449868, + 1219168146640438184, + null, + { + ")ယ넌竀Sd䰾zq⫣⏌ʥ\u0010ΐ' |磪&p牢蔑mV蘸૰짬꺵;K": [ + -7.539062290108008E-20, + [ + true, + false, + null, + true, + 6574577753576444630, + [[ + 1.2760162530699766E-19, + [ + null, + [ + "顊\\憎zXB,", + [{ + "㇆{CVC9-MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017ᝣ=cS+梽៲綆16s덽휐y屬?ᇳG2ᴭ\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010홠P>j": false, + "箴": [ + false, + "鍞j\"ꮾ*엇칬瘫xṬ⭽쩁䃳\"-⋵?ᦽ댎Ĝ": true, + "Pg帯佃籛n㔠⭹࠳뷏≻࿟3㞱!-쒾!}쭪䃕!籿n涻J5ਲ਼yvy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18, + "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓ق쨐ק\\": [ + 7706977185172797197, + {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": { + "♘k6?଱癫d68?㽚乳䬳-V顷\u0005蝕?\u0018䞊V{邾zじl]雏k臤~ൖH뒐iꢥ]g?.G碄懺䔛pR$䅒X觨l봜A刊8R梒',}u邩퉕?;91Ea䈈믁G⊶芔h袪&廣㺄j;㡏綽\u001bN頸쳘橆": -2272208444812560733, + "拑Wﵚj鵼駳Oࣿ)#㾅顂N傓纝y僱栜'Bꐍ-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1ۏ@霄F$ě꧘푫O䤕퀐Pq52憬ꀜ兴㑗ᡚ?L鷝ퟐ뭐zJꑙ}╆ᅨJB]\"袌㺲u8䯆f", + "꿽၅㔂긱Ǧ?SI": -1669030251960539193, + "쇝ɨ`!葎>瞺瘡驷錶❤ﻮ酜=": -6961311505642101651, + "?f7♄꫄Jᡔ훮e읇퍾፣䭴KhखT;Qty}O\\|뫁IῒNe(5惁ꥶㆷY9ﮡ\\ oy⭖-䆩婁m#x봉>Y鈕E疣s驇↙ᙰm<": {"퉻:dꂁ&efᅫ쫢[\"돈늖꺙|Ô剐1͖-K:ʚ᭕/;쏖㷛]I痐职4gZ4⍜kเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜", + -9006004849098116748, + -3118404930403695681, + { + "_彃Y艘-\"Xx㤩㳷瑃?%2䐡鵛o귵옔夘v*탋职&㳈챗|O钧": [ + false, + "daꧺdᗹ羞쯧H㍤鄳頳<型孒ン냆㹀f4㹰\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*y೧4VQ蔔hV淬{?ᵌEfrI_", + "j;ꗣ밷邍副]ᗓ", + -4299029053086432759, + -5610837526958786727, + [ + null, + [ + -1.3958390678662759E-19, + { + "lh좈T_믝Y\"伨\u001cꔌG爔겕ꫳ晚踍⿻읐T䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/t筑,榄&5懶뎫狝(": [{ + "2ፁⓛ]r3C攟וּ9賵s⛔6'ஂ|\"ⵈ鶆䐹禝3\"痰ࢤ霏䵩옆䌀?栕r7O簂Isd?K᫜`^讶}z8?z얰T:X倫⨎ꑹ": -6731128077618251511, + "|︦僰~m漿햭\\Y1'Vvخ굇ቍ챢c趖": [null] + }], + "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-K᝷-(^\u20dd_": 2.11318679791770592E17 + } + ] + ] + ]}, + "묗E䀳㧯᳀逞GMc\b墹㓄끖Ơ&U??펌鑍 媋k))ᄊ": null, + "묥7콽벼諌J_DɯﮪM殴䣏,煚ྼ`Y:씧<\/⩫%yf䦀!1Ჶk춎Q米W∠WC跉鬽*ᛱi㴕L꘻ꀏ쓪\"_g鿄'#t⽙?,Wg㥖|D鑆e⥏쪸僬h鯔咼ඡ;4TK聎졠嫞" + } + ] + ] + } + ] + ] + ]}} + } + ]} + }, + "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgᬐ>棟S\"혧騾밫겁7-": "擹8C憎W\"쵮yR뢩浗絆䠣簿9䏈引Wcy䤶孖ꯥ;퐌]輩䍐3@{叝 뽸0ᡈ쵡Ⲇ\u001dL匁꧐2F~ݕ㪂@W^靽L襒ᦘ~沦zZ棸!꒲栬R" + } + ] + ], + "Z:덃൛5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿鿝\u0013縮R∱骒EO\u000fg?幤@֗퉙vU`", + "䐃쪈埽້=Ij,쭗쓇చ": false + }]}} + ] + } + ]} + } + ] + ] + ], + "咰긖VM]᝼6䓑쇎琺etDҌ?㞏ꩄ퇫밉gj8蠃\"⩐5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞돷`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{⹔Te驨7䵒?타Ulg悳o43" + } + ], + "zQᤚ纂땺6#ٽ﹧v￿#ࠫ휊冟蹧텈ꃊʆ?&a䥯De潝|쿓pt瓞㭻啹^盚2Ꝋf醪,얏T窧\\Di䕎谄nn父ꋊE": -2914269627845628872, + "䉩跐|㨻ᷢ㝉B{蓧瞸`I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭词\u0017署?W딚%(pꍁ⤼띳^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061յnj=牲攑)M\\龏": false, + "뎕y絬᫡⥮Ϙᯑ㌔/NF*˓.,QEzvK!Iwz?|쥾\"ꩻL꼗Bꔧ賴緜s뉣隤茛>ロ?(?^`>冺飒=噸泥⺭Ᲊ婓鎔븜z^坷裮êⓅ໗jM7ﶕ找\\O": 1.376745434746303E-19 + }, + "䐛r滖w㏤,|Nዜ": false + } + ]], + "@꿙?薕尬 gd晆(띄5躕ﻫS蔺4)떒錸瓍?~": 1665108992286702624, + "w믍nᏠ=`঺ᅥC>'從됐槷䤝眷螄㎻揰扰XᅧC贽uჍ낟jKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)⑗1쾅庅O4ꁉH7?d\u0010蠈줘월ސ粯Q!낇껉6텝|{": null, + "~˷jg쿤촖쉯y": -5.5527605669177098E18, + "펅Wᶺzꐆと푭e?4j仪열[D<鈑皶婆䵽ehS?袪;HꍨM뗎ば[(嗏M3q퍟g4y╸鰧茀[Bi盤~﫝唎鋆彺⦊q?B4쉓癚O洙킋툈䶯_?ퟲ": null + } + ] + ]] + ]], + "꟱Ԕ㍤7曁聯ಃ錐V䷰?v㪃૦~K\"$%请|ꇹn\"k䫛㏨鲨\u2023䄢\u0004[︊VJ?䶟ាꮈ䗱=깘U빩": -4863152493797013264 + } + ]}]} + ] + }}} + ], + "쏷쐲۹퉃~aE唙a챑,9㮹gLHd'䔏|킗㍞䎥&KZYT맵7䥺Nⱳ同莞鿧w\\༌疣n/+ꎥU\"封랾○ퟙAJᭌ?9䛝$?驔9讐짘魡T֯c藳`虉C읇쐦T" + } + ], + "谶개gTR￐>ၵ͚dt晑䉇陏滺}9㉸P漄": -3350307268584339381 + }] + ] + ] + ]] + ] + ], + "0y꟭馋X뱔瑇:䌚￐廿jg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑㐄J쩩䭛ꬿNS潔*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882, + "풵O^-⧧ⅶvѪ8廸鉵㈉ר↝Q㿴뺟EႳvNM:磇>w/៻唎뷭୥!냹D䯙i뵱貁C#⼉NH6`柴ʗ#\\!2䂗Ⱨf?諳.P덈-返I꘶6?8ꐘ": -8934657287877777844, + "溎-蘍寃i诖ര\"汵\"\ftl,?d⼡쾪⺋h匱[,෩I8MҧF{k瓿PA'橸ꩯ綷퉲翓": null + } + ] + ], + "ោ係؁<元": 1.7926963090826924E-18 + }}] + } + ] + ]]}] + }] + ] + ] + ] + ], + "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19 + }] + ]} + ] + ]], + "∳㙰3젴p᧗䱙?`yZA8Ez0,^ᙛ4_0븢\u001ft:~䎼s.bb룦明yNP8弆C偯;⪾짍'蕴뮛": -6976654157771105701, + "큵ꦀ\\㇑:nv+뒤燻䀪ﴣ﷍9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20 + } + ] + }], + "?}\u20e0],s嶳菋@#2u쒴sQS䩗=ꥮ;烌,|ꘔ䘆": "ᅩ영N璠kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]啗`K'" + }}, + "쨀jmV賂ﰊ姐䂦玞㬙ᏪM᪟Վ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|S䝬葫㽁o": true + }, + "즛ꄤ酳艚␂㺘봿㎨iG৕ࡿ?1\"䘓您\u001fSኝ⺿溏zៀ뻤B\u0019?윐a䳵᭱䉺膷d:<\/": 3935553551038864272 + } + ] + ]} + ]] + ]] + ]} + } + ] + } + ]]}}, + "᥺3h↛!ꋰy\"攜(ெl䪕oUkc1A㘞ᡲ촾ᣫ<\/䒌E㛝潨i{v?W౾H\\RჅpz蝬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true, + "ⶸ?x䊺⬝-䰅≁!e쩆2ꎿ准G踌XXᩯ1߁}0?.헀Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\礍뗔d设룱㶉cq{HyぱR㥽吢ſtp": -7985372423148569301, + "緫#콮IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$甝LV췐a갵'请o0g:^": "䔨(.", + "띳℡圤pン௄ĝ倧訜B쁟G䙔\"Sb⓮;$$▏S1J뢙SF|赡g*\"Vu䲌y": "䪈&틐),\\kT鬜1풥;뷴'Zေ䩹@J鞽NぼM?坥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eⶍ羷V}ჿ쎱䄫R뱃9Z>'\u20f1ⓕ䏜齮" + } + ] + ]]] + }} + } + ] + ]}, + "펮b.h粔폯2npX詫g錰鷇㇒<쐙S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\⍔?M&ﯟ<劜꺄멊ᄟA\"_=": null + }, + "~潹Rqn榢㆓aR鬨侅?䜑亡V_翅㭔(䓷w劸ၳDp䀅<\/ﰎ鶊m䵱팱긽ꆘ긓准D3掱;o:_ќ)껚콥8곤d矦8nP倥ꃸI": null, + "뾎/Q㣩㫸벯➡㠦◕挮a鶧⋓偼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17 + }], + ",": -5426918750465854828, + "2櫫@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻돎<늛䘍ﴡ줰쫄": false, + "8(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eࠍk砝g 엻": false, + "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17, + "ཎ耰큓ꐕ㱷\u0013y=詽I\"盈xm{0쾽倻䉚ષso#鰑/8㸴짯%ꀄ떸b츟*\\鲷礬ZQ兩?np㋄椂榨kc᡹醅3": false, + "싊j20": false + }]] + ]], + "俛\u0017n緽Tu뫉蜍鼟烬.ꭠIⰓ\"Ἀ᜾uC쎆J@古%ꛍm뻨ᾀ画蛐휃T:錖㑸ዚ9죡$": true + } + ] + ], + "㍵⇘ꦖ辈s}㱮慀밒s`\"㞟j:`i픻Z섫^諎0Ok{켿歁෣胰a2﨤[탳뚬쎼嫭뉮m": 409440660915023105, + "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lで끎!Agk'ꁛ뢃㯐岬D#㒦": false, + "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%~S菠␌힀6&t䳙y㪘냏\\*;鉏ᅧ鿵'嗕pa\"oL쇿꬈Cg": "㶽1灸D⟸䴅ᆤ뉎﷛渤csx 䝔цꬃ锚捬?ຽ+x~꘩uI࡞\u0007栲5呚ẓem?袝\")=㥴䨃pac!/揎Y", + "ᷱo\\||뎂몷r篙|#X䦜I#딌媸픕叞RD斳X4t⯩夬=[뭲r=绥jh뷱츝⪘%]⚋܈㖴スH텹m(WO曝劉0~K3c柢Ր㏉着逳~": false, + "煽_qb[첑\\륌wE❽ZtCNﭝ+餌ᕜOꛭ": "{ﳾ쉌&s惧ᭁⵆ3䢫;䨞팑꒪흘褀࢖Q䠿V5뭀䎂澻%받u5텸oA⮥U㎦;B䳌wz䕙$ឿ\\௅婺돵⪾퐆\\`Kyौꋟ._\u0006L챯l뇠Hi䧈偒5", + "艊佁ࣃ롇䱠爬!*;⨣捎慓q靓|儑ᨋL+迥=6㒺딉6弄3辅J-㕎뛄듘SG㆛(\noAzQꝱ䰩X*ぢO퀌%펠낌mo틮a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400, + "鬙@뎣䫳ၮ끡?){y?5K;TA*k溱䫜J汃ꂯ싔썍\u001dA}룖(<\/^,": false, + "몏@QꋦFꊩᒐ뎶lXl垨4^郣|ꮇ;䝴ᝓ}쵲z珖": null + } + ]]]], + ":_=닧弗D䙋暨鏛. 㱻붘䂍J儒&ZK/녩䪜r囁⽯D喠죥7⹌䪥c\u001a\u2076￞妈朹oLk菮F౟覛쐧㮏7T;}蛙2{9\"崓bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{响1WM" + }}, + "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19, + "䮴=❑➶T෋w䞜\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!᧟;䱀[䔯k쬃`੍8饙른熏'2_'袻tGf蒭J땟as꯳╖&啒zWࡇᒫYSᏬ\u0014ℑ첥鈤|cG~Pᓮ\">\"": "ႆl\f7V儊㦬nHꄬꨧC{쐢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMⵖ釔녮ꝇ 㝚{糍J哋 cv?-jkﻯྌ鹑L舟r", + "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥qZZ酒ຜ)鮢樛)X䣆gTSґG텞k.J圬疝롫쯭z L:\\ྤ@w炋塜쿖ᾳy뢀䶃뱝N䥨㚔勇겁#p", + "도畎Q娡\"@S/뼋:䵏!P衅촚fVHQs✜ᐫi㻑殡B䜇%믚k*U#濨낄~": "ꍟዕ쳸ꍈ敋&l妏\u0005憡멗瘌uPgᅪm<\/To쯬锩h뒓k" + } + ] + }], + "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9鋙a[LR㋭W胕)⡿8㞙0JF,}?허d1cDMᐃ␛鄝ⱕ%X)!XQ": "ⳍꗳ=橇a;3t⦾꼑仈ူaᚯ⯋ꕃAs鴷N⍕_䎃ꙎAz\u0016䯷\\<࿫>8q{}キ?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲" + }, + "܋닐龫論c웑": false, + "ㇿ/q\"6-co髨휝C큦#\u001b4~?3䐹E삇<<": 7.600917488140322E-20, + "䁝E6?㣖ꃁ间t祗*鑠{ḣV(浾h逇큞=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "v≁᫸_*όAඤԆl)ۓᦇQ}폠z༏q滚", + "ソ᥊/넺I": true + }]] + ] + ] + ] + ]] + }, + "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true, + "坄꿕C쇻풉~崍%碼\\8\"䬦꣙": null, + "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%闹r冁O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<゛XፈINT:詓 +": -1.0750456770694562E-19, + "獒àc뜭싼ﺳ뎤K`]p隨LtE": null, + "甙8䵊神EIꩤ鐯ᢀ,ﵮU䝑u疒ử驺䚿≚ഋ梶秓F`覤譐#짾蔀묊4<媍쬦靪_Yzgcࡶ4k紥`kc[Lﮗ簐*I瀑[⾰L殽鑥_mGȠ<\/|囹灠g桰iri": true, + "챓ꖙꟻ좝菇ou,嗠0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?됦鏖綃6鳵M[OE봨u햏.Ꮁ癜蟳뽲ꩌ뻾rM豈R嗀羫 uDꎚ%": null + }, + "V傜2<": 7175127699521359521 + }], + "铫aG切<\/\"ী⊆e<^g࢛)D顝nאַ饼\u008c猪繩嵿ﱚCꡬ㻊g엺A엦\u000f暿_f꿤볝㦕桦`蒦䎔j甬%岝rj 糏": "䚢偎눴Au<4箞7礦Iﱔ坠eȧ䪸u䵁p|逹$嗫쨘ꖾ﷐!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎㳁#༔繁 ", + "낂乕ꃻ볨ϱ-ꇋ㖍fs⿫)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false, + "쟰ぜ魛G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@咕ꐶx뒘느m䰨b痃렐0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null, + "쯆q4!3錕㲏ⵆ㇛꘷Z瑩뭆\\◪NH\u001d\\㽰U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*長PXᘱu\"䠹n惞": null, + "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽ꏪ#ﺸ\\&t6x꠹盥꣰a[\u001aꪍSpe鎿蠹": -1.1564713893659811E-19 + } + ]] + ] + ] + ], + "羵䥳H,6ⱎ겾|@t\"#햊1|稃 섭)띜=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null + } + ]} + ]}, + "츤": false + }}, + "s": 3.7339341963399598E18 + } + ], + "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇v步": "~읢~_,Mzr㐫YB溓E淚\"ⅹ䈔ᏺ抙 b,nt5V㐒J檶ꏨ⻔?", + "Q껑ꡡ}$넎qH煔惍/ez^!ẳF댙䝌馻剁8": "梲;yt钰$i冄}AL%a j뜐奷걳뚾d꿽*ሬuDY3?뮟鼯뮟w㍪틱V", + "o{Q/K O胟㍏zUdꀐm&⨺J舕⾏魸訟㌥[T籨櫉唐킝 aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤퐥_恸[ 0e:죃TC弼荎뵁DA:w唵ꣁ": null, + "὏樎䵮軧|?౗aWH쩃1 ꅭsu": null + } + ] + }, + "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null, + "殣b綊倶5㥗惢⳷萢ᑀ䬄镧M^ﱴ3⣢翣n櫻1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ꔙ䁼>n^[GीA䨟AM琢ᒊS쨲w?d㶣젊嘶纝麓+愣a%気ྞSc됓ᔘ:8bM7Xd8㶑臌]Ꙥ0ꐭ쒙䫣挵C薽Dfⵃ떼᷸", + "?紡.셪_෨j\u0013Ox┠$Xᶨ-ᅇo薹-}軫;y毝㪜K㣁?.EV쮱4둽⛻䤜'2盡\u001f60(|e쐰㼎ᦀ㒧-$l@ﻑ坳\u0003䭱响巗WFo5c㧆T턁Y맸♤(": -2.50917882560589088E17 + }} + ], + "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳䁮Ql怠㦵": "@䟴-=7f", + "鹟1x௢+d ;vi䭴FSDS\u0004hꎹ㚍?⒍⦏ў6u,扩@됷Su)Pag휛TᒗV痩!瞏釀ꖞ蘥&ೞ蘐ꭰꞇᝎ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦㊝Y*^\"R+ඈ咷蝶9ꥂ榨艦멎헦閝돶v좛咊E)K㓷ྭr", + "搆q쮦4綱켙셁.f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.ᰖ풎f֦Hv蔎㧤.!䭽=鞽]음H:?\"-4": 8.740133984938656E-20 + }]} + } + ], + "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFᅏ傅ﱋ猢⤊ᔁ,E㓒秤nTතv`♛I\u0000]꫔ṞD\"麵c踝杰X&濿또꣹깳౥葂鿎\\aꡨ?": 3900062609292104525 + } + ], + "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18, + "⎢k⑊꬗yᏫ7^err糎Dt\u000bJ礯확ㆍ沑サꋽe赔㝢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညS지?~콮gR敉⬹'䧭": 1901472137232418266, + "灗k䶥:?촽贍쓉꓈㒸g獘[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fᡰly㘽$?": "]ꙛO赎&#㠃돱剳\"<◆>0誉齐_|z|裵씪>ᐌ㼍\"Z[琕}O?G뚇諦cs⠜撺5cu痑U圲\u001c?鴴計l춥/╓哼䄗茏ꮅ뫈댽A돌롖뤫V窗讬sHd&\nOi;_u" + } + ], + "Uﺗ\\Y\\梷䄬~\u0002": null, + "k\"Y磓ᗔ휎@U冈<\/w컑)[": false, + "曏J蝷⌻덦\u001f㙳s꥓⍟邫P늮쥄c∬ྡྷ舆렮칤Z趣5콡넛A쳨\\뀙骫(棻.*&輛LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17 + }]} + ] + ], + "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false + } + ] + ]}] + }] + }} + ], + "2f`⽰E쵟>J笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vx፭gE됓h﵀mfỐ|?juTU档[d⢼⺻p濚7E峿": 5613688852456817133 + }, + "濘끶g忮7㏵殬W팕Q曁 뫰)惃廊5%-蹚zYZ樭ﴷQ锘쯤崫gg": true, + "絥ᇑ⦏쒓븣爚H.㗊߄o蘵貆ꂚ(쎔O᥉ﮓ]姨Wꁓ!RMA|o퉢THx轮7M껁U즨'i뾘舯o": "跥f꜃?" + }} + ], + "鷰鹮K-9k;ﰰ?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇㏢ꀇ࠺ⰼ拾喭틮L꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19 + }, + "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eᐳw橖b῀_딕hu葰窳闹вU颵|染H죶.fP䗮:j䫢\\b뎖i燕ꜚG⮠W-≚뉗l趕": "ଊ칭Oa᡺$IV㷧L\u0019脴셀붿餲햪$迳向쐯켂PqfT\" ?I屉鴼쿕@硙z^鏕㊵M}㚛T젣쓌-W⩐-g%⺵<뮱~빅╴瑿浂脬\u0005왦燲4Ⴭb|D堧 <\/oEQh", + "䘶#㥘੐캔f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ꘁ*rಐ趣.d࿩k/抶면䒎9W⊃9": "漩b挋Sw藎\u0000", + "畀e㨼mK꙼HglKb,\"'䤜": null + }]}] + ] + ] + }] + ]} + ] + ]} + ], + "歙>駿ꣂ숰Q`J΋方樛(d鱾뼣(뫖턭\u20f9lচ9歌8o]8윶l얶?镖G摄탗6폋폵+g:䱫홊<멀뀿/س|ꭺs걐跶稚W々c㫣⎖": "㣮蔊깚Cꓔ舊|XRf遻㆚︆'쾉췝\\&言", + "殭\"cށɨꝙ䞘:嬮e潽Y펪㳅/\"O@ࠗ겴]췖YǞ(t>R\"N?梳LD恭=n氯T豰2R諸#N}*灧4}㶊G䍣b얚": null, + "襞<\/啧 B|싞W瓇)6簭鼡艆lN쩝`|펭佡\\間邝[z릶&쭟愱ꅅ\\T᰽1鯯偐栈4̸s윜R7⒝/똽?치X": "⏊躖Cﱰ2Qẫ脐&இ?%냝悊", + ",鰧偵셣싹xᎹ힨᯳EṬH㹖9": -4604276727380542356 + } + } + ]]]], + "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null + }] + ] + ] + ], + "Kd2Kv+|z": 7367845130646124107, + "ᦂⶨ?ᝢ 祂些ഷ牢㋇操\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfۻ$ў1柦,㶢9r漢": -3.133230960444846E-20, + "琘M焀q%㢟f鸯O⣏蓑맕鯊$O噷|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?^^of": null + } + ], + "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null, + "cpT瀇H珰Ừpೃi鎪Rr␣숬-鹸ҩ䠚z脚цGoN8入y%趌I┽2ឪЀiJNcN)槣/▟6S숆牟\"箑X僛G殱娇葱T%杻:J諹昰qV쨰": 8331037591040855245 + }], + "G5ᩜ䄗巢껳": true + } + }, + "Ồ巢ゕ@_譙A`碫鄐㡥砄㠓(^K": "?܃B혢▦@犑ὺD~T⧁|醁;o=J牌9냚⢽㨘{4觍蚔9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎➁㭒춺C㣌ဉ\"2瓑员ᅽꝶ뫍}꽚ꞇ鶂舟彺]ꍽJC蝧銉", + "␆Ě膝\"b-퉐ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾e萃}]Bs⾿q룅鷦-膋?m+死^魊镲6", + "粡霦c枋AHퟁo礼Ke?qWcA趸㡔ꂏ?\u000e춂8iতᦜ婪\u0015㢼nﵿꍻ!ᐴ関\u001d5j㨻gfῩUK5Ju丝tかTI'?㓏t>⼟o a>i}ᰗ;뤕ܝ": false, + "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kL谖,'涃V~챳逋穞cT\"vQ쓕ObaCRQ㓡Ⲯ?轭⫦輢墳?vA餽=h䮇킵n폲퉅喙?\"'1疬V嬗Qd灗'Lự": "6v!s믁㭟㣯獃!磸餠ቂh0C뿯봗F鷭gꖶ~コkK<ᦈTt\\跓w㭣횋钘ᆹ듡䑚W䟾X'ꅔ4FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?块", + "?(˧쩯@崟吋歄K": null + }, + "Gc럃녧>?2DYI鴿\\륨)澔0ᔬlx'觔7젘⤡縷螩%Sv׫묈/]↱&S h\u0006歋ᑛxi̘}ひY蔯_醨鯘煑橾8?䵎쨋z儬ꁏ*@츾:": null + } + } + } + ] + ] + ]} + }, + "HO츧G": 3.694949578823609E17, + "QC\u0012(翻曇Tf㷟bGBJ옉53\\嚇ᛎD/\u001b夾၉4\"핀@祎)쫆yD\"i먎Vn㿿V1W᨝䶀": -6150931500380982286, + "Z㓮P翸鍱鉼K䋞꘺튿⭁Y": -7704503411315138850, + "]모开ꬖP븣c霤<[3aΠ\"黁䖖䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭䖏&鋌": -2.7231911483181824E18, + "tꎖ": -4.9517948741799555E-19, + "䋘즊.⬅IꬃۣQ챢ꄑ黐|f?C⾺|兕읯sC鬸섾整腨솷V": "旆柩l쪦sᖸMy㦅울썉瘗㎜檵9ꍂ駓ૉᚿ/u3씅徐拉[Z䞸ࡗ1ꆱ&Q풘?ǂ8\u0011BCDY2볨;鸏": null, + "幫 n煥s쁇펇 왊-$C\"衝:\u0014㣯舼.3뙗Yl⋇\"K迎멎[꽵s}9鉳UK8쐥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘W鏨蔮": -4.150842714188901E-17, + "ﺯ^㄄\b죵@fྉkf颡팋Ꞧ{/Pm0V둳⻿/落韒ꊔᚬ@5螺G\\咸a谆⊪ቧ慷绖?财(鷇u錝F=r၍橢ឳn:^iᴵtD볠覅N赴": null + }] + }] + } + ] + ]} + ]}, + "謯?w厓奰T李헗聝ឍ貖o⪇弒L!캶$ᆅ": -4299324168507841322, + "뺊奉_垐浸延몏孄Z舰2i$q붿좾껇d▵餏\"v暜Ҭ섁m￴g>": -1.60911932510533427E18 + } + ] + } + ] + ]], + "퉝꺔㠦楶Pꅱ": 7517896876489142899, + "": false + } + ]}, + "是u&I狻餼|谖j\"7c됮sסּ-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭N溔铉tlㆈ^": 1.93547720203604352E18, + "kⲨ\\%vr#\u000bⒺY\\t<\/3﬌R訤='﹠8蝤Ꞵ렴曔r": false + } + ]}, + "阨{c?C\u001d~K?鎌Ԭ8烫#뙣P초遗t㭱E­돒䆺}甗[R*1!\\~h㕅᰺@<9JꏏષI䳖栭6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "운ﶁK敂(欖C취پ℄爦賾" + } + }} + }], + "鷨赼鸙+\\䭣t圙ڹx᜾ČN<\/踘\"S_맶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0濕=鉵氬駘>Pꌢpb솇쬤h힊줎獪㪬CrQ矠a&脍꼬爼M茴/΅\u0017弝轼y#Ꞡc6둴=?R崏뷠麖w?" + }, + "閕ᘜ]CT)䵞l9z'xZF{:ؐI/躅匽졁:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7g덚E৏bꅰ輤]o㱏_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌V쁰ल二?c띦捱 \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkI\u001e鳴", + "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙/n??{L풓ZET㙠퍿X2᩟綳跠葿㚙w཮x캽扳B唕S|尾}촕%N?o䪨": null, + "ⰴFjෟ셈[\u0018辷px?椯\\1<ﲻ栘ᣁ봢憠뉴p": -5263694954586507640 + } + ] + ]] + ]} + ]}] + ] + ], + "?#癘82禩鋆ꊝty?&": -1.9419029518535086E-19 + } + ] + ] + ]} + ] + ] + ], + "훊榲.|῕戄&.㚏Zꛦ2\"䢥ሆ⤢fV_摕婔?≍Fji冀탆꜕i㏬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ぴ1縁ᙅ?쐉Ou": false + }]] + ]}}}, + "慂뗄卓蓔ᐓ匐嚖/颹蘯/翻ㆼL?뇊,텵<\\獷ごCボ": null + }, + "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null, + "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃h灑\\ꛣ}K峐^ኖ⤐林ꉓhy": null + } + ], + "᱀n肓ㄛ\"堻2>m殮'1橌%Ꞵ군=Ӳ鯨9耛<\/n據0u彘8㬇៩f᏿诙]嚊": "䋯쪦S럶匏ㅛ#)O`ሀX_鐪渲⛀㨻宅闩➈ꢙஶDR⪍" + }, + "tA썓龇 ⋥bj왎录r땽✒롰;羋^\\?툳*┎?썀ma䵳넅U䳆૘〹䆀LQ0\b疀U~u$M}(鵸g⳾i抦뛹?䤈땚검.鹆?ꩡtⶥGĒ;!ቹHS峻B츪켏f5≺": 2366175040075384032, + "전pJjleb]ួ": -7.5418493141528422E18, + "n.鎖ጲ\n?,$䪘": true + }, + "欈Ar㉣螵᪚茩?O)": null + }, + "쫸M#x}D秱欐K=侫们丐.KꕾxẠ\u001e㿯䣛F܍캗qq8꟞ṢFD훎⵳簕꭛^鳜\u205c٫~⑟~冫ऊ2쫰<\/戲윱o<\"": true + }, + "㷝聥/T뱂\u0010锕|内䞇x侁≦㭖:M?iM᣿IJe煜dG࣯尃⚩gPt*辂.{磼럾䝪@a\\袛?}ᓺB珼": true + } + } + ]]}]}}, + "tn\"6ꫤ샾䄄;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩S䠮ᐴm;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18, + "ᚔt'\\愫?鵀@\\びꂕP큠<<]煹G-b!S?\nꖽ鼫,ݛ&頺y踦?E揆릱H}햧캡b@手.p탻>췽㣬ꒅ`qe佭P>ᓂ&?u}毚ᜉ蟶頳졪ᎏzl2wO": -2.53561440423275936E17 + }]} + } + ] + ]], + "潈촒⿂叡": 5495738871964062986 + } + ]] + } + ] + ]} + ]] + ]] + ]} + ] + ]}, + "ႁq킍蓅R`謈蟐ᦏ儂槐僻ﹶ9婌櫞釈~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈੁ⋧d␽㫐zCe*": 2.15062231586689536E17, + "㶵Ui曚珰鋪ᾼ臧P{䍏䷪쨑̟A뼿T渠誈䏚D1!잶<\/㡍7?)2l≣穷᛾稝{:;㡹nemיּ訊`G": null, + "䀕\"飕辭p圁f#뫆䶷뛮;⛴ᩍ3灚덏ᰝ쎓⦷詵%᜖Մfs⇫(\u001e~P|ﭗCⲾផv湟W첋(텪બT<บSꏉ੗⋲X婵i ӵ⇮?L䬇|ꈏ?졸": 1.548341247351782E-19 + } + ] + }, + "t;:N\u0015q鐦Rt缆{ꮐC?஛㷱敪\\+鲊㉫㓪몗릙竏(氵kYS": "XᰂT?൮ô", + "碕飦幑|+ 㚦鏶`镥ꁩ B<\/加륙": -4314053432419755959, + "秌孳(p!G?V傫%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭鎍흘\\ONK3횙<\/樚立圌Q튅k쩎Ff쁋aׂJK銆ઘ즐狩6༥✙䩜篥CzP(聻駇HHퟲ讃%,ά{렍p而刲vy䦅ክ^톺M楒鍢㹳]Mdg2>䤉洞", + "踛M젧>忔芿㌜Zk": 2215369545966507819, + "씐A`$槭頰퍻^U覒\bG毲aᣴU;8!팲f꜇E⸃_卵{嫏羃X쀳C7뗮m(嚼u N܁谟D劯9]#": true, + "ﻩ!뵸-筚P᭛}ἰ履lPh?౮ⶹꆛ穉뎃g萑㑓溢CX뾇G㖬A錟]RKaꄘ]Yo+@䘁's섎襠$^홰}F": null + }, + "粘ꪒ4HXᕘ蹵.$區\r\u001d묁77pPc^y笲Q<\/ꖶ 訍䃍ᨕG?*": 1.73773035935040224E17 + }, + "婅拳?bkU;#D矠❴vVN쩆t㜷A풃갮娪a%鮏絪3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ԣ+]贴P荿": 2.9628516456987075E18 + }]}}] + ]} + }} + ]}] + ], + "|g翉F*湹̶\u0005⏐1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:遀ᄐX눔擉)`N3昛oQ셖y-ڨ⾶恢ꈵq^<\/": null, + "菹\\랓G^璬x৴뭸ゆUS겧﮷Bꮤ ┉銜᯻0%N7}~f洋坄Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4봋ⱳ叺怊t+怯涗\"0㖈Hq": false, + "졬믟'ﺇফ圪쓬멤m邸QLব䗁愍4jvs翙 ྍ꧀艳H-|": null, + "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020 + } + ], + "B䔚bꐻ뙏姓展槰T-똌鷺tc灿᫽^㓟䏀o3o$꘭趙萬I顩)뇭Ἑ䓝\f@{ᣨ`x3蔛": null + } + ] + ] + }], + "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷贏璿䜑bG倛⋐磎c皇皩7a~ﳫU╣Q࠭ꎉS摅姽OW.홌ೞ.": null, + "蚪eVlH献r}ᮏ믠ﰩꔄ@瑄ⲱ": null, + "퀭$JWoꩢg역쁍䖔㑺h&ୢtXX愰㱇?㾫I_6 OaB瑈q裿": null, + "꽦ﲼLyr纛Zdu珍B絟쬴糔?㕂짹䏵e": "ḱ\u2009cX9멀i䶛簆㳀k" + } + ]]]], + "(_ꏮg່澮?ᩑyM<艷\u001aꪽ\\庼뙭Z맷㰩Vm\\lY筺]3㋲2㌩㄀Eਟ䝵⨄쐨ᔟgङHn鐖⤇놋瓇Q탚單oY\"♆臾jHᶈ征ቄ??uㇰA?#1侓": null + }, + "觓^~ሢ&iI띆g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19, + "y詭Gbᔶऽs댁U:杜⤎ϲ쁗⮼D醄诿q뙰I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃L菝,봬ꤦC쯵#=X1瞻@OZc鱗CQTx": null + } + ] + }}], + "剘紁\u0004\\Xn⊠6,တױ;嵣崇}讃iႽ)d1\\䔓": null + }, + "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true, + "諳>*쭮괐䵟Ґ+<箁}빀䅱⡔檏臒hIH脟ꩪC핝ଗP좕\"0i<\/C褻D۞恗+^5?'ꂱ䚫^7}㡠cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{A煲G": -6880961710038544266 + }}] + }, + "5s⨲JvಽῶꭂᄢI.a৊": null, + "?1q꽏쿻ꛋDR%U娝>DgN乭G": -1.2105047302732358E-19 + } + ] + ]}, + "qZz`撋뙹둣j碇쁏\\ꆥ\u0018@藴疰Wz)O{F䶛l᷂绘訥$]뮍夻䢋䩇萿獰樧猵⣭j萶q)$꬚⵷0馢W:Ⱍ!Qoe": -1666634370862219540, + "t": "=wp|~碎Q鬳Ӎ\\l-<\/^ﳊhn퐖}䍔t碵ḛ혷?靻䊗", + "邙쇡㯇%#=,E4勃驆V繚q[Y댻XV㡸[逹ᰏ葢B@u=JS5?bLRn얮㍉⏅ﰳ?a6[&큟!藈": 1.2722786745736667E-19 + }, + "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧d稝~No穔噕뽲)뉈c5M윅>⚋[岦䲟懷恁?鎐꓆ฬ爋獠䜔s{\u001bm鐚儸煛%bﯿXT>ꗘ@8G": 1157841540507770724, + "媤娪Q杸\u0011SAyᡈ쿯": true, + "灚^ಸ%걁<\/蛯?\"祴坓\\\\'흍": -3.4614808555942579E18, + "釴U:O湛㴑䀣렑縓\ta)(j:숾却䗌gCiB뽬Oyuq輥厁/7)?今hY︺Q": null + } + ] + ]]]}] + ], + "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷菟.Esr릙!W☆䲖뗷莾뒭U\"䀸犜Uo3Gꯌx4r蔇᡹㧪쨢準<䂀%ࡡꟼ瑍8炝Xs0䀝销?fi쥱ꆝલBB": -8571484181158525797, + "L⦁o#J|\"⽩-㱢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒㘍蠤Vᛸ\"络QJL2,嬓왍伢㋒䴿考澰@(㏾`kX$끑эE斡,蜍&~y", + "vj.|统圪ᵮPL?2oŶ`밧\"勃+0ue%⿥绬췈체$6:qa렐Q;~晘3㙘鹑": true, + "ශؙ4獄⶿c︋i⚅:ん閝Ⳙ苆籦kw{䙞셕pC췃ꍬ␜꟯ꚓ酄b힝hwk꭭M鬋8B耳쑘WQ\\偙ac'唀x᪌\u2048*h짎#ፇ鮠뾏ឿ뀌": false, + "⎀jꄒ牺3Ⓝ컴~?親ꕽぼܓ喏瘘!@<튋㐌꿱⩦{a?Yv%⪧笯Uܱ栅E搚i뚬:ꄃx7䙳ꦋ&䓹vq☶I䁘ᾘ涜\\썉뺌Lr%Bc㍜3?ꝭ砿裞]": null, + "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894, + "ㇲ\t⋇轑ꠤ룫X긒\"zoY읇희wj梐쐑l侸`e%s": -9.9240075473576563E17, + "啸ꮑ㉰!ᚓ}銏": -4.0694813896301194E18, + ">]囋੽EK뇜>_ꀣ緳碖{쐐裔[<ನ\"䇅\"5L?#xTwv#罐\u0005래t应\\N?빗;": "v쮽瞭p뭃" + } + ]], + "斴槾?Z翁\"~慍弞ﻆ=꜡o5鐋dw\"?K蠡i샾ogDﲰ_C*⬟iㇷ4nય蟏[㟉U꽌娛苸 ঢ়操贻洞펻)쿗૊許X⨪VY츚Z䍾㶭~튃ᵦ<\/E臭tve猑x嚢": null, + "锡⛩<\/칥ꈙᬙ蝀&Ꚑ籬■865?_>L詏쿨䈌浿弥爫̫lj&zx<\/C쉾?覯n?": null, + "꾳鑤/꼩d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010屗9쁡钁u?殢c䳀蓃樄욂NAq赟c튒瘁렶Aૡɚ捍" + } + ] + ] + ]} + ] + ] + }]]]}} + ]}], + "Ej䗳U<\/Q=灒샎䞦,堰頠@褙g_\u0003ꤾfⶽ?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬荋BO7㢝䟸\"Yb": 2.36010731779814E-20, + "逸'0岔j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqv䰞3Ь踌v㳆¹gT┌gvLB賖烡m?@E঳i": null + }, + "曺v찘ׁ?&绫O័": 9107241066550187880 + } + ] + ], + "(e屄\u0019昜훕琖b蓘ᬄ0/۲묇Z蘮ဏ⨏蛘胯뢃@㘉8ሪWᨮ⦬ᅳ䅴HI၇쨳z囕陻엣1赳o": true, + ",b刈Z,ၠ晐T솝ŕB⩆ou'퐼≃绗雗d譊": null, + "a唥KB\"ﳝ肕$u\n^⅄P䟼냉䞸⩪u윗瀱ꔨ#yşs꒬=1|ﲤ爢`t౐튼쳫_Az(Ṋ擬㦷좕耈6": 2099309172767331582, + "?㴸U<\/䢔ꯡ阽扆㐤q鐋?f㔫wM嬙-;UV죫嚔픞G&\"Cᗍ䪏풊Q": "VM7疹+陕枡툩窲}翡䖶8欞čsT뮐}璤:jﺋ鎴}HfA൝⧻Zd#Qu茅J髒皣Y-︴[?-~쉜v딏璮㹚䅊﩯<-#\u000e걀h\u0004u抱﵊㼃U<㱷⊱IC進" + }, + "숌dee節鏽邺p넱蹓+e罕U": true + } + ], + "b⧴룏??ᔠ3ぱ>%郿劃翐ꏬꠛW瞳᫏누躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛGRꨳ\u000fTT泠纷꽀MRᴱ纊:㠭볮?%N56%鈕1䗍䜁a䲗j陇=뿻偂衋࿘ᓸ?ᕵZ+<\/}H耢b䀁z^f$&㝒LkꢳI脚뙛u": 5.694374481577558E-20 + }] + } + ]], + "obj": {"key": "wrong value"}, + "퓲꽪m{㶩/뇿#⼢&᭙硞㪔E嚉c樱㬇1a綑᝖DḾ䝩": null + }, + "key": "6.908319653520691E8", + "z": { + "6U閆崬밺뀫颒myj츥휘:$薈mY햚#rz飏+玭V㭢뾿愴YꖚX亥ᮉ푊\u0006垡㐭룝\"厓ᔧḅ^Sqpv媫\"⤽걒\"˽Ἆ?ꇆ䬔未tv{DV鯀Tἆl凸g\\㈭ĭ즿UH㽤": null, + "b茤z\\.N": [[ + "ZL:ᅣዎ*Y|猫劁櫕荾Oj为1糕쪥泏S룂w࡛Ᏺ⸥蚙)", + { + "\"䬰ỐwD捾V`邀⠕VD㺝sH6[칑.:醥葹*뻵倻aD\"": true, + "e浱up蔽Cr෠JK軵xCʨ<뜡癙Y獩ケ齈X/螗唻?<蘡+뷄㩤쳖3偑犾&\\첊xz坍崦ݻ鍴\"嵥B3㰃詤豺嚼aqJ⑆∥韼@\u000b㢊\u0015L臯.샥": false, + "l?Ǩ喳e6㔡$M꼄I,(3᝝縢,䊀疅뉲B㴔傳䂴\u0088㮰钘ꜵ!ᅛ韽>": -5514085325291784739, + "o㮚?\"춛㵉<\/﬊ࠃ䃪䝣wp6ἀ䱄[s*S嬈貒pᛥ㰉'돀": [{ + "(QP윤懊FI<ꃣ『䕷[\"珒嶮?%Ḭ壍಻䇟0荤!藲끹bd浶tl\u2049#쯀@僞": {"i妾8홫": { + ",M맃䞛K5nAㆴVN㒊햬$n꩑&ꎝ椞阫?/ṏ세뉪1x쥼㻤㪙`\"$쟒薟B煌܀쨝ଢ଼2掳7㙟鴙X婢\u0002": "Vዉ菈᧷⦌kﮞఈnz*﷜FM\"荭7ꍀ-VR<\/';䁙E9$䩉\f @s?퍪o3^衴cඎ䧪aK鼟q䆨c{䳠5mᒲՙ蘹ᮩ": { + "F㲷JGo⯍P덵x뒳p䘧☔\"+ꨲ吿JfR㔹)4n紬G练Q፞!C|": true, + "p^㫮솎oc.೚A㤠??r\u000f)⾽⌲們M2.䴘䩳:⫭胃\\፾@Fᭌ\\K": false, + "蟌Tk愙潦伩": { + "a<\/@ᾛ慂侇瘎": -7271305752851720826, + "艓藬/>၄ṯ,XW~㲆w": {"E痧郶)㜓ha朗!N赻瞉駠uC\u20ad辠x퓮⣫P1ࠫLMMX'M刼唳됤": null, + "P쓫晥%k覛ዩIUᇸ滨:噐혲lMR5䋈V梗>%幽u頖\\)쟟": null, + "eg+昉~矠䧞难\b?gQ쭷筝\\eꮠNl{ಢ哭|]Mn銌╥zꖘzⱷ⭤ᮜ^": [ + -1.30142114406914976E17, + -1.7555215491128452E-19, + null, + "渾㨝ߏ牄귛r?돌?w[⚞ӻ~廩輫㼧/", + -4.5737191805302129E18, + null, + "xy࿑M[oc셒竓Ⓔx?뜓y䊦>-D켍(&&?XKkc꩖ﺸᏋ뵞K伕6ী)딀P朁yW揙?훻魢傎EG碸9類៌g踲C⟌aEX舲:z꒸许", + 3808159498143417627, + null, + {"m試\u20df1{G8&뚈h홯J<\/": { + "3ஸ厠zs#1K7:rᥞoꅔꯧ&띇鵼鞫6跜#赿5l'8{7㕳(b/j\"厢aq籀ꏚ\u0015厼稥": [ + -2226135764510113982, + true, + null, + { + "h%'맞S싅Hs&dl슾W0j鿏MםD놯L~S-㇡R쭬%": null, + "⟓咔謡칲\u0000孺ꛭx旑檉㶆?": null, + "恇I転;￸B2Y`z\\獓w,놏濐撐埵䂄)!䶢D=ഭ㴟jyY": { + "$ࡘt厛毣ൢI芁<겿骫⫦6tr惺a": [ + 6.385779736989334E-20, + false, + true, + true, + [ + -6.891946211462334E-19, + null, + { + "]-\\Ꟑ1/薓❧Ὂ\\l牑\u0007A郃)阜ᇒᓌ-塯`W峬G}SDb㬨Q臉⮻빌O鞟톴첂B㺱<ƈmu챑J㴹㷳픷Oㆩs": { + "\"◉B\"pᶉt骔J꩸ᄇᛐi╰栛K쉷㉯鐩!㈐n칍䟅難>盥y铿e୔蒏M貹ヅ8嘋퀯䉶ጥ㏢殊뻳\"絧╿ꉑ䠥?∃蓊{}㣣Gk긔H1哵峱": false, + "6.瀫cN䇮F㧺?\\椯=ڈT䘆4␘8qv": -3.5687501019676885E-19, + "Q?yऴr혴{஀䳘p惭f1ﹸ䅷䕋贲<ྃᄊ繲hq\\b|#QSTs1c-7(䵢\u2069匏絘ꯉ:l毴汞t戀oෟᵶ뮱፣-醇Jx䙬䐁햢0࣫ᡁgrㄛ": "\u0011_xM/蘇Chv;dhA5.嗀绱V爤ﰦi뵲M", + "⏑[\"ugoy^儣횎~U\\섯겜論l2jw஌yD腅̂\u0019": true, + "ⵯɇ䐲᫿࢚!㯢l샅笶戮1꣖0Xe": null, + "劅f넀識b宁焊E찓橵G!ʱ獓뭔雩괛": [{"p⹣켙[q>燣䍃㞽ᩲx:쓤삘7玑퇼0<\/q璂ᑁ[Z\\3䅵䧳\u0011㤧|妱緒C['췓Yꞟ3Z鳱雼P錻BU씧U`ᢶg蓱>.1ӧ譫'L_5V䏵Ц": [ + false, + false, + {"22䂍盥N霂얢躰e9⑩_뵜斌n@B}$괻Yᐱ@䧋V\"☒-諯cV돯ʠ": true, + "Ű螧ᔼ檍鍎땒딜qꄃH뜣<獧ूCY吓⸏>XQ㵡趌o끬k픀빯a(ܵ甏끆୯/6Nᪧ}搚ᆚ짌P牰泱鈷^d꣟#L삀\"㕹襻;k㸊\\f+": true, + "쎣\",|⫝̸阊x庿k잣v庅$鈏괎炔k쬪O_": [ + "잩AzZGz3v愠ꉈⵎ?㊱}S尳௏p\r2>췝IP䘈M)w|\u000eE", + -9222726055990423201, + null, + [ + false, + {"´킮'뮤쯽Wx讐V,6ᩪ1紲aႈ\u205czD": [ + -930994432421097536, + 3157232031581030121, + "l貚PY䃛5@䭄귻m㎮琸f": 1.0318894506812084E-19, + "࢜⩢Ш䧔1肽씮+༎ᣰ闺馺窃䕨8Mƶq腽xc(៯夐J5굄䕁Qj_훨/~価.䢵慯틠퇱豠㼇Qﵘ$DuSp(8Uญ<\/ಟ룴𥳐ݩ$": 8350772684161555590, + "ㆎQ䄾\u001bpᩭ${[諟^^骴᤮b^ㅥI┧T㉇⾞\"绦r䰂f矩'-7䡭桥Dz兔V9谶居㺍ᔊ䩯덲.\u001eL0ὅㅷ釣": [{ + "<쯬J卷^숞u࠯䌗艞R9닪g㐾볎a䂈歖意:%鐔|ﵤ|y}>;2,覂⶚啵tb*仛8乒㓶B࿠㯉戩oX 貘5V嗆렽낁߼4h䧛ꍺM空\\b꿋貼": 8478577078537189402, + "VD*|吝z~h譺aᯒ": { + "YI췢K<\/濳xNne玗rJo쾘3핰鴊\"↱AR:ࢷ\"9?\"臁說)?誚ꊏe)_D翾W?&F6J@뺾ꍰNZ醊Z쾈വH嶿?炫㷱鬰M겈᭨b,⻁鈵P䕡䀠८ⱄ홎鄣": { + "@?k2鶖㋮\"Oರ K㨇廪儲\u0017䍾J?);\b*묀㗠섳햭1MC V": null, + "UIICP!BUA`ᢈ㋸~袩㗪⾒=fB﮴l1ꡛ죘R辂여ҳ7쮡<䩲`熕8頁": 4481809488267626463, + "Y?+8먙ᚔ鋳蜩럶1㥔y璜౩`": [ + null, + 1.2850335807501874E-19, + "~V2", + 2035406654801997866, + { + "<숻1>\"": -8062468865199390827, + "M㿣E]}qwG莎Gn᝶(ꔙ\\D⬲iꇲs寢t駇S뀡ꢜ": false, + "pꝤ㎏9W%>M;-U璏f(^j1?&RB隧 忓b똊E": "#G?C8.躬ꥯ'?냪#< 渟&헿란zpo왓Kj}鷧XﻘMツb䕖;㪻", + "vE풤幉xz뱕쫥Ug㦲aH} ᣟp:鬼YᰟH3镔ᴚ斦\\鏑r*2橱G⼔F/.j": true, + "RK좬뎂a홠f*f㱉ᮍ⦋潙㨋Gu곌SGI3I뿐\\F',)t`荁蘯囯ﮉ裲뇟쥼_ገ驪▵撏ᕤV": 1.52738225997956557E18, + "^k굲䪿꠹B逤%F㱢漥O披M㽯镞竇霒i꼂焅륓\u00059=皫之눃\u2047娤閍銤唫ၕb<\/w踲䔼u솆맚,䝒ᝳ'/it": "B餹饴is権ꖪ怯ꦂẉဎt\"!凢谵⧿0\\<=(uL䷍刨쑪>俆揓Cy襸Q힆䆭涷<\/ᐱ0ɧ䗾䚹\\ኜ?ꄢᇘ`䴢{囇}᠈䴥X4퓪檄]ꥷ/3謒ሴn+g騍X", + "GgG꽬[(嫓몍6\u0004궍宩㙻/>\u0011^辍dT腪hxǑ%ꊇk,8(W⧂結P鬜O": [{ + "M㴾c>\\ᓲ\u0019V{>ꤩ혙넪㭪躂TS-痴໸闓⍵/徯O.M㏥ʷD囎⧔쁳휤T??鉬뇙=#ꢫ숣BX䭼<\/d똬졬g榿)eꨋﯪ좇첻\u001a\u0011\";~쓆BH4坋攊7힪", + "iT:L闞椕윚*滛gI≀Wਟඊ'ꢆ縺뱹鮚Nꩁ᧬蕼21줧\\䋯``⍐\\㏱鳨": 1927052677739832894, + "쮁缦腃g]礿Y㬙 fヺSɪ꾾N㞈": [ + null, + null, + { + "!t,灝Y 1䗉罵?c饃호䉂Cᐭ쒘z(즽sZG㬣sഖE4뢜㓕䏞丮Qp簍6EZឪ겛fx'ꩱQ0罣i{k锩*㤴㯞r迎jTⲤ渔m炅肳": [ + -3.3325685522591933E18, + [{"㓁5]A䢕1룥BC?Ꙍ`r룔Ⳛ䙡u伲+\u0001്o": [ + null, + 4975309147809803991, + null, + null, + {"T팘8Dﯲ稟MM☻㧚䥧/8ﻥ⥯aXLaH\"顾S☟耲ît7fS෉놁뮔/ꕼ䓈쁺4\\霶䠴ᩢ<\/t4?죵>uD5➶༆쉌럮⢀秙䘥\u20972ETR3濡恆vB? ~鸆\u0005": { + "`閖m璝㥉b뜴?Wf;?DV콜\u2020퍉౓擝宏ZMj3mJ먡-傷뱙yח㸷꥿ ໘u=M읝!5吭L4v\\?ǎ7C홫": null, + "|": false, + "~Ztᛋ䚘\\擭㗝傪W陖+㗶qᵿ蘥ᙄp%䫎)}=⠔6ᮢS湟-螾-mXH?cp": 448751162044282216, + "\u209fad놹j檋䇌ᶾ梕㉝bוּ": {"?苴ꩠD䋓帘5騱qﱖPF?☸珗顒yU ᡫcb䫎 S@㥚gꮒ쎘泴멖\\:I鮱TZ듒ᶨQ3+f7캙\"?\f풾\\o杞紟﻽M.⏎靑OP": [ + -2.6990368911551596E18, + [{"䒖@<᰿<\/⽬tTr腞&G%᳊秩蜰擻f㎳?S㵧\r*k뎾-乢겹隷j軛겷0룁鮁": {")DO0腦:춍逿:1㥨่!蛍樋2": [{ + ",ꌣf侴笾m๫ꆽ?1?U?\u0011ꌈꂇ": { + "x捗甠nVq䅦w`CD⦂惺嘴0I#vỵ} \\귂S끴D얾?Ԓj溯\"v餄a": { + "@翙c⢃趚痋i\u0015OQ⍝lq돆Y0pࢥ3쉨䜩^<8g懥0w)]䊑n洺o5쭝QL댊랖L镈Qnt⪟㒅십q헎鳒⮤眉ᔹ梠@O縠u泌ㄘb榚癸XޔFtj;iC": false, + "I&뱋゘|蓔䔕측瓯%6ᗻHW\\N1貇#?僐ᗜgh᭪o'䗈꽹Rc욏/蔳迄༝!0邔䨷푪8疩)[쭶緄㇈୧ፐ": { + "B+:ꉰ`s쾭)빼C羍A䫊pMgjdx䐝Hf9᥸W0!C樃'蘿f䫤סи\u0017Jve? 覝f둀⬣퓉Whk\"஼=չﳐ皆笁BIW虨쫓F廰饞": -642906201042308791, + "sb,XcZ<\/m㉹ ;䑷@c䵀s奤⬷7`ꘖ蕘戚?Feb#輜}p4nH⬮eKL트}": [ + "RK鳗z=袤Pf|[,u욺", + "Ẏᏻ罯뉋⺖锅젯㷻{H䰞쬙-쩓D]~\u0013O㳢gb@揶蔉|kᦂ❗!\u001ebM褐sca쨜襒y⺉룓", + null, + null, + true, + -1.650777344339075E-19, + false, + "☑lꄆs힨꤇]'uTന⌳농].1⋔괁沰\"IWഩ\u0019氜8쟇䔻;3衲恋,窌z펏喁횗?4?C넁问?ᥙ橭{稻Ⴗ_썔", + "n?]讇빽嗁}1孅9#ꭨ靶v\u0014喈)vw祔}룼쮿I", + -2.7033457331882025E18, + { + ";⚃^㱋x:饬ኡj'꧵T☽O㔬RO婎?향ᒭ搩$渣y4i;(Q>꿘e8q": "j~錘}0g;L萺*;ᕭꄮ0l潛烢5H▄쳂ꏒוֹꙶT犘≫x閦웧v", + "~揯\u2018c4職렁E~ᑅቚꈂ?nq뎤.:慹`F햘+%鉎O瀜쟏敛菮⍌浢<\/㮺紿P鳆ࠉ8I-o?#jﮨ7v3Dt赻J9": null, + "ࣝW䌈0ꍎqC逖,횅c၃swj;jJS櫍5槗OaB>D踾Y": {"㒰䵝F%?59.㍈cᕨ흕틎ḏ㋩B=9IېⓌ{:9.yw}呰ㆮ肒᎒tI㾴62\"ዃ抡C﹬B<\/촋jo朣", + [ + -7675533242647793366, + {"ᙧ呃:[㒺쳀쌡쏂H稈㢤\u001dᶗGG-{GHྻຊꡃ哸䵬;$?&d\\⥬こN圴됤挨-'ꕮ$PU%?冕눖i魁q騎Q": [ + false, + [[ + 7929823049157504248, + [[ + true, + "Z菙\u0017'eꕤ᱕l,0\\X\u001c[=雿8蠬L<\/낲긯W99g톉4ퟋb㝺\u0007劁'!麕Q궈oW:@X၎z蘻m絙璩귓죉+3柚怫tS捇蒣䝠-擶D[0=퉿8)q0ٟ", + "唉\nFA椭穒巯\\䥴䅺鿤S#b迅獘 ﶗ꬘\\?q1qN犠pX꜅^䤊⛤㢌[⬛휖岺q唻ⳡ틍\"㙙Eh@oA賑㗠y必Nꊑᗘ", + -2154220236962890773, + -3.2442003245397908E18, + "Wᄿ筠:瘫퀩?o貸q⊻(᎞KWf宛尨h^残3[U(='橄", + -7857990034281549164, + 1.44283696979059942E18, + null, + {"ꫯAw跭喀 ?_9\"Aty背F=9缉ྦྷ@;?^鞀w:uN㘢Rỏ": [ + 7.393662029337442E15, + 3564680942654233068, + [ + false, + -5253931502642112194, + "煉\\辎ೆ罍5⒭1䪁䃑s䎢:[e5}峳ﴱn騎3?腳Hyꏃ膼N潭錖,Yᝋ˜YAၓ㬠bG렣䰣:", + true, + null, + { + "⒛'P&%죮|:⫶춞": -3818336746965687085, + "钖m<\/0ݎMtF2Pk=瓰୮洽겎.": [[ + -8757574841556350607, + -3045234949333270161, + null, + { + "Ꮬr輳>⫇9hU##w@귪A\\C 鋺㘓ꖐ梒뒬묹㹻+郸嬏윤'+g<\/碴,}ꙫ>손;情d齆J䬁ຩ撛챝탹/R澡7剌tꤼ?ặ!`⏲睤\u00002똥଴⟏": null, + "\u20f2ܹe\\tAꥍư\\x当뿖렉禛;G檳ﯪS૰3~㘠#[J<}{奲 5箉⨔{놁<\/釿抋,嚠/曳m&WaOvT赋皺璑텁": [[ + false, + null, + true, + -5.7131445659795661E18, + "萭m䓪D5|3婁ఞ>蠇晼6nﴺPp禽羱DS<睓닫屚삏姿", + true, + [ + -8759747687917306831, + { + ">ⓛ\t,odKr{䘠?b퓸C嶈=DyEᙬ@ᴔ쨺芛髿UT퓻春<\/yꏸ>豚W釺N뜨^?꽴﨟5殺ᗃ翐%>퍂ဿ䄸沂Ea;A_\u0005閹殀W+窊?Ꭼd\u0013P汴G5썓揘": 4.342729067882445E-18, + "Q^즾眆@AN\u0011Kb榰냎Y#䝀ꀒᳺ'q暇睵s\"!3#I⊆畼寤@HxJ9": false, + "⿾D[)袨㇩i]웪䀤ᛰMvR<蟏㣨": {"v퇓L㪱ꖣ豛톤\\곱#kDTN": [{ + "(쾴䡣,寴ph(C\"㳶w\"憳2s馆E!n!&柄<\/0Pꈗſ?㿳Qd鵔": {"娇堰孹L錮h嵅⛤躏顒?CglN束+쨣ﺜ\\MrH": {"獞䎇둃ቲ弭팭^ꄞ踦涟XK錆쳞ឌ`;੶S炥騞ଋ褂B៎{ڒ䭷ᶼ靜pI荗虶K$": [{"◖S~躘蒉꫿輜譝Q㽙闐@ᢗ¥E榁iء5┄^B[絮跉ᰥ遙PWi3wㄾⵀDJ9!w㞣ᄎ{듒ꓓb6\\篴??c⼰鶹⟧\\鮇ꮇ": [[ + 654120831325413520, + -1.9562073916357608E-19, + { + "DC(昐衵ἡ긙갵姭|֛[t": 7.6979110359897907E18, + "J␅))嫼❳9Xfd飉j7猬ᩉ+⤻眗벎E鰉Zᄊ63zၝ69}ZᶐL崭ᦥ⡦靚⋛ꎨ~i㨃咊ꧭo䰠阀3C(": -3.5844809362512589E17, + "p꣑팱쒬ꎑ뛡Ꙩ挴恍胔&7ᔈ묒4Hd硶훐㎖zꢼ豍㿢aሃ=<\/湉鵲EӅ%$F!퍶棌孼{O駍਺geu+": ")\u001b잓kŀX쩫A밁®ڣ癦狢)扔弒p}k縕ꩋ,䃉tࣼi", + "ァF肿輸<솄G-䢹䛸ꊏl`Tqꕗ蒞a氷⸅ᴉ蠰]S/{J왲m5{9.uέ~㕚㣹u>x8U讁B덺襪盎QhVS맅킃i识{벂磄Iහ䙅xZy/抍૭Z鲁-霳V据挦ℒ": null, + "㯛|Nꐸb7ⵐb?拠O\u0014ކ?-(EꞨ4ꕷᄤYᯕOW瞺~螸\"욿ќe㺰\"'㌢ƐW\u0004瞕>0?V鷵엳": true, + "뤥G\\迋䠿[庩'꼡\u001aiᩮV쯁ᳪ䦪Ô;倱ନ뛁誈": null, + "쥹䄆䚟Q榁䎐᢭<\/2㕣p}HW蟔|䃏꿈ꚉ锳2Pb7㙑Tⅹᵅ": { + "Y?֭$>#cVBꩨ:>eL蒁務": { + "86柡0po 䏚&-捑Ћ祌<\/휃-G*㶢הּ쩍s㶟餇c걺yu꽎還5*턧簕Og婥SꝐ": null, + "a+葞h٥ࠆ裈嗫ﵢ5輙퀟ᛜ,QDﹼ⟶Y騠锪E_|x죗j侵;m蜫轘趥?븅w5+mi콛L": { + ";⯭ﱢ!买F⽍柤鶂n䵣V㫚墱2렾ELEl⣆": [ + true, + -3.6479311868339015E-18, + -7270785619461995400, + 3.334081886177621E18, + 2.581457786298155E18, + -6.605252412954115E-20, + -3.9232347037744167E-20, + { + "B6㊕.k1": null, + "ZAꄮJ鮷ᳱo갘硥鈠䠒츼": { + "ᕅ}럡}.@y陪鶁r業'援퀉x䉴ﵴl퍘):씭脴ᥞhiꃰblﲂ䡲엕8߇M㶭0燋標挝-?PCwe⾕J碻Ᾱ䬈䈥뷰憵賣뵓痬+": {"a췩v礗X⋈耓ፊf罅靮!㔽YYᣓw澍33⎔芲F|\"䜏T↮輦挑6ᓘL侘?ᅥ]덆1R௯✎餘6ꏽ<\/௨\\?q喷ꁫj~@ulq": {"嗫欆뾔Xꆹ4H㌋F嵧]ࠎ]㠖1ꞤT<$m뫏O i댳0䲝i": {"?෩?\u20cd슮|ꯆjs{?d7?eNs⢚嫥氂䡮쎱:鑵롟2hJꎒﯭ鱢3춲亄:뼣v䊭諱Yj択cVmR䩃㘬T\"N홝*ै%x^F\\_s9보zz4淗?q": [ + null, + "?", + 2941869570821073737, + "{5{殇0䝾g6밖퍋臩綹R$䖭j紋釰7sXI繳漪행y", + false, + "aH磂?뛡#惇d婅?Fe,쐘+늵䍘\"3r瘆唊勐j⳧࠴ꇓ<\/唕윈x⬌讣䋵%拗ᛆⰿ妴᝔M2㳗必꧂淲?ゥ젯檢<8끒MidX䏒3᳻Q▮佐UT|⤪봦靏⊏", + [[{ + "颉(&뜸귙{y^\"P퟉춝Ჟ䮭D顡9=?}Y誱<$b뱣RvO8cH煉@tk~4ǂ⤧⩝屋SS;J{vV#剤餓ᯅc?#a6D,s": [ + -7.8781018564821536E16, + true, + [ + -2.28770899315832371E18, + false, + -1.0863912140143876E-20, + -6282721572097446995, + 6767121921199223078, + -2545487755405567831, + false, + null, + -9065970397975641765, + [ + -5.928721243413937E-20, + {"6촊\u001a홯kB0w撨燠룉{绎6⳹!턍贑y▾鱧ժ[;7ᨷ∀*땒䪮1x霆Hᩭ☔\"r䝐7毟ᝰr惃3ꉭE+>僒澐": [ + "Ta쎩aƝt쵯ⰪVb", + [ + -5222472249213580702, + null, + -2851641861541559595, + null, + 4808804630502809099, + 5657671602244269874, + "5犲﨣4mᥣ?yf젫꾯|䋬잁$`Iⳉﴷ扳兝,'c", + false, + [ + null, + { + "DyUIN쎾M仼惀⮥裎岶泭lh扠\u001e礼.tEC癯튻@_Qd4c5S熯A<\/\6U윲蹴Q=%푫汹\\\u20614b[௒C⒥Xe⊇囙b,服3ss땊뢍i~逇PA쇸1": -2.63273619193485312E17, + "Mq꺋貘k휕=nK硍뫞輩>㾆~἞ࡹ긐榵l⋙Hw뮢帋M엳뢯v⅃^": 1877913476688465125, + "ᶴ뻗`~筗免⚽টW˃⽝b犳䓺Iz篤p;乨A\u20ef쩏?疊m㝀컩뫡b탔鄃ᾈV(遢珳=뎲ିeF仢䆡谨8t0醄7㭧瘵⻰컆r厡궥d)a阄፷Ed&c﯄伮1p": null, + "⯁w4曢\"(欷輡": "\"M᭫]䣒頳B\\燧ࠃN㡇j姈g⊸⺌忉ꡥF矉স%^", + "㣡Oᄦ昵⫮Y祎S쐐級㭻撥>{I$": -378474210562741663, + "䛒掷留Q%쓗1*1J*끓헩ᦢ﫫哉쩧EↅIcꅡ\\?ⴊl귛顮4": false, + "寔愆샠5]䗄IH贈=d﯊/偶?ॊn%晥D視N򗘈'᫂⚦|X쵩넽z질tskxDQ莮Aoﱻ뛓": true, + "钣xp?&\u001e侉/y䴼~?U篔蘚缣/I畚?Q绊": -3034854258736382234, + "꺲໣眀)⿷J暘pИfAV삕쳭Nꯗ4々'唄ⶑ伻㷯騑倭D*Ok꧁3b␽_<\/챣Xm톰ၕ䆄`*fl㭀暮滠毡?": [ + "D男p`V뙸擨忝븪9c麺`淂⢦Yw⡢+kzܖ\fY1䬡H歁)벾Z♤溊-혰셢?1<-\u0005;搢Tᐁle\\ᛵߓﭩ榩訝-xJ;巡8깊蠝ﻓU$K": { + "Vꕡ諅搓W=斸s︪vﲜ츧$)iꡟ싉e寳?ጭムVથ嵬i楝Fg<\/Z|៪ꩆ-5'@ꃱ80!燱R쇤t糳]罛逇dṌ֣XHiͦ{": true, + "Ya矲C멗Q9膲墅携휻c\\딶G甔<\/.齵휴": -1.1456247877031811E-19, + "z#.OO￝J": -8263224695871959017, + "崍_3夼ᮟ1F븍뽯ᦓ鴭V豈Ь": [{ + "N蒬74": null, + "yuB?厅vK笗!ᔸcXQ旦컶P-녫mᄉ麟_": "1R@ 톘xa_|﩯遘s槞d!d껀筤⬫薐焵먑D{\\6k共倌☀G~AS_D\"딟쬚뮥馲렓쓠攥WTMܭ8nX㩴䕅檹E\u0007ﭨN 2 ℆涐ꥏ꠵3▙玽|됨_\u2048", + "恐A C䧩G": {":M큣5e들\\ꍀ恼ᔄ靸|I﨏$)n": { + "|U䬫㟯SKV6ꛤ㗮\bn봻䲄fXT:㾯쳤'笓0b/ೢC쳖?2浓uO.䰴": "ཐ꼋e?``,ᚇ慐^8ꜙNM䂱\u0001IᖙꝧM'vKdꌊH牮r\\O@䊷ᓵ쀆(fy聻i툺\"?<\/峧ࣞ⓺ᤤ쵒߯ꎺ騬?)刦\u2072l慪y꺜ﲖTj+u", + "뽫hh䈵w>1ⲏ쐭V[ⅎ\\헑벑F_㖝⠗㫇h恽;῝汰ᱼ瀖J옆9RR셏vsZ柺鶶툤r뢱橾/ꉇ囦FGm\"謗ꉦ⨶쒿⥡%]鵩#ᖣ_蹎 u5|祥?O", + null, + 2.0150326776036215E-19, + null, + true, + false, + true, + {"\fa᭶P捤WWc᠟f뚉ᬏ퓗ⳀW睹5:HXH=q7x찙X$)모r뚥ᆟ!Jﳸf": [ + -2995806398034583407, + [ + 6441377066589744683, + "Mﶒ醹i)Gἦ廃s6몞 KJ౹礎VZ螺费힀\u0000冺업{谥'꡾뱻:.ꘘ굄奉攼Di᷑K鶲y繈욊阓v㻘}枭캗e矮1c?휐\"4\u0005厑莔뀾墓낝⽴洗ṹ䇃糞@b1\u0016즽Y轹", + { + "1⽕⌰鉟픏M㤭n⧴ỼD#%鐘⊯쿼稁븣몐紧ᅇ㓕ᛖcw嬀~ഌ㖓(0r⧦Q䑕髍ര铂㓻R儮\"@ꇱm❈௿᦯頌8}㿹犴?xn잆꥽R": 2.07321075750427366E18, + "˳b18㗈䃟柵Z曆VTAu7+㛂cb0﯑Wp執<\/臋뭡뚋刼틮荋벲TLP预庰܈G\\O@VD'鱃#乖끺*鑪ꬳ?Mޞdﭹ{␇圯쇜㼞顄︖Y홡g": [{ + "0a,FZ": true, + "2z̬蝣ꧦ驸\u0006L↛Ḣ4๚뿀'?lcwᄧ㐮!蓚䃦-|7.飑挴.樵*+1ﮊ\u0010ꛌ%貨啺/JdM:똍!FBe?鰴㨗0O财I藻ʔWA᫓G쳛u`<\/I": [{ + "$τ5V鴐a뾆両環iZp頻යn븃v": -4869131188151215571, + "*즢[⦃b礞R◚nΰꕢH=귰燙[yc誘g䆌?ଜ臛": { + "洤湌鲒)⟻\\䥳va}PeAMnN[": "㐳ɪ/(軆lZR,Cp殍ȮN啷\"3B婴?i=r$펽ᤐ쀸", + "阄R4㒿㯔ڀ69ZᲦ2癁핌噗P崜#\\-쭍袛&鐑/$4童V꩑_ZHA澢fZ3": {"x;P{긳:G閉:9?活H": [ + "繺漮6?z犞焃슳\">ỏ[Ⳛ䌜녏䂹>聵⼶煜Y桥[泥뚩MvK$4jtロ", + "E#갶霠좭㦻ୗ먵F+䪀o蝒ba쮎4X㣵 h", + -335836610224228782, + null, + null, + [ + "r1᫩0>danjY짿bs{", + [ + -9.594464059325631E-23, + 1.0456894622831624E-20, + null, + 5.803973284253454E-20, + -8141787905188892123, + true, + -4735305442504973382, + 9.513150514479281E-20, + "7넳$螔忷㶪}䪪l짴\u0007鹁P鰚HF銏ZJﳴ/⍎1ᷓ忉睇ᜋ쓈x뵠m䷐窥Ꮤ^\u0019ᶌ偭#ヂt☆၃pᎍ臶䟱5$䰵&๵分숝]䝈뉍♂坎\u0011<>", + "C蒑貑藁lﰰ}X喇몛;t밿O7/᯹f\u0015kI嘦<ዴ㟮ᗎZ`GWퟩ瑹࡮ᅴB꿊칈??R校s脚", + { + "9珵戬+AU^洘拻ቒy柭床'粙XG鞕᠜繀伪%]hC,$輙?Ut乖Qm떚W8઼}~q⠪rU䤶CQ痗ig@#≲t샌f㈥酧l;y闥ZH斦e⸬]j⸗?ঢ拻퀆滌": null, + "畯}㧢J罚帐VX㨑>1ꢶkT⿄蘥㝑o|<嗸層沈挄GEOM@-䞚䧰$만峬輏䠱V✩5宸-揂D'㗪yP掶7b⠟J㕻SfP?d}v㼂Ꮕ'猘": { + "陓y잀v>╪": null, + "鬿L+7:됑Y=焠U;킻䯌잫!韎ஔ\f": { + "駫WmGጶ": { + "\\~m6狩K": -2586304199791962143, + "ႜࠀ%͑l⿅D.瑢Dk%0紪dḨTI픸%뗜☓s榗኉\"?V籄7w髄♲쟗翛歂E䤓皹t ?)ᄟ鬲鐜6C": { + "_췤a圷1\u000eB-XOy缿請∎$`쳌eZ~杁튻/蜞`塣৙\"⪰\"沒l}蕌\\롃荫氌.望wZ|o!)Hn獝qg}": null, + "kOSܧ䖨钨:಼鉝ꭝO醧S`십`ꓭ쭁ﯢN&Et㺪馻㍢ⅳ㢺崡ຊ蜚锫\\%ahx켨|ż劻ꎄ㢄쐟A躊᰹p譞綨Ir쿯\u0016ﵚOd럂*僨郀N*b㕷63z": { + ":L5r+T㡲": [{ + "VK泓돲ᮙRy㓤➙Ⱗ38oi}LJቨ7Ó㹡৘*q)1豢⛃e᫛뙪壥镇枝7G藯g㨛oI䄽 孂L缊ꋕ'EN`": -2148138481412096818, + "`⛝ᘑ$(खꊲ⤖ᄁꤒ䦦3=)]Y㢌跨NĴ驳줟秠++d孳>8ᎊ떩EꡣSv룃 쯫أ?#E|᭙㎐?zv:5祉^⋑V": [ + -1.4691944435285607E-19, + 3.4128661569395795E17, + "㐃촗^G9佭龶n募8R厞eEw⺡_ㆱ%⼨D뉄퉠2ꩵᛅⳍ搿L팹Lවn=\"慉념ᛮy>!`g!풲晴[/;?[v겁軇}⤳⤁핏∌T㽲R홓遉㓥", + "愰_⮹T䓒妒閤둥?0aB@㈧g焻-#~跬x<\/舁P݄ꐡ=\\׳P\u0015jᳪᢁq;㯏l%᭗;砢觨▝,謁ꍰGy?躤O黩퍋Y㒝a擯\n7覌똟_䔡]fJ晋IAS", + 4367930106786121250, + -4.9421193149720582E17, + null, + { + ";ᄌ똾柉곟ⰺKpፇ䱻ฺ䖝{o~h!eꁿ઻욄ښ\u0002y?xUd\u207c悜ꌭ": [ + 1.6010824122815255E-19, + [ + "宨︩9앉檥pr쇷?WxLb", + "氇9】J玚\u000f옛呲~ 輠1D嬛,*mW3?n휂糊γ虻*ᴫ꾠?q凐趗Ko↦GT铮", + "㶢ថmO㍔k'诔栀Z蛟}GZ钹D", + false, + -6.366995517736813E-20, + -4894479530745302899, + null, + "V%᫡II璅䅛䓎풹ﱢ/pU9se되뛞x梔~C)䨧䩻蜺(g㘚R?/Ự[忓C뾠ࢤc왈邠买?嫥挤풜隊枕", + ",v碍喔㌲쟚蔚톬៓ꭶ", + 3.9625444752577524E-19, + null, + [ + "kO8란뿒䱕馔b臻⍟隨\"㜮鲣Yq5m퐔K#ꢘug㼈ᝦ=P^6탲@䧔%$CqSw铜랊0&m⟭<\/a逎ym\u0013vᯗ": true, + "洫`|XN뤮\u0018詞=紩鴘_sX)㯅鿻Ố싹": 7.168252736947373E-20, + "ꛊ饤ﴏ袁(逊+~⽫얢鈮艬O힉7D筗S곯w操I斞᠈븘蓷x": [[[[ + -7.3136069426336952E18, + -2.13572396712722688E18, + { + "硢3㇩R:o칢行E<=\u0018ၬYuH!\u00044U%卝炼2>\u001eSi$⓷ꒈ'렢gᙫ番ꯒ㛹럥嶀澈v;葷鄕x蓎\\惩+稘UEᖸﳊ㊈壋N嫿⏾挎,袯苷ኢ\\x|3c": 7540762493381776411, + "?!*^ᢏ窯?\u0001ڔꙃw虜돳FgJ?&⨫*uo籤:?}ꃹ=ٴ惨瓜Z媊@ત戹㔏똩Ԛ耦Wt轁\\枒^\\ꩵ}}}ꀣD\\]6M_⌫)H豣:36섘㑜": { + ";홗ᰰU஋㙛`D왔ཿЃS회爁\u001b-㢈`봆?盂㛣듿ᦾ蒽_AD~EEຆ㊋(eNwk=Rɠ峭q\"5Ἠ婾^>'ls\n8QAK)- Q䲌mo펹L_칍樖庫9꩝쪹ᘹ䑖瀍aK ?*趤f뭓廝p=磕", + "哑z懅ᤏ-ꍹux쀭", + [ + true, + 3998739591332339511, + "ጻ㙙?᳸aK<\/囩U`B3袗ﱱ?\"/k鏔䍧2l@쿎VZ쨎/6ꃭ脥|B?31+on颼-ꮧ,O嫚m ࡭`KH葦:粘i]aSU쓙$쐂f+詛頖b", + [{"^<9<箝&絡;%i﫡2攑紴\\켉h쓙-柂䚝ven\u20f7浯-Ꮏ\r^훁䓚헬\u000e?\\ㅡֺJ떷VOt": [{ + "-௄卶k㘆혐஽y⎱㢬sS઄+^瞥h;ᾷj;抭\u0003밫f<\/5Ⱗ裏_朻%*[-撵䷮彈-芈": { + "㩩p3篊G|宮hz䑊o곥j^Co0": [ + 653239109285256503, + {"궲?|\":N1ۿ氃NZ#깩:쇡o8킗ࡊ[\"됸Po핇1(6鰏$膓}⽐*)渽J'DN<썙긘毦끲Ys칖": { + "2Pr?Xjㆠ?搮/?㓦柖馃5뚣Nᦼ|铢r衴㩖\"甝湗ܝ憍": "\"뾯i띇筝牻$珲/4ka $匝휴译zbAᩁꇸ瑅&뵲衯ꎀᆿ7@ꈋ'ᶨH@ᠴl+", + "7뢽뚐v?4^ꊥ_⪛.>pởr渲<\/⢕疻c\"g䇘vU剺dஔ鮥꒚(dv祴X⼹\\a8y5坆": true, + "o뼄B욞羁hr﷔폘뒚⿛U5pꪴfg!6\\\"爑쏍䢱W<ﶕ\\텣珇oI/BK뺡'谑♟[Ut븷亮g(\"t⡎有?ꬊ躺翁艩nl F⤿蠜": 1695826030502619742, + "ۊ깖>ࡹ햹^ⵕ쌾BnN〳2C䌕tʬ]찠?ݾ2饺蹳ぶꌭ訍\"◹ᬁD鯎4e滨T輀ﵣ੃3\u20f3킙D瘮g\\擦+泙ၧ 鬹ﯨַ肋7놷郟lP冝{ߒhড়r5,꓋": null, + "ΉN$y{}2\\N﹯ⱙK'8ɜͣwt,.钟廣䎘ꆚk媄_": null, + "䎥eᾆᝦ읉,Jުn岪㥐s搖謽䚔5t㯏㰳㱊ZhD䃭f絕s鋡篟a`Q鬃┦鸳n_靂(E4迠_觅뷝_宪D(NL疶hL追V熑%]v肫=惂!㇫5⬒\u001f喺4랪옑": { + "2a輍85먙R㮧㚪Sm}E2yꆣꫨrRym㐱膶ᔨ\\t綾A☰.焄뙗9<쫷챻䒵셴᭛䮜.<\/慌꽒9叻Ok䰊Z㥪幸k": [ + null, + true, + {"쌞쐍": { + "▟GL K2i뛱iQ\"̠.옛1X$}涺]靎懠ڦ늷?tf灟ݞゟ{": 1.227740268699265E-19, + "꒶]퓚%ฬK❅": [{ + "(ෛ@Ǯっ䧼䵤[aテൖvEnAdU렖뗈@볓yꈪ,mԴ|꟢캁(而첸죕CX4Y믅": "2⯩㳿ꢚ훀~迯?᪑\\啚;4X\u20c2襏B箹)俣eỻw䇄", + "75༂f詳䅫ꐧ鏿 }3\u20b5'∓䝱虀f菼Iq鈆﨤g퍩)BFa왢d0뮪痮M鋡nw∵謊;ꝧf美箈ḋ*\u001c`퇚퐋䳫$!V#N㹲抗ⱉ珎(V嵟鬒_b㳅\u0019": null, + "e_m@(i㜀3ꦗ䕯䭰Oc+-련0뭦⢹苿蟰ꂏSV䰭勢덥.ྈ爑Vd,ᕥ=퀍)vz뱊ꈊB_6듯\"?{㒲&㵞뵫疝돡믈%Qw限,?\r枮\"? N~癃ruࡗdn&": null, + "㉹&'Pfs䑜공j<\/?|8oc᧨L7\\pXᭁ 9᪘": -2.423073789014103E18, + "䝄瑄䢸穊f盈᥸,B뾧푗횵B1쟢f\u001f凄": "魖⚝2儉j꼂긾껢嗎0ࢇ纬xI4](੓`蕞;픬\fC\"斒\")2櫷I﹥迧", + "ퟯ詔x悝령+T?Bg⥄섅kOeQ큼㻴*{E靼6氿L缋\u001c둌๶-㥂2==-츫I즃㠐Lg踞ꙂEG貨鞠\"\u0014d'.缗gI-lIb䋱ᎂDy缦?": null, + "紝M㦁犿w浴詟棓쵫G:䜁?V2ힽ7N*n&㖊Nd-'ຊ?-樹DIv⊜)g䑜9뉂ㄹ푍阉~ꅐ쵃#R^\u000bB䌎䦾]p.䀳": [{"ϒ爛\"ꄱ︗竒G䃓-ま帳あ.j)qgu扐徣ਁZ鼗A9A鸦甈!k蔁喙:3T%&㠘+,䷞|챽v䚞문H<\/醯r셓㶾\\a볜卺zE䝷_죤ဵ뿰᎟CB": [ + 6233512720017661219, + null, + -1638543730522713294, + false, + -8901187771615024724, + [ + 3891351109509829590, + true, + false, + -1.03836679125188032E18, + { + "j랎:g曞ѕᘼ}链N", + -1.1103819473845426E-19, + true, + [ + true, + null, + -7.9091791735309888E17, + true, + {"}蔰鋈+ꐨ啵0?g*사%`J?*": [{ + "\"2wG?yn,癷BK\\龞䑞x?蠢": -3.7220345009853505E-19, + ";饹়❀)皋`噿焒j(3⿏w>偍5X薙婏聿3aFÆÝ": "2,ꓴg?_섦_>Y쪥션钺;=趘F~?D㨫\bX?㹤+>/믟kᠪ멅쬂Uzỵ]$珧`m雁瑊ඖ鯬cꙉ梢f묛bB", + "♽n$YjKiXX*GO贩鏃豮祴遞K醞眡}ꗨv嵎꼷0୸+M菋eH徸J꣆:⼐悥B켽迚㯃b諂\u000bjꠜ碱逮m8": [ + "푷᣺ﻯd8ﱖ嬇ភH鹎⡱᱅0g:果6$GQ췎{vᷧYy-脕x偹砡館⮸C蓼ꏚ=軄H犠G谖ES詤Z蠂3l봟hᅭ7䦹1GPQG癸숟~[#駥8zQ뛣J소obg,", + null, + 1513751096373485652, + null, + -6.851466660824754E-19, + {"䩂-⴮2ٰK솖풄꾚ႻP앳1H鷛wmR䗂皎칄?醜<\/&ࠧ㬍X濬䵈K`vJ륒Q/IC묛!;$vϑ": { + "@-ꚗxྐྵ@m瘬\u0010U絨ﮌ驐\\켑寛넆T=tQ㭤L연@脸삯e-:⩼u㎳VQ㋱襗ຓ<Ⅶ䌸cML3+\u001e_C)r\\9+Jn\\Pﺔ8蠱檾萅Pq鐳话T䄐I": -1.80683891195530061E18, + "ᷭዻU~ཷsgSJ`᪅'%㖔n5픆桪砳峣3獮枾䌷⊰呀": { + "Ş੉䓰邟自~X耤pl7间懑徛s첦5ਕXexh⬖鎥᐀nNr(J컗|ૃF\"Q겮葲놔엞^겄+㈆话〾희紐G'E?飕1f❼텬悚泬먐U睬훶Qs": false, + "(\u20dag8큽튣>^Y{뤋.袊䂓;_g]S\u202a꽬L;^'#땏bႌ?C緡<䝲䲝断ꏏ6\u001asD7IK5Wxo8\u0006p弊⼂ꯍ扵\u0003`뵂픋%ꄰ⫙됶l囏尛+䗅E쟇\\": [ + true, + { + "\n鱿aK㝡␒㼙2촹f;`쾏qIࡔG}㝷䐍瓰w늮*粅9뒪ㄊCj倡翑閳R渚MiUO~仨䜶RꙀA僈㉋⦋n{㖥0딿벑逦⥻0h薓쯴Ꝼ": [ + 5188716534221998369, + 2579413015347802508, + 9.010794400256652E-21, + -6.5327297761238093E17, + 1.11635352494065523E18, + -6656281618760253655, + { + "": ")?", + "TWKLꑙ裑꺔UE俸塑炌Ũ᜕-o\"徚#": {"M/癟6!oI51ni퐚=댡>xꍨ\u0004 ?": { + "皭": {"⢫䋖>u%w잼<䕏꘍P䋵$魋拝U䮎緧皇Y훂&|羋ꋕ잿cJ䨈跓齳5\u001a삱籷I꿾뤔S8㌷繖_Yឯ䲱B턼O歵F\\l醴o_欬6籏=D": [ + false, + true, + {"Mt|ꏞD|F궣MQ뵕T,띺k+?㍵i": [ + 7828094884540988137, + false, + { + "!༦鯠,&aﳑ>[euJꏽ綷搐B.h": -7648546591767075632, + "-n켧嘰{7挐毄Y,>❏螵煫乌pv醑Q嶚!|⌝責0왾덢ꏅ蛨S\\)竰'舓Q}A釡5#v": 3344849660672723988, + "8閪麁V=鈢1녈幬6棉⪮둌\u207d᚛驉ꛃ'r䆉惏ै|bἧﺢᒙ<=穊强s혧eꮿ慩⌡ \\槳W븧J檀C,ᘉ의0俯퀉M;筷ࣴ瓿{늊埂鄧_4揸Nn阼Jੵ˥(社": true, + "o뼀vw)4A뢵(a䵢)p姃뛸\u000fK#KiQp\u0005ꅍ芅쏅": null, + "砥$ꥸ┇耽u斮Gc{z빔깎밇\\숰\u001e괷各㶇쵿_ᴄ+h穢p촀Ნ䃬z䝁酳ӂ31xꔄ1_砚W렘G#2葊P ": [ + -3709692921720865059, + null, + [ + 6669892810652602379, + -135535375466621127, + "뎴iO}Z? 馢녱稹ᄾ䐩rSt帤넆&7i騏멗畖9誧鄜'w{Ͻ^2窭외b㑎粖i矪ꦨ탪跣)KEㆹ\u0015V8[W?⽉>'kc$䨘ᮛ뉻٬M5", + 1.10439588726055846E18, + false, + -4349729830749729097, + null, + [ + false, + "_蠢㠝^䟪/D녒㡋ỎC䒈판\u0006એq@O펢%;鹐쏌o戥~A[ꡉ濽ỳ&虃᩾荣唙藍茨Ig楡꒻M窓冉?", + true, + 2.17220752996421728E17, + -5079714907315156164, + -9.960375974658589E-20, + "ᾎ戞༒", + true, + false, + [[ + "ⶉᖌX⧕홇)g엃⹪x뚐癟\u0002", + -5185853871623955469, + { + "L㜤9ợㇶK鐰⋓V뽋˖!斫as|9"፬䆪?7胜&n薑~": -2.11545634977136992E17, + "O8뀩D}캖q萂6༣㏗䈓煮吽ਆᎼDᣘ폛;": false, + "YTᡅ^L㗎cbY$pᣞ縿#fh!ꘂb삵玊颟샞ဢ$䁗鼒몁~rkH^:닮먖츸륈⪺쒉砉?㙓扫㆕꣒`R䢱B酂?C뇞<5Iޚ讳騕S瞦z": null, + "\\RB?`mG댵鉡幐物䵎有5*e骄T㌓ᛪ琾駒Ku\u001a[柆jUq8⋈5鿋츿myﻗ?雍ux঴?": 5828963951918205428, + "n0晅:黯 xu씪^퓞cB㎊ᬍ⺘٤փ~B岚3㥕擄vᲂ~F?C䶖@$m~忔S왖㲚?챴⊟W#벌{'㰝I䝠縁s樘\\X뢻9핡I6菍ㄛ8쯶]wॽ0L\"q": null, + "x增줖j⦦t䏢᎙㛿Yf鼘~꫓恄4惊\u209c": "oOhbᤃ᛽z&Bi犑\\3B㩬劇䄑oŁ쨅孥멁ຖacA㖫借㞝vg싰샂㐜#譞⢤@k]鋰嘘䜾L熶塥_<\/⍾屈ﮊ_mY菹t뙺}Ox=w鮮4S1ꐩמּ'巑", + "㗓蟵ꂾe蠅匳(JP䗏෸\u0089耀왲": [{ + "ᤃ㵥韎뤽\r?挥O쯡⇔㞚3伖\u0005P⋪\"D궣QLn(⚘罩䩢Ŏv䤘尗뼤됛O淽鋋闚r崩a{4箙{煷m6〈": { + "l곺1L": { + "T'ਤ?砅|੬Km]䄩\"(࿶<\/6U爢䫈倔郴l2㴱^줣k'L浖L鰄Rp今鎗⒗C얨M훁㡧ΘX粜뫈N꤇輊㌻켑#㮮샶-䍗룲蠝癜㱐V>=\\I尬癤t=": 7648082845323511446, + "鋞EP:<\/_`ၧe混ㇹBd⯢㮂驋\\q碽饩跓྿ᴜ+j箿렏㗑yK毢宸p謹h䦹乕U媣\\炤": [[ + "3", + [ + true, + 3.4058271399411134E-20, + true, + "揀+憱f逮@먻BpW曉\u001a㣐⎊$n劈D枤㡞좾\u001aᛁ苔౩闝1B䷒Ṋ݋➐ꀞꐃ磍$t੤_:蘺⮼(#N", + 697483894874368636, + [ + "vᘯ锴)0訶}䳅⩚0O壱韈ߜ\u0018*U鍾䏖=䧉뽑单휻ID쿇嘗?ꌸῬ07", + -5.4858784319382006E18, + 7.5467775182251151E18, + -8911128589670029195, + -7531052386005780140, + null, + [ + null, + true, + [[{ + "1欯twG<\/Q:0怯押殃탷聫사<ỗꕧ蚨䡁nDꌕ\u001c녬~蓩鲃g儊>ꏡl㻿/⑷*챳6㻜W毤緛ﹺᨪ4\u0013뺚J髬e3쳸䘦伧?恪&{L掾p+꬜M䏊d娘6": { + "2p첼양棜h䜢﮶aQ*c扦v︥뮓kC寵횂S銩&ǝ{O*य़iH`U큅ࡓr䩕5ꄸ?`\\᧫?ᮼ?t〟崾훈k薐ì/iy꤃뵰z1<\/AQ#뿩8jJ1z@u䕥": 1.82135747285215155E18, + "ZdN &=d년ᅆ'쑏ⅉ:烋5&៏ᄂ汎来L㯄固{钧u\\㊏튚e摑&t嗄ꖄUb❌?m䴘熚9EW": [{ + "ଛ{i*a(": -8.0314147546006822E17, + "⫾ꃆY\u000e+W`௸ \"M뒶+\\뷐lKE}(NT킶Yj選篒쁶'jNQ硾(똡\\\"逌ⴍy? IRꜘ὞鄬﨧:M\\f⠋Cꚜ쫊ᚴNV^D䕗ㅖἔIao꿬C⍏8": [ + 287156137829026547, + { + "H丞N逕⯲": {"": { + "7-;枮阕梒9ᑄZ": [[[[ + null, + { + "": [[[[ + -7.365909561486078E-19, + 2948694324944243408, + null, + [ + true, + "荒\"并孷䂡쵼9o䀘F\u0002龬7⮹Wz%厖/*? a*R枈㌦됾g뒠䤈q딄㺿$쮸tᶎ릑弣^鏎<\/Y鷇驜L鿽<\/춋9Mᲆឨ^<\/庲3'l낢", + "c鮦\u001b두\\~?眾ಢu݆綑෪蘛轋◜gȃ<\/ⴃcpkDt誩܅\"Y", + [[ + null, + null, + [ + 3113744396744005402, + true, + "v(y", + { + "AQ幆h쾜O+꺷铀ꛉ練A蚗⼺螔j㌍3꽂楎䥯뎸먩?": null, + "蠗渗iz鱖w]擪E": 1.2927828494783804E-17, + "튷|䀭n*曎b✿~杤U]Gz鄭kW|㴚#㟗ഠ8u擨": [[ + true, + null, + null, + {"⾪壯톽g7?㥜ώQꑐ㦀恃㧽伓\\*᧰閖樧뢇赸N휶䎈pI氇镊maᬠ탷#X?A+kНM ༑᩟؝?5꧎鰜ṚY즫궔 =ঈ;ﳈ?*s|켦蜌wM笙莔": [ + null, + -3808207793125626469, + [ + -469910450345251234, + 7852761921290328872, + -2.7979740127017492E18, + 1.4458504352519893E-20, + true, + "㽙깹?먏䆢:䴎ۻg殠JBTU⇞}ꄹꗣi#I뵣鉍r혯~脀쏃#釯:场:䔁>䰮o'㼽HZ擓௧nd", + [ + 974441101787238751, + null, + -2.1647718292441327E-19, + 1.03602824249831488E18, + [ + null, + 1.0311977941822604E-17, + false, + true, + { + "": -3.7019778830816707E18, + "E峾恆茍6xLIm縂0n2视֯J-ᤜz+ᨣ跐mYD豍繹⹺䊓몓ﴀE(@詮(!Y膽#᎙2䟓섣A䈀㟎,囪QbK插wcG湎ꤧtG엝x⥏俎j'A一ᯥ뛙6ㅑ鬀": 8999803005418087004, + "よ殳\\zD⧅%Y泥簳Uꈩ*wRL{3#3FYHା[d岀䉯T稉駅䞘礄P:闈W怏ElB㤍喬赔bG䠼U଄Nw鰯闀楈ePsDꥷ꭬⊊": [ + 6.77723657904486E-20, + null, + [ + "ཚ_뷎꾑蹝q'㾱ꂓ钚蘞慵렜떆`ⴹ⎼櫯]J?[t9Ⓢ !컶躔I᮸uz>3a㠕i,錃L$氰텰@7녫W㸮?羧W뇧ꃞ,N鋮숪2ɼ콏┍䁲6", + "&y?뢶=킕올Za惻HZk>c\u20b58i?ꦶcfBv잉ET9j䡡", + "im珊Ճb칧校\\뼾쯀", + 9.555715121193197E-20, + true, + { + "<㫚v6腓㨭e1㕔&&V∌ᗈT奄5Lጥ>탤?튣瑦㳆ꉰ!(ᙪ㿬擇_n쌯IMΉ㕨␰櫈ᱷ5풔蟹&L.첽e鰷쯃劼﫭b#ﭶ퓀7뷄Wr㢈๧Tʴશ㶑澕鍍%": -1810142373373748101, + "fg晌o?߲ꗄ;>C>?=鑰監侯Kt굅": true, + "䫡蓺ꑷ]C蒹㦘\"1ః@呫\u0014NL䏾eg呮፳,r$裢k>/\\?ㄤᇰﻛ쉕1஥'Ċ\" \\_?쨔\"ʾr: 9S䘏禺ᪧꄂ㲄", + [[{ + "*硙^+E쌺I1䀖ju?:⦈Ꞓl๴竣迃xKC/饉:\fl\"XTFᄄ蟭,芢<\/骡軺띜hꏘ\u001f銿<棔햳▨(궆*=乥b8\\媦䷀뫝}닶ꇭ(Kej䤑M": [{ + "1Ꮼ?>옿I╅C<ގ?ꊌ冉SV5A㢊㶆z-๎玶绢2F뵨@㉌뀌o嶔f9-庒茪珓뷳4": null, + ";lᰳ": "CbB+肻a䄷苝*/볳+/4fq=㰁h6瘉샴4铢Y骐.⌖@哼猎㦞+'gꋸ㒕ߤ㞑(䶒跲ti⑴a硂#No볔", + "t?/jE幸YHT셵⩎K!Eq糦ꗣv刴w\"l$ο:=6:移": { + "z]鑪醊嫗J-Xm銌翁絨c里됏炙Ep㣋鏣똼嚌䀓GP﹖cmf4鹭T䅿꣭姧␸wy6ꦶ;S&(}ᎧKxᾂQ|t뻳k\"d6\"|Ml췆hwLt꼼4$&8Պ褵婶鯀9": {"嵃닢ᒯ'd᧫䳳#NXe3-붋鸿ଢ떓%dK\u0013䲎ꖍYV.裸R⍉rR3蟛\\:젯:南ĺLʆ넕>|텩鴷矔ꋅⒹ{t孶㓑4_": [ + true, + null, + [ + false, + "l怨콈lᏒ", + { + "0w䲏嬧-:`䉅쉇漧\\܂yㄨb%㽄j7ᦶ涶<": 3.7899452730383747E-19, + "ꯛTẀq纤q嶏V⿣?\"g}ი艹(쥯B T騠I=仵및X": {"KX6颠+&ᅃ^f畒y[": { + "H?뱜^?꤂-⦲1a㋞&ꍃ精Ii᤾챪咽쬘唂쫷<땡劈훫놡o㥂\\ KⴙD秼F氮[{'좴:례晰Iq+I쭥_T綺砸GO煝䟪ᚪ`↹l羉q쐼D꽁ᜅ훦: vUV": true, + "u^yﳍ0㱓#[y뜌앸ꊬL㷩?蕶蘾⻍KӼ": -7931695755102841701, + "䤬轉車>\u001c鴵惋\"$쯃྆⇻n뽀G氠S坪]ಲꨍ捇Qxኻ椕駔\\9ࣼ﫻읜磡煮뺪ᶚ볝l㕆t+sζ": [[[ + true, + false, + [ + null, + 3363739578828074923, + true, + { + "\"鸣詩 볰㑵gL㯦῅춝旫}ED辗ﮈI쀤-ꧤ|㠦Z\"娑ᕸ4爏騍㣐\"]쳝Af]茛⬻싦o蚁k䢯䩐菽3廇喑ޅ": 4.5017999150704666E17, + "TYႇ7ʠ值4챳唤~Zo&ݛ": false, + "`塄J袛㭆끺㳀N㺣`꽐嶥KﯝSVᶔ∲퀠獾N딂X\"ᤏhNﬨvI": {"\u20bb㭘I䖵䰼?sw䂷쇪](泒f\"~;꼪Fԝsᝦ": {"p,'ꉂ軿=A蚶?bƉ㏵䅰諬'LYKL6B깯⋩겦뎙(ᜭ\u0006噣d꾆㗼Z;䄝䚔cd<情@䞂3苼㸲U{)<6&ꩻ钛\u001au〷N숨囖愙j=BXW욕^x芜堏Ῑ爂뛷꒻t✘Q\b": [[ + "籛&ଃ䩹.ꃩ㦔\\C颫#暪&!勹ꇶ놽攺J堬镙~軌C'꾖䣹㮅岃ᙴ鵣", + 4.317829988264744E15, + 6.013585322002147E-20, + false, + true, + null, + null, + -3.084633632357326E-20, + false, + null, + { + "\"짫愔昻 X\"藣j\"\"먁ཅѻ㘤㬯0晲DU꟒㸃d벀윒l䦾c੻*3": null, + "谈Wm陧阦咟ฯ歖擓N喴㋐銭rCCnVࢥ^♼Ⅾ젲씗刊S༝+_t赔\\b䚍뉨ꬫ6펛cL䊘᜼<\/澤pF懽&H": [ + null, + { + "W\"HDUuΌ퀟M'P4࿰H똆ⰱﮯ<\/凐蘲\"C鴫ﭒж}ꭩ쥾t5yd诪ﮡ퍉ⴰ@?氐醳rj4I6Qt": 6.9090159359219891E17, + "絛ﳛ⺂": {"諰P㗮聦`ZQ?ꫦh*റcb⧱}埌茥h{棩렛툽o3钛5鮁l7Q榛6_g)ὄ\u0013kj뤬^爖eO4Ⱈ槞鉨ͺ订%qX0T썗嫷$?\\\"봅늆'%": [ + -2.348150870600346E-19, + [[ + true, + -6619392047819511778, + false, + [[ + -1.2929189982356161E-20, + 1.7417192219309838E-19, + {"?嵲2࿐2\u0001啑㷳c縯": [ + null, + [ + false, + true, + 2578060295690793218, + { + "?\"殃呎#㑑F": true, + "}F炊_殛oU헢兔Ꝉ,赭9703.B数gTz3⏬": { + "5&t3,햓Mݸᵣ㴵;꣫䩍↳#@뫷䠅+W-ࣇzᓃ鿕ಔ梭?T䮑ꥬ旴]u뫵막bB讍:왳둛lEh=숾鱠p咐$짏#?g⹷ᗊv㷵.斈u頻\u0018-G.": "뽙m-ouࣤ஫牷\"`Ksꕞ筼3HlȨvC堈\"I]㖡玎r먞#'W賜鴇k'c룼髋䆿飉㗆xg巤9;芔cጐ/ax䊨♢큓r吓㸫೼䢗da᩾\"]屣`", + ":M딪<䢥喠\u0013㖅x9蕐㑂XO]f*Q呰瞊吭VP@9,㨣 D\\穎vˤƩs㜂-曱唅L걬/롬j㈹EB8g<\/섩o渀\"u0y&룣": ">氍緩L/䕑돯Ꟙ蕞^aB뒣+0jK⪄瑨痜LXK^힦1qK{淚t츔X:Vm{2r獁B뾄H첚7氥?쉟䨗ꠂv팳圎踁齀\\", + "D彤5㢷Gꪻ[lㄆ@὜⓰絳[ଃ獽쮹☒[*0ꑚ㜳": 9022717159376231865, + "ҖaV銣tW+$魿\u20c3亜~뫡ᙰ禿쨽㏡fṼzE/h": "5臐㋇Ჯ쮺? 昨탰Wム밎#'\"崲钅U?幫뺀⍾@4kh>騧\\0ҾEV=爐͌U捀%ꉼ 㮋<{j]{R>:gԩL\u001c瀈锌ﯲﳡꚒ'⫿E4暍㌗뵉X\"H᝜", + "ᱚגּ;s醒}犍SἿ㦣&{T$jkB\\\tḮ앾䤹o<避(tW": "vb⯽䴪䮢@|)", + "⥒퐁껉%惀뗌+녣迺顀q條g⚯i⤭룐M琹j̈́⽜A": -8385214638503106917, + "逨ꊶZ<\/W⫟솪㎮ᘇb?ꠔi\"H㧺x෷韒Xꫨฟ|]窽\u001a熑}Agn?Mᶖa9韲4$3Ỵ^=쏍煤ፐ돷2䣃%鷠/eQ9頸쥎", + 2398360204813891033, + false, + 3.2658897259932633E-19, + null, + "?ꚃ8Nn㞷幵d䲳䱲뀙ꪛQ瑓鎴]䩋-鰾捡䳡??掊", + false, + -1309779089385483661, + "ᦲxu_/yecR.6芏.ᜇ過 ~", + -5658779764160586501, + "쒌:曠=l썜䢜wk#s蕚\"互㮉m䉤~0듐䋙#G;h숄옥顇෤勹(C7㢅雚㐯L⠅VV簅<", + null, + -4.664877097240962E18, + -4.1931322262828017E18, + { + ",": { + "v㮟麑䄠뤵g{M띮.\u001bzt뢜뵡0Ǥ龍떟Ᾰ怷ϓRT@Lꀌ樂U㏠⾕e扉|bJg(뵒㠶唺~ꂿ(땉x⻫싉쁊;%0鎻V(o\f,N鏊%nk郼螺": -1.73631993428376141E18, + "쟧摑繮Q@Rᕾ㭚㾣4隅待㓎3蒟": [ + 4971487283312058201, + 8973067552274458613, + { + "`a揙ᣗ\u0015iBo¸": 4.3236479112537999E18, + "HW&퉡ぁ圍Y?瑡Qy훍q!帰敏s舠㫸zꚗaS歲v`G株巷Jp6킼 (귶鍔⾏⡈>M汐㞍ቴ꙲dv@i㳓ᇆ?黍": [ + null, + 4997607199327183467, + "E㻎蠫ᐾ高䙟蘬洼旾﫠텛㇛?'M$㣒蔸=A_亀绉앭rN帮", + null, + [{ + "Eᑞ)8餧A5u&㗾q?": [ + -1.969987519306507E-19, + null, + [ + 3.42437673373841E-20, + true, + "e걷M墁\"割P␛퍧厀R䱜3ﻴO퓫r﹉⹊", + [ + -8164221302779285367, + [ + true, + null, + "爘y^-?蘞Ⲽꪓa␅ꍨ}I", + 1.4645984996724427E-19, + [{ + "tY좗⧑mrzﺝ㿥ⴖ᥷j諅\u0000q賋譁Ꞅ⮱S\nࡣB/큃굪3Zɑ复o<\/;롋": null, + "彟h浠_|V4䦭Dᙣ♞u쿻=삮㍦\u001e哀鬌": [{"6횣楠,qʎꗇ鎆빙]㱭R굋鈌%栲j分僅ペ䇰w폦p蛃N溈ꡐꏀ?@(GI뉬$ﮄ9誁ꓚ2e甸ڋ[䁺,\u0011\u001cࢃ=\\+衪䷨ᯕ鬸K": [[ + "ㅩ拏鈩勥\u000etgWVXs陂規p狵w퓼{뮵_i\u0002ퟑႢ⬐d6鋫F~챿搟\u0096䚼1ۼ칥0꣯儏=鋷牋ⅈꍞ龐", + -7283717290969427831, + true, + [ + 4911644391234541055, + { + "I鈒첽P릜朸W徨觘-Hᎄ퐟⓺>8kr1{겵䍃〛ᬡ̨O귑o䝕'쿡鉕p5": "fv粖RN瞖蛐a?q꤄\u001d⸥}'ꣴ犿ꦼ?뤋?鵆쥴덋䡫s矷̄?ඣ/;괱絢oWfV<\/\u202cC,㖦0䑾%n賹g&T;|lj_欂N4w", + "짨䠗;䌕u i+r๏0": [{"9䥁\\఩8\"馇z䇔<\/ႡY3e狚쐡\"ุ6ﰆZ遖c\"Ll:ꮾ疣<\/᭙O◌납୕湞9⡳Und㫜\u0018^4pj1;䧐儂䗷ୗ>@e톬": { + "a⑂F鋻Q螰'<퇽Q贝瀧{ᘪ,cP&~䮃Z?gI彃": [ + -1.69158726118025933E18, + [ + "궂z簽㔛㮨瘥⤜䛖Gℤ逆Y⪾j08Sn昞ꘔ캻禀鴚P謦b{ꓮmN靐Mᥙ5\"睏2냑I\u0011.L&=?6ᄠ뻷X鸌t刑\"#z)o꫚n쳟줋", + null, + 7517598198523963704, + "ኑQp襟`uᩄr方]*F48ꔵn俺ሙ9뇒", + null, + null, + 6645782462773449868, + 1219168146640438184, + null, + { + ")ယ넌竀Sd䰾zq⫣⏌ʥ\u0010ΐ' |磪&p牢蔑mV蘸૰짬꺵;K": [ + -7.539062290108008E-20, + [ + true, + false, + null, + true, + 6574577753576444630, + [[ + 1.2760162530699766E-19, + [ + null, + [ + "顊\\憎zXB,", + [{ + "㇆{CVC9-MN㜋ઘR눽#{h@ퟨ!鼚׼XOvXS\u0017ᝣ=cS+梽៲綆16s덽휐y屬?ᇳG2ᴭ\u00054쫖y룇nKcW̭炦s/鰘ᬽ?J|퓀髣n勌\u0010홠P>j": false, + "箴": [ + false, + "鍞j\"ꮾ*엇칬瘫xṬ⭽쩁䃳\"-⋵?ᦽ댎Ĝ": true, + "Pg帯佃籛n㔠⭹࠳뷏≻࿟3㞱!-쒾!}쭪䃕!籿n涻J5ਲ਼yvy;Rኂ%ᔡጀ裃;M⣼)쵂쑈": 1.80447711803435366E18, + "ꈑC⡂ᑆ㤉壂뎃Xub<\/쀆༈憓ق쨐ק\\": [ + 7706977185172797197, + {"": {"K╥踮砆NWࡆFy韣7ä밥{|紒︧䃀榫rᩛꦡTSy잺iH8}ퟴ,M?Ʂ勺ᴹ@T@~꾂=I㙕뾰_涀쑜嫴曣8IY?ҿo줫fऒ}\\S\"ᦨ뵼#nDX": { + "♘k6?଱癫d68?㽚乳䬳-V顷\u0005蝕?\u0018䞊V{邾zじl]雏k臤~ൖH뒐iꢥ]g?.G碄懺䔛pR$䅒X觨l봜A刊8R梒',}u邩퉕?;91Ea䈈믁G⊶芔h袪&廣㺄j;㡏綽\u001bN頸쳘橆": -2272208444812560733, + "拑Wﵚj鵼駳Oࣿ)#㾅顂N傓纝y僱栜'Bꐍ-!KF*ꭇK¦?䈴^:啤wG逭w᧯": "xᣱmYe1ۏ@霄F$ě꧘푫O䤕퀐Pq52憬ꀜ兴㑗ᡚ?L鷝ퟐ뭐zJꑙ}╆ᅨJB]\"袌㺲u8䯆f", + "꿽၅㔂긱Ǧ?SI": -1669030251960539193, + "쇝ɨ`!葎>瞺瘡驷錶❤ﻮ酜=": -6961311505642101651, + "?f7♄꫄Jᡔ훮e읇퍾፣䭴KhखT;Qty}O\\|뫁IῒNe(5惁ꥶㆷY9ﮡ\\ oy⭖-䆩婁m#x봉>Y鈕E疣s驇↙ᙰm<": {"퉻:dꂁ&efᅫ쫢[\"돈늖꺙|Ô剐1͖-K:ʚ᭕/;쏖㷛]I痐职4gZ4⍜kเꛘZ⥺\\Bʫᇩ鄨魢弞&幟ᓮ2̊盜", + -9006004849098116748, + -3118404930403695681, + { + "_彃Y艘-\"Xx㤩㳷瑃?%2䐡鵛o귵옔夘v*탋职&㳈챗|O钧": [ + false, + "daꧺdᗹ羞쯧H㍤鄳頳<型孒ン냆㹀f4㹰\u000f|C*ሟ鰠(O<ꨭ峹ipຠ*y೧4VQ蔔hV淬{?ᵌEfrI_", + "j;ꗣ밷邍副]ᗓ", + -4299029053086432759, + -5610837526958786727, + [ + null, + [ + -1.3958390678662759E-19, + { + "lh좈T_믝Y\"伨\u001cꔌG爔겕ꫳ晚踍⿻읐T䯎]~e#฽燇\"5hٔ嶰`泯r;ᗜ쮪Q):/t筑,榄&5懶뎫狝(": [{ + "2ፁⓛ]r3C攟וּ9賵s⛔6'ஂ|\"ⵈ鶆䐹禝3\"痰ࢤ霏䵩옆䌀?栕r7O簂Isd?K᫜`^讶}z8?z얰T:X倫⨎ꑹ": -6731128077618251511, + "|︦僰~m漿햭\\Y1'Vvخ굇ቍ챢c趖": [null] + }], + "虌魿閆5⛔煊뎰㞤ᗴꥰF䮥蘦䂪樳-K᝷-(^\u20dd_": 2.11318679791770592E17 + } + ] + ] + ]}, + "묗E䀳㧯᳀逞GMc\b墹㓄끖Ơ&U??펌鑍 媋k))ᄊ": null, + "묥7콽벼諌J_DɯﮪM殴䣏,煚ྼ`Y:씧<\/⩫%yf䦀!1Ჶk춎Q米W∠WC跉鬽*ᛱi㴕L꘻ꀏ쓪\"_g鿄'#t⽙?,Wg㥖|D鑆e⥏쪸僬h鯔咼ඡ;4TK聎졠嫞" + } + ] + ] + } + ] + ] + ]}} + } + ]} + }, + "뿋뀾淣截䔲踀&XJ펖꙯^Xb訅ꫥgᬐ>棟S\"혧騾밫겁7-": "擹8C憎W\"쵮yR뢩浗絆䠣簿9䏈引Wcy䤶孖ꯥ;퐌]輩䍐3@{叝 뽸0ᡈ쵡Ⲇ\u001dL匁꧐2F~ݕ㪂@W^靽L襒ᦘ~沦zZ棸!꒲栬R" + } + ] + ], + "Z:덃൛5Iz찇䅄駠㭧蓡K1": "e8᧤좱U%?ⵇ䯿鿝\u0013縮R∱骒EO\u000fg?幤@֗퉙vU`", + "䐃쪈埽້=Ij,쭗쓇చ": false + }]}} + ] + } + ]} + } + ] + ] + ], + "咰긖VM]᝼6䓑쇎琺etDҌ?㞏ꩄ퇫밉gj8蠃\"⩐5䛹1ࣚ㵪": "ക蹊?⎲⧘⾚̀I#\"䈈⦞돷`wo窭戕෱휾䃼)앷嵃꾞稧,Ⴆ윧9S?೗EMk3Მ3+e{⹔Te驨7䵒?타Ulg悳o43" + } + ], + "zQᤚ纂땺6#ٽ﹧v￿#ࠫ휊冟蹧텈ꃊʆ?&a䥯De潝|쿓pt瓞㭻啹^盚2Ꝋf醪,얏T窧\\Di䕎谄nn父ꋊE": -2914269627845628872, + "䉩跐|㨻ᷢ㝉B{蓧瞸`I!℄욃힕#ೲᙾ竛ᔺCjk췒늕貭词\u0017署?W딚%(pꍁ⤼띳^=on뺲l䆼bzrﳨ[&j狸䠠=ᜑꦦ\u2061յnj=牲攑)M\\龏": false, + "뎕y絬᫡⥮Ϙᯑ㌔/NF*˓.,QEzvK!Iwz?|쥾\"ꩻL꼗Bꔧ賴緜s뉣隤茛>ロ?(?^`>冺飒=噸泥⺭Ᲊ婓鎔븜z^坷裮êⓅ໗jM7ﶕ找\\O": 1.376745434746303E-19 + }, + "䐛r滖w㏤,|Nዜ": false + } + ]], + "@꿙?薕尬 gd晆(띄5躕ﻫS蔺4)떒錸瓍?~": 1665108992286702624, + "w믍nᏠ=`঺ᅥC>'從됐槷䤝眷螄㎻揰扰XᅧC贽uჍ낟jKD03T!lDV쀉Ӊy뢖,袛!终캨G?鉮Q)⑗1쾅庅O4ꁉH7?d\u0010蠈줘월ސ粯Q!낇껉6텝|{": null, + "~˷jg쿤촖쉯y": -5.5527605669177098E18, + "펅Wᶺzꐆと푭e?4j仪열[D<鈑皶婆䵽ehS?袪;HꍨM뗎ば[(嗏M3q퍟g4y╸鰧茀[Bi盤~﫝唎鋆彺⦊q?B4쉓癚O洙킋툈䶯_?ퟲ": null + } + ] + ]] + ]], + "꟱Ԕ㍤7曁聯ಃ錐V䷰?v㪃૦~K\"$%请|ꇹn\"k䫛㏨鲨\u2023䄢\u0004[︊VJ?䶟ាꮈ䗱=깘U빩": -4863152493797013264 + } + ]}]} + ] + }}} + ], + "쏷쐲۹퉃~aE唙a챑,9㮹gLHd'䔏|킗㍞䎥&KZYT맵7䥺Nⱳ同莞鿧w\\༌疣n/+ꎥU\"封랾○ퟙAJᭌ?9䛝$?驔9讐짘魡T֯c藳`虉C읇쐦T" + } + ], + "谶개gTR￐>ၵ͚dt晑䉇陏滺}9㉸P漄": -3350307268584339381 + }] + ] + ] + ]] + ] + ], + "0y꟭馋X뱔瑇:䌚￐廿jg-懲鸭䷭垤㒬茭u賚찶ಽ+\\mT땱\u20821殑㐄J쩩䭛ꬿNS潔*d\\X,壠뒦e殟%LxG9:摸": 3737064585881894882, + "풵O^-⧧ⅶvѪ8廸鉵㈉ר↝Q㿴뺟EႳvNM:磇>w/៻唎뷭୥!냹D䯙i뵱貁C#⼉NH6`柴ʗ#\\!2䂗Ⱨf?諳.P덈-返I꘶6?8ꐘ": -8934657287877777844, + "溎-蘍寃i诖ര\"汵\"\ftl,?d⼡쾪⺋h匱[,෩I8MҧF{k瓿PA'橸ꩯ綷퉲翓": null + } + ] + ], + "ោ係؁<元": 1.7926963090826924E-18 + }}] + } + ] + ]]}] + }] + ] + ] + ] + ], + "ጩV<\"ڸsOᤘ": 2.0527167903723048E-19 + }] + ]} + ] + ]], + "∳㙰3젴p᧗䱙?`yZA8Ez0,^ᙛ4_0븢\u001ft:~䎼s.bb룦明yNP8弆C偯;⪾짍'蕴뮛": -6976654157771105701, + "큵ꦀ\\㇑:nv+뒤燻䀪ﴣ﷍9ᚈ኷K㚊誦撪䚛,ꮪxሲ쳊\u0005HSf?asg昱dqꬌVꙇ㼺'k*'㈈": -5.937042203633044E-20 + } + ] + }], + "?}\u20e0],s嶳菋@#2u쒴sQS䩗=ꥮ;烌,|ꘔ䘆": "ᅩ영N璠kZ먕眻?2ቲ芋眑D륟渂⸑ﴃIRE]啗`K'" + }}, + "쨀jmV賂ﰊ姐䂦玞㬙ᏪM᪟Վ씜~`uOn*ॠ8\u000ef6??\\@/?9見d筜ﳋB|S䝬葫㽁o": true + }, + "즛ꄤ酳艚␂㺘봿㎨iG৕ࡿ?1\"䘓您\u001fSኝ⺿溏zៀ뻤B\u0019?윐a䳵᭱䉺膷d:<\/": 3935553551038864272 + } + ] + ]} + ]] + ]] + ]} + } + ] + } + ]]}}, + "᥺3h↛!ꋰy\"攜(ெl䪕oUkc1A㘞ᡲ촾ᣫ<\/䒌E㛝潨i{v?W౾H\\RჅpz蝬R脾;v:碽✘↯삞鷱o㸧瑠jcmK7㶧뾥찲n": true, + "ⶸ?x䊺⬝-䰅≁!e쩆2ꎿ准G踌XXᩯ1߁}0?.헀Z馟;稄\baDꟹ{-寪⚈ꉷ鮸_L7ƽᾚ<\u001bጨA䧆송뇵⨔\\礍뗔d设룱㶉cq{HyぱR㥽吢ſtp": -7985372423148569301, + "緫#콮IB6<\/=5Eh礹\t8럭@饹韠r㰛斣$甝LV췐a갵'请o0g:^": "䔨(.", + "띳℡圤pン௄ĝ倧訜B쁟G䙔\"Sb⓮;$$▏S1J뢙SF|赡g*\"Vu䲌y": "䪈&틐),\\kT鬜1풥;뷴'Zေ䩹@J鞽NぼM?坥eWb6榀ƩZڮ淽⺞삳煳xჿ絯8eⶍ羷V}ჿ쎱䄫R뱃9Z>'\u20f1ⓕ䏜齮" + } + ] + ]]] + }} + } + ] + ]}, + "펮b.h粔폯2npX詫g錰鷇㇒<쐙S値bBi@?镬矉`剔}c2壧ଭfhY깨R()痩⺃a\\⍔?M&ﯟ<劜꺄멊ᄟA\"_=": null + }, + "~潹Rqn榢㆓aR鬨侅?䜑亡V_翅㭔(䓷w劸ၳDp䀅<\/ﰎ鶊m䵱팱긽ꆘ긓准D3掱;o:_ќ)껚콥8곤d矦8nP倥ꃸI": null, + "뾎/Q㣩㫸벯➡㠦◕挮a鶧⋓偼\u00001뱓fm覞n?㛅\"": 2.8515592202045408E17 + }], + ",": -5426918750465854828, + "2櫫@0柡g䢻/gꆑ6演&D稒肩Y?艘/놘p{f투`飷ᒉ챻돎<늛䘍ﴡ줰쫄": false, + "8(鸑嵀⵹ퟡ<9㣎Tߗ┘d슒ل蘯&㠦뮮eࠍk砝g 엻": false, + "d-\u208b?0ﳮ嵙'(J`蔿d^踅⤔榥\\J⵲v7": 6.8002426206715341E17, + "ཎ耰큓ꐕ㱷\u0013y=詽I\"盈xm{0쾽倻䉚ષso#鰑/8㸴짯%ꀄ떸b츟*\\鲷礬ZQ兩?np㋄椂榨kc᡹醅3": false, + "싊j20": false + }]] + ]], + "俛\u0017n緽Tu뫉蜍鼟烬.ꭠIⰓ\"Ἀ᜾uC쎆J@古%ꛍm뻨ᾀ画蛐휃T:錖㑸ዚ9죡$": true + } + ] + ], + "㍵⇘ꦖ辈s}㱮慀밒s`\"㞟j:`i픻Z섫^諎0Ok{켿歁෣胰a2﨤[탳뚬쎼嫭뉮m": 409440660915023105, + "w墄#*ᢄ峠밮jLa`ㆪ꺊漓Lで끎!Agk'ꁛ뢃㯐岬D#㒦": false, + "ଦPGI䕺L몥罭ꃑ궩﮶#⮈ᢓӢ䚬p7웼臧%~S菠␌힀6&t䳙y㪘냏\\*;鉏ᅧ鿵'嗕pa\"oL쇿꬈Cg": "㶽1灸D⟸䴅ᆤ뉎﷛渤csx 䝔цꬃ锚捬?ຽ+x~꘩uI࡞\u0007栲5呚ẓem?袝\")=㥴䨃pac!/揎Y", + "ᷱo\\||뎂몷r篙|#X䦜I#딌媸픕叞RD斳X4t⯩夬=[뭲r=绥jh뷱츝⪘%]⚋܈㖴スH텹m(WO曝劉0~K3c柢Ր㏉着逳~": false, + "煽_qb[첑\\륌wE❽ZtCNﭝ+餌ᕜOꛭ": "{ﳾ쉌&s惧ᭁⵆ3䢫;䨞팑꒪흘褀࢖Q䠿V5뭀䎂澻%받u5텸oA⮥U㎦;B䳌wz䕙$ឿ\\௅婺돵⪾퐆\\`Kyौꋟ._\u0006L챯l뇠Hi䧈偒5", + "艊佁ࣃ롇䱠爬!*;⨣捎慓q靓|儑ᨋL+迥=6㒺딉6弄3辅J-㕎뛄듘SG㆛(\noAzQꝱ䰩X*ぢO퀌%펠낌mo틮a^<\/F&_눊ᾉ㨦ы4\"8H": 2974648459619059400, + "鬙@뎣䫳ၮ끡?){y?5K;TA*k溱䫜J汃ꂯ싔썍\u001dA}룖(<\/^,": false, + "몏@QꋦFꊩᒐ뎶lXl垨4^郣|ꮇ;䝴ᝓ}쵲z珖": null + } + ]]]], + ":_=닧弗D䙋暨鏛. 㱻붘䂍J儒&ZK/녩䪜r囁⽯D喠죥7⹌䪥c\u001a\u2076￞妈朹oLk菮F౟覛쐧㮏7T;}蛙2{9\"崓bB<\/⡷룀;즮鿹)丒툃୤뷠5W⊢嶜(fb뭳갣": "E{响1WM" + }}, + "䘨tjJ驳豨?y輊M*᳑梵瞻઻ofQG瑮e": 2.222802939724948E-19, + "䮴=❑➶T෋w䞜\"垦ꃼUt\u001dx;B$뵣䙶E↌艣ᡥ!᧟;䱀[䔯k쬃`੍8饙른熏'2_'袻tGf蒭J땟as꯳╖&啒zWࡇᒫYSᏬ\u0014ℑ첥鈤|cG~Pᓮ\">\"": "ႆl\f7V儊㦬nHꄬꨧC{쐢~C⮃⛓嶦vꄎ1w鰠嘩뿠魄&\"_qMⵖ釔녮ꝇ 㝚{糍J哋 cv?-jkﻯྌ鹑L舟r", + "龧葆yB✱H盋夔ﶉ?n*0(": "ꧣኆ㢓氥qZZ酒ຜ)鮢樛)X䣆gTSґG텞k.J圬疝롫쯭z L:\\ྤ@w炋塜쿖ᾳy뢀䶃뱝N䥨㚔勇겁#p", + "도畎Q娡\"@S/뼋:䵏!P衅촚fVHQs✜ᐫi㻑殡B䜇%믚k*U#濨낄~": "ꍟዕ쳸ꍈ敋&l妏\u0005憡멗瘌uPgᅪm<\/To쯬锩h뒓k" + } + ] + }], + "墥홞r绚<\/⸹ⰃB}<躅\\Y;๑@䔸>韫䜲뱀X뗩鿥쩗SI%ﴞ㳕䛇?<\/\u00018x\\&侂9鋙a[LR㋭W胕)⡿8㞙0JF,}?허d1cDMᐃ␛鄝ⱕ%X)!XQ": "ⳍꗳ=橇a;3t⦾꼑仈ူaᚯ⯋ꕃAs鴷N⍕_䎃ꙎAz\u0016䯷\\<࿫>8q{}キ?ᣰ}'0ᴕ펓B┦lF#趤厃T?㕊#撹圂䆲" + }, + "܋닐龫論c웑": false, + "ㇿ/q\"6-co髨휝C큦#\u001b4~?3䐹E삇<<": 7.600917488140322E-20, + "䁝E6?㣖ꃁ间t祗*鑠{ḣV(浾h逇큞=W?ૉ?nꇽ8ꅉຉj으쮺@Ꚅ㰤u]Oyr": "v≁᫸_*όAඤԆl)ۓᦇQ}폠z༏q滚", + "ソ᥊/넺I": true + }]] + ] + ] + ] + ]] + }, + "䭑Ik攑\u0002QV烄:芩.麑㟴㘨≕": true, + "坄꿕C쇻풉~崍%碼\\8\"䬦꣙": null, + "欌L圬䅘Y8c(♺2?ON}o椳s宥2䉀eJ%闹r冁O^K諭%凞⺉⡻,掜?$ꥉ?略焕찳㯊艼誜4?\"﯎<゛XፈINT:詓 +": -1.0750456770694562E-19, + "獒àc뜭싼ﺳ뎤K`]p隨LtE": null, + "甙8䵊神EIꩤ鐯ᢀ,ﵮU䝑u疒ử驺䚿≚ഋ梶秓F`覤譐#짾蔀묊4<媍쬦靪_Yzgcࡶ4k紥`kc[Lﮗ簐*I瀑[⾰L殽鑥_mGȠ<\/|囹灠g桰iri": true, + "챓ꖙꟻ좝菇ou,嗠0\\jK핻뜠qwQ?ഩ㼕3Y彦b\u009bJ榶N棨f?됦鏖綃6鳵M[OE봨u햏.Ꮁ癜蟳뽲ꩌ뻾rM豈R嗀羫 uDꎚ%": null + }, + "V傜2<": 7175127699521359521 + }], + "铫aG切<\/\"ী⊆e<^g࢛)D顝nאַ饼\u008c猪繩嵿ﱚCꡬ㻊g엺A엦\u000f暿_f꿤볝㦕桦`蒦䎔j甬%岝rj 糏": "䚢偎눴Au<4箞7礦Iﱔ坠eȧ䪸u䵁p|逹$嗫쨘ꖾ﷐!胠z寓팢^㨔|u8Nሇe텔ꅦ抷]،鹎㳁#༔繁 ", + "낂乕ꃻ볨ϱ-ꇋ㖍fs⿫)zꜦ/K?솞♞ꑌ宭hJ᤭瑥Fu": false, + "쟰ぜ魛G\u0003u?`㾕ℾ㣭5螠烶這趩ꖢ:@咕ꐶx뒘느m䰨b痃렐0鳊喵熬딃$摉_~7*ⱦ녯1錾GKhJ惎秴6'H妈Tᧅ窹㺒疄矤铟wላ": null, + "쯆q4!3錕㲏ⵆ㇛꘷Z瑩뭆\\◪NH\u001d\\㽰U~㯶<\"쑣낞3ᵤ'峉eꢬ;鬹o꣒木X*長PXᘱu\"䠹n惞": null, + "ᅸ祊\"&ꥴCjࢼ﴿?䡉`U效5殼㮞V昽ꏪ#ﺸ\\&t6x꠹盥꣰a[\u001aꪍSpe鎿蠹": -1.1564713893659811E-19 + } + ]] + ] + ] + ], + "羵䥳H,6ⱎ겾|@t\"#햊1|稃 섭)띜=뻔ꡜ???櫎~*ῡ꫌/繣ﻠq": null + } + ]} + ]}, + "츤": false + }}, + "s": 3.7339341963399598E18 + } + ], + "N,I?1+㢓|ࣱ嶃쩥V2\u0012(4EE虪朶$|w颇v步": "~읢~_,Mzr㐫YB溓E淚\"ⅹ䈔ᏺ抙 b,nt5V㐒J檶ꏨ⻔?", + "Q껑ꡡ}$넎qH煔惍/ez^!ẳF댙䝌馻剁8": "梲;yt钰$i冄}AL%a j뜐奷걳뚾d꿽*ሬuDY3?뮟鼯뮟w㍪틱V", + "o{Q/K O胟㍏zUdꀐm&⨺J舕⾏魸訟㌥[T籨櫉唐킝 aṭ뱫촙莛>碶覆⧬짙쭰ׯdAiH໥벤퐥_恸[ 0e:죃TC弼荎뵁DA:w唵ꣁ": null, + "὏樎䵮軧|?౗aWH쩃1 ꅭsu": null + } + ] + }, + "勂\\&m鰈J釮=Ⲽ鳋+䂡郑": null, + "殣b綊倶5㥗惢⳷萢ᑀ䬄镧M^ﱴ3⣢翣n櫻1㨵}ኯ뗙顖Z.Q➷ꮨ뗇\u0004": "ꔙ䁼>n^[GीA䨟AM琢ᒊS쨲w?d㶣젊嘶纝麓+愣a%気ྞSc됓ᔘ:8bM7Xd8㶑臌]Ꙥ0ꐭ쒙䫣挵C薽Dfⵃ떼᷸", + "?紡.셪_෨j\u0013Ox┠$Xᶨ-ᅇo薹-}軫;y毝㪜K㣁?.EV쮱4둽⛻䤜'2盡\u001f60(|e쐰㼎ᦀ㒧-$l@ﻑ坳\u0003䭱响巗WFo5c㧆T턁Y맸♤(": -2.50917882560589088E17 + }} + ], + "侸\\릩.᳠뎠狣살cs项䭩畳H1s瀉븇19?.w骴崖㤊h痠볭㞳㞳䁮Ql怠㦵": "@䟴-=7f", + "鹟1x௢+d ;vi䭴FSDS\u0004hꎹ㚍?⒍⦏ў6u,扩@됷Su)Pag휛TᒗV痩!瞏釀ꖞ蘥&ೞ蘐ꭰꞇᝎ": "ah懱Ժ&\u20f7䵅♎඀䞧鿪굛ౕ湚粎蚵ᯋ幌YOE)५襦㊝Y*^\"R+ඈ咷蝶9ꥂ榨艦멎헦閝돶v좛咊E)K㓷ྭr", + "搆q쮦4綱켙셁.f4<\/g<籽늷?#蚴픘:fF\u00051㹉뀭.ᰖ풎f֦Hv蔎㧤.!䭽=鞽]음H:?\"-4": 8.740133984938656E-20 + }]} + } + ], + "tVKn딩꘥⊾蹓᤹{\u0003lR꼽ᄲQFᅏ傅ﱋ猢⤊ᔁ,E㓒秤nTතv`♛I\u0000]꫔ṞD\"麵c踝杰X&濿또꣹깳౥葂鿎\\aꡨ?": 3900062609292104525 + } + ], + "ਉ샒⊩Lu@S䧰^g": -1.1487677090371648E18, + "⎢k⑊꬗yᏫ7^err糎Dt\u000bJ礯확ㆍ沑サꋽe赔㝢^J\u0004笲㿋idra剰-᪉C錇/Ĝ䂾ညS지?~콮gR敉⬹'䧭": 1901472137232418266, + "灗k䶥:?촽贍쓉꓈㒸g獘[뵎\\胕?\u0014_榙p.j稶,$`糉妋0>Fᡰly㘽$?": "]ꙛO赎&#㠃돱剳\"<◆>0誉齐_|z|裵씪>ᐌ㼍\"Z[琕}O?G뚇諦cs⠜撺5cu痑U圲\u001c?鴴計l춥/╓哼䄗茏ꮅ뫈댽A돌롖뤫V窗讬sHd&\nOi;_u" + } + ], + "Uﺗ\\Y\\梷䄬~\u0002": null, + "k\"Y磓ᗔ휎@U冈<\/w컑)[": false, + "曏J蝷⌻덦\u001f㙳s꥓⍟邫P늮쥄c∬ྡྷ舆렮칤Z趣5콡넛A쳨\\뀙骫(棻.*&輛LiIfi{@EA婳KᬰTXT": -4.3088230431977587E17 + }]} + ] + ], + "곃㲧<\/dఓꂟs其ࡧ&N葶=?c㠤Ჴ'횠숄臼#\u001a~": false + } + ] + ]}] + }] + }} + ], + "2f`⽰E쵟>J笂裭!〛觬囀ۺ쟰#桊l鹛ⲋ|RA_Vx፭gE됓h﵀mfỐ|?juTU档[d⢼⺻p濚7E峿": 5613688852456817133 + }, + "濘끶g忮7㏵殬W팕Q曁 뫰)惃廊5%-蹚zYZ樭ﴷQ锘쯤崫gg": true, + "絥ᇑ⦏쒓븣爚H.㗊߄o蘵貆ꂚ(쎔O᥉ﮓ]姨Wꁓ!RMA|o퉢THx轮7M껁U즨'i뾘舯o": "跥f꜃?" + }} + ], + "鷰鹮K-9k;ﰰ?_ݦѷ-ꅣ䩨Zꥱ\"mꠟ屎/콑Y╘2&鸞脇㏢ꀇ࠺ⰼ拾喭틮L꽩bt俸墶 [l/웄\"꾦\u20d3iও-&+\u000fQ+໱뵞": -1.296494662286671E-19 + }, + "HX੹/⨇୕붷Uﮘ旧\\쾜͔3l鄈磣糂̖䟎Eᐳw橖b῀_딕hu葰窳闹вU颵|染H죶.fP䗮:j䫢\\b뎖i燕ꜚG⮠W-≚뉗l趕": "ଊ칭Oa᡺$IV㷧L\u0019脴셀붿餲햪$迳向쐯켂PqfT\" ?I屉鴼쿕@硙z^鏕㊵M}㚛T젣쓌-W⩐-g%⺵<뮱~빅╴瑿浂脬\u0005왦燲4Ⴭb|D堧 <\/oEQh", + "䘶#㥘੐캔f巋ἡAJ䢚쭈ࣨ뫒*mᇊK,ࣺAꑱ\u000bR<\/A\"1a6鵌㯀bh곿w(\"$ꘁ*rಐ趣.d࿩k/抶면䒎9W⊃9": "漩b挋Sw藎\u0000", + "畀e㨼mK꙼HglKb,\"'䤜": null + }]}] + ] + ] + }] + ]} + ] + ]} + ], + "歙>駿ꣂ숰Q`J΋方樛(d鱾뼣(뫖턭\u20f9lচ9歌8o]8윶l얶?镖G摄탗6폋폵+g:䱫홊<멀뀿/س|ꭺs걐跶稚W々c㫣⎖": "㣮蔊깚Cꓔ舊|XRf遻㆚︆'쾉췝\\&言", + "殭\"cށɨꝙ䞘:嬮e潽Y펪㳅/\"O@ࠗ겴]췖YǞ(t>R\"N?梳LD恭=n氯T豰2R諸#N}*灧4}㶊G䍣b얚": null, + "襞<\/啧 B|싞W瓇)6簭鼡艆lN쩝`|펭佡\\間邝[z릶&쭟愱ꅅ\\T᰽1鯯偐栈4̸s윜R7⒝/똽?치X": "⏊躖Cﱰ2Qẫ脐&இ?%냝悊", + ",鰧偵셣싹xᎹ힨᯳EṬH㹖9": -4604276727380542356 + } + } + ]]]], + "웺㚑xs}q䭵䪠馯8?LB犯zK'os䚛HZ\"L?셎s^㿧㴘Cv2": null + }] + ] + ] + ], + "Kd2Kv+|z": 7367845130646124107, + "ᦂⶨ?ᝢ 祂些ഷ牢㋇操\"腭䙾㖪\\(y4cE뽺ㆷ쫺ᔖ%zfۻ$ў1柦,㶢9r漢": -3.133230960444846E-20, + "琘M焀q%㢟f鸯O⣏蓑맕鯊$O噷|)z褫^㢦⠮ꚯ꫞`毕1qꢚ{ĭ䎀বώT\"뱘3G൴?^^of": null + } + ], + "a8V᯺?:ﺃ/8ꉿBq|9啓댚;*i2": null, + "cpT瀇H珰Ừpೃi鎪Rr␣숬-鹸ҩ䠚z脚цGoN8入y%趌I┽2ឪЀiJNcN)槣/▟6S숆牟\"箑X僛G殱娇葱T%杻:J諹昰qV쨰": 8331037591040855245 + }], + "G5ᩜ䄗巢껳": true + } + }, + "Ồ巢ゕ@_譙A`碫鄐㡥砄㠓(^K": "?܃B혢▦@犑ὺD~T⧁|醁;o=J牌9냚⢽㨘{4觍蚔9#$∺\u0016p囅\\3Xk阖⪚\"UzA穕롬✎➁㭒춺C㣌ဉ\"2瓑员ᅽꝶ뫍}꽚ꞇ鶂舟彺]ꍽJC蝧銉", + "␆Ě膝\"b-퉐ACR言J謈53~V튥x䜢?ꃽɄY뮩ꚜ": "K/↾e萃}]Bs⾿q룅鷦-膋?m+死^魊镲6", + "粡霦c枋AHퟁo礼Ke?qWcA趸㡔ꂏ?\u000e춂8iতᦜ婪\u0015㢼nﵿꍻ!ᐴ関\u001d5j㨻gfῩUK5Ju丝tかTI'?㓏t>⼟o a>i}ᰗ;뤕ܝ": false, + "ꄮ匴껢ꂰ涽+䜨B蛹H䛓-k蕞fu7kL谖,'涃V~챳逋穞cT\"vQ쓕ObaCRQ㓡Ⲯ?轭⫦輢墳?vA餽=h䮇킵n폲퉅喙?\"'1疬V嬗Qd灗'Lự": "6v!s믁㭟㣯獃!磸餠ቂh0C뿯봗F鷭gꖶ~コkK<ᦈTt\\跓w㭣횋钘ᆹ듡䑚W䟾X'ꅔ4FL勉Vܴ邨y)2'〚쭉⽵-鞣E,Q.?块", + "?(˧쩯@崟吋歄K": null + }, + "Gc럃녧>?2DYI鴿\\륨)澔0ᔬlx'觔7젘⤡縷螩%Sv׫묈/]↱&S h\u0006歋ᑛxi̘}ひY蔯_醨鯘煑橾8?䵎쨋z儬ꁏ*@츾:": null + } + } + } + ] + ] + ]} + }, + "HO츧G": 3.694949578823609E17, + "QC\u0012(翻曇Tf㷟bGBJ옉53\\嚇ᛎD/\u001b夾၉4\"핀@祎)쫆yD\"i먎Vn㿿V1W᨝䶀": -6150931500380982286, + "Z㓮P翸鍱鉼K䋞꘺튿⭁Y": -7704503411315138850, + "]모开ꬖP븣c霤<[3aΠ\"黁䖖䰑뮋ꤦ秽∼㑷冹T+YUt\"싳F↭䖏&鋌": -2.7231911483181824E18, + "tꎖ": -4.9517948741799555E-19, + "䋘즊.⬅IꬃۣQ챢ꄑ黐|f?C⾺|兕읯sC鬸섾整腨솷V": "旆柩l쪦sᖸMy㦅울썉瘗㎜檵9ꍂ駓ૉᚿ/u3씅徐拉[Z䞸ࡗ1ꆱ&Q풘?ǂ8\u0011BCDY2볨;鸏": null, + "幫 n煥s쁇펇 왊-$C\"衝:\u0014㣯舼.3뙗Yl⋇\"K迎멎[꽵s}9鉳UK8쐥\"掄㹖h㙈!얄સ?Ꜳ봺R伕UTD媚I䜘W鏨蔮": -4.150842714188901E-17, + "ﺯ^㄄\b죵@fྉkf颡팋Ꞧ{/Pm0V둳⻿/落韒ꊔᚬ@5螺G\\咸a谆⊪ቧ慷绖?财(鷇u錝F=r၍橢ឳn:^iᴵtD볠覅N赴": null + }] + }] + } + ] + ]} + ]}, + "謯?w厓奰T李헗聝ឍ貖o⪇弒L!캶$ᆅ": -4299324168507841322, + "뺊奉_垐浸延몏孄Z舰2i$q붿좾껇d▵餏\"v暜Ҭ섁m￴g>": -1.60911932510533427E18 + } + ] + } + ] + ]], + "퉝꺔㠦楶Pꅱ": 7517896876489142899, + "": false + } + ]}, + "是u&I狻餼|谖j\"7c됮sסּ-踳鉷`䣷쉄_A艣鳞凃*m⯾☦椿q㎭N溔铉tlㆈ^": 1.93547720203604352E18, + "kⲨ\\%vr#\u000bⒺY\\t<\/3﬌R訤='﹠8蝤Ꞵ렴曔r": false + } + ]}, + "阨{c?C\u001d~K?鎌Ԭ8烫#뙣P초遗t㭱E­돒䆺}甗[R*1!\\~h㕅᰺@<9JꏏષI䳖栭6綘걹ᅩM\"▯是∔v鬽顭⋊譬": "운ﶁK敂(欖C취پ℄爦賾" + } + }} + }], + "鷨赼鸙+\\䭣t圙ڹx᜾ČN<\/踘\"S_맶a鷺漇T彚⎲i㈥LT-xA캔$\u001cUH=a0츺l릦": "溣㣂0濕=鉵氬駘>Pꌢpb솇쬤h힊줎獪㪬CrQ矠a&脍꼬爼M茴/΅\u0017弝轼y#Ꞡc6둴=?R崏뷠麖w?" + }, + "閕ᘜ]CT)䵞l9z'xZF{:ؐI/躅匽졁:䟇AGF૸\u001cퟗ9)駬慟ꡒꆒRS״툋A<>\u0010\"ꂔ炃7g덚E৏bꅰ輤]o㱏_뷕ܘ暂\"u": "芢+U^+㢩^鱆8*1鈶鮀\u0002뺰9⬳ꪮlL䃣괟,G8\u20a8DF㉪錖0ㄤ瓶8Nଷd?眡GLc陓\\_죌V쁰ल二?c띦捱 \u0019JC\u0011b⤉zẒT볕\"绣蘨뚋cꡉkI\u001e鳴", + "ꃣI'{6u^㡃#཰Kq4逹y൒䧠䵮!㱙/n??{L풓ZET㙠퍿X2᩟綳跠葿㚙w཮x캽扳B唕S|尾}촕%N?o䪨": null, + "ⰴFjෟ셈[\u0018辷px?椯\\1<ﲻ栘ᣁ봢憠뉴p": -5263694954586507640 + } + ] + ]] + ]} + ]}] + ] + ], + "?#癘82禩鋆ꊝty?&": -1.9419029518535086E-19 + } + ] + ] + ]} + ] + ] + ], + "훊榲.|῕戄&.㚏Zꛦ2\"䢥ሆ⤢fV_摕婔?≍Fji冀탆꜕i㏬_ẑKᅢ꫄蔻XWc|饡Siẘ^㲦?羡2ぴ1縁ᙅ?쐉Ou": false + }]] + ]}}}, + "慂뗄卓蓔ᐓ匐嚖/颹蘯/翻ㆼL?뇊,텵<\\獷ごCボ": null + }, + "p溉ᑟi짣z:䒤棇r^٫%G9缑r砌롧.물农g?0׼ሩ4ƸO㣥㯄쩞ጩ": null, + "껎繥YxK\"F젷쨹뤤1wq轫o?鱑뜀瘊?뎃h灑\\ꛣ}K峐^ኖ⤐林ꉓhy": null + } + ], + "᱀n肓ㄛ\"堻2>m殮'1橌%Ꞵ군=Ӳ鯨9耛<\/n據0u彘8㬇៩f᏿诙]嚊": "䋯쪦S럶匏ㅛ#)O`ሀX_鐪渲⛀㨻宅闩➈ꢙஶDR⪍" + }, + "tA썓龇 ⋥bj왎录r땽✒롰;羋^\\?툳*┎?썀ma䵳넅U䳆૘〹䆀LQ0\b疀U~u$M}(鵸g⳾i抦뛹?䤈땚검.鹆?ꩡtⶥGĒ;!ቹHS峻B츪켏f5≺": 2366175040075384032, + "전pJjleb]ួ": -7.5418493141528422E18, + "n.鎖ጲ\n?,$䪘": true + }, + "欈Ar㉣螵᪚茩?O)": null + }, + "쫸M#x}D秱欐K=侫们丐.KꕾxẠ\u001e㿯䣛F܍캗qq8꟞ṢFD훎⵳簕꭛^鳜\u205c٫~⑟~冫ऊ2쫰<\/戲윱o<\"": true + }, + "㷝聥/T뱂\u0010锕|内䞇x侁≦㭖:M?iM᣿IJe煜dG࣯尃⚩gPt*辂.{磼럾䝪@a\\袛?}ᓺB珼": true + } + } + ]]}]}}, + "tn\"6ꫤ샾䄄;銞^%VBPwu묪`Y僑N.↺Ws?3C⤻9唩S䠮ᐴm;sᇷ냞඘B/;툥B?lB∤)G+O9m裢0kC햪䪤": -4.5941249382502277E18, + "ᚔt'\\愫?鵀@\\びꂕP큠<<]煹G-b!S?\nꖽ鼫,ݛ&頺y踦?E揆릱H}햧캡b@手.p탻>췽㣬ꒅ`qe佭P>ᓂ&?u}毚ᜉ蟶頳졪ᎏzl2wO": -2.53561440423275936E17 + }]} + } + ] + ]], + "潈촒⿂叡": 5495738871964062986 + } + ]] + } + ] + ]} + ]] + ]] + ]} + ] + ]}, + "ႁq킍蓅R`謈蟐ᦏ儂槐僻ﹶ9婌櫞釈~\"%匹躾ɢ뤥>࢟瀴愅?殕节/냔O✬H鲽엢?ᮈੁ⋧d␽㫐zCe*": 2.15062231586689536E17, + "㶵Ui曚珰鋪ᾼ臧P{䍏䷪쨑̟A뼿T渠誈䏚D1!잶<\/㡍7?)2l≣穷᛾稝{:;㡹nemיּ訊`G": null, + "䀕\"飕辭p圁f#뫆䶷뛮;⛴ᩍ3灚덏ᰝ쎓⦷詵%᜖Մfs⇫(\u001e~P|ﭗCⲾផv湟W첋(텪બT<บSꏉ੗⋲X婵i ӵ⇮?L䬇|ꈏ?졸": 1.548341247351782E-19 + } + ] + }, + "t;:N\u0015q鐦Rt缆{ꮐC?஛㷱敪\\+鲊㉫㓪몗릙竏(氵kYS": "XᰂT?൮ô", + "碕飦幑|+ 㚦鏶`镥ꁩ B<\/加륙": -4314053432419755959, + "秌孳(p!G?V傫%8ሽ8w;5鲗㦙LI檸\u2098": "zG N볞䆭鎍흘\\ONK3횙<\/樚立圌Q튅k쩎Ff쁋aׂJK銆ઘ즐狩6༥✙䩜篥CzP(聻駇HHퟲ讃%,ά{렍p而刲vy䦅ክ^톺M楒鍢㹳]Mdg2>䤉洞", + "踛M젧>忔芿㌜Zk": 2215369545966507819, + "씐A`$槭頰퍻^U覒\bG毲aᣴU;8!팲f꜇E⸃_卵{嫏羃X쀳C7뗮m(嚼u N܁谟D劯9]#": true, + "ﻩ!뵸-筚P᭛}ἰ履lPh?౮ⶹꆛ穉뎃g萑㑓溢CX뾇G㖬A錟]RKaꄘ]Yo+@䘁's섎襠$^홰}F": null + }, + "粘ꪒ4HXᕘ蹵.$區\r\u001d묁77pPc^y笲Q<\/ꖶ 訍䃍ᨕG?*": 1.73773035935040224E17 + }, + "婅拳?bkU;#D矠❴vVN쩆t㜷A풃갮娪a%鮏絪3dAv룒#tm쑬⌛qYwc4|L8KZ;xU⓭㳔밆拓EZ7襨eD|隰ऌ䧼u9Ԣ+]贴P荿": 2.9628516456987075E18 + }]}}] + ]} + }} + ]}] + ], + "|g翉F*湹̶\u0005⏐1脉̀eI쩓ᖂ㫱0碞l䴨ꑅ㵽7AtἈ턧yq䳥塑:z:遀ᄐX눔擉)`N3昛oQ셖y-ڨ⾶恢ꈵq^<\/": null, + "菹\\랓G^璬x৴뭸ゆUS겧﮷Bꮤ ┉銜᯻0%N7}~f洋坄Xꔼ<\/4妟Vꄟ9:౟곡t킅冩䧉笭裟炂4봋ⱳ叺怊t+怯涗\"0㖈Hq": false, + "졬믟'ﺇফ圪쓬멤m邸QLব䗁愍4jvs翙 ྍ꧀艳H-|": null, + "컮襱⣱뗠 R毪/鹙꾀%헳8&": -5770986448525107020 + } + ], + "B䔚bꐻ뙏姓展槰T-똌鷺tc灿᫽^㓟䏀o3o$꘭趙萬I顩)뇭Ἑ䓝\f@{ᣨ`x3蔛": null + } + ] + ] + }], + "⦖扚vWꃱ꥙㾠壢輓{-⎳鹷贏璿䜑bG倛⋐磎c皇皩7a~ﳫU╣Q࠭ꎉS摅姽OW.홌ೞ.": null, + "蚪eVlH献r}ᮏ믠ﰩꔄ@瑄ⲱ": null, + "퀭$JWoꩢg역쁍䖔㑺h&ୢtXX愰㱇?㾫I_6 OaB瑈q裿": null, + "꽦ﲼLyr纛Zdu珍B絟쬴糔?㕂짹䏵e": "ḱ\u2009cX9멀i䶛簆㳀k" + } + ]]]], + "(_ꏮg່澮?ᩑyM<艷\u001aꪽ\\庼뙭Z맷㰩Vm\\lY筺]3㋲2㌩㄀Eਟ䝵⨄쐨ᔟgङHn鐖⤇놋瓇Q탚單oY\"♆臾jHᶈ征ቄ??uㇰA?#1侓": null + }, + "觓^~ሢ&iI띆g륎ḱ캀.ᓡꀮ胙鈉": 1.0664523593012836E-19, + "y詭Gbᔶऽs댁U:杜⤎ϲ쁗⮼D醄诿q뙰I#즧v蔎xHᵿt᡽[**?崮耖p缫쿃L菝,봬ꤦC쯵#=X1瞻@OZc鱗CQTx": null + } + ] + }}], + "剘紁\u0004\\Xn⊠6,တױ;嵣崇}讃iႽ)d1\\䔓": null + }, + "脨z\"{X,1u찜<'k&@?1}Yn$\u0015Rd輲ーa쮂굄+B$l": true, + "諳>*쭮괐䵟Ґ+<箁}빀䅱⡔檏臒hIH脟ꩪC핝ଗP좕\"0i<\/C褻D۞恗+^5?'ꂱ䚫^7}㡠cq6\\쨪ꔞꥢ?纖䫀氮蒫侲빦敶q{A煲G": -6880961710038544266 + }}] + }, + "5s⨲JvಽῶꭂᄢI.a৊": null, + "?1q꽏쿻ꛋDR%U娝>DgN乭G": -1.2105047302732358E-19 + } + ] + ]}, + "qZz`撋뙹둣j碇쁏\\ꆥ\u0018@藴疰Wz)O{F䶛l᷂绘訥$]뮍夻䢋䩇萿獰樧猵⣭j萶q)$꬚⵷0馢W:Ⱍ!Qoe": -1666634370862219540, + "t": "=wp|~碎Q鬳Ӎ\\l-<\/^ﳊhn퐖}䍔t碵ḛ혷?靻䊗", + "邙쇡㯇%#=,E4勃驆V繚q[Y댻XV㡸[逹ᰏ葢B@u=JS5?bLRn얮㍉⏅ﰳ?a6[&큟!藈": 1.2722786745736667E-19 + }, + "X블땨4{ph鵋ꉯ웸 5p簂䦭s_E徔濧d稝~No穔噕뽲)뉈c5M윅>⚋[岦䲟懷恁?鎐꓆ฬ爋獠䜔s{\u001bm鐚儸煛%bﯿXT>ꗘ@8G": 1157841540507770724, + "媤娪Q杸\u0011SAyᡈ쿯": true, + "灚^ಸ%걁<\/蛯?\"祴坓\\\\'흍": -3.4614808555942579E18, + "釴U:O湛㴑䀣렑縓\ta)(j:숾却䗌gCiB뽬Oyuq輥厁/7)?今hY︺Q": null + } + ] + ]]]}] + ], + "I笔趠Ph!<ཛྷ㸞诘X$畉F\u0005笷菟.Esr릙!W☆䲖뗷莾뒭U\"䀸犜Uo3Gꯌx4r蔇᡹㧪쨢準<䂀%ࡡꟼ瑍8炝Xs0䀝销?fi쥱ꆝલBB": -8571484181158525797, + "L⦁o#J|\"⽩-㱢d㌛8d\\㶤傩儻E[Y熯)r噤὘勇 }": "e(濨쓌K䧚僒㘍蠤Vᛸ\"络QJL2,嬓왍伢㋒䴿考澰@(㏾`kX$끑эE斡,蜍&~y", + "vj.|统圪ᵮPL?2oŶ`밧\"勃+0ue%⿥绬췈체$6:qa렐Q;~晘3㙘鹑": true, + "ශؙ4獄⶿c︋i⚅:ん閝Ⳙ苆籦kw{䙞셕pC췃ꍬ␜꟯ꚓ酄b힝hwk꭭M鬋8B耳쑘WQ\\偙ac'唀x᪌\u2048*h짎#ፇ鮠뾏ឿ뀌": false, + "⎀jꄒ牺3Ⓝ컴~?親ꕽぼܓ喏瘘!@<튋㐌꿱⩦{a?Yv%⪧笯Uܱ栅E搚i뚬:ꄃx7䙳ꦋ&䓹vq☶I䁘ᾘ涜\\썉뺌Lr%Bc㍜3?ꝭ砿裞]": null, + "⭤뙓z(㡂%亳K䌽꫿AԾ岺㦦㼴輞낚Vꦴw냟鬓㹈뽈+o3譻K1잞": 2091209026076965894, + "ㇲ\t⋇轑ꠤ룫X긒\"zoY읇희wj梐쐑l侸`e%s": -9.9240075473576563E17, + "啸ꮑ㉰!ᚓ}銏": -4.0694813896301194E18, + ">]囋੽EK뇜>_ꀣ緳碖{쐐裔[<ನ\"䇅\"5L?#xTwv#罐\u0005래t应\\N?빗;": "v쮽瞭p뭃" + } + ]], + "斴槾?Z翁\"~慍弞ﻆ=꜡o5鐋dw\"?K蠡i샾ogDﲰ_C*⬟iㇷ4nય蟏[㟉U꽌娛苸 ঢ়操贻洞펻)쿗૊許X⨪VY츚Z䍾㶭~튃ᵦ<\/E臭tve猑x嚢": null, + "锡⛩<\/칥ꈙᬙ蝀&Ꚑ籬■865?_>L詏쿨䈌浿弥爫̫lj&zx<\/C쉾?覯n?": null, + "꾳鑤/꼩d=ᘈn挫ᑩ䰬ZC": "3錢爋6Ƹ䴗v⪿Wr益G韠[\u0010屗9쁡钁u?殢c䳀蓃樄욂NAq赟c튒瘁렶Aૡɚ捍" + } + ] + ] + ]} + ] + ] + }]]]}} + ]}], + "Ej䗳U<\/Q=灒샎䞦,堰頠@褙g_\u0003ꤾfⶽ?퇋!łB〙ד3CC䌴鈌U:뭔咎(Qો臃䡬荋BO7㢝䟸\"Yb": 2.36010731779814E-20, + "逸'0岔j\u000e눘먷翌C츊秦=ꭣ棭ှ;鳸=麱$XP⩉駚橄A\\좱⛌jqv䰞3Ь踌v㳆¹gT┌gvLB賖烡m?@E঳i": null + }, + "曺v찘ׁ?&绫O័": 9107241066550187880 + } + ] + ], + "(e屄\u0019昜훕琖b蓘ᬄ0/۲묇Z蘮ဏ⨏蛘胯뢃@㘉8ሪWᨮ⦬ᅳ䅴HI၇쨳z囕陻엣1赳o": true, + ",b刈Z,ၠ晐T솝ŕB⩆ou'퐼≃绗雗d譊": null, + "a唥KB\"ﳝ肕$u\n^⅄P䟼냉䞸⩪u윗瀱ꔨ#yşs꒬=1|ﲤ爢`t౐튼쳫_Az(Ṋ擬㦷좕耈6": 2099309172767331582, + "?㴸U<\/䢔ꯡ阽扆㐤q鐋?f㔫wM嬙-;UV죫嚔픞G&\"Cᗍ䪏풊Q": "VM7疹+陕枡툩窲}翡䖶8欞čsT뮐}璤:jﺋ鎴}HfA൝⧻Zd#Qu茅J髒皣Y-︴[?-~쉜v딏璮㹚䅊﩯<-#\u000e걀h\u0004u抱﵊㼃U<㱷⊱IC進" + }, + "숌dee節鏽邺p넱蹓+e罕U": true + } + ], + "b⧴룏??ᔠ3ぱ>%郿劃翐ꏬꠛW瞳᫏누躨狀ໄy੽\"ីuS=㨞馸k乆E": "トz݈^9R䬑<ﮛGRꨳ\u000fTT泠纷꽀MRᴱ纊:㠭볮?%N56%鈕1䗍䜁a䲗j陇=뿻偂衋࿘ᓸ?ᕵZ+<\/}H耢b䀁z^f$&㝒LkꢳI脚뙛u": 5.694374481577558E-20 + }] + } + ]], + "obj": {"key": "wrong value"}, + "퓲꽪m{㶩/뇿#⼢&᭙硞㪔E嚉c樱㬇1a綑᝖DḾ䝩": null + } +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json.gz b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/sample.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..1fa67d4c595a6aa8c77da2f26f3263aadf40e5a5 GIT binary patch literal 153726 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%0Ay+*iSY+uIe8q_*N}>VEIZ!fZT|{- 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 16 ? scanner.buffer.substring(0, 16) + "..." : scanner.buffer)); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_expr2.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_expr2.js new file mode 100644 index 0000000..248e718 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_expr2.js @@ -0,0 +1,33 @@ +var Scanner = require("../Scanner"); +var Parser = require("../bottomUp/Parser2"); + +var expr = require("./expr2"); + + +var scanner = new Scanner(); + +//scanner.addBuffer("(1 + 2) * 3[4]", true); +scanner.addBuffer("[a[b]]", true); + + +console.log("Buffer: " + scanner.buffer); + +var parser = new Parser(expr, "operand"); + +for(;;){ + var expected = parser.getExpectedState(); + if(!expected){ + // we are done + break; + } + var token = scanner.getToken(expected); + if(token === true){ + throw Error("Scanner requests more data, which is impossible."); + } + parser.putToken(token, scanner); +} + +if(!scanner.isFinished()){ + throw Error("Unprocessed symbols: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : scanner.buffer)); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_json.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_json.js new file mode 100644 index 0000000..2126a89 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_json.js @@ -0,0 +1,41 @@ +var Scanner = require("../Scanner"); +var Parser = require("../topDown/Parser"); + +var json = require("./json"); + +// var printGrammar = require("./printGrammar"); +// printGrammar(json); + + +var scanner = new Scanner(); + +scanner.addBuffer("[0, 1, 0.2, 1e2, 1.2E3, 1.2e-3, 1.2e+34, " + + "[], [-0, -1, -0.2, -1e2, -1.2E3, -1.2e-3, -1.2e+34], " + + "true, false, null, \"I say: \\\"Hey!\\\"\", " + + "{}, {\"a\": 2}, {\"b\": true, \"c\": {}}]", true); + +// scanner.addBuffer("1e2", true); +// scanner.addBuffer("[[], [true], true]", true); +// scanner.addBuffer("[[[]]]", true); + +console.log("Buffer: " + scanner.buffer); + +var parser = new Parser(json); + +for(;;){ + var expected = parser.getExpectedState(); + if(!expected){ + // we are done + break; + } + var token = scanner.getToken(expected); + if(token === true){ + throw Error("Scanner requests more data, which is impossible."); + } + parser.putToken(token, scanner); +} + +if(!scanner.isFinished()){ + throw Error("Unprocessed symbols: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : scanner.buffer)); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsons.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsons.js new file mode 100644 index 0000000..c210ae1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsons.js @@ -0,0 +1,43 @@ +var Scanner = require("../Scanner"); +var Parser = require("../topDown/Parser"); + +var json = require("./json"); + +var fs = require("fs"), path = require("path"), zlib = require("zlib"); + + +var scanner = new Scanner(), + parser = new Parser(json); + +fs.readFile(path.resolve(__dirname, "sample.json.gz"), function(err, data){ + if(err){ + throw err; + } + zlib.gunzip(data, function(err, data){ + if(err){ + throw err; + } + + // let's process the whole file + scanner.addBuffer(data, true); + + // now let's loop over tokens + for(;;){ + var expected = parser.getExpectedState(); + if(!expected){ + // we are done + break; + } + var token = scanner.getToken(expected); + if(token === true){ + throw Error("Scanner requests more data, which is impossible."); + } + parser.putToken(token, scanner); + } + + if(!scanner.isFinished()){ + throw Error("Unprocessed symbols: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : scanner.buffer)); + } + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc.js new file mode 100644 index 0000000..95886bf --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc.js @@ -0,0 +1,57 @@ +var Scanner = require("../Scanner"); +var Parser = require("../topDown/Parser"); + +var json = require("./json"); + +var fs = require("fs"), path = require("path"), zlib = require("zlib"); + + +var CHUNK_SIZE = 1024; + +var scanner = new Scanner(), + parser = new Parser(json); + +fs.readFile(path.resolve(__dirname, "sample.json.gz"), function(err, data){ + if(err){ + throw err; + } + zlib.gunzip(data, function(err, data){ + if(err){ + throw err; + } + + function addChunk(){ + var chunk = data.slice(0, Math.min(CHUNK_SIZE, data.length)); + data = chunk.length < data.length ? data.slice(CHUNK_SIZE) : ""; + scanner.addBuffer(chunk, !data.length); + } + + function getToken(state){ + for(;;){ + var token = scanner.getToken(state); + if(token !== true){ + // no need for the next chunk yet + break; + } + addChunk(); + } + return token; + } + + // let's loop over tokens + for(;;){ + var expected = parser.getExpectedState(); + if(!expected){ + // we are done + break; + } + var token = getToken(expected); + parser.putToken(token, scanner); + } + + if(!scanner.isFinished()){ + throw Error("Unprocessed symbols: " + + (scanner.buffer.length > 16 ? scanner.buffer.substring(0, 16) + "..." : scanner.buffer)); + } + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc_re2.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc_re2.js new file mode 100644 index 0000000..d58add7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/tests/test_jsonsc_re2.js @@ -0,0 +1,60 @@ +var Scanner = require("../ScannerRE2"); +var Parser = require("../topDown/Parser"); + +var json = require("./json"); + +var fs = require("fs"), path = require("path"), zlib = require("zlib"); + + +var CHUNK_SIZE = 1024; + +var scanner = new Scanner(), + parser = new Parser(json); + +fs.readFile(path.resolve(__dirname, "sample.json.gz"), function(err, data){ + if(err){ + throw err; + } + zlib.gunzip(data, function(err, data){ + if(err){ + throw err; + } + + function addChunk(){ + var chunk = data.slice(0, Math.min(CHUNK_SIZE, data.length)); + data = chunk.length < data.length ? data.slice(CHUNK_SIZE) : new Buffer(0); + scanner.addBuffer(chunk, !data.length); + } + + function getToken(state){ + for(;;){ + var token = scanner.getToken(state); + if(token !== true){ + // no need for the next chunk yet + break; + } + addChunk(); + } + return token; + } + + // let's loop over tokens + for(;;){ + var expected = parser.getExpectedState(); + if(!expected){ + // we are done + break; + } + var token = getToken(expected); + parser.putToken(token, scanner); + } + + if(!scanner.isFinished()){ + var buffer = scanner.buffer; + throw Error("Unprocessed symbols: " + + (buffer.length > 16 ? + (Buffer.isBuffer(buffer) ? buffer.toString("utf8", 0, 16) : + buffer.substring(0, 16)) + "..." : scanner.buffer.toString())); + } + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Grammar.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Grammar.js new file mode 100644 index 0000000..605513a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Grammar.js @@ -0,0 +1,192 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + function Grammar(grammar){ + var keys = Object.keys(grammar); + // convert and copy rules + keys.forEach(function(name){ + var rule = grammar[name]; + rule = this[name] = rule instanceof Array ? rule : [rule]; + rule.name = name; + }, this); + // expand internal references and prepare states + var walk = makeWalk(this); + keys.forEach(function(name){ + this[name] = walk(this[name]); + }, this); + // operate on all rules + keys = Object.keys(this); + // make states + keys.forEach(function(name){ + makeState(this[name]); + }, this); + // inline states + keys.forEach(function(name){ + this[name].forEach(function(item, index, rule){ + if(item instanceof Array){ + rule[index] = item.state; + } + }); + }, this); + } + + // helpers + + function rule(name){ + return function(grammar){ + return grammar[name]; + }; + } + + function any(){ + var rule = Array.prototype.slice.call(arguments, 0); + rule.any = rule.length > 1; + return rule; + } + + function maybe(){ + var rule = Array.prototype.slice.call(arguments, 0); + rule.optional = true; + return rule; + } + + function repeat(){ + var rule = Array.prototype.slice.call(arguments, 0); + rule.optional = true; + rule.repeatable = true; + return rule; + } + + // utilities + + var emptyArray = []; + + function makeWalk(grammar){ + var counter = 0; + return function walk(item){ + for(; typeof item == "function"; item = item(grammar)); + if(item instanceof Array && !item.touched){ + item.touched = true; + if(!item.length){ + throw Error("Empty rule: " + (item.name || "internal")); + } + item.forEach(function(value, index){ + item[index] = walk(value); + }); + } + // post-process + var conv; + if(typeof item == "string"){ + conv = makeTokenFromString; + }else if(item instanceof RegExp){ + conv = makeTokenFromRegExp; + }else if(item.pattern){ + conv = sanitizeToken; + }else{ + if(item instanceof Array && !item.name){ + item.name = "_R" + (counter++); + grammar[item.name] = item; + } + return item; + } + var token = conv(item); + token.nextArray = emptyArray; + token.nextIndex = emptyArray; + return {tokens: [token], pattern: new RegExp("^(" + token.pattern.source.substring(4))}; + }; + } + + function makeTokenFromString(literal){ + return { + id: literal, + literal: true, + pattern: new RegExp("^(?:" + toRegExpSource(literal) + ")") + }; + } + + function makeTokenFromRegExp(literal){ + return { + id: literal.source, + literal: false, + pattern: new RegExp("^(?:" + literal.source + ")") + }; + } + + function sanitizeToken(token){ + var p = (typeof token.pattern == "string" ? + makeTokenFromString : makeTokenFromRegExp)(token.pattern), + t = Object.create(token); + t.literal = p.literal; + t.pattern = p.pattern; + return t; + } + + function toRegExpSource(s){ + return /^[a-zA-Z]\w*$/.test(s) ? s + "\\b" : + s.replace(/[#-.]|[[-^]|[?|{}]/g, "\\$&"); + } + + function getState(rule, index, naked){ + var item = rule[index]; + if(item instanceof Array){ + makeState(item); + item = item.state; + } + if(!naked && typeof item == "object"){ + var newIndex = index + 1; + if(newIndex === rule.length && rule.repeatable){ + newIndex = 0; + } + if(newIndex < rule.length){ + item = Object.create(item); + item.tokens = item.tokens.map(function(token){ + var t = Object.create(token); + t.nextArray = [rule].concat(token.nextArray); + t.nextIndex = [newIndex].concat(token.nextIndex); + return t; + }); + } + } + return item; + } + + function makeState(rule){ + if(!rule.state){ + if(rule.any){ + var tokens = []; + rule.forEach(function(_, index){ + tokens.push.apply(tokens, getState(rule, index, true).tokens); + }); + rule.state = {tokens: tokens}; + }else{ + if(rule.optional){ + rule.state = {tokens: getState(rule, 0).tokens, optional: true}; + }else{ + var tokens = [], + optional = rule.every(function(_, index){ + var state = getState(rule, index); + tokens.push.apply(tokens, state.tokens); + return state.optional; + }); + rule.state = {tokens: tokens, optional: optional}; + } + } + var patterns = rule.state.tokens.map(function(token){ + var pattern = token.pattern.source; + return pattern.substring(4, pattern.length - 1); + }); + rule.state.pattern = new RegExp(patterns.length == 1 ? + "^(" + patterns[0] + ")" : "^(?:(" + patterns.join(")|(") + "))"); + } + } + + // export + + Grammar.rule = rule; + Grammar.any = any; + Grammar.maybe = maybe; + Grammar.repeat = repeat; + + return Grammar; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Parser.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Parser.js new file mode 100644 index 0000000..b624aeb --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/parser-toolkit/topDown/Parser.js @@ -0,0 +1,72 @@ +/* UMD.define */ (typeof define=="function"&&define||function(d,f,m){m={module:module,require:require};module.exports=f.apply(null,d.map(function(n){return m[n]||require(n)}))}) +([], function(){ + "use strict"; + + function Parser(grammar, name, index){ + this.reset(grammar, name, index); + } + + Parser.prototype = { + reset: function(grammar, name, index){ + this.expected = null; + this.triedTokens = []; + this.arrayStack = [grammar[name || "main"]]; + this.indexStack = [index || 0]; + }, + getExpectedState: function(){ + while(this.arrayStack.length){ + var a = this.arrayStack.pop(), + i = this.indexStack.pop(); + if(i < a.length){ + var value = a[i++]; + this.arrayStack.push(a); + this.indexStack.push(i); + return this.expected = value; + } + if(a.repeatable){ + this.arrayStack.push(a); + this.indexStack.push(0); + } + } + return null; + }, + putToken: function(token, scanner){ + if(token){ + this.arrayStack.push.apply(this.arrayStack, token.nextArray); + this.indexStack.push.apply(this.indexStack, token.nextIndex); + if(this.triedTokens.length){ + this.triedTokens = []; + } + this.onToken(token); + }else{ + // no match: save failed tokens + this.triedTokens.push.apply(this.triedTokens, this.expected.tokens); + // check optional items + if(this.expected.optional){ + return; + } + var a = this.arrayStack.pop(), + i = this.indexStack.pop(); + if(a.optional && i === 1){ + return; + } + var buffer = scanner.buffer; + throw Error("Can't find a legal token" + + (scanner ? " at (" + scanner.line + ", " + scanner.pos + ") in: " + + (buffer.length > 16 ? + (Buffer.isBuffer(buffer) ? buffer.toString("utf8", 0, 16) : + buffer.substring(0, 16)) + "..." : + buffer.toString()) + "\n" : ".\n") + + "Tried: " + + this.triedTokens.map(function(token){ + return "'" + token.id + "'"; + }).join(", ") + "."); + } + }, + onToken: function(token){ + //console.log(token.id + " (" + token.line + ", " + token.pos + "): " + token.value); + } + }; + + return Parser; +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.npmignore new file mode 100644 index 0000000..496ee2c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.npmignore @@ -0,0 +1 @@ +.DS_Store \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.tm_properties b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.tm_properties new file mode 100644 index 0000000..4b8eb3f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.tm_properties @@ -0,0 +1,7 @@ +excludeDirectories = "{.git,node_modules}" +excludeInFolderSearch = "{excludeDirectories,lib}" + +includeFiles = "{.gitignore,.npmignore,.travis.yml}" + +[ attr.untitled ] +fileType = 'source.coffee' \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.travis.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.travis.yml new file mode 100644 index 0000000..1543c19 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "node" + - "6" + - "4" + - "0.12" diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/README.md new file mode 100644 index 0000000..28080f8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/README.md @@ -0,0 +1,30 @@ +# performance-now [![Build Status](https://travis-ci.org/braveg1rl/performance-now.png?branch=master)](https://travis-ci.org/braveg1rl/performance-now) [![Dependency Status](https://david-dm.org/braveg1rl/performance-now.png)](https://david-dm.org/braveg1rl/performance-now) + +Implements a function similar to `performance.now` (based on `process.hrtime`). + +Modern browsers have a `window.performance` object with - among others - a `now` method which gives time in milliseconds, but with sub-millisecond precision. This module offers the same function based on the Node.js native `process.hrtime` function. + +Using `process.hrtime` means that the reported time will be monotonically increasing, and not subject to clock-drift. + +According to the [High Resolution Time specification](http://www.w3.org/TR/hr-time/), the number of milliseconds reported by `performance.now` should be relative to the value of `performance.timing.navigationStart`. + +In the current version of the module (2.0) the reported time is relative to the time the current Node process has started (inferred from `process.uptime()`). + +Version 1.0 reported a different time. The reported time was relative to the time the module was loaded (i.e. the time it was first `require`d). If you need this functionality, version 1.0 is still available on NPM. + +## Example usage + +```javascript +var now = require("performance-now") +var start = now() +var end = now() +console.log(start.toFixed(3)) // the number of milliseconds the current node process is running +console.log((start-end).toFixed(3)) // ~ 0.002 on my system +``` + +Running the now function two times right after each other yields a time difference of a few microseconds. Given this overhead, I think it's best to assume that the precision of intervals computed with this method is not higher than 10 microseconds, if you don't know the exact overhead on your own system. + +## License + +performance-now is released under the [MIT License](http://opensource.org/licenses/MIT). +Copyright (c) 2017 Braveg1rl diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js new file mode 100644 index 0000000..37f569d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.12.2 +(function() { + var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime; + + if ((typeof performance !== "undefined" && performance !== null) && performance.now) { + module.exports = function() { + return performance.now(); + }; + } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { + module.exports = function() { + return (getNanoSeconds() - nodeLoadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + moduleLoadTime = getNanoSeconds(); + upTime = process.uptime() * 1e9; + nodeLoadTime = moduleLoadTime - upTime; + } else if (Date.now) { + module.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module.exports = function() { + return new Date().getTime() - loadTime; + }; + loadTime = new Date().getTime(); + } + +}).call(this); + +//# sourceMappingURL=performance-now.js.map diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js.map new file mode 100644 index 0000000..bef8362 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/lib/performance-now.js.map @@ -0,0 +1,10 @@ +{ + "version": 3, + "file": "performance-now.js", + "sourceRoot": "..", + "sources": [ + "src/performance-now.coffee" + ], + "names": [], + "mappings": ";AAAA;AAAA,MAAA;;EAAA,IAAG,4DAAA,IAAiB,WAAW,CAAC,GAAhC;IACE,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,WAAW,CAAC,GAAZ,CAAA;IAAH,EADnB;GAAA,MAEK,IAAG,oDAAA,IAAa,OAAO,CAAC,MAAxB;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,CAAC,cAAA,CAAA,CAAA,GAAmB,YAApB,CAAA,GAAoC;IAAvC;IACjB,MAAA,GAAS,OAAO,CAAC;IACjB,cAAA,GAAiB,SAAA;AACf,UAAA;MAAA,EAAA,GAAK,MAAA,CAAA;aACL,EAAG,CAAA,CAAA,CAAH,GAAQ,GAAR,GAAc,EAAG,CAAA,CAAA;IAFF;IAGjB,cAAA,GAAiB,cAAA,CAAA;IACjB,MAAA,GAAS,OAAO,CAAC,MAAR,CAAA,CAAA,GAAmB;IAC5B,YAAA,GAAe,cAAA,GAAiB,OAR7B;GAAA,MASA,IAAG,IAAI,CAAC,GAAR;IACH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAG,IAAI,CAAC,GAAL,CAAA,CAAA,GAAa;IAAhB;IACjB,QAAA,GAAW,IAAI,CAAC,GAAL,CAAA,EAFR;GAAA,MAAA;IAIH,MAAM,CAAC,OAAP,GAAiB,SAAA;aAAO,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,CAAJ,GAAuB;IAA1B;IACjB,QAAA,GAAe,IAAA,IAAA,CAAA,CAAM,CAAC,OAAP,CAAA,EALZ;;AAXL" +} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/license.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/license.txt new file mode 100644 index 0000000..0bf51b4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/license.txt @@ -0,0 +1,7 @@ +Copyright (c) 2013 Braveg1rl + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/package.json new file mode 100644 index 0000000..184b113 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + { + "raw": "performance-now@^2.1.0", + "scope": null, + "escapedName": "performance-now", + "name": "performance-now", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "performance-now@>=2.1.0 <3.0.0", + "_id": "performance-now@2.1.0", + "_inCache": true, + "_location": "/performance-now", + "_nodeVersion": "7.3.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/performance-now-2.1.0.tgz_1487514529361_0.3097308638971299" + }, + "_npmUser": { + "name": "meryn", + "email": "braveg1rl@outlook.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "performance-now@^2.1.0", + "scope": null, + "escapedName": "performance-now", + "name": "performance-now", + "rawSpec": "^2.1.0", + "spec": ">=2.1.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "_shasum": "6309f4e0e5fa913ec1c69307ae364b4b377c9e7b", + "_shrinkwrap": null, + "_spec": "performance-now@^2.1.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "author": { + "name": "Braveg1rl", + "email": "braveg1rl@outlook.com" + }, + "bugs": { + "url": "https://github.com/braveg1rl/performance-now/issues" + }, + "dependencies": {}, + "description": "Implements performance.now (based on process.hrtime).", + "devDependencies": { + "bluebird": "^3.4.7", + "call-delayed": "^1.0.0", + "chai": "^3.5.0", + "chai-increasing": "^1.2.0", + "coffee-script": "~1.12.2", + "mocha": "~3.2.0", + "pre-commit": "^1.2.2" + }, + "directories": {}, + "dist": { + "shasum": "6309f4e0e5fa913ec1c69307ae364b4b377c9e7b", + "tarball": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" + }, + "gitHead": "107bb703494cc5a8071cdf45a87e53f248a5e0f3", + "homepage": "https://github.com/braveg1rl/performance-now", + "keywords": [], + "license": "MIT", + "main": "lib/performance-now.js", + "maintainers": [ + { + "name": "meryn", + "email": "merynstol@gmail.com" + } + ], + "name": "performance-now", + "optionalDependencies": {}, + "private": false, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/braveg1rl/performance-now.git" + }, + "scripts": { + "build": "mkdir -p lib && rm -rf lib/* && node_modules/.bin/coffee --compile -m --output lib/ src/", + "prepublish": "npm test", + "pretest": "npm run build", + "test": "mocha", + "watch": "coffee --watch --compile --output lib/ src/" + }, + "typings": "src/index.d.ts", + "version": "2.1.0" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/index.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/index.d.ts new file mode 100644 index 0000000..68dca8e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/index.d.ts @@ -0,0 +1,8 @@ +// This file describes the package to typescript. + +/** + * Returns the number of milliseconds since the page was loaded (if browser) + * or the node process was started. + */ +declare function now(): number; +export = now; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/performance-now.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/performance-now.coffee new file mode 100644 index 0000000..a8e075a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/src/performance-now.coffee @@ -0,0 +1,17 @@ +if performance? and performance.now + module.exports = -> performance.now() +else if process? and process.hrtime + module.exports = -> (getNanoSeconds() - nodeLoadTime) / 1e6 + hrtime = process.hrtime + getNanoSeconds = -> + hr = hrtime() + hr[0] * 1e9 + hr[1] + moduleLoadTime = getNanoSeconds() + upTime = process.uptime() * 1e9 + nodeLoadTime = moduleLoadTime - upTime +else if Date.now + module.exports = -> Date.now() - loadTime + loadTime = Date.now() +else + module.exports = -> new Date().getTime() - loadTime + loadTime = new Date().getTime() diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/mocha.opts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/mocha.opts new file mode 100644 index 0000000..55d8492 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/mocha.opts @@ -0,0 +1,3 @@ +--require coffee-script/register +--compilers coffee:coffee-script/register +--reporter spec \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/performance-now.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/performance-now.coffee new file mode 100644 index 0000000..c99e95c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/performance-now.coffee @@ -0,0 +1,43 @@ +chai = require "chai" +chai.use(require "chai-increasing") +{assert,expect} = chai +Bluebird = require "bluebird" + +now = require "../" + +getUptime = -> process.uptime() * 1e3 + +describe "now", -> + it "reported time differs at most 1ms from a freshly reported uptime", -> + assert.isAtMost Math.abs(now()-getUptime()), 1 + + it "two subsequent calls return an increasing number", -> + assert.isBelow now(), now() + + it "has less than 10 microseconds overhead", -> + assert.isBelow Math.abs(now() - now()), 0.010 + + it "can be called 1 million times in under 1 second (averaging under 1 microsecond per call)", -> + @timeout 1000 + now() for [0...1e6] + undefined + + it "for 10,000 numbers, number n is never bigger than number n-1", -> + stamps = (now() for [1...10000]) + expect(stamps).to.be.increasing + + it "shows that at least 0.2 ms has passed after a timeout of 1 ms", -> + earlier = now() + Bluebird.resolve().delay(1).then -> assert.isAbove (now()-earlier), 0.2 + + it "shows that at most 3 ms has passed after a timeout of 1 ms", -> + earlier = now() + Bluebird.resolve().delay(1).then -> assert.isBelow (now()-earlier), 3 + + it "shows that at least 190ms ms has passed after a timeout of 200ms", -> + earlier = now() + Bluebird.resolve().delay(200).then -> assert.isAbove (now()-earlier), 190 + + it "shows that at most 220 ms has passed after a timeout of 200ms", -> + earlier = now() + Bluebird.resolve().delay(200).then -> assert.isBelow (now()-earlier), 220 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts.coffee new file mode 100644 index 0000000..16312f1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts.coffee @@ -0,0 +1,27 @@ +Bluebird = require "bluebird" +exec = require("child_process").execSync +{assert} = require "chai" + +describe "scripts/initital-value.coffee (module.uptime(), expressed in milliseconds)", -> + result = exec("./test/scripts/initial-value.coffee").toString().trim() + it "printed #{result}", -> + it "printed a value above 100", -> assert.isAbove result, 100 + it "printed a value below 350", -> assert.isBelow result, 350 + +describe "scripts/delayed-require.coffee (sum of uptime and 250 ms delay`)", -> + result = exec("./test/scripts/delayed-require.coffee").toString().trim() + it "printed #{result}", -> + it "printed a value above 350", -> assert.isAbove result, 350 + it "printed a value below 600", -> assert.isBelow result, 600 + +describe "scripts/delayed-call.coffee (sum of uptime and 250 ms delay`)", -> + result = exec("./test/scripts/delayed-call.coffee").toString().trim() + it "printed #{result}", -> + it "printed a value above 350", -> assert.isAbove result, 350 + it "printed a value below 600", -> assert.isBelow result, 600 + +describe "scripts/difference.coffee", -> + result = exec("./test/scripts/difference.coffee").toString().trim() + it "printed #{result}", -> + it "printed a value above 0.005", -> assert.isAbove result, 0.005 + it "printed a value below 0.07", -> assert.isBelow result, 0.07 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-call.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-call.coffee new file mode 100755 index 0000000..0c3bab5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-call.coffee @@ -0,0 +1,11 @@ +#!/usr/bin/env ./node_modules/.bin/coffee + +### +Expected output is a number above 350 and below 600. +The time reported is relative to the time the node.js process was started +this is approximately at `(Date.now() process.uptime() * 1000)` +### + +delay = require "call-delayed" +now = require "../../lib/performance-now" +delay 250, -> console.log now().toFixed 3 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-require.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-require.coffee new file mode 100755 index 0000000..3ddee95 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/delayed-require.coffee @@ -0,0 +1,12 @@ +#!/usr/bin/env ./node_modules/.bin/coffee + +### +Expected output is a number above 350 and below 600. +The time reported is relative to the time the node.js process was started +this is approximately at `(Date.now() process.uptime() * 1000)` +### + +delay = require "call-delayed" +delay 250, -> + now = require "../../lib/performance-now" + console.log now().toFixed 3 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/difference.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/difference.coffee new file mode 100755 index 0000000..0b5edf6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/difference.coffee @@ -0,0 +1,6 @@ +#!/usr/bin/env ./node_modules/.bin/coffee + +# Expected output is above 0.005 and below 0.07. + +now = require('../../lib/performance-now') +console.log -(now() - now()).toFixed 3 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/initial-value.coffee b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/initial-value.coffee new file mode 100755 index 0000000..19ef4e0 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/performance-now/test/scripts/initial-value.coffee @@ -0,0 +1,10 @@ +#!/usr/bin/env ./node_modules/.bin/coffee + +### +Expected output is a number above 100 and below 350. +The time reported is relative to the time the node.js process was started +this is approximately at `(Date.now() process.uptime() * 1000)` +### + +now = require '../../lib/performance-now' +console.log now().toFixed 3 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/LICENSE-MIT.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/LICENSE-MIT.txt new file mode 100644 index 0000000..a41e0a7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/README.md new file mode 100644 index 0000000..7ad7d1f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/README.md @@ -0,0 +1,176 @@ +# Punycode.js [![Build status](https://travis-ci.org/bestiejs/punycode.js.svg?branch=master)](https://travis-ci.org/bestiejs/punycode.js) [![Code coverage status](http://img.shields.io/coveralls/bestiejs/punycode.js/master.svg)](https://coveralls.io/r/bestiejs/punycode.js) [![Dependency status](https://gemnasium.com/bestiejs/punycode.js.svg)](https://gemnasium.com/bestiejs/punycode.js) + +A robust Punycode converter that fully complies to [RFC 3492](https://tools.ietf.org/html/rfc3492) and [RFC 5891](https://tools.ietf.org/html/rfc5891), and works on nearly all JavaScript platforms. + +This JavaScript library is the result of comparing, optimizing and documenting different open-source implementations of the Punycode algorithm: + +* [The C example code from RFC 3492](https://tools.ietf.org/html/rfc3492#appendix-C) +* [`punycode.c` by _Markus W. Scherer_ (IBM)](http://opensource.apple.com/source/ICU/ICU-400.42/icuSources/common/punycode.c) +* [`punycode.c` by _Ben Noordhuis_](https://github.com/bnoordhuis/punycode/blob/master/punycode.c) +* [JavaScript implementation by _some_](http://stackoverflow.com/questions/183485/can-anyone-recommend-a-good-free-javascript-for-punycode-to-unicode-conversion/301287#301287) +* [`punycode.js` by _Ben Noordhuis_](https://github.com/joyent/node/blob/426298c8c1c0d5b5224ac3658c41e7c2a3fe9377/lib/punycode.js) (note: [not fully compliant](https://github.com/joyent/node/issues/2072)) + +This project is [bundled](https://github.com/joyent/node/blob/master/lib/punycode.js) with [Node.js v0.6.2+](https://github.com/joyent/node/compare/975f1930b1...61e796decc) and [io.js v1.0.0+](https://github.com/iojs/io.js/blob/v1.x/lib/punycode.js). + +## Installation + +Via [npm](https://www.npmjs.com/) (only required for Node.js releases older than v0.6.2): + +```bash +npm install punycode +``` + +Via [Bower](http://bower.io/): + +```bash +bower install punycode +``` + +Via [Component](https://github.com/component/component): + +```bash +component install bestiejs/punycode.js +``` + +In a browser: + +```html + +``` + +In [Node.js](https://nodejs.org/), [io.js](https://iojs.org/), [Narwhal](http://narwhaljs.org/), and [RingoJS](http://ringojs.org/): + +```js +var punycode = require('punycode'); +``` + +In [Rhino](http://www.mozilla.org/rhino/): + +```js +load('punycode.js'); +``` + +Using an AMD loader like [RequireJS](http://requirejs.org/): + +```js +require( + { + 'paths': { + 'punycode': 'path/to/punycode' + } + }, + ['punycode'], + function(punycode) { + console.log(punycode); + } +); +``` + +## API + +### `punycode.decode(string)` + +Converts a Punycode string of ASCII symbols to a string of Unicode symbols. + +```js +// decode domain name parts +punycode.decode('maana-pta'); // 'mañana' +punycode.decode('--dqo34k'); // '☃-⌘' +``` + +### `punycode.encode(string)` + +Converts a string of Unicode symbols to a Punycode string of ASCII symbols. + +```js +// encode domain name parts +punycode.encode('mañana'); // 'maana-pta' +punycode.encode('☃-⌘'); // '--dqo34k' +``` + +### `punycode.toUnicode(input)` + +Converts a Punycode string representing a domain name or an email address to Unicode. Only the Punycoded parts of the input will be converted, i.e. it doesn’t matter if you call it on a string that has already been converted to Unicode. + +```js +// decode domain names +punycode.toUnicode('xn--maana-pta.com'); +// → 'mañana.com' +punycode.toUnicode('xn----dqo34k.com'); +// → '☃-⌘.com' + +// decode email addresses +punycode.toUnicode('джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq'); +// → 'джумла@джpумлатест.bрфa' +``` + +### `punycode.toASCII(input)` + +Converts a lowercased Unicode string representing a domain name or an email address to Punycode. Only the non-ASCII parts of the input will be converted, i.e. it doesn’t matter if you call it with a domain that’s already in ASCII. + +```js +// encode domain names +punycode.toASCII('mañana.com'); +// → 'xn--maana-pta.com' +punycode.toASCII('☃-⌘.com'); +// → 'xn----dqo34k.com' + +// encode email addresses +punycode.toASCII('джумла@джpумлатест.bрфa'); +// → 'джумла@xn--p-8sbkgc5ag7bhce.xn--ba-lmcq' +``` + +### `punycode.ucs2` + +#### `punycode.ucs2.decode(string)` + +Creates an array containing the numeric code point values of each Unicode symbol in the string. While [JavaScript uses UCS-2 internally](https://mathiasbynens.be/notes/javascript-encoding), this function will convert a pair of surrogate halves (each of which UCS-2 exposes as separate characters) into a single code point, matching UTF-16. + +```js +punycode.ucs2.decode('abc'); +// → [0x61, 0x62, 0x63] +// surrogate pair for U+1D306 TETRAGRAM FOR CENTRE: +punycode.ucs2.decode('\uD834\uDF06'); +// → [0x1D306] +``` + +#### `punycode.ucs2.encode(codePoints)` + +Creates a string based on an array of numeric code point values. + +```js +punycode.ucs2.encode([0x61, 0x62, 0x63]); +// → 'abc' +punycode.ucs2.encode([0x1D306]); +// → '\uD834\uDF06' +``` + +### `punycode.version` + +A string representing the current Punycode.js version number. + +## Unit tests & code coverage + +After cloning this repository, run `npm install --dev` to install the dependencies needed for Punycode.js development and testing. You may want to install Istanbul _globally_ using `npm install istanbul -g`. + +Once that’s done, you can run the unit tests in Node using `npm test` or `node tests/tests.js`. To run the tests in Rhino, Ringo, Narwhal, PhantomJS, and web browsers as well, use `grunt test`. + +To generate the code coverage report, use `grunt cover`. + +Feel free to fork if you see possible improvements! + +## Author + +| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## Contributors + +| [![twitter/jdalton](https://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter") | +|---| +| [John-David Dalton](http://allyoucanleet.com/) | + +## License + +Punycode.js is available under the [MIT](https://mths.be/mit) license. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/package.json new file mode 100644 index 0000000..88a7388 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + { + "raw": "punycode@^1.4.1", + "scope": null, + "escapedName": "punycode", + "name": "punycode", + "rawSpec": "^1.4.1", + "spec": ">=1.4.1 <2.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/tough-cookie" + ] + ], + "_from": "punycode@>=1.4.1 <2.0.0", + "_id": "punycode@1.4.1", + "_inCache": true, + "_location": "/punycode", + "_nodeVersion": "5.2.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/punycode-1.4.1.tgz_1458437236261_0.07678767060860991" + }, + "_npmUser": { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + "_npmVersion": "3.8.2", + "_phantomChildren": {}, + "_requested": { + "raw": "punycode@^1.4.1", + "scope": null, + "escapedName": "punycode", + "name": "punycode", + "rawSpec": "^1.4.1", + "spec": ">=1.4.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/tough-cookie" + ], + "_resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "_shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", + "_shrinkwrap": null, + "_spec": "punycode@^1.4.1", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/tough-cookie", + "author": { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + "bugs": { + "url": "https://github.com/bestiejs/punycode.js/issues" + }, + "contributors": [ + { + "name": "Mathias Bynens", + "url": "https://mathiasbynens.be/" + }, + { + "name": "John-David Dalton", + "url": "http://allyoucanleet.com/" + } + ], + "dependencies": {}, + "description": "A robust Punycode converter that fully complies to RFC 3492 and RFC 5891, and works on nearly all JavaScript platforms.", + "devDependencies": { + "coveralls": "^2.11.4", + "grunt": "^0.4.5", + "grunt-contrib-uglify": "^0.11.0", + "grunt-shell": "^1.1.2", + "istanbul": "^0.4.1", + "qunit-extras": "^1.4.4", + "qunitjs": "~1.11.0", + "requirejs": "^2.1.22" + }, + "directories": {}, + "dist": { + "shasum": "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e", + "tarball": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" + }, + "files": [ + "LICENSE-MIT.txt", + "punycode.js" + ], + "gitHead": "0fbadd6e81f3a0ce06c38998040d6db6bdfbc5c9", + "homepage": "https://mths.be/punycode", + "jspm": { + "map": { + "./punycode.js": { + "node": "@node/punycode" + } + } + }, + "keywords": [ + "punycode", + "unicode", + "idn", + "idna", + "dns", + "url", + "domain" + ], + "license": "MIT", + "main": "punycode.js", + "maintainers": [ + { + "name": "mathias", + "email": "mathias@qiwi.be" + }, + { + "name": "reconbot", + "email": "wizard@roborooter.com" + } + ], + "name": "punycode", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/bestiejs/punycode.js.git" + }, + "scripts": { + "test": "node tests/tests.js" + }, + "version": "1.4.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/punycode.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/punycode.js new file mode 100644 index 0000000..2c87f6c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/punycode/punycode.js @@ -0,0 +1,533 @@ +/*! https://mths.be/punycode v1.4.1 by @mathias */ +;(function(root) { + + /** Detect free variables */ + var freeExports = typeof exports == 'object' && exports && + !exports.nodeType && exports; + var freeModule = typeof module == 'object' && module && + !module.nodeType && module; + var freeGlobal = typeof global == 'object' && global; + if ( + freeGlobal.global === freeGlobal || + freeGlobal.window === freeGlobal || + freeGlobal.self === freeGlobal + ) { + root = freeGlobal; + } + + /** + * The `punycode` object. + * @name punycode + * @type Object + */ + var punycode, + + /** Highest positive signed 32-bit float value */ + maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1 + + /** Bootstring parameters */ + base = 36, + tMin = 1, + tMax = 26, + skew = 38, + damp = 700, + initialBias = 72, + initialN = 128, // 0x80 + delimiter = '-', // '\x2D' + + /** Regular expressions */ + regexPunycode = /^xn--/, + regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars + regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators + + /** Error messages */ + errors = { + 'overflow': 'Overflow: input needs wider integers to process', + 'not-basic': 'Illegal input >= 0x80 (not a basic code point)', + 'invalid-input': 'Invalid input' + }, + + /** Convenience shortcuts */ + baseMinusTMin = base - tMin, + floor = Math.floor, + stringFromCharCode = String.fromCharCode, + + /** Temporary variable */ + key; + + /*--------------------------------------------------------------------------*/ + + /** + * A generic error utility function. + * @private + * @param {String} type The error type. + * @returns {Error} Throws a `RangeError` with the applicable error message. + */ + function error(type) { + throw new RangeError(errors[type]); + } + + /** + * A generic `Array#map` utility function. + * @private + * @param {Array} array The array to iterate over. + * @param {Function} callback The function that gets called for every array + * item. + * @returns {Array} A new array of values returned by the callback function. + */ + function map(array, fn) { + var length = array.length; + var result = []; + while (length--) { + result[length] = fn(array[length]); + } + return result; + } + + /** + * A simple `Array#map`-like wrapper to work with domain name strings or email + * addresses. + * @private + * @param {String} domain The domain name or email address. + * @param {Function} callback The function that gets called for every + * character. + * @returns {Array} A new string of characters returned by the callback + * function. + */ + function mapDomain(string, fn) { + var parts = string.split('@'); + var result = ''; + if (parts.length > 1) { + // In email addresses, only the domain name should be punycoded. Leave + // the local part (i.e. everything up to `@`) intact. + result = parts[0] + '@'; + string = parts[1]; + } + // Avoid `split(regex)` for IE8 compatibility. See #17. + string = string.replace(regexSeparators, '\x2E'); + var labels = string.split('.'); + var encoded = map(labels, fn).join('.'); + return result + encoded; + } + + /** + * Creates an array containing the numeric code points of each Unicode + * character in the string. While JavaScript uses UCS-2 internally, + * this function will convert a pair of surrogate halves (each of which + * UCS-2 exposes as separate characters) into a single code point, + * matching UTF-16. + * @see `punycode.ucs2.encode` + * @see + * @memberOf punycode.ucs2 + * @name decode + * @param {String} string The Unicode input string (UCS-2). + * @returns {Array} The new array of code points. + */ + function ucs2decode(string) { + var output = [], + counter = 0, + length = string.length, + value, + extra; + while (counter < length) { + value = string.charCodeAt(counter++); + if (value >= 0xD800 && value <= 0xDBFF && counter < length) { + // high surrogate, and there is a next character + extra = string.charCodeAt(counter++); + if ((extra & 0xFC00) == 0xDC00) { // low surrogate + output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000); + } else { + // unmatched surrogate; only append this code unit, in case the next + // code unit is the high surrogate of a surrogate pair + output.push(value); + counter--; + } + } else { + output.push(value); + } + } + return output; + } + + /** + * Creates a string based on an array of numeric code points. + * @see `punycode.ucs2.decode` + * @memberOf punycode.ucs2 + * @name encode + * @param {Array} codePoints The array of numeric code points. + * @returns {String} The new Unicode string (UCS-2). + */ + function ucs2encode(array) { + return map(array, function(value) { + var output = ''; + if (value > 0xFFFF) { + value -= 0x10000; + output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800); + value = 0xDC00 | value & 0x3FF; + } + output += stringFromCharCode(value); + return output; + }).join(''); + } + + /** + * Converts a basic code point into a digit/integer. + * @see `digitToBasic()` + * @private + * @param {Number} codePoint The basic numeric code point value. + * @returns {Number} The numeric value of a basic code point (for use in + * representing integers) in the range `0` to `base - 1`, or `base` if + * the code point does not represent a value. + */ + function basicToDigit(codePoint) { + if (codePoint - 48 < 10) { + return codePoint - 22; + } + if (codePoint - 65 < 26) { + return codePoint - 65; + } + if (codePoint - 97 < 26) { + return codePoint - 97; + } + return base; + } + + /** + * Converts a digit/integer into a basic code point. + * @see `basicToDigit()` + * @private + * @param {Number} digit The numeric value of a basic code point. + * @returns {Number} The basic code point whose value (when used for + * representing integers) is `digit`, which needs to be in the range + * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is + * used; else, the lowercase form is used. The behavior is undefined + * if `flag` is non-zero and `digit` has no uppercase form. + */ + function digitToBasic(digit, flag) { + // 0..25 map to ASCII a..z or A..Z + // 26..35 map to ASCII 0..9 + return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5); + } + + /** + * Bias adaptation function as per section 3.4 of RFC 3492. + * https://tools.ietf.org/html/rfc3492#section-3.4 + * @private + */ + function adapt(delta, numPoints, firstTime) { + var k = 0; + delta = firstTime ? floor(delta / damp) : delta >> 1; + delta += floor(delta / numPoints); + for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) { + delta = floor(delta / baseMinusTMin); + } + return floor(k + (baseMinusTMin + 1) * delta / (delta + skew)); + } + + /** + * Converts a Punycode string of ASCII-only symbols to a string of Unicode + * symbols. + * @memberOf punycode + * @param {String} input The Punycode string of ASCII-only symbols. + * @returns {String} The resulting string of Unicode symbols. + */ + function decode(input) { + // Don't use UCS-2 + var output = [], + inputLength = input.length, + out, + i = 0, + n = initialN, + bias = initialBias, + basic, + j, + index, + oldi, + w, + k, + digit, + t, + /** Cached calculation results */ + baseMinusT; + + // Handle the basic code points: let `basic` be the number of input code + // points before the last delimiter, or `0` if there is none, then copy + // the first basic code points to the output. + + basic = input.lastIndexOf(delimiter); + if (basic < 0) { + basic = 0; + } + + for (j = 0; j < basic; ++j) { + // if it's not a basic code point + if (input.charCodeAt(j) >= 0x80) { + error('not-basic'); + } + output.push(input.charCodeAt(j)); + } + + // Main decoding loop: start just after the last delimiter if any basic code + // points were copied; start at the beginning otherwise. + + for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) { + + // `index` is the index of the next character to be consumed. + // Decode a generalized variable-length integer into `delta`, + // which gets added to `i`. The overflow checking is easier + // if we increase `i` as we go, then subtract off its starting + // value at the end to obtain `delta`. + for (oldi = i, w = 1, k = base; /* no condition */; k += base) { + + if (index >= inputLength) { + error('invalid-input'); + } + + digit = basicToDigit(input.charCodeAt(index++)); + + if (digit >= base || digit > floor((maxInt - i) / w)) { + error('overflow'); + } + + i += digit * w; + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + + if (digit < t) { + break; + } + + baseMinusT = base - t; + if (w > floor(maxInt / baseMinusT)) { + error('overflow'); + } + + w *= baseMinusT; + + } + + out = output.length + 1; + bias = adapt(i - oldi, out, oldi == 0); + + // `i` was supposed to wrap around from `out` to `0`, + // incrementing `n` each time, so we'll fix that now: + if (floor(i / out) > maxInt - n) { + error('overflow'); + } + + n += floor(i / out); + i %= out; + + // Insert `n` at position `i` of the output + output.splice(i++, 0, n); + + } + + return ucs2encode(output); + } + + /** + * Converts a string of Unicode symbols (e.g. a domain name label) to a + * Punycode string of ASCII-only symbols. + * @memberOf punycode + * @param {String} input The string of Unicode symbols. + * @returns {String} The resulting Punycode string of ASCII-only symbols. + */ + function encode(input) { + var n, + delta, + handledCPCount, + basicLength, + bias, + j, + m, + q, + k, + t, + currentValue, + output = [], + /** `inputLength` will hold the number of code points in `input`. */ + inputLength, + /** Cached calculation results */ + handledCPCountPlusOne, + baseMinusT, + qMinusT; + + // Convert the input in UCS-2 to Unicode + input = ucs2decode(input); + + // Cache the length + inputLength = input.length; + + // Initialize the state + n = initialN; + delta = 0; + bias = initialBias; + + // Handle the basic code points + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue < 0x80) { + output.push(stringFromCharCode(currentValue)); + } + } + + handledCPCount = basicLength = output.length; + + // `handledCPCount` is the number of code points that have been handled; + // `basicLength` is the number of basic code points. + + // Finish the basic string - if it is not empty - with a delimiter + if (basicLength) { + output.push(delimiter); + } + + // Main encoding loop: + while (handledCPCount < inputLength) { + + // All non-basic code points < n have been handled already. Find the next + // larger one: + for (m = maxInt, j = 0; j < inputLength; ++j) { + currentValue = input[j]; + if (currentValue >= n && currentValue < m) { + m = currentValue; + } + } + + // Increase `delta` enough to advance the decoder's state to , + // but guard against overflow + handledCPCountPlusOne = handledCPCount + 1; + if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { + error('overflow'); + } + + delta += (m - n) * handledCPCountPlusOne; + n = m; + + for (j = 0; j < inputLength; ++j) { + currentValue = input[j]; + + if (currentValue < n && ++delta > maxInt) { + error('overflow'); + } + + if (currentValue == n) { + // Represent delta as a generalized variable-length integer + for (q = delta, k = base; /* no condition */; k += base) { + t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias); + if (q < t) { + break; + } + qMinusT = q - t; + baseMinusT = base - t; + output.push( + stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)) + ); + q = floor(qMinusT / baseMinusT); + } + + output.push(stringFromCharCode(digitToBasic(q, 0))); + bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength); + delta = 0; + ++handledCPCount; + } + } + + ++delta; + ++n; + + } + return output.join(''); + } + + /** + * Converts a Punycode string representing a domain name or an email address + * to Unicode. Only the Punycoded parts of the input will be converted, i.e. + * it doesn't matter if you call it on a string that has already been + * converted to Unicode. + * @memberOf punycode + * @param {String} input The Punycoded domain name or email address to + * convert to Unicode. + * @returns {String} The Unicode representation of the given Punycode + * string. + */ + function toUnicode(input) { + return mapDomain(input, function(string) { + return regexPunycode.test(string) + ? decode(string.slice(4).toLowerCase()) + : string; + }); + } + + /** + * Converts a Unicode string representing a domain name or an email address to + * Punycode. Only the non-ASCII parts of the domain name will be converted, + * i.e. it doesn't matter if you call it with a domain that's already in + * ASCII. + * @memberOf punycode + * @param {String} input The domain name or email address to convert, as a + * Unicode string. + * @returns {String} The Punycode representation of the given domain name or + * email address. + */ + function toASCII(input) { + return mapDomain(input, function(string) { + return regexNonASCII.test(string) + ? 'xn--' + encode(string) + : string; + }); + } + + /*--------------------------------------------------------------------------*/ + + /** Define the public API */ + punycode = { + /** + * A string representing the current Punycode.js version number. + * @memberOf punycode + * @type String + */ + 'version': '1.4.1', + /** + * An object of methods to convert from JavaScript's internal character + * representation (UCS-2) to Unicode code points, and back. + * @see + * @memberOf punycode + * @type Object + */ + 'ucs2': { + 'decode': ucs2decode, + 'encode': ucs2encode + }, + 'decode': decode, + 'encode': encode, + 'toASCII': toASCII, + 'toUnicode': toUnicode + }; + + /** Expose `punycode` */ + // Some AMD build optimizers, like r.js, check for specific condition patterns + // like the following: + if ( + typeof define == 'function' && + typeof define.amd == 'object' && + define.amd + ) { + define('punycode', function() { + return punycode; + }); + } else if (freeExports && freeModule) { + if (module.exports == freeExports) { + // in Node.js, io.js, or RingoJS v0.8.0+ + freeModule.exports = punycode; + } else { + // in Narwhal or RingoJS v0.7.0- + for (key in punycode) { + punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]); + } + } + } else { + // in Rhino or a web browser + root.punycode = punycode; + } + +}(this)); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.editorconfig b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.editorconfig new file mode 100644 index 0000000..b2654e7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.editorconfig @@ -0,0 +1,30 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 140 + +[test/*] +max_line_length = off + +[*.md] +max_line_length = off + +[*.json] +max_line_length = off + +[Makefile] +max_line_length = off + +[CHANGELOG.md] +indent_style = space +indent_size = 2 + +[LICENSE] +indent_size = 2 +max_line_length = off diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintignore new file mode 100644 index 0000000..1521c8b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintignore @@ -0,0 +1 @@ +dist diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintrc b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintrc new file mode 100644 index 0000000..a33d179 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/.eslintrc @@ -0,0 +1,19 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "complexity": [2, 28], + "consistent-return": 1, + "func-name-matching": 0, + "id-length": [2, { "min": 1, "max": 25, "properties": "never" }], + "indent": [2, 4], + "max-params": [2, 12], + "max-statements": [2, 45], + "no-continue": 1, + "no-magic-numbers": 0, + "no-restricted-syntax": [2, "BreakStatement", "DebuggerStatement", "ForInStatement", "LabeledStatement", "WithStatement"], + "operator-linebreak": [2, "before"], + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/CHANGELOG.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/CHANGELOG.md new file mode 100644 index 0000000..71d5a3e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/CHANGELOG.md @@ -0,0 +1,221 @@ +## **6.5.1** +- [Fix] Fix parsing & compacting very deep objects (#224) +- [Refactor] name utils functions +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` +- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node +- [Tests] Use precise dist for Node.js 0.6 runtime (#225) +- [Tests] make 0.6 required, now that it’s passing +- [Tests] on `node` `v8.2`; fix npm on node 0.6 + +## **6.5.0** +- [New] add `utils.assign` +- [New] pass default encoder/decoder to custom encoder/decoder functions (#206) +- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213) +- [Fix] Handle stringifying empty objects with addQueryPrefix (#217) +- [Fix] do not mutate `options` argument (#207) +- [Refactor] `parse`: cache index to reuse in else statement (#182) +- [Docs] add various badges to readme (#208) +- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape` +- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4 +- [Tests] add `editorconfig-tools` + +## **6.4.0** +- [New] `qs.stringify`: add `encodeValuesOnly` option +- [Fix] follow `allowPrototypes` option during merge (#201, #201) +- [Fix] support keys starting with brackets (#202, #200) +- [Fix] chmod a-x +- [Dev Deps] update `eslint` +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds +- [eslint] reduce warnings + +## **6.3.2** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Dev Deps] update `eslint` +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.3.1** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape` +- [Tests] on all node minors; improve test matrix +- [Docs] document stringify option `allowDots` (#195) +- [Docs] add empty object and array values example (#195) +- [Docs] Fix minor inconsistency/typo (#192) +- [Docs] document stringify option `sort` (#191) +- [Refactor] `stringify`: throw faster with an invalid encoder +- [Refactor] remove unnecessary escapes (#184) +- Remove contributing.md, since `qs` is no longer part of `hapi` (#183) + +## **6.3.0** +- [New] Add support for RFC 1738 (#174, #173) +- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159) +- [Fix] ensure `utils.merge` handles merging two arrays +- [Refactor] only constructors should be capitalized +- [Refactor] capitalized var names are for constructors only +- [Refactor] avoid using a sparse array +- [Robustness] `formats`: cache `String#replace` +- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest` +- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix +- [Tests] flesh out arrayLimit/arrayFormat tests (#107) +- [Tests] skip Object.create tests when null objects are not available +- [Tests] Turn on eslint for test files (#175) + +## **6.2.3** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.2.2** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties + +## **6.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values +- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call` +- [Tests] remove `parallelshell` since it does not reliably report failures +- [Tests] up to `node` `v6.3`, `v5.12` +- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv` + +## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed) +- [New] pass Buffers to the encoder/decoder directly (#161) +- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160) +- [Fix] fix compacting of nested sparse arrays (#150) + +## **6.1.2 +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.1.1** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties + +## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed) +- [New] allowDots option for `stringify` (#151) +- [Fix] "sort" option should work at a depth of 3 or more (#151) +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## **6.0.4** +- [Fix] follow `allowPrototypes` option during merge (#201, #200) +- [Fix] chmod a-x +- [Fix] support keys starting with brackets (#202, #200) +- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds + +## **6.0.3** +- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties +- [Fix] Restore `dist` directory; will be removed in v7 (#148) + +## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed) +- Revert ES6 requirement and restore support for node down to v0.8. + +## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed) +- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json + +## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed) +- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4 + +## **5.2.1** +- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values + +## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed) +- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string + +## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed) +- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional +- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify + +## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed) +- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false +- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm + +## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed) +- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional + +## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed) +- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation" + +## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed) +- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties +- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost +- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing +- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object +- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option +- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects. +- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47 +- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986 +- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign +- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute + +## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed) +- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object # is not a function + +## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed) +- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option + +## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed) +- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57 +- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader + +## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed) +- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object + +## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed) +- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". + +## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed) +- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46 + +## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed) +- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer? +- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45 +- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39 + +## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed) +- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number + +## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed) +- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array +- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x + +## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed) +- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value +- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty +- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver? + +## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed) +- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31 +- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects + +## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed) +- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present +- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays +- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge +- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters? + +## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed) +- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter + +## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed) +- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit? +- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit +- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20 + +## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed) +- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values + +## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed) +- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters +- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block + +## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed) +- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument +- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed + +## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed) +- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted +- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null +- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README + +## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed) +- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/LICENSE new file mode 100644 index 0000000..d456948 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2014 Nathan LaFreniere and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/README.md new file mode 100644 index 0000000..d811966 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/README.md @@ -0,0 +1,475 @@ +# qs [![Version Badge][2]][1] + +[![Build Status][3]][4] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +A querystring parsing and stringifying library with some added security. + +Lead Maintainer: [Jordan Harband](https://github.com/ljharb) + +The **qs** module was originally created and maintained by [TJ Holowaychuk](https://github.com/visionmedia/node-querystring). + +## Usage + +```javascript +var qs = require('qs'); +var assert = require('assert'); + +var obj = qs.parse('a=c'); +assert.deepEqual(obj, { a: 'c' }); + +var str = qs.stringify(obj); +assert.equal(str, 'a=c'); +``` + +### Parsing Objects + +[](#preventEval) +```javascript +qs.parse(string, [options]); +``` + +**qs** allows you to create nested objects within your query strings, by surrounding the name of sub-keys with square brackets `[]`. +For example, the string `'foo[bar]=baz'` converts to: + +```javascript +assert.deepEqual(qs.parse('foo[bar]=baz'), { + foo: { + bar: 'baz' + } +}); +``` + +When using the `plainObjects` option the parsed value is returned as a null object, created via `Object.create(null)` and as such you should be aware that prototype methods will not exist on it and a user may set those names to whatever value they like: + +```javascript +var nullObject = qs.parse('a[hasOwnProperty]=b', { plainObjects: true }); +assert.deepEqual(nullObject, { a: { hasOwnProperty: 'b' } }); +``` + +By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use `plainObjects` as mentioned above, or set `allowPrototypes` to `true` which will allow user input to overwrite those properties. *WARNING* It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option. + +```javascript +var protoObject = qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }); +assert.deepEqual(protoObject, { a: { hasOwnProperty: 'b' } }); +``` + +URI encoded strings work too: + +```javascript +assert.deepEqual(qs.parse('a%5Bb%5D=c'), { + a: { b: 'c' } +}); +``` + +You can also nest your objects, like `'foo[bar][baz]=foobarbaz'`: + +```javascript +assert.deepEqual(qs.parse('foo[bar][baz]=foobarbaz'), { + foo: { + bar: { + baz: 'foobarbaz' + } + } +}); +``` + +By default, when nesting objects **qs** will only parse up to 5 children deep. This means if you attempt to parse a string like +`'a[b][c][d][e][f][g][h][i]=j'` your resulting object will be: + +```javascript +var expected = { + a: { + b: { + c: { + d: { + e: { + f: { + '[g][h][i]': 'j' + } + } + } + } + } + } +}; +var string = 'a[b][c][d][e][f][g][h][i]=j'; +assert.deepEqual(qs.parse(string), expected); +``` + +This depth can be overridden by passing a `depth` option to `qs.parse(string, [options])`: + +```javascript +var deep = qs.parse('a[b][c][d][e][f][g][h][i]=j', { depth: 1 }); +assert.deepEqual(deep, { a: { b: { '[c][d][e][f][g][h][i]': 'j' } } }); +``` + +The depth limit helps mitigate abuse when **qs** is used to parse user input, and it is recommended to keep it a reasonably small number. + +For similar reasons, by default **qs** will only parse up to 1000 parameters. This can be overridden by passing a `parameterLimit` option: + +```javascript +var limited = qs.parse('a=b&c=d', { parameterLimit: 1 }); +assert.deepEqual(limited, { a: 'b' }); +``` + +To bypass the leading question mark, use `ignoreQueryPrefix`: + +```javascript +var prefixed = qs.parse('?a=b&c=d', { ignoreQueryPrefix: true }); +assert.deepEqual(prefixed, { a: 'b', c: 'd' }); +``` + +An optional delimiter can also be passed: + +```javascript +var delimited = qs.parse('a=b;c=d', { delimiter: ';' }); +assert.deepEqual(delimited, { a: 'b', c: 'd' }); +``` + +Delimiters can be a regular expression too: + +```javascript +var regexed = qs.parse('a=b;c=d,e=f', { delimiter: /[;,]/ }); +assert.deepEqual(regexed, { a: 'b', c: 'd', e: 'f' }); +``` + +Option `allowDots` can be used to enable dot notation: + +```javascript +var withDots = qs.parse('a.b=c', { allowDots: true }); +assert.deepEqual(withDots, { a: { b: 'c' } }); +``` + +### Parsing Arrays + +**qs** can also parse arrays using a similar `[]` notation: + +```javascript +var withArray = qs.parse('a[]=b&a[]=c'); +assert.deepEqual(withArray, { a: ['b', 'c'] }); +``` + +You may specify an index as well: + +```javascript +var withIndexes = qs.parse('a[1]=c&a[0]=b'); +assert.deepEqual(withIndexes, { a: ['b', 'c'] }); +``` + +Note that the only difference between an index in an array and a key in an object is that the value between the brackets must be a number +to create an array. When creating arrays with specific indices, **qs** will compact a sparse array to only the existing values preserving +their order: + +```javascript +var noSparse = qs.parse('a[1]=b&a[15]=c'); +assert.deepEqual(noSparse, { a: ['b', 'c'] }); +``` + +Note that an empty string is also a value, and will be preserved: + +```javascript +var withEmptyString = qs.parse('a[]=&a[]=b'); +assert.deepEqual(withEmptyString, { a: ['', 'b'] }); + +var withIndexedEmptyString = qs.parse('a[0]=b&a[1]=&a[2]=c'); +assert.deepEqual(withIndexedEmptyString, { a: ['b', '', 'c'] }); +``` + +**qs** will also limit specifying indices in an array to a maximum index of `20`. Any array members with an index of greater than `20` will +instead be converted to an object with the index as the key: + +```javascript +var withMaxIndex = qs.parse('a[100]=b'); +assert.deepEqual(withMaxIndex, { a: { '100': 'b' } }); +``` + +This limit can be overridden by passing an `arrayLimit` option: + +```javascript +var withArrayLimit = qs.parse('a[1]=b', { arrayLimit: 0 }); +assert.deepEqual(withArrayLimit, { a: { '1': 'b' } }); +``` + +To disable array parsing entirely, set `parseArrays` to `false`. + +```javascript +var noParsingArrays = qs.parse('a[]=b', { parseArrays: false }); +assert.deepEqual(noParsingArrays, { a: { '0': 'b' } }); +``` + +If you mix notations, **qs** will merge the two items into an object: + +```javascript +var mixedNotation = qs.parse('a[0]=b&a[b]=c'); +assert.deepEqual(mixedNotation, { a: { '0': 'b', b: 'c' } }); +``` + +You can also create arrays of objects: + +```javascript +var arraysOfObjects = qs.parse('a[][b]=c'); +assert.deepEqual(arraysOfObjects, { a: [{ b: 'c' }] }); +``` + +### Stringifying + +[](#preventEval) +```javascript +qs.stringify(object, [options]); +``` + +When stringifying, **qs** by default URI encodes output. Objects are stringified as you would expect: + +```javascript +assert.equal(qs.stringify({ a: 'b' }), 'a=b'); +assert.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); +``` + +This encoding can be disabled by setting the `encode` option to `false`: + +```javascript +var unencoded = qs.stringify({ a: { b: 'c' } }, { encode: false }); +assert.equal(unencoded, 'a[b]=c'); +``` + +Encoding can be disabled for keys by setting the `encodeValuesOnly` option to `true`: +```javascript +var encodedValues = qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true } +); +assert.equal(encodedValues,'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h'); +``` + +This encoding can also be replaced by a custom encoding method set as `encoder` option: + +```javascript +var encoded = qs.stringify({ a: { b: 'c' } }, { encoder: function (str) { + // Passed in values `a`, `b`, `c` + return // Return encoded string +}}) +``` + +_(Note: the `encoder` option does not apply if `encode` is `false`)_ + +Analogue to the `encoder` there is a `decoder` option for `parse` to override decoding of properties and values: + +```javascript +var decoded = qs.parse('x=z', { decoder: function (str) { + // Passed in values `x`, `z` + return // Return decoded string +}}) +``` + +Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage. + +When arrays are stringified, by default they are given explicit indices: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }); +// 'a[0]=b&a[1]=c&a[2]=d' +``` + +You may override this by setting the `indices` option to `false`: + +```javascript +qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }); +// 'a=b&a=c&a=d' +``` + +You may use the `arrayFormat` option to specify the format of the output array: + +```javascript +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) +// 'a[0]=b&a[1]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) +// 'a[]=b&a[]=c' +qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) +// 'a=b&a=c' +``` + +When objects are stringified, by default they use bracket notation: + +```javascript +qs.stringify({ a: { b: { c: 'd', e: 'f' } } }); +// 'a[b][c]=d&a[b][e]=f' +``` + +You may override this to use dot notation by setting the `allowDots` option to `true`: + +```javascript +qs.stringify({ a: { b: { c: 'd', e: 'f' } } }, { allowDots: true }); +// 'a.b.c=d&a.b.e=f' +``` + +Empty strings and null values will omit the value, but the equals sign (=) remains in place: + +```javascript +assert.equal(qs.stringify({ a: '' }), 'a='); +``` + +Key with no values (such as an empty object or array) will return nothing: + +```javascript +assert.equal(qs.stringify({ a: [] }), ''); +assert.equal(qs.stringify({ a: {} }), ''); +assert.equal(qs.stringify({ a: [{}] }), ''); +assert.equal(qs.stringify({ a: { b: []} }), ''); +assert.equal(qs.stringify({ a: { b: {}} }), ''); +``` + +Properties that are set to `undefined` will be omitted entirely: + +```javascript +assert.equal(qs.stringify({ a: null, b: undefined }), 'a='); +``` + +The query string may optionally be prepended with a question mark: + +```javascript +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { addQueryPrefix: true }), '?a=b&c=d'); +``` + +The delimiter may be overridden with stringify as well: + +```javascript +assert.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); +``` + +If you only want to override the serialization of `Date` objects, you can provide a `serializeDate` option: + +```javascript +var date = new Date(7); +assert.equal(qs.stringify({ a: date }), 'a=1970-01-01T00:00:00.007Z'.replace(/:/g, '%3A')); +assert.equal( + qs.stringify({ a: date }, { serializeDate: function (d) { return d.getTime(); } }), + 'a=7' +); +``` + +You may use the `sort` option to affect the order of parameter keys: + +```javascript +function alphabeticalSort(a, b) { + return a.localeCompare(b); +} +assert.equal(qs.stringify({ a: 'c', z: 'y', b : 'f' }, { sort: alphabeticalSort }), 'a=c&b=f&z=y'); +``` + +Finally, you can use the `filter` option to restrict which keys will be included in the stringified output. +If you pass a function, it will be called for each key to obtain the replacement value. Otherwise, if you +pass an array, it will be used to select properties and array indices for stringification: + +```javascript +function filterFunc(prefix, value) { + if (prefix == 'b') { + // Return an `undefined` value to omit a property. + return; + } + if (prefix == 'e[f]') { + return value.getTime(); + } + if (prefix == 'e[g][0]') { + return value * 2; + } + return value; +} +qs.stringify({ a: 'b', c: 'd', e: { f: new Date(123), g: [2] } }, { filter: filterFunc }); +// 'a=b&c=d&e[f]=123&e[g][0]=4' +qs.stringify({ a: 'b', c: 'd', e: 'f' }, { filter: ['a', 'e'] }); +// 'a=b&e=f' +qs.stringify({ a: ['b', 'c', 'd'], e: 'f' }, { filter: ['a', 0, 2] }); +// 'a[0]=b&a[2]=d' +``` + +### Handling of `null` values + +By default, `null` values are treated like empty strings: + +```javascript +var withNull = qs.stringify({ a: null, b: '' }); +assert.equal(withNull, 'a=&b='); +``` + +Parsing does not distinguish between parameters with and without equal signs. Both are converted to empty strings. + +```javascript +var equalsInsensitive = qs.parse('a&b='); +assert.deepEqual(equalsInsensitive, { a: '', b: '' }); +``` + +To distinguish between `null` values and empty strings use the `strictNullHandling` flag. In the result string the `null` +values have no `=` sign: + +```javascript +var strictNull = qs.stringify({ a: null, b: '' }, { strictNullHandling: true }); +assert.equal(strictNull, 'a&b='); +``` + +To parse values without `=` back to `null` use the `strictNullHandling` flag: + +```javascript +var parsedStrictNull = qs.parse('a&b=', { strictNullHandling: true }); +assert.deepEqual(parsedStrictNull, { a: null, b: '' }); +``` + +To completely skip rendering keys with `null` values, use the `skipNulls` flag: + +```javascript +var nullsSkipped = qs.stringify({ a: 'b', c: null}, { skipNulls: true }); +assert.equal(nullsSkipped, 'a=b'); +``` + +### Dealing with special character sets + +By default the encoding and decoding of characters is done in `utf-8`. If you +wish to encode querystrings to a different character set (i.e. +[Shift JIS](https://en.wikipedia.org/wiki/Shift_JIS)) you can use the +[`qs-iconv`](https://github.com/martinheidegger/qs-iconv) library: + +```javascript +var encoder = require('qs-iconv/encoder')('shift_jis'); +var shiftJISEncoded = qs.stringify({ a: 'こんにちは!' }, { encoder: encoder }); +assert.equal(shiftJISEncoded, 'a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I'); +``` + +This also works for decoding of query strings: + +```javascript +var decoder = require('qs-iconv/decoder')('shift_jis'); +var obj = qs.parse('a=%82%B1%82%F1%82%C9%82%BF%82%CD%81I', { decoder: decoder }); +assert.deepEqual(obj, { a: 'こんにちは!' }); +``` + +### RFC 3986 and RFC 1738 space encoding + +RFC3986 used as default option and encodes ' ' to *%20* which is backward compatible. +In the same time, output can be stringified as per RFC1738 with ' ' equal to '+'. + +``` +assert.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); +assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC3986' }), 'a=b%20c'); +assert.equal(qs.stringify({ a: 'b c' }, { format : 'RFC1738' }), 'a=b+c'); +``` + +[1]: https://npmjs.org/package/qs +[2]: http://versionbadg.es/ljharb/qs.svg +[3]: https://api.travis-ci.org/ljharb/qs.svg +[4]: https://travis-ci.org/ljharb/qs +[5]: https://david-dm.org/ljharb/qs.svg +[6]: https://david-dm.org/ljharb/qs +[7]: https://david-dm.org/ljharb/qs/dev-status.svg +[8]: https://david-dm.org/ljharb/qs?type=dev +[9]: https://ci.testling.com/ljharb/qs.png +[10]: https://ci.testling.com/ljharb/qs +[11]: https://nodei.co/npm/qs.png?downloads=true&stars=true +[license-image]: http://img.shields.io/npm/l/qs.svg +[license-url]: LICENSE +[downloads-image]: http://img.shields.io/npm/dm/qs.svg +[downloads-url]: http://npm-stat.com/charts.html?package=qs diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/dist/qs.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/dist/qs.js new file mode 100644 index 0000000..713c6d1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/dist/qs.js @@ -0,0 +1,627 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Qs = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]') { + obj = []; + obj = obj.concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts ? utils.assign({}, opts) : {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; + options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = utils.merge(obj, newObj, options); + } + + return utils.compact(obj); +}; + +},{"./utils":5}],4:[function(require,module,exports){ +'use strict'; + +var utils = require('./utils'); +var formats = require('./formats'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + return prefix + '[]'; + }, + indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + return prefix; + } +}; + +var toISO = Date.prototype.toISOString; + +var defaults = { + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var stringify = function stringify( // eslint-disable-line func-name-matching + object, + prefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly +) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify( + obj[key], + generateArrayPrefix(prefix, key), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } else { + values = values.concat(stringify( + obj[key], + prefix + (allowDots ? '.' + key : '[' + key + ']'), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts ? utils.assign({}, opts) : {}; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; + var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; + if (typeof options.format === 'undefined') { + options.format = formats['default']; + } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { + throw new TypeError('Unknown format option provided.'); + } + var formatter = formats.formatters[options.format]; + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify( + obj[key], + key, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encode ? encoder : null, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + + var joined = keys.join(delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + return joined.length > 0 ? prefix + joined : ''; +}; + +},{"./formats":1,"./utils":5}],5:[function(require,module,exports){ +'use strict'; + +var has = Object.prototype.hasOwnProperty; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + var obj; + + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; + + if (Array.isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } + + return obj; +}; + +exports.arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function merge(target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + if (Array.isArray(target) && Array.isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + if (target[i] && typeof target[i] === 'object') { + target[i] = exports.merge(target[i], item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function encode(str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + return compactQueue(queue); +}; + +exports.isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function isBuffer(obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +},{}]},{},[2])(2) +}); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/formats.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/formats.js new file mode 100644 index 0000000..df45997 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/formats.js @@ -0,0 +1,18 @@ +'use strict'; + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +module.exports = { + 'default': 'RFC3986', + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return value; + } + }, + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/index.js new file mode 100644 index 0000000..0d6a97d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/index.js @@ -0,0 +1,11 @@ +'use strict'; + +var stringify = require('./stringify'); +var parse = require('./parse'); +var formats = require('./formats'); + +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/parse.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/parse.js new file mode 100644 index 0000000..8c9872e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/parse.js @@ -0,0 +1,174 @@ +'use strict'; + +var utils = require('./utils'); + +var has = Object.prototype.hasOwnProperty; + +var defaults = { + allowDots: false, + allowPrototypes: false, + arrayLimit: 20, + decoder: utils.decode, + delimiter: '&', + depth: 5, + parameterLimit: 1000, + plainObjects: false, + strictNullHandling: false +}; + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); + + for (var i = 0; i < parts.length; ++i) { + var part = parts[i]; + + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; + + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder); + val = options.decoder(part.slice(pos + 1), defaults.decoder); + } + if (has.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } + + return obj; +}; + +var parseObject = function (chain, val, options) { + var leaf = val; + + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; + + if (root === '[]') { + obj = []; + obj = obj.concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else { + obj[cleanRoot] = leaf; + } + } + + leaf = obj; + } + + return leaf; +}; + +var parseKeys = function parseQueryStringKeys(givenKey, val, options) { + if (!givenKey) { + return; + } + + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; + + // The regex chunks + + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; + + // Get the parent + + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; + + // Stash the parent if it exists + + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } + + keys.push(parent); + } + + // Loop through children appending to the array until we hit depth + + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } + + // If there's a remainder, just add whatever is left + + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } + + return parseObject(keys, val, options); +}; + +module.exports = function (str, opts) { + var options = opts ? utils.assign({}, opts) : {}; + + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } + + options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; + options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } + + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object + + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = utils.merge(obj, newObj, options); + } + + return utils.compact(obj); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/stringify.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/stringify.js new file mode 100644 index 0000000..ab915ac --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/stringify.js @@ -0,0 +1,210 @@ +'use strict'; + +var utils = require('./utils'); +var formats = require('./formats'); + +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + return prefix + '[]'; + }, + indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + return prefix; + } +}; + +var toISO = Date.prototype.toISOString; + +var defaults = { + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; + +var stringify = function stringify( // eslint-disable-line func-name-matching + object, + prefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly +) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; + } + + obj = ''; + } + + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } + + var values = []; + + if (typeof obj === 'undefined') { + return values; + } + + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + if (Array.isArray(obj)) { + values = values.concat(stringify( + obj[key], + generateArrayPrefix(prefix, key), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } else { + values = values.concat(stringify( + obj[key], + prefix + (allowDots ? '.' + key : '[' + key + ']'), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + } + + return values; +}; + +module.exports = function (object, opts) { + var obj = object; + var options = opts ? utils.assign({}, opts) : {}; + + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } + + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; + var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; + if (typeof options.format === 'undefined') { + options.format = formats['default']; + } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { + throw new TypeError('Unknown format option provided.'); + } + var formatter = formats.formatters[options.format]; + var objKeys; + var filter; + + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } + + var keys = []; + + if (typeof obj !== 'object' || obj === null) { + return ''; + } + + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } + + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; + + if (!objKeys) { + objKeys = Object.keys(obj); + } + + if (sort) { + objKeys.sort(sort); + } + + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; + + if (skipNulls && obj[key] === null) { + continue; + } + + keys = keys.concat(stringify( + obj[key], + key, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encode ? encoder : null, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + + var joined = keys.join(delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; + + return joined.length > 0 ? prefix + joined : ''; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/utils.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/utils.js new file mode 100644 index 0000000..06cae2f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/lib/utils.js @@ -0,0 +1,202 @@ +'use strict'; + +var has = Object.prototype.hasOwnProperty; + +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } + + return array; +}()); + +var compactQueue = function compactQueue(queue) { + var obj; + + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; + + if (Array.isArray(obj)) { + var compacted = []; + + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } + + item.obj[item.prop] = compacted; + } + } + + return obj; +}; + +exports.arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } + + return obj; +}; + +exports.merge = function merge(target, source, options) { + if (!source) { + return target; + } + + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } + + return target; + } + + if (typeof target !== 'object') { + return [target].concat(source); + } + + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = exports.arrayToObject(target, options); + } + + if (Array.isArray(target) && Array.isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + if (target[i] && typeof target[i] === 'object') { + target[i] = exports.merge(target[i], item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } + + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; + + if (has.call(acc, key)) { + acc[key] = exports.merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; + +exports.assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; + +exports.decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; + +exports.encode = function encode(str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } + + var string = typeof str === 'string' ? str : String(str); + + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); + + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +exports.compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + return compactQueue(queue); +}; + +exports.isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +exports.isBuffer = function isBuffer(obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/package.json new file mode 100644 index 0000000..84293bb --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "qs@~6.5.1", + "scope": null, + "escapedName": "qs", + "name": "qs", + "rawSpec": "~6.5.1", + "spec": ">=6.5.1 <6.6.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "qs@>=6.5.1 <6.6.0", + "_id": "qs@6.5.1", + "_inCache": true, + "_location": "/qs", + "_nodeVersion": "8.4.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/qs-6.5.1.tgz_1504943698164_0.10575866606086493" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "qs@~6.5.1", + "scope": null, + "escapedName": "qs", + "name": "qs", + "rawSpec": "~6.5.1", + "spec": ">=6.5.1 <6.6.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", + "_shasum": "349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8", + "_shrinkwrap": null, + "_spec": "qs@~6.5.1", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "bugs": { + "url": "https://github.com/ljharb/qs/issues" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "dependencies": {}, + "description": "A querystring parser that supports nesting and arrays, with a depth limit", + "devDependencies": { + "@ljharb/eslint-config": "^12.2.1", + "browserify": "^14.4.0", + "covert": "^1.1.0", + "editorconfig-tools": "^0.1.1", + "eslint": "^4.6.1", + "evalmd": "^0.0.17", + "iconv-lite": "^0.4.18", + "mkdirp": "^0.5.1", + "qs-iconv": "^1.0.4", + "safe-publish-latest": "^1.1.1", + "tape": "^4.8.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", + "shasum": "349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8", + "tarball": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "0e838daa71f91fecda456441ac64e615f38bed8b", + "homepage": "https://github.com/ljharb/qs", + "keywords": [ + "querystring", + "qs" + ], + "license": "BSD-3-Clause", + "main": "lib/index.js", + "maintainers": [ + { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + { + "name": "hueniverse", + "email": "eran@hammer.io" + }, + { + "name": "nlf", + "email": "quitlahok@gmail.com" + } + ], + "name": "qs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/qs.git" + }, + "scripts": { + "coverage": "covert test", + "dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js", + "lint": "eslint lib/*.js test/*.js", + "prelint": "editorconfig-tools check * lib/* test/*", + "prepublish": "safe-publish-latest && npm run dist", + "pretest": "npm run --silent readme && npm run --silent lint", + "readme": "evalmd README.md", + "test": "npm run --silent coverage", + "tests-only": "node test" + }, + "version": "6.5.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/.eslintrc b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/.eslintrc new file mode 100644 index 0000000..20175d6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/.eslintrc @@ -0,0 +1,15 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "consistent-return": 2, + "max-lines": 0, + "max-nested-callbacks": [2, 3], + "max-statements": 0, + "no-buffer-constructor": 0, + "no-extend-native": 0, + "no-magic-numbers": 0, + "object-curly-newline": 0, + "sort-keys": 0 + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/index.js new file mode 100644 index 0000000..5e6bc8f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/index.js @@ -0,0 +1,7 @@ +'use strict'; + +require('./parse'); + +require('./stringify'); + +require('./utils'); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/parse.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/parse.js new file mode 100644 index 0000000..d7d8641 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/parse.js @@ -0,0 +1,573 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var utils = require('../lib/utils'); +var iconv = require('iconv-lite'); + +test('parse()', function (t) { + t.test('parses a simple string', function (st) { + st.deepEqual(qs.parse('0=foo'), { 0: 'foo' }); + st.deepEqual(qs.parse('foo=c++'), { foo: 'c ' }); + st.deepEqual(qs.parse('a[>=]=23'), { a: { '>=': '23' } }); + st.deepEqual(qs.parse('a[<=>]==23'), { a: { '<=>': '=23' } }); + st.deepEqual(qs.parse('a[==]=23'), { a: { '==': '23' } }); + st.deepEqual(qs.parse('foo', { strictNullHandling: true }), { foo: null }); + st.deepEqual(qs.parse('foo'), { foo: '' }); + st.deepEqual(qs.parse('foo='), { foo: '' }); + st.deepEqual(qs.parse('foo=bar'), { foo: 'bar' }); + st.deepEqual(qs.parse(' foo = bar = baz '), { ' foo ': ' bar = baz ' }); + st.deepEqual(qs.parse('foo=bar=baz'), { foo: 'bar=baz' }); + st.deepEqual(qs.parse('foo=bar&bar=baz'), { foo: 'bar', bar: 'baz' }); + st.deepEqual(qs.parse('foo2=bar2&baz2='), { foo2: 'bar2', baz2: '' }); + st.deepEqual(qs.parse('foo=bar&baz', { strictNullHandling: true }), { foo: 'bar', baz: null }); + st.deepEqual(qs.parse('foo=bar&baz'), { foo: 'bar', baz: '' }); + st.deepEqual(qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World'), { + cht: 'p3', + chd: 't:60,40', + chs: '250x100', + chl: 'Hello|World' + }); + st.end(); + }); + + t.test('allows enabling dot notation', function (st) { + st.deepEqual(qs.parse('a.b=c'), { 'a.b': 'c' }); + st.deepEqual(qs.parse('a.b=c', { allowDots: true }), { a: { b: 'c' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[b]=c'), { a: { b: 'c' } }, 'parses a single nested string'); + t.deepEqual(qs.parse('a[b][c]=d'), { a: { b: { c: 'd' } } }, 'parses a double nested string'); + t.deepEqual( + qs.parse('a[b][c][d][e][f][g][h]=i'), + { a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } }, + 'defaults to a depth of 5' + ); + + t.test('only parses one level when depth = 1', function (st) { + st.deepEqual(qs.parse('a[b][c]=d', { depth: 1 }), { a: { b: { '[c]': 'd' } } }); + st.deepEqual(qs.parse('a[b][c][d]=e', { depth: 1 }), { a: { b: { '[c][d]': 'e' } } }); + st.end(); + }); + + t.deepEqual(qs.parse('a=b&a=c'), { a: ['b', 'c'] }, 'parses a simple array'); + + t.test('parses an explicit array', function (st) { + st.deepEqual(qs.parse('a[]=b'), { a: ['b'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a[]=c&a[]=d'), { a: ['b', 'c', 'd'] }); + st.end(); + }); + + t.test('parses a mix of simple and explicit arrays', function (st) { + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[0]=b&a=c'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[0]=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a[1]=b&a=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[]=b&a=c'), { a: ['b', 'c'] }); + + st.deepEqual(qs.parse('a=b&a[1]=c', { arrayLimit: 20 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c', { arrayLimit: 0 }), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a=b&a[]=c'), { a: ['b', 'c'] }); + + st.end(); + }); + + t.test('parses a nested array', function (st) { + st.deepEqual(qs.parse('a[b][]=c&a[b][]=d'), { a: { b: ['c', 'd'] } }); + st.deepEqual(qs.parse('a[>=]=25'), { a: { '>=': '25' } }); + st.end(); + }); + + t.test('allows to specify array indices', function (st) { + st.deepEqual(qs.parse('a[1]=c&a[0]=b&a[2]=d'), { a: ['b', 'c', 'd'] }); + st.deepEqual(qs.parse('a[1]=c&a[0]=b'), { a: ['b', 'c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 20 }), { a: ['c'] }); + st.deepEqual(qs.parse('a[1]=c', { arrayLimit: 0 }), { a: { 1: 'c' } }); + st.deepEqual(qs.parse('a[1]=c'), { a: ['c'] }); + st.end(); + }); + + t.test('limits specific array indices to arrayLimit', function (st) { + st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] }); + st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } }); + st.end(); + }); + + t.deepEqual(qs.parse('a[12b]=c'), { a: { '12b': 'c' } }, 'supports keys that begin with a number'); + + t.test('supports encoded = signs', function (st) { + st.deepEqual(qs.parse('he%3Dllo=th%3Dere'), { 'he=llo': 'th=ere' }); + st.end(); + }); + + t.test('is ok with url encoded strings', function (st) { + st.deepEqual(qs.parse('a[b%20c]=d'), { a: { 'b c': 'd' } }); + st.deepEqual(qs.parse('a[b]=c%20d'), { a: { b: 'c d' } }); + st.end(); + }); + + t.test('allows brackets in the value', function (st) { + st.deepEqual(qs.parse('pets=["tobi"]'), { pets: '["tobi"]' }); + st.deepEqual(qs.parse('operators=[">=", "<="]'), { operators: '[">=", "<="]' }); + st.end(); + }); + + t.test('allows empty values', function (st) { + st.deepEqual(qs.parse(''), {}); + st.deepEqual(qs.parse(null), {}); + st.deepEqual(qs.parse(undefined), {}); + st.end(); + }); + + t.test('transforms arrays to objects', function (st) { + st.deepEqual(qs.parse('foo[0]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[0]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar'), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo[bad]=baz'), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo'), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb'), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: false }), { a: { 0: 'b', t: 'u' } }); + st.deepEqual(qs.parse('a[]=b&a[t]=u&a[hasOwnProperty]=c', { allowPrototypes: true }), { a: { 0: 'b', t: 'u', hasOwnProperty: 'c' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: false }), { a: { 0: 'b', x: 'y' } }); + st.deepEqual(qs.parse('a[]=b&a[hasOwnProperty]=c&a[x]=y', { allowPrototypes: true }), { a: { 0: 'b', hasOwnProperty: 'c', x: 'y' } }); + st.end(); + }); + + t.test('transforms arrays to objects (dot notation)', function (st) { + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz=bar&fool.bad.boo=baz', { allowDots: true }), { foo: [{ baz: 'bar' }], fool: { bad: { boo: 'baz' } } }); + st.deepEqual(qs.parse('foo[0][0].baz=bar&fool.bad=baz', { allowDots: true }), { foo: [[{ baz: 'bar' }]], fool: { bad: 'baz' } }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15'], bar: '2' }] }); + st.deepEqual(qs.parse('foo[0].baz[0]=15&foo[0].baz[1]=16&foo[0].bar=2', { allowDots: true }), { foo: [{ baz: ['15', '16'], bar: '2' }] }); + st.deepEqual(qs.parse('foo.bad=baz&foo[0]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar' } }); + st.deepEqual(qs.parse('foo[]=bar&foo.bad=baz', { allowDots: true }), { foo: { 0: 'bar', bad: 'baz' } }); + st.deepEqual(qs.parse('foo.bad=baz&foo[]=bar&foo[]=foo', { allowDots: true }), { foo: { bad: 'baz', 0: 'bar', 1: 'foo' } }); + st.deepEqual(qs.parse('foo[0].a=a&foo[0].b=b&foo[1].a=aa&foo[1].b=bb', { allowDots: true }), { foo: [{ a: 'a', b: 'b' }, { a: 'aa', b: 'bb' }] }); + st.end(); + }); + + t.test('correctly prunes undefined values when converting an array to an object', function (st) { + st.deepEqual(qs.parse('a[2]=b&a[99999999]=c'), { a: { 2: 'b', 99999999: 'c' } }); + st.end(); + }); + + t.test('supports malformed uri characters', function (st) { + st.deepEqual(qs.parse('{%:%}', { strictNullHandling: true }), { '{%:%}': null }); + st.deepEqual(qs.parse('{%:%}='), { '{%:%}': '' }); + st.deepEqual(qs.parse('foo=%:%}'), { foo: '%:%}' }); + st.end(); + }); + + t.test('doesn\'t produce empty keys', function (st) { + st.deepEqual(qs.parse('_r=1&'), { _r: '1' }); + st.end(); + }); + + t.test('cannot access Object prototype', function (st) { + qs.parse('constructor[prototype][bad]=bad'); + qs.parse('bad[constructor][prototype][bad]=bad'); + st.equal(typeof Object.prototype.bad, 'undefined'); + st.end(); + }); + + t.test('parses arrays of objects', function (st) { + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + st.deepEqual(qs.parse('a[0][b]=c'), { a: [{ b: 'c' }] }); + st.end(); + }); + + t.test('allows for empty strings in arrays', function (st) { + st.deepEqual(qs.parse('a[]=b&a[]=&a[]=c'), { a: ['b', '', 'c'] }); + + st.deepEqual( + qs.parse('a[0]=b&a[1]&a[2]=c&a[19]=', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 20 + array indices: null then empty string works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]&a[]=c&a[]=', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', null, 'c', ''] }, + 'with arrayLimit 0 + array brackets: null then empty string works' + ); + + st.deepEqual( + qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]', { strictNullHandling: true, arrayLimit: 20 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 20 + array indices: empty string then null works' + ); + st.deepEqual( + qs.parse('a[]=b&a[]=&a[]=c&a[]', { strictNullHandling: true, arrayLimit: 0 }), + { a: ['b', '', 'c', null] }, + 'with arrayLimit 0 + array brackets: empty string then null works' + ); + + st.deepEqual( + qs.parse('a[]=&a[]=b&a[]=c'), + { a: ['', 'b', 'c'] }, + 'array brackets: empty strings work' + ); + st.end(); + }); + + t.test('compacts sparse arrays', function (st) { + st.deepEqual(qs.parse('a[10]=1&a[2]=2', { arrayLimit: 20 }), { a: ['2', '1'] }); + st.deepEqual(qs.parse('a[1][b][2][c]=1', { arrayLimit: 20 }), { a: [{ b: [{ c: '1' }] }] }); + st.deepEqual(qs.parse('a[1][2][3][c]=1', { arrayLimit: 20 }), { a: [[[{ c: '1' }]]] }); + st.deepEqual(qs.parse('a[1][2][3][c][1]=1', { arrayLimit: 20 }), { a: [[[{ c: ['1'] }]]] }); + st.end(); + }); + + t.test('parses semi-parsed strings', function (st) { + st.deepEqual(qs.parse({ 'a[b]': 'c' }), { a: { b: 'c' } }); + st.deepEqual(qs.parse({ 'a[b]': 'c', 'a[d]': 'e' }), { a: { b: 'c', d: 'e' } }); + st.end(); + }); + + t.test('parses buffers correctly', function (st) { + var b = new Buffer('test'); + st.deepEqual(qs.parse({ a: b }), { a: b }); + st.end(); + }); + + t.test('continues parsing when no parent is found', function (st) { + st.deepEqual(qs.parse('[]=&a=b'), { 0: '', a: 'b' }); + st.deepEqual(qs.parse('[]&a=b', { strictNullHandling: true }), { 0: null, a: 'b' }); + st.deepEqual(qs.parse('[foo]=bar'), { foo: 'bar' }); + st.end(); + }); + + t.test('does not error when parsing a very long array', function (st) { + var str = 'a[]=a'; + while (Buffer.byteLength(str) < 128 * 1024) { + str = str + '&' + str; + } + + st.doesNotThrow(function () { + qs.parse(str); + }); + + st.end(); + }); + + t.test('should not throw when a native prototype has an enumerable property', { parallel: false }, function (st) { + Object.prototype.crash = ''; + Array.prototype.crash = ''; + st.doesNotThrow(qs.parse.bind(null, 'a=b')); + st.deepEqual(qs.parse('a=b'), { a: 'b' }); + st.doesNotThrow(qs.parse.bind(null, 'a[][b]=c')); + st.deepEqual(qs.parse('a[][b]=c'), { a: [{ b: 'c' }] }); + delete Object.prototype.crash; + delete Array.prototype.crash; + st.end(); + }); + + t.test('parses a string with an alternative string delimiter', function (st) { + st.deepEqual(qs.parse('a=b;c=d', { delimiter: ';' }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('parses a string with an alternative RegExp delimiter', function (st) { + st.deepEqual(qs.parse('a=b; c=d', { delimiter: /[;,] */ }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not use non-splittable objects as delimiters', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { delimiter: true }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding parameter limit', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: 1 }), { a: 'b' }); + st.end(); + }); + + t.test('allows setting the parameter limit to Infinity', function (st) { + st.deepEqual(qs.parse('a=b&c=d', { parameterLimit: Infinity }), { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('allows overriding array limit', function (st) { + st.deepEqual(qs.parse('a[0]=b', { arrayLimit: -1 }), { a: { 0: 'b' } }); + st.deepEqual(qs.parse('a[-1]=b', { arrayLimit: -1 }), { a: { '-1': 'b' } }); + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 }), { a: { 0: 'b', 1: 'c' } }); + st.end(); + }); + + t.test('allows disabling array parsing', function (st) { + st.deepEqual(qs.parse('a[0]=b&a[1]=c', { parseArrays: false }), { a: { 0: 'b', 1: 'c' } }); + st.end(); + }); + + t.test('allows for query string prefix', function (st) { + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' }); + st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' }); + st.end(); + }); + + t.test('parses an object', function (st) { + var input = { + 'user[name]': { 'pop[bob]': 3 }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object in dot notation', function (st) { + var input = { + 'user.name': { 'pop[bob]': 3 }, + 'user.email.': null + }; + + var expected = { + user: { + name: { 'pop[bob]': 3 }, + email: null + } + }; + + var result = qs.parse(input, { allowDots: true }); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('parses an object and not child values', function (st) { + var input = { + 'user[name]': { 'pop[bob]': { test: 3 } }, + 'user[email]': null + }; + + var expected = { + user: { + name: { 'pop[bob]': { test: 3 } }, + email: null + } + }; + + var result = qs.parse(input); + + st.deepEqual(result, expected); + st.end(); + }); + + t.test('does not blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.parse('a=b&c=d'); + global.Buffer = tempBuffer; + st.deepEqual(result, { a: 'b', c: 'd' }); + st.end(); + }); + + t.test('does not crash when parsing circular references', function (st) { + var a = {}; + a.b = a; + + var parsed; + + st.doesNotThrow(function () { + parsed = qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + st.equal('bar' in parsed.foo, true); + st.equal('baz' in parsed.foo, true); + st.equal(parsed.foo.bar, 'baz'); + st.deepEqual(parsed.foo.baz, a); + st.end(); + }); + + t.test('does not crash when parsing deep objects', function (st) { + var parsed; + var str = 'foo'; + + for (var i = 0; i < 5000; i++) { + str += '[p]'; + } + + str += '=bar'; + + st.doesNotThrow(function () { + parsed = qs.parse(str, { depth: 5000 }); + }); + + st.equal('foo' in parsed, true, 'parsed has "foo" property'); + + var depth = 0; + var ref = parsed.foo; + while ((ref = ref.p)) { + depth += 1; + } + + st.equal(depth, 5000, 'parsed is 5000 properties deep'); + + st.end(); + }); + + t.test('parses null objects correctly', { skip: !Object.create }, function (st) { + var a = Object.create(null); + a.b = 'c'; + + st.deepEqual(qs.parse(a), { b: 'c' }); + var result = qs.parse({ a: a }); + st.equal('a' in result, true, 'result has "a" property'); + st.deepEqual(result.a, a); + st.end(); + }); + + t.test('parses dates correctly', function (st) { + var now = new Date(); + st.deepEqual(qs.parse({ a: now }), { a: now }); + st.end(); + }); + + t.test('parses regular expressions correctly', function (st) { + var re = /^test$/; + st.deepEqual(qs.parse({ a: re }), { a: re }); + st.end(); + }); + + t.test('does not allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: false }), {}); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: false }), {}); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: false }), + {}, + 'bare "toString" results in {}' + ); + + st.end(); + }); + + t.test('can allow overwriting prototype properties', function (st) { + st.deepEqual(qs.parse('a[hasOwnProperty]=b', { allowPrototypes: true }), { a: { hasOwnProperty: 'b' } }); + st.deepEqual(qs.parse('hasOwnProperty=b', { allowPrototypes: true }), { hasOwnProperty: 'b' }); + + st.deepEqual( + qs.parse('toString', { allowPrototypes: true }), + { toString: '' }, + 'bare "toString" results in { toString: "" }' + ); + + st.end(); + }); + + t.test('params starting with a closing bracket', function (st) { + st.deepEqual(qs.parse(']=toString'), { ']': 'toString' }); + st.deepEqual(qs.parse(']]=toString'), { ']]': 'toString' }); + st.deepEqual(qs.parse(']hello]=toString'), { ']hello]': 'toString' }); + st.end(); + }); + + t.test('params starting with a starting bracket', function (st) { + st.deepEqual(qs.parse('[=toString'), { '[': 'toString' }); + st.deepEqual(qs.parse('[[=toString'), { '[[': 'toString' }); + st.deepEqual(qs.parse('[hello[=toString'), { '[hello[': 'toString' }); + st.end(); + }); + + t.test('add keys to objects', function (st) { + st.deepEqual( + qs.parse('a[b]=c&a=d'), + { a: { b: 'c', d: true } }, + 'can add keys to objects' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString'), + { a: { b: 'c' } }, + 'can not overwrite prototype' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { allowPrototypes: true }), + { a: { b: 'c', toString: true } }, + 'can overwrite prototype with allowPrototypes true' + ); + + st.deepEqual( + qs.parse('a[b]=c&a=toString', { plainObjects: true }), + { a: { b: 'c', toString: true } }, + 'can overwrite prototype with plainObjects true' + ); + + st.end(); + }); + + t.test('can return null objects', { skip: !Object.create }, function (st) { + var expected = Object.create(null); + expected.a = Object.create(null); + expected.a.b = 'c'; + expected.a.hasOwnProperty = 'd'; + st.deepEqual(qs.parse('a[b]=c&a[hasOwnProperty]=d', { plainObjects: true }), expected); + st.deepEqual(qs.parse(null, { plainObjects: true }), Object.create(null)); + var expectedArray = Object.create(null); + expectedArray.a = Object.create(null); + expectedArray.a[0] = 'b'; + expectedArray.a.c = 'd'; + st.deepEqual(qs.parse('a[]=b&a[c]=d', { plainObjects: true }), expectedArray); + st.end(); + }); + + t.test('can parse with custom encoding', function (st) { + st.deepEqual(qs.parse('%8c%a7=%91%e5%8d%e3%95%7b', { + decoder: function (str) { + var reg = /%([0-9A-F]{2})/ig; + var result = []; + var parts = reg.exec(str); + while (parts) { + result.push(parseInt(parts[1], 16)); + parts = reg.exec(str); + } + return iconv.decode(new Buffer(result), 'shift_jis').toString(); + } + }), { 県: '大阪府' }); + st.end(); + }); + + t.test('receives the default decoder as a second argument', function (st) { + st.plan(1); + qs.parse('a', { + decoder: function (str, defaultDecoder) { + st.equal(defaultDecoder, utils.decode); + } + }); + st.end(); + }); + + t.test('throws error with wrong decoder', function (st) { + st['throws'](function () { + qs.parse({}, { decoder: 'string' }); + }, new TypeError('Decoder has to be a function.')); + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.parse('a[b]=true', options); + st.deepEqual(options, {}); + st.end(); + }); + + t.end(); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/stringify.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/stringify.js new file mode 100644 index 0000000..124a99d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/stringify.js @@ -0,0 +1,596 @@ +'use strict'; + +var test = require('tape'); +var qs = require('../'); +var utils = require('../lib/utils'); +var iconv = require('iconv-lite'); + +test('stringify()', function (t) { + t.test('stringifies a querystring object', function (st) { + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: 1 }), 'a=1'); + st.equal(qs.stringify({ a: 1, b: 2 }), 'a=1&b=2'); + st.equal(qs.stringify({ a: 'A_Z' }), 'a=A_Z'); + st.equal(qs.stringify({ a: '€' }), 'a=%E2%82%AC'); + st.equal(qs.stringify({ a: '' }), 'a=%EE%80%80'); + st.equal(qs.stringify({ a: 'א' }), 'a=%D7%90'); + st.equal(qs.stringify({ a: '𐐷' }), 'a=%F0%90%90%B7'); + st.end(); + }); + + t.test('adds query prefix', function (st) { + st.equal(qs.stringify({ a: 'b' }, { addQueryPrefix: true }), '?a=b'); + st.end(); + }); + + t.test('with query prefix, outputs blank string given an empty object', function (st) { + st.equal(qs.stringify({}, { addQueryPrefix: true }), ''); + st.end(); + }); + + t.test('stringifies a nested object', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }), 'a%5Bb%5D%5Bc%5D%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies a nested object with dots notation', function (st) { + st.equal(qs.stringify({ a: { b: 'c' } }, { allowDots: true }), 'a.b=c'); + st.equal(qs.stringify({ a: { b: { c: { d: 'e' } } } }, { allowDots: true }), 'a.b.c.d=e'); + st.end(); + }); + + t.test('stringifies an array value', function (st) { + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'indices' }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'brackets' }), + 'a%5B%5D=b&a%5B%5D=c&a%5B%5D=d', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: ['b', 'c', 'd'] }), + 'a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d', + 'default => indices' + ); + st.end(); + }); + + t.test('omits nulls when asked', function (st) { + st.equal(qs.stringify({ a: 'b', c: null }, { skipNulls: true }), 'a=b'); + st.end(); + }); + + t.test('omits nested nulls when asked', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: null } }, { skipNulls: true }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('omits array indices when asked', function (st) { + st.equal(qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false }), 'a=b&a=c&a=d'); + st.end(); + }); + + t.test('stringifies a nested array value', function (st) { + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'indices' }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { arrayFormat: 'brackets' }), 'a%5Bb%5D%5B%5D=c&a%5Bb%5D%5B%5D=d'); + st.equal(qs.stringify({ a: { b: ['c', 'd'] } }), 'a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d'); + st.end(); + }); + + t.test('stringifies a nested array value with dots notation', function (st) { + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a.b[0]=c&a.b[1]=d', + 'indices: stringifies with dots + indices' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a.b[]=c&a.b[]=d', + 'brackets: stringifies with dots + brackets' + ); + st.equal( + qs.stringify( + { a: { b: ['c', 'd'] } }, + { allowDots: true, encode: false } + ), + 'a.b[0]=c&a.b[1]=d', + 'default: stringifies with dots + indices' + ); + st.end(); + }); + + t.test('stringifies an object inside an array', function (st) { + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'indices' }), + 'a%5B0%5D%5Bb%5D=c', + 'indices => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }, { arrayFormat: 'brackets' }), + 'a%5B%5D%5Bb%5D=c', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 'c' }] }), + 'a%5B0%5D%5Bb%5D=c', + 'default => indices' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'indices' }), + 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', + 'indices => indices' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }, { arrayFormat: 'brackets' }), + 'a%5B%5D%5Bb%5D%5Bc%5D%5B%5D=1', + 'brackets => brackets' + ); + + st.equal( + qs.stringify({ a: [{ b: { c: [1] } }] }), + 'a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an array with mixed objects and primitives', function (st) { + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'indices' }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'indices => indices' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false, arrayFormat: 'brackets' }), + 'a[][b]=1&a[]=2&a[]=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify({ a: [{ b: 1 }, 2, 3] }, { encode: false }), + 'a[0][b]=1&a[1]=2&a[2]=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('stringifies an object inside an array with dots notation', function (st) { + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b=c', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b=c', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: 'c' }] }, + { allowDots: true, encode: false } + ), + 'a[0].b=c', + 'default => indices' + ); + + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'indices' } + ), + 'a[0].b.c[0]=1', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false, arrayFormat: 'brackets' } + ), + 'a[].b.c[]=1', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: [{ b: { c: [1] } }] }, + { allowDots: true, encode: false } + ), + 'a[0].b.c[0]=1', + 'default => indices' + ); + + st.end(); + }); + + t.test('does not omit object keys when indices = false', function (st) { + st.equal(qs.stringify({ a: [{ b: 'c' }] }, { indices: false }), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when indices=true', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { indices: true }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat is specified', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses indices notation for arrays when no arrayFormat=indices', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }), 'a%5B0%5D=b&a%5B1%5D=c'); + st.end(); + }); + + t.test('uses repeat notation for arrays when no arrayFormat=repeat', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }), 'a=b&a=c'); + st.end(); + }); + + t.test('uses brackets notation for arrays when no arrayFormat=brackets', function (st) { + st.equal(qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }), 'a%5B%5D=b&a%5B%5D=c'); + st.end(); + }); + + t.test('stringifies a complicated object', function (st) { + st.equal(qs.stringify({ a: { b: 'c', d: 'e' } }), 'a%5Bb%5D=c&a%5Bd%5D=e'); + st.end(); + }); + + t.test('stringifies an empty value', function (st) { + st.equal(qs.stringify({ a: '' }), 'a='); + st.equal(qs.stringify({ a: null }, { strictNullHandling: true }), 'a'); + + st.equal(qs.stringify({ a: '', b: '' }), 'a=&b='); + st.equal(qs.stringify({ a: null, b: '' }, { strictNullHandling: true }), 'a&b='); + + st.equal(qs.stringify({ a: { b: '' } }), 'a%5Bb%5D='); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: true }), 'a%5Bb%5D'); + st.equal(qs.stringify({ a: { b: null } }, { strictNullHandling: false }), 'a%5Bb%5D='); + + st.end(); + }); + + t.test('stringifies a null object', { skip: !Object.create }, function (st) { + var obj = Object.create(null); + obj.a = 'b'; + st.equal(qs.stringify(obj), 'a=b'); + st.end(); + }); + + t.test('returns an empty string for invalid input', function (st) { + st.equal(qs.stringify(undefined), ''); + st.equal(qs.stringify(false), ''); + st.equal(qs.stringify(null), ''); + st.equal(qs.stringify(''), ''); + st.end(); + }); + + t.test('stringifies an object with a null object as a child', { skip: !Object.create }, function (st) { + var obj = { a: Object.create(null) }; + + obj.a.b = 'c'; + st.equal(qs.stringify(obj), 'a%5Bb%5D=c'); + st.end(); + }); + + t.test('drops keys with a value of undefined', function (st) { + st.equal(qs.stringify({ a: undefined }), ''); + + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: true }), 'a%5Bc%5D'); + st.equal(qs.stringify({ a: { b: undefined, c: null } }, { strictNullHandling: false }), 'a%5Bc%5D='); + st.equal(qs.stringify({ a: { b: undefined, c: '' } }), 'a%5Bc%5D='); + st.end(); + }); + + t.test('url encodes values', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('stringifies a date', function (st) { + var now = new Date(); + var str = 'a=' + encodeURIComponent(now.toISOString()); + st.equal(qs.stringify({ a: now }), str); + st.end(); + }); + + t.test('stringifies the weird object from qs', function (st) { + st.equal(qs.stringify({ 'my weird field': '~q1!2"\'w$5&7/z8)?' }), 'my%20weird%20field=~q1%212%22%27w%245%267%2Fz8%29%3F'); + st.end(); + }); + + t.test('skips properties that are part of the object prototype', function (st) { + Object.prototype.crash = 'test'; + st.equal(qs.stringify({ a: 'b' }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }), 'a%5Bb%5D=c'); + delete Object.prototype.crash; + st.end(); + }); + + t.test('stringifies boolean values', function (st) { + st.equal(qs.stringify({ a: true }), 'a=true'); + st.equal(qs.stringify({ a: { b: true } }), 'a%5Bb%5D=true'); + st.equal(qs.stringify({ b: false }), 'b=false'); + st.equal(qs.stringify({ b: { c: false } }), 'b%5Bc%5D=false'); + st.end(); + }); + + t.test('stringifies buffer values', function (st) { + st.equal(qs.stringify({ a: new Buffer('test') }), 'a=test'); + st.equal(qs.stringify({ a: { b: new Buffer('test') } }), 'a%5Bb%5D=test'); + st.end(); + }); + + t.test('stringifies an object using an alternative delimiter', function (st) { + st.equal(qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' }), 'a=b;c=d'); + st.end(); + }); + + t.test('doesn\'t blow up when Buffer global is missing', function (st) { + var tempBuffer = global.Buffer; + delete global.Buffer; + var result = qs.stringify({ a: 'b', c: 'd' }); + global.Buffer = tempBuffer; + st.equal(result, 'a=b&c=d'); + st.end(); + }); + + t.test('selects properties when filter=array', function (st) { + st.equal(qs.stringify({ a: 'b' }, { filter: ['a'] }), 'a=b'); + st.equal(qs.stringify({ a: 1 }, { filter: [] }), ''); + + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'indices' } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'indices => indices' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2], arrayFormat: 'brackets' } + ), + 'a%5Bb%5D%5B%5D=1&a%5Bb%5D%5B%5D=3', + 'brackets => brackets' + ); + st.equal( + qs.stringify( + { a: { b: [1, 2, 3, 4], c: 'd' }, c: 'f' }, + { filter: ['a', 'b', 0, 2] } + ), + 'a%5Bb%5D%5B0%5D=1&a%5Bb%5D%5B2%5D=3', + 'default => indices' + ); + + st.end(); + }); + + t.test('supports custom representations when filter=function', function (st) { + var calls = 0; + var obj = { a: 'b', c: 'd', e: { f: new Date(1257894000000) } }; + var filterFunc = function (prefix, value) { + calls += 1; + if (calls === 1) { + st.equal(prefix, '', 'prefix is empty'); + st.equal(value, obj); + } else if (prefix === 'c') { + return void 0; + } else if (value instanceof Date) { + st.equal(prefix, 'e[f]'); + return value.getTime(); + } + return value; + }; + + st.equal(qs.stringify(obj, { filter: filterFunc }), 'a=b&e%5Bf%5D=1257894000000'); + st.equal(calls, 5); + st.end(); + }); + + t.test('can disable uri encoding', function (st) { + st.equal(qs.stringify({ a: 'b' }, { encode: false }), 'a=b'); + st.equal(qs.stringify({ a: { b: 'c' } }, { encode: false }), 'a[b]=c'); + st.equal(qs.stringify({ a: 'b', c: null }, { strictNullHandling: true, encode: false }), 'a=b&c'); + st.end(); + }); + + t.test('can sort the keys', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal(qs.stringify({ a: 'c', z: 'y', b: 'f' }, { sort: sort }), 'a=c&b=f&z=y'); + st.equal(qs.stringify({ a: 'c', z: { j: 'a', i: 'b' }, b: 'f' }, { sort: sort }), 'a=c&b=f&z%5Bi%5D=b&z%5Bj%5D=a'); + st.end(); + }); + + t.test('can sort the keys at depth 3 or more too', function (st) { + var sort = function (a, b) { + return a.localeCompare(b); + }; + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: sort, encode: false } + ), + 'a=a&b=b&z[zi][zia]=zia&z[zi][zib]=zib&z[zj][zja]=zja&z[zj][zjb]=zjb' + ); + st.equal( + qs.stringify( + { a: 'a', z: { zj: { zjb: 'zjb', zja: 'zja' }, zi: { zib: 'zib', zia: 'zia' } }, b: 'b' }, + { sort: null, encode: false } + ), + 'a=a&z[zj][zjb]=zjb&z[zj][zja]=zja&z[zi][zib]=zib&z[zi][zia]=zia&b=b' + ); + st.end(); + }); + + t.test('can stringify with custom encoding', function (st) { + st.equal(qs.stringify({ 県: '大阪府', '': '' }, { + encoder: function (str) { + if (str.length === 0) { + return ''; + } + var buf = iconv.encode(str, 'shiftjis'); + var result = []; + for (var i = 0; i < buf.length; ++i) { + result.push(buf.readUInt8(i).toString(16)); + } + return '%' + result.join('%'); + } + }), '%8c%a7=%91%e5%8d%e3%95%7b&='); + st.end(); + }); + + t.test('receives the default encoder as a second argument', function (st) { + st.plan(2); + qs.stringify({ a: 1 }, { + encoder: function (str, defaultEncoder) { + st.equal(defaultEncoder, utils.encode); + } + }); + st.end(); + }); + + t.test('throws error with wrong encoder', function (st) { + st['throws'](function () { + qs.stringify({}, { encoder: 'string' }); + }, new TypeError('Encoder has to be a function.')); + st.end(); + }); + + t.test('can use custom encoder for a buffer object', { skip: typeof Buffer === 'undefined' }, function (st) { + st.equal(qs.stringify({ a: new Buffer([1]) }, { + encoder: function (buffer) { + if (typeof buffer === 'string') { + return buffer; + } + return String.fromCharCode(buffer.readUInt8(0) + 97); + } + }), 'a=b'); + st.end(); + }); + + t.test('serializeDate option', function (st) { + var date = new Date(); + st.equal( + qs.stringify({ a: date }), + 'a=' + date.toISOString().replace(/:/g, '%3A'), + 'default is toISOString' + ); + + var mutatedDate = new Date(); + mutatedDate.toISOString = function () { + throw new SyntaxError(); + }; + st['throws'](function () { + mutatedDate.toISOString(); + }, SyntaxError); + st.equal( + qs.stringify({ a: mutatedDate }), + 'a=' + Date.prototype.toISOString.call(mutatedDate).replace(/:/g, '%3A'), + 'toISOString works even when method is not locally present' + ); + + var specificDate = new Date(6); + st.equal( + qs.stringify( + { a: specificDate }, + { serializeDate: function (d) { return d.getTime() * 7; } } + ), + 'a=42', + 'custom serializeDate function called' + ); + + st.end(); + }); + + t.test('RFC 1738 spaces serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC1738 }), 'a=b+c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC1738 }), 'a+b=c+d'); + st.end(); + }); + + t.test('RFC 3986 spaces serialization', function (st) { + st.equal(qs.stringify({ a: 'b c' }, { format: qs.formats.RFC3986 }), 'a=b%20c'); + st.equal(qs.stringify({ 'a b': 'c d' }, { format: qs.formats.RFC3986 }), 'a%20b=c%20d'); + st.end(); + }); + + t.test('Backward compatibility to RFC 3986', function (st) { + st.equal(qs.stringify({ a: 'b c' }), 'a=b%20c'); + st.end(); + }); + + t.test('Edge cases and unknown formats', function (st) { + ['UFO1234', false, 1234, null, {}, []].forEach( + function (format) { + st['throws']( + function () { + qs.stringify({ a: 'b c' }, { format: format }); + }, + new TypeError('Unknown format option provided.') + ); + } + ); + st.end(); + }); + + t.test('encodeValuesOnly', function (st) { + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e=f'], f: [['g'], ['h']] }, + { encodeValuesOnly: true } + ), + 'a=b&c[0]=d&c[1]=e%3Df&f[0][0]=g&f[1][0]=h' + ); + st.equal( + qs.stringify( + { a: 'b', c: ['d', 'e'], f: [['g'], ['h']] } + ), + 'a=b&c%5B0%5D=d&c%5B1%5D=e&f%5B0%5D%5B0%5D=g&f%5B1%5D%5B0%5D=h' + ); + st.end(); + }); + + t.test('encodeValuesOnly - strictNullHandling', function (st) { + st.equal( + qs.stringify( + { a: { b: null } }, + { encodeValuesOnly: true, strictNullHandling: true } + ), + 'a[b]' + ); + st.end(); + }); + + t.test('does not mutate the options argument', function (st) { + var options = {}; + qs.stringify({}, options); + st.deepEqual(options, {}); + st.end(); + }); + + t.end(); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/utils.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/utils.js new file mode 100644 index 0000000..eff4011 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/qs/test/utils.js @@ -0,0 +1,34 @@ +'use strict'; + +var test = require('tape'); +var utils = require('../lib/utils'); + +test('merge()', function (t) { + t.deepEqual(utils.merge({ a: 'b' }, { a: 'c' }), { a: ['b', 'c'] }, 'merges two objects with the same key'); + + var oneMerged = utils.merge({ foo: 'bar' }, { foo: { first: '123' } }); + t.deepEqual(oneMerged, { foo: ['bar', { first: '123' }] }, 'merges a standalone and an object into an array'); + + var twoMerged = utils.merge({ foo: ['bar', { first: '123' }] }, { foo: { second: '456' } }); + t.deepEqual(twoMerged, { foo: { 0: 'bar', 1: { first: '123' }, second: '456' } }, 'merges a standalone and two objects into an array'); + + var sandwiched = utils.merge({ foo: ['bar', { first: '123', second: '456' }] }, { foo: 'baz' }); + t.deepEqual(sandwiched, { foo: ['bar', { first: '123', second: '456' }, 'baz'] }, 'merges an object sandwiched by two standalones into an array'); + + var nestedArrays = utils.merge({ foo: ['baz'] }, { foo: ['bar', 'xyzzy'] }); + t.deepEqual(nestedArrays, { foo: ['baz', 'bar', 'xyzzy'] }); + + t.end(); +}); + +test('assign()', function (t) { + var target = { a: 1, b: 2 }; + var source = { b: 3, c: 4 }; + var result = utils.assign(target, source); + + t.equal(result, target, 'returns the target'); + t.deepEqual(target, { a: 1, b: 3, c: 4 }, 'target and source are merged'); + t.deepEqual(source, { b: 3, c: 4 }, 'source is untouched'); + + t.end(); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/CHANGELOG.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/CHANGELOG.md new file mode 100644 index 0000000..af76719 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/CHANGELOG.md @@ -0,0 +1,674 @@ +## Change Log + +### v2.81.0 (2017/03/09) +- [#2584](https://github.com/request/request/pull/2584) Security issue: Upgrade qs to version 6.4.0 (@sergejmueller) +- [#2574](https://github.com/request/request/pull/2574) Migrating to safe-buffer for improved security. (@mikeal) +- [#2573](https://github.com/request/request/pull/2573) fixes #2572 (@ahmadnassri) + +### v2.80.0 (2017/03/04) +- [#2571](https://github.com/request/request/pull/2571) Correctly format the Host header for IPv6 addresses (@JamesMGreene) +- [#2558](https://github.com/request/request/pull/2558) Update README.md example snippet (@FredKSchott) +- [#2221](https://github.com/request/request/pull/2221) Adding a simple Response object reference in argument specification (@calamarico) +- [#2452](https://github.com/request/request/pull/2452) Adds .timings array with DNC, TCP, request and response times (@nicjansma) +- [#2553](https://github.com/request/request/pull/2553) add ISSUE_TEMPLATE, move PR template (@FredKSchott) +- [#2539](https://github.com/request/request/pull/2539) Create PULL_REQUEST_TEMPLATE.md (@FredKSchott) +- [#2524](https://github.com/request/request/pull/2524) Update caseless to version 0.12.0 🚀 (@greenkeeperio-bot) +- [#2460](https://github.com/request/request/pull/2460) Fix wrong MIME type in example (@OwnageIsMagic) +- [#2514](https://github.com/request/request/pull/2514) Change tags to keywords in package.json (@humphd) +- [#2492](https://github.com/request/request/pull/2492) More lenient gzip decompression (@addaleax) + +### v2.79.0 (2016/11/18) +- [#2368](https://github.com/request/request/pull/2368) Fix typeof check in test-pool.js (@forivall) +- [#2394](https://github.com/request/request/pull/2394) Use `files` in package.json (@SimenB) +- [#2463](https://github.com/request/request/pull/2463) AWS support for session tokens for temporary credentials (@simov) +- [#2467](https://github.com/request/request/pull/2467) Migrate to uuid (@simov, @antialias) +- [#2459](https://github.com/request/request/pull/2459) Update taper to version 0.5.0 🚀 (@greenkeeperio-bot) +- [#2448](https://github.com/request/request/pull/2448) Make other connect timeout test more reliable too (@mscdex) + +### v2.78.0 (2016/11/03) +- [#2447](https://github.com/request/request/pull/2447) Always set request timeout on keep-alive connections (@mscdex) + +### v2.77.0 (2016/11/03) +- [#2439](https://github.com/request/request/pull/2439) Fix socket 'connect' listener handling (@mscdex) +- [#2442](https://github.com/request/request/pull/2442) 👻😱 Node.js 0.10 is unmaintained 😱👻 (@greenkeeperio-bot) +- [#2435](https://github.com/request/request/pull/2435) Add followOriginalHttpMethod to redirect to original HTTP method (@kirrg001) +- [#2414](https://github.com/request/request/pull/2414) Improve test-timeout reliability (@mscdex) + +### v2.76.0 (2016/10/25) +- [#2424](https://github.com/request/request/pull/2424) Handle buffers directly instead of using "bl" (@zertosh) +- [#2415](https://github.com/request/request/pull/2415) Re-enable timeout tests on Travis + other fixes (@mscdex) +- [#2431](https://github.com/request/request/pull/2431) Improve timeouts accuracy and node v6.8.0+ compatibility (@mscdex, @greenkeeperio-bot) +- [#2428](https://github.com/request/request/pull/2428) Update qs to version 6.3.0 🚀 (@greenkeeperio-bot) +- [#2420](https://github.com/request/request/pull/2420) change .on to .once, remove possible memory leaks (@duereg) +- [#2426](https://github.com/request/request/pull/2426) Remove "isFunction" helper in favor of "typeof" check (@zertosh) +- [#2425](https://github.com/request/request/pull/2425) Simplify "defer" helper creation (@zertosh) +- [#2402](https://github.com/request/request/pull/2402) form-data@2.1.1 breaks build 🚨 (@greenkeeperio-bot) +- [#2393](https://github.com/request/request/pull/2393) Update form-data to version 2.1.0 🚀 (@greenkeeperio-bot) + +### v2.75.0 (2016/09/17) +- [#2381](https://github.com/request/request/pull/2381) Drop support for Node 0.10 (@simov) +- [#2377](https://github.com/request/request/pull/2377) Update form-data to version 2.0.0 🚀 (@greenkeeperio-bot) +- [#2353](https://github.com/request/request/pull/2353) Add greenkeeper ignored packages (@simov) +- [#2351](https://github.com/request/request/pull/2351) Update karma-tap to version 3.0.1 🚀 (@greenkeeperio-bot) +- [#2348](https://github.com/request/request/pull/2348) form-data@1.0.1 breaks build 🚨 (@greenkeeperio-bot) +- [#2349](https://github.com/request/request/pull/2349) Check error type instead of string (@scotttrinh) + +### v2.74.0 (2016/07/22) +- [#2295](https://github.com/request/request/pull/2295) Update tough-cookie to 2.3.0 (@stash-sfdc) +- [#2280](https://github.com/request/request/pull/2280) Update karma-tap to version 2.0.1 🚀 (@greenkeeperio-bot) + +### v2.73.0 (2016/07/09) +- [#2240](https://github.com/request/request/pull/2240) Remove connectionErrorHandler to fix #1903 (@zarenner) +- [#2251](https://github.com/request/request/pull/2251) tape@4.6.0 breaks build 🚨 (@greenkeeperio-bot) +- [#2225](https://github.com/request/request/pull/2225) Update docs (@ArtskydJ) +- [#2203](https://github.com/request/request/pull/2203) Update browserify to version 13.0.1 🚀 (@greenkeeperio-bot) +- [#2275](https://github.com/request/request/pull/2275) Update karma to version 1.1.1 🚀 (@greenkeeperio-bot) +- [#2204](https://github.com/request/request/pull/2204) Add codecov.yml and disable PR comments (@simov) +- [#2212](https://github.com/request/request/pull/2212) Fix link to http.IncomingMessage documentation (@nazieb) +- [#2208](https://github.com/request/request/pull/2208) Update to form-data RC4 and pass null values to it (@simov) +- [#2207](https://github.com/request/request/pull/2207) Move aws4 require statement to the top (@simov) +- [#2199](https://github.com/request/request/pull/2199) Update karma-coverage to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#2206](https://github.com/request/request/pull/2206) Update qs to version 6.2.0 🚀 (@greenkeeperio-bot) +- [#2205](https://github.com/request/request/pull/2205) Use server-destory to close hanging sockets in tests (@simov) +- [#2200](https://github.com/request/request/pull/2200) Update karma-cli to version 1.0.0 🚀 (@greenkeeperio-bot) + +### v2.72.0 (2016/04/17) +- [#2176](https://github.com/request/request/pull/2176) Do not try to pipe Gzip responses with no body (@simov) +- [#2175](https://github.com/request/request/pull/2175) Add 'delete' alias for the 'del' API method (@simov, @MuhanZou) +- [#2172](https://github.com/request/request/pull/2172) Add support for deflate content encoding (@czardoz) +- [#2169](https://github.com/request/request/pull/2169) Add callback option (@simov) +- [#2165](https://github.com/request/request/pull/2165) Check for self.req existence inside the write method (@simov) +- [#2167](https://github.com/request/request/pull/2167) Fix TravisCI badge reference master branch (@a0viedo) + +### v2.71.0 (2016/04/12) +- [#2164](https://github.com/request/request/pull/2164) Catch errors from the underlying http module (@simov) + +### v2.70.0 (2016/04/05) +- [#2147](https://github.com/request/request/pull/2147) Update eslint to version 2.5.3 🚀 (@simov, @greenkeeperio-bot) +- [#2009](https://github.com/request/request/pull/2009) Support JSON stringify replacer argument. (@elyobo) +- [#2142](https://github.com/request/request/pull/2142) Update eslint to version 2.5.1 🚀 (@greenkeeperio-bot) +- [#2128](https://github.com/request/request/pull/2128) Update browserify-istanbul to version 2.0.0 🚀 (@greenkeeperio-bot) +- [#2115](https://github.com/request/request/pull/2115) Update eslint to version 2.3.0 🚀 (@simov, @greenkeeperio-bot) +- [#2089](https://github.com/request/request/pull/2089) Fix badges (@simov) +- [#2092](https://github.com/request/request/pull/2092) Update browserify-istanbul to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#2079](https://github.com/request/request/pull/2079) Accept read stream as body option (@simov) +- [#2070](https://github.com/request/request/pull/2070) Update bl to version 1.1.2 🚀 (@greenkeeperio-bot) +- [#2063](https://github.com/request/request/pull/2063) Up bluebird and oauth-sign (@simov) +- [#2058](https://github.com/request/request/pull/2058) Karma fixes for latest versions (@eiriksm) +- [#2057](https://github.com/request/request/pull/2057) Update contributing guidelines (@simov) +- [#2054](https://github.com/request/request/pull/2054) Update qs to version 6.1.0 🚀 (@greenkeeperio-bot) + +### v2.69.0 (2016/01/27) +- [#2041](https://github.com/request/request/pull/2041) restore aws4 as regular dependency (@rmg) + +### v2.68.0 (2016/01/27) +- [#2036](https://github.com/request/request/pull/2036) Add AWS Signature Version 4 (@simov, @mirkods) +- [#2022](https://github.com/request/request/pull/2022) Convert numeric multipart bodies to string (@simov, @feross) +- [#2024](https://github.com/request/request/pull/2024) Update har-validator dependency for nsp advisory #76 (@TylerDixon) +- [#2016](https://github.com/request/request/pull/2016) Update qs to version 6.0.2 🚀 (@greenkeeperio-bot) +- [#2007](https://github.com/request/request/pull/2007) Use the `extend` module instead of util._extend (@simov) +- [#2003](https://github.com/request/request/pull/2003) Update browserify to version 13.0.0 🚀 (@greenkeeperio-bot) +- [#1989](https://github.com/request/request/pull/1989) Update buffer-equal to version 1.0.0 🚀 (@greenkeeperio-bot) +- [#1956](https://github.com/request/request/pull/1956) Check form-data content-length value before setting up the header (@jongyoonlee) +- [#1958](https://github.com/request/request/pull/1958) Use IncomingMessage.destroy method (@simov) +- [#1952](https://github.com/request/request/pull/1952) Adds example for Tor proxy (@prometheansacrifice) +- [#1943](https://github.com/request/request/pull/1943) Update eslint to version 1.10.3 🚀 (@simov, @greenkeeperio-bot) +- [#1924](https://github.com/request/request/pull/1924) Update eslint to version 1.10.1 🚀 (@greenkeeperio-bot) +- [#1915](https://github.com/request/request/pull/1915) Remove content-length and transfer-encoding headers from defaultProxyHeaderWhiteList (@yaxia) + +### v2.67.0 (2015/11/19) +- [#1913](https://github.com/request/request/pull/1913) Update http-signature to version 1.1.0 🚀 (@greenkeeperio-bot) + +### v2.66.0 (2015/11/18) +- [#1906](https://github.com/request/request/pull/1906) Update README URLs based on HTTP redirects (@ReadmeCritic) +- [#1905](https://github.com/request/request/pull/1905) Convert typed arrays into regular buffers (@simov) +- [#1902](https://github.com/request/request/pull/1902) node-uuid@1.4.7 breaks build 🚨 (@greenkeeperio-bot) +- [#1894](https://github.com/request/request/pull/1894) Fix tunneling after redirection from https (Original: #1881) (@simov, @falms) +- [#1893](https://github.com/request/request/pull/1893) Update eslint to version 1.9.0 🚀 (@greenkeeperio-bot) +- [#1852](https://github.com/request/request/pull/1852) Update eslint to version 1.7.3 🚀 (@simov, @greenkeeperio-bot, @paulomcnally, @michelsalib, @arbaaz, @nsklkn, @LoicMahieu, @JoshWillik, @jzaefferer, @ryanwholey, @djchie, @thisconnect, @mgenereu, @acroca, @Sebmaster, @KoltesDigital) +- [#1876](https://github.com/request/request/pull/1876) Implement loose matching for har mime types (@simov) +- [#1875](https://github.com/request/request/pull/1875) Update bluebird to version 3.0.2 🚀 (@simov, @greenkeeperio-bot) +- [#1871](https://github.com/request/request/pull/1871) Update browserify to version 12.0.1 🚀 (@greenkeeperio-bot) +- [#1866](https://github.com/request/request/pull/1866) Add missing quotes on x-token property in README (@miguelmota) +- [#1874](https://github.com/request/request/pull/1874) Fix typo in README.md (@gswalden) +- [#1860](https://github.com/request/request/pull/1860) Improve referer header tests and docs (@simov) +- [#1861](https://github.com/request/request/pull/1861) Remove redundant call to Stream constructor (@watson) +- [#1857](https://github.com/request/request/pull/1857) Fix Referer header to point to the original host name (@simov) +- [#1850](https://github.com/request/request/pull/1850) Update karma-coverage to version 0.5.3 🚀 (@greenkeeperio-bot) +- [#1847](https://github.com/request/request/pull/1847) Use node's latest version when building (@simov) +- [#1836](https://github.com/request/request/pull/1836) Tunnel: fix wrong property name (@KoltesDigital) +- [#1820](https://github.com/request/request/pull/1820) Set href as request.js uses it (@mgenereu) +- [#1840](https://github.com/request/request/pull/1840) Update http-signature to version 1.0.2 🚀 (@greenkeeperio-bot) +- [#1845](https://github.com/request/request/pull/1845) Update istanbul to version 0.4.0 🚀 (@greenkeeperio-bot) + +### v2.65.0 (2015/10/11) +- [#1833](https://github.com/request/request/pull/1833) Update aws-sign2 to version 0.6.0 🚀 (@greenkeeperio-bot) +- [#1811](https://github.com/request/request/pull/1811) Enable loose cookie parsing in tough-cookie (@Sebmaster) +- [#1830](https://github.com/request/request/pull/1830) Bring back tilde ranges for all dependencies (@simov) +- [#1821](https://github.com/request/request/pull/1821) Implement support for RFC 2617 MD5-sess algorithm. (@BigDSK) +- [#1828](https://github.com/request/request/pull/1828) Updated qs dependency to 5.2.0 (@acroca) +- [#1818](https://github.com/request/request/pull/1818) Extract `readResponseBody` method out of `onRequestResponse` (@pvoisin) +- [#1819](https://github.com/request/request/pull/1819) Run stringify once (@mgenereu) +- [#1814](https://github.com/request/request/pull/1814) Updated har-validator to version 2.0.2 (@greenkeeperio-bot) +- [#1807](https://github.com/request/request/pull/1807) Updated tough-cookie to version 2.1.0 (@greenkeeperio-bot) +- [#1800](https://github.com/request/request/pull/1800) Add caret ranges for devDependencies, except eslint (@simov) +- [#1799](https://github.com/request/request/pull/1799) Updated karma-browserify to version 4.4.0 (@greenkeeperio-bot) +- [#1797](https://github.com/request/request/pull/1797) Updated tape to version 4.2.0 (@greenkeeperio-bot) +- [#1788](https://github.com/request/request/pull/1788) Pinned all dependencies (@greenkeeperio-bot) + +### v2.64.0 (2015/09/25) +- [#1787](https://github.com/request/request/pull/1787) npm ignore examples, release.sh and disabled.appveyor.yml (@thisconnect) +- [#1775](https://github.com/request/request/pull/1775) Fix typo in README.md (@djchie) +- [#1776](https://github.com/request/request/pull/1776) Changed word 'conjuction' to read 'conjunction' in README.md (@ryanwholey) +- [#1785](https://github.com/request/request/pull/1785) Revert: Set default application/json content-type when using json option #1772 (@simov) + +### v2.63.0 (2015/09/21) +- [#1772](https://github.com/request/request/pull/1772) Set default application/json content-type when using json option (@jzaefferer) + +### v2.62.0 (2015/09/15) +- [#1768](https://github.com/request/request/pull/1768) Add node 4.0 to the list of build targets (@simov) +- [#1767](https://github.com/request/request/pull/1767) Query strings now cooperate with unix sockets (@JoshWillik) +- [#1750](https://github.com/request/request/pull/1750) Revert doc about installation of tough-cookie added in #884 (@LoicMahieu) +- [#1746](https://github.com/request/request/pull/1746) Missed comma in Readme (@nsklkn) +- [#1743](https://github.com/request/request/pull/1743) Fix options not being initialized in defaults method (@simov) + +### v2.61.0 (2015/08/19) +- [#1721](https://github.com/request/request/pull/1721) Minor fix in README.md (@arbaaz) +- [#1733](https://github.com/request/request/pull/1733) Avoid useless Buffer transformation (@michelsalib) +- [#1726](https://github.com/request/request/pull/1726) Update README.md (@paulomcnally) +- [#1715](https://github.com/request/request/pull/1715) Fix forever option in node > 0.10 #1709 (@calibr) +- [#1716](https://github.com/request/request/pull/1716) Do not create Buffer from Object in setContentLength(iojs v3.0 issue) (@calibr) +- [#1711](https://github.com/request/request/pull/1711) Add ability to detect connect timeouts (@kevinburke) +- [#1712](https://github.com/request/request/pull/1712) Set certificate expiration to August 2, 2018 (@kevinburke) +- [#1700](https://github.com/request/request/pull/1700) debug() when JSON.parse() on a response body fails (@phillipj) + +### v2.60.0 (2015/07/21) +- [#1687](https://github.com/request/request/pull/1687) Fix caseless bug - content-type not being set for multipart/form-data (@simov, @garymathews) + +### v2.59.0 (2015/07/20) +- [#1671](https://github.com/request/request/pull/1671) Add tests and docs for using the agent, agentClass, agentOptions and forever options. Forever option defaults to using http(s).Agent in node 0.12+ (@simov) +- [#1679](https://github.com/request/request/pull/1679) Fix - do not remove OAuth param when using OAuth realm (@simov, @jhalickman) +- [#1668](https://github.com/request/request/pull/1668) updated dependencies (@deamme) +- [#1656](https://github.com/request/request/pull/1656) Fix form method (@simov) +- [#1651](https://github.com/request/request/pull/1651) Preserve HEAD method when using followAllRedirects (@simov) +- [#1652](https://github.com/request/request/pull/1652) Update `encoding` option documentation in README.md (@daniel347x) +- [#1650](https://github.com/request/request/pull/1650) Allow content-type overriding when using the `form` option (@simov) +- [#1646](https://github.com/request/request/pull/1646) Clarify the nature of setting `ca` in `agentOptions` (@jeffcharles) + +### v2.58.0 (2015/06/16) +- [#1638](https://github.com/request/request/pull/1638) Use the `extend` module to deep extend in the defaults method (@simov) +- [#1631](https://github.com/request/request/pull/1631) Move tunnel logic into separate module (@simov) +- [#1634](https://github.com/request/request/pull/1634) Fix OAuth query transport_method (@simov) +- [#1603](https://github.com/request/request/pull/1603) Add codecov (@simov) + +### v2.57.0 (2015/05/31) +- [#1615](https://github.com/request/request/pull/1615) Replace '.client' with '.socket' as the former was deprecated in 2.2.0. (@ChALkeR) + +### v2.56.0 (2015/05/28) +- [#1610](https://github.com/request/request/pull/1610) Bump module dependencies (@simov) +- [#1600](https://github.com/request/request/pull/1600) Extract the querystring logic into separate module (@simov) +- [#1607](https://github.com/request/request/pull/1607) Re-generate certificates (@simov) +- [#1599](https://github.com/request/request/pull/1599) Move getProxyFromURI logic below the check for Invaild URI (#1595) (@simov) +- [#1598](https://github.com/request/request/pull/1598) Fix the way http verbs are defined in order to please intellisense IDEs (@simov, @flannelJesus) +- [#1591](https://github.com/request/request/pull/1591) A few minor fixes: (@simov) +- [#1584](https://github.com/request/request/pull/1584) Refactor test-default tests (according to comments in #1430) (@simov) +- [#1585](https://github.com/request/request/pull/1585) Fixing documentation regarding TLS options (#1583) (@mainakae) +- [#1574](https://github.com/request/request/pull/1574) Refresh the oauth_nonce on redirect (#1573) (@simov) +- [#1570](https://github.com/request/request/pull/1570) Discovered tests that weren't properly running (@seanstrom) +- [#1569](https://github.com/request/request/pull/1569) Fix pause before response arrives (@kevinoid) +- [#1558](https://github.com/request/request/pull/1558) Emit error instead of throw (@simov) +- [#1568](https://github.com/request/request/pull/1568) Fix stall when piping gzipped response (@kevinoid) +- [#1560](https://github.com/request/request/pull/1560) Update combined-stream (@apechimp) +- [#1543](https://github.com/request/request/pull/1543) Initial support for oauth_body_hash on json payloads (@simov, @aesopwolf) +- [#1541](https://github.com/request/request/pull/1541) Fix coveralls (@simov) +- [#1540](https://github.com/request/request/pull/1540) Fix recursive defaults for convenience methods (@simov) +- [#1536](https://github.com/request/request/pull/1536) More eslint style rules (@froatsnook) +- [#1533](https://github.com/request/request/pull/1533) Adding dependency status bar to README.md (@YasharF) +- [#1539](https://github.com/request/request/pull/1539) ensure the latest version of har-validator is included (@ahmadnassri) +- [#1516](https://github.com/request/request/pull/1516) forever+pool test (@devTristan) + +### v2.55.0 (2015/04/05) +- [#1520](https://github.com/request/request/pull/1520) Refactor defaults (@simov) +- [#1525](https://github.com/request/request/pull/1525) Delete request headers with undefined value. (@froatsnook) +- [#1521](https://github.com/request/request/pull/1521) Add promise tests (@simov) +- [#1518](https://github.com/request/request/pull/1518) Fix defaults (@simov) +- [#1515](https://github.com/request/request/pull/1515) Allow static invoking of convenience methods (@simov) +- [#1505](https://github.com/request/request/pull/1505) Fix multipart boundary extraction regexp (@simov) +- [#1510](https://github.com/request/request/pull/1510) Fix basic auth form data (@simov) + +### v2.54.0 (2015/03/24) +- [#1501](https://github.com/request/request/pull/1501) HTTP Archive 1.2 support (@ahmadnassri) +- [#1486](https://github.com/request/request/pull/1486) Add a test for the forever agent (@akshayp) +- [#1500](https://github.com/request/request/pull/1500) Adding handling for no auth method and null bearer (@philberg) +- [#1498](https://github.com/request/request/pull/1498) Add table of contents in readme (@simov) +- [#1477](https://github.com/request/request/pull/1477) Add support for qs options via qsOptions key (@simov) +- [#1496](https://github.com/request/request/pull/1496) Parameters encoded to base 64 should be decoded as UTF-8, not ASCII. (@albanm) +- [#1494](https://github.com/request/request/pull/1494) Update eslint (@froatsnook) +- [#1474](https://github.com/request/request/pull/1474) Require Colon in Basic Auth (@erykwalder) +- [#1481](https://github.com/request/request/pull/1481) Fix baseUrl and redirections. (@burningtree) +- [#1469](https://github.com/request/request/pull/1469) Feature/base url (@froatsnook) +- [#1459](https://github.com/request/request/pull/1459) Add option to time request/response cycle (including rollup of redirects) (@aaron-em) +- [#1468](https://github.com/request/request/pull/1468) Re-enable io.js/node 0.12 build (@simov, @mikeal, @BBB) +- [#1442](https://github.com/request/request/pull/1442) Fixed the issue with strictSSL tests on 0.12 & io.js by explicitly setting a cipher that matches the cert. (@BBB, @nickmccurdy, @demohi, @simov, @0x4139) +- [#1460](https://github.com/request/request/pull/1460) localAddress or proxy config is lost when redirecting (@simov, @0x4139) +- [#1453](https://github.com/request/request/pull/1453) Test on Node.js 0.12 and io.js with allowed failures (@nickmccurdy, @demohi) +- [#1426](https://github.com/request/request/pull/1426) Fixing tests to pass on io.js and node 0.12 (only test-https.js stiff failing) (@mikeal) +- [#1446](https://github.com/request/request/pull/1446) Missing HTTP referer header with redirects Fixes #1038 (@simov, @guimon) +- [#1428](https://github.com/request/request/pull/1428) Deprecate Node v0.8.x (@nylen) +- [#1436](https://github.com/request/request/pull/1436) Add ability to set a requester without setting default options (@tikotzky) +- [#1435](https://github.com/request/request/pull/1435) dry up verb methods (@sethpollack) +- [#1423](https://github.com/request/request/pull/1423) Allow fully qualified multipart content-type header (@simov) +- [#1430](https://github.com/request/request/pull/1430) Fix recursive requester (@tikotzky) +- [#1429](https://github.com/request/request/pull/1429) Throw error when making HEAD request with a body (@tikotzky) +- [#1419](https://github.com/request/request/pull/1419) Add note that the project is broken in 0.12.x (@nylen) +- [#1413](https://github.com/request/request/pull/1413) Fix basic auth (@simov) +- [#1397](https://github.com/request/request/pull/1397) Improve pipe-from-file tests (@nylen) + +### v2.53.0 (2015/02/02) +- [#1396](https://github.com/request/request/pull/1396) Do not rfc3986 escape JSON bodies (@nylen, @simov) +- [#1392](https://github.com/request/request/pull/1392) Improve `timeout` option description (@watson) + +### v2.52.0 (2015/02/02) +- [#1383](https://github.com/request/request/pull/1383) Add missing HTTPS options that were not being passed to tunnel (@brichard19) (@nylen) +- [#1388](https://github.com/request/request/pull/1388) Upgrade mime-types package version (@roderickhsiao) +- [#1389](https://github.com/request/request/pull/1389) Revise Setup Tunnel Function (@seanstrom) +- [#1374](https://github.com/request/request/pull/1374) Allow explicitly disabling tunneling for proxied https destinations (@nylen) +- [#1376](https://github.com/request/request/pull/1376) Use karma-browserify for tests. Add browser test coverage reporter. (@eiriksm) +- [#1366](https://github.com/request/request/pull/1366) Refactor OAuth into separate module (@simov) +- [#1373](https://github.com/request/request/pull/1373) Rewrite tunnel test to be pure Node.js (@nylen) +- [#1371](https://github.com/request/request/pull/1371) Upgrade test reporter (@nylen) +- [#1360](https://github.com/request/request/pull/1360) Refactor basic, bearer, digest auth logic into separate class (@simov) +- [#1354](https://github.com/request/request/pull/1354) Remove circular dependency from debugging code (@nylen) +- [#1351](https://github.com/request/request/pull/1351) Move digest auth into private prototype method (@simov) +- [#1352](https://github.com/request/request/pull/1352) Update hawk dependency to ~2.3.0 (@mridgway) +- [#1353](https://github.com/request/request/pull/1353) Correct travis-ci badge (@dogancelik) +- [#1349](https://github.com/request/request/pull/1349) Make sure we return on errored browser requests. (@eiriksm) +- [#1346](https://github.com/request/request/pull/1346) getProxyFromURI Extraction Refactor (@seanstrom) +- [#1337](https://github.com/request/request/pull/1337) Standardize test ports on 6767 (@nylen) +- [#1341](https://github.com/request/request/pull/1341) Emit FormData error events as Request error events (@nylen, @rwky) +- [#1343](https://github.com/request/request/pull/1343) Clean up readme badges, and add Travis and Coveralls badges (@nylen) +- [#1345](https://github.com/request/request/pull/1345) Update README.md (@Aaron-Hartwig) +- [#1338](https://github.com/request/request/pull/1338) Always wait for server.close() callback in tests (@nylen) +- [#1342](https://github.com/request/request/pull/1342) Add mock https server and redo start of browser tests for this purpose. (@eiriksm) +- [#1339](https://github.com/request/request/pull/1339) Improve auth docs (@nylen) +- [#1335](https://github.com/request/request/pull/1335) Add support for OAuth plaintext signature method (@simov) +- [#1332](https://github.com/request/request/pull/1332) Add clean script to remove test-browser.js after the tests run (@seanstrom) +- [#1327](https://github.com/request/request/pull/1327) Fix errors generating coverage reports. (@nylen) +- [#1330](https://github.com/request/request/pull/1330) Return empty buffer upon empty response body and encoding is set to null (@seanstrom) +- [#1326](https://github.com/request/request/pull/1326) Use faster container-based infrastructure on Travis (@nylen) +- [#1315](https://github.com/request/request/pull/1315) Implement rfc3986 option (@simov, @nylen, @apoco, @DullReferenceException, @mmalecki, @oliamb, @cliffcrosland, @LewisJEllis, @eiriksm, @poislagarde) +- [#1314](https://github.com/request/request/pull/1314) Detect urlencoded form data header via regex (@simov) +- [#1317](https://github.com/request/request/pull/1317) Improve OAuth1.0 server side flow example (@simov) + +### v2.51.0 (2014/12/10) +- [#1310](https://github.com/request/request/pull/1310) Revert changes introduced in https://github.com/request/request/pull/1282 (@simov) + +### v2.50.0 (2014/12/09) +- [#1308](https://github.com/request/request/pull/1308) Add browser test to keep track of browserify compability. (@eiriksm) +- [#1299](https://github.com/request/request/pull/1299) Add optional support for jsonReviver (@poislagarde) +- [#1277](https://github.com/request/request/pull/1277) Add Coveralls configuration (@simov) +- [#1307](https://github.com/request/request/pull/1307) Upgrade form-data, add back browserify compability. Fixes #455. (@eiriksm) +- [#1305](https://github.com/request/request/pull/1305) Fix typo in README.md (@LewisJEllis) +- [#1288](https://github.com/request/request/pull/1288) Update README.md to explain custom file use case (@cliffcrosland) + +### v2.49.0 (2014/11/28) +- [#1295](https://github.com/request/request/pull/1295) fix(proxy): no-proxy false positive (@oliamb) +- [#1292](https://github.com/request/request/pull/1292) Upgrade `caseless` to 0.8.1 (@mmalecki) +- [#1276](https://github.com/request/request/pull/1276) Set transfer encoding for multipart/related to chunked by default (@simov) +- [#1275](https://github.com/request/request/pull/1275) Fix multipart content-type headers detection (@simov) +- [#1269](https://github.com/request/request/pull/1269) adds streams example for review (@tbuchok) +- [#1238](https://github.com/request/request/pull/1238) Add examples README.md (@simov) + +### v2.48.0 (2014/11/12) +- [#1263](https://github.com/request/request/pull/1263) Fixed a syntax error / typo in README.md (@xna2) +- [#1253](https://github.com/request/request/pull/1253) Add multipart chunked flag (@simov, @nylen) +- [#1251](https://github.com/request/request/pull/1251) Clarify that defaults() does not modify global defaults (@nylen) +- [#1250](https://github.com/request/request/pull/1250) Improve documentation for pool and maxSockets options (@nylen) +- [#1237](https://github.com/request/request/pull/1237) Documenting error handling when using streams (@vmattos) +- [#1244](https://github.com/request/request/pull/1244) Finalize changelog command (@nylen) +- [#1241](https://github.com/request/request/pull/1241) Fix typo (@alexanderGugel) +- [#1223](https://github.com/request/request/pull/1223) Show latest version number instead of "upcoming" in changelog (@nylen) +- [#1236](https://github.com/request/request/pull/1236) Document how to use custom CA in README (#1229) (@hypesystem) +- [#1228](https://github.com/request/request/pull/1228) Support for oauth with RSA-SHA1 signing (@nylen) +- [#1216](https://github.com/request/request/pull/1216) Made json and multipart options coexist (@nylen, @simov) +- [#1225](https://github.com/request/request/pull/1225) Allow header white/exclusive lists in any case. (@RReverser) + +### v2.47.0 (2014/10/26) +- [#1222](https://github.com/request/request/pull/1222) Move from mikeal/request to request/request (@nylen) +- [#1220](https://github.com/request/request/pull/1220) update qs dependency to 2.3.1 (@FredKSchott) +- [#1212](https://github.com/request/request/pull/1212) Improve tests/test-timeout.js (@nylen) +- [#1219](https://github.com/request/request/pull/1219) remove old globalAgent workaround for node 0.4 (@request) +- [#1214](https://github.com/request/request/pull/1214) Remove cruft left over from optional dependencies (@nylen) +- [#1215](https://github.com/request/request/pull/1215) Add proxyHeaderExclusiveList option for proxy-only headers. (@RReverser) +- [#1211](https://github.com/request/request/pull/1211) Allow 'Host' header instead of 'host' and remember case across redirects (@nylen) +- [#1208](https://github.com/request/request/pull/1208) Improve release script (@nylen) +- [#1213](https://github.com/request/request/pull/1213) Support for custom cookie store (@nylen, @mitsuru) +- [#1197](https://github.com/request/request/pull/1197) Clean up some code around setting the agent (@FredKSchott) +- [#1209](https://github.com/request/request/pull/1209) Improve multipart form append test (@simov) +- [#1207](https://github.com/request/request/pull/1207) Update changelog (@nylen) +- [#1185](https://github.com/request/request/pull/1185) Stream multipart/related bodies (@simov) + +### v2.46.0 (2014/10/23) +- [#1198](https://github.com/request/request/pull/1198) doc for TLS/SSL protocol options (@shawnzhu) +- [#1200](https://github.com/request/request/pull/1200) Add a Gitter chat badge to README.md (@gitter-badger) +- [#1196](https://github.com/request/request/pull/1196) Upgrade taper test reporter to v0.3.0 (@nylen) +- [#1199](https://github.com/request/request/pull/1199) Fix lint error: undeclared var i (@nylen) +- [#1191](https://github.com/request/request/pull/1191) Move self.proxy decision logic out of init and into a helper (@FredKSchott) +- [#1190](https://github.com/request/request/pull/1190) Move _buildRequest() logic back into init (@FredKSchott) +- [#1186](https://github.com/request/request/pull/1186) Support Smarter Unix URL Scheme (@FredKSchott) +- [#1178](https://github.com/request/request/pull/1178) update form documentation for new usage (@FredKSchott) +- [#1180](https://github.com/request/request/pull/1180) Enable no-mixed-requires linting rule (@nylen) +- [#1184](https://github.com/request/request/pull/1184) Don't forward authorization header across redirects to different hosts (@nylen) +- [#1183](https://github.com/request/request/pull/1183) Correct README about pre and postamble CRLF using multipart and not mult... (@netpoetica) +- [#1179](https://github.com/request/request/pull/1179) Lint tests directory (@nylen) +- [#1169](https://github.com/request/request/pull/1169) add metadata for form-data file field (@dotcypress) +- [#1173](https://github.com/request/request/pull/1173) remove optional dependencies (@seanstrom) +- [#1165](https://github.com/request/request/pull/1165) Cleanup event listeners and remove function creation from init (@FredKSchott) +- [#1174](https://github.com/request/request/pull/1174) update the request.cookie docs to have a valid cookie example (@seanstrom) +- [#1168](https://github.com/request/request/pull/1168) create a detach helper and use detach helper in replace of nextTick (@seanstrom) +- [#1171](https://github.com/request/request/pull/1171) in post can send form data and use callback (@MiroRadenovic) +- [#1159](https://github.com/request/request/pull/1159) accept charset for x-www-form-urlencoded content-type (@seanstrom) +- [#1157](https://github.com/request/request/pull/1157) Update README.md: body with json=true (@Rob--W) +- [#1164](https://github.com/request/request/pull/1164) Disable tests/test-timeout.js on Travis (@nylen) +- [#1153](https://github.com/request/request/pull/1153) Document how to run a single test (@nylen) +- [#1144](https://github.com/request/request/pull/1144) adds documentation for the "response" event within the streaming section (@tbuchok) +- [#1162](https://github.com/request/request/pull/1162) Update eslintrc file to no longer allow past errors (@FredKSchott) +- [#1155](https://github.com/request/request/pull/1155) Support/use self everywhere (@seanstrom) +- [#1161](https://github.com/request/request/pull/1161) fix no-use-before-define lint warnings (@emkay) +- [#1156](https://github.com/request/request/pull/1156) adding curly brackets to get rid of lint errors (@emkay) +- [#1151](https://github.com/request/request/pull/1151) Fix localAddress test on OS X (@nylen) +- [#1145](https://github.com/request/request/pull/1145) documentation: fix outdated reference to setCookieSync old name in README (@FredKSchott) +- [#1131](https://github.com/request/request/pull/1131) Update pool documentation (@FredKSchott) +- [#1143](https://github.com/request/request/pull/1143) Rewrite all tests to use tape (@nylen) +- [#1137](https://github.com/request/request/pull/1137) Add ability to specifiy querystring lib in options. (@jgrund) +- [#1138](https://github.com/request/request/pull/1138) allow hostname and port in place of host on uri (@cappslock) +- [#1134](https://github.com/request/request/pull/1134) Fix multiple redirects and `self.followRedirect` (@blakeembrey) +- [#1130](https://github.com/request/request/pull/1130) documentation fix: add note about npm test for contributing (@FredKSchott) +- [#1120](https://github.com/request/request/pull/1120) Support/refactor request setup tunnel (@seanstrom) +- [#1129](https://github.com/request/request/pull/1129) linting fix: convert double quote strings to use single quotes (@FredKSchott) +- [#1124](https://github.com/request/request/pull/1124) linting fix: remove unneccesary semi-colons (@FredKSchott) + +### v2.45.0 (2014/10/06) +- [#1128](https://github.com/request/request/pull/1128) Add test for setCookie regression (@nylen) +- [#1127](https://github.com/request/request/pull/1127) added tests around using objects as values in a query string (@bcoe) +- [#1103](https://github.com/request/request/pull/1103) Support/refactor request constructor (@nylen, @seanstrom) +- [#1119](https://github.com/request/request/pull/1119) add basic linting to request library (@FredKSchott) +- [#1121](https://github.com/request/request/pull/1121) Revert "Explicitly use sync versions of cookie functions" (@nylen) +- [#1118](https://github.com/request/request/pull/1118) linting fix: Restructure bad empty if statement (@FredKSchott) +- [#1117](https://github.com/request/request/pull/1117) Fix a bad check for valid URIs (@FredKSchott) +- [#1113](https://github.com/request/request/pull/1113) linting fix: space out operators (@FredKSchott) +- [#1116](https://github.com/request/request/pull/1116) Fix typo in `noProxyHost` definition (@FredKSchott) +- [#1114](https://github.com/request/request/pull/1114) linting fix: Added a `new` operator that was missing when creating and throwing a new error (@FredKSchott) +- [#1096](https://github.com/request/request/pull/1096) No_proxy support (@samcday) +- [#1107](https://github.com/request/request/pull/1107) linting-fix: remove unused variables (@FredKSchott) +- [#1112](https://github.com/request/request/pull/1112) linting fix: Make return values consistent and more straitforward (@FredKSchott) +- [#1111](https://github.com/request/request/pull/1111) linting fix: authPieces was getting redeclared (@FredKSchott) +- [#1105](https://github.com/request/request/pull/1105) Use strict mode in request (@FredKSchott) +- [#1110](https://github.com/request/request/pull/1110) linting fix: replace lazy '==' with more strict '===' (@FredKSchott) +- [#1109](https://github.com/request/request/pull/1109) linting fix: remove function call from if-else conditional statement (@FredKSchott) +- [#1102](https://github.com/request/request/pull/1102) Fix to allow setting a `requester` on recursive calls to `request.defaults` (@tikotzky) +- [#1095](https://github.com/request/request/pull/1095) Tweaking engines in package.json (@pdehaan) +- [#1082](https://github.com/request/request/pull/1082) Forward the socket event from the httpModule request (@seanstrom) +- [#972](https://github.com/request/request/pull/972) Clarify gzip handling in the README (@kevinoid) +- [#1089](https://github.com/request/request/pull/1089) Mention that encoding defaults to utf8, not Buffer (@stuartpb) +- [#1088](https://github.com/request/request/pull/1088) Fix cookie example in README.md and make it more clear (@pipi32167) +- [#1027](https://github.com/request/request/pull/1027) Add support for multipart form data in request options. (@crocket) +- [#1076](https://github.com/request/request/pull/1076) use Request.abort() to abort the request when the request has timed-out (@seanstrom) +- [#1068](https://github.com/request/request/pull/1068) add optional postamble required by .NET multipart requests (@netpoetica) + +### v2.43.0 (2014/09/18) +- [#1057](https://github.com/request/request/pull/1057) Defaults should not overwrite defined options (@davidwood) +- [#1046](https://github.com/request/request/pull/1046) Propagate datastream errors, useful in case gzip fails. (@ZJONSSON, @Janpot) +- [#1063](https://github.com/request/request/pull/1063) copy the input headers object #1060 (@finnp) +- [#1031](https://github.com/request/request/pull/1031) Explicitly use sync versions of cookie functions (@ZJONSSON) +- [#1056](https://github.com/request/request/pull/1056) Fix redirects when passing url.parse(x) as URL to convenience method (@nylen) + +### v2.42.0 (2014/09/04) +- [#1053](https://github.com/request/request/pull/1053) Fix #1051 Parse auth properly when using non-tunneling proxy (@isaacs) + +### v2.41.0 (2014/09/04) +- [#1050](https://github.com/request/request/pull/1050) Pass whitelisted headers to tunneling proxy. Organize all tunneling logic. (@isaacs, @Feldhacker) +- [#1035](https://github.com/request/request/pull/1035) souped up nodei.co badge (@rvagg) +- [#1048](https://github.com/request/request/pull/1048) Aws is now possible over a proxy (@steven-aerts) +- [#1039](https://github.com/request/request/pull/1039) extract out helper functions to a helper file (@seanstrom) +- [#1021](https://github.com/request/request/pull/1021) Support/refactor indexjs (@seanstrom) +- [#1033](https://github.com/request/request/pull/1033) Improve and document debug options (@nylen) +- [#1034](https://github.com/request/request/pull/1034) Fix readme headings (@nylen) +- [#1030](https://github.com/request/request/pull/1030) Allow recursive request.defaults (@tikotzky) +- [#1029](https://github.com/request/request/pull/1029) Fix a couple of typos (@nylen) +- [#675](https://github.com/request/request/pull/675) Checking for SSL fault on connection before reading SSL properties (@VRMink) +- [#989](https://github.com/request/request/pull/989) Added allowRedirect function. Should return true if redirect is allowed or false otherwise (@doronin) +- [#1025](https://github.com/request/request/pull/1025) [fixes #1023] Set self._ended to true once response has ended (@mridgway) +- [#1020](https://github.com/request/request/pull/1020) Add back removed debug metadata (@FredKSchott) +- [#1008](https://github.com/request/request/pull/1008) Moving to module instead of cutomer buffer concatenation. (@mikeal) +- [#770](https://github.com/request/request/pull/770) Added dependency badge for README file; (@timgluz, @mafintosh, @lalitkapoor, @stash, @bobyrizov) +- [#1016](https://github.com/request/request/pull/1016) toJSON no longer results in an infinite loop, returns simple objects (@FredKSchott) +- [#1018](https://github.com/request/request/pull/1018) Remove pre-0.4.4 HTTPS fix (@mmalecki) +- [#1006](https://github.com/request/request/pull/1006) Migrate to caseless, fixes #1001 (@mikeal) +- [#995](https://github.com/request/request/pull/995) Fix parsing array of objects (@sjonnet19) +- [#999](https://github.com/request/request/pull/999) Fix fallback for browserify for optional modules. (@eiriksm) +- [#996](https://github.com/request/request/pull/996) Wrong oauth signature when multiple same param keys exist [updated] (@bengl) + +### v2.40.0 (2014/08/06) +- [#992](https://github.com/request/request/pull/992) Fix security vulnerability. Update qs (@poeticninja) +- [#988](https://github.com/request/request/pull/988) “--” -> “—” (@upisfree) +- [#987](https://github.com/request/request/pull/987) Show optional modules as being loaded by the module that reqeusted them (@iarna) + +### v2.39.0 (2014/07/24) +- [#976](https://github.com/request/request/pull/976) Update README.md (@pvoznenko) + +### v2.38.0 (2014/07/22) +- [#952](https://github.com/request/request/pull/952) Adding support to client certificate with proxy use case (@ofirshaked) +- [#884](https://github.com/request/request/pull/884) Documented tough-cookie installation. (@wbyoung) +- [#935](https://github.com/request/request/pull/935) Correct repository url (@fritx) +- [#963](https://github.com/request/request/pull/963) Update changelog (@nylen) +- [#960](https://github.com/request/request/pull/960) Support gzip with encoding on node pre-v0.9.4 (@kevinoid) +- [#953](https://github.com/request/request/pull/953) Add async Content-Length computation when using form-data (@LoicMahieu) +- [#844](https://github.com/request/request/pull/844) Add support for HTTP[S]_PROXY environment variables. Fixes #595. (@jvmccarthy) +- [#946](https://github.com/request/request/pull/946) defaults: merge headers (@aj0strow) + +### v2.37.0 (2014/07/07) +- [#957](https://github.com/request/request/pull/957) Silence EventEmitter memory leak warning #311 (@watson) +- [#955](https://github.com/request/request/pull/955) check for content-length header before setting it in nextTick (@camilleanne) +- [#951](https://github.com/request/request/pull/951) Add support for gzip content decoding (@kevinoid) +- [#949](https://github.com/request/request/pull/949) Manually enter querystring in form option (@charlespwd) +- [#944](https://github.com/request/request/pull/944) Make request work with browserify (@eiriksm) +- [#943](https://github.com/request/request/pull/943) New mime module (@eiriksm) +- [#927](https://github.com/request/request/pull/927) Bump version of hawk dep. (@samccone) +- [#907](https://github.com/request/request/pull/907) append secureOptions to poolKey (@medovob) + +### v2.35.0 (2014/05/17) +- [#901](https://github.com/request/request/pull/901) Fixes #555 (@pigulla) +- [#897](https://github.com/request/request/pull/897) merge with default options (@vohof) +- [#891](https://github.com/request/request/pull/891) fixes 857 - options object is mutated by calling request (@lalitkapoor) +- [#869](https://github.com/request/request/pull/869) Pipefilter test (@tgohn) +- [#866](https://github.com/request/request/pull/866) Fix typo (@dandv) +- [#861](https://github.com/request/request/pull/861) Add support for RFC 6750 Bearer Tokens (@phedny) +- [#809](https://github.com/request/request/pull/809) upgrade tunnel-proxy to 0.4.0 (@ksato9700) +- [#850](https://github.com/request/request/pull/850) Fix word consistency in readme (@0xNobody) +- [#810](https://github.com/request/request/pull/810) add some exposition to mpu example in README.md (@mikermcneil) +- [#840](https://github.com/request/request/pull/840) improve error reporting for invalid protocols (@FND) +- [#821](https://github.com/request/request/pull/821) added secureOptions back (@nw) +- [#815](https://github.com/request/request/pull/815) Create changelog based on pull requests (@lalitkapoor) + +### v2.34.0 (2014/02/18) +- [#516](https://github.com/request/request/pull/516) UNIX Socket URL Support (@lyuzashi) +- [#801](https://github.com/request/request/pull/801) 794 ignore cookie parsing and domain errors (@lalitkapoor) +- [#802](https://github.com/request/request/pull/802) Added the Apache license to the package.json. (@keskival) +- [#793](https://github.com/request/request/pull/793) Adds content-length calculation when submitting forms using form-data li... (@Juul) +- [#785](https://github.com/request/request/pull/785) Provide ability to override content-type when `json` option used (@vvo) +- [#781](https://github.com/request/request/pull/781) simpler isReadStream function (@joaojeronimo) + +### v2.32.0 (2014/01/16) +- [#767](https://github.com/request/request/pull/767) Use tough-cookie CookieJar sync API (@stash) +- [#764](https://github.com/request/request/pull/764) Case-insensitive authentication scheme (@bobyrizov) +- [#763](https://github.com/request/request/pull/763) Upgrade tough-cookie to 0.10.0 (@stash) +- [#744](https://github.com/request/request/pull/744) Use Cookie.parse (@lalitkapoor) +- [#757](https://github.com/request/request/pull/757) require aws-sign2 (@mafintosh) + +### v2.31.0 (2014/01/08) +- [#645](https://github.com/request/request/pull/645) update twitter api url to v1.1 (@mick) +- [#746](https://github.com/request/request/pull/746) README: Markdown code highlight (@weakish) +- [#745](https://github.com/request/request/pull/745) updating setCookie example to make it clear that the callback is required (@emkay) +- [#742](https://github.com/request/request/pull/742) Add note about JSON output body type (@iansltx) +- [#741](https://github.com/request/request/pull/741) README example is using old cookie jar api (@emkay) +- [#736](https://github.com/request/request/pull/736) Fix callback arguments documentation (@mmalecki) +- [#732](https://github.com/request/request/pull/732) JSHINT: Creating global 'for' variable. Should be 'for (var ...'. (@Fritz-Lium) +- [#730](https://github.com/request/request/pull/730) better HTTP DIGEST support (@dai-shi) +- [#728](https://github.com/request/request/pull/728) Fix TypeError when calling request.cookie (@scarletmeow) +- [#727](https://github.com/request/request/pull/727) fix requester bug (@jchris) +- [#724](https://github.com/request/request/pull/724) README.md: add custom HTTP Headers example. (@tcort) +- [#719](https://github.com/request/request/pull/719) Made a comment gender neutral. (@unsetbit) +- [#715](https://github.com/request/request/pull/715) Request.multipart no longer crashes when header 'Content-type' present (@pastaclub) +- [#710](https://github.com/request/request/pull/710) Fixing listing in callback part of docs. (@lukasz-zak) +- [#696](https://github.com/request/request/pull/696) Edited README.md for formatting and clarity of phrasing (@Zearin) +- [#694](https://github.com/request/request/pull/694) Typo in README (@VRMink) +- [#690](https://github.com/request/request/pull/690) Handle blank password in basic auth. (@diversario) +- [#682](https://github.com/request/request/pull/682) Optional dependencies (@Turbo87) +- [#683](https://github.com/request/request/pull/683) Travis CI support (@Turbo87) +- [#674](https://github.com/request/request/pull/674) change cookie module,to tough-cookie.please check it . (@sxyizhiren) +- [#666](https://github.com/request/request/pull/666) make `ciphers` and `secureProtocol` to work in https request (@richarddong) +- [#656](https://github.com/request/request/pull/656) Test case for #304. (@diversario) +- [#662](https://github.com/request/request/pull/662) option.tunnel to explicitly disable tunneling (@seanmonstar) +- [#659](https://github.com/request/request/pull/659) fix failure when running with NODE_DEBUG=request, and a test for that (@jrgm) +- [#630](https://github.com/request/request/pull/630) Send random cnonce for HTTP Digest requests (@wprl) +- [#619](https://github.com/request/request/pull/619) decouple things a bit (@joaojeronimo) +- [#613](https://github.com/request/request/pull/613) Fixes #583, moved initialization of self.uri.pathname (@lexander) +- [#605](https://github.com/request/request/pull/605) Only include ":" + pass in Basic Auth if it's defined (fixes #602) (@bendrucker) +- [#596](https://github.com/request/request/pull/596) Global agent is being used when pool is specified (@Cauldrath) +- [#594](https://github.com/request/request/pull/594) Emit complete event when there is no callback (@RomainLK) +- [#601](https://github.com/request/request/pull/601) Fixed a small typo (@michalstanko) +- [#589](https://github.com/request/request/pull/589) Prevent setting headers after they are sent (@geek) +- [#587](https://github.com/request/request/pull/587) Global cookie jar disabled by default (@threepointone) +- [#544](https://github.com/request/request/pull/544) Update http-signature version. (@davidlehn) +- [#581](https://github.com/request/request/pull/581) Fix spelling of "ignoring." (@bigeasy) +- [#568](https://github.com/request/request/pull/568) use agentOptions to create agent when specified in request (@SamPlacette) +- [#564](https://github.com/request/request/pull/564) Fix redirections (@criloz) +- [#541](https://github.com/request/request/pull/541) The exported request function doesn't have an auth method (@tschaub) +- [#542](https://github.com/request/request/pull/542) Expose Request class (@regality) +- [#536](https://github.com/request/request/pull/536) Allow explicitly empty user field for basic authentication. (@mikeando) +- [#532](https://github.com/request/request/pull/532) fix typo (@fredericosilva) +- [#497](https://github.com/request/request/pull/497) Added redirect event (@Cauldrath) +- [#503](https://github.com/request/request/pull/503) Fix basic auth for passwords that contain colons (@tonistiigi) +- [#521](https://github.com/request/request/pull/521) Improving test-localAddress.js (@noway) +- [#529](https://github.com/request/request/pull/529) dependencies versions bump (@jodaka) +- [#523](https://github.com/request/request/pull/523) Updating dependencies (@noway) +- [#520](https://github.com/request/request/pull/520) Fixing test-tunnel.js (@noway) +- [#519](https://github.com/request/request/pull/519) Update internal path state on post-creation QS changes (@jblebrun) +- [#510](https://github.com/request/request/pull/510) Add HTTP Signature support. (@davidlehn) +- [#502](https://github.com/request/request/pull/502) Fix POST (and probably other) requests that are retried after 401 Unauthorized (@nylen) +- [#508](https://github.com/request/request/pull/508) Honor the .strictSSL option when using proxies (tunnel-agent) (@jhs) +- [#512](https://github.com/request/request/pull/512) Make password optional to support the format: http://username@hostname/ (@pajato1) +- [#513](https://github.com/request/request/pull/513) add 'localAddress' support (@yyfrankyy) +- [#498](https://github.com/request/request/pull/498) Moving response emit above setHeaders on destination streams (@kenperkins) +- [#490](https://github.com/request/request/pull/490) Empty response body (3-rd argument) must be passed to callback as an empty string (@Olegas) +- [#479](https://github.com/request/request/pull/479) Changing so if Accept header is explicitly set, sending json does not ov... (@RoryH) +- [#475](https://github.com/request/request/pull/475) Use `unescape` from `querystring` (@shimaore) +- [#473](https://github.com/request/request/pull/473) V0.10 compat (@isaacs) +- [#471](https://github.com/request/request/pull/471) Using querystring library from visionmedia (@kbackowski) +- [#461](https://github.com/request/request/pull/461) Strip the UTF8 BOM from a UTF encoded response (@kppullin) +- [#460](https://github.com/request/request/pull/460) hawk 0.10.0 (@hueniverse) +- [#462](https://github.com/request/request/pull/462) if query params are empty, then request path shouldn't end with a '?' (merges cleanly now) (@jaipandya) +- [#456](https://github.com/request/request/pull/456) hawk 0.9.0 (@hueniverse) +- [#429](https://github.com/request/request/pull/429) Copy options before adding callback. (@nrn, @nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#454](https://github.com/request/request/pull/454) Destroy the response if present when destroying the request (clean merge) (@mafintosh) +- [#310](https://github.com/request/request/pull/310) Twitter Oauth Stuff Out of Date; Now Updated (@joemccann, @isaacs, @mscdex) +- [#413](https://github.com/request/request/pull/413) rename googledoodle.png to .jpg (@nfriedly, @youurayy, @jplock, @kapetan, @landeiro, @othiym23, @mmalecki) +- [#448](https://github.com/request/request/pull/448) Convenience method for PATCH (@mloar) +- [#444](https://github.com/request/request/pull/444) protect against double callbacks on error path (@spollack) +- [#433](https://github.com/request/request/pull/433) Added support for HTTPS cert & key (@mmalecki) +- [#430](https://github.com/request/request/pull/430) Respect specified {Host,host} headers, not just {host} (@andrewschaaf) +- [#415](https://github.com/request/request/pull/415) Fixed a typo. (@jerem) +- [#338](https://github.com/request/request/pull/338) Add more auth options, including digest support (@nylen) +- [#403](https://github.com/request/request/pull/403) Optimize environment lookup to happen once only (@mmalecki) +- [#398](https://github.com/request/request/pull/398) Add more reporting to tests (@mmalecki) +- [#388](https://github.com/request/request/pull/388) Ensure "safe" toJSON doesn't break EventEmitters (@othiym23) +- [#381](https://github.com/request/request/pull/381) Resolving "Invalid signature. Expected signature base string: " (@landeiro) +- [#380](https://github.com/request/request/pull/380) Fixes missing host header on retried request when using forever agent (@mac-) +- [#376](https://github.com/request/request/pull/376) Headers lost on redirect (@kapetan) +- [#375](https://github.com/request/request/pull/375) Fix for missing oauth_timestamp parameter (@jplock) +- [#374](https://github.com/request/request/pull/374) Correct Host header for proxy tunnel CONNECT (@youurayy) +- [#370](https://github.com/request/request/pull/370) Twitter reverse auth uses x_auth_mode not x_auth_type (@drudge) +- [#369](https://github.com/request/request/pull/369) Don't remove x_auth_mode for Twitter reverse auth (@drudge) +- [#344](https://github.com/request/request/pull/344) Make AWS auth signing find headers correctly (@nlf) +- [#363](https://github.com/request/request/pull/363) rfc3986 on base_uri, now passes tests (@jeffmarshall) +- [#362](https://github.com/request/request/pull/362) Running `rfc3986` on `base_uri` in `oauth.hmacsign` instead of just `encodeURIComponent` (@jeffmarshall) +- [#361](https://github.com/request/request/pull/361) Don't create a Content-Length header if we already have it set (@danjenkins) +- [#360](https://github.com/request/request/pull/360) Delete self._form along with everything else on redirect (@jgautier) +- [#355](https://github.com/request/request/pull/355) stop sending erroneous headers on redirected requests (@azylman) +- [#332](https://github.com/request/request/pull/332) Fix #296 - Only set Content-Type if body exists (@Marsup) +- [#343](https://github.com/request/request/pull/343) Allow AWS to work in more situations, added a note in the README on its usage (@nlf) +- [#320](https://github.com/request/request/pull/320) request.defaults() doesn't need to wrap jar() (@StuartHarris) +- [#322](https://github.com/request/request/pull/322) Fix + test for piped into request bumped into redirect. #321 (@alexindigo) +- [#326](https://github.com/request/request/pull/326) Do not try to remove listener from an undefined connection (@CartoDB) +- [#318](https://github.com/request/request/pull/318) Pass servername to tunneling secure socket creation (@isaacs) +- [#317](https://github.com/request/request/pull/317) Workaround for #313 (@isaacs) +- [#293](https://github.com/request/request/pull/293) Allow parser errors to bubble up to request (@mscdex) +- [#290](https://github.com/request/request/pull/290) A test for #289 (@isaacs) +- [#280](https://github.com/request/request/pull/280) Like in node.js print options if NODE_DEBUG contains the word request (@Filirom1) +- [#207](https://github.com/request/request/pull/207) Fix #206 Change HTTP/HTTPS agent when redirecting between protocols (@isaacs) +- [#214](https://github.com/request/request/pull/214) documenting additional behavior of json option (@jphaas, @vpulim) +- [#272](https://github.com/request/request/pull/272) Boundary begins with CRLF? (@elspoono, @timshadel, @naholyr, @nanodocumet, @TehShrike) +- [#284](https://github.com/request/request/pull/284) Remove stray `console.log()` call in multipart generator. (@bcherry) +- [#241](https://github.com/request/request/pull/241) Composability updates suggested by issue #239 (@polotek) +- [#282](https://github.com/request/request/pull/282) OAuth Authorization header contains non-"oauth_" parameters (@jplock) +- [#279](https://github.com/request/request/pull/279) fix tests with boundary by injecting boundry from header (@benatkin) +- [#273](https://github.com/request/request/pull/273) Pipe back pressure issue (@mafintosh) +- [#268](https://github.com/request/request/pull/268) I'm not OCD seriously (@TehShrike) +- [#263](https://github.com/request/request/pull/263) Bug in OAuth key generation for sha1 (@nanodocumet) +- [#265](https://github.com/request/request/pull/265) uncaughtException when redirected to invalid URI (@naholyr) +- [#262](https://github.com/request/request/pull/262) JSON test should check for equality (@timshadel) +- [#261](https://github.com/request/request/pull/261) Setting 'pool' to 'false' does NOT disable Agent pooling (@timshadel) +- [#249](https://github.com/request/request/pull/249) Fix for the fix of your (closed) issue #89 where self.headers[content-length] is set to 0 for all methods (@sethbridges, @polotek, @zephrax, @jeromegn) +- [#255](https://github.com/request/request/pull/255) multipart allow body === '' ( the empty string ) (@Filirom1) +- [#260](https://github.com/request/request/pull/260) fixed just another leak of 'i' (@sreuter) +- [#246](https://github.com/request/request/pull/246) Fixing the set-cookie header (@jeromegn) +- [#243](https://github.com/request/request/pull/243) Dynamic boundary (@zephrax) +- [#240](https://github.com/request/request/pull/240) don't error when null is passed for options (@polotek) +- [#211](https://github.com/request/request/pull/211) Replace all occurrences of special chars in RFC3986 (@chriso, @vpulim) +- [#224](https://github.com/request/request/pull/224) Multipart content-type change (@janjongboom) +- [#217](https://github.com/request/request/pull/217) need to use Authorization (titlecase) header with Tumblr OAuth (@visnup) +- [#203](https://github.com/request/request/pull/203) Fix cookie and redirect bugs and add auth support for HTTPS tunnel (@vpulim) +- [#199](https://github.com/request/request/pull/199) Tunnel (@isaacs) +- [#198](https://github.com/request/request/pull/198) Bugfix on forever usage of util.inherits (@isaacs) +- [#197](https://github.com/request/request/pull/197) Make ForeverAgent work with HTTPS (@isaacs) +- [#193](https://github.com/request/request/pull/193) Fixes GH-119 (@goatslacker) +- [#188](https://github.com/request/request/pull/188) Add abort support to the returned request (@itay) +- [#176](https://github.com/request/request/pull/176) Querystring option (@csainty) +- [#182](https://github.com/request/request/pull/182) Fix request.defaults to support (uri, options, callback) api (@twilson63) +- [#180](https://github.com/request/request/pull/180) Modified the post, put, head and del shortcuts to support uri optional param (@twilson63) +- [#179](https://github.com/request/request/pull/179) fix to add opts in .pipe(stream, opts) (@substack) +- [#177](https://github.com/request/request/pull/177) Issue #173 Support uri as first and optional config as second argument (@twilson63) +- [#170](https://github.com/request/request/pull/170) can't create a cookie in a wrapped request (defaults) (@fabianonunes) +- [#168](https://github.com/request/request/pull/168) Picking off an EasyFix by adding some missing mimetypes. (@serby) +- [#161](https://github.com/request/request/pull/161) Fix cookie jar/headers.cookie collision (#125) (@papandreou) +- [#162](https://github.com/request/request/pull/162) Fix issue #159 (@dpetukhov) +- [#90](https://github.com/request/request/pull/90) add option followAllRedirects to follow post/put redirects (@jroes) +- [#148](https://github.com/request/request/pull/148) Retry Agent (@thejh) +- [#146](https://github.com/request/request/pull/146) Multipart should respect content-type if previously set (@apeace) +- [#144](https://github.com/request/request/pull/144) added "form" option to readme (@petejkim) +- [#133](https://github.com/request/request/pull/133) Fixed cookies parsing (@afanasy) +- [#135](https://github.com/request/request/pull/135) host vs hostname (@iangreenleaf) +- [#132](https://github.com/request/request/pull/132) return the body as a Buffer when encoding is set to null (@jahewson) +- [#112](https://github.com/request/request/pull/112) Support using a custom http-like module (@jhs) +- [#104](https://github.com/request/request/pull/104) Cookie handling contains bugs (@janjongboom) +- [#121](https://github.com/request/request/pull/121) Another patch for cookie handling regression (@jhurliman) +- [#117](https://github.com/request/request/pull/117) Remove the global `i` (@3rd-Eden) +- [#110](https://github.com/request/request/pull/110) Update to Iris Couch URL (@jhs) +- [#86](https://github.com/request/request/pull/86) Can't post binary to multipart requests (@kkaefer) +- [#105](https://github.com/request/request/pull/105) added test for proxy option. (@dominictarr) +- [#102](https://github.com/request/request/pull/102) Implemented cookies - closes issue 82: https://github.com/mikeal/request/issues/82 (@alessioalex) +- [#97](https://github.com/request/request/pull/97) Typo in previous pull causes TypeError in non-0.5.11 versions (@isaacs) +- [#96](https://github.com/request/request/pull/96) Authless parsed url host support (@isaacs) +- [#81](https://github.com/request/request/pull/81) Enhance redirect handling (@danmactough) +- [#78](https://github.com/request/request/pull/78) Don't try to do strictSSL for non-ssl connections (@isaacs) +- [#76](https://github.com/request/request/pull/76) Bug when a request fails and a timeout is set (@Marsup) +- [#70](https://github.com/request/request/pull/70) add test script to package.json (@isaacs, @aheckmann) +- [#73](https://github.com/request/request/pull/73) Fix #71 Respect the strictSSL flag (@isaacs) +- [#69](https://github.com/request/request/pull/69) Flatten chunked requests properly (@isaacs) +- [#67](https://github.com/request/request/pull/67) fixed global variable leaks (@aheckmann) +- [#66](https://github.com/request/request/pull/66) Do not overwrite established content-type headers for read stream deliver (@voodootikigod) +- [#53](https://github.com/request/request/pull/53) Parse json: Issue #51 (@benatkin) +- [#45](https://github.com/request/request/pull/45) Added timeout option (@mbrevoort) +- [#35](https://github.com/request/request/pull/35) The "end" event isn't emitted for some responses (@voxpelli) +- [#31](https://github.com/request/request/pull/31) Error on piping a request to a destination (@tobowers) \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/LICENSE new file mode 100644 index 0000000..a4a9aee --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/LICENSE @@ -0,0 +1,55 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and + +You must cause any modified files to carry prominent notices stating that You changed the files; and + +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/README.md new file mode 100644 index 0000000..cedc19d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/README.md @@ -0,0 +1,1097 @@ + +# Request - Simplified HTTP client + +[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/) + +[![Build status](https://img.shields.io/travis/request/request/master.svg?style=flat-square)](https://travis-ci.org/request/request) +[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master) +[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request) +[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request) +[![Known Vulnerabilities](https://snyk.io/test/npm/request/badge.svg?style=flat-square)](https://snyk.io/test/npm/request) +[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge) + + +## Super simple to use + +Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. + +```js +var request = require('request'); +request('http://www.google.com', function (error, response, body) { + console.log('error:', error); // Print the error if one occurred + console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received + console.log('body:', body); // Print the HTML for the Google homepage. +}); +``` + + +## Table of contents + +- [Streaming](#streaming) +- [Promises & Async/Await](#promises--asyncawait) +- [Forms](#forms) +- [HTTP Authentication](#http-authentication) +- [Custom HTTP Headers](#custom-http-headers) +- [OAuth Signing](#oauth-signing) +- [Proxies](#proxies) +- [Unix Domain Sockets](#unix-domain-sockets) +- [TLS/SSL Protocol](#tlsssl-protocol) +- [Support for HAR 1.2](#support-for-har-12) +- [**All Available Options**](#requestoptions-callback) + +Request also offers [convenience methods](#convenience-methods) like +`request.defaults` and `request.post`, and there are +lots of [usage examples](#examples) and several +[debugging techniques](#debugging). + + +--- + + +## Streaming + +You can stream any response to a file stream. + +```js +request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png')) +``` + +You can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one). + +```js +fs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json')) +``` + +Request can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers. + +```js +request.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png')) +``` + +Request emits a "response" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](https://nodejs.org/api/http.html#http_class_http_incomingmessage). + +```js +request + .get('http://google.com/img.png') + .on('response', function(response) { + console.log(response.statusCode) // 200 + console.log(response.headers['content-type']) // 'image/png' + }) + .pipe(request.put('http://mysite.com/img.png')) +``` + +To easily handle errors when streaming requests, listen to the `error` event before piping: + +```js +request + .get('http://mysite.com/doodle.png') + .on('error', function(err) { + console.log(err) + }) + .pipe(fs.createWriteStream('doodle.png')) +``` + +Now let’s get fancy. + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + if (req.method === 'PUT') { + req.pipe(request.put('http://mysite.com/doodle.png')) + } else if (req.method === 'GET' || req.method === 'HEAD') { + request.get('http://mysite.com/doodle.png').pipe(resp) + } + } +}) +``` + +You can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do: + +```js +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + var x = request('http://mysite.com/doodle.png') + req.pipe(x) + x.pipe(resp) + } +}) +``` + +And since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :) + +```js +req.pipe(request('http://mysite.com/doodle.png')).pipe(resp) +``` + +Also, none of this new functionality conflicts with requests previous features, it just expands them. + +```js +var r = request.defaults({'proxy':'http://localproxy.com'}) + +http.createServer(function (req, resp) { + if (req.url === '/doodle.png') { + r.get('http://google.com/doodle.png').pipe(resp) + } +}) +``` + +You can still use intermediate proxies, the requests will still follow HTTP forwards, etc. + +[back to top](#table-of-contents) + + +--- + + +## Promises & Async/Await + +`request` supports both streaming and callback interfaces natively. If you'd like `request` to return a Promise instead, you can use an alternative interface wrapper for `request`. These wrappers can be useful if you prefer to work with Promises, or if you'd like to use `async`/`await` in ES2017. + +Several alternative interfaces are provided by the request team, including: +- [`request-promise`](https://github.com/request/request-promise) (uses [Bluebird](https://github.com/petkaantonov/bluebird) Promises) +- [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises) +- [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises) + + +[back to top](#table-of-contents) + + +--- + + +## Forms + +`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. + + +#### application/x-www-form-urlencoded (URL-Encoded Forms) + +URL-encoded forms are simple. + +```js +request.post('http://service.com/upload', {form:{key:'value'}}) +// or +request.post('http://service.com/upload').form({key:'value'}) +// or +request.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ }) +``` + + +#### multipart/form-data (Multipart Form Uploads) + +For `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option. + + +```js +var formData = { + // Pass a simple key-value pair + my_field: 'my_value', + // Pass data via Buffers + my_buffer: new Buffer([1, 2, 3]), + // Pass data via Streams + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), + // Pass multiple values /w an Array + attachments: [ + fs.createReadStream(__dirname + '/attachment1.jpg'), + fs.createReadStream(__dirname + '/attachment2.jpg') + ], + // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS} + // Use case: for some types of streams, you'll need to provide "file"-related information manually. + // See the `form-data` README for more information about options: https://github.com/form-data/form-data + custom_file: { + value: fs.createReadStream('/dev/urandom'), + options: { + filename: 'topsecret.jpg', + contentType: 'image/jpeg' + } + } +}; +request.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.) + +```js +// NOTE: Advanced use-case, for normal use see 'formData' usage above +var r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...}) +var form = r.form(); +form.append('my_field', 'my_value'); +form.append('my_buffer', new Buffer([1, 2, 3])); +form.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'}); +``` +See the [form-data README](https://github.com/form-data/form-data) for more information & examples. + + +#### multipart/related + +Some variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options. + +```js + request({ + method: 'PUT', + preambleCRLF: true, + postambleCRLF: true, + uri: 'http://service.com/upload', + multipart: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' }, + { body: fs.createReadStream('image.png') } + ], + // alternatively pass an object containing additional options + multipart: { + chunked: false, + data: [ + { + 'content-type': 'application/json', + body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + }, + { body: 'I am an attachment' } + ] + } + }, + function (error, response, body) { + if (error) { + return console.error('upload failed:', error); + } + console.log('Upload successful! Server responded with:', body); + }) +``` + +[back to top](#table-of-contents) + + +--- + + +## HTTP Authentication + +```js +request.get('http://some.server.com/').auth('username', 'password', false); +// or +request.get('http://some.server.com/', { + 'auth': { + 'user': 'username', + 'pass': 'password', + 'sendImmediately': false + } +}); +// or +request.get('http://some.server.com/').auth(null, null, true, 'bearerToken'); +// or +request.get('http://some.server.com/', { + 'auth': { + 'bearer': 'bearerToken' + } +}); +``` + +If passed as an option, `auth` should be a hash containing values: + +- `user` || `username` +- `pass` || `password` +- `sendImmediately` (optional) +- `bearer` (optional) + +The method form takes parameters +`auth(username, password, sendImmediately, bearer)`. + +`sendImmediately` defaults to `true`, which causes a basic or bearer +authentication header to be sent. If `sendImmediately` is `false`, then +`request` will retry with a proper authentication header after receiving a +`401` response from the server (which must contain a `WWW-Authenticate` header +indicating the required authentication method). + +Note that you can also specify basic authentication using the URL itself, as +detailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the +`user:password` before the host with an `@` sign: + +```js +var username = 'username', + password = 'password', + url = 'http://' + username + ':' + password + '@some.server.com'; + +request({url: url}, function (error, response, body) { + // Do more stuff with 'body' here +}); +``` + +Digest authentication is supported, but it only works with `sendImmediately` +set to `false`; otherwise `request` will send basic authentication on the +initial request, which will probably cause the request to fail. + +Bearer authentication is supported, and is activated when the `bearer` value is +available. The value may be either a `String` or a `Function` returning a +`String`. Using a function to supply the bearer token is particularly useful if +used in conjunction with `defaults` to allow a single function to supply the +last known token at the time of sending a request, or to compute one on the fly. + +[back to top](#table-of-contents) + + +--- + + +## Custom HTTP Headers + +HTTP Headers, such as `User-Agent`, can be set in the `options` object. +In the example below, we call the github API to find out the number +of stars and forks for the request repository. This requires a +custom `User-Agent` header as well as https. + +```js +var request = require('request'); + +var options = { + url: 'https://api.github.com/repos/request/request', + headers: { + 'User-Agent': 'request' + } +}; + +function callback(error, response, body) { + if (!error && response.statusCode == 200) { + var info = JSON.parse(body); + console.log(info.stargazers_count + " Stars"); + console.log(info.forks_count + " Forks"); + } +} + +request(options, callback); +``` + +[back to top](#table-of-contents) + + +--- + + +## OAuth Signing + +[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The +default signing algorithm is +[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2): + +```js +// OAuth1.0 - 3-legged server side flow (Twitter example) +// step 1 +var qs = require('querystring') + , oauth = + { callback: 'http://mysite.com/callback/' + , consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + } + , url = 'https://api.twitter.com/oauth/request_token' + ; +request.post({url:url, oauth:oauth}, function (e, r, body) { + // Ideally, you would take the body in the response + // and construct a URL that a user clicks on (like a sign in button). + // The verifier is only available in the response after a user has + // verified with twitter that they are authorizing your app. + + // step 2 + var req_data = qs.parse(body) + var uri = 'https://api.twitter.com/oauth/authenticate' + + '?' + qs.stringify({oauth_token: req_data.oauth_token}) + // redirect the user to the authorize uri + + // step 3 + // after the user is redirected back to your server + var auth_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: auth_data.oauth_token + , token_secret: req_data.oauth_token_secret + , verifier: auth_data.oauth_verifier + } + , url = 'https://api.twitter.com/oauth/access_token' + ; + request.post({url:url, oauth:oauth}, function (e, r, body) { + // ready to make signed requests on behalf of the user + var perm_data = qs.parse(body) + , oauth = + { consumer_key: CONSUMER_KEY + , consumer_secret: CONSUMER_SECRET + , token: perm_data.oauth_token + , token_secret: perm_data.oauth_token_secret + } + , url = 'https://api.twitter.com/1.1/users/show.json' + , qs = + { screen_name: perm_data.screen_name + , user_id: perm_data.user_id + } + ; + request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) { + console.log(user) + }) + }) +}) +``` + +For [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make +the following changes to the OAuth options object: +* Pass `signature_method : 'RSA-SHA1'` +* Instead of `consumer_secret`, specify a `private_key` string in + [PEM format](http://how2ssl.com/articles/working_with_pem_files/) + +For [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make +the following changes to the OAuth options object: +* Pass `signature_method : 'PLAINTEXT'` + +To send OAuth parameters via query params or in a post body as described in The +[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param) +section of the oauth1 spec: +* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth + options object. +* `transport_method` defaults to `'header'` + +To use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either +* Manually generate the body hash and pass it as a string `body_hash: '...'` +* Automatically generate the body hash by passing `body_hash: true` + +[back to top](#table-of-contents) + + +--- + + +## Proxies + +If you specify a `proxy` option, then the request (and any subsequent +redirects) will be sent via a connection to the proxy server. + +If your endpoint is an `https` url, and you are using a proxy, then +request will send a `CONNECT` request to the proxy server *first*, and +then use the supplied connection to connect to the endpoint. + +That is, first it will make a request like: + +``` +HTTP/1.1 CONNECT endpoint-server.com:80 +Host: proxy-server.com +User-Agent: whatever user agent you specify +``` + +and then the proxy server make a TCP connection to `endpoint-server` +on port `80`, and return a response that looks like: + +``` +HTTP/1.1 200 OK +``` + +At this point, the connection is left open, and the client is +communicating directly with the `endpoint-server.com` machine. + +See [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel) +for more information. + +By default, when proxying `http` traffic, request will simply make a +standard proxied `http` request. This is done by making the `url` +section of the initial line of the request a fully qualified url to +the endpoint. + +For example, it will make a single request that looks like: + +``` +HTTP/1.1 GET http://endpoint-server.com/some-url +Host: proxy-server.com +Other-Headers: all go here + +request body or whatever +``` + +Because a pure "http over http" tunnel offers no additional security +or other features, it is generally simpler to go with a +straightforward HTTP proxy in this case. However, if you would like +to force a tunneling proxy, you may set the `tunnel` option to `true`. + +You can also make a standard proxied `http` request by explicitly setting +`tunnel : false`, but **note that this will allow the proxy to see the traffic +to/from the destination server**. + +If you are using a tunneling proxy, you may set the +`proxyHeaderWhiteList` to share certain headers with the proxy. + +You can also set the `proxyHeaderExclusiveList` to share certain +headers only with the proxy and not with destination host. + +By default, this set is: + +``` +accept +accept-charset +accept-encoding +accept-language +accept-ranges +cache-control +content-encoding +content-language +content-length +content-location +content-md5 +content-range +content-type +connection +date +expect +max-forwards +pragma +proxy-authorization +referer +te +transfer-encoding +user-agent +via +``` + +Note that, when using a tunneling proxy, the `proxy-authorization` +header and any headers from custom `proxyHeaderExclusiveList` are +*never* sent to the endpoint server, but only to the proxy server. + + +### Controlling proxy behaviour using environment variables + +The following environment variables are respected by `request`: + + * `HTTP_PROXY` / `http_proxy` + * `HTTPS_PROXY` / `https_proxy` + * `NO_PROXY` / `no_proxy` + +When `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request. + +`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables. + +Here's some examples of valid `no_proxy` values: + + * `google.com` - don't proxy HTTP/HTTPS requests to Google. + * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google. + * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo! + * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether. + +[back to top](#table-of-contents) + + +--- + + +## UNIX Domain Sockets + +`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme: + +```js +/* Pattern */ 'http://unix:SOCKET:PATH' +/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path') +``` + +Note: The `SOCKET` path is assumed to be absolute to the root of the host file system. + +[back to top](#table-of-contents) + + +--- + + +## TLS/SSL Protocol + +TLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be +set directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent). + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + passphrase: 'password', + ca: fs.readFileSync(caFile) +}; + +request.get(options); +``` + +### Using `options.agentOptions` + +In the example below, we call an API that requires client side SSL certificate +(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: + +```js +var fs = require('fs') + , path = require('path') + , certFile = path.resolve(__dirname, 'ssl/client.crt') + , keyFile = path.resolve(__dirname, 'ssl/client.key') + , request = require('request'); + +var options = { + url: 'https://api.some-server.com/', + agentOptions: { + cert: fs.readFileSync(certFile), + key: fs.readFileSync(keyFile), + // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format: + // pfx: fs.readFileSync(pfxFilePath), + passphrase: 'password', + securityOptions: 'SSL_OP_NO_SSLv3' + } +}; + +request.get(options); +``` + +It is able to force using SSLv3 only by specifying `secureProtocol`: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + secureProtocol: 'SSLv3_method' + } +}); +``` + +It is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs). +This can be useful, for example, when using self-signed certificates. +To require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`. +The certificate the domain presents must be signed by the root certificate specified: + +```js +request.get({ + url: 'https://api.some-server.com/', + agentOptions: { + ca: fs.readFileSync('ca.cert.pem') + } +}); +``` + +[back to top](#table-of-contents) + + +--- + +## Support for HAR 1.2 + +The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`. + +A validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. + +```js + var request = require('request') + request({ + // will be ignored + method: 'GET', + uri: 'http://www.google.com', + + // HTTP Archive Request Object + har: { + url: 'http://www.mockbin.com/har', + method: 'POST', + headers: [ + { + name: 'content-type', + value: 'application/x-www-form-urlencoded' + } + ], + postData: { + mimeType: 'application/x-www-form-urlencoded', + params: [ + { + name: 'foo', + value: 'bar' + }, + { + name: 'hello', + value: 'world' + } + ] + } + } + }) + + // a POST request will be sent to http://www.mockbin.com + // with body an application/x-www-form-urlencoded body: + // foo=bar&hello=world +``` + +[back to top](#table-of-contents) + + +--- + +## request(options, callback) + +The first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional. + +- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()` +- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string. +- `method` - http method (default: `"GET"`) +- `headers` - http headers (default: `{}`) + +--- + +- `qs` - object containing querystring values to be appended to the `uri` +- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}` +- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat` +- `useQuerystring` - if true, use `querystring` to stringify and parse + querystrings, otherwise use `qs` (default: `false`). Set this option to + `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the + default `foo[0]=bar&foo[1]=baz`. + +--- + +- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. +- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above. +- `formData` - data to pass for a `multipart/form-data` request. See + [Forms](#forms) section above. +- `multipart` - array of objects which contain their own headers and `body` + attributes. Sends a `multipart/related` request. See [Forms](#forms) section + above. + - Alternatively you can pass in an object `{chunked: false, data: []}` where + `chunked` is used to specify whether the request is sent in + [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) + In non-chunked requests, data items with body streams are not allowed. +- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request. +- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request. +- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON. +- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body. +- `jsonReplacer` - a [replacer function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify) that will be passed to `JSON.stringify()` when stringifying a JSON request body. + +--- + +- `auth` - a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. +- `oauth` - options for OAuth HMAC-SHA1 signing. See documentation above. +- `hawk` - options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). +- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. +- `httpSignature` - options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. + +--- + +- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise. +- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`) +- `followOriginalHttpMethod` - by default we redirect to HTTP method GET. you can enable this property to redirect to the original HTTP method (default: `false`) +- `maxRedirects` - the maximum number of redirects to follow (default: `10`) +- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain. + +--- + +- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) +- `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. +- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section) + +--- + +- `agent` - `http(s).Agent` instance to use +- `agentClass` - alternatively specify your agent's class name +- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions). +- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+ +- `pool` - an object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. + - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`). + - Note that if you are sending multiple requests in a loop and creating + multiple new `pool` objects, `maxSockets` will not work as intended. To + work around this, either use [`request.defaults`](#requestdefaultsoptions) + with your pool options or create the pool object with the `maxSockets` + property outside of the loop. +- `timeout` - integer containing the number of milliseconds to wait for a +server to send response headers (and start the response body) before aborting +the request. Note that if the underlying TCP connection cannot be established, +the OS-wide TCP connection timeout will overrule the `timeout` option ([the +default in Linux can be anywhere from 20-120 seconds][linux-timeout]). + +[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout + +--- + +- `localAddress` - local interface to bind for network connections. +- `proxy` - an HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) +- `strictSSL` - if `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. +- `tunnel` - controls the behavior of + [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) + as follows: + - `undefined` (default) - `true` if the destination is `https`, `false` otherwise + - `true` - always tunnel to the destination by making a `CONNECT` request to + the proxy + - `false` - request the destination as a `GET` request. +- `proxyHeaderWhiteList` - a whitelist of headers to send to a + tunneling proxy. +- `proxyHeaderExclusiveList` - a whitelist of headers to send + exclusively to a tunneling proxy and not to destination. + +--- + +- `time` - if `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object: + - `elapsedTime` Duration of the entire request/response in milliseconds (*deprecated*). + - `responseStartTime` Timestamp when the response began (in Unix Epoch milliseconds) (*deprecated*). + - `timingStart` Timestamp of the start of the request (in Unix Epoch milliseconds). + - `timings` Contains event timestamps in millisecond resolution relative to `timingStart`. If there were redirects, the properties reflect the timings of the final request in the redirect chain: + - `socket` Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_socket) module's `socket` event fires. This happens when the socket is assigned to the request. + - `lookup` Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_lookup) module's `lookup` event fires. This happens when the DNS has been resolved. + - `connect`: Relative timestamp when the [`net`](https://nodejs.org/api/net.html#net_event_connect) module's `connect` event fires. This happens when the server acknowledges the TCP connection. + - `response`: Relative timestamp when the [`http`](https://nodejs.org/api/http.html#http_event_response) module's `response` event fires. This happens when the first bytes are received from the server. + - `end`: Relative timestamp when the last bytes of the response are received. + - `timingPhases` Contains the durations of each request phase. If there were redirects, the properties reflect the timings of the final request in the redirect chain: + - `wait`: Duration of socket initialization (`timings.socket`) + - `dns`: Duration of DNS lookup (`timings.lookup` - `timings.socket`) + - `tcp`: Duration of TCP connection (`timings.connect` - `timings.socket`) + - `firstByte`: Duration of HTTP server response (`timings.response` - `timings.connect`) + - `download`: Duration of HTTP download (`timings.end` - `timings.response`) + - `total`: Duration entire HTTP round-trip (`timings.end`) + +- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* +- `callback` - alternatively pass the request's callback in the options object + +The callback argument gets 3 arguments: + +1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object) +2. An [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object (Response object) +3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied) + +[back to top](#table-of-contents) + + +--- + +## Convenience methods + +There are also shorthand methods for different HTTP METHODs and some other conveniences. + + +### request.defaults(options) + +This method **returns a wrapper** around the normal request API that defaults +to whatever options you pass to it. + +**Note:** `request.defaults()` **does not** modify the global request API; +instead, it **returns a wrapper** that has your default settings applied to it. + +**Note:** You can call `.defaults()` on the wrapper that is returned from +`request.defaults` to add/override defaults that were previously defaulted. + +For example: +```js +//requests using baseRequest() will set the 'x-token' header +var baseRequest = request.defaults({ + headers: {'x-token': 'my-token'} +}) + +//requests using specialRequest() will include the 'x-token' header set in +//baseRequest and will also include the 'special' header +var specialRequest = baseRequest.defaults({ + headers: {special: 'special value'} +}) +``` + +### request.METHOD() + +These HTTP method convenience functions act just like `request()` but with a default method already set for you: + +- *request.get()*: Defaults to `method: "GET"`. +- *request.post()*: Defaults to `method: "POST"`. +- *request.put()*: Defaults to `method: "PUT"`. +- *request.patch()*: Defaults to `method: "PATCH"`. +- *request.del() / request.delete()*: Defaults to `method: "DELETE"`. +- *request.head()*: Defaults to `method: "HEAD"`. +- *request.options()*: Defaults to `method: "OPTIONS"`. + +### request.cookie() + +Function that creates a new cookie. + +```js +request.cookie('key1=value1') +``` +### request.jar() + +Function that creates a new cookie jar. + +```js +request.jar() +``` + +[back to top](#table-of-contents) + + +--- + + +## Debugging + +There are at least three ways to debug the operation of `request`: + +1. Launch the node process like `NODE_DEBUG=request node script.js` + (`lib,request,otherlib` works too). + +2. Set `require('request').debug = true` at any time (this does the same thing + as #1). + +3. Use the [request-debug module](https://github.com/request/request-debug) to + view request and response headers and bodies. + +[back to top](#table-of-contents) + + +--- + +## Timeouts + +Most requests to external servers should have a timeout attached, in case the +server is not responding in a timely manner. Without a timeout, your code may +have a socket open/consume resources for minutes or more. + +There are two main types of timeouts: **connection timeouts** and **read +timeouts**. A connect timeout occurs if the timeout is hit while your client is +attempting to establish a connection to a remote machine (corresponding to the +[connect() call][connect] on the socket). A read timeout occurs any time the +server is too slow to send back a part of the response. + +These two situations have widely different implications for what went wrong +with the request, so it's useful to be able to distinguish them. You can detect +timeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you +can detect whether the timeout was a connection timeout by checking if the +`err.connect` property is set to `true`. + +```js +request.get('http://10.255.255.1', {timeout: 1500}, function(err) { + console.log(err.code === 'ETIMEDOUT'); + // Set to `true` if the timeout was a connection timeout, `false` or + // `undefined` otherwise. + console.log(err.connect === true); + process.exit(0); +}); +``` + +[connect]: http://linux.die.net/man/2/connect + +## Examples: + +```js + var request = require('request') + , rand = Math.floor(Math.random()*100000000).toString() + ; + request( + { method: 'PUT' + , uri: 'http://mikeal.iriscouch.com/testjs/' + rand + , multipart: + [ { 'content-type': 'application/json' + , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}}) + } + , { body: 'I am an attachment' } + ] + } + , function (error, response, body) { + if(response.statusCode == 201){ + console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand) + } else { + console.log('error: '+ response.statusCode) + console.log(body) + } + } + ) +``` + +For backwards-compatibility, response compression is not supported by default. +To accept gzip-compressed responses, set the `gzip` option to `true`. Note +that the body data passed through `request` is automatically decompressed +while the response object is unmodified and will contain compressed data if +the server sent a compressed response. + +```js + var request = require('request') + request( + { method: 'GET' + , uri: 'http://www.google.com' + , gzip: true + } + , function (error, response, body) { + // body is the decompressed response body + console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) + console.log('the decoded data is: ' + body) + } + ) + .on('data', function(data) { + // decompressed data as it is received + console.log('decoded chunk: ' + data) + }) + .on('response', function(response) { + // unmodified http.IncomingMessage object + response.on('data', function(data) { + // compressed data as it is received + console.log('received ' + data.length + ' bytes of compressed data') + }) + }) +``` + +Cookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`). + +```js +var request = request.defaults({jar: true}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`) + +```js +var j = request.jar() +var request = request.defaults({jar:j}) +request('http://www.google.com', function () { + request('http://images.google.com') +}) +``` + +OR + +```js +var j = request.jar(); +var cookie = request.cookie('key1=value1'); +var url = 'http://www.google.com'; +j.setCookie(cookie, url); +request({url: url, jar: j}, function () { + request('http://images.google.com') +}) +``` + +To use a custom cookie store (such as a +[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore) +which supports saving to and restoring from JSON files), pass it as a parameter +to `request.jar()`: + +```js +var FileCookieStore = require('tough-cookie-filestore'); +// NOTE - currently the 'cookies.json' file must already exist! +var j = request.jar(new FileCookieStore('cookies.json')); +request = request.defaults({ jar : j }) +request('http://www.google.com', function() { + request('http://images.google.com') +}) +``` + +The cookie store must be a +[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie) +store and it must support synchronous operations; see the +[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api) +for details. + +To inspect your cookie jar after a request: + +```js +var j = request.jar() +request({url: 'http://www.google.com', jar: j}, function () { + var cookie_string = j.getCookieString(url); // "key1=value1; key2=value2; ..." + var cookies = j.getCookies(url); + // [{key: 'key1', value: 'value1', domain: "www.google.com", ...}, ...] +}) +``` + +[back to top](#table-of-contents) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/index.js new file mode 100755 index 0000000..f9b480a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/index.js @@ -0,0 +1,155 @@ +// Copyright 2010-2012 Mikeal Rogers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict' + +var extend = require('extend') +var cookies = require('./lib/cookies') +var helpers = require('./lib/helpers') + +var paramsHaveRequestBody = helpers.paramsHaveRequestBody + +// organize params for patch, post, put, head, del +function initParams (uri, options, callback) { + if (typeof options === 'function') { + callback = options + } + + var params = {} + if (typeof options === 'object') { + extend(params, options, {uri: uri}) + } else if (typeof uri === 'string') { + extend(params, {uri: uri}) + } else { + extend(params, uri) + } + + params.callback = callback || params.callback + return params +} + +function request (uri, options, callback) { + if (typeof uri === 'undefined') { + throw new Error('undefined is not a valid uri or options object.') + } + + var params = initParams(uri, options, callback) + + if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { + throw new Error('HTTP HEAD requests MUST NOT include a request body.') + } + + return new request.Request(params) +} + +function verbFunc (verb) { + var method = verb.toUpperCase() + return function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.method = method + return request(params, params.callback) + } +} + +// define like this to please codeintel/intellisense IDEs +request.get = verbFunc('get') +request.head = verbFunc('head') +request.options = verbFunc('options') +request.post = verbFunc('post') +request.put = verbFunc('put') +request.patch = verbFunc('patch') +request.del = verbFunc('delete') +request['delete'] = verbFunc('delete') + +request.jar = function (store) { + return cookies.jar(store) +} + +request.cookie = function (str) { + return cookies.parse(str) +} + +function wrapRequestMethod (method, options, requester, verb) { + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) + + var target = {} + extend(true, target, options, params) + + target.pool = params.pool || options.pool + + if (verb) { + target.method = verb.toUpperCase() + } + + if (typeof requester === 'function') { + method = requester + } + + return method(target, target.callback) + } +} + +request.defaults = function (options, requester) { + var self = this + + options = options || {} + + if (typeof options === 'function') { + requester = options + options = {} + } + + var defaults = wrapRequestMethod(self, options, requester) + + var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] + verbs.forEach(function (verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + }) + + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar + defaults.defaults = self.defaults + return defaults +} + +request.forever = function (agentOptions, optionsArg) { + var options = {} + if (optionsArg) { + extend(options, optionsArg) + } + if (agentOptions) { + options.agentOptions = agentOptions + } + + options.forever = true + return request.defaults(options) +} + +// Exports + +module.exports = request +request.Request = require('./request') +request.initParams = initParams + +// Backwards compatibility for request.debug +Object.defineProperty(request, 'debug', { + enumerable: true, + get: function () { + return request.Request.debug + }, + set: function (debug) { + request.Request.debug = debug + } +}) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/auth.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/auth.js new file mode 100644 index 0000000..42f9ada --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/auth.js @@ -0,0 +1,167 @@ +'use strict' + +var caseless = require('caseless') +var uuid = require('uuid') +var helpers = require('./helpers') + +var md5 = helpers.md5 +var toBase64 = helpers.toBase64 + +function Auth (request) { + // define all public properties here + this.request = request + this.hasAuth = false + this.sentAuth = false + this.bearerToken = null + this.user = null + this.pass = null +} + +Auth.prototype.basic = function (user, pass, sendImmediately) { + var self = this + if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { + self.request.emit('error', new Error('auth() received invalid user or password')) + } + self.user = user + self.pass = pass + self.hasAuth = true + var header = user + ':' + (pass || '') + if (sendImmediately || typeof sendImmediately === 'undefined') { + var authHeader = 'Basic ' + toBase64(header) + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.bearer = function (bearer, sendImmediately) { + var self = this + self.bearerToken = bearer + self.hasAuth = true + if (sendImmediately || typeof sendImmediately === 'undefined') { + if (typeof bearer === 'function') { + bearer = bearer() + } + var authHeader = 'Bearer ' + (bearer || '') + self.sentAuth = true + return authHeader + } +} + +Auth.prototype.digest = function (method, path, authHeader) { + // TODO: More complete implementation of RFC 2617. + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c + + var self = this + + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) { + break + } + challenge[match[1]] = match[2] || match[3] + } + + /** + * RFC 2617: handle both MD5 and MD5-sess algorithms. + * + * If the algorithm directive's value is "MD5" or unspecified, then HA1 is + * HA1=MD5(username:realm:password) + * If the algorithm directive's value is "MD5-sess", then HA1 is + * HA1=MD5(MD5(username:realm:password):nonce:cnonce) + */ + var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { + var ha1 = md5(user + ':' + realm + ':' + pass) + if (algorithm && algorithm.toLowerCase() === 'md5-sess') { + return md5(ha1 + ':' + nonce + ':' + cnonce) + } else { + return ha1 + } + } + + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) + var ha2 = md5(method + ':' + path) + var digestResponse = qop + ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) + : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self.user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque + } + + authHeader = [] + for (var k in authValues) { + if (authValues[k]) { + if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.sentAuth = true + return authHeader +} + +Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { + var self = this + var request = self.request + + var authHeader + if (bearer === undefined && user === undefined) { + self.request.emit('error', new Error('no auth mechanism defined')) + } else if (bearer !== undefined) { + authHeader = self.bearer(bearer, sendImmediately) + } else { + authHeader = self.basic(user, pass, sendImmediately) + } + if (authHeader) { + request.setHeader('authorization', authHeader) + } +} + +Auth.prototype.onResponse = function (response) { + var self = this + var request = self.request + + if (!self.hasAuth || self.sentAuth) { return null } + + var c = caseless(response.headers) + + var authHeader = c.get('www-authenticate') + var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() + request.debug('reauth', authVerb) + + switch (authVerb) { + case 'basic': + return self.basic(self.user, self.pass, true) + + case 'bearer': + return self.bearer(self.bearerToken, true) + + case 'digest': + return self.digest(request.method, request.path, authHeader) + } +} + +exports.Auth = Auth diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/cookies.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/cookies.js new file mode 100644 index 0000000..bd5d46b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/cookies.js @@ -0,0 +1,38 @@ +'use strict' + +var tough = require('tough-cookie') + +var Cookie = tough.Cookie +var CookieJar = tough.CookieJar + +exports.parse = function (str) { + if (str && str.uri) { + str = str.uri + } + if (typeof str !== 'string') { + throw new Error('The cookie function only accepts STRING as param') + } + return Cookie.parse(str, {loose: true}) +} + +// Adapt the sometimes-Async api of tough.CookieJar to our requirements +function RequestJar (store) { + var self = this + self._jar = new CookieJar(store, {looseMode: true}) +} +RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { + var self = this + return self._jar.setCookieSync(cookieOrStr, uri, options || {}) +} +RequestJar.prototype.getCookieString = function (uri) { + var self = this + return self._jar.getCookieStringSync(uri) +} +RequestJar.prototype.getCookies = function (uri) { + var self = this + return self._jar.getCookiesSync(uri) +} + +exports.jar = function (store) { + return new RequestJar(store) +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/getProxyFromURI.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/getProxyFromURI.js new file mode 100644 index 0000000..4633ba5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/getProxyFromURI.js @@ -0,0 +1,79 @@ +'use strict' + +function formatHostname (hostname) { + // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' + return hostname.replace(/^\.*/, '.').toLowerCase() +} + +function parseNoProxyZone (zone) { + zone = zone.trim().toLowerCase() + + var zoneParts = zone.split(':', 2) + var zoneHost = formatHostname(zoneParts[0]) + var zonePort = zoneParts[1] + var hasPort = zone.indexOf(':') > -1 + + return {hostname: zoneHost, port: zonePort, hasPort: hasPort} +} + +function uriInNoProxy (uri, noProxy) { + var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') + var hostname = formatHostname(uri.hostname) + var noProxyList = noProxy.split(',') + + // iterate through the noProxyList until it finds a match. + return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) { + var isMatchedAt = hostname.indexOf(noProxyZone.hostname) + var hostnameMatched = ( + isMatchedAt > -1 && + (isMatchedAt === hostname.length - noProxyZone.hostname.length) + ) + + if (noProxyZone.hasPort) { + return (port === noProxyZone.port) && hostnameMatched + } + + return hostnameMatched + }) +} + +function getProxyFromURI (uri) { + // Decide the proper request proxy to use based on the request URI object and the + // environmental variables (NO_PROXY, HTTP_PROXY, etc.) + // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) + + var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' + + // if the noProxy is a wildcard then return null + + if (noProxy === '*') { + return null + } + + // if the noProxy is not empty and the uri is found return null + + if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { + return null + } + + // Check for HTTP or HTTPS Proxy in environment Else default to null + + if (uri.protocol === 'http:') { + return process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + if (uri.protocol === 'https:') { + return process.env.HTTPS_PROXY || + process.env.https_proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || null + } + + // if none of that works, return null + // (What uri protocol are you using then?) + + return null +} + +module.exports = getProxyFromURI diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/har.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/har.js new file mode 100644 index 0000000..2f66030 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/har.js @@ -0,0 +1,205 @@ +'use strict' + +var fs = require('fs') +var qs = require('querystring') +var validate = require('har-validator') +var extend = require('extend') + +function Har (request) { + this.request = request +} + +Har.prototype.reducer = function (obj, pair) { + // new property ? + if (obj[pair.name] === undefined) { + obj[pair.name] = pair.value + return obj + } + + // existing? convert to array + var arr = [ + obj[pair.name], + pair.value + ] + + obj[pair.name] = arr + + return obj +} + +Har.prototype.prep = function (data) { + // construct utility properties + data.queryObj = {} + data.headersObj = {} + data.postData.jsonObj = false + data.postData.paramsObj = false + + // construct query objects + if (data.queryString && data.queryString.length) { + data.queryObj = data.queryString.reduce(this.reducer, {}) + } + + // construct headers objects + if (data.headers && data.headers.length) { + // loweCase header keys + data.headersObj = data.headers.reduceRight(function (headers, header) { + headers[header.name] = header.value + return headers + }, {}) + } + + // construct Cookie header + if (data.cookies && data.cookies.length) { + var cookies = data.cookies.map(function (cookie) { + return cookie.name + '=' + cookie.value + }) + + if (cookies.length) { + data.headersObj.cookie = cookies.join('; ') + } + } + + // prep body + function some (arr) { + return arr.some(function (type) { + return data.postData.mimeType.indexOf(type) === 0 + }) + } + + if (some([ + 'multipart/mixed', + 'multipart/related', + 'multipart/form-data', + 'multipart/alternative'])) { + // reset values + data.postData.mimeType = 'multipart/form-data' + } else if (some([ + 'application/x-www-form-urlencoded'])) { + if (!data.postData.params) { + data.postData.text = '' + } else { + data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) + + // always overwrite + data.postData.text = qs.stringify(data.postData.paramsObj) + } + } else if (some([ + 'text/json', + 'text/x-json', + 'application/json', + 'application/x-json'])) { + data.postData.mimeType = 'application/json' + + if (data.postData.text) { + try { + data.postData.jsonObj = JSON.parse(data.postData.text) + } catch (e) { + this.request.debug(e) + + // force back to text/plain + data.postData.mimeType = 'text/plain' + } + } + } + + return data +} + +Har.prototype.options = function (options) { + // skip if no har property defined + if (!options.har) { + return options + } + + var har = {} + extend(har, options.har) + + // only process the first entry + if (har.log && har.log.entries) { + har = har.log.entries[0] + } + + // add optional properties to make validation successful + har.url = har.url || options.url || options.uri || options.baseUrl || '/' + har.httpVersion = har.httpVersion || 'HTTP/1.1' + har.queryString = har.queryString || [] + har.headers = har.headers || [] + har.cookies = har.cookies || [] + har.postData = har.postData || {} + har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' + + har.bodySize = 0 + har.headersSize = 0 + har.postData.size = 0 + + if (!validate.request(har)) { + return options + } + + // clean up and get some utility properties + var req = this.prep(har) + + // construct new options + if (req.url) { + options.url = req.url + } + + if (req.method) { + options.method = req.method + } + + if (Object.keys(req.queryObj).length) { + options.qs = req.queryObj + } + + if (Object.keys(req.headersObj).length) { + options.headers = req.headersObj + } + + function test (type) { + return req.postData.mimeType.indexOf(type) === 0 + } + if (test('application/x-www-form-urlencoded')) { + options.form = req.postData.paramsObj + } else if (test('application/json')) { + if (req.postData.jsonObj) { + options.body = req.postData.jsonObj + options.json = true + } + } else if (test('multipart/form-data')) { + options.formData = {} + + req.postData.params.forEach(function (param) { + var attachment = {} + + if (!param.fileName && !param.fileName && !param.contentType) { + options.formData[param.name] = param.value + return + } + + // attempt to read from disk! + if (param.fileName && !param.value) { + attachment.value = fs.createReadStream(param.fileName) + } else if (param.value) { + attachment.value = param.value + } + + if (param.fileName) { + attachment.options = { + filename: param.fileName, + contentType: param.contentType ? param.contentType : null + } + } + + options.formData[param.name] = attachment + }) + } else { + if (req.postData.text) { + options.body = req.postData.text + } + } + + return options +} + +exports.Har = Har diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/helpers.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/helpers.js new file mode 100644 index 0000000..8b2a7e6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/helpers.js @@ -0,0 +1,66 @@ +'use strict' + +var jsonSafeStringify = require('json-stringify-safe') +var crypto = require('crypto') +var Buffer = require('safe-buffer').Buffer + +var defer = typeof setImmediate === 'undefined' + ? process.nextTick + : setImmediate + +function paramsHaveRequestBody (params) { + return ( + params.body || + params.requestBodyStream || + (params.json && typeof params.json !== 'boolean') || + params.multipart + ) +} + +function safeStringify (obj, replacer) { + var ret + try { + ret = JSON.stringify(obj, replacer) + } catch (e) { + ret = jsonSafeStringify(obj, replacer) + } + return ret +} + +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function isReadStream (rs) { + return rs.readable && rs.path && rs.mode +} + +function toBase64 (str) { + return Buffer.from(str || '', 'utf8').toString('base64') +} + +function copy (obj) { + var o = {} + Object.keys(obj).forEach(function (i) { + o[i] = obj[i] + }) + return o +} + +function version () { + var numbers = process.version.replace('v', '').split('.') + return { + major: parseInt(numbers[0], 10), + minor: parseInt(numbers[1], 10), + patch: parseInt(numbers[2], 10) + } +} + +exports.paramsHaveRequestBody = paramsHaveRequestBody +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = defer diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/multipart.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/multipart.js new file mode 100644 index 0000000..d6b9812 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/multipart.js @@ -0,0 +1,112 @@ +'use strict' + +var uuid = require('uuid') +var CombinedStream = require('combined-stream') +var isstream = require('isstream') +var Buffer = require('safe-buffer').Buffer + +function Multipart (request) { + this.request = request + this.boundary = uuid() + this.chunked = false + this.body = null +} + +Multipart.prototype.isChunked = function (options) { + var self = this + var chunked = false + var parts = options.data || options + + if (!parts.forEach) { + self.request.emit('error', new Error('Argument error, options.multipart.')) + } + + if (options.chunked !== undefined) { + chunked = options.chunked + } + + if (self.request.getHeader('transfer-encoding') === 'chunked') { + chunked = true + } + + if (!chunked) { + parts.forEach(function (part) { + if (typeof part.body === 'undefined') { + self.request.emit('error', new Error('Body attribute missing in multipart.')) + } + if (isstream(part.body)) { + chunked = true + } + }) + } + + return chunked +} + +Multipart.prototype.setHeaders = function (chunked) { + var self = this + + if (chunked && !self.request.hasHeader('transfer-encoding')) { + self.request.setHeader('transfer-encoding', 'chunked') + } + + var header = self.request.getHeader('content-type') + + if (!header || header.indexOf('multipart') === -1) { + self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) + } else { + if (header.indexOf('boundary') !== -1) { + self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') + } else { + self.request.setHeader('content-type', header + '; boundary=' + self.boundary) + } + } +} + +Multipart.prototype.build = function (parts, chunked) { + var self = this + var body = chunked ? new CombinedStream() : [] + + function add (part) { + if (typeof part === 'number') { + part = part.toString() + } + return chunked ? body.append(part) : body.push(Buffer.from(part)) + } + + if (self.request.preambleCRLF) { + add('\r\n') + } + + parts.forEach(function (part) { + var preamble = '--' + self.boundary + '\r\n' + Object.keys(part).forEach(function (key) { + if (key === 'body') { return } + preamble += key + ': ' + part[key] + '\r\n' + }) + preamble += '\r\n' + add(preamble) + add(part.body) + add('\r\n') + }) + add('--' + self.boundary + '--') + + if (self.request.postambleCRLF) { + add('\r\n') + } + + return body +} + +Multipart.prototype.onRequest = function (options) { + var self = this + + var chunked = self.isChunked(options) + var parts = options.data || options + + self.setHeaders(chunked) + self.chunked = chunked + self.body = self.build(parts, chunked) +} + +exports.Multipart = Multipart diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/oauth.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/oauth.js new file mode 100644 index 0000000..0c9c57c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/oauth.js @@ -0,0 +1,148 @@ +'use strict' + +var url = require('url') +var qs = require('qs') +var caseless = require('caseless') +var uuid = require('uuid') +var oauth = require('oauth-sign') +var crypto = require('crypto') +var Buffer = require('safe-buffer').Buffer + +function OAuth (request) { + this.request = request + this.params = null +} + +OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { + var oa = {} + for (var i in _oauth) { + oa['oauth_' + i] = _oauth[i] + } + if (!oa.oauth_version) { + oa.oauth_version = '1.0' + } + if (!oa.oauth_timestamp) { + oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString() + } + if (!oa.oauth_nonce) { + oa.oauth_nonce = uuid().replace(/-/g, '') + } + if (!oa.oauth_signature_method) { + oa.oauth_signature_method = 'HMAC-SHA1' + } + + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase + delete oa.oauth_consumer_secret + delete oa.oauth_private_key + + var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase + delete oa.oauth_token_secret + + var realm = oa.oauth_realm + delete oa.oauth_realm + delete oa.oauth_transport_method + + var baseurl = uri.protocol + '//' + uri.host + uri.pathname + var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) + + oa.oauth_signature = oauth.sign( + oa.oauth_signature_method, + method, + baseurl, + params, + consumer_secret_or_private_key, // eslint-disable-line camelcase + token_secret // eslint-disable-line camelcase + ) + + if (realm) { + oa.realm = realm + } + + return oa +} + +OAuth.prototype.buildBodyHash = function (_oauth, body) { + if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { + this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + + ' signature_method not supported with body_hash signing.')) + } + + var shasum = crypto.createHash('sha1') + shasum.update(body || '') + var sha1 = shasum.digest('hex') + + return Buffer.from(sha1).toString('base64') +} + +OAuth.prototype.concatParams = function (oa, sep, wrap) { + wrap = wrap || '' + + var params = Object.keys(oa).filter(function (i) { + return i !== 'realm' && i !== 'oauth_signature' + }).sort() + + if (oa.realm) { + params.splice(0, 0, 'realm') + } + params.push('oauth_signature') + + return params.map(function (i) { + return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap + }).join(sep) +} + +OAuth.prototype.onRequest = function (_oauth) { + var self = this + self.params = _oauth + + var uri = self.request.uri || {} + var method = self.request.method || '' + var headers = caseless(self.request.headers) + var body = self.request.body || '' + var qsLib = self.request.qsLib || qs + + var form + var query + var contentType = headers.get('content-type') || '' + var formContentType = 'application/x-www-form-urlencoded' + var transport = _oauth.transport_method || 'header' + + if (contentType.slice(0, formContentType.length) === formContentType) { + contentType = formContentType + form = body + } + if (uri.query) { + query = uri.query + } + if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { + self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + + 'and content-type ' + formContentType)) + } + + if (!form && typeof _oauth.body_hash === 'boolean') { + _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) + } + + var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) + + switch (transport) { + case 'header': + self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) + break + + case 'query': + var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') + self.request.uri = url.parse(href) + self.request.path = self.request.uri.path + break + + case 'body': + self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') + break + + default: + self.request.emit('error', new Error('oauth: transport_method invalid')) + } +} + +exports.OAuth = OAuth diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/querystring.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/querystring.js new file mode 100644 index 0000000..4a32cd1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/querystring.js @@ -0,0 +1,50 @@ +'use strict' + +var qs = require('qs') +var querystring = require('querystring') + +function Querystring (request) { + this.request = request + this.lib = null + this.useQuerystring = null + this.parseOptions = null + this.stringifyOptions = null +} + +Querystring.prototype.init = function (options) { + if (this.lib) { return } + + this.useQuerystring = options.useQuerystring + this.lib = (this.useQuerystring ? querystring : qs) + + this.parseOptions = options.qsParseOptions || {} + this.stringifyOptions = options.qsStringifyOptions || {} +} + +Querystring.prototype.stringify = function (obj) { + return (this.useQuerystring) + ? this.rfc3986(this.lib.stringify(obj, + this.stringifyOptions.sep || null, + this.stringifyOptions.eq || null, + this.stringifyOptions)) + : this.lib.stringify(obj, this.stringifyOptions) +} + +Querystring.prototype.parse = function (str) { + return (this.useQuerystring) + ? this.lib.parse(str, + this.parseOptions.sep || null, + this.parseOptions.eq || null, + this.parseOptions) + : this.lib.parse(str, this.parseOptions) +} + +Querystring.prototype.rfc3986 = function (str) { + return str.replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) +} + +Querystring.prototype.unescape = querystring.unescape + +exports.Querystring = Querystring diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/redirect.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/redirect.js new file mode 100644 index 0000000..b9150e7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/redirect.js @@ -0,0 +1,154 @@ +'use strict' + +var url = require('url') +var isUrl = /^https?:/ + +function Redirect (request) { + this.request = request + this.followRedirect = true + this.followRedirects = true + this.followAllRedirects = false + this.followOriginalHttpMethod = false + this.allowRedirect = function () { return true } + this.maxRedirects = 10 + this.redirects = [] + this.redirectsFollowed = 0 + this.removeRefererHeader = false +} + +Redirect.prototype.onRequest = function (options) { + var self = this + + if (options.maxRedirects !== undefined) { + self.maxRedirects = options.maxRedirects + } + if (typeof options.followRedirect === 'function') { + self.allowRedirect = options.followRedirect + } + if (options.followRedirect !== undefined) { + self.followRedirects = !!options.followRedirect + } + if (options.followAllRedirects !== undefined) { + self.followAllRedirects = options.followAllRedirects + } + if (self.followRedirects || self.followAllRedirects) { + self.redirects = self.redirects || [] + } + if (options.removeRefererHeader !== undefined) { + self.removeRefererHeader = options.removeRefererHeader + } + if (options.followOriginalHttpMethod !== undefined) { + self.followOriginalHttpMethod = options.followOriginalHttpMethod + } +} + +Redirect.prototype.redirectTo = function (response) { + var self = this + var request = self.request + + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { + var location = response.caseless.get('location') + request.debug('redirect', location) + + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirects) { + switch (request.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } + } + } else if (response.statusCode === 401) { + var authHeader = request._auth.onResponse(response) + if (authHeader) { + request.setHeader('authorization', authHeader) + redirectTo = request.uri + } + } + return redirectTo +} + +Redirect.prototype.onResponse = function (response) { + var self = this + var request = self.request + + var redirectTo = self.redirectTo(response) + if (!redirectTo || !self.allowRedirect.call(request, response)) { + return false + } + + request.debug('redirect to', redirectTo) + + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + // response.resume should be defined, but check anyway before calling. Workaround for browserify. + if (response.resume) { + response.resume() + } + + if (self.redirectsFollowed >= self.maxRedirects) { + request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) + return false + } + self.redirectsFollowed += 1 + + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(request.uri.href, redirectTo) + } + + var uriPrev = request.uri + request.uri = url.parse(redirectTo) + + // handle the case where we change protocol from https to http or vice versa + if (request.uri.protocol !== uriPrev.protocol) { + delete request.agent + } + + self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }) + + if (self.followAllRedirects && request.method !== 'HEAD' && + response.statusCode !== 401 && response.statusCode !== 307) { + request.method = self.followOriginalHttpMethod ? request.method : 'GET' + } + // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete request.src + delete request.req + delete request._started + if (response.statusCode !== 401 && response.statusCode !== 307) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete request.body + delete request._form + if (request.headers) { + request.removeHeader('host') + request.removeHeader('content-type') + request.removeHeader('content-length') + if (request.uri.hostname !== request.originalHost.split(':')[0]) { + // Remove authorization if changing hostnames (but not if just + // changing ports or protocols). This matches the behavior of curl: + // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 + request.removeHeader('authorization') + } + } + } + + if (!self.removeRefererHeader) { + request.setHeader('referer', uriPrev.href) + } + + request.emit('redirect') + + request.init() + + return true +} + +exports.Redirect = Redirect diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/tunnel.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/tunnel.js new file mode 100644 index 0000000..4479003 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/lib/tunnel.js @@ -0,0 +1,175 @@ +'use strict' + +var url = require('url') +var tunnel = require('tunnel-agent') + +var defaultProxyHeaderWhiteList = [ + 'accept', + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept-ranges', + 'cache-control', + 'content-encoding', + 'content-language', + 'content-location', + 'content-md5', + 'content-range', + 'content-type', + 'connection', + 'date', + 'expect', + 'max-forwards', + 'pragma', + 'referer', + 'te', + 'user-agent', + 'via' +] + +var defaultProxyHeaderExclusiveList = [ + 'proxy-authorization' +] + +function constructProxyHost (uriObject) { + var port = uriObject.port + var protocol = uriObject.protocol + var proxyHost = uriObject.hostname + ':' + + if (port) { + proxyHost += port + } else if (protocol === 'https:') { + proxyHost += '443' + } else { + proxyHost += '80' + } + + return proxyHost +} + +function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) { + var whiteList = proxyHeaderWhiteList + .reduce(function (set, header) { + set[header.toLowerCase()] = true + return set + }, {}) + + return Object.keys(headers) + .filter(function (header) { + return whiteList[header.toLowerCase()] + }) + .reduce(function (set, header) { + set[header] = headers[header] + return set + }, {}) +} + +function constructTunnelOptions (request, proxyHeaders) { + var proxy = request.proxy + + var tunnelOptions = { + proxy: { + host: proxy.hostname, + port: +proxy.port, + proxyAuth: proxy.auth, + headers: proxyHeaders + }, + headers: request.headers, + ca: request.ca, + cert: request.cert, + key: request.key, + passphrase: request.passphrase, + pfx: request.pfx, + ciphers: request.ciphers, + rejectUnauthorized: request.rejectUnauthorized, + secureOptions: request.secureOptions, + secureProtocol: request.secureProtocol + } + + return tunnelOptions +} + +function constructTunnelFnName (uri, proxy) { + var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') + var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') + return [uriProtocol, proxyProtocol].join('Over') +} + +function getTunnelFn (request) { + var uri = request.uri + var proxy = request.proxy + var tunnelFnName = constructTunnelFnName(uri, proxy) + return tunnel[tunnelFnName] +} + +function Tunnel (request) { + this.request = request + this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList + this.proxyHeaderExclusiveList = [] + if (typeof request.tunnel !== 'undefined') { + this.tunnelOverride = request.tunnel + } +} + +Tunnel.prototype.isEnabled = function () { + var self = this + var request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. + + // If self.tunnelOverride is set (the user specified a value), use it. + if (typeof self.tunnelOverride !== 'undefined') { + return self.tunnelOverride + } + + // If the destination is HTTPS, tunnel. + if (request.uri.protocol === 'https:') { + return true + } + + // Otherwise, do not use tunnel. + return false +} + +Tunnel.prototype.setup = function (options) { + var self = this + var request = self.request + + options = options || {} + + if (typeof request.proxy === 'string') { + request.proxy = url.parse(request.proxy) + } + + if (!request.proxy || !request.tunnel) { + return false + } + + // Setup Proxy Header Exclusive List and White List + if (options.proxyHeaderWhiteList) { + self.proxyHeaderWhiteList = options.proxyHeaderWhiteList + } + if (options.proxyHeaderExclusiveList) { + self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList + } + + var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) + var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) + + // Setup Proxy Headers and Proxy Headers Host + // Only send the Proxy White Listed Header names + var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) + proxyHeaders.host = constructProxyHost(request.uri) + + proxyHeaderExclusiveList.forEach(request.removeHeader, request) + + // Set Agent from Tunnel Data + var tunnelFn = getTunnelFn(request) + var tunnelOptions = constructTunnelOptions(request, proxyHeaders) + request.agent = tunnelFn(tunnelOptions) + + return true +} + +Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList +Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList +exports.Tunnel = Tunnel diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/package.json new file mode 100644 index 0000000..d6177bb --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/package.json @@ -0,0 +1,165 @@ +{ + "_args": [ + [ + { + "raw": "request@^2.79.0", + "scope": null, + "escapedName": "request", + "name": "request", + "rawSpec": "^2.79.0", + "spec": ">=2.79.0 <3.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources" + ] + ], + "_from": "request@>=2.79.0 <3.0.0", + "_id": "request@2.83.0", + "_inCache": true, + "_location": "/request", + "_nodeVersion": "8.5.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/request-2.83.0.tgz_1506481236346_0.6338994088582695" + }, + "_npmUser": { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + "_npmVersion": "5.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "request@^2.79.0", + "scope": null, + "escapedName": "request", + "name": "request", + "rawSpec": "^2.79.0", + "spec": ">=2.79.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", + "_shasum": "ca0b65da02ed62935887808e6f510381034e3356", + "_shrinkwrap": null, + "_spec": "request@^2.79.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources", + "author": { + "name": "Mikeal Rogers", + "email": "mikeal.rogers@gmail.com" + }, + "bugs": { + "url": "http://github.com/request/request/issues" + }, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.6.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.5", + "extend": "~3.0.1", + "forever-agent": "~0.6.1", + "form-data": "~2.3.1", + "har-validator": "~5.0.3", + "hawk": "~6.0.2", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.17", + "oauth-sign": "~0.8.2", + "performance-now": "^2.1.0", + "qs": "~6.5.1", + "safe-buffer": "^5.1.1", + "stringstream": "~0.0.5", + "tough-cookie": "~2.3.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.1.0" + }, + "description": "Simplified HTTP request client.", + "devDependencies": { + "bluebird": "^3.2.1", + "browserify": "^13.0.1", + "browserify-istanbul": "^2.0.0", + "buffer-equal": "^1.0.0", + "codecov": "^2.0.2", + "coveralls": "^2.11.4", + "function-bind": "^1.0.2", + "istanbul": "^0.4.0", + "karma": "^1.1.1", + "karma-browserify": "^5.0.1", + "karma-cli": "^1.0.0", + "karma-coverage": "^1.0.0", + "karma-phantomjs-launcher": "^1.0.0", + "karma-tap": "^3.0.1", + "phantomjs-prebuilt": "^2.1.3", + "rimraf": "^2.2.8", + "server-destroy": "^1.0.1", + "standard": "^9.0.0", + "tape": "^4.6.0", + "taper": "^0.5.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", + "shasum": "ca0b65da02ed62935887808e6f510381034e3356", + "tarball": "https://registry.npmjs.org/request/-/request-2.83.0.tgz" + }, + "engines": { + "node": ">= 4" + }, + "files": [ + "lib/", + "index.js", + "request.js" + ], + "gitHead": "dd427d7aa0177a876da69f82801bf0c63a855310", + "greenkeeper": { + "ignore": [ + "hawk", + "har-validator" + ] + }, + "homepage": "https://github.com/request/request#readme", + "keywords": [ + "http", + "simple", + "util", + "utility" + ], + "license": "Apache-2.0", + "main": "index.js", + "maintainers": [ + { + "name": "mikeal", + "email": "mikeal.rogers@gmail.com" + }, + { + "name": "nylen", + "email": "jnylen@gmail.com" + }, + { + "name": "fredkschott", + "email": "fkschott@gmail.com" + }, + { + "name": "simov", + "email": "simeonvelichkov@gmail.com" + } + ], + "name": "request", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/request/request.git" + }, + "scripts": { + "lint": "standard", + "test": "npm run lint && npm run test-ci && npm run test-browser", + "test-browser": "node tests/browser/start.js", + "test-ci": "taper tests/test-*.js", + "test-cov": "istanbul cover tape tests/test-*.js" + }, + "version": "2.83.0" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/request.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/request.js new file mode 100644 index 0000000..ff19ca3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/request/request.js @@ -0,0 +1,1552 @@ +'use strict' + +var http = require('http') +var https = require('https') +var url = require('url') +var util = require('util') +var stream = require('stream') +var zlib = require('zlib') +var hawk = require('hawk') +var aws2 = require('aws-sign2') +var aws4 = require('aws4') +var httpSignature = require('http-signature') +var mime = require('mime-types') +var stringstream = require('stringstream') +var caseless = require('caseless') +var ForeverAgent = require('forever-agent') +var FormData = require('form-data') +var extend = require('extend') +var isstream = require('isstream') +var isTypedArray = require('is-typedarray').strict +var helpers = require('./lib/helpers') +var cookies = require('./lib/cookies') +var getProxyFromURI = require('./lib/getProxyFromURI') +var Querystring = require('./lib/querystring').Querystring +var Har = require('./lib/har').Har +var Auth = require('./lib/auth').Auth +var OAuth = require('./lib/oauth').OAuth +var Multipart = require('./lib/multipart').Multipart +var Redirect = require('./lib/redirect').Redirect +var Tunnel = require('./lib/tunnel').Tunnel +var now = require('performance-now') +var Buffer = require('safe-buffer').Buffer + +var safeStringify = helpers.safeStringify +var isReadStream = helpers.isReadStream +var toBase64 = helpers.toBase64 +var defer = helpers.defer +var copy = helpers.copy +var version = helpers.version +var globalCookieJar = cookies.jar() + +var globalPool = {} + +function filterForNonReserved (reserved, options) { + // Filter out properties that are not reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var notReserved = (reserved.indexOf(i) === -1) + if (notReserved) { + object[i] = options[i] + } + } + return object +} + +function filterOutReservedFunctions (reserved, options) { + // Filter out properties that are functions and are reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var isReserved = !(reserved.indexOf(i) === -1) + var isFunction = (typeof options[i] === 'function') + if (!(isReserved && isFunction)) { + object[i] = options[i] + } + } + return object +} + +// Return a simpler request object to allow serialization +function requestToJSON () { + var self = this + return { + uri: self.uri, + method: self.method, + headers: self.headers + } +} + +// Return a simpler response object to allow serialization +function responseToJSON () { + var self = this + return { + statusCode: self.statusCode, + body: self.body, + headers: self.headers, + request: requestToJSON.call(self.request) + } +} + +function Request (options) { + // if given the method property in options, set property explicitMethod to true + + // extend the Request instance with any non-reserved properties + // remove any reserved functions from the options object + // set Request instance to be readable and writable + // call init + + var self = this + + // start with HAR, then override with additional options + if (options.har) { + self._har = new Har(self) + options = self._har.options(options) + } + + stream.Stream.call(self) + var reserved = Object.keys(Request.prototype) + var nonReserved = filterForNonReserved(reserved, options) + + extend(self, nonReserved) + options = filterOutReservedFunctions(reserved, options) + + self.readable = true + self.writable = true + if (options.method) { + self.explicitMethod = true + } + self._qs = new Querystring(self) + self._auth = new Auth(self) + self._oauth = new OAuth(self) + self._multipart = new Multipart(self) + self._redirect = new Redirect(self) + self._tunnel = new Tunnel(self) + self.init(options) +} + +util.inherits(Request, stream.Stream) + +// Debugging +Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +function debug () { + if (Request.debug) { + console.error('REQUEST %s', util.format.apply(util, arguments)) + } +} +Request.prototype.debug = debug + +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) { + options = {} + } + self.headers = self.headers ? copy(self.headers) : {} + + // Delete headers with value undefined since they break + // ClientRequest.OutgoingMessage.setHeader in node 0.12 + for (var headerName in self.headers) { + if (typeof self.headers[headerName] === 'undefined') { + delete self.headers[headerName] + } + } + + caseless.httpify(self, self.headers) + + if (!self.method) { + self.method = options.method || 'GET' + } + if (!self.localAddress) { + self.localAddress = options.localAddress + } + + self._qs.init(options) + + debug(options) + if (!self.pool && self.pool !== false) { + self.pool = globalPool + } + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) { + return // Print a warning maybe? + } + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + // People use this property instead all the time, so support it + if (!self.uri && self.url) { + self.uri = self.url + delete self.url + } + + // If there's a baseUrl, then use it as the base URL (i.e. uri must be + // specified as a relative path and is appended to baseUrl). + if (self.baseUrl) { + if (typeof self.baseUrl !== 'string') { + return self.emit('error', new Error('options.baseUrl must be a string')) + } + + if (typeof self.uri !== 'string') { + return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) + } + + if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { + return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) + } + + // Handle all cases to make sure that there's only one slash between + // baseUrl and uri. + var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 + var uriStartsWithSlash = self.uri.indexOf('/') === 0 + + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri.slice(1) + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri + } else if (self.uri === '') { + self.uri = self.baseUrl + } else { + self.uri = self.baseUrl + '/' + self.uri + } + delete self.baseUrl + } + + // A URI is needed by this point, emit error if we haven't been able to get one + if (!self.uri) { + return self.emit('error', new Error('options.uri is a required argument')) + } + + // If a string URI/URL was given, parse it into a URL object + if (typeof self.uri === 'string') { + self.uri = url.parse(self.uri) + } + + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } + + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme + if (self.uri.protocol === 'unix:') { + return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) + } + + // Support Unix Sockets + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (!self.uri.pathname) { self.uri.pathname = '/' } + + if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { + // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' + } + // This error was fatal + self.abort() + return self.emit('error', new Error(message)) + } + + if (!self.hasOwnProperty('proxy')) { + self.proxy = getProxyFromURI(self.uri) + } + + self.tunnel = self._tunnel.isEnabled() + if (self.proxy) { + self._tunnel.setup(options) + } + + self._redirect.onRequest(options) + + self.setHost = false + if (!self.hasHeader('host')) { + var hostHeaderName = self.originalHostHeaderName || 'host' + // When used with an IPv6 address, `host` will provide + // the correct bracketed format, unlike using `hostname` and + // optionally adding the `port` when necessary. + self.setHeader(hostHeaderName, self.uri.host) + self.setHost = true + } + + self.jar(self._jar || options.jar) + + if (!self.uri.port) { + if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 } + } + + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } + + if (options.form) { + self.form(options.form) + } + + if (options.formData) { + var formData = options.formData + var requestForm = self.form() + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { + requestForm.append(key, value.value, value.options) + } else { + requestForm.append(key, value) + } + } + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey] + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]) + } + } else { + appendFormValue(formKey, formValue) + } + } + } + } + + if (options.qs) { + self.qs(options.qs) + } + + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || '') + } + + if (self.path.length === 0) { + self.path = '/' + } + + // Auth must happen last in case signing is dependent on other headers + if (options.aws) { + self.aws(options.aws) + } + + if (options.hawk) { + self.hawk(options.hawk) + } + + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } + + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { + options.auth.user = options.auth.username + } + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { + options.auth.pass = options.auth.password + } + + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } + + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip, deflate') + } + + if (self.uri.auth && !self.hasHeader('authorization')) { + var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) + } + + if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { + var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) + self.setHeader('proxy-authorization', authHeader) + } + + if (self.proxy && !self.tunnel) { + self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + } + + if (options.json) { + self.json(options.json) + } + if (options.multipart) { + self.multipart(options.multipart) + } + + if (options.time) { + self.timing = true + + // NOTE: elapsedTime is deprecated in favor of .timings + self.elapsedTime = self.elapsedTime || 0 + } + + function setContentLength () { + if (isTypedArray(self.body)) { + self.body = Buffer.from(self.body) + } + + if (!self.hasHeader('content-length')) { + var length + if (typeof self.body === 'string') { + length = Buffer.byteLength(self.body) + } else if (Array.isArray(self.body)) { + length = self.body.reduce(function (a, b) { return a + b.length }, 0) + } else { + length = self.body.length + } + + if (length) { + self.setHeader('content-length', length) + } else { + self.emit('error', new Error('Argument error, options.body.')) + } + } + } + if (self.body && !isstream(self.body)) { + setContentLength() + } + + if (options.oauth) { + self.oauth(options.oauth) + } else if (self._oauth.params && self.hasHeader('authorization')) { + self.oauth(self._oauth.params) + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + var defaultModules = {'http:': http, 'https:': https} + var httpModules = self.httpModules || {} + + self.httpModule = httpModules[protocol] || defaultModules[protocol] + + if (!self.httpModule) { + return self.emit('error', new Error('Invalid protocol: ' + protocol)) + } + + if (options.ca) { + self.ca = options.ca + } + + if (!self.agent) { + if (options.agentOptions) { + self.agentOptions = options.agentOptions + } + + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + var v = version() + // use ForeverAgent in node 0.10- only + if (v.major === 0 && v.minor <= 10) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + self.agentOptions = self.agentOptions || {} + self.agentOptions.keepAlive = true + } + } else { + self.agentClass = self.httpModule.Agent + } + } + + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getNewAgent() + } + + self.on('pipe', function (src) { + if (self.ntick && self._started) { + self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) + } + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', mime.lookup(src.path)) + } + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) + } + } + } + if (self._json && !self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } + + // self.on('pipe', function () { + // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') + // }) + }) + + defer(function () { + if (self._aborted) { + return + } + + var end = function () { + if (self._form) { + if (!self._auth.hasAuth) { + self._form.pipe(self) + } else if (self._auth.hasAuth && self._auth.sentAuth) { + self._form.pipe(self) + } + } + if (self._multipart && self._multipart.chunked) { + self._multipart.body.pipe(self) + } + if (self.body) { + if (isstream(self.body)) { + self.body.pipe(self) + } else { + setContentLength() + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } + } else if (self.requestBodyStream) { + console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self._auth.hasAuth && !self._auth.sentAuth) { + self.end() + return + } + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() + } + } + + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders(), true) + self._form.getLength(function (err, length) { + if (!err && !isNaN(length)) { + self.setHeader('content-length', length) + } + end() + }) + } else { + end() + } + + self.ntick = true + }) +} + +Request.prototype.getNewAgent = function () { + var self = this + var Agent = self.agentClass + var options = {} + if (self.agentOptions) { + for (var i in self.agentOptions) { + options[i] = self.agentOptions[i] + } + } + if (self.ca) { + options.ca = self.ca + } + if (self.ciphers) { + options.ciphers = self.ciphers + } + if (self.secureProtocol) { + options.secureProtocol = self.secureProtocol + } + if (self.secureOptions) { + options.secureOptions = self.secureOptions + } + if (typeof self.rejectUnauthorized !== 'undefined') { + options.rejectUnauthorized = self.rejectUnauthorized + } + + if (self.cert && self.key) { + options.key = self.key + options.cert = self.cert + } + + if (self.pfx) { + options.pfx = self.pfx + } + + if (self.passphrase) { + options.passphrase = self.passphrase + } + + var poolKey = '' + + // different types of agents are in different pools + if (Agent !== self.httpModule.Agent) { + poolKey += Agent.name + } + + // ca option is only relevant if proxy or destination are https + var proxy = self.proxy + if (typeof proxy === 'string') { + proxy = url.parse(proxy) + } + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ca + } + + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) { + poolKey += ':' + } + poolKey += options.rejectUnauthorized + } + + if (options.cert) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + } + + if (options.pfx) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.pfx.toString('ascii') + } + + if (options.ciphers) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureProtocol + } + + if (options.secureOptions) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureOptions + } + } + + if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return self.httpModule.globalAgent + } + + // we're using a stored agent. Make sure it's protocol-specific + poolKey = self.uri.protocol + poolKey + + // generate a new agent for this setting if none yet exists + if (!self.pool[poolKey]) { + self.pool[poolKey] = new Agent(options) + // properly set maxSockets on new agents + if (self.pool.maxSockets) { + self.pool[poolKey].maxSockets = self.pool.maxSockets + } + } + + return self.pool[poolKey] +} + +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this + + if (self.timing) { + // All timings will be relative to this request's startTime. In order to do this, + // we need to capture the wall-clock start time (via Date), immediately followed + // by the high-resolution timer (via now()). While these two won't be set + // at the _exact_ same time, they should be close enough to be able to calculate + // high-resolution, monotonically non-decreasing timestamps relative to startTime. + var startTime = new Date().getTime() + var startTimeNow = now() + } + + if (self._aborted) { + return + } + + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } + + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth + + debug('make request', self.uri.href) + + // node v6.8.0 now supports a `timeout` value in `http.request()`, but we + // should delete it for now since we handle timeouts manually for better + // consistency with node versions before v6.8.0 + delete reqOptions.timeout + + try { + self.req = self.httpModule.request(reqOptions) + } catch (err) { + self.emit('error', err) + return + } + + if (self.timing) { + self.startTime = startTime + self.startTimeNow = startTimeNow + + // Timing values will all be relative to startTime (by comparing to startTimeNow + // so we have an accurate clock) + self.timings = {} + } + + var timeout + if (self.timeout && !self.timeoutTimer) { + if (self.timeout < 0) { + timeout = 0 + } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) { + timeout = self.timeout + } + } + + self.req.on('response', self.onRequestResponse.bind(self)) + self.req.on('error', self.onRequestError.bind(self)) + self.req.on('drain', function () { + self.emit('drain') + }) + + self.req.on('socket', function (socket) { + // `._connecting` was the old property which was made public in node v6.1.0 + var isConnecting = socket._connecting || socket.connecting + if (self.timing) { + self.timings.socket = now() - self.startTimeNow + + if (isConnecting) { + var onLookupTiming = function () { + self.timings.lookup = now() - self.startTimeNow + } + + var onConnectTiming = function () { + self.timings.connect = now() - self.startTimeNow + } + + socket.once('lookup', onLookupTiming) + socket.once('connect', onConnectTiming) + + // clean up timing event listeners if needed on error + self.req.once('error', function () { + socket.removeListener('lookup', onLookupTiming) + socket.removeListener('connect', onConnectTiming) + }) + } + } + + var setReqTimeout = function () { + // This timeout sets the amount of time to wait *between* bytes sent + // from the server once connected. + // + // In particular, it's useful for erroring if the server fails to send + // data halfway through streaming a response. + self.req.setTimeout(timeout, function () { + if (self.req) { + self.abort() + var e = new Error('ESOCKETTIMEDOUT') + e.code = 'ESOCKETTIMEDOUT' + e.connect = false + self.emit('error', e) + } + }) + } + if (timeout !== undefined) { + // Only start the connection timer if we're actually connecting a new + // socket, otherwise if we're already connected (because this is a + // keep-alive connection) do not bother. This is important since we won't + // get a 'connect' event for an already connected socket. + if (isConnecting) { + var onReqSockConnect = function () { + socket.removeListener('connect', onReqSockConnect) + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + setReqTimeout() + } + + socket.on('connect', onReqSockConnect) + + self.req.on('error', function (err) { // eslint-disable-line handle-callback-err + socket.removeListener('connect', onReqSockConnect) + }) + + // Set a timeout in memory - this block will throw if the server takes more + // than `timeout` to write the HTTP status and headers (corresponding to + // the on('response') event on the client). NB: this measures wall-clock + // time, not the time between bytes sent by the server. + self.timeoutTimer = setTimeout(function () { + socket.removeListener('connect', onReqSockConnect) + self.abort() + var e = new Error('ETIMEDOUT') + e.code = 'ETIMEDOUT' + e.connect = true + self.emit('error', e) + }, timeout) + } else { + // We're already connected + setReqTimeout() + } + } + self.emit('socket', socket) + }) + + self.emit('request', self.req) +} + +Request.prototype.onRequestError = function (error) { + var self = this + if (self._aborted) { + return + } + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' && + self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) +} + +Request.prototype.onRequestResponse = function (response) { + var self = this + + if (self.timing) { + self.timings.response = now() - self.startTimeNow + } + + debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function () { + if (self.timing) { + self.timings.end = now() - self.startTimeNow + response.timingStart = self.startTime + + // fill in the blanks for any periods that didn't trigger, such as + // no lookup or connect due to keep alive + if (!self.timings.socket) { + self.timings.socket = 0 + } + if (!self.timings.lookup) { + self.timings.lookup = self.timings.socket + } + if (!self.timings.connect) { + self.timings.connect = self.timings.lookup + } + if (!self.timings.response) { + self.timings.response = self.timings.connect + } + + debug('elapsed time', self.timings.end) + + // elapsedTime includes all redirects + self.elapsedTime += Math.round(self.timings.end) + + // NOTE: elapsedTime is deprecated in favor of .timings + response.elapsedTime = self.elapsedTime + + // timings is just for the final fetch + response.timings = self.timings + + // pre-calculate phase timings as well + response.timingPhases = { + wait: self.timings.socket, + dns: self.timings.lookup - self.timings.socket, + tcp: self.timings.connect - self.timings.lookup, + firstByte: self.timings.response - self.timings.connect, + download: self.timings.end - self.timings.response, + total: self.timings.end + } + } + debug('response end', self.uri.href, response.statusCode, response.headers) + }) + + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return + } + + self.response = response + response.request = self + response.toJSON = responseToJSON + + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && (!response.hasOwnProperty('socket') || + !response.socket.authorized)) { + debug('strict ssl error', self.uri.href) + var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' + self.emit('error', new Error('SSL Error: ' + sslErr)) + return + } + + // Save the original host before any redirect (if it changes, we need to + // remove any authorization headers). Also remember the case of the header + // name because lots of broken servers expect Host instead of host and we + // want the caller to be able to specify this. + self.originalHost = self.getHeader('host') + if (!self.originalHostHeaderName) { + self.originalHostHeaderName = self.hasHeader('host') + } + if (self.setHost) { + self.removeHeader('host') + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + + var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar + var addCookie = function (cookie) { + // set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) + } catch (e) { + self.emit('error', e) + } + } + + response.caseless = caseless(response.headers) + + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie) + } else { + addCookie(response.headers[headerName]) + } + } + + if (self._redirect.onResponse(response)) { + return // Ignore the rest of the response + } else { + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) { + self.response.emit('end') + } + }) + + response.once('end', function () { + self._ended = true + }) + + var noBody = function (code) { + return ( + self.method === 'HEAD' || + // Informational + (code >= 100 && code < 200) || + // No Content + code === 204 || + // Not Modified + code === 304 + ) + } + + var responseContent + if (self.gzip && !noBody(response.statusCode)) { + var contentEncoding = response.headers['content-encoding'] || 'identity' + contentEncoding = contentEncoding.trim().toLowerCase() + + // Be more lenient with decoding compressed responses, since (very rarely) + // servers send slightly invalid gzip responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + var zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + } + + if (contentEncoding === 'gzip') { + responseContent = zlib.createGunzip(zlibOptions) + response.pipe(responseContent) + } else if (contentEncoding === 'deflate') { + responseContent = zlib.createInflate(zlibOptions) + response.pipe(responseContent) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== 'identity') { + debug('ignoring unrecognized Content-Encoding ' + contentEncoding) + } + responseContent = response + } + } else { + responseContent = response + } + + if (self.encoding) { + if (self.dests.length !== 0) { + console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') + } else if (responseContent.setEncoding) { + responseContent.setEncoding(self.encoding) + } else { + // Should only occur on node pre-v0.9.4 (joyent/node@9b5abe5) with + // zlib streams. + // If/When support for 0.9.4 is dropped, this should be unnecessary. + responseContent = responseContent.pipe(stringstream(self.encoding)) + } + } + + if (self._paused) { + responseContent.pause() + } + + self.responseContent = responseContent + + self.emit('response', response) + + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + + responseContent.on('data', function (chunk) { + if (self.timing && !self.responseStarted) { + self.responseStartTime = (new Date()).getTime() + + // NOTE: responseStartTime is deprecated in favor of .timings + response.responseStartTime = self.responseStartTime + } + self._destdata = true + self.emit('data', chunk) + }) + responseContent.once('end', function (chunk) { + self.emit('end', chunk) + }) + responseContent.on('error', function (error) { + self.emit('error', error) + }) + responseContent.on('close', function () { self.emit('close') }) + + if (self.callback) { + self.readResponseBody(response) + } else { // if no callback + self.on('end', function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response) + }) + } + } + debug('finish init function', self.uri.href) +} + +Request.prototype.readResponseBody = function (response) { + var self = this + debug("reading response's body") + var buffers = [] + var bufferLength = 0 + var strings = [] + + self.on('data', function (chunk) { + if (!Buffer.isBuffer(chunk)) { + strings.push(chunk) + } else if (chunk.length) { + bufferLength += chunk.length + buffers.push(chunk) + } + }) + self.on('end', function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + return + } + + if (bufferLength) { + debug('has body', self.uri.href, bufferLength) + response.body = Buffer.concat(buffers, bufferLength) + if (self.encoding !== null) { + response.body = response.body.toString(self.encoding) + } + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + } else if (strings.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { + strings[0] = strings[0].substring(1) + } + response.body = strings.join('') + } + + if (self._json) { + try { + response.body = JSON.parse(response.body, self._jsonReviver) + } catch (e) { + debug('invalid JSON received', self.uri.href) + } + } + debug('emitting complete', self.uri.href) + if (typeof response.body === 'undefined' && !self._json) { + response.body = self.encoding === null ? Buffer.alloc(0) : '' + } + self.emit('complete', response, response.body) + }) +} + +Request.prototype.abort = function () { + var self = this + self._aborted = true + + if (self.req) { + self.req.abort() + } else if (self.response) { + self.response.destroy() + } + + self.emit('abort') +} + +Request.prototype.pipeDest = function (dest) { + var self = this + var response = self.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]) + } else { + dest.headers[ctname] = response.headers[ctname] + } + } + + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]) + } else { + dest.headers[clname] = response.headers[clname] + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!self.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } + } + dest.statusCode = response.statusCode + } + if (self.pipefilter) { + self.pipefilter(response, dest) + } +} + +Request.prototype.qs = function (q, clobber) { + var self = this + var base + if (!clobber && self.uri.query) { + base = self._qs.parse(self.uri.query) + } else { + base = {} + } + + for (var i in q) { + base[i] = q[i] + } + + var qs = self._qs.stringify(base) + + if (qs === '') { + return self + } + + self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) + self.url = self.uri + self.path = self.uri.path + + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + return self +} +Request.prototype.form = function (form) { + var self = this + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.setHeader('content-type', 'application/x-www-form-urlencoded') + } + self.body = (typeof form === 'string') + ? self._qs.rfc3986(form.toString('utf8')) + : self._qs.stringify(form).toString('utf8') + return self + } + // create form-data object + self._form = new FormData() + self._form.on('error', function (err) { + err.message = 'form-data: ' + err.message + self.emit('error', err) + self.abort() + }) + return self._form +} +Request.prototype.multipart = function (multipart) { + var self = this + + self._multipart.onRequest(multipart) + + if (!self._multipart.chunked) { + self.body = self._multipart.body + } + + return self +} +Request.prototype.json = function (val) { + var self = this + + if (!self.hasHeader('accept')) { + self.setHeader('accept', 'application/json') + } + + if (typeof self.jsonReplacer === 'function') { + self._jsonReplacer = self.jsonReplacer + } + + self._json = true + if (typeof val === 'boolean') { + if (self.body !== undefined) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.body = safeStringify(self.body, self._jsonReplacer) + } else { + self.body = self._qs.rfc3986(self.body) + } + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + } else { + self.body = safeStringify(val, self._jsonReplacer) + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + + if (typeof self.jsonReviver === 'function') { + self._jsonReviver = self.jsonReviver + } + + return self +} +Request.prototype.getHeader = function (name, headers) { + var self = this + var result, re, match + if (!headers) { + headers = self.headers + } + Object.keys(headers).forEach(function (key) { + if (key.length !== name.length) { + return + } + re = new RegExp(name, 'i') + match = key.match(re) + if (match) { + result = headers[key] + } + }) + return result +} +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + var host = unixParts[0] + var path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} + +Request.prototype.auth = function (user, pass, sendImmediately, bearer) { + var self = this + + self._auth.onRequest(user, pass, sendImmediately, bearer) + + return self +} +Request.prototype.aws = function (opts, now) { + var self = this + + if (!now) { + self._aws = opts + return self + } + + if (opts.sign_version === 4 || opts.sign_version === '4') { + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: { + 'content-type': self.getHeader('content-type') || '' + }, + body: self.body + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret, + sessionToken: opts.session + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + if (signRes.headers['X-Amz-Security-Token']) { + self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token']) + } + } else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = { + key: opts.key, + secret: opts.secret, + verb: self.method.toUpperCase(), + date: date, + contentType: self.getHeader('content-type') || '', + md5: self.getHeader('content-md5') || '', + amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' + } + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } + + return self +} +Request.prototype.httpSignature = function (opts) { + var self = this + httpSignature.signRequest({ + getHeader: function (header) { + return self.getHeader(header, self.headers) + }, + setHeader: function (header, value) { + self.setHeader(header, value) + }, + method: self.method, + path: self.path + }, opts) + debug('httpSignature authorization', self.getHeader('authorization')) + + return self +} +Request.prototype.hawk = function (opts) { + var self = this + self.setHeader('Authorization', hawk.client.header(self.uri, self.method, opts).field) +} +Request.prototype.oauth = function (_oauth) { + var self = this + + self._oauth.onRequest(_oauth) + + return self +} + +Request.prototype.jar = function (jar) { + var self = this + var cookies + + if (self._redirect.redirectsFollowed === 0) { + self.originalCookieHeader = self.getHeader('cookie') + } + + if (!jar) { + // disable cookies + cookies = false + self._disableCookies = true + } else { + var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar + var urihref = self.uri.href + // fetch cookie in the Specified host + if (targetCookieJar) { + cookies = targetCookieJar.getCookieString(urihref) + } + } + + // if need cookie and cookie is not empty + if (cookies && cookies.length) { + if (self.originalCookieHeader) { + // Don't overwrite existing Cookie header + self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) + } else { + self.setHeader('cookie', cookies) + } + } + self._jar = jar + return self +} + +// Stream API +Request.prototype.pipe = function (dest, opts) { + var self = this + + if (self.response) { + if (self._destdata) { + self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) + } else if (self._ended) { + self.emit('error', new Error('You cannot pipe after the response has been ended.')) + } else { + stream.Stream.prototype.pipe.call(self, dest, opts) + self.pipeDest(dest) + return dest + } + } else { + self.dests.push(dest) + stream.Stream.prototype.pipe.call(self, dest, opts) + return dest + } +} +Request.prototype.write = function () { + var self = this + if (self._aborted) { return } + + if (!self._started) { + self.start() + } + if (self.req) { + return self.req.write.apply(self.req, arguments) + } +} +Request.prototype.end = function (chunk) { + var self = this + if (self._aborted) { return } + + if (chunk) { + self.write(chunk) + } + if (!self._started) { + self.start() + } + if (self.req) { + self.req.end() + } +} +Request.prototype.pause = function () { + var self = this + if (!self.responseContent) { + self._paused = true + } else { + self.responseContent.pause.apply(self.responseContent, arguments) + } +} +Request.prototype.resume = function () { + var self = this + if (!self.responseContent) { + self._paused = false + } else { + self.responseContent.resume.apply(self.responseContent, arguments) + } +} +Request.prototype.destroy = function () { + var self = this + if (!self._ended) { + self.end() + } else if (self.response) { + self.response.destroy() + } +} + +Request.defaultProxyHeaderWhiteList = + Tunnel.defaultProxyHeaderWhiteList.slice() + +Request.defaultProxyHeaderExclusiveList = + Tunnel.defaultProxyHeaderExclusiveList.slice() + +// Exports + +Request.prototype.toJSON = requestToJSON +module.exports = Request diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/.travis.yml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/.travis.yml new file mode 100644 index 0000000..7b20f28 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 'node' + - '5' + - '4' + - '0.12' + - '0.10' diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/LICENSE new file mode 100644 index 0000000..0c068ce --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/README.md new file mode 100644 index 0000000..e9a81af --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/README.md @@ -0,0 +1,584 @@ +# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] + +[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg +[travis-url]: https://travis-ci.org/feross/safe-buffer +[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg +[npm-url]: https://npmjs.org/package/safe-buffer +[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg +[downloads-url]: https://npmjs.org/package/safe-buffer +[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg +[standard-url]: https://standardjs.com + +#### Safer Node.js Buffer API + +**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`, +`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.** + +**Uses the built-in implementation when available.** + +## install + +``` +npm install safe-buffer +``` + +## usage + +The goal of this package is to provide a safe replacement for the node.js `Buffer`. + +It's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to +the top of your node.js modules: + +```js +var Buffer = require('safe-buffer').Buffer + +// Existing buffer code will continue to work without issues: + +new Buffer('hey', 'utf8') +new Buffer([1, 2, 3], 'utf8') +new Buffer(obj) +new Buffer(16) // create an uninitialized buffer (potentially unsafe) + +// But you can use these new explicit APIs to make clear what you want: + +Buffer.from('hey', 'utf8') // convert from many types to a Buffer +Buffer.alloc(16) // create a zero-filled buffer (safe) +Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe) +``` + +## api + +### Class Method: Buffer.from(array) + + +* `array` {Array} + +Allocates a new `Buffer` using an `array` of octets. + +```js +const buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]); + // creates a new Buffer containing ASCII bytes + // ['b','u','f','f','e','r'] +``` + +A `TypeError` will be thrown if `array` is not an `Array`. + +### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]]) + + +* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or + a `new ArrayBuffer()` +* `byteOffset` {Number} Default: `0` +* `length` {Number} Default: `arrayBuffer.length - byteOffset` + +When passed a reference to the `.buffer` property of a `TypedArray` instance, +the newly created `Buffer` will share the same allocated memory as the +TypedArray. + +```js +const arr = new Uint16Array(2); +arr[0] = 5000; +arr[1] = 4000; + +const buf = Buffer.from(arr.buffer); // shares the memory with arr; + +console.log(buf); + // Prints: + +// changing the TypedArray changes the Buffer also +arr[1] = 6000; + +console.log(buf); + // Prints: +``` + +The optional `byteOffset` and `length` arguments specify a memory range within +the `arrayBuffer` that will be shared by the `Buffer`. + +```js +const ab = new ArrayBuffer(10); +const buf = Buffer.from(ab, 0, 2); +console.log(buf.length); + // Prints: 2 +``` + +A `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`. + +### Class Method: Buffer.from(buffer) + + +* `buffer` {Buffer} + +Copies the passed `buffer` data onto a new `Buffer` instance. + +```js +const buf1 = Buffer.from('buffer'); +const buf2 = Buffer.from(buf1); + +buf1[0] = 0x61; +console.log(buf1.toString()); + // 'auffer' +console.log(buf2.toString()); + // 'buffer' (copy is not changed) +``` + +A `TypeError` will be thrown if `buffer` is not a `Buffer`. + +### Class Method: Buffer.from(str[, encoding]) + + +* `str` {String} String to encode. +* `encoding` {String} Encoding to use, Default: `'utf8'` + +Creates a new `Buffer` containing the given JavaScript string `str`. If +provided, the `encoding` parameter identifies the character encoding. +If not provided, `encoding` defaults to `'utf8'`. + +```js +const buf1 = Buffer.from('this is a tést'); +console.log(buf1.toString()); + // prints: this is a tést +console.log(buf1.toString('ascii')); + // prints: this is a tC)st + +const buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex'); +console.log(buf2.toString()); + // prints: this is a tést +``` + +A `TypeError` will be thrown if `str` is not a string. + +### Class Method: Buffer.alloc(size[, fill[, encoding]]) + + +* `size` {Number} +* `fill` {Value} Default: `undefined` +* `encoding` {String} Default: `utf8` + +Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the +`Buffer` will be *zero-filled*. + +```js +const buf = Buffer.alloc(5); +console.log(buf); + // +``` + +The `size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +If `fill` is specified, the allocated `Buffer` will be initialized by calling +`buf.fill(fill)`. See [`buf.fill()`][] for more information. + +```js +const buf = Buffer.alloc(5, 'a'); +console.log(buf); + // +``` + +If both `fill` and `encoding` are specified, the allocated `Buffer` will be +initialized by calling `buf.fill(fill, encoding)`. For example: + +```js +const buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64'); +console.log(buf); + // +``` + +Calling `Buffer.alloc(size)` can be significantly slower than the alternative +`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance +contents will *never contain sensitive data*. + +A `TypeError` will be thrown if `size` is not a number. + +### Class Method: Buffer.allocUnsafe(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must +be less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit +architectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is +thrown. A zero-length Buffer will be created if a `size` less than or equal to +0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +```js +const buf = Buffer.allocUnsafe(5); +console.log(buf); + // + // (octets will be different, every time) +buf.fill(0); +console.log(buf); + // +``` + +A `TypeError` will be thrown if `size` is not a number. + +Note that the `Buffer` module pre-allocates an internal `Buffer` instance of +size `Buffer.poolSize` that is used as a pool for the fast allocation of new +`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated +`new Buffer(size)` constructor) only when `size` is less than or equal to +`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default +value of `Buffer.poolSize` is `8192` but can be modified. + +Use of this pre-allocated internal memory pool is a key difference between +calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. +Specifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer +pool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal +Buffer pool if `size` is less than or equal to half `Buffer.poolSize`. The +difference is subtle but can be important when an application requires the +additional performance that `Buffer.allocUnsafe(size)` provides. + +### Class Method: Buffer.allocUnsafeSlow(size) + + +* `size` {Number} + +Allocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The +`size` must be less than or equal to the value of +`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is +`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will +be created if a `size` less than or equal to 0 is specified. + +The underlying memory for `Buffer` instances created in this way is *not +initialized*. The contents of the newly created `Buffer` are unknown and +*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such +`Buffer` instances to zeroes. + +When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances, +allocations under 4KB are, by default, sliced from a single pre-allocated +`Buffer`. This allows applications to avoid the garbage collection overhead of +creating many individually allocated Buffers. This approach improves both +performance and memory usage by eliminating the need to track and cleanup as +many `Persistent` objects. + +However, in the case where a developer may need to retain a small chunk of +memory from a pool for an indeterminate amount of time, it may be appropriate +to create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then +copy out the relevant bits. + +```js +// need to keep around a few small chunks of memory +const store = []; + +socket.on('readable', () => { + const data = socket.read(); + // allocate for retained data + const sb = Buffer.allocUnsafeSlow(10); + // copy the data into the new allocation + data.copy(sb, 0, 0, 10); + store.push(sb); +}); +``` + +Use of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after* +a developer has observed undue memory retention in their applications. + +A `TypeError` will be thrown if `size` is not a number. + +### All the Rest + +The rest of the `Buffer` API is exactly the same as in node.js. +[See the docs](https://nodejs.org/api/buffer.html). + + +## Related links + +- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660) +- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4) + +## Why is `Buffer` unsafe? + +Today, the node.js `Buffer` constructor is overloaded to handle many different argument +types like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.), +`ArrayBuffer`, and also `Number`. + +The API is optimized for convenience: you can throw any type at it, and it will try to do +what you want. + +Because the Buffer constructor is so powerful, you often see code like this: + +```js +// Convert UTF-8 strings to hex +function toHex (str) { + return new Buffer(str).toString('hex') +} +``` + +***But what happens if `toHex` is called with a `Number` argument?*** + +### Remote Memory Disclosure + +If an attacker can make your program call the `Buffer` constructor with a `Number` +argument, then they can make it allocate uninitialized memory from the node.js process. +This could potentially disclose TLS private keys, user data, or database passwords. + +When the `Buffer` constructor is passed a `Number` argument, it returns an +**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like +this, you **MUST** overwrite the contents before returning it to the user. + +From the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size): + +> `new Buffer(size)` +> +> - `size` Number +> +> The underlying memory for `Buffer` instances created in this way is not initialized. +> **The contents of a newly created `Buffer` are unknown and could contain sensitive +> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes. + +(Emphasis our own.) + +Whenever the programmer intended to create an uninitialized `Buffer` you often see code +like this: + +```js +var buf = new Buffer(16) + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### Would this ever be a problem in real code? + +Yes. It's surprisingly common to forget to check the type of your variables in a +dynamically-typed language like JavaScript. + +Usually the consequences of assuming the wrong type is that your program crashes with an +uncaught exception. But the failure mode for forgetting to check the type of arguments to +the `Buffer` constructor is more catastrophic. + +Here's an example of a vulnerable service that takes a JSON payload and converts it to +hex: + +```js +// Take a JSON payload {str: "some string"} and convert it to hex +var server = http.createServer(function (req, res) { + var data = '' + req.setEncoding('utf8') + req.on('data', function (chunk) { + data += chunk + }) + req.on('end', function () { + var body = JSON.parse(data) + res.end(new Buffer(body.str).toString('hex')) + }) +}) + +server.listen(8080) +``` + +In this example, an http client just has to send: + +```json +{ + "str": 1000 +} +``` + +and it will get back 1,000 bytes of uninitialized memory from the server. + +This is a very serious bug. It's similar in severity to the +[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process +memory by remote attackers. + + +### Which real-world packages were vulnerable? + +#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht) + +[Mathias Buus](https://github.com/mafintosh) and I +([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages, +[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow +anyone on the internet to send a series of messages to a user of `bittorrent-dht` and get +them to reveal 20 bytes at a time of uninitialized memory from the node.js process. + +Here's +[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8) +that fixed it. We released a new fixed version, created a +[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all +vulnerable versions on npm so users will get a warning to upgrade to a newer version. + +#### [`ws`](https://www.npmjs.com/package/ws) + +That got us wondering if there were other vulnerable packages. Sure enough, within a short +period of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the +most popular WebSocket implementation in node.js. + +If certain APIs were called with `Number` parameters instead of `String` or `Buffer` as +expected, then uninitialized server memory would be disclosed to the remote peer. + +These were the vulnerable methods: + +```js +socket.send(number) +socket.ping(number) +socket.pong(number) +``` + +Here's a vulnerable socket server with some echo functionality: + +```js +server.on('connection', function (socket) { + socket.on('message', function (message) { + message = JSON.parse(message) + if (message.type === 'echo') { + socket.send(message.data) // send back the user's message + } + }) +}) +``` + +`socket.send(number)` called on the server, will disclose server memory. + +Here's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue +was fixed, with a more detailed explanation. Props to +[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the +[Node Security Project disclosure](https://nodesecurity.io/advisories/67). + + +### What's the solution? + +It's important that node.js offers a fast way to get memory otherwise performance-critical +applications would needlessly get a lot slower. + +But we need a better way to *signal our intent* as programmers. **When we want +uninitialized memory, we should request it explicitly.** + +Sensitive functionality should not be packed into a developer-friendly API that loosely +accepts many different types. This type of API encourages the lazy practice of passing +variables in without checking the type very carefully. + +#### A new API: `Buffer.allocUnsafe(number)` + +The functionality of creating buffers with uninitialized memory should be part of another +API. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that +frequently gets user input of all sorts of different types passed into it. + +```js +var buf = Buffer.allocUnsafe(16) // careful, uninitialized memory! + +// Immediately overwrite the uninitialized buffer with data from another buffer +for (var i = 0; i < buf.length; i++) { + buf[i] = otherBuf[i] +} +``` + + +### How do we fix node.js core? + +We sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as +`semver-major`) which defends against one case: + +```js +var str = 16 +new Buffer(str, 'utf8') +``` + +In this situation, it's implied that the programmer intended the first argument to be a +string, since they passed an encoding as a second argument. Today, node.js will allocate +uninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not +what the programmer intended. + +But this is only a partial solution, since if the programmer does `new Buffer(variable)` +(without an `encoding` parameter) there's no way to know what they intended. If `variable` +is sometimes a number, then uninitialized memory will sometimes be returned. + +### What's the real long-term fix? + +We could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when +we need uninitialized memory. But that would break 1000s of packages. + +~~We believe the best solution is to:~~ + +~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~ + +~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~ + +#### Update + +We now support adding three new APIs: + +- `Buffer.from(value)` - convert from any type to a buffer +- `Buffer.alloc(size)` - create a zero-filled buffer +- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size + +This solves the core problem that affected `ws` and `bittorrent-dht` which is +`Buffer(variable)` getting tricked into taking a number argument. + +This way, existing code continues working and the impact on the npm ecosystem will be +minimal. Over time, npm maintainers can migrate performance-critical code to use +`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`. + + +### Conclusion + +We think there's a serious design issue with the `Buffer` API as it exists today. It +promotes insecure software by putting high-risk functionality into a convenient API +with friendly "developer ergonomics". + +This wasn't merely a theoretical exercise because we found the issue in some of the +most popular npm packages. + +Fortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of +`buffer`. + +```js +var Buffer = require('safe-buffer').Buffer +``` + +Eventually, we hope that node.js core can switch to this new, safer behavior. We believe +the impact on the ecosystem would be minimal since it's not a breaking change. +Well-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while +older, insecure packages would magically become safe from this attack vector. + + +## links + +- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514) +- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67) +- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68) + + +## credit + +The original issues in `bittorrent-dht` +([disclosure](https://nodesecurity.io/advisories/68)) and +`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by +[Mathias Buus](https://github.com/mafintosh) and +[Feross Aboukhadijeh](http://feross.org/). + +Thanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues +and for his work running the [Node Security Project](https://nodesecurity.io/). + +Thanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and +auditing the code. + + +## license + +MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/index.js new file mode 100644 index 0000000..22438da --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/index.js @@ -0,0 +1,62 @@ +/* eslint-disable node/no-deprecated-api */ +var buffer = require('buffer') +var Buffer = buffer.Buffer + +// alternative to using Object.keys for old browsers +function copyProps (src, dst) { + for (var key in src) { + dst[key] = src[key] + } +} +if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { + module.exports = buffer +} else { + // Copy properties from require('buffer') + copyProps(buffer, exports) + exports.Buffer = SafeBuffer +} + +function SafeBuffer (arg, encodingOrOffset, length) { + return Buffer(arg, encodingOrOffset, length) +} + +// Copy static methods from Buffer +copyProps(Buffer, SafeBuffer) + +SafeBuffer.from = function (arg, encodingOrOffset, length) { + if (typeof arg === 'number') { + throw new TypeError('Argument must not be a number') + } + return Buffer(arg, encodingOrOffset, length) +} + +SafeBuffer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + var buf = Buffer(size) + if (fill !== undefined) { + if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + } else { + buf.fill(0) + } + return buf +} + +SafeBuffer.allocUnsafe = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return Buffer(size) +} + +SafeBuffer.allocUnsafeSlow = function (size) { + if (typeof size !== 'number') { + throw new TypeError('Argument must be a number') + } + return buffer.SlowBuffer(size) +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/package.json new file mode 100644 index 0000000..ad671e4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "safe-buffer@^5.1.1", + "scope": null, + "escapedName": "safe-buffer", + "name": "safe-buffer", + "rawSpec": "^5.1.1", + "spec": ">=5.1.1 <6.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "safe-buffer@>=5.1.1 <6.0.0", + "_id": "safe-buffer@5.1.1", + "_inCache": true, + "_location": "/safe-buffer", + "_nodeVersion": "8.1.2", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/safe-buffer-5.1.1.tgz_1498076368476_0.22441886644810438" + }, + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "_npmVersion": "5.0.3", + "_phantomChildren": {}, + "_requested": { + "raw": "safe-buffer@^5.1.1", + "scope": null, + "escapedName": "safe-buffer", + "name": "safe-buffer", + "rawSpec": "^5.1.1", + "spec": ">=5.1.1 <6.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request", + "/tunnel-agent" + ], + "_resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "_shasum": "893312af69b2123def71f57889001671eeb2c853", + "_shrinkwrap": null, + "_spec": "safe-buffer@^5.1.1", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/safe-buffer/issues" + }, + "dependencies": {}, + "description": "Safer Node.js Buffer API", + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "shasum": "893312af69b2123def71f57889001671eeb2c853", + "tarball": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" + }, + "gitHead": "5261e0c19dd820c31dd21cb4116902b0ed0f9e57", + "homepage": "https://github.com/feross/safe-buffer", + "keywords": [ + "buffer", + "buffer allocate", + "node security", + "safe", + "safe-buffer", + "security", + "uninitialized" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + }, + { + "name": "mafintosh", + "email": "mathiasbuus@gmail.com" + } + ], + "name": "safe-buffer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/safe-buffer.git" + }, + "scripts": { + "test": "standard && tape test.js" + }, + "version": "5.1.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/test.js new file mode 100644 index 0000000..4925059 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/safe-buffer/test.js @@ -0,0 +1,101 @@ +/* eslint-disable node/no-deprecated-api */ + +var test = require('tape') +var SafeBuffer = require('./').Buffer + +test('new SafeBuffer(value) works just like Buffer', function (t) { + t.deepEqual(new SafeBuffer('hey'), new Buffer('hey')) + t.deepEqual(new SafeBuffer('hey', 'utf8'), new Buffer('hey', 'utf8')) + t.deepEqual(new SafeBuffer('686579', 'hex'), new Buffer('686579', 'hex')) + t.deepEqual(new SafeBuffer([1, 2, 3]), new Buffer([1, 2, 3])) + t.deepEqual(new SafeBuffer(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) + + t.equal(typeof SafeBuffer.isBuffer, 'function') + t.equal(SafeBuffer.isBuffer(new SafeBuffer('hey')), true) + t.equal(Buffer.isBuffer(new SafeBuffer('hey')), true) + t.notOk(SafeBuffer.isBuffer({})) + + t.end() +}) + +test('SafeBuffer.from(value) converts to a Buffer', function (t) { + t.deepEqual(SafeBuffer.from('hey'), new Buffer('hey')) + t.deepEqual(SafeBuffer.from('hey', 'utf8'), new Buffer('hey', 'utf8')) + t.deepEqual(SafeBuffer.from('686579', 'hex'), new Buffer('686579', 'hex')) + t.deepEqual(SafeBuffer.from([1, 2, 3]), new Buffer([1, 2, 3])) + t.deepEqual(SafeBuffer.from(new Uint8Array([1, 2, 3])), new Buffer(new Uint8Array([1, 2, 3]))) + + t.end() +}) + +test('SafeBuffer.alloc(number) returns zeroed-out memory', function (t) { + for (var i = 0; i < 10; i++) { + var expected1 = new Buffer(1000) + expected1.fill(0) + t.deepEqual(SafeBuffer.alloc(1000), expected1) + + var expected2 = new Buffer(1000 * 1000) + expected2.fill(0) + t.deepEqual(SafeBuffer.alloc(1000 * 1000), expected2) + } + t.end() +}) + +test('SafeBuffer.allocUnsafe(number)', function (t) { + var buf = SafeBuffer.allocUnsafe(100) // unitialized memory + t.equal(buf.length, 100) + t.equal(SafeBuffer.isBuffer(buf), true) + t.equal(Buffer.isBuffer(buf), true) + t.end() +}) + +test('SafeBuffer.from() throws with number types', function (t) { + t.plan(5) + t.throws(function () { + SafeBuffer.from(0) + }) + t.throws(function () { + SafeBuffer.from(-1) + }) + t.throws(function () { + SafeBuffer.from(NaN) + }) + t.throws(function () { + SafeBuffer.from(Infinity) + }) + t.throws(function () { + SafeBuffer.from(99) + }) +}) + +test('SafeBuffer.allocUnsafe() throws with non-number types', function (t) { + t.plan(4) + t.throws(function () { + SafeBuffer.allocUnsafe('hey') + }) + t.throws(function () { + SafeBuffer.allocUnsafe('hey', 'utf8') + }) + t.throws(function () { + SafeBuffer.allocUnsafe([1, 2, 3]) + }) + t.throws(function () { + SafeBuffer.allocUnsafe({}) + }) +}) + +test('SafeBuffer.alloc() throws with non-number types', function (t) { + t.plan(4) + t.throws(function () { + SafeBuffer.alloc('hey') + }) + t.throws(function () { + SafeBuffer.alloc('hey', 'utf8') + }) + t.throws(function () { + SafeBuffer.alloc([1, 2, 3]) + }) + t.throws(function () { + SafeBuffer.alloc({}) + }) +}) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/LICENSE new file mode 100644 index 0000000..ccffa08 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/LICENSE @@ -0,0 +1,41 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +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. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/README.md new file mode 100644 index 0000000..afcd3f3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/README.md @@ -0,0 +1,225 @@ +# sax js + +A sax-style parser for XML and HTML. + +Designed with [node](http://nodejs.org/) in mind, but should work fine in +the browser or other CommonJS implementations. + +## What This Is + +* A very simple tool to parse through an XML string. +* A stepping stone to a streaming HTML parser. +* A handy way to deal with RSS and other mostly-ok-but-kinda-broken XML + docs. + +## What This Is (probably) Not + +* An HTML Parser - That's a fine goal, but this isn't it. It's just + XML. +* A DOM Builder - You can use it to build an object model out of XML, + but it doesn't do that out of the box. +* XSLT - No DOM = no querying. +* 100% Compliant with (some other SAX implementation) - Most SAX + implementations are in Java and do a lot more than this does. +* An XML Validator - It does a little validation when in strict mode, but + not much. +* A Schema-Aware XSD Thing - Schemas are an exercise in fetishistic + masochism. +* A DTD-aware Thing - Fetching DTDs is a much bigger job. + +## Regarding `Hello, world!').close(); + +// stream usage +// takes the same options as the parser +var saxStream = require("sax").createStream(strict, options) +saxStream.on("error", function (e) { + // unhandled errors will throw, since this is a proper node + // event emitter. + console.error("error!", e) + // clear the error + this._parser.error = null + this._parser.resume() +}) +saxStream.on("opentag", function (node) { + // same object as above +}) +// pipe is supported, and it's readable/writable +// same chunks coming in also go out. +fs.createReadStream("file.xml") + .pipe(saxStream) + .pipe(fs.createWriteStream("file-copy.xml")) +``` + + +## Arguments + +Pass the following arguments to the parser function. All are optional. + +`strict` - Boolean. Whether or not to be a jerk. Default: `false`. + +`opt` - Object bag of settings regarding string formatting. All default to `false`. + +Settings supported: + +* `trim` - Boolean. Whether or not to trim text and comment nodes. +* `normalize` - Boolean. If true, then turn any whitespace into a single + space. +* `lowercase` - Boolean. If true, then lowercase tag names and attribute names + in loose mode, rather than uppercasing them. +* `xmlns` - Boolean. If true, then namespaces are supported. +* `position` - Boolean. If false, then don't track line/col/position. +* `strictEntities` - Boolean. If true, only parse [predefined XML + entities](http://www.w3.org/TR/REC-xml/#sec-predefined-ent) + (`&`, `'`, `>`, `<`, and `"`) + +## Methods + +`write` - Write bytes onto the stream. You don't have to do this all at +once. You can keep writing as much as you want. + +`close` - Close the stream. Once closed, no more data may be written until +it is done processing the buffer, which is signaled by the `end` event. + +`resume` - To gracefully handle errors, assign a listener to the `error` +event. Then, when the error is taken care of, you can call `resume` to +continue parsing. Otherwise, the parser will not continue while in an error +state. + +## Members + +At all times, the parser object will have the following members: + +`line`, `column`, `position` - Indications of the position in the XML +document where the parser currently is looking. + +`startTagPosition` - Indicates the position where the current tag starts. + +`closed` - Boolean indicating whether or not the parser can be written to. +If it's `true`, then wait for the `ready` event to write again. + +`strict` - Boolean indicating whether or not the parser is a jerk. + +`opt` - Any options passed into the constructor. + +`tag` - The current tag being dealt with. + +And a bunch of other stuff that you probably shouldn't touch. + +## Events + +All events emit with a single argument. To listen to an event, assign a +function to `on`. Functions get executed in the this-context of +the parser object. The list of supported events are also in the exported +`EVENTS` array. + +When using the stream interface, assign handlers using the EventEmitter +`on` function in the normal fashion. + +`error` - Indication that something bad happened. The error will be hanging +out on `parser.error`, and must be deleted before parsing can continue. By +listening to this event, you can keep an eye on that kind of stuff. Note: +this happens *much* more in strict mode. Argument: instance of `Error`. + +`text` - Text node. Argument: string of text. + +`doctype` - The ``. Argument: +object with `name` and `body` members. Attributes are not parsed, as +processing instructions have implementation dependent semantics. + +`sgmldeclaration` - Random SGML declarations. Stuff like `` +would trigger this kind of event. This is a weird thing to support, so it +might go away at some point. SAX isn't intended to be used to parse SGML, +after all. + +`opentagstart` - Emitted immediately when the tag name is available, +but before any attributes are encountered. Argument: object with a +`name` field and an empty `attributes` set. Note that this is the +same object that will later be emitted in the `opentag` event. + +`opentag` - An opening tag. Argument: object with `name` and `attributes`. +In non-strict mode, tag names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, then it will contain +namespace binding information on the `ns` member, and will have a +`local`, `prefix`, and `uri` member. + +`closetag` - A closing tag. In loose mode, tags are auto-closed if their +parent closes. In strict mode, well-formedness is enforced. Note that +self-closing tags will have `closeTag` emitted immediately after `openTag`. +Argument: tag name. + +`attribute` - An attribute node. Argument: object with `name` and `value`. +In non-strict mode, attribute names are uppercased, unless the `lowercase` +option is set. If the `xmlns` option is set, it will also contains namespace +information. + +`comment` - A comment node. Argument: the string of the comment. + +`opencdata` - The opening tag of a ``) of a `` tags trigger a `"script"` +event, and their contents are not checked for special xml characters. +If you pass `noscript: true`, then this behavior is suppressed. + +## Reporting Problems + +It's best to write a failing test if you find an issue. I will always +accept pull requests with failing tests if they demonstrate intended +behavior, but it is very hard to figure out what issue you're describing +without a test. Writing a test is also the best way for you yourself +to figure out if you really understand the issue you think you have with +sax-js. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/lib/sax.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/lib/sax.js new file mode 100644 index 0000000..795d607 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/sax/lib/sax.js @@ -0,0 +1,1565 @@ +;(function (sax) { // wrapper for non-node envs + sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + + // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. + // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), + // since that's the earliest that a buffer overrun could occur. This way, checks are + // as rare as required, but as often as necessary to ensure never crossing this bound. + // Furthermore, buffers are only tested at most once per write(), so passing a very + // large string into write() might have undesirable effects, but this is manageable by + // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme + // edge case, result in creating at most one complete copy of the string passed in. + // Set to Infinity to have unlimited buffers. + sax.MAX_BUFFER_LENGTH = 64 * 1024 + + var buffers = [ + 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', + 'procInstName', 'procInstBody', 'entity', 'attribName', + 'attribValue', 'cdata', 'script' + ] + + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] + + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf + } + } + + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + + function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break + + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } + + function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' + } + } + + function flushBuffers (parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + } + + SAXParser.prototype = { + end: function () { end(this) }, + write: write, + resume: function () { this.error = null; return this }, + close: function () { return this.write(null) }, + flush: function () { flushBuffers(this) } + } + + var Stream + try { + Stream = require('stream').Stream + } catch (ex) { + Stream = function () {} + } + + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + + function createStream (strict, opt) { + return new SAXStream(strict, opt) + } + + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + + Stream.apply(this) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + var me = this + + this._parser.onend = function () { + me.emit('end') + } + + this._parser.onerror = function (er) { + me.emit('error', er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + this._decoder = null + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) + } + + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream + } + }) + + SAXStream.prototype.write = function (data) { + if (typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = require('string_decoder').StringDecoder + this._decoder = new SD('utf8') + } + data = this._decoder.write(data) + } + + this._parser.write(data.toString()) + this.emit('data', data) + return true + } + + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true + } + + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) + } + + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + + // http://www.w3.org/TR/REC-xml/#NT-NameStartChar + // This implementation works on strings, a single character at a time + // as such, it cannot ever support astral-plane characters (10000-EFFFF) + // without a significant breaking change to either this parser, or the + // JavaScript language. Implementation of an emoji-capable xml parser + // is left as an exercise for the reader. + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + function isWhitespace (c) { + return c === ' ' || c === '\n' || c === '\r' || c === '\t' + } + + function isQuote (c) { + return c === '"' || c === '\'' + } + + function isAttribEnd (c) { + return c === '>' || isWhitespace(c) + } + + function isMatch (regex, c) { + return regex.test(c) + } + + function notMatch (regex, c) { + return !isMatch(regex, c) + } + + var S = 0 + sax.STATE = { + BEGIN: S++, // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, // leading whitespace + TEXT: S++, // general stuff + TEXT_ENTITY: S++, // & and such. + OPEN_WAKA: S++, // < + SGML_DECL: S++, // + SCRIPT: S++, // + + + or + + var nacl = require('tweetnacl'); + nacl.util = require('tweetnacl-util'); + + However it is recommended to use better packages that have wider + compatibility and better performance. Functions from `nacl.util` were never + intended to be robust solution for string conversion and were included for + convenience: cryptography library is not the right place for them. + + Currently calling these functions will throw error pointing to + `tweetnacl-util-js` (in the next version this error message will be removed). + +* Improved detection of available random number generators, making it possible + to use `nacl.randomBytes` and related functions in Web Workers without + changes. + +* Changes to testing (see README). + + +v0.13.3 +------- + +No code changes. + +* Reverted license field in package.json to "Public domain". + +* Fixed typo in README. + + +v0.13.2 +------- + +* Fixed undefined variable bug in fast version of Poly1305. No worries, this + bug was *never* triggered. + +* Specified CC0 public domain dedication. + +* Updated development dependencies. + + +v0.13.1 +------- + +* Exclude `crypto` and `buffer` modules from browserify builds. + + +v0.13.0 +------- + +* Made `nacl-fast` the default version in NPM package. Now + `require("tweetnacl")` will use fast version; to get the original version, + use `require("tweetnacl/nacl.js")`. + +* Cleanup temporary array after generating random bytes. + + +v0.12.2 +------- + +* Improved performance of curve operations, making `nacl.scalarMult`, `nacl.box`, + `nacl.sign` and related functions up to 3x faster in `nacl-fast` version. + + +v0.12.1 +------- + +* Significantly improved performance of Salsa20 (~1.5x faster) and + Poly1305 (~3.5x faster) in `nacl-fast` version. + + +v0.12.0 +------- + +* Instead of using the given secret key directly, TweetNaCl.js now copies it to + a new array in `nacl.box.keyPair.fromSecretKey` and + `nacl.sign.keyPair.fromSecretKey`. + + +v0.11.2 +------- + +* Added new constant: `nacl.sign.seedLength`. + + +v0.11.1 +------- + +* Even faster hash for both short and long inputs (in `nacl-fast`). + + +v0.11.0 +------- + +* Implement `nacl.sign.keyPair.fromSeed` to enable creation of sign key pairs + deterministically from a 32-byte seed. (It behaves like + [libsodium's](http://doc.libsodium.org/public-key_cryptography/public-key_signatures.html) + `crypto_sign_seed_keypair`: the seed becomes a secret part of the secret key.) + +* Fast version now has an improved hash implementation that is 2x-5x faster. + +* Fixed benchmarks, which may have produced incorrect measurements. + + +v0.10.1 +------- + +* Exported undocumented `nacl.lowlevel.crypto_core_hsalsa20`. + + +v0.10.0 +------- + +* **Signature API breaking change!** `nacl.sign` and `nacl.sign.open` now deal + with signed messages, and new `nacl.sign.detached` and + `nacl.sign.detached.verify` are available. + + Previously, `nacl.sign` returned a signature, and `nacl.sign.open` accepted a + message and "detached" signature. This was unlike NaCl's API, which dealt with + signed messages (concatenation of signature and message). + + The new API is: + + nacl.sign(message, secretKey) -> signedMessage + nacl.sign.open(signedMessage, publicKey) -> message | null + + Since detached signatures are common, two new API functions were introduced: + + nacl.sign.detached(message, secretKey) -> signature + nacl.sign.detached.verify(message, signature, publicKey) -> true | false + + (Note that it's `verify`, not `open`, and it returns a boolean value, unlike + `open`, which returns an "unsigned" message.) + +* NPM package now comes without `test` directory to keep it small. + + +v0.9.2 +------ + +* Improved documentation. +* Fast version: increased theoretical message size limit from 2^32-1 to 2^52 + bytes in Poly1305 (and thus, secretbox and box). However this has no impact + in practice since JavaScript arrays or ArrayBuffers are limited to 32-bit + indexes, and most implementations won't allocate more than a gigabyte or so. + (Obviously, there are no tests for the correctness of implementation.) Also, + it's not recommended to use messages that large without splitting them into + smaller packets anyway. + + +v0.9.1 +------ + +* Initial release diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/LICENSE new file mode 100644 index 0000000..cf1ab25 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a8eb4a9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +# Important! + +If your contribution is not trivial (not a typo fix, etc.), we can only accept +it if you dedicate your copyright for the contribution to the public domain. +Make sure you understand what it means (see http://unlicense.org/)! If you +agree, please add yourself to AUTHORS.md file, and include the following text +to your pull request description or a comment in it: + +------------------------------------------------------------------------------ + + I dedicate any and all copyright interest in this software to the + public domain. I make this dedication for the benefit of the public at + large and to the detriment of my heirs and successors. I intend this + dedication to be an overt act of relinquishment in perpetuity of all + present and future rights to this software under copyright law. + + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/README.md new file mode 100644 index 0000000..ffb6871 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/README.md @@ -0,0 +1,459 @@ +TweetNaCl.js +============ + +Port of [TweetNaCl](http://tweetnacl.cr.yp.to) / [NaCl](http://nacl.cr.yp.to/) +to JavaScript for modern browsers and Node.js. Public domain. + +[![Build Status](https://travis-ci.org/dchest/tweetnacl-js.svg?branch=master) +](https://travis-ci.org/dchest/tweetnacl-js) + +Demo: + +**:warning: The library is stable and API is frozen, however it has not been +independently reviewed. If you can help reviewing it, please [contact +me](mailto:dmitry@codingrobots.com).** + +Documentation +============= + +* [Overview](#overview) +* [Installation](#installation) +* [Usage](#usage) + * [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box) + * [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox) + * [Scalar multiplication](#scalar-multiplication) + * [Signatures](#signatures) + * [Hashing](#hashing) + * [Random bytes generation](#random-bytes-generation) + * [Constant-time comparison](#constant-time-comparison) +* [System requirements](#system-requirements) +* [Development and testing](#development-and-testing) +* [Benchmarks](#benchmarks) +* [Contributors](#contributors) +* [Who uses it](#who-uses-it) + + +Overview +-------- + +The primary goal of this project is to produce a translation of TweetNaCl to +JavaScript which is as close as possible to the original C implementation, plus +a thin layer of idiomatic high-level API on top of it. + +There are two versions, you can use either of them: + +* `nacl.js` is the port of TweetNaCl with minimum differences from the + original + high-level API. + +* `nacl-fast.js` is like `nacl.js`, but with some functions replaced with + faster versions. + + +Installation +------------ + +You can install TweetNaCl.js via a package manager: + +[Bower](http://bower.io): + + $ bower install tweetnacl + +[NPM](https://www.npmjs.org/): + + $ npm install tweetnacl + +or [download source code](https://github.com/dchest/tweetnacl-js/releases). + + +Usage +----- + +All API functions accept and return bytes as `Uint8Array`s. If you need to +encode or decode strings, use functions from + or one of the more robust codec +packages. + +In Node.js v4 and later `Buffer` objects are backed by `Uint8Array`s, so you +can freely pass them to TweetNaCl.js functions as arguments. The returned +objects are still `Uint8Array`s, so if you need `Buffer`s, you'll have to +convert them manually; make sure to convert using copying: `new Buffer(array)`, +instead of sharing: `new Buffer(array.buffer)`, because some functions return +subarrays of their buffers. + + +### Public-key authenticated encryption (box) + +Implements *curve25519-xsalsa20-poly1305*. + +#### nacl.box.keyPair() + +Generates a new random key pair for box and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 32-byte secret key + } + + +#### nacl.box.keyPair.fromSecretKey(secretKey) + +Returns a key pair for box with public key corresponding to the given secret +key. + +#### nacl.box(message, nonce, theirPublicKey, mySecretKey) + +Encrypt and authenticates message using peer's public key, our secret key, and +the given nonce, which must be unique for each distinct message for a key pair. + +Returns an encrypted and authenticated message, which is +`nacl.box.overheadLength` longer than the original message. + +#### nacl.box.open(box, nonce, theirPublicKey, mySecretKey) + +Authenticates and decrypts the given box with peer's public key, our secret +key, and the given nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.box.before(theirPublicKey, mySecretKey) + +Returns a precomputed shared key which can be used in `nacl.box.after` and +`nacl.box.open.after`. + +#### nacl.box.after(message, nonce, sharedKey) + +Same as `nacl.box`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.open.after(box, nonce, sharedKey) + +Same as `nacl.box.open`, but uses a shared key precomputed with `nacl.box.before`. + +#### nacl.box.publicKeyLength = 32 + +Length of public key in bytes. + +#### nacl.box.secretKeyLength = 32 + +Length of secret key in bytes. + +#### nacl.box.sharedKeyLength = 32 + +Length of precomputed shared key in bytes. + +#### nacl.box.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.box.overheadLength = 16 + +Length of overhead added to box compared to original message. + + +### Secret-key authenticated encryption (secretbox) + +Implements *xsalsa20-poly1305*. + +#### nacl.secretbox(message, nonce, key) + +Encrypt and authenticates message using the key and the nonce. The nonce must +be unique for each distinct message for this key. + +Returns an encrypted and authenticated message, which is +`nacl.secretbox.overheadLength` longer than the original message. + +#### nacl.secretbox.open(box, nonce, key) + +Authenticates and decrypts the given secret box using the key and the nonce. + +Returns the original message, or `false` if authentication fails. + +#### nacl.secretbox.keyLength = 32 + +Length of key in bytes. + +#### nacl.secretbox.nonceLength = 24 + +Length of nonce in bytes. + +#### nacl.secretbox.overheadLength = 16 + +Length of overhead added to secret box compared to original message. + + +### Scalar multiplication + +Implements *curve25519*. + +#### nacl.scalarMult(n, p) + +Multiplies an integer `n` by a group element `p` and returns the resulting +group element. + +#### nacl.scalarMult.base(n) + +Multiplies an integer `n` by a standard group element and returns the resulting +group element. + +#### nacl.scalarMult.scalarLength = 32 + +Length of scalar in bytes. + +#### nacl.scalarMult.groupElementLength = 32 + +Length of group element in bytes. + + +### Signatures + +Implements [ed25519](http://ed25519.cr.yp.to). + +#### nacl.sign.keyPair() + +Generates new random key pair for signing and returns it as an object with +`publicKey` and `secretKey` members: + + { + publicKey: ..., // Uint8Array with 32-byte public key + secretKey: ... // Uint8Array with 64-byte secret key + } + +#### nacl.sign.keyPair.fromSecretKey(secretKey) + +Returns a signing key pair with public key corresponding to the given +64-byte secret key. The secret key must have been generated by +`nacl.sign.keyPair` or `nacl.sign.keyPair.fromSeed`. + +#### nacl.sign.keyPair.fromSeed(seed) + +Returns a new signing key pair generated deterministically from a 32-byte seed. +The seed must contain enough entropy to be secure. This method is not +recommended for general use: instead, use `nacl.sign.keyPair` to generate a new +key pair from a random seed. + +#### nacl.sign(message, secretKey) + +Signs the message using the secret key and returns a signed message. + +#### nacl.sign.open(signedMessage, publicKey) + +Verifies the signed message and returns the message without signature. + +Returns `null` if verification failed. + +#### nacl.sign.detached(message, secretKey) + +Signs the message using the secret key and returns a signature. + +#### nacl.sign.detached.verify(message, signature, publicKey) + +Verifies the signature for the message and returns `true` if verification +succeeded or `false` if it failed. + +#### nacl.sign.publicKeyLength = 32 + +Length of signing public key in bytes. + +#### nacl.sign.secretKeyLength = 64 + +Length of signing secret key in bytes. + +#### nacl.sign.seedLength = 32 + +Length of seed for `nacl.sign.keyPair.fromSeed` in bytes. + +#### nacl.sign.signatureLength = 64 + +Length of signature in bytes. + + +### Hashing + +Implements *SHA-512*. + +#### nacl.hash(message) + +Returns SHA-512 hash of the message. + +#### nacl.hash.hashLength = 64 + +Length of hash in bytes. + + +### Random bytes generation + +#### nacl.randomBytes(length) + +Returns a `Uint8Array` of the given length containing random bytes of +cryptographic quality. + +**Implementation note** + +TweetNaCl.js uses the following methods to generate random bytes, +depending on the platform it runs on: + +* `window.crypto.getRandomValues` (WebCrypto standard) +* `window.msCrypto.getRandomValues` (Internet Explorer 11) +* `crypto.randomBytes` (Node.js) + +If the platform doesn't provide a suitable PRNG, the following functions, +which require random numbers, will throw exception: + +* `nacl.randomBytes` +* `nacl.box.keyPair` +* `nacl.sign.keyPair` + +Other functions are deterministic and will continue working. + +If a platform you are targeting doesn't implement secure random number +generator, but you somehow have a cryptographically-strong source of entropy +(not `Math.random`!), and you know what you are doing, you can plug it into +TweetNaCl.js like this: + + nacl.setPRNG(function(x, n) { + // ... copy n random bytes into x ... + }); + +Note that `nacl.setPRNG` *completely replaces* internal random byte generator +with the one provided. + + +### Constant-time comparison + +#### nacl.verify(x, y) + +Compares `x` and `y` in constant time and returns `true` if their lengths are +non-zero and equal, and their contents are equal. + +Returns `false` if either of the arguments has zero length, or arguments have +different lengths, or their contents differ. + + +System requirements +------------------- + +TweetNaCl.js supports modern browsers that have a cryptographically secure +pseudorandom number generator and typed arrays, including the latest versions +of: + +* Chrome +* Firefox +* Safari (Mac, iOS) +* Internet Explorer 11 + +Other systems: + +* Node.js + + +Development and testing +------------------------ + +Install NPM modules needed for development: + + $ npm install + +To build minified versions: + + $ npm run build + +Tests use minified version, so make sure to rebuild it every time you change +`nacl.js` or `nacl-fast.js`. + +### Testing + +To run tests in Node.js: + + $ npm run test-node + +By default all tests described here work on `nacl.min.js`. To test other +versions, set environment variable `NACL_SRC` to the file name you want to test. +For example, the following command will test fast minified version: + + $ NACL_SRC=nacl-fast.min.js npm run test-node + +To run full suite of tests in Node.js, including comparing outputs of +JavaScript port to outputs of the original C version: + + $ npm run test-node-all + +To prepare tests for browsers: + + $ npm run build-test-browser + +and then open `test/browser/test.html` (or `test/browser/test-fast.html`) to +run them. + +To run headless browser tests with `tape-run` (powered by Electron): + + $ npm run test-browser + +(If you get `Error: spawn ENOENT`, install *xvfb*: `sudo apt-get install xvfb`.) + +To run tests in both Node and Electron: + + $ npm test + +### Benchmarking + +To run benchmarks in Node.js: + + $ npm run bench + $ NACL_SRC=nacl-fast.min.js npm run bench + +To run benchmarks in a browser, open `test/benchmark/bench.html` (or +`test/benchmark/bench-fast.html`). + + +Benchmarks +---------- + +For reference, here are benchmarks from MacBook Pro (Retina, 13-inch, Mid 2014) +laptop with 2.6 GHz Intel Core i5 CPU (Intel) in Chrome 53/OS X and Xiaomi Redmi +Note 3 smartphone with 1.8 GHz Qualcomm Snapdragon 650 64-bit CPU (ARM) in +Chrome 52/Android: + +| | nacl.js Intel | nacl-fast.js Intel | nacl.js ARM | nacl-fast.js ARM | +| ------------- |:-------------:|:-------------------:|:-------------:|:-----------------:| +| salsa20 | 1.3 MB/s | 128 MB/s | 0.4 MB/s | 43 MB/s | +| poly1305 | 13 MB/s | 171 MB/s | 4 MB/s | 52 MB/s | +| hash | 4 MB/s | 34 MB/s | 0.9 MB/s | 12 MB/s | +| secretbox 1K | 1113 op/s | 57583 op/s | 334 op/s | 14227 op/s | +| box 1K | 145 op/s | 718 op/s | 37 op/s | 368 op/s | +| scalarMult | 171 op/s | 733 op/s | 56 op/s | 380 op/s | +| sign | 77 op/s | 200 op/s | 20 op/s | 61 op/s | +| sign.open | 39 op/s | 102 op/s | 11 op/s | 31 op/s | + +(You can run benchmarks on your devices by clicking on the links at the bottom +of the [home page](https://tweetnacl.js.org)). + +In short, with *nacl-fast.js* and 1024-byte messages you can expect to encrypt and +authenticate more than 57000 messages per second on a typical laptop or more than +14000 messages per second on a $170 smartphone, sign about 200 and verify 100 +messages per second on a laptop or 60 and 30 messages per second on a smartphone, +per CPU core (with Web Workers you can do these operations in parallel), +which is good enough for most applications. + + +Contributors +------------ + +See AUTHORS.md file. + + +Third-party libraries based on TweetNaCl.js +------------------------------------------- + +* [forward-secrecy](https://github.com/alax/forward-secrecy) — Axolotl ratchet implementation +* [nacl-stream](https://github.com/dchest/nacl-stream-js) - streaming encryption +* [tweetnacl-auth-js](https://github.com/dchest/tweetnacl-auth-js) — implementation of [`crypto_auth`](http://nacl.cr.yp.to/auth.html) +* [chloride](https://github.com/dominictarr/chloride) - unified API for various NaCl modules + + +Who uses it +----------- + +Some notable users of TweetNaCl.js: + +* [miniLock](http://minilock.io/) +* [Stellar](https://www.stellar.org/) diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.js new file mode 100644 index 0000000..5e4562f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.js @@ -0,0 +1,2388 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function ts64(x, i, h, l) { + x[i] = (h >> 24) & 0xff; + x[i+1] = (h >> 16) & 0xff; + x[i+2] = (h >> 8) & 0xff; + x[i+3] = h & 0xff; + x[i+4] = (l >> 24) & 0xff; + x[i+5] = (l >> 16) & 0xff; + x[i+6] = (l >> 8) & 0xff; + x[i+7] = l & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core_salsa20(o, p, k, c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + x0 = x0 + j0 | 0; + x1 = x1 + j1 | 0; + x2 = x2 + j2 | 0; + x3 = x3 + j3 | 0; + x4 = x4 + j4 | 0; + x5 = x5 + j5 | 0; + x6 = x6 + j6 | 0; + x7 = x7 + j7 | 0; + x8 = x8 + j8 | 0; + x9 = x9 + j9 | 0; + x10 = x10 + j10 | 0; + x11 = x11 + j11 | 0; + x12 = x12 + j12 | 0; + x13 = x13 + j13 | 0; + x14 = x14 + j14 | 0; + x15 = x15 + j15 | 0; + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x1 >>> 0 & 0xff; + o[ 5] = x1 >>> 8 & 0xff; + o[ 6] = x1 >>> 16 & 0xff; + o[ 7] = x1 >>> 24 & 0xff; + + o[ 8] = x2 >>> 0 & 0xff; + o[ 9] = x2 >>> 8 & 0xff; + o[10] = x2 >>> 16 & 0xff; + o[11] = x2 >>> 24 & 0xff; + + o[12] = x3 >>> 0 & 0xff; + o[13] = x3 >>> 8 & 0xff; + o[14] = x3 >>> 16 & 0xff; + o[15] = x3 >>> 24 & 0xff; + + o[16] = x4 >>> 0 & 0xff; + o[17] = x4 >>> 8 & 0xff; + o[18] = x4 >>> 16 & 0xff; + o[19] = x4 >>> 24 & 0xff; + + o[20] = x5 >>> 0 & 0xff; + o[21] = x5 >>> 8 & 0xff; + o[22] = x5 >>> 16 & 0xff; + o[23] = x5 >>> 24 & 0xff; + + o[24] = x6 >>> 0 & 0xff; + o[25] = x6 >>> 8 & 0xff; + o[26] = x6 >>> 16 & 0xff; + o[27] = x6 >>> 24 & 0xff; + + o[28] = x7 >>> 0 & 0xff; + o[29] = x7 >>> 8 & 0xff; + o[30] = x7 >>> 16 & 0xff; + o[31] = x7 >>> 24 & 0xff; + + o[32] = x8 >>> 0 & 0xff; + o[33] = x8 >>> 8 & 0xff; + o[34] = x8 >>> 16 & 0xff; + o[35] = x8 >>> 24 & 0xff; + + o[36] = x9 >>> 0 & 0xff; + o[37] = x9 >>> 8 & 0xff; + o[38] = x9 >>> 16 & 0xff; + o[39] = x9 >>> 24 & 0xff; + + o[40] = x10 >>> 0 & 0xff; + o[41] = x10 >>> 8 & 0xff; + o[42] = x10 >>> 16 & 0xff; + o[43] = x10 >>> 24 & 0xff; + + o[44] = x11 >>> 0 & 0xff; + o[45] = x11 >>> 8 & 0xff; + o[46] = x11 >>> 16 & 0xff; + o[47] = x11 >>> 24 & 0xff; + + o[48] = x12 >>> 0 & 0xff; + o[49] = x12 >>> 8 & 0xff; + o[50] = x12 >>> 16 & 0xff; + o[51] = x12 >>> 24 & 0xff; + + o[52] = x13 >>> 0 & 0xff; + o[53] = x13 >>> 8 & 0xff; + o[54] = x13 >>> 16 & 0xff; + o[55] = x13 >>> 24 & 0xff; + + o[56] = x14 >>> 0 & 0xff; + o[57] = x14 >>> 8 & 0xff; + o[58] = x14 >>> 16 & 0xff; + o[59] = x14 >>> 24 & 0xff; + + o[60] = x15 >>> 0 & 0xff; + o[61] = x15 >>> 8 & 0xff; + o[62] = x15 >>> 16 & 0xff; + o[63] = x15 >>> 24 & 0xff; +} + +function core_hsalsa20(o,p,k,c) { + var j0 = c[ 0] & 0xff | (c[ 1] & 0xff)<<8 | (c[ 2] & 0xff)<<16 | (c[ 3] & 0xff)<<24, + j1 = k[ 0] & 0xff | (k[ 1] & 0xff)<<8 | (k[ 2] & 0xff)<<16 | (k[ 3] & 0xff)<<24, + j2 = k[ 4] & 0xff | (k[ 5] & 0xff)<<8 | (k[ 6] & 0xff)<<16 | (k[ 7] & 0xff)<<24, + j3 = k[ 8] & 0xff | (k[ 9] & 0xff)<<8 | (k[10] & 0xff)<<16 | (k[11] & 0xff)<<24, + j4 = k[12] & 0xff | (k[13] & 0xff)<<8 | (k[14] & 0xff)<<16 | (k[15] & 0xff)<<24, + j5 = c[ 4] & 0xff | (c[ 5] & 0xff)<<8 | (c[ 6] & 0xff)<<16 | (c[ 7] & 0xff)<<24, + j6 = p[ 0] & 0xff | (p[ 1] & 0xff)<<8 | (p[ 2] & 0xff)<<16 | (p[ 3] & 0xff)<<24, + j7 = p[ 4] & 0xff | (p[ 5] & 0xff)<<8 | (p[ 6] & 0xff)<<16 | (p[ 7] & 0xff)<<24, + j8 = p[ 8] & 0xff | (p[ 9] & 0xff)<<8 | (p[10] & 0xff)<<16 | (p[11] & 0xff)<<24, + j9 = p[12] & 0xff | (p[13] & 0xff)<<8 | (p[14] & 0xff)<<16 | (p[15] & 0xff)<<24, + j10 = c[ 8] & 0xff | (c[ 9] & 0xff)<<8 | (c[10] & 0xff)<<16 | (c[11] & 0xff)<<24, + j11 = k[16] & 0xff | (k[17] & 0xff)<<8 | (k[18] & 0xff)<<16 | (k[19] & 0xff)<<24, + j12 = k[20] & 0xff | (k[21] & 0xff)<<8 | (k[22] & 0xff)<<16 | (k[23] & 0xff)<<24, + j13 = k[24] & 0xff | (k[25] & 0xff)<<8 | (k[26] & 0xff)<<16 | (k[27] & 0xff)<<24, + j14 = k[28] & 0xff | (k[29] & 0xff)<<8 | (k[30] & 0xff)<<16 | (k[31] & 0xff)<<24, + j15 = c[12] & 0xff | (c[13] & 0xff)<<8 | (c[14] & 0xff)<<16 | (c[15] & 0xff)<<24; + + var x0 = j0, x1 = j1, x2 = j2, x3 = j3, x4 = j4, x5 = j5, x6 = j6, x7 = j7, + x8 = j8, x9 = j9, x10 = j10, x11 = j11, x12 = j12, x13 = j13, x14 = j14, + x15 = j15, u; + + for (var i = 0; i < 20; i += 2) { + u = x0 + x12 | 0; + x4 ^= u<<7 | u>>>(32-7); + u = x4 + x0 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x4 | 0; + x12 ^= u<<13 | u>>>(32-13); + u = x12 + x8 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x1 | 0; + x9 ^= u<<7 | u>>>(32-7); + u = x9 + x5 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x9 | 0; + x1 ^= u<<13 | u>>>(32-13); + u = x1 + x13 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x6 | 0; + x14 ^= u<<7 | u>>>(32-7); + u = x14 + x10 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x14 | 0; + x6 ^= u<<13 | u>>>(32-13); + u = x6 + x2 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x11 | 0; + x3 ^= u<<7 | u>>>(32-7); + u = x3 + x15 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x3 | 0; + x11 ^= u<<13 | u>>>(32-13); + u = x11 + x7 | 0; + x15 ^= u<<18 | u>>>(32-18); + + u = x0 + x3 | 0; + x1 ^= u<<7 | u>>>(32-7); + u = x1 + x0 | 0; + x2 ^= u<<9 | u>>>(32-9); + u = x2 + x1 | 0; + x3 ^= u<<13 | u>>>(32-13); + u = x3 + x2 | 0; + x0 ^= u<<18 | u>>>(32-18); + + u = x5 + x4 | 0; + x6 ^= u<<7 | u>>>(32-7); + u = x6 + x5 | 0; + x7 ^= u<<9 | u>>>(32-9); + u = x7 + x6 | 0; + x4 ^= u<<13 | u>>>(32-13); + u = x4 + x7 | 0; + x5 ^= u<<18 | u>>>(32-18); + + u = x10 + x9 | 0; + x11 ^= u<<7 | u>>>(32-7); + u = x11 + x10 | 0; + x8 ^= u<<9 | u>>>(32-9); + u = x8 + x11 | 0; + x9 ^= u<<13 | u>>>(32-13); + u = x9 + x8 | 0; + x10 ^= u<<18 | u>>>(32-18); + + u = x15 + x14 | 0; + x12 ^= u<<7 | u>>>(32-7); + u = x12 + x15 | 0; + x13 ^= u<<9 | u>>>(32-9); + u = x13 + x12 | 0; + x14 ^= u<<13 | u>>>(32-13); + u = x14 + x13 | 0; + x15 ^= u<<18 | u>>>(32-18); + } + + o[ 0] = x0 >>> 0 & 0xff; + o[ 1] = x0 >>> 8 & 0xff; + o[ 2] = x0 >>> 16 & 0xff; + o[ 3] = x0 >>> 24 & 0xff; + + o[ 4] = x5 >>> 0 & 0xff; + o[ 5] = x5 >>> 8 & 0xff; + o[ 6] = x5 >>> 16 & 0xff; + o[ 7] = x5 >>> 24 & 0xff; + + o[ 8] = x10 >>> 0 & 0xff; + o[ 9] = x10 >>> 8 & 0xff; + o[10] = x10 >>> 16 & 0xff; + o[11] = x10 >>> 24 & 0xff; + + o[12] = x15 >>> 0 & 0xff; + o[13] = x15 >>> 8 & 0xff; + o[14] = x15 >>> 16 & 0xff; + o[15] = x15 >>> 24 & 0xff; + + o[16] = x6 >>> 0 & 0xff; + o[17] = x6 >>> 8 & 0xff; + o[18] = x6 >>> 16 & 0xff; + o[19] = x6 >>> 24 & 0xff; + + o[20] = x7 >>> 0 & 0xff; + o[21] = x7 >>> 8 & 0xff; + o[22] = x7 >>> 16 & 0xff; + o[23] = x7 >>> 24 & 0xff; + + o[24] = x8 >>> 0 & 0xff; + o[25] = x8 >>> 8 & 0xff; + o[26] = x8 >>> 16 & 0xff; + o[27] = x8 >>> 24 & 0xff; + + o[28] = x9 >>> 0 & 0xff; + o[29] = x9 >>> 8 & 0xff; + o[30] = x9 >>> 16 & 0xff; + o[31] = x9 >>> 24 & 0xff; +} + +function crypto_core_salsa20(out,inp,k,c) { + core_salsa20(out,inp,k,c); +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core_hsalsa20(out,inp,k,c); +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = m[mpos+i] ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = x[i]; + } + return 0; +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20(c,cpos,d,sn,s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + var sn = new Uint8Array(8); + for (var i = 0; i < 8; i++) sn[i] = n[i+16]; + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,sn,s); +} + +/* +* Port of Andrew Moon's Poly1305-donna-16. Public domain. +* https://github.com/floodyberry/poly1305-donna +*/ + +var poly1305 = function(key) { + this.buffer = new Uint8Array(16); + this.r = new Uint16Array(10); + this.h = new Uint16Array(10); + this.pad = new Uint16Array(8); + this.leftover = 0; + this.fin = 0; + + var t0, t1, t2, t3, t4, t5, t6, t7; + + t0 = key[ 0] & 0xff | (key[ 1] & 0xff) << 8; this.r[0] = ( t0 ) & 0x1fff; + t1 = key[ 2] & 0xff | (key[ 3] & 0xff) << 8; this.r[1] = ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = key[ 4] & 0xff | (key[ 5] & 0xff) << 8; this.r[2] = ((t1 >>> 10) | (t2 << 6)) & 0x1f03; + t3 = key[ 6] & 0xff | (key[ 7] & 0xff) << 8; this.r[3] = ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = key[ 8] & 0xff | (key[ 9] & 0xff) << 8; this.r[4] = ((t3 >>> 4) | (t4 << 12)) & 0x00ff; + this.r[5] = ((t4 >>> 1)) & 0x1ffe; + t5 = key[10] & 0xff | (key[11] & 0xff) << 8; this.r[6] = ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = key[12] & 0xff | (key[13] & 0xff) << 8; this.r[7] = ((t5 >>> 11) | (t6 << 5)) & 0x1f81; + t7 = key[14] & 0xff | (key[15] & 0xff) << 8; this.r[8] = ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + this.r[9] = ((t7 >>> 5)) & 0x007f; + + this.pad[0] = key[16] & 0xff | (key[17] & 0xff) << 8; + this.pad[1] = key[18] & 0xff | (key[19] & 0xff) << 8; + this.pad[2] = key[20] & 0xff | (key[21] & 0xff) << 8; + this.pad[3] = key[22] & 0xff | (key[23] & 0xff) << 8; + this.pad[4] = key[24] & 0xff | (key[25] & 0xff) << 8; + this.pad[5] = key[26] & 0xff | (key[27] & 0xff) << 8; + this.pad[6] = key[28] & 0xff | (key[29] & 0xff) << 8; + this.pad[7] = key[30] & 0xff | (key[31] & 0xff) << 8; +}; + +poly1305.prototype.blocks = function(m, mpos, bytes) { + var hibit = this.fin ? 0 : (1 << 11); + var t0, t1, t2, t3, t4, t5, t6, t7, c; + var d0, d1, d2, d3, d4, d5, d6, d7, d8, d9; + + var h0 = this.h[0], + h1 = this.h[1], + h2 = this.h[2], + h3 = this.h[3], + h4 = this.h[4], + h5 = this.h[5], + h6 = this.h[6], + h7 = this.h[7], + h8 = this.h[8], + h9 = this.h[9]; + + var r0 = this.r[0], + r1 = this.r[1], + r2 = this.r[2], + r3 = this.r[3], + r4 = this.r[4], + r5 = this.r[5], + r6 = this.r[6], + r7 = this.r[7], + r8 = this.r[8], + r9 = this.r[9]; + + while (bytes >= 16) { + t0 = m[mpos+ 0] & 0xff | (m[mpos+ 1] & 0xff) << 8; h0 += ( t0 ) & 0x1fff; + t1 = m[mpos+ 2] & 0xff | (m[mpos+ 3] & 0xff) << 8; h1 += ((t0 >>> 13) | (t1 << 3)) & 0x1fff; + t2 = m[mpos+ 4] & 0xff | (m[mpos+ 5] & 0xff) << 8; h2 += ((t1 >>> 10) | (t2 << 6)) & 0x1fff; + t3 = m[mpos+ 6] & 0xff | (m[mpos+ 7] & 0xff) << 8; h3 += ((t2 >>> 7) | (t3 << 9)) & 0x1fff; + t4 = m[mpos+ 8] & 0xff | (m[mpos+ 9] & 0xff) << 8; h4 += ((t3 >>> 4) | (t4 << 12)) & 0x1fff; + h5 += ((t4 >>> 1)) & 0x1fff; + t5 = m[mpos+10] & 0xff | (m[mpos+11] & 0xff) << 8; h6 += ((t4 >>> 14) | (t5 << 2)) & 0x1fff; + t6 = m[mpos+12] & 0xff | (m[mpos+13] & 0xff) << 8; h7 += ((t5 >>> 11) | (t6 << 5)) & 0x1fff; + t7 = m[mpos+14] & 0xff | (m[mpos+15] & 0xff) << 8; h8 += ((t6 >>> 8) | (t7 << 8)) & 0x1fff; + h9 += ((t7 >>> 5)) | hibit; + + c = 0; + + d0 = c; + d0 += h0 * r0; + d0 += h1 * (5 * r9); + d0 += h2 * (5 * r8); + d0 += h3 * (5 * r7); + d0 += h4 * (5 * r6); + c = (d0 >>> 13); d0 &= 0x1fff; + d0 += h5 * (5 * r5); + d0 += h6 * (5 * r4); + d0 += h7 * (5 * r3); + d0 += h8 * (5 * r2); + d0 += h9 * (5 * r1); + c += (d0 >>> 13); d0 &= 0x1fff; + + d1 = c; + d1 += h0 * r1; + d1 += h1 * r0; + d1 += h2 * (5 * r9); + d1 += h3 * (5 * r8); + d1 += h4 * (5 * r7); + c = (d1 >>> 13); d1 &= 0x1fff; + d1 += h5 * (5 * r6); + d1 += h6 * (5 * r5); + d1 += h7 * (5 * r4); + d1 += h8 * (5 * r3); + d1 += h9 * (5 * r2); + c += (d1 >>> 13); d1 &= 0x1fff; + + d2 = c; + d2 += h0 * r2; + d2 += h1 * r1; + d2 += h2 * r0; + d2 += h3 * (5 * r9); + d2 += h4 * (5 * r8); + c = (d2 >>> 13); d2 &= 0x1fff; + d2 += h5 * (5 * r7); + d2 += h6 * (5 * r6); + d2 += h7 * (5 * r5); + d2 += h8 * (5 * r4); + d2 += h9 * (5 * r3); + c += (d2 >>> 13); d2 &= 0x1fff; + + d3 = c; + d3 += h0 * r3; + d3 += h1 * r2; + d3 += h2 * r1; + d3 += h3 * r0; + d3 += h4 * (5 * r9); + c = (d3 >>> 13); d3 &= 0x1fff; + d3 += h5 * (5 * r8); + d3 += h6 * (5 * r7); + d3 += h7 * (5 * r6); + d3 += h8 * (5 * r5); + d3 += h9 * (5 * r4); + c += (d3 >>> 13); d3 &= 0x1fff; + + d4 = c; + d4 += h0 * r4; + d4 += h1 * r3; + d4 += h2 * r2; + d4 += h3 * r1; + d4 += h4 * r0; + c = (d4 >>> 13); d4 &= 0x1fff; + d4 += h5 * (5 * r9); + d4 += h6 * (5 * r8); + d4 += h7 * (5 * r7); + d4 += h8 * (5 * r6); + d4 += h9 * (5 * r5); + c += (d4 >>> 13); d4 &= 0x1fff; + + d5 = c; + d5 += h0 * r5; + d5 += h1 * r4; + d5 += h2 * r3; + d5 += h3 * r2; + d5 += h4 * r1; + c = (d5 >>> 13); d5 &= 0x1fff; + d5 += h5 * r0; + d5 += h6 * (5 * r9); + d5 += h7 * (5 * r8); + d5 += h8 * (5 * r7); + d5 += h9 * (5 * r6); + c += (d5 >>> 13); d5 &= 0x1fff; + + d6 = c; + d6 += h0 * r6; + d6 += h1 * r5; + d6 += h2 * r4; + d6 += h3 * r3; + d6 += h4 * r2; + c = (d6 >>> 13); d6 &= 0x1fff; + d6 += h5 * r1; + d6 += h6 * r0; + d6 += h7 * (5 * r9); + d6 += h8 * (5 * r8); + d6 += h9 * (5 * r7); + c += (d6 >>> 13); d6 &= 0x1fff; + + d7 = c; + d7 += h0 * r7; + d7 += h1 * r6; + d7 += h2 * r5; + d7 += h3 * r4; + d7 += h4 * r3; + c = (d7 >>> 13); d7 &= 0x1fff; + d7 += h5 * r2; + d7 += h6 * r1; + d7 += h7 * r0; + d7 += h8 * (5 * r9); + d7 += h9 * (5 * r8); + c += (d7 >>> 13); d7 &= 0x1fff; + + d8 = c; + d8 += h0 * r8; + d8 += h1 * r7; + d8 += h2 * r6; + d8 += h3 * r5; + d8 += h4 * r4; + c = (d8 >>> 13); d8 &= 0x1fff; + d8 += h5 * r3; + d8 += h6 * r2; + d8 += h7 * r1; + d8 += h8 * r0; + d8 += h9 * (5 * r9); + c += (d8 >>> 13); d8 &= 0x1fff; + + d9 = c; + d9 += h0 * r9; + d9 += h1 * r8; + d9 += h2 * r7; + d9 += h3 * r6; + d9 += h4 * r5; + c = (d9 >>> 13); d9 &= 0x1fff; + d9 += h5 * r4; + d9 += h6 * r3; + d9 += h7 * r2; + d9 += h8 * r1; + d9 += h9 * r0; + c += (d9 >>> 13); d9 &= 0x1fff; + + c = (((c << 2) + c)) | 0; + c = (c + d0) | 0; + d0 = c & 0x1fff; + c = (c >>> 13); + d1 += c; + + h0 = d0; + h1 = d1; + h2 = d2; + h3 = d3; + h4 = d4; + h5 = d5; + h6 = d6; + h7 = d7; + h8 = d8; + h9 = d9; + + mpos += 16; + bytes -= 16; + } + this.h[0] = h0; + this.h[1] = h1; + this.h[2] = h2; + this.h[3] = h3; + this.h[4] = h4; + this.h[5] = h5; + this.h[6] = h6; + this.h[7] = h7; + this.h[8] = h8; + this.h[9] = h9; +}; + +poly1305.prototype.finish = function(mac, macpos) { + var g = new Uint16Array(10); + var c, mask, f, i; + + if (this.leftover) { + i = this.leftover; + this.buffer[i++] = 1; + for (; i < 16; i++) this.buffer[i] = 0; + this.fin = 1; + this.blocks(this.buffer, 0, 16); + } + + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + for (i = 2; i < 10; i++) { + this.h[i] += c; + c = this.h[i] >>> 13; + this.h[i] &= 0x1fff; + } + this.h[0] += (c * 5); + c = this.h[0] >>> 13; + this.h[0] &= 0x1fff; + this.h[1] += c; + c = this.h[1] >>> 13; + this.h[1] &= 0x1fff; + this.h[2] += c; + + g[0] = this.h[0] + 5; + c = g[0] >>> 13; + g[0] &= 0x1fff; + for (i = 1; i < 10; i++) { + g[i] = this.h[i] + c; + c = g[i] >>> 13; + g[i] &= 0x1fff; + } + g[9] -= (1 << 13); + + mask = (c ^ 1) - 1; + for (i = 0; i < 10; i++) g[i] &= mask; + mask = ~mask; + for (i = 0; i < 10; i++) this.h[i] = (this.h[i] & mask) | g[i]; + + this.h[0] = ((this.h[0] ) | (this.h[1] << 13) ) & 0xffff; + this.h[1] = ((this.h[1] >>> 3) | (this.h[2] << 10) ) & 0xffff; + this.h[2] = ((this.h[2] >>> 6) | (this.h[3] << 7) ) & 0xffff; + this.h[3] = ((this.h[3] >>> 9) | (this.h[4] << 4) ) & 0xffff; + this.h[4] = ((this.h[4] >>> 12) | (this.h[5] << 1) | (this.h[6] << 14)) & 0xffff; + this.h[5] = ((this.h[6] >>> 2) | (this.h[7] << 11) ) & 0xffff; + this.h[6] = ((this.h[7] >>> 5) | (this.h[8] << 8) ) & 0xffff; + this.h[7] = ((this.h[8] >>> 8) | (this.h[9] << 5) ) & 0xffff; + + f = this.h[0] + this.pad[0]; + this.h[0] = f & 0xffff; + for (i = 1; i < 8; i++) { + f = (((this.h[i] + this.pad[i]) | 0) + (f >>> 16)) | 0; + this.h[i] = f & 0xffff; + } + + mac[macpos+ 0] = (this.h[0] >>> 0) & 0xff; + mac[macpos+ 1] = (this.h[0] >>> 8) & 0xff; + mac[macpos+ 2] = (this.h[1] >>> 0) & 0xff; + mac[macpos+ 3] = (this.h[1] >>> 8) & 0xff; + mac[macpos+ 4] = (this.h[2] >>> 0) & 0xff; + mac[macpos+ 5] = (this.h[2] >>> 8) & 0xff; + mac[macpos+ 6] = (this.h[3] >>> 0) & 0xff; + mac[macpos+ 7] = (this.h[3] >>> 8) & 0xff; + mac[macpos+ 8] = (this.h[4] >>> 0) & 0xff; + mac[macpos+ 9] = (this.h[4] >>> 8) & 0xff; + mac[macpos+10] = (this.h[5] >>> 0) & 0xff; + mac[macpos+11] = (this.h[5] >>> 8) & 0xff; + mac[macpos+12] = (this.h[6] >>> 0) & 0xff; + mac[macpos+13] = (this.h[6] >>> 8) & 0xff; + mac[macpos+14] = (this.h[7] >>> 0) & 0xff; + mac[macpos+15] = (this.h[7] >>> 8) & 0xff; +}; + +poly1305.prototype.update = function(m, mpos, bytes) { + var i, want; + + if (this.leftover) { + want = (16 - this.leftover); + if (want > bytes) + want = bytes; + for (i = 0; i < want; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + bytes -= want; + mpos += want; + this.leftover += want; + if (this.leftover < 16) + return; + this.blocks(this.buffer, 0, 16); + this.leftover = 0; + } + + if (bytes >= 16) { + want = bytes - (bytes % 16); + this.blocks(m, mpos, want); + mpos += want; + bytes -= want; + } + + if (bytes) { + for (i = 0; i < bytes; i++) + this.buffer[this.leftover + i] = m[mpos+i]; + this.leftover += bytes; + } +}; + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s = new poly1305(k); + s.update(m, mpos, n); + s.finish(out, outpos); + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var i, v, c = 1; + for (i = 0; i < 16; i++) { + v = o[i] + c + 65535; + c = Math.floor(v / 65536); + o[i] = v - c * 65536; + } + o[0] += c-1 + 37 * (c-1); +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] + b[i]; +} + +function Z(o, a, b) { + for (var i = 0; i < 16; i++) o[i] = a[i] - b[i]; +} + +function M(o, a, b) { + var v, c, + t0 = 0, t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, + t8 = 0, t9 = 0, t10 = 0, t11 = 0, t12 = 0, t13 = 0, t14 = 0, t15 = 0, + t16 = 0, t17 = 0, t18 = 0, t19 = 0, t20 = 0, t21 = 0, t22 = 0, t23 = 0, + t24 = 0, t25 = 0, t26 = 0, t27 = 0, t28 = 0, t29 = 0, t30 = 0, + b0 = b[0], + b1 = b[1], + b2 = b[2], + b3 = b[3], + b4 = b[4], + b5 = b[5], + b6 = b[6], + b7 = b[7], + b8 = b[8], + b9 = b[9], + b10 = b[10], + b11 = b[11], + b12 = b[12], + b13 = b[13], + b14 = b[14], + b15 = b[15]; + + v = a[0]; + t0 += v * b0; + t1 += v * b1; + t2 += v * b2; + t3 += v * b3; + t4 += v * b4; + t5 += v * b5; + t6 += v * b6; + t7 += v * b7; + t8 += v * b8; + t9 += v * b9; + t10 += v * b10; + t11 += v * b11; + t12 += v * b12; + t13 += v * b13; + t14 += v * b14; + t15 += v * b15; + v = a[1]; + t1 += v * b0; + t2 += v * b1; + t3 += v * b2; + t4 += v * b3; + t5 += v * b4; + t6 += v * b5; + t7 += v * b6; + t8 += v * b7; + t9 += v * b8; + t10 += v * b9; + t11 += v * b10; + t12 += v * b11; + t13 += v * b12; + t14 += v * b13; + t15 += v * b14; + t16 += v * b15; + v = a[2]; + t2 += v * b0; + t3 += v * b1; + t4 += v * b2; + t5 += v * b3; + t6 += v * b4; + t7 += v * b5; + t8 += v * b6; + t9 += v * b7; + t10 += v * b8; + t11 += v * b9; + t12 += v * b10; + t13 += v * b11; + t14 += v * b12; + t15 += v * b13; + t16 += v * b14; + t17 += v * b15; + v = a[3]; + t3 += v * b0; + t4 += v * b1; + t5 += v * b2; + t6 += v * b3; + t7 += v * b4; + t8 += v * b5; + t9 += v * b6; + t10 += v * b7; + t11 += v * b8; + t12 += v * b9; + t13 += v * b10; + t14 += v * b11; + t15 += v * b12; + t16 += v * b13; + t17 += v * b14; + t18 += v * b15; + v = a[4]; + t4 += v * b0; + t5 += v * b1; + t6 += v * b2; + t7 += v * b3; + t8 += v * b4; + t9 += v * b5; + t10 += v * b6; + t11 += v * b7; + t12 += v * b8; + t13 += v * b9; + t14 += v * b10; + t15 += v * b11; + t16 += v * b12; + t17 += v * b13; + t18 += v * b14; + t19 += v * b15; + v = a[5]; + t5 += v * b0; + t6 += v * b1; + t7 += v * b2; + t8 += v * b3; + t9 += v * b4; + t10 += v * b5; + t11 += v * b6; + t12 += v * b7; + t13 += v * b8; + t14 += v * b9; + t15 += v * b10; + t16 += v * b11; + t17 += v * b12; + t18 += v * b13; + t19 += v * b14; + t20 += v * b15; + v = a[6]; + t6 += v * b0; + t7 += v * b1; + t8 += v * b2; + t9 += v * b3; + t10 += v * b4; + t11 += v * b5; + t12 += v * b6; + t13 += v * b7; + t14 += v * b8; + t15 += v * b9; + t16 += v * b10; + t17 += v * b11; + t18 += v * b12; + t19 += v * b13; + t20 += v * b14; + t21 += v * b15; + v = a[7]; + t7 += v * b0; + t8 += v * b1; + t9 += v * b2; + t10 += v * b3; + t11 += v * b4; + t12 += v * b5; + t13 += v * b6; + t14 += v * b7; + t15 += v * b8; + t16 += v * b9; + t17 += v * b10; + t18 += v * b11; + t19 += v * b12; + t20 += v * b13; + t21 += v * b14; + t22 += v * b15; + v = a[8]; + t8 += v * b0; + t9 += v * b1; + t10 += v * b2; + t11 += v * b3; + t12 += v * b4; + t13 += v * b5; + t14 += v * b6; + t15 += v * b7; + t16 += v * b8; + t17 += v * b9; + t18 += v * b10; + t19 += v * b11; + t20 += v * b12; + t21 += v * b13; + t22 += v * b14; + t23 += v * b15; + v = a[9]; + t9 += v * b0; + t10 += v * b1; + t11 += v * b2; + t12 += v * b3; + t13 += v * b4; + t14 += v * b5; + t15 += v * b6; + t16 += v * b7; + t17 += v * b8; + t18 += v * b9; + t19 += v * b10; + t20 += v * b11; + t21 += v * b12; + t22 += v * b13; + t23 += v * b14; + t24 += v * b15; + v = a[10]; + t10 += v * b0; + t11 += v * b1; + t12 += v * b2; + t13 += v * b3; + t14 += v * b4; + t15 += v * b5; + t16 += v * b6; + t17 += v * b7; + t18 += v * b8; + t19 += v * b9; + t20 += v * b10; + t21 += v * b11; + t22 += v * b12; + t23 += v * b13; + t24 += v * b14; + t25 += v * b15; + v = a[11]; + t11 += v * b0; + t12 += v * b1; + t13 += v * b2; + t14 += v * b3; + t15 += v * b4; + t16 += v * b5; + t17 += v * b6; + t18 += v * b7; + t19 += v * b8; + t20 += v * b9; + t21 += v * b10; + t22 += v * b11; + t23 += v * b12; + t24 += v * b13; + t25 += v * b14; + t26 += v * b15; + v = a[12]; + t12 += v * b0; + t13 += v * b1; + t14 += v * b2; + t15 += v * b3; + t16 += v * b4; + t17 += v * b5; + t18 += v * b6; + t19 += v * b7; + t20 += v * b8; + t21 += v * b9; + t22 += v * b10; + t23 += v * b11; + t24 += v * b12; + t25 += v * b13; + t26 += v * b14; + t27 += v * b15; + v = a[13]; + t13 += v * b0; + t14 += v * b1; + t15 += v * b2; + t16 += v * b3; + t17 += v * b4; + t18 += v * b5; + t19 += v * b6; + t20 += v * b7; + t21 += v * b8; + t22 += v * b9; + t23 += v * b10; + t24 += v * b11; + t25 += v * b12; + t26 += v * b13; + t27 += v * b14; + t28 += v * b15; + v = a[14]; + t14 += v * b0; + t15 += v * b1; + t16 += v * b2; + t17 += v * b3; + t18 += v * b4; + t19 += v * b5; + t20 += v * b6; + t21 += v * b7; + t22 += v * b8; + t23 += v * b9; + t24 += v * b10; + t25 += v * b11; + t26 += v * b12; + t27 += v * b13; + t28 += v * b14; + t29 += v * b15; + v = a[15]; + t15 += v * b0; + t16 += v * b1; + t17 += v * b2; + t18 += v * b3; + t19 += v * b4; + t20 += v * b5; + t21 += v * b6; + t22 += v * b7; + t23 += v * b8; + t24 += v * b9; + t25 += v * b10; + t26 += v * b11; + t27 += v * b12; + t28 += v * b13; + t29 += v * b14; + t30 += v * b15; + + t0 += 38 * t16; + t1 += 38 * t17; + t2 += 38 * t18; + t3 += 38 * t19; + t4 += 38 * t20; + t5 += 38 * t21; + t6 += 38 * t22; + t7 += 38 * t23; + t8 += 38 * t24; + t9 += 38 * t25; + t10 += 38 * t26; + t11 += 38 * t27; + t12 += 38 * t28; + t13 += 38 * t29; + t14 += 38 * t30; + // t15 left as is + + // first car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + // second car + c = 1; + v = t0 + c + 65535; c = Math.floor(v / 65536); t0 = v - c * 65536; + v = t1 + c + 65535; c = Math.floor(v / 65536); t1 = v - c * 65536; + v = t2 + c + 65535; c = Math.floor(v / 65536); t2 = v - c * 65536; + v = t3 + c + 65535; c = Math.floor(v / 65536); t3 = v - c * 65536; + v = t4 + c + 65535; c = Math.floor(v / 65536); t4 = v - c * 65536; + v = t5 + c + 65535; c = Math.floor(v / 65536); t5 = v - c * 65536; + v = t6 + c + 65535; c = Math.floor(v / 65536); t6 = v - c * 65536; + v = t7 + c + 65535; c = Math.floor(v / 65536); t7 = v - c * 65536; + v = t8 + c + 65535; c = Math.floor(v / 65536); t8 = v - c * 65536; + v = t9 + c + 65535; c = Math.floor(v / 65536); t9 = v - c * 65536; + v = t10 + c + 65535; c = Math.floor(v / 65536); t10 = v - c * 65536; + v = t11 + c + 65535; c = Math.floor(v / 65536); t11 = v - c * 65536; + v = t12 + c + 65535; c = Math.floor(v / 65536); t12 = v - c * 65536; + v = t13 + c + 65535; c = Math.floor(v / 65536); t13 = v - c * 65536; + v = t14 + c + 65535; c = Math.floor(v / 65536); t14 = v - c * 65536; + v = t15 + c + 65535; c = Math.floor(v / 65536); t15 = v - c * 65536; + t0 += c-1 + 37 * (c-1); + + o[ 0] = t0; + o[ 1] = t1; + o[ 2] = t2; + o[ 3] = t3; + o[ 4] = t4; + o[ 5] = t5; + o[ 6] = t6; + o[ 7] = t7; + o[ 8] = t8; + o[ 9] = t9; + o[10] = t10; + o[11] = t11; + o[12] = t12; + o[13] = t13; + o[14] = t14; + o[15] = t15; +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +var K = [ + 0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd, + 0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc, + 0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019, + 0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118, + 0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe, + 0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2, + 0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1, + 0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694, + 0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3, + 0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65, + 0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483, + 0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5, + 0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210, + 0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4, + 0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725, + 0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70, + 0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926, + 0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df, + 0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8, + 0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b, + 0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001, + 0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30, + 0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910, + 0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8, + 0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53, + 0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8, + 0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb, + 0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3, + 0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60, + 0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec, + 0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9, + 0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b, + 0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207, + 0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178, + 0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6, + 0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b, + 0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493, + 0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c, + 0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a, + 0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817 +]; + +function crypto_hashblocks_hl(hh, hl, m, n) { + var wh = new Int32Array(16), wl = new Int32Array(16), + bh0, bh1, bh2, bh3, bh4, bh5, bh6, bh7, + bl0, bl1, bl2, bl3, bl4, bl5, bl6, bl7, + th, tl, i, j, h, l, a, b, c, d; + + var ah0 = hh[0], + ah1 = hh[1], + ah2 = hh[2], + ah3 = hh[3], + ah4 = hh[4], + ah5 = hh[5], + ah6 = hh[6], + ah7 = hh[7], + + al0 = hl[0], + al1 = hl[1], + al2 = hl[2], + al3 = hl[3], + al4 = hl[4], + al5 = hl[5], + al6 = hl[6], + al7 = hl[7]; + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) { + j = 8 * i + pos; + wh[i] = (m[j+0] << 24) | (m[j+1] << 16) | (m[j+2] << 8) | m[j+3]; + wl[i] = (m[j+4] << 24) | (m[j+5] << 16) | (m[j+6] << 8) | m[j+7]; + } + for (i = 0; i < 80; i++) { + bh0 = ah0; + bh1 = ah1; + bh2 = ah2; + bh3 = ah3; + bh4 = ah4; + bh5 = ah5; + bh6 = ah6; + bh7 = ah7; + + bl0 = al0; + bl1 = al1; + bl2 = al2; + bl3 = al3; + bl4 = al4; + bl5 = al5; + bl6 = al6; + bl7 = al7; + + // add + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma1 + h = ((ah4 >>> 14) | (al4 << (32-14))) ^ ((ah4 >>> 18) | (al4 << (32-18))) ^ ((al4 >>> (41-32)) | (ah4 << (32-(41-32)))); + l = ((al4 >>> 14) | (ah4 << (32-14))) ^ ((al4 >>> 18) | (ah4 << (32-18))) ^ ((ah4 >>> (41-32)) | (al4 << (32-(41-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Ch + h = (ah4 & ah5) ^ (~ah4 & ah6); + l = (al4 & al5) ^ (~al4 & al6); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // K + h = K[i*2]; + l = K[i*2+1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // w + h = wh[i%16]; + l = wl[i%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + th = c & 0xffff | d << 16; + tl = a & 0xffff | b << 16; + + // add + h = th; + l = tl; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + // Sigma0 + h = ((ah0 >>> 28) | (al0 << (32-28))) ^ ((al0 >>> (34-32)) | (ah0 << (32-(34-32)))) ^ ((al0 >>> (39-32)) | (ah0 << (32-(39-32)))); + l = ((al0 >>> 28) | (ah0 << (32-28))) ^ ((ah0 >>> (34-32)) | (al0 << (32-(34-32)))) ^ ((ah0 >>> (39-32)) | (al0 << (32-(39-32)))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // Maj + h = (ah0 & ah1) ^ (ah0 & ah2) ^ (ah1 & ah2); + l = (al0 & al1) ^ (al0 & al2) ^ (al1 & al2); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh7 = (c & 0xffff) | (d << 16); + bl7 = (a & 0xffff) | (b << 16); + + // add + h = bh3; + l = bl3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = th; + l = tl; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + bh3 = (c & 0xffff) | (d << 16); + bl3 = (a & 0xffff) | (b << 16); + + ah1 = bh0; + ah2 = bh1; + ah3 = bh2; + ah4 = bh3; + ah5 = bh4; + ah6 = bh5; + ah7 = bh6; + ah0 = bh7; + + al1 = bl0; + al2 = bl1; + al3 = bl2; + al4 = bl3; + al5 = bl4; + al6 = bl5; + al7 = bl6; + al0 = bl7; + + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + // add + h = wh[j]; + l = wl[j]; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = wh[(j+9)%16]; + l = wl[(j+9)%16]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma0 + th = wh[(j+1)%16]; + tl = wl[(j+1)%16]; + h = ((th >>> 1) | (tl << (32-1))) ^ ((th >>> 8) | (tl << (32-8))) ^ (th >>> 7); + l = ((tl >>> 1) | (th << (32-1))) ^ ((tl >>> 8) | (th << (32-8))) ^ ((tl >>> 7) | (th << (32-7))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + // sigma1 + th = wh[(j+14)%16]; + tl = wl[(j+14)%16]; + h = ((th >>> 19) | (tl << (32-19))) ^ ((tl >>> (61-32)) | (th << (32-(61-32)))) ^ (th >>> 6); + l = ((tl >>> 19) | (th << (32-19))) ^ ((th >>> (61-32)) | (tl << (32-(61-32)))) ^ ((tl >>> 6) | (th << (32-6))); + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + wh[j] = (c & 0xffff) | (d << 16); + wl[j] = (a & 0xffff) | (b << 16); + } + } + } + + // add + h = ah0; + l = al0; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[0]; + l = hl[0]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[0] = ah0 = (c & 0xffff) | (d << 16); + hl[0] = al0 = (a & 0xffff) | (b << 16); + + h = ah1; + l = al1; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[1]; + l = hl[1]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[1] = ah1 = (c & 0xffff) | (d << 16); + hl[1] = al1 = (a & 0xffff) | (b << 16); + + h = ah2; + l = al2; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[2]; + l = hl[2]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[2] = ah2 = (c & 0xffff) | (d << 16); + hl[2] = al2 = (a & 0xffff) | (b << 16); + + h = ah3; + l = al3; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[3]; + l = hl[3]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[3] = ah3 = (c & 0xffff) | (d << 16); + hl[3] = al3 = (a & 0xffff) | (b << 16); + + h = ah4; + l = al4; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[4]; + l = hl[4]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[4] = ah4 = (c & 0xffff) | (d << 16); + hl[4] = al4 = (a & 0xffff) | (b << 16); + + h = ah5; + l = al5; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[5]; + l = hl[5]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[5] = ah5 = (c & 0xffff) | (d << 16); + hl[5] = al5 = (a & 0xffff) | (b << 16); + + h = ah6; + l = al6; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[6]; + l = hl[6]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[6] = ah6 = (c & 0xffff) | (d << 16); + hl[6] = al6 = (a & 0xffff) | (b << 16); + + h = ah7; + l = al7; + + a = l & 0xffff; b = l >>> 16; + c = h & 0xffff; d = h >>> 16; + + h = hh[7]; + l = hl[7]; + + a += l & 0xffff; b += l >>> 16; + c += h & 0xffff; d += h >>> 16; + + b += a >>> 16; + c += b >>> 16; + d += c >>> 16; + + hh[7] = ah7 = (c & 0xffff) | (d << 16); + hl[7] = al7 = (a & 0xffff) | (b << 16); + + pos += 128; + n -= 128; + } + + return n; +} + +function crypto_hash(out, m, n) { + var hh = new Int32Array(8), + hl = new Int32Array(8), + x = new Uint8Array(256), + i, b = n; + + hh[0] = 0x6a09e667; + hh[1] = 0xbb67ae85; + hh[2] = 0x3c6ef372; + hh[3] = 0xa54ff53a; + hh[4] = 0x510e527f; + hh[5] = 0x9b05688c; + hh[6] = 0x1f83d9ab; + hh[7] = 0x5be0cd19; + + hl[0] = 0xf3bcc908; + hl[1] = 0x84caa73b; + hl[2] = 0xfe94f82b; + hl[3] = 0x5f1d36f1; + hl[4] = 0xade682d1; + hl[5] = 0x2b3e6c1f; + hl[6] = 0xfb41bd6b; + hl[7] = 0x137e2179; + + crypto_hashblocks_hl(hh, hl, m, n); + n %= 128; + + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, (b / 0x20000000) | 0, b << 3); + crypto_hashblocks_hl(hh, hl, x, n); + + for (i = 0; i < 8; i++) ts64(out, 8*i, hh[i], hl[i]); + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto && crypto.randomBytes) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.min.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.min.js new file mode 100644 index 0000000..8bc47da --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl-fast.min.js @@ -0,0 +1,2 @@ +!function(r){"use strict";function t(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function n(r,t,n,e,o){var i,h=0;for(i=0;i>>8)-1}function e(r,t,e,o){return n(r,t,e,o,16)}function o(r,t,e,o){return n(r,t,e,o,32)}function i(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;d=d+i|0,U=U+h|0,E=E+a|0,x=x+f|0,M=M+s|0,m=m+c|0,B=B+u|0,S=S+y|0,K=K+l|0,T=T+w|0,Y=Y+p|0,k=k+v|0,L=L+b|0,z=z+g|0,R=R+_|0,P=P+A|0,r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=U>>>0&255,r[5]=U>>>8&255,r[6]=U>>>16&255,r[7]=U>>>24&255,r[8]=E>>>0&255,r[9]=E>>>8&255,r[10]=E>>>16&255,r[11]=E>>>24&255,r[12]=x>>>0&255,r[13]=x>>>8&255,r[14]=x>>>16&255,r[15]=x>>>24&255,r[16]=M>>>0&255,r[17]=M>>>8&255,r[18]=M>>>16&255,r[19]=M>>>24&255,r[20]=m>>>0&255,r[21]=m>>>8&255,r[22]=m>>>16&255,r[23]=m>>>24&255,r[24]=B>>>0&255,r[25]=B>>>8&255,r[26]=B>>>16&255,r[27]=B>>>24&255,r[28]=S>>>0&255,r[29]=S>>>8&255,r[30]=S>>>16&255,r[31]=S>>>24&255,r[32]=K>>>0&255,r[33]=K>>>8&255,r[34]=K>>>16&255,r[35]=K>>>24&255,r[36]=T>>>0&255,r[37]=T>>>8&255,r[38]=T>>>16&255,r[39]=T>>>24&255,r[40]=Y>>>0&255,r[41]=Y>>>8&255,r[42]=Y>>>16&255,r[43]=Y>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=L>>>0&255,r[49]=L>>>8&255,r[50]=L>>>16&255,r[51]=L>>>24&255,r[52]=z>>>0&255,r[53]=z>>>8&255,r[54]=z>>>16&255,r[55]=z>>>24&255,r[56]=R>>>0&255,r[57]=R>>>8&255,r[58]=R>>>16&255,r[59]=R>>>24&255,r[60]=P>>>0&255,r[61]=P>>>8&255,r[62]=P>>>16&255,r[63]=P>>>24&255}function h(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,c=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,u=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,_=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,A=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,d=i,U=h,E=a,x=f,M=s,m=c,B=u,S=y,K=l,T=w,Y=p,k=v,L=b,z=g,R=_,P=A,O=0;O<20;O+=2)o=d+L|0,M^=o<<7|o>>>25,o=M+d|0,K^=o<<9|o>>>23,o=K+M|0,L^=o<<13|o>>>19,o=L+K|0,d^=o<<18|o>>>14,o=m+U|0,T^=o<<7|o>>>25,o=T+m|0,z^=o<<9|o>>>23,o=z+T|0,U^=o<<13|o>>>19,o=U+z|0,m^=o<<18|o>>>14,o=Y+B|0,R^=o<<7|o>>>25,o=R+Y|0,E^=o<<9|o>>>23,o=E+R|0,B^=o<<13|o>>>19,o=B+E|0,Y^=o<<18|o>>>14,o=P+k|0,x^=o<<7|o>>>25,o=x+P|0,S^=o<<9|o>>>23,o=S+x|0,k^=o<<13|o>>>19,o=k+S|0,P^=o<<18|o>>>14,o=d+x|0,U^=o<<7|o>>>25,o=U+d|0,E^=o<<9|o>>>23,o=E+U|0,x^=o<<13|o>>>19,o=x+E|0,d^=o<<18|o>>>14,o=m+M|0,B^=o<<7|o>>>25,o=B+m|0,S^=o<<9|o>>>23,o=S+B|0,M^=o<<13|o>>>19,o=M+S|0,m^=o<<18|o>>>14,o=Y+T|0,k^=o<<7|o>>>25,o=k+Y|0,K^=o<<9|o>>>23,o=K+k|0,T^=o<<13|o>>>19,o=T+K|0,Y^=o<<18|o>>>14,o=P+R|0,L^=o<<7|o>>>25,o=L+P|0,z^=o<<9|o>>>23,o=z+L|0,R^=o<<13|o>>>19,o=R+z|0,P^=o<<18|o>>>14;r[0]=d>>>0&255,r[1]=d>>>8&255,r[2]=d>>>16&255,r[3]=d>>>24&255,r[4]=m>>>0&255,r[5]=m>>>8&255,r[6]=m>>>16&255,r[7]=m>>>24&255,r[8]=Y>>>0&255,r[9]=Y>>>8&255,r[10]=Y>>>16&255,r[11]=Y>>>24&255,r[12]=P>>>0&255,r[13]=P>>>8&255,r[14]=P>>>16&255,r[15]=P>>>24&255,r[16]=B>>>0&255,r[17]=B>>>8&255,r[18]=B>>>16&255,r[19]=B>>>24&255,r[20]=S>>>0&255,r[21]=S>>>8&255,r[22]=S>>>16&255,r[23]=S>>>24&255,r[24]=K>>>0&255,r[25]=K>>>8&255,r[26]=K>>>16&255,r[27]=K>>>24&255,r[28]=T>>>0&255,r[29]=T>>>8&255,r[30]=T>>>16&255,r[31]=T>>>24&255}function a(r,t,n,e){i(r,t,n,e)}function f(r,t,n,e){h(r,t,n,e)}function s(r,t,n,e,o,i,h){var f,s,c=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)c[s]=0;for(s=0;s<8;s++)c[s]=i[s];for(;o>=64;){for(a(u,c,h,ur),s=0;s<64;s++)r[t+s]=n[e+s]^u[s];for(f=1,s=8;s<16;s++)f=f+(255&c[s])|0,c[s]=255&f,f>>>=8;o-=64,t+=64,e+=64}if(o>0)for(a(u,c,h,ur),s=0;s=64;){for(a(s,f,o,ur),h=0;h<64;h++)r[t+h]=s[h];for(i=1,h=8;h<16;h++)i=i+(255&f[h])|0,f[h]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(a(s,f,o,ur),h=0;h>16&1),i[n-1]&=65535;i[15]=h[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,_(h,i,1-o)}for(n=0;n<16;n++)r[2*n]=255&h[n],r[2*n+1]=h[n]>>8}function d(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return A(n,r),A(e,t),o(n,0,e,0)}function U(r){var t=new Uint8Array(32);return A(t,r),1&t[0]}function E(r,t){var n;for(n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var e,o,i=0,h=0,a=0,f=0,s=0,c=0,u=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,_=0,A=0,d=0,U=0,E=0,x=0,M=0,m=0,B=0,S=0,K=0,T=0,Y=0,k=0,L=0,z=0,R=0,P=n[0],O=n[1],N=n[2],C=n[3],F=n[4],I=n[5],G=n[6],Z=n[7],j=n[8],q=n[9],V=n[10],X=n[11],D=n[12],H=n[13],J=n[14],Q=n[15];e=t[0],i+=e*P,h+=e*O,a+=e*N,f+=e*C,s+=e*F,c+=e*I,u+=e*G,y+=e*Z,l+=e*j,w+=e*q,p+=e*V,v+=e*X,b+=e*D,g+=e*H,_+=e*J,A+=e*Q,e=t[1],h+=e*P,a+=e*O,f+=e*N,s+=e*C,c+=e*F,u+=e*I,y+=e*G,l+=e*Z,w+=e*j,p+=e*q,v+=e*V,b+=e*X,g+=e*D,_+=e*H,A+=e*J,d+=e*Q,e=t[2],a+=e*P,f+=e*O,s+=e*N,c+=e*C,u+=e*F,y+=e*I,l+=e*G,w+=e*Z,p+=e*j,v+=e*q,b+=e*V,g+=e*X,_+=e*D,A+=e*H,d+=e*J,U+=e*Q,e=t[3],f+=e*P,s+=e*O,c+=e*N,u+=e*C,y+=e*F,l+=e*I,w+=e*G,p+=e*Z,v+=e*j,b+=e*q,g+=e*V,_+=e*X,A+=e*D,d+=e*H,U+=e*J,E+=e*Q,e=t[4],s+=e*P,c+=e*O,u+=e*N,y+=e*C,l+=e*F,w+=e*I,p+=e*G,v+=e*Z,b+=e*j,g+=e*q,_+=e*V,A+=e*X,d+=e*D,U+=e*H,E+=e*J,x+=e*Q,e=t[5],c+=e*P,u+=e*O,y+=e*N,l+=e*C,w+=e*F,p+=e*I,v+=e*G,b+=e*Z,g+=e*j,_+=e*q,A+=e*V,d+=e*X,U+=e*D,E+=e*H,x+=e*J,M+=e*Q,e=t[6],u+=e*P,y+=e*O,l+=e*N,w+=e*C,p+=e*F,v+=e*I,b+=e*G,g+=e*Z,_+=e*j,A+=e*q,d+=e*V,U+=e*X,E+=e*D,x+=e*H,M+=e*J,m+=e*Q,e=t[7],y+=e*P,l+=e*O,w+=e*N,p+=e*C,v+=e*F,b+=e*I,g+=e*G,_+=e*Z,A+=e*j,d+=e*q,U+=e*V,E+=e*X,x+=e*D,M+=e*H,m+=e*J,B+=e*Q,e=t[8],l+=e*P,w+=e*O,p+=e*N,v+=e*C,b+=e*F,g+=e*I,_+=e*G,A+=e*Z,d+=e*j,U+=e*q,E+=e*V,x+=e*X,M+=e*D,m+=e*H,B+=e*J,S+=e*Q,e=t[9],w+=e*P,p+=e*O,v+=e*N,b+=e*C,g+=e*F,_+=e*I,A+=e*G,d+=e*Z,U+=e*j,E+=e*q,x+=e*V,M+=e*X,m+=e*D,B+=e*H,S+=e*J,K+=e*Q,e=t[10],p+=e*P,v+=e*O,b+=e*N,g+=e*C,_+=e*F,A+=e*I,d+=e*G,U+=e*Z,E+=e*j,x+=e*q,M+=e*V,m+=e*X,B+=e*D,S+=e*H,K+=e*J,T+=e*Q,e=t[11],v+=e*P,b+=e*O,g+=e*N,_+=e*C,A+=e*F,d+=e*I,U+=e*G,E+=e*Z,x+=e*j,M+=e*q,m+=e*V,B+=e*X;S+=e*D;K+=e*H,T+=e*J,Y+=e*Q,e=t[12],b+=e*P,g+=e*O,_+=e*N,A+=e*C,d+=e*F,U+=e*I,E+=e*G,x+=e*Z,M+=e*j,m+=e*q,B+=e*V,S+=e*X,K+=e*D,T+=e*H,Y+=e*J,k+=e*Q,e=t[13],g+=e*P,_+=e*O,A+=e*N,d+=e*C,U+=e*F,E+=e*I,x+=e*G,M+=e*Z,m+=e*j,B+=e*q,S+=e*V,K+=e*X,T+=e*D,Y+=e*H,k+=e*J,L+=e*Q,e=t[14],_+=e*P,A+=e*O,d+=e*N,U+=e*C,E+=e*F,x+=e*I,M+=e*G,m+=e*Z,B+=e*j,S+=e*q,K+=e*V,T+=e*X,Y+=e*D,k+=e*H,L+=e*J,z+=e*Q,e=t[15],A+=e*P,d+=e*O,U+=e*N,E+=e*C,x+=e*F,M+=e*I,m+=e*G,B+=e*Z,S+=e*j,K+=e*q,T+=e*V,Y+=e*X,k+=e*D,L+=e*H,z+=e*J,R+=e*Q,i+=38*d,h+=38*U,a+=38*E,f+=38*x,s+=38*M,c+=38*m,u+=38*B,y+=38*S,l+=38*K,w+=38*T,p+=38*Y,v+=38*k,b+=38*L,g+=38*z,_+=38*R,o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),o=1,e=i+o+65535,o=Math.floor(e/65536),i=e-65536*o,e=h+o+65535,o=Math.floor(e/65536),h=e-65536*o,e=a+o+65535,o=Math.floor(e/65536),a=e-65536*o,e=f+o+65535,o=Math.floor(e/65536),f=e-65536*o,e=s+o+65535,o=Math.floor(e/65536),s=e-65536*o,e=c+o+65535,o=Math.floor(e/65536),c=e-65536*o,e=u+o+65535,o=Math.floor(e/65536),u=e-65536*o,e=y+o+65535,o=Math.floor(e/65536),y=e-65536*o,e=l+o+65535,o=Math.floor(e/65536),l=e-65536*o,e=w+o+65535,o=Math.floor(e/65536),w=e-65536*o,e=p+o+65535,o=Math.floor(e/65536),p=e-65536*o,e=v+o+65535,o=Math.floor(e/65536),v=e-65536*o,e=b+o+65535,o=Math.floor(e/65536),b=e-65536*o,e=g+o+65535,o=Math.floor(e/65536),g=e-65536*o,e=_+o+65535,o=Math.floor(e/65536),_=e-65536*o,e=A+o+65535,o=Math.floor(e/65536),A=e-65536*o,i+=o-1+37*(o-1),r[0]=i,r[1]=h,r[2]=a,r[3]=f,r[4]=s,r[5]=c,r[6]=u,r[7]=y,r[8]=l,r[9]=w,r[10]=p,r[11]=v,r[12]=b,r[13]=g;r[14]=_;r[15]=A}function B(r,t){m(r,t,t)}function S(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=253;n>=0;n--)B(e,e),2!==n&&4!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function K(r,t){var n,e=$();for(n=0;n<16;n++)e[n]=t[n];for(n=250;n>=0;n--)B(e,e),1!==n&&m(e,e,t);for(n=0;n<16;n++)r[n]=e[n]}function T(r,t,n){var e,o,i=new Uint8Array(32),h=new Float64Array(80),a=$(),f=$(),s=$(),c=$(),u=$(),y=$();for(o=0;o<31;o++)i[o]=t[o];for(i[31]=127&t[31]|64,i[0]&=248,E(h,n),o=0;o<16;o++)f[o]=h[o],c[o]=a[o]=s[o]=0;for(a[0]=c[0]=1,o=254;o>=0;--o)e=i[o>>>3]>>>(7&o)&1,_(a,f,e),_(s,c,e),x(u,a,s),M(a,a,s),x(s,f,c),M(f,f,c),B(c,u),B(y,a),m(a,s,a),m(s,f,u),x(u,a,s),M(a,a,s),B(f,a),M(s,c,y),m(a,s,ir),x(a,a,c),m(s,s,a),m(a,c,y),m(c,f,h),B(f,u),_(a,f,e),_(s,c,e);for(o=0;o<16;o++)h[o+16]=a[o],h[o+32]=s[o],h[o+48]=f[o],h[o+64]=c[o];var l=h.subarray(32),w=h.subarray(16);return S(l,l),m(w,w,l),A(r,w),0}function Y(r,t){return T(r,t,nr)}function k(r,t){return rr(t,32),Y(r,t)}function L(r,t,n){var e=new Uint8Array(32);return T(e,n,t),f(r,tr,e,ur)}function z(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),lr(r,t,n,e,h)}function R(r,t,n,e,o,i){var h=new Uint8Array(32);return L(h,o,i),wr(r,t,n,e,h)}function P(r,t,n,e){for(var o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U,E,x,M,m,B,S,K,T=new Int32Array(16),Y=new Int32Array(16),k=r[0],L=r[1],z=r[2],R=r[3],P=r[4],O=r[5],N=r[6],C=r[7],F=t[0],I=t[1],G=t[2],Z=t[3],j=t[4],q=t[5],V=t[6],X=t[7],D=0;e>=128;){for(U=0;U<16;U++)E=8*U+D,T[U]=n[E+0]<<24|n[E+1]<<16|n[E+2]<<8|n[E+3],Y[U]=n[E+4]<<24|n[E+5]<<16|n[E+6]<<8|n[E+7];for(U=0;U<80;U++)if(o=k,i=L,h=z,a=R,f=P,s=O,c=N,u=C,y=F,l=I,w=G,p=Z,v=j,b=q,g=V,_=X,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(P>>>14|j<<18)^(P>>>18|j<<14)^(j>>>9|P<<23),M=(j>>>14|P<<18)^(j>>>18|P<<14)^(P>>>9|j<<23),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=P&O^~P&N,M=j&q^~j&V,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=pr[2*U],M=pr[2*U+1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=T[U%16],M=Y[U%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,A=65535&S|K<<16,d=65535&m|B<<16,x=A,M=d,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=(k>>>28|F<<4)^(F>>>2|k<<30)^(F>>>7|k<<25),M=(F>>>28|k<<4)^(k>>>2|F<<30)^(k>>>7|F<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,x=k&L^k&z^L&z,M=F&I^F&G^I&G,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,u=65535&S|K<<16,_=65535&m|B<<16,x=a,M=p,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=A,M=d,m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,a=65535&S|K<<16,p=65535&m|B<<16,L=o,z=i,R=h,P=a,O=f,N=s,C=c,k=u,I=y,G=l,Z=w,j=p,q=v,V=b,X=g,F=_,U%16===15)for(E=0;E<16;E++)x=T[E],M=Y[E],m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=T[(E+9)%16],M=Y[(E+9)%16],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+1)%16],d=Y[(E+1)%16],x=(A>>>1|d<<31)^(A>>>8|d<<24)^A>>>7,M=(d>>>1|A<<31)^(d>>>8|A<<24)^(d>>>7|A<<25),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,A=T[(E+14)%16],d=Y[(E+14)%16],x=(A>>>19|d<<13)^(d>>>29|A<<3)^A>>>6,M=(d>>>19|A<<13)^(A>>>29|d<<3)^(d>>>6|A<<26),m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,T[E]=65535&S|K<<16,Y[E]=65535&m|B<<16;x=k,M=F,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[0],M=t[0],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[0]=k=65535&S|K<<16,t[0]=F=65535&m|B<<16,x=L,M=I,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[1],M=t[1],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[1]=L=65535&S|K<<16,t[1]=I=65535&m|B<<16,x=z,M=G,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[2],M=t[2],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[2]=z=65535&S|K<<16,t[2]=G=65535&m|B<<16,x=R,M=Z,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[3],M=t[3],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[3]=R=65535&S|K<<16,t[3]=Z=65535&m|B<<16,x=P,M=j,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[4],M=t[4],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[4]=P=65535&S|K<<16,t[4]=j=65535&m|B<<16,x=O,M=q,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[5],M=t[5],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[5]=O=65535&S|K<<16,t[5]=q=65535&m|B<<16,x=N,M=V,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[6],M=t[6],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[6]=N=65535&S|K<<16,t[6]=V=65535&m|B<<16,x=C,M=X,m=65535&M,B=M>>>16,S=65535&x,K=x>>>16,x=r[7],M=t[7],m+=65535&M,B+=M>>>16,S+=65535&x,K+=x>>>16,B+=m>>>16,S+=B>>>16,K+=S>>>16,r[7]=C=65535&S|K<<16,t[7]=X=65535&m|B<<16,D+=128,e-=128}return e}function O(r,n,e){var o,i=new Int32Array(8),h=new Int32Array(8),a=new Uint8Array(256),f=e;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,h[0]=4089235720,h[1]=2227873595,h[2]=4271175723,h[3]=1595750129,h[4]=2917565137,h[5]=725511199,h[6]=4215389547,h[7]=327033209,P(i,h,n,e),e%=128,o=0;o=0;--o)e=n[o/8|0]>>(7&o)&1,C(r,t,e),N(t,r),N(r,r),C(r,t,e)}function G(r,t){var n=[$(),$(),$(),$()];b(n[0],fr),b(n[1],sr),b(n[2],or),m(n[3],fr,sr),I(r,n,t)}function Z(r,t,n){var e,o=new Uint8Array(64),i=[$(),$(),$(),$()];for(n||rr(t,32),O(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,G(i,o),F(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}function j(r,t){var n,e,o,i;for(e=63;e>=32;--e){for(n=0,o=e-32,i=e-12;o>8,t[o]-=256*n;t[o]+=n,t[e]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*vr[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*vr[o];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,r[e]=255&t[e]}function q(r){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=r[t];for(t=0;t<64;t++)r[t]=0;j(r,n)}function V(r,t,n,e){var o,i,h=new Uint8Array(64),a=new Uint8Array(64),f=new Uint8Array(64),s=new Float64Array(64),c=[$(),$(),$(),$()];O(h,e,32),h[0]&=248,h[31]&=127,h[31]|=64;var u=n+64;for(o=0;o>7&&M(r[0],er,r[0]),m(r[3],r[0],r[1]),0)}function D(r,t,n,e){var i,h,a=new Uint8Array(32),f=new Uint8Array(64),s=[$(),$(),$(),$()],c=[$(),$(),$(),$()];if(h=-1,n<64)return-1;if(X(c,e))return-1;for(i=0;i>>13|n<<3),e=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|e<<6),o=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(e>>>7|o<<9),i=255&r[8]|(255&r[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,h=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(i>>>14|h<<2),a=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(h>>>11|a<<5),f=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(a>>>8|f<<8),this.r[9]=f>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};yr.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,c,u,y,l,w,p,v,b,g,_,A,d,U=this.fin?0:2048,E=this.h[0],x=this.h[1],M=this.h[2],m=this.h[3],B=this.h[4],S=this.h[5],K=this.h[6],T=this.h[7],Y=this.h[8],k=this.h[9],L=this.r[0],z=this.r[1],R=this.r[2],P=this.r[3],O=this.r[4],N=this.r[5],C=this.r[6],F=this.r[7],I=this.r[8],G=this.r[9];n>=16;)e=255&r[t+0]|(255&r[t+1])<<8,E+=8191&e,o=255&r[t+2]|(255&r[t+3])<<8,x+=8191&(e>>>13|o<<3),i=255&r[t+4]|(255&r[t+5])<<8,M+=8191&(o>>>10|i<<6),h=255&r[t+6]|(255&r[t+7])<<8,m+=8191&(i>>>7|h<<9),a=255&r[t+8]|(255&r[t+9])<<8,B+=8191&(h>>>4|a<<12),S+=a>>>1&8191,f=255&r[t+10]|(255&r[t+11])<<8,K+=8191&(a>>>14|f<<2),s=255&r[t+12]|(255&r[t+13])<<8,T+=8191&(f>>>11|s<<5),c=255&r[t+14]|(255&r[t+15])<<8,Y+=8191&(s>>>8|c<<8),k+=c>>>5|U,u=0,y=u,y+=E*L,y+=x*(5*G),y+=M*(5*I),y+=m*(5*F),y+=B*(5*C),u=y>>>13,y&=8191,y+=S*(5*N),y+=K*(5*O),y+=T*(5*P),y+=Y*(5*R),y+=k*(5*z),u+=y>>>13,y&=8191,l=u,l+=E*z,l+=x*L,l+=M*(5*G),l+=m*(5*I),l+=B*(5*F),u=l>>>13,l&=8191,l+=S*(5*C),l+=K*(5*N),l+=T*(5*O),l+=Y*(5*P),l+=k*(5*R),u+=l>>>13,l&=8191,w=u,w+=E*R,w+=x*z,w+=M*L,w+=m*(5*G),w+=B*(5*I),u=w>>>13,w&=8191,w+=S*(5*F),w+=K*(5*C),w+=T*(5*N),w+=Y*(5*O),w+=k*(5*P),u+=w>>>13,w&=8191,p=u,p+=E*P,p+=x*R,p+=M*z,p+=m*L,p+=B*(5*G),u=p>>>13,p&=8191,p+=S*(5*I),p+=K*(5*F),p+=T*(5*C),p+=Y*(5*N),p+=k*(5*O),u+=p>>>13,p&=8191,v=u,v+=E*O,v+=x*P,v+=M*R,v+=m*z,v+=B*L,u=v>>>13,v&=8191,v+=S*(5*G),v+=K*(5*I),v+=T*(5*F),v+=Y*(5*C),v+=k*(5*N),u+=v>>>13,v&=8191,b=u,b+=E*N,b+=x*O,b+=M*P,b+=m*R,b+=B*z,u=b>>>13,b&=8191,b+=S*L,b+=K*(5*G),b+=T*(5*I),b+=Y*(5*F),b+=k*(5*C),u+=b>>>13,b&=8191,g=u,g+=E*C,g+=x*N,g+=M*O,g+=m*P,g+=B*R,u=g>>>13,g&=8191,g+=S*z,g+=K*L,g+=T*(5*G),g+=Y*(5*I),g+=k*(5*F),u+=g>>>13,g&=8191,_=u,_+=E*F,_+=x*C,_+=M*N,_+=m*O,_+=B*P,u=_>>>13,_&=8191,_+=S*R,_+=K*z,_+=T*L,_+=Y*(5*G),_+=k*(5*I),u+=_>>>13,_&=8191,A=u,A+=E*I,A+=x*F,A+=M*C,A+=m*N,A+=B*O,u=A>>>13,A&=8191,A+=S*P,A+=K*R,A+=T*z,A+=Y*L,A+=k*(5*G),u+=A>>>13,A&=8191,d=u,d+=E*G,d+=x*I,d+=M*F,d+=m*C,d+=B*N,u=d>>>13,d&=8191,d+=S*O,d+=K*P,d+=T*R,d+=Y*z,d+=k*L,u+=d>>>13,d&=8191,u=(u<<2)+u|0,u=u+y|0,y=8191&u,u>>>=13,l+=u,E=y,x=l,M=w,m=p,B=v,S=b,K=g,T=_,Y=A,k=d,t+=16,n-=16;this.h[0]=E,this.h[1]=x,this.h[2]=M,this.h[3]=m,this.h[4]=B,this.h[5]=S,this.h[6]=K,this.h[7]=T,this.h[8]=Y,this.h[9]=k},yr.prototype.finish=function(r,t){var n,e,o,i,h=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},yr.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(o=16-this.leftover,o>n&&(o=n),e=0;e=16&&(o=n-n%16,this.blocks(r,t,o),t+=o,n-=o),n){for(e=0;e=0},r.sign.keyPair=function(){var r=new Uint8Array(Tr),t=new Uint8Array(Yr);return Z(r,t),{publicKey:r,secretKey:t}},r.sign.keyPair.fromSecretKey=function(r){if(Q(r),r.length!==Yr)throw new Error("bad secret key size");for(var t=new Uint8Array(Tr),n=0;n void): void; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.js new file mode 100644 index 0000000..f72dd78 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.js @@ -0,0 +1,1175 @@ +(function(nacl) { +'use strict'; + +// Ported in 2014 by Dmitry Chestnykh and Devi Mandiri. +// Public domain. +// +// Implementation derived from TweetNaCl version 20140427. +// See for details: http://tweetnacl.cr.yp.to/ + +var u64 = function(h, l) { this.hi = h|0 >>> 0; this.lo = l|0 >>> 0; }; +var gf = function(init) { + var i, r = new Float64Array(16); + if (init) for (i = 0; i < init.length; i++) r[i] = init[i]; + return r; +}; + +// Pluggable, initialized in high-level API below. +var randombytes = function(/* x, n */) { throw new Error('no PRNG'); }; + +var _0 = new Uint8Array(16); +var _9 = new Uint8Array(32); _9[0] = 9; + +var gf0 = gf(), + gf1 = gf([1]), + _121665 = gf([0xdb41, 1]), + D = gf([0x78a3, 0x1359, 0x4dca, 0x75eb, 0xd8ab, 0x4141, 0x0a4d, 0x0070, 0xe898, 0x7779, 0x4079, 0x8cc7, 0xfe73, 0x2b6f, 0x6cee, 0x5203]), + D2 = gf([0xf159, 0x26b2, 0x9b94, 0xebd6, 0xb156, 0x8283, 0x149a, 0x00e0, 0xd130, 0xeef3, 0x80f2, 0x198e, 0xfce7, 0x56df, 0xd9dc, 0x2406]), + X = gf([0xd51a, 0x8f25, 0x2d60, 0xc956, 0xa7b2, 0x9525, 0xc760, 0x692c, 0xdc5c, 0xfdd6, 0xe231, 0xc0a4, 0x53fe, 0xcd6e, 0x36d3, 0x2169]), + Y = gf([0x6658, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666, 0x6666]), + I = gf([0xa0b0, 0x4a0e, 0x1b27, 0xc4ee, 0xe478, 0xad2f, 0x1806, 0x2f43, 0xd7a7, 0x3dfb, 0x0099, 0x2b4d, 0xdf0b, 0x4fc1, 0x2480, 0x2b83]); + +function L32(x, c) { return (x << c) | (x >>> (32 - c)); } + +function ld32(x, i) { + var u = x[i+3] & 0xff; + u = (u<<8)|(x[i+2] & 0xff); + u = (u<<8)|(x[i+1] & 0xff); + return (u<<8)|(x[i+0] & 0xff); +} + +function dl64(x, i) { + var h = (x[i] << 24) | (x[i+1] << 16) | (x[i+2] << 8) | x[i+3]; + var l = (x[i+4] << 24) | (x[i+5] << 16) | (x[i+6] << 8) | x[i+7]; + return new u64(h, l); +} + +function st32(x, j, u) { + var i; + for (i = 0; i < 4; i++) { x[j+i] = u & 255; u >>>= 8; } +} + +function ts64(x, i, u) { + x[i] = (u.hi >> 24) & 0xff; + x[i+1] = (u.hi >> 16) & 0xff; + x[i+2] = (u.hi >> 8) & 0xff; + x[i+3] = u.hi & 0xff; + x[i+4] = (u.lo >> 24) & 0xff; + x[i+5] = (u.lo >> 16) & 0xff; + x[i+6] = (u.lo >> 8) & 0xff; + x[i+7] = u.lo & 0xff; +} + +function vn(x, xi, y, yi, n) { + var i,d = 0; + for (i = 0; i < n; i++) d |= x[xi+i]^y[yi+i]; + return (1 & ((d - 1) >>> 8)) - 1; +} + +function crypto_verify_16(x, xi, y, yi) { + return vn(x,xi,y,yi,16); +} + +function crypto_verify_32(x, xi, y, yi) { + return vn(x,xi,y,yi,32); +} + +function core(out,inp,k,c,h) { + var w = new Uint32Array(16), x = new Uint32Array(16), + y = new Uint32Array(16), t = new Uint32Array(4); + var i, j, m; + + for (i = 0; i < 4; i++) { + x[5*i] = ld32(c, 4*i); + x[1+i] = ld32(k, 4*i); + x[6+i] = ld32(inp, 4*i); + x[11+i] = ld32(k, 16+4*i); + } + + for (i = 0; i < 16; i++) y[i] = x[i]; + + for (i = 0; i < 20; i++) { + for (j = 0; j < 4; j++) { + for (m = 0; m < 4; m++) t[m] = x[(5*j+4*m)%16]; + t[1] ^= L32((t[0]+t[3])|0, 7); + t[2] ^= L32((t[1]+t[0])|0, 9); + t[3] ^= L32((t[2]+t[1])|0,13); + t[0] ^= L32((t[3]+t[2])|0,18); + for (m = 0; m < 4; m++) w[4*j+(j+m)%4] = t[m]; + } + for (m = 0; m < 16; m++) x[m] = w[m]; + } + + if (h) { + for (i = 0; i < 16; i++) x[i] = (x[i] + y[i]) | 0; + for (i = 0; i < 4; i++) { + x[5*i] = (x[5*i] - ld32(c, 4*i)) | 0; + x[6+i] = (x[6+i] - ld32(inp, 4*i)) | 0; + } + for (i = 0; i < 4; i++) { + st32(out,4*i,x[5*i]); + st32(out,16+4*i,x[6+i]); + } + } else { + for (i = 0; i < 16; i++) st32(out, 4 * i, (x[i] + y[i]) | 0); + } +} + +function crypto_core_salsa20(out,inp,k,c) { + core(out,inp,k,c,false); + return 0; +} + +function crypto_core_hsalsa20(out,inp,k,c) { + core(out,inp,k,c,true); + return 0; +} + +var sigma = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]); + // "expand 32-byte k" + +function crypto_stream_salsa20_xor(c,cpos,m,mpos,b,n,k) { + var z = new Uint8Array(16), x = new Uint8Array(64); + var u, i; + if (!b) return 0; + for (i = 0; i < 16; i++) z[i] = 0; + for (i = 0; i < 8; i++) z[i] = n[i]; + while (b >= 64) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < 64; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + u = 1; + for (i = 8; i < 16; i++) { + u = u + (z[i] & 0xff) | 0; + z[i] = u & 0xff; + u >>>= 8; + } + b -= 64; + cpos += 64; + if (m) mpos += 64; + } + if (b > 0) { + crypto_core_salsa20(x,z,k,sigma); + for (i = 0; i < b; i++) c[cpos+i] = (m?m[mpos+i]:0) ^ x[i]; + } + return 0; +} + +function crypto_stream_salsa20(c,cpos,d,n,k) { + return crypto_stream_salsa20_xor(c,cpos,null,0,d,n,k); +} + +function crypto_stream(c,cpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20(c,cpos,d,n.subarray(16),s); +} + +function crypto_stream_xor(c,cpos,m,mpos,d,n,k) { + var s = new Uint8Array(32); + crypto_core_hsalsa20(s,n,k,sigma); + return crypto_stream_salsa20_xor(c,cpos,m,mpos,d,n.subarray(16),s); +} + +function add1305(h, c) { + var j, u = 0; + for (j = 0; j < 17; j++) { + u = (u + ((h[j] + c[j]) | 0)) | 0; + h[j] = u & 255; + u >>>= 8; + } +} + +var minusp = new Uint32Array([ + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252 +]); + +function crypto_onetimeauth(out, outpos, m, mpos, n, k) { + var s, i, j, u; + var x = new Uint32Array(17), r = new Uint32Array(17), + h = new Uint32Array(17), c = new Uint32Array(17), + g = new Uint32Array(17); + for (j = 0; j < 17; j++) r[j]=h[j]=0; + for (j = 0; j < 16; j++) r[j]=k[j]; + r[3]&=15; + r[4]&=252; + r[7]&=15; + r[8]&=252; + r[11]&=15; + r[12]&=252; + r[15]&=15; + + while (n > 0) { + for (j = 0; j < 17; j++) c[j] = 0; + for (j = 0; (j < 16) && (j < n); ++j) c[j] = m[mpos+j]; + c[j] = 1; + mpos += j; n -= j; + add1305(h,c); + for (i = 0; i < 17; i++) { + x[i] = 0; + for (j = 0; j < 17; j++) x[i] = (x[i] + (h[j] * ((j <= i) ? r[i - j] : ((320 * r[i + 17 - j])|0))) | 0) | 0; + } + for (i = 0; i < 17; i++) h[i] = x[i]; + u = 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u & 3; + u = (5 * (u >>> 2)) | 0; + for (j = 0; j < 16; j++) { + u = (u + h[j]) | 0; + h[j] = u & 255; + u >>>= 8; + } + u = (u + h[16]) | 0; h[16] = u; + } + + for (j = 0; j < 17; j++) g[j] = h[j]; + add1305(h,minusp); + s = (-(h[16] >>> 7) | 0); + for (j = 0; j < 17; j++) h[j] ^= s & (g[j] ^ h[j]); + + for (j = 0; j < 16; j++) c[j] = k[j + 16]; + c[16] = 0; + add1305(h,c); + for (j = 0; j < 16; j++) out[outpos+j] = h[j]; + return 0; +} + +function crypto_onetimeauth_verify(h, hpos, m, mpos, n, k) { + var x = new Uint8Array(16); + crypto_onetimeauth(x,0,m,mpos,n,k); + return crypto_verify_16(h,hpos,x,0); +} + +function crypto_secretbox(c,m,d,n,k) { + var i; + if (d < 32) return -1; + crypto_stream_xor(c,0,m,0,d,n,k); + crypto_onetimeauth(c, 16, c, 32, d - 32, c); + for (i = 0; i < 16; i++) c[i] = 0; + return 0; +} + +function crypto_secretbox_open(m,c,d,n,k) { + var i; + var x = new Uint8Array(32); + if (d < 32) return -1; + crypto_stream(x,0,32,n,k); + if (crypto_onetimeauth_verify(c, 16,c, 32,d - 32,x) !== 0) return -1; + crypto_stream_xor(m,0,c,0,d,n,k); + for (i = 0; i < 32; i++) m[i] = 0; + return 0; +} + +function set25519(r, a) { + var i; + for (i = 0; i < 16; i++) r[i] = a[i]|0; +} + +function car25519(o) { + var c; + var i; + for (i = 0; i < 16; i++) { + o[i] += 65536; + c = Math.floor(o[i] / 65536); + o[(i+1)*(i<15?1:0)] += c - 1 + 37 * (c-1) * (i===15?1:0); + o[i] -= (c * 65536); + } +} + +function sel25519(p, q, b) { + var t, c = ~(b-1); + for (var i = 0; i < 16; i++) { + t = c & (p[i] ^ q[i]); + p[i] ^= t; + q[i] ^= t; + } +} + +function pack25519(o, n) { + var i, j, b; + var m = gf(), t = gf(); + for (i = 0; i < 16; i++) t[i] = n[i]; + car25519(t); + car25519(t); + car25519(t); + for (j = 0; j < 2; j++) { + m[0] = t[0] - 0xffed; + for (i = 1; i < 15; i++) { + m[i] = t[i] - 0xffff - ((m[i-1]>>16) & 1); + m[i-1] &= 0xffff; + } + m[15] = t[15] - 0x7fff - ((m[14]>>16) & 1); + b = (m[15]>>16) & 1; + m[14] &= 0xffff; + sel25519(t, m, 1-b); + } + for (i = 0; i < 16; i++) { + o[2*i] = t[i] & 0xff; + o[2*i+1] = t[i]>>8; + } +} + +function neq25519(a, b) { + var c = new Uint8Array(32), d = new Uint8Array(32); + pack25519(c, a); + pack25519(d, b); + return crypto_verify_32(c, 0, d, 0); +} + +function par25519(a) { + var d = new Uint8Array(32); + pack25519(d, a); + return d[0] & 1; +} + +function unpack25519(o, n) { + var i; + for (i = 0; i < 16; i++) o[i] = n[2*i] + (n[2*i+1] << 8); + o[15] &= 0x7fff; +} + +function A(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] + b[i])|0; +} + +function Z(o, a, b) { + var i; + for (i = 0; i < 16; i++) o[i] = (a[i] - b[i])|0; +} + +function M(o, a, b) { + var i, j, t = new Float64Array(31); + for (i = 0; i < 31; i++) t[i] = 0; + for (i = 0; i < 16; i++) { + for (j = 0; j < 16; j++) { + t[i+j] += a[i] * b[j]; + } + } + for (i = 0; i < 15; i++) { + t[i] += 38 * t[i+16]; + } + for (i = 0; i < 16; i++) o[i] = t[i]; + car25519(o); + car25519(o); +} + +function S(o, a) { + M(o, a, a); +} + +function inv25519(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 253; a >= 0; a--) { + S(c, c); + if(a !== 2 && a !== 4) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function pow2523(o, i) { + var c = gf(); + var a; + for (a = 0; a < 16; a++) c[a] = i[a]; + for (a = 250; a >= 0; a--) { + S(c, c); + if(a !== 1) M(c, c, i); + } + for (a = 0; a < 16; a++) o[a] = c[a]; +} + +function crypto_scalarmult(q, n, p) { + var z = new Uint8Array(32); + var x = new Float64Array(80), r, i; + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(); + for (i = 0; i < 31; i++) z[i] = n[i]; + z[31]=(n[31]&127)|64; + z[0]&=248; + unpack25519(x,p); + for (i = 0; i < 16; i++) { + b[i]=x[i]; + d[i]=a[i]=c[i]=0; + } + a[0]=d[0]=1; + for (i=254; i>=0; --i) { + r=(z[i>>>3]>>>(i&7))&1; + sel25519(a,b,r); + sel25519(c,d,r); + A(e,a,c); + Z(a,a,c); + A(c,b,d); + Z(b,b,d); + S(d,e); + S(f,a); + M(a,c,a); + M(c,b,e); + A(e,a,c); + Z(a,a,c); + S(b,a); + Z(c,d,f); + M(a,c,_121665); + A(a,a,d); + M(c,c,a); + M(a,d,f); + M(d,b,x); + S(b,e); + sel25519(a,b,r); + sel25519(c,d,r); + } + for (i = 0; i < 16; i++) { + x[i+16]=a[i]; + x[i+32]=c[i]; + x[i+48]=b[i]; + x[i+64]=d[i]; + } + var x32 = x.subarray(32); + var x16 = x.subarray(16); + inv25519(x32,x32); + M(x16,x16,x32); + pack25519(q,x16); + return 0; +} + +function crypto_scalarmult_base(q, n) { + return crypto_scalarmult(q, n, _9); +} + +function crypto_box_keypair(y, x) { + randombytes(x, 32); + return crypto_scalarmult_base(y, x); +} + +function crypto_box_beforenm(k, y, x) { + var s = new Uint8Array(32); + crypto_scalarmult(s, x, y); + return crypto_core_hsalsa20(k, _0, s, sigma); +} + +var crypto_box_afternm = crypto_secretbox; +var crypto_box_open_afternm = crypto_secretbox_open; + +function crypto_box(c, m, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_afternm(c, m, d, n, k); +} + +function crypto_box_open(m, c, d, n, y, x) { + var k = new Uint8Array(32); + crypto_box_beforenm(k, y, x); + return crypto_box_open_afternm(m, c, d, n, k); +} + +function add64() { + var a = 0, b = 0, c = 0, d = 0, m16 = 65535, l, h, i; + for (i = 0; i < arguments.length; i++) { + l = arguments[i].lo; + h = arguments[i].hi; + a += (l & m16); b += (l >>> 16); + c += (h & m16); d += (h >>> 16); + } + + b += (a >>> 16); + c += (b >>> 16); + d += (c >>> 16); + + return new u64((c & m16) | (d << 16), (a & m16) | (b << 16)); +} + +function shr64(x, c) { + return new u64((x.hi >>> c), (x.lo >>> c) | (x.hi << (32 - c))); +} + +function xor64() { + var l = 0, h = 0, i; + for (i = 0; i < arguments.length; i++) { + l ^= arguments[i].lo; + h ^= arguments[i].hi; + } + return new u64(h, l); +} + +function R(x, c) { + var h, l, c1 = 32 - c; + if (c < 32) { + h = (x.hi >>> c) | (x.lo << c1); + l = (x.lo >>> c) | (x.hi << c1); + } else if (c < 64) { + h = (x.lo >>> c) | (x.hi << c1); + l = (x.hi >>> c) | (x.lo << c1); + } + return new u64(h, l); +} + +function Ch(x, y, z) { + var h = (x.hi & y.hi) ^ (~x.hi & z.hi), + l = (x.lo & y.lo) ^ (~x.lo & z.lo); + return new u64(h, l); +} + +function Maj(x, y, z) { + var h = (x.hi & y.hi) ^ (x.hi & z.hi) ^ (y.hi & z.hi), + l = (x.lo & y.lo) ^ (x.lo & z.lo) ^ (y.lo & z.lo); + return new u64(h, l); +} + +function Sigma0(x) { return xor64(R(x,28), R(x,34), R(x,39)); } +function Sigma1(x) { return xor64(R(x,14), R(x,18), R(x,41)); } +function sigma0(x) { return xor64(R(x, 1), R(x, 8), shr64(x,7)); } +function sigma1(x) { return xor64(R(x,19), R(x,61), shr64(x,6)); } + +var K = [ + new u64(0x428a2f98, 0xd728ae22), new u64(0x71374491, 0x23ef65cd), + new u64(0xb5c0fbcf, 0xec4d3b2f), new u64(0xe9b5dba5, 0x8189dbbc), + new u64(0x3956c25b, 0xf348b538), new u64(0x59f111f1, 0xb605d019), + new u64(0x923f82a4, 0xaf194f9b), new u64(0xab1c5ed5, 0xda6d8118), + new u64(0xd807aa98, 0xa3030242), new u64(0x12835b01, 0x45706fbe), + new u64(0x243185be, 0x4ee4b28c), new u64(0x550c7dc3, 0xd5ffb4e2), + new u64(0x72be5d74, 0xf27b896f), new u64(0x80deb1fe, 0x3b1696b1), + new u64(0x9bdc06a7, 0x25c71235), new u64(0xc19bf174, 0xcf692694), + new u64(0xe49b69c1, 0x9ef14ad2), new u64(0xefbe4786, 0x384f25e3), + new u64(0x0fc19dc6, 0x8b8cd5b5), new u64(0x240ca1cc, 0x77ac9c65), + new u64(0x2de92c6f, 0x592b0275), new u64(0x4a7484aa, 0x6ea6e483), + new u64(0x5cb0a9dc, 0xbd41fbd4), new u64(0x76f988da, 0x831153b5), + new u64(0x983e5152, 0xee66dfab), new u64(0xa831c66d, 0x2db43210), + new u64(0xb00327c8, 0x98fb213f), new u64(0xbf597fc7, 0xbeef0ee4), + new u64(0xc6e00bf3, 0x3da88fc2), new u64(0xd5a79147, 0x930aa725), + new u64(0x06ca6351, 0xe003826f), new u64(0x14292967, 0x0a0e6e70), + new u64(0x27b70a85, 0x46d22ffc), new u64(0x2e1b2138, 0x5c26c926), + new u64(0x4d2c6dfc, 0x5ac42aed), new u64(0x53380d13, 0x9d95b3df), + new u64(0x650a7354, 0x8baf63de), new u64(0x766a0abb, 0x3c77b2a8), + new u64(0x81c2c92e, 0x47edaee6), new u64(0x92722c85, 0x1482353b), + new u64(0xa2bfe8a1, 0x4cf10364), new u64(0xa81a664b, 0xbc423001), + new u64(0xc24b8b70, 0xd0f89791), new u64(0xc76c51a3, 0x0654be30), + new u64(0xd192e819, 0xd6ef5218), new u64(0xd6990624, 0x5565a910), + new u64(0xf40e3585, 0x5771202a), new u64(0x106aa070, 0x32bbd1b8), + new u64(0x19a4c116, 0xb8d2d0c8), new u64(0x1e376c08, 0x5141ab53), + new u64(0x2748774c, 0xdf8eeb99), new u64(0x34b0bcb5, 0xe19b48a8), + new u64(0x391c0cb3, 0xc5c95a63), new u64(0x4ed8aa4a, 0xe3418acb), + new u64(0x5b9cca4f, 0x7763e373), new u64(0x682e6ff3, 0xd6b2b8a3), + new u64(0x748f82ee, 0x5defb2fc), new u64(0x78a5636f, 0x43172f60), + new u64(0x84c87814, 0xa1f0ab72), new u64(0x8cc70208, 0x1a6439ec), + new u64(0x90befffa, 0x23631e28), new u64(0xa4506ceb, 0xde82bde9), + new u64(0xbef9a3f7, 0xb2c67915), new u64(0xc67178f2, 0xe372532b), + new u64(0xca273ece, 0xea26619c), new u64(0xd186b8c7, 0x21c0c207), + new u64(0xeada7dd6, 0xcde0eb1e), new u64(0xf57d4f7f, 0xee6ed178), + new u64(0x06f067aa, 0x72176fba), new u64(0x0a637dc5, 0xa2c898a6), + new u64(0x113f9804, 0xbef90dae), new u64(0x1b710b35, 0x131c471b), + new u64(0x28db77f5, 0x23047d84), new u64(0x32caab7b, 0x40c72493), + new u64(0x3c9ebe0a, 0x15c9bebc), new u64(0x431d67c4, 0x9c100d4c), + new u64(0x4cc5d4be, 0xcb3e42b6), new u64(0x597f299c, 0xfc657e2a), + new u64(0x5fcb6fab, 0x3ad6faec), new u64(0x6c44198c, 0x4a475817) +]; + +function crypto_hashblocks(x, m, n) { + var z = [], b = [], a = [], w = [], t, i, j; + + for (i = 0; i < 8; i++) z[i] = a[i] = dl64(x, 8*i); + + var pos = 0; + while (n >= 128) { + for (i = 0; i < 16; i++) w[i] = dl64(m, 8*i+pos); + for (i = 0; i < 80; i++) { + for (j = 0; j < 8; j++) b[j] = a[j]; + t = add64(a[7], Sigma1(a[4]), Ch(a[4], a[5], a[6]), K[i], w[i%16]); + b[7] = add64(t, Sigma0(a[0]), Maj(a[0], a[1], a[2])); + b[3] = add64(b[3], t); + for (j = 0; j < 8; j++) a[(j+1)%8] = b[j]; + if (i%16 === 15) { + for (j = 0; j < 16; j++) { + w[j] = add64(w[j], w[(j+9)%16], sigma0(w[(j+1)%16]), sigma1(w[(j+14)%16])); + } + } + } + + for (i = 0; i < 8; i++) { + a[i] = add64(a[i], z[i]); + z[i] = a[i]; + } + + pos += 128; + n -= 128; + } + + for (i = 0; i < 8; i++) ts64(x, 8*i, z[i]); + return n; +} + +var iv = new Uint8Array([ + 0x6a,0x09,0xe6,0x67,0xf3,0xbc,0xc9,0x08, + 0xbb,0x67,0xae,0x85,0x84,0xca,0xa7,0x3b, + 0x3c,0x6e,0xf3,0x72,0xfe,0x94,0xf8,0x2b, + 0xa5,0x4f,0xf5,0x3a,0x5f,0x1d,0x36,0xf1, + 0x51,0x0e,0x52,0x7f,0xad,0xe6,0x82,0xd1, + 0x9b,0x05,0x68,0x8c,0x2b,0x3e,0x6c,0x1f, + 0x1f,0x83,0xd9,0xab,0xfb,0x41,0xbd,0x6b, + 0x5b,0xe0,0xcd,0x19,0x13,0x7e,0x21,0x79 +]); + +function crypto_hash(out, m, n) { + var h = new Uint8Array(64), x = new Uint8Array(256); + var i, b = n; + + for (i = 0; i < 64; i++) h[i] = iv[i]; + + crypto_hashblocks(h, m, n); + n %= 128; + + for (i = 0; i < 256; i++) x[i] = 0; + for (i = 0; i < n; i++) x[i] = m[b-n+i]; + x[n] = 128; + + n = 256-128*(n<112?1:0); + x[n-9] = 0; + ts64(x, n-8, new u64((b / 0x20000000) | 0, b << 3)); + crypto_hashblocks(h, x, n); + + for (i = 0; i < 64; i++) out[i] = h[i]; + + return 0; +} + +function add(p, q) { + var a = gf(), b = gf(), c = gf(), + d = gf(), e = gf(), f = gf(), + g = gf(), h = gf(), t = gf(); + + Z(a, p[1], p[0]); + Z(t, q[1], q[0]); + M(a, a, t); + A(b, p[0], p[1]); + A(t, q[0], q[1]); + M(b, b, t); + M(c, p[3], q[3]); + M(c, c, D2); + M(d, p[2], q[2]); + A(d, d, d); + Z(e, b, a); + Z(f, d, c); + A(g, d, c); + A(h, b, a); + + M(p[0], e, f); + M(p[1], h, g); + M(p[2], g, f); + M(p[3], e, h); +} + +function cswap(p, q, b) { + var i; + for (i = 0; i < 4; i++) { + sel25519(p[i], q[i], b); + } +} + +function pack(r, p) { + var tx = gf(), ty = gf(), zi = gf(); + inv25519(zi, p[2]); + M(tx, p[0], zi); + M(ty, p[1], zi); + pack25519(r, ty); + r[31] ^= par25519(tx) << 7; +} + +function scalarmult(p, q, s) { + var b, i; + set25519(p[0], gf0); + set25519(p[1], gf1); + set25519(p[2], gf1); + set25519(p[3], gf0); + for (i = 255; i >= 0; --i) { + b = (s[(i/8)|0] >> (i&7)) & 1; + cswap(p, q, b); + add(q, p); + add(p, p); + cswap(p, q, b); + } +} + +function scalarbase(p, s) { + var q = [gf(), gf(), gf(), gf()]; + set25519(q[0], X); + set25519(q[1], Y); + set25519(q[2], gf1); + M(q[3], X, Y); + scalarmult(p, q, s); +} + +function crypto_sign_keypair(pk, sk, seeded) { + var d = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()]; + var i; + + if (!seeded) randombytes(sk, 32); + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + scalarbase(p, d); + pack(pk, p); + + for (i = 0; i < 32; i++) sk[i+32] = pk[i]; + return 0; +} + +var L = new Float64Array([0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x10]); + +function modL(r, x) { + var carry, i, j, k; + for (i = 63; i >= 32; --i) { + carry = 0; + for (j = i - 32, k = i - 12; j < k; ++j) { + x[j] += carry - 16 * x[i] * L[j - (i - 32)]; + carry = (x[j] + 128) >> 8; + x[j] -= carry * 256; + } + x[j] += carry; + x[i] = 0; + } + carry = 0; + for (j = 0; j < 32; j++) { + x[j] += carry - (x[31] >> 4) * L[j]; + carry = x[j] >> 8; + x[j] &= 255; + } + for (j = 0; j < 32; j++) x[j] -= carry * L[j]; + for (i = 0; i < 32; i++) { + x[i+1] += x[i] >> 8; + r[i] = x[i] & 255; + } +} + +function reduce(r) { + var x = new Float64Array(64), i; + for (i = 0; i < 64; i++) x[i] = r[i]; + for (i = 0; i < 64; i++) r[i] = 0; + modL(r, x); +} + +// Note: difference from C - smlen returned, not passed as argument. +function crypto_sign(sm, m, n, sk) { + var d = new Uint8Array(64), h = new Uint8Array(64), r = new Uint8Array(64); + var i, j, x = new Float64Array(64); + var p = [gf(), gf(), gf(), gf()]; + + crypto_hash(d, sk, 32); + d[0] &= 248; + d[31] &= 127; + d[31] |= 64; + + var smlen = n + 64; + for (i = 0; i < n; i++) sm[64 + i] = m[i]; + for (i = 0; i < 32; i++) sm[32 + i] = d[32 + i]; + + crypto_hash(r, sm.subarray(32), n+32); + reduce(r); + scalarbase(p, r); + pack(sm, p); + + for (i = 32; i < 64; i++) sm[i] = sk[i]; + crypto_hash(h, sm, n + 64); + reduce(h); + + for (i = 0; i < 64; i++) x[i] = 0; + for (i = 0; i < 32; i++) x[i] = r[i]; + for (i = 0; i < 32; i++) { + for (j = 0; j < 32; j++) { + x[i+j] += h[i] * d[j]; + } + } + + modL(sm.subarray(32), x); + return smlen; +} + +function unpackneg(r, p) { + var t = gf(), chk = gf(), num = gf(), + den = gf(), den2 = gf(), den4 = gf(), + den6 = gf(); + + set25519(r[2], gf1); + unpack25519(r[1], p); + S(num, r[1]); + M(den, num, D); + Z(num, num, r[2]); + A(den, r[2], den); + + S(den2, den); + S(den4, den2); + M(den6, den4, den2); + M(t, den6, num); + M(t, t, den); + + pow2523(t, t); + M(t, t, num); + M(t, t, den); + M(t, t, den); + M(r[0], t, den); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) M(r[0], r[0], I); + + S(chk, r[0]); + M(chk, chk, den); + if (neq25519(chk, num)) return -1; + + if (par25519(r[0]) === (p[31]>>7)) Z(r[0], gf0, r[0]); + + M(r[3], r[0], r[1]); + return 0; +} + +function crypto_sign_open(m, sm, n, pk) { + var i, mlen; + var t = new Uint8Array(32), h = new Uint8Array(64); + var p = [gf(), gf(), gf(), gf()], + q = [gf(), gf(), gf(), gf()]; + + mlen = -1; + if (n < 64) return -1; + + if (unpackneg(q, pk)) return -1; + + for (i = 0; i < n; i++) m[i] = sm[i]; + for (i = 0; i < 32; i++) m[i+32] = pk[i]; + crypto_hash(h, m, n); + reduce(h); + scalarmult(p, q, h); + + scalarbase(q, sm.subarray(32)); + add(p, q); + pack(t, p); + + n -= 64; + if (crypto_verify_32(sm, 0, t, 0)) { + for (i = 0; i < n; i++) m[i] = 0; + return -1; + } + + for (i = 0; i < n; i++) m[i] = sm[i + 64]; + mlen = n; + return mlen; +} + +var crypto_secretbox_KEYBYTES = 32, + crypto_secretbox_NONCEBYTES = 24, + crypto_secretbox_ZEROBYTES = 32, + crypto_secretbox_BOXZEROBYTES = 16, + crypto_scalarmult_BYTES = 32, + crypto_scalarmult_SCALARBYTES = 32, + crypto_box_PUBLICKEYBYTES = 32, + crypto_box_SECRETKEYBYTES = 32, + crypto_box_BEFORENMBYTES = 32, + crypto_box_NONCEBYTES = crypto_secretbox_NONCEBYTES, + crypto_box_ZEROBYTES = crypto_secretbox_ZEROBYTES, + crypto_box_BOXZEROBYTES = crypto_secretbox_BOXZEROBYTES, + crypto_sign_BYTES = 64, + crypto_sign_PUBLICKEYBYTES = 32, + crypto_sign_SECRETKEYBYTES = 64, + crypto_sign_SEEDBYTES = 32, + crypto_hash_BYTES = 64; + +nacl.lowlevel = { + crypto_core_hsalsa20: crypto_core_hsalsa20, + crypto_stream_xor: crypto_stream_xor, + crypto_stream: crypto_stream, + crypto_stream_salsa20_xor: crypto_stream_salsa20_xor, + crypto_stream_salsa20: crypto_stream_salsa20, + crypto_onetimeauth: crypto_onetimeauth, + crypto_onetimeauth_verify: crypto_onetimeauth_verify, + crypto_verify_16: crypto_verify_16, + crypto_verify_32: crypto_verify_32, + crypto_secretbox: crypto_secretbox, + crypto_secretbox_open: crypto_secretbox_open, + crypto_scalarmult: crypto_scalarmult, + crypto_scalarmult_base: crypto_scalarmult_base, + crypto_box_beforenm: crypto_box_beforenm, + crypto_box_afternm: crypto_box_afternm, + crypto_box: crypto_box, + crypto_box_open: crypto_box_open, + crypto_box_keypair: crypto_box_keypair, + crypto_hash: crypto_hash, + crypto_sign: crypto_sign, + crypto_sign_keypair: crypto_sign_keypair, + crypto_sign_open: crypto_sign_open, + + crypto_secretbox_KEYBYTES: crypto_secretbox_KEYBYTES, + crypto_secretbox_NONCEBYTES: crypto_secretbox_NONCEBYTES, + crypto_secretbox_ZEROBYTES: crypto_secretbox_ZEROBYTES, + crypto_secretbox_BOXZEROBYTES: crypto_secretbox_BOXZEROBYTES, + crypto_scalarmult_BYTES: crypto_scalarmult_BYTES, + crypto_scalarmult_SCALARBYTES: crypto_scalarmult_SCALARBYTES, + crypto_box_PUBLICKEYBYTES: crypto_box_PUBLICKEYBYTES, + crypto_box_SECRETKEYBYTES: crypto_box_SECRETKEYBYTES, + crypto_box_BEFORENMBYTES: crypto_box_BEFORENMBYTES, + crypto_box_NONCEBYTES: crypto_box_NONCEBYTES, + crypto_box_ZEROBYTES: crypto_box_ZEROBYTES, + crypto_box_BOXZEROBYTES: crypto_box_BOXZEROBYTES, + crypto_sign_BYTES: crypto_sign_BYTES, + crypto_sign_PUBLICKEYBYTES: crypto_sign_PUBLICKEYBYTES, + crypto_sign_SECRETKEYBYTES: crypto_sign_SECRETKEYBYTES, + crypto_sign_SEEDBYTES: crypto_sign_SEEDBYTES, + crypto_hash_BYTES: crypto_hash_BYTES +}; + +/* High-level API */ + +function checkLengths(k, n) { + if (k.length !== crypto_secretbox_KEYBYTES) throw new Error('bad key size'); + if (n.length !== crypto_secretbox_NONCEBYTES) throw new Error('bad nonce size'); +} + +function checkBoxLengths(pk, sk) { + if (pk.length !== crypto_box_PUBLICKEYBYTES) throw new Error('bad public key size'); + if (sk.length !== crypto_box_SECRETKEYBYTES) throw new Error('bad secret key size'); +} + +function checkArrayTypes() { + var t, i; + for (i = 0; i < arguments.length; i++) { + if ((t = Object.prototype.toString.call(arguments[i])) !== '[object Uint8Array]') + throw new TypeError('unexpected type ' + t + ', use Uint8Array'); + } +} + +function cleanup(arr) { + for (var i = 0; i < arr.length; i++) arr[i] = 0; +} + +// TODO: Completely remove this in v0.15. +if (!nacl.util) { + nacl.util = {}; + nacl.util.decodeUTF8 = nacl.util.encodeUTF8 = nacl.util.encodeBase64 = nacl.util.decodeBase64 = function() { + throw new Error('nacl.util moved into separate package: https://github.com/dchest/tweetnacl-util-js'); + }; +} + +nacl.randomBytes = function(n) { + var b = new Uint8Array(n); + randombytes(b, n); + return b; +}; + +nacl.secretbox = function(msg, nonce, key) { + checkArrayTypes(msg, nonce, key); + checkLengths(key, nonce); + var m = new Uint8Array(crypto_secretbox_ZEROBYTES + msg.length); + var c = new Uint8Array(m.length); + for (var i = 0; i < msg.length; i++) m[i+crypto_secretbox_ZEROBYTES] = msg[i]; + crypto_secretbox(c, m, m.length, nonce, key); + return c.subarray(crypto_secretbox_BOXZEROBYTES); +}; + +nacl.secretbox.open = function(box, nonce, key) { + checkArrayTypes(box, nonce, key); + checkLengths(key, nonce); + var c = new Uint8Array(crypto_secretbox_BOXZEROBYTES + box.length); + var m = new Uint8Array(c.length); + for (var i = 0; i < box.length; i++) c[i+crypto_secretbox_BOXZEROBYTES] = box[i]; + if (c.length < 32) return false; + if (crypto_secretbox_open(m, c, c.length, nonce, key) !== 0) return false; + return m.subarray(crypto_secretbox_ZEROBYTES); +}; + +nacl.secretbox.keyLength = crypto_secretbox_KEYBYTES; +nacl.secretbox.nonceLength = crypto_secretbox_NONCEBYTES; +nacl.secretbox.overheadLength = crypto_secretbox_BOXZEROBYTES; + +nacl.scalarMult = function(n, p) { + checkArrayTypes(n, p); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + if (p.length !== crypto_scalarmult_BYTES) throw new Error('bad p size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult(q, n, p); + return q; +}; + +nacl.scalarMult.base = function(n) { + checkArrayTypes(n); + if (n.length !== crypto_scalarmult_SCALARBYTES) throw new Error('bad n size'); + var q = new Uint8Array(crypto_scalarmult_BYTES); + crypto_scalarmult_base(q, n); + return q; +}; + +nacl.scalarMult.scalarLength = crypto_scalarmult_SCALARBYTES; +nacl.scalarMult.groupElementLength = crypto_scalarmult_BYTES; + +nacl.box = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox(msg, nonce, k); +}; + +nacl.box.before = function(publicKey, secretKey) { + checkArrayTypes(publicKey, secretKey); + checkBoxLengths(publicKey, secretKey); + var k = new Uint8Array(crypto_box_BEFORENMBYTES); + crypto_box_beforenm(k, publicKey, secretKey); + return k; +}; + +nacl.box.after = nacl.secretbox; + +nacl.box.open = function(msg, nonce, publicKey, secretKey) { + var k = nacl.box.before(publicKey, secretKey); + return nacl.secretbox.open(msg, nonce, k); +}; + +nacl.box.open.after = nacl.secretbox.open; + +nacl.box.keyPair = function() { + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_box_SECRETKEYBYTES); + crypto_box_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.box.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_box_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_box_PUBLICKEYBYTES); + crypto_scalarmult_base(pk, secretKey); + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.box.publicKeyLength = crypto_box_PUBLICKEYBYTES; +nacl.box.secretKeyLength = crypto_box_SECRETKEYBYTES; +nacl.box.sharedKeyLength = crypto_box_BEFORENMBYTES; +nacl.box.nonceLength = crypto_box_NONCEBYTES; +nacl.box.overheadLength = nacl.secretbox.overheadLength; + +nacl.sign = function(msg, secretKey) { + checkArrayTypes(msg, secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var signedMsg = new Uint8Array(crypto_sign_BYTES+msg.length); + crypto_sign(signedMsg, msg, msg.length, secretKey); + return signedMsg; +}; + +nacl.sign.open = function(signedMsg, publicKey) { + if (arguments.length !== 2) + throw new Error('nacl.sign.open accepts 2 arguments; did you mean to use nacl.sign.detached.verify?'); + checkArrayTypes(signedMsg, publicKey); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var tmp = new Uint8Array(signedMsg.length); + var mlen = crypto_sign_open(tmp, signedMsg, signedMsg.length, publicKey); + if (mlen < 0) return null; + var m = new Uint8Array(mlen); + for (var i = 0; i < m.length; i++) m[i] = tmp[i]; + return m; +}; + +nacl.sign.detached = function(msg, secretKey) { + var signedMsg = nacl.sign(msg, secretKey); + var sig = new Uint8Array(crypto_sign_BYTES); + for (var i = 0; i < sig.length; i++) sig[i] = signedMsg[i]; + return sig; +}; + +nacl.sign.detached.verify = function(msg, sig, publicKey) { + checkArrayTypes(msg, sig, publicKey); + if (sig.length !== crypto_sign_BYTES) + throw new Error('bad signature size'); + if (publicKey.length !== crypto_sign_PUBLICKEYBYTES) + throw new Error('bad public key size'); + var sm = new Uint8Array(crypto_sign_BYTES + msg.length); + var m = new Uint8Array(crypto_sign_BYTES + msg.length); + var i; + for (i = 0; i < crypto_sign_BYTES; i++) sm[i] = sig[i]; + for (i = 0; i < msg.length; i++) sm[i+crypto_sign_BYTES] = msg[i]; + return (crypto_sign_open(m, sm, sm.length, publicKey) >= 0); +}; + +nacl.sign.keyPair = function() { + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + crypto_sign_keypair(pk, sk); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.keyPair.fromSecretKey = function(secretKey) { + checkArrayTypes(secretKey); + if (secretKey.length !== crypto_sign_SECRETKEYBYTES) + throw new Error('bad secret key size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + for (var i = 0; i < pk.length; i++) pk[i] = secretKey[32+i]; + return {publicKey: pk, secretKey: new Uint8Array(secretKey)}; +}; + +nacl.sign.keyPair.fromSeed = function(seed) { + checkArrayTypes(seed); + if (seed.length !== crypto_sign_SEEDBYTES) + throw new Error('bad seed size'); + var pk = new Uint8Array(crypto_sign_PUBLICKEYBYTES); + var sk = new Uint8Array(crypto_sign_SECRETKEYBYTES); + for (var i = 0; i < 32; i++) sk[i] = seed[i]; + crypto_sign_keypair(pk, sk, true); + return {publicKey: pk, secretKey: sk}; +}; + +nacl.sign.publicKeyLength = crypto_sign_PUBLICKEYBYTES; +nacl.sign.secretKeyLength = crypto_sign_SECRETKEYBYTES; +nacl.sign.seedLength = crypto_sign_SEEDBYTES; +nacl.sign.signatureLength = crypto_sign_BYTES; + +nacl.hash = function(msg) { + checkArrayTypes(msg); + var h = new Uint8Array(crypto_hash_BYTES); + crypto_hash(h, msg, msg.length); + return h; +}; + +nacl.hash.hashLength = crypto_hash_BYTES; + +nacl.verify = function(x, y) { + checkArrayTypes(x, y); + // Zero length arguments are considered not equal. + if (x.length === 0 || y.length === 0) return false; + if (x.length !== y.length) return false; + return (vn(x, 0, y, 0, x.length) === 0) ? true : false; +}; + +nacl.setPRNG = function(fn) { + randombytes = fn; +}; + +(function() { + // Initialize PRNG if environment provides CSPRNG. + // If not, methods calling randombytes will throw. + var crypto = typeof self !== 'undefined' ? (self.crypto || self.msCrypto) : null; + if (crypto && crypto.getRandomValues) { + // Browsers. + var QUOTA = 65536; + nacl.setPRNG(function(x, n) { + var i, v = new Uint8Array(n); + for (i = 0; i < n; i += QUOTA) { + crypto.getRandomValues(v.subarray(i, i + Math.min(n - i, QUOTA))); + } + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } else if (typeof require !== 'undefined') { + // Node.js. + crypto = require('crypto'); + if (crypto && crypto.randomBytes) { + nacl.setPRNG(function(x, n) { + var i, v = crypto.randomBytes(n); + for (i = 0; i < n; i++) x[i] = v[i]; + cleanup(v); + }); + } + } +})(); + +})(typeof module !== 'undefined' && module.exports ? module.exports : (self.nacl = self.nacl || {})); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.min.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.min.js new file mode 100644 index 0000000..4484974 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/tweetnacl/nacl.min.js @@ -0,0 +1 @@ +!function(r){"use strict";function n(r,n){return r<>>32-n}function e(r,n){var e=255&r[n+3];return e=e<<8|255&r[n+2],e=e<<8|255&r[n+1],e<<8|255&r[n+0]}function t(r,n){var e=r[n]<<24|r[n+1]<<16|r[n+2]<<8|r[n+3],t=r[n+4]<<24|r[n+5]<<16|r[n+6]<<8|r[n+7];return new sr(e,t)}function o(r,n,e){var t;for(t=0;t<4;t++)r[n+t]=255&e,e>>>=8}function i(r,n,e){r[n]=e.hi>>24&255,r[n+1]=e.hi>>16&255,r[n+2]=e.hi>>8&255,r[n+3]=255&e.hi,r[n+4]=e.lo>>24&255,r[n+5]=e.lo>>16&255,r[n+6]=e.lo>>8&255,r[n+7]=255&e.lo}function a(r,n,e,t,o){var i,a=0;for(i=0;i>>8)-1}function f(r,n,e,t){return a(r,n,e,t,16)}function u(r,n,e,t){return a(r,n,e,t,32)}function c(r,t,i,a,f){var u,c,w,y=new Uint32Array(16),l=new Uint32Array(16),s=new Uint32Array(16),h=new Uint32Array(4);for(u=0;u<4;u++)l[5*u]=e(a,4*u),l[1+u]=e(i,4*u),l[6+u]=e(t,4*u),l[11+u]=e(i,16+4*u);for(u=0;u<16;u++)s[u]=l[u];for(u=0;u<20;u++){for(c=0;c<4;c++){for(w=0;w<4;w++)h[w]=l[(5*c+4*w)%16];for(h[1]^=n(h[0]+h[3]|0,7),h[2]^=n(h[1]+h[0]|0,9),h[3]^=n(h[2]+h[1]|0,13),h[0]^=n(h[3]+h[2]|0,18),w=0;w<4;w++)y[4*c+(c+w)%4]=h[w]}for(w=0;w<16;w++)l[w]=y[w]}if(f){for(u=0;u<16;u++)l[u]=l[u]+s[u]|0;for(u=0;u<4;u++)l[5*u]=l[5*u]-e(a,4*u)|0,l[6+u]=l[6+u]-e(t,4*u)|0;for(u=0;u<4;u++)o(r,4*u,l[5*u]),o(r,16+4*u,l[6+u])}else for(u=0;u<16;u++)o(r,4*u,l[u]+s[u]|0)}function w(r,n,e,t){return c(r,n,e,t,!1),0}function y(r,n,e,t){return c(r,n,e,t,!0),0}function l(r,n,e,t,o,i,a){var f,u,c=new Uint8Array(16),y=new Uint8Array(64);if(!o)return 0;for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=i[u];for(;o>=64;){for(w(y,c,a,Br),u=0;u<64;u++)r[n+u]=(e?e[t+u]:0)^y[u];for(f=1,u=8;u<16;u++)f=f+(255&c[u])|0,c[u]=255&f,f>>>=8;o-=64,n+=64,e&&(t+=64)}if(o>0)for(w(y,c,a,Br),u=0;u>>=8}function b(r,n,e,t,o,i){var a,f,u,c,w=new Uint32Array(17),y=new Uint32Array(17),l=new Uint32Array(17),s=new Uint32Array(17),h=new Uint32Array(17);for(u=0;u<17;u++)y[u]=l[u]=0;for(u=0;u<16;u++)y[u]=i[u];for(y[3]&=15,y[4]&=252,y[7]&=15,y[8]&=252,y[11]&=15,y[12]&=252,y[15]&=15;o>0;){for(u=0;u<17;u++)s[u]=0;for(u=0;u<16&&u>>=8;for(c=c+l[16]|0,l[16]=3&c,c=5*(c>>>2)|0,u=0;u<16;u++)c=c+l[u]|0,l[u]=255&c,c>>>=8;c=c+l[16]|0,l[16]=c}for(u=0;u<17;u++)h[u]=l[u];for(v(l,Sr),a=0|-(l[16]>>>7),u=0;u<17;u++)l[u]^=a&(h[u]^l[u]);for(u=0;u<16;u++)s[u]=i[u+16];for(s[16]=0,v(l,s),u=0;u<16;u++)r[n+u]=l[u];return 0}function p(r,n,e,t,o,i){var a=new Uint8Array(16);return b(a,0,e,t,o,i),f(r,n,a,0)}function _(r,n,e,t,o){var i;if(e<32)return-1;for(g(r,0,n,0,e,t,o),b(r,16,r,32,e-32,r),i=0;i<16;i++)r[i]=0;return 0}function A(r,n,e,t,o){var i,a=new Uint8Array(32);if(e<32)return-1;if(h(a,0,32,t,o),0!==p(n,16,n,32,e-32,a))return-1;for(g(r,0,n,0,e,t,o),i=0;i<32;i++)r[i]=0;return 0}function U(r,n){var e;for(e=0;e<16;e++)r[e]=0|n[e]}function E(r){var n,e;for(e=0;e<16;e++)r[e]+=65536,n=Math.floor(r[e]/65536),r[(e+1)*(e<15?1:0)]+=n-1+37*(n-1)*(15===e?1:0),r[e]-=65536*n}function d(r,n,e){for(var t,o=~(e-1),i=0;i<16;i++)t=o&(r[i]^n[i]),r[i]^=t,n[i]^=t}function x(r,n){var e,t,o,i=hr(),a=hr();for(e=0;e<16;e++)a[e]=n[e];for(E(a),E(a),E(a),t=0;t<2;t++){for(i[0]=a[0]-65517,e=1;e<15;e++)i[e]=a[e]-65535-(i[e-1]>>16&1),i[e-1]&=65535;i[15]=a[15]-32767-(i[14]>>16&1),o=i[15]>>16&1,i[14]&=65535,d(a,i,1-o)}for(e=0;e<16;e++)r[2*e]=255&a[e],r[2*e+1]=a[e]>>8}function m(r,n){var e=new Uint8Array(32),t=new Uint8Array(32);return x(e,r),x(t,n),u(e,0,t,0)}function B(r){var n=new Uint8Array(32);return x(n,r),1&n[0]}function S(r,n){var e;for(e=0;e<16;e++)r[e]=n[2*e]+(n[2*e+1]<<8);r[15]&=32767}function K(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]+e[t]|0}function T(r,n,e){var t;for(t=0;t<16;t++)r[t]=n[t]-e[t]|0}function Y(r,n,e){var t,o,i=new Float64Array(31);for(t=0;t<31;t++)i[t]=0;for(t=0;t<16;t++)for(o=0;o<16;o++)i[t+o]+=n[t]*e[o];for(t=0;t<15;t++)i[t]+=38*i[t+16];for(t=0;t<16;t++)r[t]=i[t];E(r),E(r)}function L(r,n){Y(r,n,n)}function k(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=253;e>=0;e--)L(t,t),2!==e&&4!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function z(r,n){var e,t=hr();for(e=0;e<16;e++)t[e]=n[e];for(e=250;e>=0;e--)L(t,t),1!==e&&Y(t,t,n);for(e=0;e<16;e++)r[e]=t[e]}function R(r,n,e){var t,o,i=new Uint8Array(32),a=new Float64Array(80),f=hr(),u=hr(),c=hr(),w=hr(),y=hr(),l=hr();for(o=0;o<31;o++)i[o]=n[o];for(i[31]=127&n[31]|64,i[0]&=248,S(a,e),o=0;o<16;o++)u[o]=a[o],w[o]=f[o]=c[o]=0;for(f[0]=w[0]=1,o=254;o>=0;--o)t=i[o>>>3]>>>(7&o)&1,d(f,u,t),d(c,w,t),K(y,f,c),T(f,f,c),K(c,u,w),T(u,u,w),L(w,y),L(l,f),Y(f,c,f),Y(c,u,y),K(y,f,c),T(f,f,c),L(u,f),T(c,w,l),Y(f,c,Ar),K(f,f,w),Y(c,c,f),Y(f,w,l),Y(w,u,a),L(u,y),d(f,u,t),d(c,w,t);for(o=0;o<16;o++)a[o+16]=f[o],a[o+32]=c[o],a[o+48]=u[o],a[o+64]=w[o];var s=a.subarray(32),h=a.subarray(16);return k(s,s),Y(h,h,s),x(r,h),0}function P(r,n){return R(r,n,br)}function O(r,n){return gr(n,32),P(r,n)}function F(r,n,e){var t=new Uint8Array(32);return R(t,e,n),y(r,vr,t,Br)}function N(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Kr(r,n,e,t,a)}function C(r,n,e,t,o,i){var a=new Uint8Array(32);return F(a,o,i),Tr(r,n,e,t,a)}function M(){var r,n,e,t=0,o=0,i=0,a=0,f=65535;for(e=0;e>>16,i+=n&f,a+=n>>>16;return o+=t>>>16,i+=o>>>16,a+=i>>>16,new sr(i&f|a<<16,t&f|o<<16)}function G(r,n){return new sr(r.hi>>>n,r.lo>>>n|r.hi<<32-n)}function Z(){var r,n=0,e=0;for(r=0;r>>n|r.lo<>>n|r.hi<>>n|r.hi<>>n|r.lo<=128;){for(a=0;a<16;a++)y[a]=t(n,8*a+l);for(a=0;a<80;a++){for(f=0;f<8;f++)c[f]=w[f];for(o=M(w[7],X(w[4]),q(w[4],w[5],w[6]),Yr[a],y[a%16]),c[7]=M(o,V(w[0]),I(w[0],w[1],w[2])),c[3]=M(c[3],o),f=0;f<8;f++)w[(f+1)%8]=c[f];if(a%16===15)for(f=0;f<16;f++)y[f]=M(y[f],y[(f+9)%16],D(y[(f+1)%16]),H(y[(f+14)%16]))}for(a=0;a<8;a++)w[a]=M(w[a],u[a]),u[a]=w[a];l+=128,e-=128}for(a=0;a<8;a++)i(r,8*a,u[a]);return e}function Q(r,n,e){var t,o=new Uint8Array(64),a=new Uint8Array(256),f=e;for(t=0;t<64;t++)o[t]=Lr[t];for(J(o,n,e),e%=128,t=0;t<256;t++)a[t]=0;for(t=0;t=0;--o)t=e[o/8|0]>>(7&o)&1,$(r,n,t),W(n,r),W(r,r),$(r,n,t)}function er(r,n){var e=[hr(),hr(),hr(),hr()];U(e[0],dr),U(e[1],xr),U(e[2],_r),Y(e[3],dr,xr),nr(r,e,n)}function tr(r,n,e){var t,o=new Uint8Array(64),i=[hr(),hr(),hr(),hr()];for(e||gr(n,32),Q(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64,er(i,o),rr(r,i),t=0;t<32;t++)n[t+32]=r[t];return 0}function or(r,n){var e,t,o,i;for(t=63;t>=32;--t){for(e=0,o=t-32,i=t-12;o>8,n[o]-=256*e;n[o]+=e,n[t]=0}for(e=0,o=0;o<32;o++)n[o]+=e-(n[31]>>4)*kr[o],e=n[o]>>8,n[o]&=255;for(o=0;o<32;o++)n[o]-=e*kr[o];for(t=0;t<32;t++)n[t+1]+=n[t]>>8,r[t]=255&n[t]}function ir(r){var n,e=new Float64Array(64);for(n=0;n<64;n++)e[n]=r[n];for(n=0;n<64;n++)r[n]=0;or(r,e)}function ar(r,n,e,t){var o,i,a=new Uint8Array(64),f=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),w=[hr(),hr(),hr(),hr()];Q(a,t,32),a[0]&=248,a[31]&=127,a[31]|=64;var y=e+64;for(o=0;o>7&&T(r[0],pr,r[0]),Y(r[3],r[0],r[1]),0)}function ur(r,n,e,t){var o,i,a=new Uint8Array(32),f=new Uint8Array(64),c=[hr(),hr(),hr(),hr()],w=[hr(),hr(),hr(),hr()];if(i=-1,e<64)return-1;if(fr(w,t))return-1;for(o=0;o=0},r.sign.keyPair=function(){var r=new Uint8Array(Vr),n=new Uint8Array(Xr);return tr(r,n),{publicKey:r,secretKey:n}},r.sign.keyPair.fromSecretKey=function(r){if(yr(r),r.length!==Xr)throw new Error("bad secret key size");for(var n=new Uint8Array(Vr),e=0;e=0.14.0 <0.15.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/sshpk" + ] + ], + "_from": "tweetnacl@>=0.14.0 <0.15.0", + "_id": "tweetnacl@0.14.5", + "_inCache": true, + "_location": "/tweetnacl", + "_nodeVersion": "7.0.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/tweetnacl-0.14.5.tgz_1481627515097_0.015130913350731134" + }, + "_npmUser": { + "name": "dchest", + "email": "dmitry@codingrobots.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "tweetnacl@~0.14.0", + "scope": null, + "escapedName": "tweetnacl", + "name": "tweetnacl", + "rawSpec": "~0.14.0", + "spec": ">=0.14.0 <0.15.0", + "type": "range" + }, + "_requiredBy": [ + "/bcrypt-pbkdf", + "/sshpk" + ], + "_resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "_shasum": "5ae68177f192d4456269d108afa93ff8743f4f64", + "_shrinkwrap": null, + "_spec": "tweetnacl@~0.14.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/sshpk", + "author": { + "name": "TweetNaCl-js contributors" + }, + "browser": { + "buffer": false, + "crypto": false + }, + "bugs": { + "url": "https://github.com/dchest/tweetnacl-js/issues" + }, + "dependencies": {}, + "description": "Port of TweetNaCl cryptographic library to JavaScript", + "devDependencies": { + "browserify": "^13.0.0", + "eslint": "^2.2.0", + "faucet": "^0.0.1", + "tap-browser-color": "^0.1.2", + "tape": "^4.4.0", + "tape-run": "^2.1.3", + "tweetnacl-util": "^0.13.3", + "uglify-js": "^2.6.1" + }, + "directories": { + "test": "test" + }, + "dist": { + "shasum": "5ae68177f192d4456269d108afa93ff8743f4f64", + "tarball": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" + }, + "gitHead": "cce829e473b1ae299a9373b5140c713ee88f577f", + "homepage": "https://tweetnacl.js.org", + "keywords": [ + "crypto", + "cryptography", + "curve25519", + "ed25519", + "encrypt", + "hash", + "key", + "nacl", + "poly1305", + "public", + "salsa20", + "signatures" + ], + "license": "Unlicense", + "main": "nacl-fast.js", + "maintainers": [ + { + "name": "dchest", + "email": "dmitry@codingrobots.com" + } + ], + "name": "tweetnacl", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dchest/tweetnacl-js.git" + }, + "scripts": { + "bench": "node test/benchmark/bench.js", + "build": "uglifyjs nacl.js -c -m -o nacl.min.js && uglifyjs nacl-fast.js -c -m -o nacl-fast.min.js", + "build-test-browser": "browserify test/browser/init.js test/*.js | uglifyjs -c -m -o test/browser/_bundle.js 2>/dev/null && browserify test/browser/init.js test/*.quick.js | uglifyjs -c -m -o test/browser/_bundle-quick.js 2>/dev/null", + "lint": "eslint nacl.js nacl-fast.js test/*.js test/benchmark/*.js", + "test": "npm run test-node-all && npm run test-browser", + "test-browser": "NACL_SRC=${NACL_SRC:='nacl.min.js'} && npm run build-test-browser && cat $NACL_SRC test/browser/_bundle.js | tape-run | faucet", + "test-node": "tape test/*.js | faucet", + "test-node-all": "make -C test/c && tape test/*.js test/c/*.js | faucet" + }, + "types": "nacl.d.ts", + "version": "0.14.5" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/.eslintrc.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/.eslintrc.json new file mode 100644 index 0000000..734a8e1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/.eslintrc.json @@ -0,0 +1,47 @@ +{ + "root": true, + "env": { + "browser": true, + "commonjs": true, + "node": true, + "mocha": true + }, + "extends": ["eslint:recommended"], + "rules": { + "array-bracket-spacing": ["warn", "never"], + "arrow-body-style": ["warn", "as-needed"], + "arrow-parens": ["warn", "as-needed"], + "arrow-spacing": "warn", + "brace-style": ["warn", "1tbs"], + "camelcase": "warn", + "comma-spacing": ["warn", {"after": true}], + "dot-notation": "warn", + "eqeqeq": ["warn", "smart"], + "indent": ["warn", 2, { + "SwitchCase": 1, + "FunctionDeclaration": {"parameters": 1}, + "MemberExpression": 1, + "CallExpression": {"arguments": 1} + }], + "key-spacing": ["warn", {"beforeColon": false, "afterColon": true, "mode": "minimum"}], + "keyword-spacing": "warn", + "no-console": "off", + "no-empty": "off", + "no-multi-spaces": "warn", + "no-redeclare": "off", + "no-restricted-globals": ["warn", "Promise"], + "no-trailing-spaces": "warn", + "no-undef": "error", + "no-unused-vars": ["warn", {"args": "none"}], + "one-var": ["warn", "never"], + "padded-blocks": ["warn", "never"], + "object-curly-spacing": ["warn", "never"], + "quotes": ["warn", "single"], + "react/prop-types": "off", + "react/jsx-no-bind": "off", + "semi": ["warn", "always"], + "space-before-blocks": ["warn", "always"], + "space-before-function-paren": ["warn", "never"], + "space-in-parens": ["warn", "never"] + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/AUTHORS b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/AUTHORS new file mode 100644 index 0000000..5a10523 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/AUTHORS @@ -0,0 +1,5 @@ +Robert Kieffer +Christoph Tavan +AJ ONeal +Vincent Voyer +Roman Shtylman diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/CHANGELOG.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/CHANGELOG.md new file mode 100644 index 0000000..d9fe59c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/CHANGELOG.md @@ -0,0 +1,57 @@ +# Change Log + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + + +## [3.2.1](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.1) (2018-01-16) + + +### Bug Fixes + +* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) + + + + +# [3.2.0](https://github.com/kelektiv/node-uuid/compare/v3.1.0...v3.2.0) (2018-01-16) + + +### Bug Fixes + +* remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/kelektiv/node-uuid/commit/09fa824)) +* use msCrypto if available. Fixes [#241](https://github.com/kelektiv/node-uuid/issues/241) ([#247](https://github.com/kelektiv/node-uuid/issues/247)) ([1fef18b](https://github.com/kelektiv/node-uuid/commit/1fef18b)) + + +### Features + +* Add v3 Support ([#217](https://github.com/kelektiv/node-uuid/issues/217)) ([d94f726](https://github.com/kelektiv/node-uuid/commit/d94f726)) + + + +# 3.0.1 (2016-11-28) + + * split uuid versions into separate files + +# 3.0.0 (2016-11-17) + + * remove .parse and .unparse + +# 2.0.0 + + * Removed uuid.BufferClass + +# 1.4.0 + + * Improved module context detection + * Removed public RNG functions + +# 1.3.2 + + * Improve tests and handling of v1() options (Issue #24) + * Expose RNG option to allow for perf testing with different generators + +# 1.3.0 + + * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! + * Support for node.js crypto API + * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/LICENSE.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/LICENSE.md new file mode 100644 index 0000000..8c84e39 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2010-2016 Robert Kieffer and other contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README.md new file mode 100644 index 0000000..cddaa14 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README.md @@ -0,0 +1,293 @@ + + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript +const uuidv1 = require('uuid/v1'); +uuidv1(); // ⇨ 'f64f2940-fae4-11e7-8c5f-ef356f279131' + +``` + +Version 3 (namespace): + +```javascript +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' + +``` + +Version 4 (random): + +```javascript +const uuidv4 = require('uuid/v4'); +uuidv4(); // ⇨ '416ac246-e7ac-49ff-93b4-f7e94d997e6b' + +``` + +Version 5 (namespace): + +```javascript +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' + +``` + +## Quickstart - Browser-ready Versions + +Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). + +For version 1 uuids: + +```html + + +``` + +For version 3 uuids: + +```html + + +``` + +For version 4 uuids: + +```html + + +``` + +For version 5 uuids: + +```html + + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' + +``` + +Example: In-place generation of two binary IDs + +```javascript +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ] +uuidv1(null, arr, 16); // ⇨ [ 246, 87, 141, 176, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49, 246, 87, 180, 192, 250, 228, 17, 231, 146, 52, 239, 53, 111, 39, 145, 49 ] + +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' + +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' + +``` + +Example: Generate two IDs in a single buffer + +```javascript +const buffer = new Array(); +uuidv4(null, buffer, 0); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250 ] +uuidv4(null, buffer, 16); // ⇨ [ 175, 10, 162, 184, 217, 255, 77, 139, 161, 80, 41, 200, 70, 238, 196, 250, 75, 162, 105, 153, 48, 238, 77, 58, 169, 56, 158, 207, 106, 160, 47, 239 ] + +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript +uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' + +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` + +---- +Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd) \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README_js.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README_js.md new file mode 100644 index 0000000..f34453b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/README_js.md @@ -0,0 +1,280 @@ +```javascript --hide +runmd.onRequire = path => path.replace(/^uuid/, './'); +``` + +# uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # + +Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. + +Features: + +* Support for version 1, 3, 4 and 5 UUIDs +* Cross-platform +* Uses cryptographically-strong random number APIs (when available) +* Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) + +[**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be +supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] + +## Quickstart - CommonJS (Recommended) + +```shell +npm install uuid +``` + +Then generate your uuid version of choice ... + +Version 1 (timestamp): + +```javascript --run v1 +const uuidv1 = require('uuid/v1'); +uuidv1(); // RESULT +``` + +Version 3 (namespace): + +```javascript --run v3 +const uuidv3 = require('uuid/v3'); + +// ... using predefined DNS namespace (for domain names) +uuidv3('hello.example.com', uuidv3.DNS); // RESULT + +// ... using predefined URL namespace (for, well, URLs) +uuidv3('http://example.com/hello', uuidv3.URL); // RESULT + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv3('Hello, World!', MY_NAMESPACE); // RESULT +``` + +Version 4 (random): + +```javascript --run v4 +const uuidv4 = require('uuid/v4'); +uuidv4(); // RESULT +``` + +Version 5 (namespace): + +```javascript --run v5 +const uuidv5 = require('uuid/v5'); + +// ... using predefined DNS namespace (for domain names) +uuidv5('hello.example.com', uuidv5.DNS); // RESULT + +// ... using predefined URL namespace (for, well, URLs) +uuidv5('http://example.com/hello', uuidv5.URL); // RESULT + +// ... using a custom namespace +// +// Note: Custom namespaces should be a UUID string specific to your application! +// E.g. the one here was generated using this modules `uuid` CLI. +const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; +uuidv5('Hello, World!', MY_NAMESPACE); // RESULT +``` + +## Quickstart - Browser-ready Versions + +Browser-ready versions of this module are available via [wzrd.in](https://github.com/jfhbrook/wzrd.in). + +For version 1 uuids: + +```html + + +``` + +For version 3 uuids: + +```html + + +``` + +For version 4 uuids: + +```html + + +``` + +For version 5 uuids: + +```html + + +``` + +## API + +### Version 1 + +```javascript +const uuidv1 = require('uuid/v1'); + +// Incantations +uuidv1(); +uuidv1(options); +uuidv1(options, buffer, offset); +``` + +Generate and return a RFC4122 v1 (timestamp-based) UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + + * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. + * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. + * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. + * `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2. + +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Note: The id is generated guaranteed to stay constant for the lifetime of the current JS runtime. (Future versions of this module may use persistent storage mechanisms to extend this guarantee.) + +Example: Generate string UUID with fully-specified options + +```javascript --run v1 +const v1options = { + node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], + clockseq: 0x1234, + msecs: new Date('2011-11-01').getTime(), + nsecs: 5678 +}; +uuidv1(v1options); // RESULT +``` + +Example: In-place generation of two binary IDs + +```javascript --run v1 +// Generate two ids in an array +const arr = new Array(); +uuidv1(null, arr, 0); // RESULT +uuidv1(null, arr, 16); // RESULT +``` + +### Version 3 + +```javascript +const uuidv3 = require('uuid/v3'); + +// Incantations +uuidv3(name, namespace); +uuidv3(name, namespace, buffer); +uuidv3(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v3 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript --run v3 +uuidv3('hello world', MY_NAMESPACE); // RESULT +``` + +### Version 4 + +```javascript +const uuidv4 = require('uuid/v4') + +// Incantations +uuidv4(); +uuidv4(options); +uuidv4(options, buffer, offset); +``` + +Generate and return a RFC4122 v4 UUID. + +* `options` - (Object) Optional uuid state to apply. Properties may include: + * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values + * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: Generate string UUID with predefined `random` values + +```javascript --run v4 +const v4options = { + random: [ + 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, + 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 + ] +}; +uuidv4(v4options); // RESULT +``` + +Example: Generate two IDs in a single buffer + +```javascript --run v4 +const buffer = new Array(); +uuidv4(null, buffer, 0); // RESULT +uuidv4(null, buffer, 16); // RESULT +``` + +### Version 5 + +```javascript +const uuidv5 = require('uuid/v5'); + +// Incantations +uuidv5(name, namespace); +uuidv5(name, namespace, buffer); +uuidv5(name, namespace, buffer, offset); +``` + +Generate and return a RFC4122 v5 UUID. + +* `name` - (String | Array[]) "name" to create UUID with +* `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values +* `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. +* `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 + +Returns `buffer`, if specified, otherwise the string form of the UUID + +Example: + +```javascript --run v5 +uuidv5('hello world', MY_NAMESPACE); // RESULT +``` + +## Command Line + +UUIDs can be generated from the command line with the `uuid` command. + +```shell +$ uuid +ddeb27fb-d9a0-4624-be4d-4615062daed4 + +$ uuid v1 +02d37060-d446-11e7-a9fa-7bdae751ebe1 +``` + +Type `uuid --help` for usage details + +## Testing + +```shell +npm test +``` diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/bin/uuid b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/bin/uuid new file mode 100755 index 0000000..502626e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/bin/uuid @@ -0,0 +1,65 @@ +#!/usr/bin/env node +var assert = require('assert'); + +function usage() { + console.log('Usage:'); + console.log(' uuid'); + console.log(' uuid v1'); + console.log(' uuid v3 '); + console.log(' uuid v4'); + console.log(' uuid v5 '); + console.log(' uuid --help'); + console.log('\nNote: may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122'); +} + +var args = process.argv.slice(2); + +if (args.indexOf('--help') >= 0) { + usage(); + process.exit(0); +} +var version = args.shift() || 'v4'; + +switch (version) { + case 'v1': + var uuidV1 = require('../v1'); + console.log(uuidV1()); + break; + + case 'v3': + var uuidV3 = require('../v3'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v3 name not specified'); + assert(namespace != null, 'v3 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV3.URL; + if (namespace == 'DNS') namespace = uuidV3.DNS; + + console.log(uuidV3(name, namespace)); + break; + + case 'v4': + var uuidV4 = require('../v4'); + console.log(uuidV4()); + break; + + case 'v5': + var uuidV5 = require('../v5'); + + var name = args.shift(); + var namespace = args.shift(); + assert(name != null, 'v5 name not specified'); + assert(namespace != null, 'v5 namespace not specified'); + + if (namespace == 'URL') namespace = uuidV5.URL; + if (namespace == 'DNS') namespace = uuidV5.DNS; + + console.log(uuidV5(name, namespace)); + break; + + default: + usage(); + process.exit(1); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/index.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/index.js new file mode 100644 index 0000000..e96791a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/index.js @@ -0,0 +1,8 @@ +var v1 = require('./v1'); +var v4 = require('./v4'); + +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; + +module.exports = uuid; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/bytesToUuid.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/bytesToUuid.js new file mode 100644 index 0000000..2c9a223 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/bytesToUuid.js @@ -0,0 +1,23 @@ +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} + +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + return bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + '-' + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]] + + bth[buf[i++]] + bth[buf[i++]]; +} + +module.exports = bytesToUuid; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5-browser.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5-browser.js new file mode 100644 index 0000000..9b3b6c7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5-browser.js @@ -0,0 +1,216 @@ +/* + * Browser-compatible JavaScript MD5 + * + * Modification of JavaScript MD5 + * https://github.com/blueimp/JavaScript-MD5 + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * https://opensource.org/licenses/MIT + * + * Based on + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +'use strict'; + +function md5(bytes) { + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + return md5ToHexEncodedArray( + wordsToMd5( + bytesToWords(bytes) + , bytes.length * 8) + ); +} + + +/* +* Convert an array of little-endian words to an array of bytes +*/ +function md5ToHexEncodedArray(input) { + var i; + var x; + var output = []; + var length32 = input.length * 32; + var hexTab = '0123456789abcdef'; + var hex; + + for (i = 0; i < length32; i += 8) { + x = (input[i >> 5] >>> (i % 32)) & 0xFF; + + hex = parseInt(hexTab.charAt((x >>> 4) & 0x0F) + hexTab.charAt(x & 0x0F), 16); + + output.push(hex); + } + return output; +} + +/* +* Calculate the MD5 of an array of little-endian words, and a bit length. +*/ +function wordsToMd5(x, len) { + /* append padding */ + x[len >> 5] |= 0x80 << (len % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var i; + var olda; + var oldb; + var oldc; + var oldd; + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + + var d = 271733878; + + for (i = 0; i < x.length; i += 16) { + olda = a; + oldb = b; + oldc = c; + oldd = d; + + a = md5ff(a, b, c, d, x[i], 7, -680876936); + d = md5ff(d, a, b, c, x[i + 1], 12, -389564586); + c = md5ff(c, d, a, b, x[i + 2], 17, 606105819); + b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330); + a = md5ff(a, b, c, d, x[i + 4], 7, -176418897); + d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426); + c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341); + b = md5ff(b, c, d, a, x[i + 7], 22, -45705983); + a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416); + d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417); + c = md5ff(c, d, a, b, x[i + 10], 17, -42063); + b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162); + a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682); + d = md5ff(d, a, b, c, x[i + 13], 12, -40341101); + c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290); + b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329); + + a = md5gg(a, b, c, d, x[i + 1], 5, -165796510); + d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632); + c = md5gg(c, d, a, b, x[i + 11], 14, 643717713); + b = md5gg(b, c, d, a, x[i], 20, -373897302); + a = md5gg(a, b, c, d, x[i + 5], 5, -701558691); + d = md5gg(d, a, b, c, x[i + 10], 9, 38016083); + c = md5gg(c, d, a, b, x[i + 15], 14, -660478335); + b = md5gg(b, c, d, a, x[i + 4], 20, -405537848); + a = md5gg(a, b, c, d, x[i + 9], 5, 568446438); + d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690); + c = md5gg(c, d, a, b, x[i + 3], 14, -187363961); + b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501); + a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467); + d = md5gg(d, a, b, c, x[i + 2], 9, -51403784); + c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473); + b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734); + + a = md5hh(a, b, c, d, x[i + 5], 4, -378558); + d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463); + c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562); + b = md5hh(b, c, d, a, x[i + 14], 23, -35309556); + a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060); + d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353); + c = md5hh(c, d, a, b, x[i + 7], 16, -155497632); + b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640); + a = md5hh(a, b, c, d, x[i + 13], 4, 681279174); + d = md5hh(d, a, b, c, x[i], 11, -358537222); + c = md5hh(c, d, a, b, x[i + 3], 16, -722521979); + b = md5hh(b, c, d, a, x[i + 6], 23, 76029189); + a = md5hh(a, b, c, d, x[i + 9], 4, -640364487); + d = md5hh(d, a, b, c, x[i + 12], 11, -421815835); + c = md5hh(c, d, a, b, x[i + 15], 16, 530742520); + b = md5hh(b, c, d, a, x[i + 2], 23, -995338651); + + a = md5ii(a, b, c, d, x[i], 6, -198630844); + d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415); + c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905); + b = md5ii(b, c, d, a, x[i + 5], 21, -57434055); + a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571); + d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606); + c = md5ii(c, d, a, b, x[i + 10], 15, -1051523); + b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799); + a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359); + d = md5ii(d, a, b, c, x[i + 15], 10, -30611744); + c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380); + b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649); + a = md5ii(a, b, c, d, x[i + 4], 6, -145523070); + d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379); + c = md5ii(c, d, a, b, x[i + 2], 15, 718787259); + b = md5ii(b, c, d, a, x[i + 9], 21, -343485551); + + a = safeAdd(a, olda); + b = safeAdd(b, oldb); + c = safeAdd(c, oldc); + d = safeAdd(d, oldd); + } + return [a, b, c, d]; +} + +/* +* Convert an array bytes to an array of little-endian words +* Characters >255 have their high-byte silently ignored. +*/ +function bytesToWords(input) { + var i; + var output = []; + output[(input.length >> 2) - 1] = undefined; + for (i = 0; i < output.length; i += 1) { + output[i] = 0; + } + var length8 = input.length * 8; + for (i = 0; i < length8; i += 8) { + output[i >> 5] |= (input[(i / 8)] & 0xFF) << (i % 32); + } + + return output; +} + +/* +* Add integers, wrapping at 2^32. This uses 16-bit operations internally +* to work around bugs in some JS interpreters. +*/ +function safeAdd(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* +* Bitwise rotate a 32-bit number to the left. +*/ +function bitRotateLeft(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* +* These functions implement the four basic operations the algorithm uses. +*/ +function md5cmn(q, a, b, x, s, t) { + return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b); +} +function md5ff(a, b, c, d, x, s, t) { + return md5cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5gg(a, b, c, d, x, s, t) { + return md5cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5hh(a, b, c, d, x, s, t) { + return md5cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5ii(a, b, c, d, x, s, t) { + return md5cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +module.exports = md5; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5.js new file mode 100644 index 0000000..7044b87 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/md5.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function md5(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('md5').update(bytes).digest(); +} + +module.exports = md5; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng-browser.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng-browser.js new file mode 100644 index 0000000..14d2117 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng-browser.js @@ -0,0 +1,32 @@ +// Unique ID creation requires a high quality random # generator. In the +// browser this is a little complicated due to unknown quality of Math.random() +// and inconsistent support for the `crypto` API. We do the best we can via +// feature-detection + +// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. +var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues.bind(crypto)) || + (typeof(msCrypto) != 'undefined' && msCrypto.getRandomValues.bind(msCrypto)); +if (getRandomValues) { + // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto + var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef + + module.exports = function whatwgRNG() { + getRandomValues(rnds8); + return rnds8; + }; +} else { + // Math.random()-based (RNG) + // + // If all else fails, use Math.random(). It's fast, but is of unspecified + // quality. + var rnds = new Array(16); + + module.exports = function mathRNG() { + for (var i = 0, r; i < 16; i++) { + if ((i & 0x03) === 0) r = Math.random() * 0x100000000; + rnds[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return rnds; + }; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng.js new file mode 100644 index 0000000..58f0dc9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/rng.js @@ -0,0 +1,8 @@ +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = require('crypto'); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1-browser.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1-browser.js new file mode 100644 index 0000000..5758ed7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1-browser.js @@ -0,0 +1,89 @@ +// Adapted from Chris Veness' SHA1 code at +// http://www.movable-type.co.uk/scripts/sha1.html +'use strict'; + +function f(s, x, y, z) { + switch (s) { + case 0: return (x & y) ^ (~x & z); + case 1: return x ^ y ^ z; + case 2: return (x & y) ^ (x & z) ^ (y & z); + case 3: return x ^ y ^ z; + } +} + +function ROTL(x, n) { + return (x << n) | (x>>> (32 - n)); +} + +function sha1(bytes) { + var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6]; + var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]; + + if (typeof(bytes) == 'string') { + var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape + bytes = new Array(msg.length); + for (var i = 0; i < msg.length; i++) bytes[i] = msg.charCodeAt(i); + } + + bytes.push(0x80); + + var l = bytes.length/4 + 2; + var N = Math.ceil(l/16); + var M = new Array(N); + + for (var i=0; i>> 0; + e = d; + d = c; + c = ROTL(b, 30) >>> 0; + b = a; + a = T; + } + + H[0] = (H[0] + a) >>> 0; + H[1] = (H[1] + b) >>> 0; + H[2] = (H[2] + c) >>> 0; + H[3] = (H[3] + d) >>> 0; + H[4] = (H[4] + e) >>> 0; + } + + return [ + H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, + H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, + H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, + H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, + H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff + ]; +} + +module.exports = sha1; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1.js new file mode 100644 index 0000000..0b54b25 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/sha1.js @@ -0,0 +1,25 @@ +'use strict'; + +var crypto = require('crypto'); + +function sha1(bytes) { + if (typeof Buffer.from === 'function') { + // Modern Buffer API + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + } else { + // Pre-v4 Buffer API + if (Array.isArray(bytes)) { + bytes = new Buffer(bytes); + } else if (typeof bytes === 'string') { + bytes = new Buffer(bytes, 'utf8'); + } + } + + return crypto.createHash('sha1').update(bytes).digest(); +} + +module.exports = sha1; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/v35.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/v35.js new file mode 100644 index 0000000..842c60e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/lib/v35.js @@ -0,0 +1,53 @@ +var bytesToUuid = require('./bytesToUuid'); + +function uuidToBytes(uuid) { + // Note: We assume we're being passed a valid uuid string + var bytes = []; + uuid.replace(/[a-fA-F0-9]{2}/g, function(hex) { + bytes.push(parseInt(hex, 16)); + }); + + return bytes; +} + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + var bytes = new Array(str.length); + for (var i = 0; i < str.length; i++) { + bytes[i] = str.charCodeAt(i); + } + return bytes; +} + +module.exports = function(name, version, hashfunc) { + var generateUUID = function(value, namespace, buf, offset) { + var off = buf && offset || 0; + + if (typeof(value) == 'string') value = stringToBytes(value); + if (typeof(namespace) == 'string') namespace = uuidToBytes(namespace); + + if (!Array.isArray(value)) throw TypeError('value must be an array of bytes'); + if (!Array.isArray(namespace) || namespace.length !== 16) throw TypeError('namespace must be uuid string or an Array of 16 byte values'); + + // Per 4.3 + var bytes = hashfunc(namespace.concat(value)); + bytes[6] = (bytes[6] & 0x0f) | version; + bytes[8] = (bytes[8] & 0x3f) | 0x80; + + if (buf) { + for (var idx = 0; idx < 16; ++idx) { + buf[off+idx] = bytes[idx]; + } + } + + return buf || bytesToUuid(bytes); + }; + + generateUUID.name = name; + + // Pre-defined namespaces, per Appendix C + generateUUID.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; + generateUUID.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; + + return generateUUID; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/package.json new file mode 100644 index 0000000..f5bae44 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/package.json @@ -0,0 +1,131 @@ +{ + "_args": [ + [ + { + "raw": "uuid@^3.1.0", + "scope": null, + "escapedName": "uuid", + "name": "uuid", + "rawSpec": "^3.1.0", + "spec": ">=3.1.0 <4.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request" + ] + ], + "_from": "uuid@>=3.1.0 <4.0.0", + "_id": "uuid@3.2.1", + "_inCache": true, + "_location": "/uuid", + "_nodeVersion": "7.10.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/uuid-3.2.1.tgz_1516124697652_0.3172094284091145" + }, + "_npmUser": { + "name": "broofa", + "email": "robert@broofa.com" + }, + "_npmVersion": "5.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "uuid@^3.1.0", + "scope": null, + "escapedName": "uuid", + "name": "uuid", + "rawSpec": "^3.1.0", + "spec": ">=3.1.0 <4.0.0", + "type": "range" + }, + "_requiredBy": [ + "/request" + ], + "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", + "_shasum": "12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14", + "_shrinkwrap": null, + "_spec": "uuid@^3.1.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/request", + "bin": { + "uuid": "./bin/uuid" + }, + "browser": { + "./lib/rng.js": "./lib/rng-browser.js", + "./lib/sha1.js": "./lib/sha1-browser.js", + "./lib/md5.js": "./lib/md5-browser.js" + }, + "bugs": { + "url": "https://github.com/kelektiv/node-uuid/issues" + }, + "contributors": [ + { + "name": "Robert Kieffer", + "email": "robert@broofa.com" + }, + { + "name": "Christoph Tavan", + "email": "dev@tavan.de" + }, + { + "name": "AJ ONeal", + "email": "coolaj86@gmail.com" + }, + { + "name": "Vincent Voyer", + "email": "vincent@zeroload.net" + }, + { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + } + ], + "dependencies": {}, + "description": "RFC4122 (v1, v4, and v5) UUIDs", + "devDependencies": { + "eslint": "4.5.0", + "mocha": "3.1.2", + "runmd": "1.0.1", + "standard-version": "4.2.0" + }, + "directories": {}, + "dist": { + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "shasum": "12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14", + "tarball": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz" + }, + "gitHead": "ce7d3176fc927ab83b4e29b8d5a37b7243ce3360", + "homepage": "https://github.com/kelektiv/node-uuid#readme", + "keywords": [ + "uuid", + "guid", + "rfc4122" + ], + "license": "MIT", + "maintainers": [ + { + "name": "broofa", + "email": "robert@broofa.com" + }, + { + "name": "defunctzombie", + "email": "shtylman@gmail.com" + }, + { + "name": "vvo", + "email": "vincent.voyer@gmail.com" + } + ], + "name": "uuid", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/kelektiv/node-uuid.git" + }, + "scripts": { + "md": "runmd --watch --output=README.md README_js.md", + "prepare": "runmd --output=README.md README_js.md", + "release": "standard-version", + "test": "mocha test/test.js" + }, + "version": "3.2.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v1.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v1.js new file mode 100644 index 0000000..d84c0f4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v1.js @@ -0,0 +1,109 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html + +var _nodeId; +var _clockseq; + +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; + +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; + + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; + + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } + + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; + + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; + + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } + + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } + + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; + + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; + + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; + + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); +} + +module.exports = v1; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v3.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v3.js new file mode 100644 index 0000000..ee7e14c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v3.js @@ -0,0 +1,4 @@ +var v35 = require('./lib/v35.js'); +var md5 = require('./lib/md5'); + +module.exports = v35('v3', 0x30, md5); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v4.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v4.js new file mode 100644 index 0000000..1f07be1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v4.js @@ -0,0 +1,29 @@ +var rng = require('./lib/rng'); +var bytesToUuid = require('./lib/bytesToUuid'); + +function v4(options, buf, offset) { + var i = buf && offset || 0; + + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; + + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } + + return buf || bytesToUuid(rnds); +} + +module.exports = v4; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v5.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v5.js new file mode 100644 index 0000000..4945baf --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/uuid/v5.js @@ -0,0 +1,3 @@ +var v35 = require('./lib/v35.js'); +var sha1 = require('./lib/sha1'); +module.exports = v35('v5', 0x50, sha1); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/.npmignore new file mode 100644 index 0000000..f14aec8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/.npmignore @@ -0,0 +1,9 @@ +.gitignore +.gitmodules +deps +examples +experiments +jsl.node.conf +Makefile +Makefile.targ +test diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CHANGES.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CHANGES.md new file mode 100644 index 0000000..bbb745a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CHANGES.md @@ -0,0 +1,28 @@ +# Changelog + +## Not yet released + +None yet. + +## v1.10.0 + +* #49 want convenience functions for MultiErrors + +## v1.9.0 + +* #47 could use VError.hasCauseWithName() + +## v1.8.1 + +* #39 captureStackTrace lost when inheriting from WError + +## v1.8.0 + +* #23 Preserve original stack trace(s) + +## v1.7.0 + +* #10 better support for extra properties on Errors +* #11 make it easy to find causes of a particular kind +* #29 No documentation on how to Install this package +* #36 elide development-only files from npm package diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CONTRIBUTING.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CONTRIBUTING.md new file mode 100644 index 0000000..750cef8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/CONTRIBUTING.md @@ -0,0 +1,19 @@ +# Contributing + +This repository uses [cr.joyent.us](https://cr.joyent.us) (Gerrit) for new +changes. Anyone can submit changes. To get started, see the [cr.joyent.us user +guide](https://github.com/joyent/joyent-gerrit/blob/master/docs/user/README.md). +This repo does not use GitHub pull requests. + +See the [Joyent Engineering +Guidelines](https://github.com/joyent/eng/blob/master/docs/index.md) for general +best practices expected in this repository. + +Contributions should be "make prepush" clean. The "prepush" target runs the +"check" target, which requires these separate tools: + +* https://github.com/davepacheco/jsstyle +* https://github.com/davepacheco/javascriptlint + +If you're changing something non-trivial or user-facing, you may want to submit +an issue first. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/LICENSE new file mode 100644 index 0000000..82a5cb8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016, Joyent, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/README.md new file mode 100644 index 0000000..c1f0635 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/README.md @@ -0,0 +1,528 @@ +# verror: rich JavaScript errors + +This module provides several classes in support of Joyent's [Best Practices for +Error Handling in Node.js](http://www.joyent.com/developers/node/design/errors). +If you find any of the behavior here confusing or surprising, check out that +document first. + +The error classes here support: + +* printf-style arguments for the message +* chains of causes +* properties to provide extra information about the error +* creating your own subclasses that support all of these + +The classes here are: + +* **VError**, for chaining errors while preserving each one's error message. + This is useful in servers and command-line utilities when you want to + propagate an error up a call stack, but allow various levels to add their own + context. See examples below. +* **WError**, for wrapping errors while hiding the lower-level messages from the + top-level error. This is useful for API endpoints where you don't want to + expose internal error messages, but you still want to preserve the error chain + for logging and debugging. +* **SError**, which is just like VError but interprets printf-style arguments + more strictly. +* **MultiError**, which is just an Error that encapsulates one or more other + errors. (This is used for parallel operations that return several errors.) + + +# Quick start + +First, install the package: + + npm install verror + +If nothing else, you can use VError as a drop-in replacement for the built-in +JavaScript Error class, with the addition of printf-style messages: + +```javascript +var err = new VError('missing file: "%s"', '/etc/passwd'); +console.log(err.message); +``` + +This prints: + + missing file: "/etc/passwd" + +You can also pass a `cause` argument, which is any other Error object: + +```javascript +var fs = require('fs'); +var filename = '/nonexistent'; +fs.stat(filename, function (err1) { + var err2 = new VError(err1, 'stat "%s"', filename); + console.error(err2.message); +}); +``` + +This prints out: + + stat "/nonexistent": ENOENT, stat '/nonexistent' + +which resembles how Unix programs typically report errors: + + $ sort /nonexistent + sort: open failed: /nonexistent: No such file or directory + +To match the Unixy feel, when you print out the error, just prepend the +program's name to the VError's `message`. Or just call +[node-cmdutil.fail(your_verror)](https://github.com/joyent/node-cmdutil), which +does this for you. + +You can get the next-level Error using `err.cause()`: + +```javascript +console.error(err2.cause().message); +``` + +prints: + + ENOENT, stat '/nonexistent' + +Of course, you can chain these as many times as you want, and it works with any +kind of Error: + +```javascript +var err1 = new Error('No such file or directory'); +var err2 = new VError(err1, 'failed to stat "%s"', '/junk'); +var err3 = new VError(err2, 'request failed'); +console.error(err3.message); +``` + +This prints: + + request failed: failed to stat "/junk": No such file or directory + +The idea is that each layer in the stack annotates the error with a description +of what it was doing. The end result is a message that explains what happened +at each level. + +You can also decorate Error objects with additional information so that callers +can not only handle each kind of error differently, but also construct their own +error messages (e.g., to localize them, format them, group them by type, and so +on). See the example below. + + +# Deeper dive + +The two main goals for VError are: + +* **Make it easy to construct clear, complete error messages intended for + people.** Clear error messages greatly improve both user experience and + debuggability, so we wanted to make it easy to build them. That's why the + constructor takes printf-style arguments. +* **Make it easy to construct objects with programmatically-accessible + metadata** (which we call _informational properties_). Instead of just saying + "connection refused while connecting to 192.168.1.2:80", you can add + properties like `"ip": "192.168.1.2"` and `"tcpPort": 80`. This can be used + for feeding into monitoring systems, analyzing large numbers of Errors (as + from a log file), or localizing error messages. + +To really make this useful, it also needs to be easy to compose Errors: +higher-level code should be able to augment the Errors reported by lower-level +code to provide a more complete description of what happened. Instead of saying +"connection refused", you can say "operation X failed: connection refused". +That's why VError supports `causes`. + +In order for all this to work, programmers need to know that it's generally safe +to wrap lower-level Errors with higher-level ones. If you have existing code +that handles Errors produced by a library, you should be able to wrap those +Errors with a VError to add information without breaking the error handling +code. There are two obvious ways that this could break such consumers: + +* The error's name might change. People typically use `name` to determine what + kind of Error they've got. To ensure compatibility, you can create VErrors + with custom names, but this approach isn't great because it prevents you from + representing complex failures. For this reason, VError provides + `findCauseByName`, which essentially asks: does this Error _or any of its + causes_ have this specific type? If error handling code uses + `findCauseByName`, then subsystems can construct very specific causal chains + for debuggability and still let people handle simple cases easily. There's an + example below. +* The error's properties might change. People often hang additional properties + off of Error objects. If we wrap an existing Error in a new Error, those + properties would be lost unless we copied them. But there are a variety of + both standard and non-standard Error properties that should _not_ be copied in + this way: most obviously `name`, `message`, and `stack`, but also `fileName`, + `lineNumber`, and a few others. Plus, it's useful for some Error subclasses + to have their own private properties -- and there'd be no way to know whether + these should be copied. For these reasons, VError first-classes these + information properties. You have to provide them in the constructor, you can + only fetch them with the `info()` function, and VError takes care of making + sure properties from causes wind up in the `info()` output. + +Let's put this all together with an example from the node-fast RPC library. +node-fast implements a simple RPC protocol for Node programs. There's a server +and client interface, and clients make RPC requests to servers. Let's say the +server fails with an UnauthorizedError with message "user 'bob' is not +authorized". The client wraps all server errors with a FastServerError. The +client also wraps all request errors with a FastRequestError that includes the +name of the RPC call being made. The result of this failed RPC might look like +this: + + name: FastRequestError + message: "request failed: server error: user 'bob' is not authorized" + rpcMsgid: + rpcMethod: GetObject + cause: + name: FastServerError + message: "server error: user 'bob' is not authorized" + cause: + name: UnauthorizedError + message: "user 'bob' is not authorized" + rpcUser: "bob" + +When the caller uses `VError.info()`, the information properties are collapsed +so that it looks like this: + + message: "request failed: server error: user 'bob' is not authorized" + rpcMsgid: + rpcMethod: GetObject + rpcUser: "bob" + +Taking this apart: + +* The error's message is a complete description of the problem. The caller can + report this directly to its caller, which can potentially make its way back to + an end user (if appropriate). It can also be logged. +* The caller can tell that the request failed on the server, rather than as a + result of a client problem (e.g., failure to serialize the request), a + transport problem (e.g., failure to connect to the server), or something else + (e.g., a timeout). They do this using `findCauseByName('FastServerError')` + rather than checking the `name` field directly. +* If the caller logs this error, the logs can be analyzed to aggregate + errors by cause, by RPC method name, by user, or whatever. Or the + error can be correlated with other events for the same rpcMsgid. +* It wasn't very hard for any part of the code to contribute to this Error. + Each part of the stack has just a few lines to provide exactly what it knows, + with very little boilerplate. + +It's not expected that you'd use these complex forms all the time. Despite +supporting the complex case above, you can still just do: + + new VError("my service isn't working"); + +for the simple cases. + + +# Reference: VError, WError, SError + +VError, WError, and SError are convenient drop-in replacements for `Error` that +support printf-style arguments, first-class causes, informational properties, +and other useful features. + + +## Constructors + +The VError constructor has several forms: + +```javascript +/* + * This is the most general form. You can specify any supported options + * (including "cause" and "info") this way. + */ +new VError(options, sprintf_args...) + +/* + * This is a useful shorthand when the only option you need is "cause". + */ +new VError(cause, sprintf_args...) + +/* + * This is a useful shorthand when you don't need any options at all. + */ +new VError(sprintf_args...) +``` + +All of these forms construct a new VError that behaves just like the built-in +JavaScript `Error` class, with some additional methods described below. + +In the first form, `options` is a plain object with any of the following +optional properties: + +Option name | Type | Meaning +---------------- | ---------------- | ------- +`name` | string | Describes what kind of error this is. This is intended for programmatic use to distinguish between different kinds of errors. Note that in modern versions of Node.js, this name is ignored in the `stack` property value, but callers can still use the `name` property to get at it. +`cause` | any Error object | Indicates that the new error was caused by `cause`. See `cause()` below. If unspecified, the cause will be `null`. +`strict` | boolean | If true, then `null` and `undefined` values in `sprintf_args` are passed through to `sprintf()`. Otherwise, these are replaced with the strings `'null'`, and '`undefined`', respectively. +`constructorOpt` | function | If specified, then the stack trace for this error ends at function `constructorOpt`. Functions called by `constructorOpt` will not show up in the stack. This is useful when this class is subclassed. +`info` | object | Specifies arbitrary informational properties that are available through the `VError.info(err)` static class method. See that method for details. + +The second form is equivalent to using the first form with the specified `cause` +as the error's cause. This form is distinguished from the first form because +the first argument is an Error. + +The third form is equivalent to using the first form with all default option +values. This form is distinguished from the other forms because the first +argument is not an object or an Error. + +The `WError` constructor is used exactly the same way as the `VError` +constructor. The `SError` constructor is also used the same way as the +`VError` constructor except that in all cases, the `strict` property is +overriden to `true. + + +## Public properties + +`VError`, `WError`, and `SError` all provide the same public properties as +JavaScript's built-in Error objects. + +Property name | Type | Meaning +------------- | ------ | ------- +`name` | string | Programmatically-usable name of the error. +`message` | string | Human-readable summary of the failure. Programmatically-accessible details are provided through `VError.info(err)` class method. +`stack` | string | Human-readable stack trace where the Error was constructed. + +For all of these classes, the printf-style arguments passed to the constructor +are processed with `sprintf()` to form a message. For `WError`, this becomes +the complete `message` property. For `SError` and `VError`, this message is +prepended to the message of the cause, if any (with a suitable separator), and +the result becomes the `message` property. + +The `stack` property is managed entirely by the underlying JavaScript +implementation. It's generally implemented using a getter function because +constructing the human-readable stack trace is somewhat expensive. + +## Class methods + +The following methods are defined on the `VError` class and as exported +functions on the `verror` module. They're defined this way rather than using +methods on VError instances so that they can be used on Errors not created with +`VError`. + +### `VError.cause(err)` + +The `cause()` function returns the next Error in the cause chain for `err`, or +`null` if there is no next error. See the `cause` argument to the constructor. +Errors can have arbitrarily long cause chains. You can walk the `cause` chain +by invoking `VError.cause(err)` on each subsequent return value. If `err` is +not a `VError`, the cause is `null`. + +### `VError.info(err)` + +Returns an object with all of the extra error information that's been associated +with this Error and all of its causes. These are the properties passed in using +the `info` option to the constructor. Properties not specified in the +constructor for this Error are implicitly inherited from this error's cause. + +These properties are intended to provide programmatically-accessible metadata +about the error. For an error that indicates a failure to resolve a DNS name, +informational properties might include the DNS name to be resolved, or even the +list of resolvers used to resolve it. The values of these properties should +generally be plain objects (i.e., consisting only of null, undefined, numbers, +booleans, strings, and objects and arrays containing only other plain objects). + +### `VError.fullStack(err)` + +Returns a string containing the full stack trace, with all nested errors recursively +reported as `'caused by:' + err.stack`. + +### `VError.findCauseByName(err, name)` + +The `findCauseByName()` function traverses the cause chain for `err`, looking +for an error whose `name` property matches the passed in `name` value. If no +match is found, `null` is returned. + +If all you want is to know _whether_ there's a cause (and you don't care what it +is), you can use `VError.hasCauseWithName(err, name)`. + +If a vanilla error or a non-VError error is passed in, then there is no cause +chain to traverse. In this scenario, the function will check the `name` +property of only `err`. + +### `VError.hasCauseWithName(err, name)` + +Returns true if and only if `VError.findCauseByName(err, name)` would return +a non-null value. This essentially determines whether `err` has any cause in +its cause chain that has name `name`. + +### `VError.errorFromList(errors)` + +Given an array of Error objects (possibly empty), return a single error +representing the whole collection of errors. If the list has: + +* 0 elements, returns `null` +* 1 element, returns the sole error +* more than 1 element, returns a MultiError referencing the whole list + +This is useful for cases where an operation may produce any number of errors, +and you ultimately want to implement the usual `callback(err)` pattern. You can +accumulate the errors in an array and then invoke +`callback(VError.errorFromList(errors))` when the operation is complete. + + +### `VError.errorForEach(err, func)` + +Convenience function for iterating an error that may itself be a MultiError. + +In all cases, `err` must be an Error. If `err` is a MultiError, then `func` is +invoked as `func(errorN)` for each of the underlying errors of the MultiError. +If `err` is any other kind of error, `func` is invoked once as `func(err)`. In +all cases, `func` is invoked synchronously. + +This is useful for cases where an operation may produce any number of warnings +that may be encapsulated with a MultiError -- but may not be. + +This function does not iterate an error's cause chain. + + +## Examples + +The "Demo" section above covers several basic cases. Here's a more advanced +case: + +```javascript +var err1 = new VError('something bad happened'); +/* ... */ +var err2 = new VError({ + 'name': 'ConnectionError', + 'cause': err1, + 'info': { + 'errno': 'ECONNREFUSED', + 'remote_ip': '127.0.0.1', + 'port': 215 + } +}, 'failed to connect to "%s:%d"', '127.0.0.1', 215); + +console.log(err2.message); +console.log(err2.name); +console.log(VError.info(err2)); +console.log(err2.stack); +``` + +This outputs: + + failed to connect to "127.0.0.1:215": something bad happened + ConnectionError + { errno: 'ECONNREFUSED', remote_ip: '127.0.0.1', port: 215 } + ConnectionError: failed to connect to "127.0.0.1:215": something bad happened + at Object. (/home/dap/node-verror/examples/info.js:5:12) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:935:3 + +Information properties are inherited up the cause chain, with values at the top +of the chain overriding same-named values lower in the chain. To continue that +example: + +```javascript +var err3 = new VError({ + 'name': 'RequestError', + 'cause': err2, + 'info': { + 'errno': 'EBADREQUEST' + } +}, 'request failed'); + +console.log(err3.message); +console.log(err3.name); +console.log(VError.info(err3)); +console.log(err3.stack); +``` + +This outputs: + + request failed: failed to connect to "127.0.0.1:215": something bad happened + RequestError + { errno: 'EBADREQUEST', remote_ip: '127.0.0.1', port: 215 } + RequestError: request failed: failed to connect to "127.0.0.1:215": something bad happened + at Object. (/home/dap/node-verror/examples/info.js:20:12) + at Module._compile (module.js:456:26) + at Object.Module._extensions..js (module.js:474:10) + at Module.load (module.js:356:32) + at Function.Module._load (module.js:312:12) + at Function.Module.runMain (module.js:497:10) + at startup (node.js:119:16) + at node.js:935:3 + +You can also print the complete stack trace of combined `Error`s by using +`VError.fullStack(err).` + +```javascript +var err1 = new VError('something bad happened'); +/* ... */ +var err2 = new VError(err1, 'something really bad happened here'); + +console.log(VError.fullStack(err2)); +``` + +This outputs: + + VError: something really bad happened here: something bad happened + at Object. (/home/dap/node-verror/examples/fullStack.js:5:12) + at Module._compile (module.js:409:26) + at Object.Module._extensions..js (module.js:416:10) + at Module.load (module.js:343:32) + at Function.Module._load (module.js:300:12) + at Function.Module.runMain (module.js:441:10) + at startup (node.js:139:18) + at node.js:968:3 + caused by: VError: something bad happened + at Object. (/home/dap/node-verror/examples/fullStack.js:3:12) + at Module._compile (module.js:409:26) + at Object.Module._extensions..js (module.js:416:10) + at Module.load (module.js:343:32) + at Function.Module._load (module.js:300:12) + at Function.Module.runMain (module.js:441:10) + at startup (node.js:139:18) + at node.js:968:3 + +`VError.fullStack` is also safe to use on regular `Error`s, so feel free to use +it whenever you need to extract the stack trace from an `Error`, regardless if +it's a `VError` or not. + +# Reference: MultiError + +MultiError is an Error class that represents a group of Errors. This is used +when you logically need to provide a single Error, but you want to preserve +information about multiple underying Errors. A common case is when you execute +several operations in parallel and some of them fail. + +MultiErrors are constructed as: + +```javascript +new MultiError(error_list) +``` + +`error_list` is an array of at least one `Error` object. + +The cause of the MultiError is the first error provided. None of the other +`VError` options are supported. The `message` for a MultiError consists the +`message` from the first error, prepended with a message indicating that there +were other errors. + +For example: + +```javascript +err = new MultiError([ + new Error('failed to resolve DNS name "abc.example.com"'), + new Error('failed to resolve DNS name "def.example.com"'), +]); + +console.error(err.message); +``` + +outputs: + + first of 2 errors: failed to resolve DNS name "abc.example.com" + +See the convenience function `VError.errorFromList`, which is sometimes simpler +to use than this constructor. + +## Public methods + + +### `errors()` + +Returns an array of the errors used to construct this MultiError. + + +# Contributing + +See separate [contribution guidelines](CONTRIBUTING.md). diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/lib/verror.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/lib/verror.js new file mode 100644 index 0000000..8663dde --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/lib/verror.js @@ -0,0 +1,451 @@ +/* + * verror.js: richer JavaScript errors + */ + +var mod_assertplus = require('assert-plus'); +var mod_util = require('util'); + +var mod_extsprintf = require('extsprintf'); +var mod_isError = require('core-util-is').isError; +var sprintf = mod_extsprintf.sprintf; + +/* + * Public interface + */ + +/* So you can 'var VError = require('verror')' */ +module.exports = VError; +/* For compatibility */ +VError.VError = VError; +/* Other exported classes */ +VError.SError = SError; +VError.WError = WError; +VError.MultiError = MultiError; + +/* + * Common function used to parse constructor arguments for VError, WError, and + * SError. Named arguments to this function: + * + * strict force strict interpretation of sprintf arguments, even + * if the options in "argv" don't say so + * + * argv error's constructor arguments, which are to be + * interpreted as described in README.md. For quick + * reference, "argv" has one of the following forms: + * + * [ sprintf_args... ] (argv[0] is a string) + * [ cause, sprintf_args... ] (argv[0] is an Error) + * [ options, sprintf_args... ] (argv[0] is an object) + * + * This function normalizes these forms, producing an object with the following + * properties: + * + * options equivalent to "options" in third form. This will never + * be a direct reference to what the caller passed in + * (i.e., it may be a shallow copy), so it can be freely + * modified. + * + * shortmessage result of sprintf(sprintf_args), taking options.strict + * into account as described in README.md. + */ +function parseConstructorArguments(args) +{ + var argv, options, sprintf_args, shortmessage, k; + + mod_assertplus.object(args, 'args'); + mod_assertplus.bool(args.strict, 'args.strict'); + mod_assertplus.array(args.argv, 'args.argv'); + argv = args.argv; + + /* + * First, figure out which form of invocation we've been given. + */ + if (argv.length === 0) { + options = {}; + sprintf_args = []; + } else if (mod_isError(argv[0])) { + options = { 'cause': argv[0] }; + sprintf_args = argv.slice(1); + } else if (typeof (argv[0]) === 'object') { + options = {}; + for (k in argv[0]) { + options[k] = argv[0][k]; + } + sprintf_args = argv.slice(1); + } else { + mod_assertplus.string(argv[0], + 'first argument to VError, SError, or WError ' + + 'constructor must be a string, object, or Error'); + options = {}; + sprintf_args = argv; + } + + /* + * Now construct the error's message. + * + * extsprintf (which we invoke here with our caller's arguments in order + * to construct this Error's message) is strict in its interpretation of + * values to be processed by the "%s" specifier. The value passed to + * extsprintf must actually be a string or something convertible to a + * String using .toString(). Passing other values (notably "null" and + * "undefined") is considered a programmer error. The assumption is + * that if you actually want to print the string "null" or "undefined", + * then that's easy to do that when you're calling extsprintf; on the + * other hand, if you did NOT want that (i.e., there's actually a bug + * where the program assumes some variable is non-null and tries to + * print it, which might happen when constructing a packet or file in + * some specific format), then it's better to stop immediately than + * produce bogus output. + * + * However, sometimes the bug is only in the code calling VError, and a + * programmer might prefer to have the error message contain "null" or + * "undefined" rather than have the bug in the error path crash the + * program (making the first bug harder to identify). For that reason, + * by default VError converts "null" or "undefined" arguments to their + * string representations and passes those to extsprintf. Programmers + * desiring the strict behavior can use the SError class or pass the + * "strict" option to the VError constructor. + */ + mod_assertplus.object(options); + if (!options.strict && !args.strict) { + sprintf_args = sprintf_args.map(function (a) { + return (a === null ? 'null' : + a === undefined ? 'undefined' : a); + }); + } + + if (sprintf_args.length === 0) { + shortmessage = ''; + } else { + shortmessage = sprintf.apply(null, sprintf_args); + } + + return ({ + 'options': options, + 'shortmessage': shortmessage + }); +} + +/* + * See README.md for reference documentation. + */ +function VError() +{ + var args, obj, parsed, cause, ctor, message, k; + + args = Array.prototype.slice.call(arguments, 0); + + /* + * This is a regrettable pattern, but JavaScript's built-in Error class + * is defined to work this way, so we allow the constructor to be called + * without "new". + */ + if (!(this instanceof VError)) { + obj = Object.create(VError.prototype); + VError.apply(obj, arguments); + return (obj); + } + + /* + * For convenience and backwards compatibility, we support several + * different calling forms. Normalize them here. + */ + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + /* + * If we've been given a name, apply it now. + */ + if (parsed.options.name) { + mod_assertplus.string(parsed.options.name, + 'error\'s "name" must be a string'); + this.name = parsed.options.name; + } + + /* + * For debugging, we keep track of the original short message (attached + * this Error particularly) separately from the complete message (which + * includes the messages of our cause chain). + */ + this.jse_shortmsg = parsed.shortmessage; + message = parsed.shortmessage; + + /* + * If we've been given a cause, record a reference to it and update our + * message appropriately. + */ + cause = parsed.options.cause; + if (cause) { + mod_assertplus.ok(mod_isError(cause), 'cause is not an Error'); + this.jse_cause = cause; + + if (!parsed.options.skipCauseMessage) { + message += ': ' + cause.message; + } + } + + /* + * If we've been given an object with properties, shallow-copy that + * here. We don't want to use a deep copy in case there are non-plain + * objects here, but we don't want to use the original object in case + * the caller modifies it later. + */ + this.jse_info = {}; + if (parsed.options.info) { + for (k in parsed.options.info) { + this.jse_info[k] = parsed.options.info[k]; + } + } + + this.message = message; + Error.call(this, message); + + if (Error.captureStackTrace) { + ctor = parsed.options.constructorOpt || this.constructor; + Error.captureStackTrace(this, ctor); + } + + return (this); +} + +mod_util.inherits(VError, Error); +VError.prototype.name = 'VError'; + +VError.prototype.toString = function ve_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + + return (str); +}; + +/* + * This method is provided for compatibility. New callers should use + * VError.cause() instead. That method also uses the saner `null` return value + * when there is no cause. + */ +VError.prototype.cause = function ve_cause() +{ + var cause = VError.cause(this); + return (cause === null ? undefined : cause); +}; + +/* + * Static methods + * + * These class-level methods are provided so that callers can use them on + * instances of Errors that are not VErrors. New interfaces should be provided + * only using static methods to eliminate the class of programming mistake where + * people fail to check whether the Error object has the corresponding methods. + */ + +VError.cause = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + return (mod_isError(err.jse_cause) ? err.jse_cause : null); +}; + +VError.info = function (err) +{ + var rv, cause, k; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + cause = VError.cause(err); + if (cause !== null) { + rv = VError.info(cause); + } else { + rv = {}; + } + + if (typeof (err.jse_info) == 'object' && err.jse_info !== null) { + for (k in err.jse_info) { + rv[k] = err.jse_info[k]; + } + } + + return (rv); +}; + +VError.findCauseByName = function (err, name) +{ + var cause; + + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.string(name, 'name'); + mod_assertplus.ok(name.length > 0, 'name cannot be empty'); + + for (cause = err; cause !== null; cause = VError.cause(cause)) { + mod_assertplus.ok(mod_isError(cause)); + if (cause.name == name) { + return (cause); + } + } + + return (null); +}; + +VError.hasCauseWithName = function (err, name) +{ + return (VError.findCauseByName(err, name) !== null); +}; + +VError.fullStack = function (err) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + + var cause = VError.cause(err); + + if (cause) { + return (err.stack + '\ncaused by: ' + VError.fullStack(cause)); + } + + return (err.stack); +}; + +VError.errorFromList = function (errors) +{ + mod_assertplus.arrayOfObject(errors, 'errors'); + + if (errors.length === 0) { + return (null); + } + + errors.forEach(function (e) { + mod_assertplus.ok(mod_isError(e)); + }); + + if (errors.length == 1) { + return (errors[0]); + } + + return (new MultiError(errors)); +}; + +VError.errorForEach = function (err, func) +{ + mod_assertplus.ok(mod_isError(err), 'err must be an Error'); + mod_assertplus.func(func, 'func'); + + if (err instanceof MultiError) { + err.errors().forEach(function iterError(e) { func(e); }); + } else { + func(err); + } +}; + + +/* + * SError is like VError, but stricter about types. You cannot pass "null" or + * "undefined" as string arguments to the formatter. + */ +function SError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof SError)) { + obj = Object.create(SError.prototype); + SError.apply(obj, arguments); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': true + }); + + options = parsed.options; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +/* + * We don't bother setting SError.prototype.name because once constructed, + * SErrors are just like VErrors. + */ +mod_util.inherits(SError, VError); + + +/* + * Represents a collection of errors for the purpose of consumers that generally + * only deal with one error. Callers can extract the individual errors + * contained in this object, but may also just treat it as a normal single + * error, in which case a summary message will be printed. + */ +function MultiError(errors) +{ + mod_assertplus.array(errors, 'list of errors'); + mod_assertplus.ok(errors.length > 0, 'must be at least one error'); + this.ase_errors = errors; + + VError.call(this, { + 'cause': errors[0] + }, 'first of %d error%s', errors.length, errors.length == 1 ? '' : 's'); +} + +mod_util.inherits(MultiError, VError); +MultiError.prototype.name = 'MultiError'; + +MultiError.prototype.errors = function me_errors() +{ + return (this.ase_errors.slice(0)); +}; + + +/* + * See README.md for reference details. + */ +function WError() +{ + var args, obj, parsed, options; + + args = Array.prototype.slice.call(arguments, 0); + if (!(this instanceof WError)) { + obj = Object.create(WError.prototype); + WError.apply(obj, args); + return (obj); + } + + parsed = parseConstructorArguments({ + 'argv': args, + 'strict': false + }); + + options = parsed.options; + options['skipCauseMessage'] = true; + VError.call(this, options, '%s', parsed.shortmessage); + + return (this); +} + +mod_util.inherits(WError, VError); +WError.prototype.name = 'WError'; + +WError.prototype.toString = function we_toString() +{ + var str = (this.hasOwnProperty('name') && this.name || + this.constructor.name || this.constructor.prototype.name); + if (this.message) + str += ': ' + this.message; + if (this.jse_cause && this.jse_cause.message) + str += '; caused by ' + this.jse_cause.toString(); + + return (str); +}; + +/* + * For purely historical reasons, WError's cause() function allows you to set + * the cause. + */ +WError.prototype.cause = function we_cause(c) +{ + if (mod_isError(c)) + this.jse_cause = c; + + return (this.jse_cause); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/package.json new file mode 100644 index 0000000..bef35ec --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/verror/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + { + "raw": "verror@1.10.0", + "scope": null, + "escapedName": "verror", + "name": "verror", + "rawSpec": "1.10.0", + "spec": "1.10.0", + "type": "version" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/jsprim" + ] + ], + "_from": "verror@1.10.0", + "_id": "verror@1.10.0", + "_inCache": true, + "_location": "/verror", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/verror-1.10.0.tgz_1493743247437_0.7535550429020077" + }, + "_npmUser": { + "name": "dap", + "email": "dap@cs.brown.edu" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "verror@1.10.0", + "scope": null, + "escapedName": "verror", + "name": "verror", + "rawSpec": "1.10.0", + "spec": "1.10.0", + "type": "version" + }, + "_requiredBy": [ + "/jsprim" + ], + "_resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "_shasum": "3a105ca17053af55d6e270c1f8288682e18da400", + "_shrinkwrap": null, + "_spec": "verror@1.10.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/jsprim", + "bugs": { + "url": "https://github.com/davepacheco/node-verror/issues" + }, + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "description": "richer JavaScript errors", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3a105ca17053af55d6e270c1f8288682e18da400", + "tarball": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz" + }, + "engines": [ + "node >=0.6.0" + ], + "homepage": "https://github.com/davepacheco/node-verror", + "license": "MIT", + "main": "./lib/verror.js", + "maintainers": [ + { + "name": "dap", + "email": "dap@cs.brown.edu" + } + ], + "name": "verror", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/davepacheco/node-verror.git" + }, + "scripts": { + "test": "make test" + }, + "version": "1.10.0" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/.npmignore new file mode 100644 index 0000000..2b1e5b1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/.npmignore @@ -0,0 +1,9 @@ +.vscode/ +lib/test/ +lib/*.map +src/ +test/ +.eslintrc +.gitignore +gulpfile.js +tsd.json \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/License.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/License.txt new file mode 100644 index 0000000..027ef92 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/License.txt @@ -0,0 +1,11 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/README.md new file mode 100644 index 0000000..2b01210 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/README.md @@ -0,0 +1,46 @@ +# VSCode JSON RPC + +[![NPM Version](https://img.shields.io/npm/v/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-jsonrpc.svg)](https://npmjs.org/package/vscode-jsonrpc) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +This npm module implements the base messaging protocol spoken between a VSCode language server and a VSCode language client. + +The npm module can also be used standalone to establish a [JSON-RPC](http://www.jsonrpc.org/) channel between +a client and a server. Below an example how to setup a JSON-RPC connection. First the client side. + +```ts +import * as cp from 'child_process'; +import * as rpc from 'vscode-jsonrpc'; + +let childProcess = cp.spawn(...); + +// Use stdin and stdout for communication: +let connection = rpc.createClientMessageConnection( + new rpc.StreamMessageReader(childProcess.stdout), + new rpc.StreamMessageWriter(childProcess.stdin)); + +let notification: rpc.NotificationType = { method: 'testNotification' }; + +connection.listen(); + +connection.sendNotification(notification, 'Hello World'); +``` + +The server side looks very symmetrical: + +```ts +import * as rpc from 'vscode-jsonrpc'; + + +let connection = rpc.createClientMessageConnection( + new rpc.StreamMessageReader(process.stdin), + new rpc.StreamMessageWriter(process.stdout)); + +let notification: rpc.NotificationType = { method: 'testNotification' }; +connection.onNotification(notification, (param: string) => { + console.log(param); // This prints Hello World +}); + +connection.listen(); +``` \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.d.ts new file mode 100644 index 0000000..f6a23f2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.d.ts @@ -0,0 +1,21 @@ +import { Event } from './events'; +export interface CancellationToken { + /** + * Is `true` when the token has been cancelled, `false` otherwise. + */ + isCancellationRequested: boolean; + /** + * An [event](#Event) which fires upon cancellation. + */ + onCancellationRequested: Event; +} +export declare namespace CancellationToken { + const None: CancellationToken; + const Cancelled: CancellationToken; +} +export declare class CancellationTokenSource { + private _token; + token: CancellationToken; + cancel(): void; + dispose(): void; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.js new file mode 100644 index 0000000..8435023 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/cancellation.js @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +var events_1 = require('./events'); +var CancellationToken; +(function (CancellationToken) { + CancellationToken.None = Object.freeze({ + isCancellationRequested: false, + onCancellationRequested: events_1.Event.None + }); + CancellationToken.Cancelled = Object.freeze({ + isCancellationRequested: true, + onCancellationRequested: events_1.Event.None + }); +})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {})); +var shortcutEvent = Object.freeze(function (callback, context) { + var handle = setTimeout(callback.bind(context), 0); + return { dispose: function () { clearTimeout(handle); } }; +}); +var MutableToken = (function () { + function MutableToken() { + this._isCancelled = false; + } + MutableToken.prototype.cancel = function () { + if (!this._isCancelled) { + this._isCancelled = true; + if (this._emitter) { + this._emitter.fire(undefined); + this._emitter = undefined; + } + } + }; + Object.defineProperty(MutableToken.prototype, "isCancellationRequested", { + get: function () { + return this._isCancelled; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(MutableToken.prototype, "onCancellationRequested", { + get: function () { + if (this._isCancelled) { + return shortcutEvent; + } + if (!this._emitter) { + this._emitter = new events_1.Emitter(); + } + return this._emitter.event; + }, + enumerable: true, + configurable: true + }); + return MutableToken; +}()); +var CancellationTokenSource = (function () { + function CancellationTokenSource() { + } + Object.defineProperty(CancellationTokenSource.prototype, "token", { + get: function () { + if (!this._token) { + // be lazy and create the token only when + // actually needed + this._token = new MutableToken(); + } + return this._token; + }, + enumerable: true, + configurable: true + }); + CancellationTokenSource.prototype.cancel = function () { + if (!this._token) { + // save an object by returning the default + // cancelled token when cancellation happens + // before someone asks for the token + this._token = CancellationToken.Cancelled; + } + else { + this._token.cancel(); + } + }; + CancellationTokenSource.prototype.dispose = function () { + this.cancel(); + }; + return CancellationTokenSource; +}()); +exports.CancellationTokenSource = CancellationTokenSource; +//# sourceMappingURL=cancellation.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.d.ts new file mode 100644 index 0000000..54e9739 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.d.ts @@ -0,0 +1,44 @@ +export interface Disposable { + /** + * Dispose this object. + */ + dispose(): any; +} +/** + * Represents a typed event. + */ +export interface Event { + /** + * + * @param listener The listener function will be call when the event happens. + * @param thisArgs The 'this' which will be used when calling the event listener. + * @param disposables An array to which a {{IDisposable}} will be added. The + * @return + */ + (listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; +} +export declare namespace Event { + const None: Event; +} +export interface EmitterOptions { + onFirstListenerAdd?: Function; + onLastListenerRemove?: Function; +} +export declare class Emitter { + private _options; + private static _noop; + private _event; + private _callbacks; + constructor(_options?: EmitterOptions); + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + event: Event; + /** + * To be kept private to fire an event to + * subscribers + */ + fire(event: T): any; + dispose(): void; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.js new file mode 100644 index 0000000..1cd1639 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/events.js @@ -0,0 +1,180 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var Event; +(function (Event) { + var _disposable = { dispose: function () { } }; + Event.None = function () { return _disposable; }; +})(Event = exports.Event || (exports.Event = {})); +/** + * Represents a type which can release resources, such + * as event listening or a timer. + */ +var DisposableImpl = (function () { + function DisposableImpl(callOnDispose) { + this._callOnDispose = callOnDispose; + } + /** + * Combine many disposable-likes into one. Use this method + * when having objects with a dispose function which are not + * instances of Disposable. + * + * @return Returns a new disposable which, upon dispose, will + * dispose all provides disposable-likes. + */ + DisposableImpl.from = function () { + var disposables = []; + for (var _i = 0; _i < arguments.length; _i++) { + disposables[_i - 0] = arguments[_i]; + } + return new DisposableImpl(function () { + if (disposables) { + for (var _i = 0, disposables_1 = disposables; _i < disposables_1.length; _i++) { + var disposable = disposables_1[_i]; + disposable.dispose(); + } + disposables = undefined; + } + }); + }; + /** + * Dispose this object. + */ + DisposableImpl.prototype.dispose = function () { + if (typeof this._callOnDispose === 'function') { + this._callOnDispose(); + this._callOnDispose = undefined; + } + }; + return DisposableImpl; +}()); +var CallbackList = (function () { + function CallbackList() { + } + CallbackList.prototype.add = function (callback, context, bucket) { + var _this = this; + if (context === void 0) { context = null; } + if (!this._callbacks) { + this._callbacks = []; + this._contexts = []; + } + this._callbacks.push(callback); + this._contexts.push(context); + if (Array.isArray(bucket)) { + bucket.push({ dispose: function () { return _this.remove(callback, context); } }); + } + }; + CallbackList.prototype.remove = function (callback, context) { + if (context === void 0) { context = null; } + if (!this._callbacks) { + return; + } + var foundCallbackWithDifferentContext = false; + for (var i = 0, len = this._callbacks.length; i < len; i++) { + if (this._callbacks[i] === callback) { + if (this._contexts[i] === context) { + // callback & context match => remove it + this._callbacks.splice(i, 1); + this._contexts.splice(i, 1); + return; + } + else { + foundCallbackWithDifferentContext = true; + } + } + } + if (foundCallbackWithDifferentContext) { + throw new Error('When adding a listener with a context, you should remove it with the same context'); + } + }; + CallbackList.prototype.invoke = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i - 0] = arguments[_i]; + } + if (!this._callbacks) { + return; + } + var ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0); + for (var i = 0, len = callbacks.length; i < len; i++) { + try { + ret.push(callbacks[i].apply(contexts[i], args)); + } + catch (e) { + console.error(e); + } + } + return ret; + }; + CallbackList.prototype.isEmpty = function () { + return !this._callbacks || this._callbacks.length === 0; + }; + CallbackList.prototype.dispose = function () { + this._callbacks = undefined; + this._contexts = undefined; + }; + return CallbackList; +}()); +var Emitter = (function () { + function Emitter(_options) { + this._options = _options; + } + Object.defineProperty(Emitter.prototype, "event", { + /** + * For the public to allow to subscribe + * to events from this Emitter + */ + get: function () { + var _this = this; + if (!this._event) { + this._event = function (listener, thisArgs, disposables) { + if (!_this._callbacks) { + _this._callbacks = new CallbackList(); + } + if (_this._options && _this._options.onFirstListenerAdd && _this._callbacks.isEmpty()) { + _this._options.onFirstListenerAdd(_this); + } + _this._callbacks.add(listener, thisArgs); + var result; + result = { + dispose: function () { + _this._callbacks.remove(listener, thisArgs); + result.dispose = Emitter._noop; + if (_this._options && _this._options.onLastListenerRemove && _this._callbacks.isEmpty()) { + _this._options.onLastListenerRemove(_this); + } + } + }; + if (Array.isArray(disposables)) { + disposables.push(result); + } + return result; + }; + } + return this._event; + }, + enumerable: true, + configurable: true + }); + /** + * To be kept private to fire an event to + * subscribers + */ + Emitter.prototype.fire = function (event) { + if (this._callbacks) { + this._callbacks.invoke.call(this._callbacks, event); + } + }; + Emitter.prototype.dispose = function () { + if (this._callbacks) { + this._callbacks.dispose(); + this._callbacks = undefined; + } + }; + Emitter._noop = function () { }; + return Emitter; +}()); +exports.Emitter = Emitter; +//# sourceMappingURL=events.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.d.ts new file mode 100644 index 0000000..d345047 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.d.ts @@ -0,0 +1,10 @@ +export declare function defined(value: any): boolean; +export declare function undefined(value: any): boolean; +export declare function nil(value: any): boolean; +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.js new file mode 100644 index 0000000..d5e6e3d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/is.js @@ -0,0 +1,47 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var toString = Object.prototype.toString; +function defined(value) { + return typeof value !== 'undefined'; +} +exports.defined = defined; +function undefined(value) { + return typeof value === 'undefined'; +} +exports.undefined = undefined; +function nil(value) { + return value === null; +} +exports.nil = nil; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return toString.call(value) === '[object String]'; +} +exports.string = string; +function number(value) { + return toString.call(value) === '[object Number]'; +} +exports.number = number; +function error(value) { + return toString.call(value) === '[object Error]'; +} +exports.error = error; +function func(value) { + return toString.call(value) === '[object Function]'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(function (elem) { return string(elem); }); +} +exports.stringArray = stringArray; +//# sourceMappingURL=is.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.d.ts new file mode 100644 index 0000000..b8d6c0a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.d.ts @@ -0,0 +1,65 @@ +import { Message, RequestMessage, RequestType, ResponseError, ErrorCodes, NotificationMessage, NotificationType } from './messages'; +import { MessageReader, DataCallback, StreamMessageReader, IPCMessageReader } from './messageReader'; +import { MessageWriter, StreamMessageWriter, IPCMessageWriter } from './messageWriter'; +import { Disposable, Event, Emitter } from './events'; +import { CancellationTokenSource, CancellationToken } from './cancellation'; +export { Message, ErrorCodes, ResponseError, RequestMessage, RequestType, NotificationMessage, NotificationType, MessageReader, DataCallback, StreamMessageReader, IPCMessageReader, MessageWriter, StreamMessageWriter, IPCMessageWriter, CancellationTokenSource, CancellationToken, Disposable, Event, Emitter }; +export interface RequestHandler { + (params: P, token: CancellationToken): R | ResponseError | Thenable>; +} +export interface NotificationHandler

{ + (params: P): void; +} +export interface Logger { + error(message: string): void; + warn(message: string): void; + info(message: string): void; + log(message: string): void; +} +export declare enum Trace { + Off = 0, + Messages = 1, + Verbose = 2, +} +export declare type TraceValues = 'off' | 'messages' | 'verbose'; +export declare namespace Trace { + function fromString(value: string): Trace; + function toString(value: Trace): TraceValues; +} +export interface SetTraceParams { + value: TraceValues; +} +export declare namespace SetTraceNotification { + const type: NotificationType; +} +export interface LogTraceParams { + message: string; + verbose?: string; +} +export declare namespace LogTraceNotification { + const type: NotificationType; +} +export interface Tracer { + log(message: string, data?: string): void; +} +export interface MessageConnection { + sendRequest(type: RequestType, params: P, token?: CancellationToken): Thenable; + onRequest(type: RequestType, handler: RequestHandler): void; + sendNotification

(type: NotificationType

, params?: P): void; + onNotification

(type: NotificationType

, handler: NotificationHandler

): void; + trace(value: Trace, tracer: Tracer, sendNotification?: boolean): void; + onError: Event<[Error, Message, number]>; + onClose: Event; + onUnhandledNotification: Event; + listen(): any; + onDispose: Event; + dispose(): void; +} +export interface ServerMessageConnection extends MessageConnection { +} +export interface ClientMessageConnection extends MessageConnection { +} +export declare function createServerMessageConnection(reader: MessageReader, writer: MessageWriter, logger: Logger): ServerMessageConnection; +export declare function createServerMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger: Logger): ServerMessageConnection; +export declare function createClientMessageConnection(reader: MessageReader, writer: MessageWriter, logger: Logger): ClientMessageConnection; +export declare function createClientMessageConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream, logger: Logger): ClientMessageConnection; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.js new file mode 100644 index 0000000..01f8b86 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/main.js @@ -0,0 +1,499 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var is = require('./is'); +var messages_1 = require('./messages'); +exports.ResponseError = messages_1.ResponseError; +exports.ErrorCodes = messages_1.ErrorCodes; +var messageReader_1 = require('./messageReader'); +exports.StreamMessageReader = messageReader_1.StreamMessageReader; +exports.IPCMessageReader = messageReader_1.IPCMessageReader; +var messageWriter_1 = require('./messageWriter'); +exports.StreamMessageWriter = messageWriter_1.StreamMessageWriter; +exports.IPCMessageWriter = messageWriter_1.IPCMessageWriter; +var events_1 = require('./events'); +exports.Event = events_1.Event; +exports.Emitter = events_1.Emitter; +var cancellation_1 = require('./cancellation'); +exports.CancellationTokenSource = cancellation_1.CancellationTokenSource; +exports.CancellationToken = cancellation_1.CancellationToken; +var CancelNotification; +(function (CancelNotification) { + CancelNotification.type = { get method() { return '$/cancelRequest'; } }; +})(CancelNotification || (CancelNotification = {})); +(function (Trace) { + Trace[Trace["Off"] = 0] = "Off"; + Trace[Trace["Messages"] = 1] = "Messages"; + Trace[Trace["Verbose"] = 2] = "Verbose"; +})(exports.Trace || (exports.Trace = {})); +var Trace = exports.Trace; +var Trace; +(function (Trace) { + function fromString(value) { + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } + Trace.fromString = fromString; + function toString(value) { + switch (value) { + case Trace.Off: + return 'off'; + case Trace.Messages: + return 'messages'; + case Trace.Verbose: + return 'verbose'; + default: + return 'off'; + } + } + Trace.toString = toString; +})(Trace = exports.Trace || (exports.Trace = {})); +var SetTraceNotification; +(function (SetTraceNotification) { + SetTraceNotification.type = { get method() { return '$/setTraceNotification'; } }; +})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {})); +var LogTraceNotification; +(function (LogTraceNotification) { + LogTraceNotification.type = { get method() { return '$/logTraceNotification'; } }; +})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {})); +var ConnectionState; +(function (ConnectionState) { + ConnectionState[ConnectionState["New"] = 1] = "New"; + ConnectionState[ConnectionState["Listening"] = 2] = "Listening"; + ConnectionState[ConnectionState["Closed"] = 3] = "Closed"; + ConnectionState[ConnectionState["Disposed"] = 4] = "Disposed"; +})(ConnectionState || (ConnectionState = {})); +function createMessageConnection(messageReader, messageWriter, logger, client) { + if (client === void 0) { client = false; } + var sequenceNumber = 0; + var version = '2.0'; + var requestHandlers = Object.create(null); + var eventHandlers = Object.create(null); + var responsePromises = Object.create(null); + var requestTokens = Object.create(null); + var trace = Trace.Off; + var tracer; + var state = ConnectionState.New; + var errorEmitter = new events_1.Emitter(); + var closeEmitter = new events_1.Emitter(); + var unhandledNotificationEmitter = new events_1.Emitter(); + var disposeEmitter = new events_1.Emitter(); + function isListening() { + return state === ConnectionState.Listening; + } + function isClosed() { + return state === ConnectionState.Closed; + } + function isDisposed() { + return state === ConnectionState.Disposed; + } + function closeHandler() { + if (state === ConnectionState.New || state === ConnectionState.Listening) { + state = ConnectionState.Closed; + closeEmitter.fire(undefined); + } + // If the connection is disposed don't sent close events. + } + ; + function readErrorHandler(error) { + errorEmitter.fire([error, undefined, undefined]); + } + function writeErrorHandler(data) { + errorEmitter.fire(data); + } + messageReader.onClose(closeHandler); + messageReader.onError(readErrorHandler); + messageWriter.onClose(closeHandler); + messageWriter.onError(writeErrorHandler); + function handleRequest(requestMessage) { + if (isDisposed()) { + // we return here silently since we fired an event when the + // connection got disposed. + return; + } + function reply(resultOrError) { + var message = { + jsonrpc: version, + id: requestMessage.id + }; + if (resultOrError instanceof messages_1.ResponseError) { + message.error = resultOrError.toJson(); + } + else { + message.result = is.undefined(resultOrError) ? null : resultOrError; + } + messageWriter.write(message); + } + function replyError(error) { + var message = { + jsonrpc: version, + id: requestMessage.id, + error: error.toJson() + }; + messageWriter.write(message); + } + function replySuccess(result) { + // The JSON RPC defines that a response must either have a result or an error + // So we can't treat undefined as a valid response result. + if (is.undefined(result)) { + result = null; + } + var message = { + jsonrpc: version, + id: requestMessage.id, + result: result + }; + messageWriter.write(message); + } + var requestHandler = requestHandlers[requestMessage.method]; + if (requestHandler) { + var cancellationSource = new cancellation_1.CancellationTokenSource(); + var tokenKey_1 = String(requestMessage.id); + requestTokens[tokenKey_1] = cancellationSource; + try { + var handlerResult = requestHandler(requestMessage.params, cancellationSource.token); + var promise = handlerResult; + if (!handlerResult) { + delete requestTokens[tokenKey_1]; + replySuccess(handlerResult); + } + else if (promise.then) { + promise.then(function (resultOrError) { + delete requestTokens[tokenKey_1]; + reply(resultOrError); + }, function (error) { + delete requestTokens[tokenKey_1]; + if (error instanceof messages_1.ResponseError) { + replyError(error); + } + else if (error && is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, "Request " + requestMessage.method + " failed with message: " + error.message)); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, "Request " + requestMessage.method + " failed unexpectedly without providing any details.")); + } + }); + } + else { + delete requestTokens[tokenKey_1]; + reply(handlerResult); + } + } + catch (error) { + delete requestTokens[tokenKey_1]; + if (error instanceof messages_1.ResponseError) { + reply(error); + } + else if (error && is.string(error.message)) { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, "Request " + requestMessage.method + " failed with message: " + error.message)); + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, "Request " + requestMessage.method + " failed unexpectedly without providing any details.")); + } + } + } + else { + replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, "Unhandled method " + requestMessage.method)); + } + } + function handleResponse(responseMessage) { + if (isDisposed()) { + // See handle request. + return; + } + var key = String(responseMessage.id); + var responsePromise = responsePromises[key]; + if (trace != Trace.Off && tracer) { + traceResponse(responseMessage, responsePromise); + } + if (responsePromise) { + delete responsePromises[key]; + try { + if (is.defined(responseMessage.error)) { + var error = responseMessage.error; + responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data)); + } + else if (is.defined(responseMessage.result)) { + responsePromise.resolve(responseMessage.result); + } + else { + throw new Error('Should never happen.'); + } + } + catch (error) { + if (error.message) { + logger.error("Response handler '" + responsePromise.method + "' failed with message: " + error.message); + } + else { + logger.error("Response handler '" + responsePromise.method + "' failed unexpectedly."); + } + } + } + } + function handleNotification(message) { + if (isDisposed()) { + // See handle request. + return; + } + var eventHandler; + if (message.method === CancelNotification.type.method) { + eventHandler = function (params) { + var id = params.id; + var source = requestTokens[String(id)]; + if (source) { + source.cancel(); + } + }; + } + else { + eventHandler = eventHandlers[message.method]; + } + if (eventHandler) { + try { + if (trace != Trace.Off && tracer) { + traceReceivedNotification(message); + } + eventHandler(message.params); + } + catch (error) { + if (error.message) { + logger.error("Notification handler '" + message.method + "' failed with message: " + error.message); + } + else { + logger.error("Notification handler '" + message.method + "' failed unexpectedly."); + } + } + } + else { + unhandledNotificationEmitter.fire(message); + } + } + function handleInvalidMessage(message) { + if (!message) { + logger.error('Received empty message.'); + return; + } + logger.error("Received message which is neither a response nor a notification message:\n" + JSON.stringify(message, null, 4)); + // Test whether we find an id to reject the promise + var responseMessage = message; + if (is.string(responseMessage.id) || is.number(responseMessage.id)) { + var key = String(responseMessage.id); + var responseHandler = responsePromises[key]; + if (responseHandler) { + responseHandler.reject(new Error('The received response has neither a result nor an error property.')); + } + } + } + function traceRequest(message) { + var data = undefined; + if (trace === Trace.Verbose && message.params) { + data = "Params: " + JSON.stringify(message.params, null, 4) + "\n\n"; + } + tracer.log("Sending request '" + message.method + " - (" + message.id + ")'.", data); + } + function traceSendNotification(message) { + var data = undefined; + if (trace === Trace.Verbose) { + if (message.params) { + data = "Params: " + JSON.stringify(message.params, null, 4) + "\n\n"; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log("Sending notification '" + message.method + "'.", data); + } + function traceReceivedNotification(message) { + if (message.method === LogTraceNotification.type.method) { + return; + } + var data = undefined; + if (trace === Trace.Verbose) { + if (message.params) { + data = "Params: " + JSON.stringify(message.params, null, 4) + "\n\n"; + } + else { + data = 'No parameters provided.\n\n'; + } + } + tracer.log("Received notification '" + message.method + "'.", data); + } + function traceResponse(message, responsePromise) { + var data = undefined; + if (trace === Trace.Verbose) { + if (message.error && message.error.data) { + data = "Error data: " + JSON.stringify(message.error.data, null, 4) + "\n\n"; + } + else { + if (message.result) { + data = "Result: " + JSON.stringify(message.result, null, 4) + "\n\n"; + } + else if (is.undefined(message.error)) { + data = 'No result returned.\n\n'; + } + } + } + if (responsePromise) { + var error = message.error ? " Request failed: " + message.error.message + " (" + message.error.code + ")." : ''; + tracer.log("Received response '" + responsePromise.method + " - (" + message.id + ")' in " + (Date.now() - responsePromise.timerStart) + "ms." + error, data); + } + else { + tracer.log("Received response " + message.id + " without active response promise.", data); + } + } + var callback = function (message) { + if (messages_1.isRequestMessage(message)) { + handleRequest(message); + } + else if (messages_1.isReponseMessage(message)) { + handleResponse(message); + } + else if (messages_1.isNotificationMessage(message)) { + handleNotification(message); + } + else { + handleInvalidMessage(message); + } + }; + function throwIfClosedOrDisposed() { + if (isClosed()) { + throw new Error('Connection is closed.'); + } + if (isDisposed()) { + throw new Error('Connection is disposed.'); + } + } + function throwIfListening() { + if (isListening()) { + throw new Error('Connection is already listening'); + } + } + var connection = { + sendNotification: function (type, params) { + throwIfClosedOrDisposed(); + var notificatioMessage = { + jsonrpc: version, + method: type.method, + params: params + }; + if (trace != Trace.Off && tracer) { + traceSendNotification(notificatioMessage); + } + messageWriter.write(notificatioMessage); + }, + onNotification: function (type, handler) { + throwIfClosedOrDisposed(); + eventHandlers[type.method] = handler; + }, + sendRequest: function (type, params, token) { + throwIfClosedOrDisposed(); + var id = sequenceNumber++; + var result = new Promise(function (resolve, reject) { + var requestMessage = { + jsonrpc: version, + id: id, + method: type.method, + params: params + }; + var responsePromise = { method: type.method, timerStart: Date.now(), resolve: resolve, reject: reject }; + if (trace != Trace.Off && tracer) { + traceRequest(requestMessage); + } + try { + messageWriter.write(requestMessage); + } + catch (e) { + // Writing the message failed. So we need to reject the promise. + responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason')); + responsePromise = null; + } + if (responsePromise) { + responsePromises[String(id)] = responsePromise; + } + }); + if (token) { + token.onCancellationRequested(function (event) { + connection.sendNotification(CancelNotification.type, { id: id }); + }); + } + return result; + }, + onRequest: function (type, handler) { + throwIfClosedOrDisposed(); + requestHandlers[type.method] = handler; + }, + trace: function (_value, _tracer, sendNotification) { + if (sendNotification === void 0) { sendNotification = false; } + trace = _value; + if (trace === Trace.Off) { + tracer = null; + } + else { + tracer = _tracer; + } + if (sendNotification && !isClosed() && !isDisposed()) { + connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) }); + } + }, + onError: errorEmitter.event, + onClose: closeEmitter.event, + onUnhandledNotification: unhandledNotificationEmitter.event, + onDispose: disposeEmitter.event, + dispose: function () { + if (isDisposed()) { + return; + } + state = ConnectionState.Disposed; + disposeEmitter.fire(undefined); + var error = new Error('Connection got disposed.'); + Object.keys(responsePromises).forEach(function (key) { + responsePromises[key].reject(error); + }); + responsePromises = Object.create(null); + requestTokens = Object.create(null); + }, + listen: function () { + throwIfClosedOrDisposed(); + throwIfListening(); + state = ConnectionState.Listening; + messageReader.listen(callback); + } + }; + connection.onNotification(LogTraceNotification.type, function (params) { + if (trace === Trace.Off) { + return; + } + tracer.log(params.message, trace === Trace.Verbose ? params.verbose : undefined); + }); + return connection; +} +function isMessageReader(value) { + return is.defined(value.listen) && is.undefined(value.read); +} +function isMessageWriter(value) { + return is.defined(value.write) && is.undefined(value.end); +} +function createServerMessageConnection(input, output, logger) { + var reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input); + var writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output); + return createMessageConnection(reader, writer, logger); +} +exports.createServerMessageConnection = createServerMessageConnection; +function createClientMessageConnection(input, output, logger) { + var reader = isMessageReader(input) ? input : new messageReader_1.StreamMessageReader(input); + var writer = isMessageWriter(output) ? output : new messageWriter_1.StreamMessageWriter(output); + return createMessageConnection(reader, writer, logger, true); +} +exports.createClientMessageConnection = createClientMessageConnection; +//# sourceMappingURL=main.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.d.ts new file mode 100644 index 0000000..fc969dc --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.d.ts @@ -0,0 +1,49 @@ +import { ChildProcess } from 'child_process'; +import { Message } from './messages'; +import { Event } from './events'; +export interface DataCallback { + (data: Message): void; +} +export interface PartialMessageInfo { + messageToken: number; + waitingTime: number; +} +export interface MessageReader { + onError: Event; + onClose: Event; + onPartialMessage: Event; + listen(callback: DataCallback): void; +} +export declare abstract class AbstractMessageReader { + private errorEmitter; + private closeEmitter; + private partialMessageEmitter; + constructor(); + onError: Event; + protected fireError(error: any): void; + onClose: Event; + protected fireClose(): void; + onPartialMessage: Event; + protected firePartialMessage(info: PartialMessageInfo): void; + private asError(error); +} +export declare class StreamMessageReader extends AbstractMessageReader implements MessageReader { + private readable; + private callback; + private buffer; + private nextMessageLength; + private messageToken; + private partialMessageTimer; + private _partialMessageTimeout; + constructor(readable: NodeJS.ReadableStream, encoding?: string); + partialMessageTimeout: number; + listen(callback: DataCallback): void; + private onData(data); + private clearPartialMessageTimer(); + private setPartialMessageTimer(); +} +export declare class IPCMessageReader extends AbstractMessageReader implements MessageReader { + private process; + constructor(process: NodeJS.Process | ChildProcess); + listen(callback: DataCallback): void; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.js new file mode 100644 index 0000000..04222aa --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageReader.js @@ -0,0 +1,238 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var events_1 = require('./events'); +var is = require('./is'); +var DefaultSize = 8192; +var CR = new Buffer('\r', 'ascii')[0]; +var LF = new Buffer('\n', 'ascii')[0]; +var CRLF = '\r\n'; +var MessageBuffer = (function () { + function MessageBuffer(encoding) { + if (encoding === void 0) { encoding = 'utf-8'; } + this.encoding = encoding; + this.index = 0; + this.buffer = new Buffer(DefaultSize); + } + MessageBuffer.prototype.append = function (chunk) { + var toAppend = chunk; + if (typeof (chunk) == 'string') { + var str = chunk; + toAppend = new Buffer(str.length); + toAppend.write(str, 0, str.length, this.encoding); + } + if (this.buffer.length - this.index >= toAppend.length) { + toAppend.copy(this.buffer, this.index, 0, toAppend.length); + } + else { + var newSize = (Math.ceil((this.index + toAppend.length) / DefaultSize) + 1) * DefaultSize; + if (this.index === 0) { + this.buffer = new Buffer(newSize); + toAppend.copy(this.buffer, 0, 0, toAppend.length); + } + else { + this.buffer = Buffer.concat([this.buffer.slice(0, this.index), toAppend], newSize); + } + } + this.index += toAppend.length; + }; + MessageBuffer.prototype.tryReadHeaders = function () { + var result = undefined; + var current = 0; + while (current + 3 < this.index && (this.buffer[current] !== CR || this.buffer[current + 1] !== LF || this.buffer[current + 2] !== CR || this.buffer[current + 3] !== LF)) { + current++; + } + // No header / body separator found (e.g CRLFCRLF) + if (current + 3 >= this.index) { + return result; + } + result = Object.create(null); + var headers = this.buffer.toString('ascii', 0, current).split(CRLF); + headers.forEach(function (header) { + var index = header.indexOf(':'); + if (index === -1) { + throw new Error('Message header must separate key and value using :'); + } + var key = header.substr(0, index); + var value = header.substr(index + 1).trim(); + result[key] = value; + }); + var nextStart = current + 4; + this.buffer = this.buffer.slice(nextStart); + this.index = this.index - nextStart; + return result; + }; + MessageBuffer.prototype.tryReadContent = function (length) { + if (this.index < length) { + return null; + } + var result = this.buffer.toString(this.encoding, 0, length); + var nextStart = length; + this.buffer.copy(this.buffer, 0, nextStart); + this.index = this.index - nextStart; + return result; + }; + Object.defineProperty(MessageBuffer.prototype, "numberOfBytes", { + get: function () { + return this.index; + }, + enumerable: true, + configurable: true + }); + return MessageBuffer; +}()); +var AbstractMessageReader = (function () { + function AbstractMessageReader() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + this.partialMessageEmitter = new events_1.Emitter(); + } + Object.defineProperty(AbstractMessageReader.prototype, "onError", { + get: function () { + return this.errorEmitter.event; + }, + enumerable: true, + configurable: true + }); + AbstractMessageReader.prototype.fireError = function (error) { + this.errorEmitter.fire(this.asError(error)); + }; + Object.defineProperty(AbstractMessageReader.prototype, "onClose", { + get: function () { + return this.closeEmitter.event; + }, + enumerable: true, + configurable: true + }); + AbstractMessageReader.prototype.fireClose = function () { + this.closeEmitter.fire(undefined); + }; + Object.defineProperty(AbstractMessageReader.prototype, "onPartialMessage", { + get: function () { + return this.partialMessageEmitter.event; + }, + enumerable: true, + configurable: true + }); + AbstractMessageReader.prototype.firePartialMessage = function (info) { + this.partialMessageEmitter.fire(info); + }; + AbstractMessageReader.prototype.asError = function (error) { + if (error instanceof Error) { + return error; + } + else { + return new Error("Reader recevied error. Reason: " + (is.string(error.message) ? error.message : 'unknown')); + } + }; + return AbstractMessageReader; +}()); +exports.AbstractMessageReader = AbstractMessageReader; +var StreamMessageReader = (function (_super) { + __extends(StreamMessageReader, _super); + function StreamMessageReader(readable, encoding) { + if (encoding === void 0) { encoding = 'utf-8'; } + _super.call(this); + this.readable = readable; + this.buffer = new MessageBuffer(encoding); + this._partialMessageTimeout = 10000; + } + Object.defineProperty(StreamMessageReader.prototype, "partialMessageTimeout", { + get: function () { + return this._partialMessageTimeout; + }, + set: function (timeout) { + this._partialMessageTimeout = timeout; + }, + enumerable: true, + configurable: true + }); + StreamMessageReader.prototype.listen = function (callback) { + var _this = this; + this.nextMessageLength = -1; + this.messageToken = 0; + this.partialMessageTimer = undefined; + this.callback = callback; + this.readable.on('data', function (data) { + _this.onData(data); + }); + this.readable.on('error', function (error) { return _this.fireError(error); }); + this.readable.on('close', function () { return _this.fireClose(); }); + }; + StreamMessageReader.prototype.onData = function (data) { + this.buffer.append(data); + while (true) { + if (this.nextMessageLength === -1) { + var headers = this.buffer.tryReadHeaders(); + if (!headers) { + return; + } + var contentLength = headers['Content-Length']; + if (!contentLength) { + throw new Error('Header must provide a Content-Length property.'); + } + var length_1 = parseInt(contentLength); + if (isNaN(length_1)) { + throw new Error('Content-Length value must be a number.'); + } + this.nextMessageLength = length_1; + } + var msg = this.buffer.tryReadContent(this.nextMessageLength); + if (msg === null) { + /** We haven't recevied the full message yet. */ + this.setPartialMessageTimer(); + return; + } + this.clearPartialMessageTimer(); + this.nextMessageLength = -1; + this.messageToken++; + var json = JSON.parse(msg); + this.callback(json); + } + }; + StreamMessageReader.prototype.clearPartialMessageTimer = function () { + if (this.partialMessageTimer) { + clearTimeout(this.partialMessageTimer); + this.partialMessageTimer = undefined; + } + }; + StreamMessageReader.prototype.setPartialMessageTimer = function () { + var _this = this; + this.clearPartialMessageTimer(); + if (this._partialMessageTimeout <= 0) { + return; + } + this.partialMessageTimer = setTimeout(function (token, timeout) { + _this.partialMessageTimer = undefined; + if (token === _this.messageToken) { + _this.firePartialMessage({ messageToken: token, waitingTime: timeout }); + _this.setPartialMessageTimer(); + } + }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout); + }; + return StreamMessageReader; +}(AbstractMessageReader)); +exports.StreamMessageReader = StreamMessageReader; +var IPCMessageReader = (function (_super) { + __extends(IPCMessageReader, _super); + function IPCMessageReader(process) { + var _this = this; + _super.call(this); + this.process = process; + this.process.on('error', function (error) { return _this.fireError(error); }); + this.process.on('close', function () { return _this.fireClose(); }); + } + IPCMessageReader.prototype.listen = function (callback) { + this.process.on('message', callback); + }; + return IPCMessageReader; +}(AbstractMessageReader)); +exports.IPCMessageReader = IPCMessageReader; +//# sourceMappingURL=messageReader.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.d.ts new file mode 100644 index 0000000..c4156cb --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.d.ts @@ -0,0 +1,31 @@ +import { ChildProcess } from 'child_process'; +import { Message } from './messages'; +import { Event } from './events'; +export interface MessageWriter { + onError: Event<[Error, Message, number]>; + onClose: Event; + write(msg: Message): void; +} +export declare abstract class AbstractMessageWriter { + private errorEmitter; + private closeEmitter; + constructor(); + onError: Event<[Error, Message, number]>; + protected fireError(error: any, message?: Message, count?: number): void; + onClose: Event; + protected fireClose(): void; + private asError(error); +} +export declare class StreamMessageWriter extends AbstractMessageWriter implements MessageWriter { + private writable; + private encoding; + private errorCount; + constructor(writable: NodeJS.WritableStream, encoding?: string); + write(msg: Message): void; +} +export declare class IPCMessageWriter extends AbstractMessageWriter implements MessageWriter { + private process; + private errorCount; + constructor(process: NodeJS.Process | ChildProcess); + write(msg: Message): void; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.js new file mode 100644 index 0000000..7d46ce1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messageWriter.js @@ -0,0 +1,108 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var events_1 = require('./events'); +var is = require('./is'); +var ContentLength = 'Content-Length: '; +var CRLF = '\r\n'; +var AbstractMessageWriter = (function () { + function AbstractMessageWriter() { + this.errorEmitter = new events_1.Emitter(); + this.closeEmitter = new events_1.Emitter(); + } + Object.defineProperty(AbstractMessageWriter.prototype, "onError", { + get: function () { + return this.errorEmitter.event; + }, + enumerable: true, + configurable: true + }); + AbstractMessageWriter.prototype.fireError = function (error, message, count) { + this.errorEmitter.fire([this.asError(error), message, count]); + }; + Object.defineProperty(AbstractMessageWriter.prototype, "onClose", { + get: function () { + return this.closeEmitter.event; + }, + enumerable: true, + configurable: true + }); + AbstractMessageWriter.prototype.fireClose = function () { + this.closeEmitter.fire(undefined); + }; + AbstractMessageWriter.prototype.asError = function (error) { + if (error instanceof Error) { + return error; + } + else { + return new Error("Writer recevied error. Reason: " + (is.string(error.message) ? error.message : 'unknown')); + } + }; + return AbstractMessageWriter; +}()); +exports.AbstractMessageWriter = AbstractMessageWriter; +var StreamMessageWriter = (function (_super) { + __extends(StreamMessageWriter, _super); + function StreamMessageWriter(writable, encoding) { + var _this = this; + if (encoding === void 0) { encoding = 'utf8'; } + _super.call(this); + this.writable = writable; + this.encoding = encoding; + this.errorCount = 0; + this.writable.on('error', function (error) { return _this.fireError(error); }); + this.writable.on('close', function () { return _this.fireClose(); }); + } + StreamMessageWriter.prototype.write = function (msg) { + var json = JSON.stringify(msg); + var contentLength = Buffer.byteLength(json, this.encoding); + var headers = [ + ContentLength, contentLength.toString(), CRLF, + CRLF + ]; + try { + // Header must be written in ASCII encoding + this.writable.write(headers.join(''), 'ascii'); + // Now write the content. This can be written in any encoding + this.writable.write(json, this.encoding); + this.errorCount = 0; + } + catch (error) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + }; + return StreamMessageWriter; +}(AbstractMessageWriter)); +exports.StreamMessageWriter = StreamMessageWriter; +var IPCMessageWriter = (function (_super) { + __extends(IPCMessageWriter, _super); + function IPCMessageWriter(process) { + var _this = this; + _super.call(this); + this.process = process; + this.errorCount = 0; + this.process.on('error', function (error) { return _this.fireError(error); }); + this.process.on('close', function () { return _this.fireClose; }); + } + IPCMessageWriter.prototype.write = function (msg) { + try { + this.process.send(msg); + this.errorCount = 0; + } + catch (error) { + this.errorCount++; + this.fireError(error, msg, this.errorCount); + } + }; + return IPCMessageWriter; +}(AbstractMessageWriter)); +exports.IPCMessageWriter = IPCMessageWriter; +//# sourceMappingURL=messageWriter.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.d.ts new file mode 100644 index 0000000..e5ce1b7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.d.ts @@ -0,0 +1,115 @@ +/** + * A language server message + */ +export interface Message { + jsonrpc: string; +} +/** + * Request message + */ +export interface RequestMessage extends Message { + /** + * The request id. + */ + id: number | string; + /** + * The method to be invoked. + */ + method: string; + /** + * The method's params. + */ + params?: any; +} +/** + * Predefined error codes. + */ +export declare namespace ErrorCodes { + const ParseError: number; + const InvalidRequest: number; + const MethodNotFound: number; + const InvalidParams: number; + const InternalError: number; + const serverErrorStart: number; + const serverErrorEnd: number; + const MessageWriteError: number; + const MessageReadError: number; +} +export interface ResponseErrorLiteral { + /** + * A number indicating the error type that occured. + */ + code: number; + /** + * A string providing a short decription of the error. + */ + message: string; + /** + * A Primitive or Structured value that contains additional + * information about the error. Can be omitted. + */ + data?: D; +} +/** + * A error object return in a response in case a request + * has failed. + */ +export declare class ResponseError extends Error { + code: number; + message: string; + data: D; + constructor(code: number, message: string, data?: D); + toJson(): ResponseErrorLiteral; +} +/** + * A response message. + */ +export interface ResponseMessage extends Message { + /** + * The request id. + */ + id: number | string; + /** + * The result of a request. This can be omitted in + * the case of an error. + */ + result?: any; + /** + * The error object in case a request fails. + */ + error?: ResponseErrorLiteral; +} +/** + * A interface to type the request parameter / response pair + */ +export interface RequestType { + method: string; +} +/** + * Notification Message + */ +export interface NotificationMessage extends Message { + /** + * The method to be invoked. + */ + method: string; + /** + * The notification's params. + */ + params?: any; +} +export interface NotificationType

{ + method: string; +} +/** + * Tests if the given message is a request message + */ +export declare function isRequestMessage(message: Message): message is RequestMessage; +/** + * Tests if the given message is a notification message + */ +export declare function isNotificationMessage(message: Message): message is NotificationMessage; +/** + * Tests if the given message is a response message + */ +export declare function isReponseMessage(message: Message): message is ResponseMessage; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.js new file mode 100644 index 0000000..d95f23a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/lib/messages.js @@ -0,0 +1,81 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var __extends = (this && this.__extends) || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +}; +var is = require('./is'); +/** + * Predefined error codes. + */ +var ErrorCodes; +(function (ErrorCodes) { + // Defined by JSON RPC + ErrorCodes.ParseError = -32700; + ErrorCodes.InvalidRequest = -32600; + ErrorCodes.MethodNotFound = -32601; + ErrorCodes.InvalidParams = -32602; + ErrorCodes.InternalError = -32603; + ErrorCodes.serverErrorStart = -32099; + ErrorCodes.serverErrorEnd = -32000; + // Defined by VSCode. + ErrorCodes.MessageWriteError = 1; + ErrorCodes.MessageReadError = 2; +})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {})); +/** + * A error object return in a response in case a request + * has failed. + */ +var ResponseError = (function (_super) { + __extends(ResponseError, _super); + function ResponseError(code, message, data) { + _super.call(this, message); + this.code = code; + this.message = message; + if (is.defined(data)) { + this.data = data; + } + } + ResponseError.prototype.toJson = function () { + var result = { + code: this.code, + message: this.message + }; + if (is.defined(this.data)) { + result.data = this.data; + } + ; + return result; + }; + return ResponseError; +}(Error)); +exports.ResponseError = ResponseError; +/** + * Tests if the given message is a request message + */ +function isRequestMessage(message) { + var candidate = message; + return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id)); +} +exports.isRequestMessage = isRequestMessage; +/** + * Tests if the given message is a notification message + */ +function isNotificationMessage(message) { + var candidate = message; + return candidate && is.string(candidate.method) && is.undefined(message.id); +} +exports.isNotificationMessage = isNotificationMessage; +/** + * Tests if the given message is a response message + */ +function isReponseMessage(message) { + var candidate = message; + return candidate && (is.defined(candidate.result) || is.defined(candidate.error)) && (is.string(candidate.id) || is.number(candidate.id)); +} +exports.isReponseMessage = isReponseMessage; +//# sourceMappingURL=messages.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/package.json new file mode 100644 index 0000000..0da7477 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/package.json @@ -0,0 +1,124 @@ +{ + "_args": [ + [ + { + "raw": "vscode-jsonrpc@^2.4.0", + "scope": null, + "escapedName": "vscode-jsonrpc", + "name": "vscode-jsonrpc", + "rawSpec": "^2.4.0", + "spec": ">=2.4.0 <3.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/vscode-languageserver" + ] + ], + "_from": "vscode-jsonrpc@>=2.4.0 <3.0.0", + "_id": "vscode-jsonrpc@2.4.0", + "_inCache": true, + "_location": "/vscode-jsonrpc", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/vscode-jsonrpc-2.4.0.tgz_1473795047282_0.31734104780480266" + }, + "_npmUser": { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "vscode-jsonrpc@^2.4.0", + "scope": null, + "escapedName": "vscode-jsonrpc", + "name": "vscode-jsonrpc", + "rawSpec": "^2.4.0", + "spec": ">=2.4.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vscode-languageserver" + ], + "_resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.4.0.tgz", + "_shasum": "51396030e13179555c939b791c29598058b8fbb4", + "_shrinkwrap": null, + "_spec": "vscode-jsonrpc@^2.4.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/vscode-languageserver", + "author": { + "name": "Microsoft Corporation" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "dependencies": {}, + "description": "A json rpc implementation over streams", + "devDependencies": { + "mocha": "^3.0.2", + "typescript": "^1.8.10" + }, + "directories": {}, + "dist": { + "shasum": "51396030e13179555c939b791c29598058b8fbb4", + "tarball": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.4.0.tgz" + }, + "engines": { + "node": ">=4.0.0 || >=6.0.0" + }, + "homepage": "https://github.com/Microsoft/vscode-languageserver-node#readme", + "license": "MIT", + "main": "./lib/main.js", + "maintainers": [ + { + "name": "aeschli", + "email": "martinae@microsoft.com" + }, + { + "name": "alexandrudima", + "email": "alexdima@microsoft.com" + }, + { + "name": "bpasero", + "email": "benjpas@microsoft.com" + }, + { + "name": "chrisdias", + "email": "cdias@microsoft.com" + }, + { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + { + "name": "egamma", + "email": "egamma@microsoft.com" + }, + { + "name": "isidor", + "email": "inikolic@microsoft.com" + }, + { + "name": "joaomoreno.ms", + "email": "joao.moreno@microsoft.com" + }, + { + "name": "jrieken", + "email": "jrieken@microsoft.com" + } + ], + "name": "vscode-jsonrpc", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/vscode-languageserver-node.git" + }, + "scripts": { + "compile": "tsc -p ./src", + "prepublish": "tsc -p ./src", + "test": "mocha", + "watch": "tsc -w -p ./src" + }, + "typings": "./lib/main", + "version": "2.4.0" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/thirdpartynotices.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/thirdpartynotices.txt new file mode 100644 index 0000000..6517b3a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-jsonrpc/thirdpartynotices.txt @@ -0,0 +1,31 @@ +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-jsonrpc + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/.npmignore new file mode 100644 index 0000000..2b1e5b1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/.npmignore @@ -0,0 +1,9 @@ +.vscode/ +lib/test/ +lib/*.map +src/ +test/ +.eslintrc +.gitignore +gulpfile.js +tsd.json \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/License.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/License.txt new file mode 100644 index 0000000..027ef92 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/License.txt @@ -0,0 +1,11 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/README.md new file mode 100644 index 0000000..70923c2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/README.md @@ -0,0 +1,10 @@ +# VSCode Language Server + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver-types.svg)](https://npmjs.org/package/vscode-languageserver-types) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-types-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-types-node) + +Npm module containing the types used by the VSCode language client and [Node.js](https://nodejs.org/) language server + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how +to implement language servers for [VSCode](https://code.visualstudio.com/). \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.d.ts new file mode 100644 index 0000000..176e72f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.d.ts @@ -0,0 +1,965 @@ +/** + * Position in a text document expressed as zero-based line and character offset. + */ +export interface Position { + /** + * Line position in a document (zero-based). + */ + line: number; + /** + * Character offset on a line in a document (zero-based). + */ + character: number; +} +/** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ +export declare namespace Position { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line: number, character: number): Position; + /** + * Checks whether the given liternal conforms to the [Position](#Position) interface. + */ + function is(value: any): value is Position; +} +/** + * A range in a text document expressed as (zero-based) start and end positions. + */ +export interface Range { + /** + * The range's start position + */ + start: Position; + /** + * The range's end position + */ + end: Position; +} +/** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ +export declare namespace Range { + /** + * Create a new Range liternal. + * @param start The range's start position. + * @param end The range's end position. + */ + function create(start: Position, end: Position): Range; + /** + * Create a new Range liternal. + * @param startLine The start line number. + * @param startCharacter The start character. + * @param endLine The end line number. + * @param endCharacter The end character. + */ + function create(startLine: number, startCharacter: number, endLine: number, endCharacter: number): Range; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value: any): value is Range; +} +/** + * Represents a location inside a resource, such as a line + * inside a text file. + */ +export interface Location { + uri: string; + range: Range; +} +/** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ +export declare namespace Location { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri: string, range: Range): Location; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value: any): value is Location; +} +/** + * The diagnostic's serverity. + */ +export declare const enum DiagnosticSeverity { + /** + * Reports an error. + */ + Error = 1, + /** + * Reports a warning. + */ + Warning = 2, + /** + * Reports an information. + */ + Information = 3, + /** + * Reports a hint. + */ + Hint = 4, +} +/** + * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects + * are only valid in the scope of a resource. + */ +export interface Diagnostic { + /** + * The range at which the message applies + */ + range: Range; + /** + * The diagnostic's severity. Can be omitted. If omitted it is up to the + * client to interpret diagnostics as error, warning, info or hint. + */ + severity?: number; + /** + * The diagnostic's code. Can be omitted. + */ + code?: number | string; + /** + * A human-readable string describing the source of this + * diagnostic, e.g. 'typescript' or 'super lint'. + */ + source?: string; + /** + * The diagnostic's message. + */ + message: string; +} +/** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ +export declare namespace Diagnostic { + /** + * Creates a new Diagnostic literal. + */ + function create(range: Range, message: string, severity?: number, code?: number | string, source?: string): Diagnostic; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value: any): value is Diagnostic; +} +/** + * Represents a reference to a command. Provides a title which + * will be used to represent a command in the UI and, optionally, + * an array of arguments which will be passed to the command handler + * function when invoked. + */ +export interface Command { + /** + * Title of the command, like `save`. + */ + title: string; + /** + * The identifier of the actual command handler. + */ + command: string; + /** + * Arguments that the command handler should be + * invoked with. + */ + arguments?: any[]; +} +/** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ +export declare namespace Command { + /** + * Creates a new Command literal. + */ + function create(title: string, command: string, ...args: any[]): Command; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value: any): value is Command; +} +/** + * A text edit applicable to a text document. + */ +export interface TextEdit { + /** + * The range of the text document to be manipulated. To insert + * text into a document create a range where start === end. + */ + range: Range; + /** + * The string to be inserted. For delete operations use an + * empty string. + */ + newText: string; +} +/** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ +export declare namespace TextEdit { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range: Range, newText: string): TextEdit; + /** + * Creates a insert text edit. + * @param psotion The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position: Position, newText: string): TextEdit; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range: Range): TextEdit; +} +/** + * A workspace edit represents changes to many resources managed + * in the workspace. + */ +export interface WorkspaceEdit { + /** + * Holds changes to existing resources. + */ + changes: { + [uri: string]: TextEdit[]; + }; +} +/** + * A change to capture text edits for existing resources. + */ +export interface TextEditChange { + /** + * Gets all text edits for this change. + * + * @return An array of text edits. + */ + all(): TextEdit[]; + /** + * Clears the edits for this change. + */ + clear(): void; + /** + * Insert the given text at the given position. + * + * @param position A position. + * @param newText A string. + */ + insert(position: Position, newText: string): void; + /** + * Replace the given range with given text for the given resource. + * + * @param range A range. + * @param newText A string. + */ + replace(range: Range, newText: string): void; + /** + * Delete the text at the given range. + * + * @param range A range. + */ + delete(range: Range): void; +} +/** + * A workspace change helps constructing changes to a workspace. + */ +export declare class WorkspaceChange { + private workspaceEdit; + private textEditChanges; + constructor(); + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + edit: WorkspaceEdit; + /** + * Returns the [TextEditChange](#TextEditChange) to manage text edits + * for resources. + */ + getTextEditChange(uri: string): TextEditChange; +} +/** + * A literal to identify a text document in the client. + */ +export interface TextDocumentIdentifier { + /** + * The text document's uri. + */ + uri: string; +} +/** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ +export declare namespace TextDocumentIdentifier { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri: string): TextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value: any): value is TextDocumentIdentifier; +} +/** + * An identifier to denote a specific version of a text document. + */ +export interface VersionedTextDocumentIdentifier extends TextDocumentIdentifier { + /** + * The version number of this document. + */ + version: number; +} +/** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ +export declare namespace VersionedTextDocumentIdentifier { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri: string, version: number): VersionedTextDocumentIdentifier; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value: any): value is VersionedTextDocumentIdentifier; +} +/** + * An item to transfer a text document from the client to the + * server. + */ +export interface TextDocumentItem { + /** + * The text document's uri. + */ + uri: string; + /** + * The text document's language identifier + */ + languageId: string; + /** + * The version number of this document (it will strictly increase after each + * change, including undo/redo). + */ + version: number; + /** + * The content of the opened text document. + */ + text: string; +} +/** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ +export declare namespace TextDocumentItem { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param uri The document's language identifier. + * @param uri The document's version number. + * @param uri The document's text. + */ + function create(uri: string, languageId: string, version: number, text: string): TextDocumentItem; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value: any): value is TextDocumentItem; +} +/** + * The kind of a completion entry. + */ +export declare const enum CompletionItemKind { + Text = 1, + Method = 2, + Function = 3, + Constructor = 4, + Field = 5, + Variable = 6, + Class = 7, + Interface = 8, + Module = 9, + Property = 10, + Unit = 11, + Value = 12, + Enum = 13, + Keyword = 14, + Snippet = 15, + Color = 16, + File = 17, + Reference = 18, +} +/** + * A completion item represents a text snippet that is + * proposed to complete text that is being typed. + */ +export interface CompletionItem { + /** + * The label of this completion item. By default + * also the text that is inserted when selecting + * this completion. + */ + label: string; + /** + * The kind of this completion item. Based of the kind + * an icon is chosen by the editor. + */ + kind?: number; + /** + * A human-readable string with additional information + * about this item, like type or symbol information. + */ + detail?: string; + /** + * A human-readable string that represents a doc-comment. + */ + documentation?: string; + /** + * A string that shoud be used when comparing this item + * with other items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + sortText?: string; + /** + * A string that should be used when filtering a set of + * completion items. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + filterText?: string; + /** + * A string that should be inserted a document when selecting + * this completion. When `falsy` the [label](#CompletionItem.label) + * is used. + */ + insertText?: string; + /** + * An [edit](#TextEdit) which is applied to a document when selecting + * this completion. When an edit is provided the value of + * [insertText](#CompletionItem.insertText) is ignored. + */ + textEdit?: TextEdit; + /** + * An optional array of additional [text edits](#TextEdit) that are applied when + * selecting this completion. Edits must not overlap with the main [edit](#CompletionItem.textEdit) + * nor with themselves. + */ + additionalTextEdits?: TextEdit[]; + /** + * An optional [command](#Command) that is executed *after* inserting this completion. *Note* that + * additional modifications to the current document should be described with the + * [additionalTextEdits](#CompletionItem.additionalTextEdits)-property. + */ + command?: Command; + /** + * An data entry field that is preserved on a completion item between + * a [CompletionRequest](#CompletionRequest) and a [CompletionResolveRequest] + * (#CompletionResolveRequest) + */ + data?: any; +} +/** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ +export declare namespace CompletionItem { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label: string): CompletionItem; +} +/** + * Represents a collection of [completion items](#CompletionItem) to be presented + * in the editor. + */ +export interface CompletionList { + /** + * This list it not complete. Further typing should result in recomputing + * this list. + */ + isIncomplete: boolean; + /** + * The completion items. + */ + items: CompletionItem[]; +} +/** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ +export declare namespace CompletionList { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items?: CompletionItem[], isIncomplete?: boolean): CompletionList; +} +/** + * MarkedString can be used to render human readable text. It is either a markdown string + * or a code-block that provides a language and a code snippet. Note that + * markdown strings will be sanitized - that means html will be escaped. + */ +export declare type MarkedString = string | { + language: string; + value: string; +}; +export declare namespace MarkedString { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText: string): MarkedString; +} +/** + * The result of a hove request. + */ +export interface Hover { + /** + * The hover's content + */ + contents: MarkedString | MarkedString[]; + /** + * An optional range + */ + range?: Range; +} +/** + * Represents a parameter of a callable-signature. A parameter can + * have a label and a doc-comment. + */ +export interface ParameterInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string; +} +/** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ +export declare namespace ParameterInformation { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label: string, documentation?: string): ParameterInformation; +} +/** + * Represents the signature of something callable. A signature + * can have a label, like a function-name, a doc-comment, and + * a set of parameters. + */ +export interface SignatureInformation { + /** + * The label of this signature. Will be shown in + * the UI. + */ + label: string; + /** + * The human-readable doc-comment of this signature. Will be shown + * in the UI but can be omitted. + */ + documentation?: string; + /** + * The parameters of this signature. + */ + parameters?: ParameterInformation[]; +} +/** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ +export declare namespace SignatureInformation { + function create(label: string, documentation?: string, ...parameters: ParameterInformation[]): SignatureInformation; +} +/** + * Signature help represents the signature of something + * callable. There can be multiple signature but only one + * active and only one active parameter. + */ +export interface SignatureHelp { + /** + * One or more signatures. + */ + signatures: SignatureInformation[]; + /** + * The active signature. + */ + activeSignature?: number; + /** + * The active parameter of the active signature. + */ + activeParameter?: number; +} +/** + * The definition of a symbol represented as one or many [locations](#Location). + * For most programming languages there is only one location at which a symbol is + * defined. + */ +export declare type Definition = Location | Location[]; +/** + * Value-object that contains additional information when + * requesting references. + */ +export interface ReferenceContext { + /** + * Include the declaration of the current symbol. + */ + includeDeclaration: boolean; +} +/** + * A document highlight kind. + */ +export declare const enum DocumentHighlightKind { + /** + * A textual occurrance. + */ + Text = 1, + /** + * Read-access of a symbol, like reading a variable. + */ + Read = 2, + /** + * Write-access of a symbol, like writing to a variable. + */ + Write = 3, +} +/** + * A document highlight is a range inside a text document which deserves + * special attention. Usually a document highlight is visualized by changing + * the background color of its range. + */ +export interface DocumentHighlight { + /** + * The range this highlight applies to. + */ + range: Range; + /** + * The highlight kind, default is [text](#DocumentHighlightKind.Text). + */ + kind?: number; +} +/** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ +export declare namespace DocumentHighlight { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range: Range, kind?: number): DocumentHighlight; +} +/** + * A symbol kind. + */ +export declare const enum SymbolKind { + File = 1, + Module = 2, + Namespace = 3, + Package = 4, + Class = 5, + Method = 6, + Property = 7, + Field = 8, + Constructor = 9, + Enum = 10, + Interface = 11, + Function = 12, + Variable = 13, + Constant = 14, + String = 15, + Number = 16, + Boolean = 17, + Array = 18, +} +/** + * Represents information about programming constructs like variables, classes, + * interfaces etc. + */ +export interface SymbolInformation { + /** + * The name of this symbol. + */ + name: string; + /** + * The kind of this symbol. + */ + kind: number; + /** + * The location of this symbol. + */ + location: Location; + /** + * The name of the symbol containing this symbol. + */ + containerName?: string; +} +export declare namespace SymbolInformation { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containg the symbol. + */ + function create(name: string, kind: SymbolKind, range: Range, uri?: string, containerName?: string): SymbolInformation; +} +/** + * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolParams { + /** + * A non-empty query string + */ + query: string; +} +/** + * Contains additional diagnostic information about the context in which + * a [code action](#CodeActionProvider.provideCodeActions) is run. + */ +export interface CodeActionContext { + /** + * An array of diagnostics. + */ + diagnostics: Diagnostic[]; +} +/** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ +export declare namespace CodeActionContext { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics: Diagnostic[]): CodeActionContext; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value: any): value is CodeActionContext; +} +/** + * A code lens represents a [command](#Command) that should be shown along with + * source text, like the number of references, a way to run tests, etc. + * + * A code lens is _unresolved_ when no command is associated to it. For performance + * reasons the creation of a code lens and resolving should be done to two stages. + */ +export interface CodeLens { + /** + * The range in which this code lens is valid. Should only span a single line. + */ + range: Range; + /** + * The command this code lens represents. + */ + command?: Command; + /** + * An data entry field that is preserved on a code lens item between + * a [CodeLensRequest](#CodeLensRequest) and a [CodeLensResolveRequest] + * (#CodeLensResolveRequest) + */ + data?: any; +} +/** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ +export declare namespace CodeLens { + /** + * Creates a new CodeLens literal. + */ + function create(range: Range, data?: any): CodeLens; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value: any): value is CodeLens; +} +/** + * Value-object describing what options formatting should use. + */ +export interface FormattingOptions { + /** + * Size of a tab in spaces. + */ + tabSize: number; + /** + * Prefer spaces over tabs. + */ + insertSpaces: boolean; + /** + * Signature for further properties. + */ + [key: string]: boolean | number | string; +} +/** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ +export declare namespace FormattingOptions { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize: number, insertSpaces: boolean): FormattingOptions; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value: any): value is FormattingOptions; +} +/** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ +export declare class DocumentLink { + /** + * The range this link applies to. + */ + range: Range; + /** + * The uri this link points to. + */ + target: string; +} +/** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ +export declare namespace DocumentLink { + /** + * Creates a new DocumentLink literal. + */ + function create(range: Range, target?: string): DocumentLink; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value: any): value is DocumentLink; +} +/** + * A simple text document. Not to be implemenented. + */ +export interface TextDocument { + /** + * The associated URI for this document. Most documents have the __file__-scheme, indicating that they + * represent files on disk. However, some documents may have other schemes indicating that they are not + * available on disk. + * + * @readonly + */ + uri: string; + /** + * The identifier of the language associated with this document. + * + * @readonly + */ + languageId: string; + /** + * The version number of this document (it will strictly increase after each + * change, including undo/redo). + * + * @readonly + */ + version: number; + /** + * Get the text of this document. + * + * @return The text of this document. + */ + getText(): string; + /** + * Converts a zero-based offset to a position. + * + * @param offset A zero-based offset. + * @return A valid [position](#Position). + */ + positionAt(offset: number): Position; + /** + * Converts the position to a zero-based offset. + * + * The position will be [adjusted](#TextDocument.validatePosition). + * + * @param position A position. + * @return A valid zero-based offset. + */ + offsetAt(position: Position): number; + /** + * The number of lines in this document. + * + * @readonly + */ + lineCount: number; +} +export declare namespace TextDocument { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri: string, languageId: string, version: number, content: string): TextDocument; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value: any): value is TextDocument; +} +/** + * Event to signal changes to a simple text document. + */ +export interface TextDocumentChangeEvent { + /** + * The document that has changed. + */ + document: TextDocument; +} +/** + * An event describing a change to a text document. If range and rangeLength are omitted + * the new text is considered to be the full content of the document. + */ +export interface TextDocumentContentChangeEvent { + /** + * The range of the document that changed. + */ + range?: Range; + /** + * The length of the range that got replaced. + */ + rangeLength?: number; + /** + * The new text of the document. + */ + text: string; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.js new file mode 100644 index 0000000..0bcc226 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/lib/main.js @@ -0,0 +1,708 @@ +(function (factory) { + if (typeof module === 'object' && typeof module.exports === 'object') { + var v = factory(require, exports); if (v !== undefined) module.exports = v; + } + else if (typeof define === 'function' && define.amd) { + define(["require", "exports"], factory); + } +})(function (require, exports) { + /* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ + 'use strict'; + /** + * The Position namespace provides helper functions to work with + * [Position](#Position) literals. + */ + var Position; + (function (Position) { + /** + * Creates a new Position literal from the given line and character. + * @param line The position's line. + * @param character The position's character. + */ + function create(line, character) { + return { line: line, character: character }; + } + Position.create = create; + /** + * Checks whether the given liternal conforms to the [Position](#Position) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.number(candidate.line) && Is.number(candidate.character); + } + Position.is = is; + })(Position = exports.Position || (exports.Position = {})); + /** + * The Range namespace provides helper functions to work with + * [Range](#Range) literals. + */ + var Range; + (function (Range) { + function create(one, two, three, four) { + if (Is.number(one) && Is.number(two) && Is.number(three) && Is.number(four)) { + return { start: Position.create(one, two), end: Position.create(three, four) }; + } + else if (Position.is(one) && Position.is(two)) { + return { start: one, end: two }; + } + else { + throw new Error("Range#create called with invalid arguments[" + one + ", " + two + ", " + three + ", " + four + "]"); + } + } + Range.create = create; + /** + * Checks whether the given literal conforms to the [Range](#Range) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Position.is(candidate.start) && Position.is(candidate.end); + } + Range.is = is; + })(Range = exports.Range || (exports.Range = {})); + /** + * The Location namespace provides helper functions to work with + * [Location](#Location) literals. + */ + var Location; + (function (Location) { + /** + * Creates a Location literal. + * @param uri The location's uri. + * @param range The location's range. + */ + function create(uri, range) { + return { uri: uri, range: range }; + } + Location.create = create; + /** + * Checks whether the given literal conforms to the [Location](#Location) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)); + } + Location.is = is; + })(Location = exports.Location || (exports.Location = {})); + /** + * The Diagnostic namespace provides helper functions to work with + * [Diagnostic](#Diagnostic) literals. + */ + var Diagnostic; + (function (Diagnostic) { + /** + * Creates a new Diagnostic literal. + */ + function create(range, message, severity, code, source) { + var result = { range: range, message: message }; + if (Is.defined(severity)) { + result.severity = severity; + } + if (Is.defined(code)) { + result.code = code; + } + if (Is.defined(source)) { + result.source = source; + } + return result; + } + Diagnostic.create = create; + /** + * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) + && Range.is(candidate.range) + && Is.string(candidate.message) + && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) + && (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) + && (Is.string(candidate.source) || Is.undefined(candidate.source)); + } + Diagnostic.is = is; + })(Diagnostic = exports.Diagnostic || (exports.Diagnostic = {})); + /** + * The Command namespace provides helper functions to work with + * [Command](#Command) literals. + */ + var Command; + (function (Command) { + /** + * Creates a new Command literal. + */ + function create(title, command) { + var args = []; + for (var _i = 2; _i < arguments.length; _i++) { + args[_i - 2] = arguments[_i]; + } + var result = { title: title, command: command }; + if (Is.defined(args) && args.length > 0) { + result.arguments = args; + } + return result; + } + Command.create = create; + /** + * Checks whether the given literal conforms to the [Command](#Command) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.title); + } + Command.is = is; + })(Command = exports.Command || (exports.Command = {})); + /** + * The TextEdit namespace provides helper function to create replace, + * insert and delete edits more easily. + */ + var TextEdit; + (function (TextEdit) { + /** + * Creates a replace text edit. + * @param range The range of text to be replaced. + * @param newText The new text. + */ + function replace(range, newText) { + return { range: range, newText: newText }; + } + TextEdit.replace = replace; + /** + * Creates a insert text edit. + * @param psotion The position to insert the text at. + * @param newText The text to be inserted. + */ + function insert(position, newText) { + return { range: { start: position, end: position }, newText: newText }; + } + TextEdit.insert = insert; + /** + * Creates a delete text edit. + * @param range The range of text to be deleted. + */ + function del(range) { + return { range: range, newText: '' }; + } + TextEdit.del = del; + })(TextEdit = exports.TextEdit || (exports.TextEdit = {})); + /** + * A workspace change helps constructing changes to a workspace. + */ + var WorkspaceChange = (function () { + function WorkspaceChange() { + this.workspaceEdit = { + changes: Object.create(null) + }; + this.textEditChanges = Object.create(null); + } + Object.defineProperty(WorkspaceChange.prototype, "edit", { + /** + * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal + * use to be returned from a workspace edit operation like rename. + */ + get: function () { + return this.workspaceEdit; + }, + enumerable: true, + configurable: true + }); + /** + * Returns the [TextEditChange](#TextEditChange) to manage text edits + * for resources. + */ + WorkspaceChange.prototype.getTextEditChange = function (uri) { + var TextEditChangeImpl = (function () { + function TextEditChangeImpl(edits) { + this.edits = edits; + } + TextEditChangeImpl.prototype.insert = function (position, newText) { + this.edits.push(TextEdit.insert(position, newText)); + }; + TextEditChangeImpl.prototype.replace = function (range, newText) { + this.edits.push(TextEdit.replace(range, newText)); + }; + TextEditChangeImpl.prototype.delete = function (range) { + this.edits.push(TextEdit.del(range)); + }; + TextEditChangeImpl.prototype.all = function () { + return this.edits; + }; + TextEditChangeImpl.prototype.clear = function () { + this.edits.splice(0, this.edits.length); + }; + return TextEditChangeImpl; + }()); + var result = this.textEditChanges[uri]; + if (!result) { + var edits = []; + this.workspaceEdit.changes[uri] = edits; + result = new TextEditChangeImpl(edits); + this.textEditChanges[uri] = result; + } + return result; + }; + return WorkspaceChange; + }()); + exports.WorkspaceChange = WorkspaceChange; + /** + * The TextDocumentIdentifier namespace provides helper functions to work with + * [TextDocumentIdentifier](#TextDocumentIdentifier) literals. + */ + var TextDocumentIdentifier; + (function (TextDocumentIdentifier) { + /** + * Creates a new TextDocumentIdentifier literal. + * @param uri The document's uri. + */ + function create(uri) { + return { uri: uri }; + } + TextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri); + } + TextDocumentIdentifier.is = is; + })(TextDocumentIdentifier = exports.TextDocumentIdentifier || (exports.TextDocumentIdentifier = {})); + /** + * The VersionedTextDocumentIdentifier namespace provides helper functions to work with + * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals. + */ + var VersionedTextDocumentIdentifier; + (function (VersionedTextDocumentIdentifier) { + /** + * Creates a new VersionedTextDocumentIdentifier literal. + * @param uri The document's uri. + * @param uri The document's text. + */ + function create(uri, version) { + return { uri: uri, version: version }; + } + VersionedTextDocumentIdentifier.create = create; + /** + * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.number(candidate.version); + } + VersionedTextDocumentIdentifier.is = is; + })(VersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = {})); + /** + * The TextDocumentItem namespace provides helper functions to work with + * [TextDocumentItem](#TextDocumentItem) literals. + */ + var TextDocumentItem; + (function (TextDocumentItem) { + /** + * Creates a new TextDocumentItem literal. + * @param uri The document's uri. + * @param uri The document's language identifier. + * @param uri The document's version number. + * @param uri The document's text. + */ + function create(uri, languageId, version, text) { + return { uri: uri, languageId: languageId, version: version, text: text }; + } + TextDocumentItem.create = create; + /** + * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.number(candidate.version) && Is.string(candidate.text); + } + TextDocumentItem.is = is; + })(TextDocumentItem = exports.TextDocumentItem || (exports.TextDocumentItem = {})); + /** + * The CompletionItem namespace provides functions to deal with + * completion items. + */ + var CompletionItem; + (function (CompletionItem) { + /** + * Create a completion item and seed it with a label. + * @param label The completion item's label + */ + function create(label) { + return { label: label }; + } + CompletionItem.create = create; + })(CompletionItem = exports.CompletionItem || (exports.CompletionItem = {})); + /** + * The CompletionList namespace provides functions to deal with + * completion lists. + */ + var CompletionList; + (function (CompletionList) { + /** + * Creates a new completion list. + * + * @param items The completion items. + * @param isIncomplete The list is not complete. + */ + function create(items, isIncomplete) { + return { items: items ? items : [], isIncomplete: !!isIncomplete }; + } + CompletionList.create = create; + })(CompletionList = exports.CompletionList || (exports.CompletionList = {})); + var MarkedString; + (function (MarkedString) { + /** + * Creates a marked string from plain text. + * + * @param plainText The plain text. + */ + function fromPlainText(plainText) { + return plainText.replace(/[\\`*_{}[\]()#+\-.!]/g, "\\$&"); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash + } + MarkedString.fromPlainText = fromPlainText; + })(MarkedString = exports.MarkedString || (exports.MarkedString = {})); + /** + * The ParameterInformation namespace provides helper functions to work with + * [ParameterInformation](#ParameterInformation) literals. + */ + var ParameterInformation; + (function (ParameterInformation) { + /** + * Creates a new parameter information literal. + * + * @param label A label string. + * @param documentation A doc string. + */ + function create(label, documentation) { + return documentation ? { label: label, documentation: documentation } : { label: label }; + } + ParameterInformation.create = create; + ; + })(ParameterInformation = exports.ParameterInformation || (exports.ParameterInformation = {})); + /** + * The SignatureInformation namespace provides helper functions to work with + * [SignatureInformation](#SignatureInformation) literals. + */ + var SignatureInformation; + (function (SignatureInformation) { + function create(label, documentation) { + var parameters = []; + for (var _i = 2; _i < arguments.length; _i++) { + parameters[_i - 2] = arguments[_i]; + } + var result = { label: label }; + if (Is.defined(documentation)) { + result.documentation = documentation; + } + if (Is.defined(parameters)) { + result.parameters = parameters; + } + else { + result.parameters = []; + } + return result; + } + SignatureInformation.create = create; + })(SignatureInformation = exports.SignatureInformation || (exports.SignatureInformation = {})); + /** + * DocumentHighlight namespace to provide helper functions to work with + * [DocumentHighlight](#DocumentHighlight) literals. + */ + var DocumentHighlight; + (function (DocumentHighlight) { + /** + * Create a DocumentHighlight object. + * @param range The range the highlight applies to. + */ + function create(range, kind) { + var result = { range: range }; + if (Is.number(kind)) { + result.kind = kind; + } + return result; + } + DocumentHighlight.create = create; + })(DocumentHighlight = exports.DocumentHighlight || (exports.DocumentHighlight = {})); + var SymbolInformation; + (function (SymbolInformation) { + /** + * Creates a new symbol information literal. + * + * @param name The name of the symbol. + * @param kind The kind of the symbol. + * @param range The range of the location of the symbol. + * @param uri The resource of the location of symbol, defaults to the current document. + * @param containerName The name of the symbol containg the symbol. + */ + function create(name, kind, range, uri, containerName) { + var result = { + name: name, + kind: kind, + location: { uri: uri, range: range } + }; + if (containerName) { + result.containerName = containerName; + } + return result; + } + SymbolInformation.create = create; + })(SymbolInformation = exports.SymbolInformation || (exports.SymbolInformation = {})); + /** + * The CodeActionContext namespace provides helper functions to work with + * [CodeActionContext](#CodeActionContext) literals. + */ + var CodeActionContext; + (function (CodeActionContext) { + /** + * Creates a new CodeActionContext literal. + */ + function create(diagnostics) { + return { diagnostics: diagnostics }; + } + CodeActionContext.create = create; + /** + * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is); + } + CodeActionContext.is = is; + })(CodeActionContext = exports.CodeActionContext || (exports.CodeActionContext = {})); + /** + * The CodeLens namespace provides helper functions to work with + * [CodeLens](#CodeLens) literals. + */ + var CodeLens; + (function (CodeLens) { + /** + * Creates a new CodeLens literal. + */ + function create(range, data) { + var result = { range: range }; + if (Is.defined(data)) + result.data = data; + return result; + } + CodeLens.create = create; + /** + * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command)); + } + CodeLens.is = is; + })(CodeLens = exports.CodeLens || (exports.CodeLens = {})); + /** + * The FormattingOptions namespace provides helper functions to work with + * [FormattingOptions](#FormattingOptions) literals. + */ + var FormattingOptions; + (function (FormattingOptions) { + /** + * Creates a new FormattingOptions literal. + */ + function create(tabSize, insertSpaces) { + return { tabSize: tabSize, insertSpaces: insertSpaces }; + } + FormattingOptions.create = create; + /** + * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces); + } + FormattingOptions.is = is; + })(FormattingOptions = exports.FormattingOptions || (exports.FormattingOptions = {})); + /** + * A document link is a range in a text document that links to an internal or external resource, like another + * text document or a web site. + */ + var DocumentLink = (function () { + function DocumentLink() { + } + return DocumentLink; + }()); + exports.DocumentLink = DocumentLink; + /** + * The DocumentLink namespace provides helper functions to work with + * [DocumentLink](#DocumentLink) literals. + */ + var DocumentLink; + (function (DocumentLink) { + /** + * Creates a new DocumentLink literal. + */ + function create(range, target) { + return { range: range, target: target }; + } + DocumentLink.create = create; + /** + * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target)); + } + DocumentLink.is = is; + })(DocumentLink = exports.DocumentLink || (exports.DocumentLink = {})); + var TextDocument; + (function (TextDocument) { + /** + * Creates a new ITextDocument literal from the given uri and content. + * @param uri The document's uri. + * @param languageId The document's language Id. + * @param content The document's content. + */ + function create(uri, languageId, version, content) { + return new FullTextDocument(uri, languageId, version, content); + } + TextDocument.create = create; + /** + * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface. + */ + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.number(candidate.lineCount) + && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false; + } + TextDocument.is = is; + })(TextDocument = exports.TextDocument || (exports.TextDocument = {})); + var FullTextDocument = (function () { + function FullTextDocument(uri, languageId, version, content) { + this._uri = uri; + this._languageId = languageId; + this._version = version; + this._content = content; + this._lineOffsets = null; + } + Object.defineProperty(FullTextDocument.prototype, "uri", { + get: function () { + return this._uri; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "languageId", { + get: function () { + return this._languageId; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(FullTextDocument.prototype, "version", { + get: function () { + return this._version; + }, + enumerable: true, + configurable: true + }); + FullTextDocument.prototype.getText = function () { + return this._content; + }; + FullTextDocument.prototype.update = function (event, version) { + this._content = event.text; + this._version = version; + this._lineOffsets = null; + }; + FullTextDocument.prototype.getLineOffsets = function () { + if (this._lineOffsets === null) { + var lineOffsets = []; + var text = this._content; + var isLineStart = true; + for (var i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + var ch = text.charAt(i); + isLineStart = (ch === '\r' || ch === '\n'); + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + this._lineOffsets = lineOffsets; + } + return this._lineOffsets; + }; + FullTextDocument.prototype.positionAt = function (offset) { + offset = Math.max(Math.min(offset, this._content.length), 0); + var lineOffsets = this.getLineOffsets(); + var low = 0, high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + while (low < high) { + var mid = Math.floor((low + high) / 2); + if (lineOffsets[mid] > offset) { + high = mid; + } + else { + low = mid + 1; + } + } + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + var line = low - 1; + return Position.create(line, offset - lineOffsets[line]); + }; + FullTextDocument.prototype.offsetAt = function (position) { + var lineOffsets = this.getLineOffsets(); + if (position.line >= lineOffsets.length) { + return this._content.length; + } + else if (position.line < 0) { + return 0; + } + var lineOffset = lineOffsets[position.line]; + var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length; + return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset); + }; + Object.defineProperty(FullTextDocument.prototype, "lineCount", { + get: function () { + return this.getLineOffsets().length; + }, + enumerable: true, + configurable: true + }); + return FullTextDocument; + }()); + var Is; + (function (Is) { + var toString = Object.prototype.toString; + function defined(value) { + return typeof value !== 'undefined'; + } + Is.defined = defined; + function undefined(value) { + return typeof value === 'undefined'; + } + Is.undefined = undefined; + function boolean(value) { + return value === true || value === false; + } + Is.boolean = boolean; + function string(value) { + return toString.call(value) === '[object String]'; + } + Is.string = string; + function number(value) { + return toString.call(value) === '[object Number]'; + } + Is.number = number; + function func(value) { + return toString.call(value) === '[object Function]'; + } + Is.func = func; + function typedArray(value, check) { + return Array.isArray(value) && value.every(check); + } + Is.typedArray = typedArray; + })(Is || (Is = {})); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/package.json new file mode 100644 index 0000000..01cfee5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver-types/package.json @@ -0,0 +1,113 @@ +{ + "_args": [ + [ + { + "raw": "vscode-languageserver-types@^1.0.4", + "scope": null, + "escapedName": "vscode-languageserver-types", + "name": "vscode-languageserver-types", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/vscode-languageserver" + ] + ], + "_from": "vscode-languageserver-types@>=1.0.4 <2.0.0", + "_id": "vscode-languageserver-types@1.0.4", + "_inCache": true, + "_location": "/vscode-languageserver-types", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/vscode-languageserver-types-1.0.4.tgz_1476302390491_0.8268511984497309" + }, + "_npmUser": { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "vscode-languageserver-types@^1.0.4", + "scope": null, + "escapedName": "vscode-languageserver-types", + "name": "vscode-languageserver-types", + "rawSpec": "^1.0.4", + "spec": ">=1.0.4 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/vscode-languageserver" + ], + "_resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.4.tgz", + "_shasum": "439a52f040c89cf6599d88ed9a1b5a9abdca11b7", + "_shrinkwrap": null, + "_spec": "vscode-languageserver-types@^1.0.4", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources/node_modules/vscode-languageserver", + "author": { + "name": "Microsoft Corporation" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "dependencies": {}, + "description": "Types used by the Language server for node", + "devDependencies": { + "mocha": "^2.4.5", + "typescript": "^1.8.10" + }, + "directories": {}, + "dist": { + "shasum": "439a52f040c89cf6599d88ed9a1b5a9abdca11b7", + "tarball": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.4.tgz" + }, + "homepage": "https://github.com/Microsoft/vscode-languageserver-node#readme", + "license": "MIT", + "main": "./lib/main.js", + "maintainers": [ + { + "name": "aeschli", + "email": "martinae@microsoft.com" + }, + { + "name": "alexandrudima", + "email": "alexdima@microsoft.com" + }, + { + "name": "chrisdias", + "email": "cdias@microsoft.com" + }, + { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + { + "name": "egamma", + "email": "egamma@microsoft.com" + }, + { + "name": "joaomoreno.ms", + "email": "joao.moreno@microsoft.com" + }, + { + "name": "jrieken", + "email": "jrieken@microsoft.com" + } + ], + "name": "vscode-languageserver-types", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/vscode-languageserver-node.git" + }, + "scripts": { + "compile": "tsc -p ./src", + "prepublish": "tsc -p ./src", + "test": "mocha", + "watch": "tsc -w -p ./src" + }, + "typings": "./lib/main", + "version": "1.0.4" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/.npmignore new file mode 100644 index 0000000..2b1e5b1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/.npmignore @@ -0,0 +1,9 @@ +.vscode/ +lib/test/ +lib/*.map +src/ +test/ +.eslintrc +.gitignore +gulpfile.js +tsd.json \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/License.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/License.txt new file mode 100644 index 0000000..027ef92 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/License.txt @@ -0,0 +1,11 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/README.md new file mode 100644 index 0000000..d446365 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/README.md @@ -0,0 +1,10 @@ +# VSCode Language Server + +[![NPM Version](https://img.shields.io/npm/v/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageserver.svg)](https://npmjs.org/package/vscode-languageserver) +[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node) + +Npm module to implement a VSCode language server using [Node.js](https://nodejs.org/) as a runtime. + +Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detailed document on how to use this npm module +to implement language servers for [VSCode](https://code.visualstudio.com/). \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/bin/installServerIntoExtension b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/bin/installServerIntoExtension new file mode 100755 index 0000000..af90d26 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/bin/installServerIntoExtension @@ -0,0 +1,119 @@ +#!/usr/bin/env node + +var path = require('path'); +var fs = require('fs'); +var cp = require('child_process'); + +var extensionDirectory = process.argv[2]; +if (!extensionDirectory) { + console.error('No extension directory provided.'); + process.exit(1) +} +extensionDirectory = path.resolve(extensionDirectory) +if (!fs.existsSync(extensionDirectory)) { + console.error('Extension directory ' + extensionDirectory + ' doesn\'t exist on disk.'); + process.exit(1); +} + +var packageFile = process.argv[3]; +if (!packageFile) { + console.error('No package.json file provided.'); + process.exit(1); +} +packageFile = path.resolve(packageFile); +if (!fs.existsSync(packageFile)) { + console.error('Package file ' + packageFile + ' doesn\'t exist on disk.'); + process.exit(1); +} +var tsconfigFile = process.argv[4]; +if (!tsconfigFile) { + console.error('No tsconfig.json file provided'); + process.exit(1); +} +tsconfigFile = path.resolve(tsconfigFile); +if (!fs.existsSync(tsconfigFile)) { + console.error('tsconfig file ' + tsconfigFile + ' doesn\'t exist on disk.') + process.exit(1); +} + +var extensionServerDirectory = path.join(extensionDirectory, 'server') + +json = require(tsconfigFile); +var compilerOptions = json.compilerOptions; +if (compilerOptions) { + var outDir = compilerOptions.outDir; + if (!outDir || path.join(path.dirname(tsconfigFile), outDir) !== extensionServerDirectory) { + console.error('outDir in ' + process.argv[4] + ' must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(tsconfigFile), outDir)); + console.error('Please change outDir in ' + process.argv[4] + ' to ' + path.relative(path.dirname(tsconfigFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } +} + +var launchFile = path.join(path.dirname(packageFile), '.vscode', 'launch.json'); +if (fs.existsSync(launchFile)) { + try { + json = JSON.parse(stripComments(fs.readFileSync(launchFile, 'utf8').toString())); + var configurations = json.configurations; + if (configurations) { + configurations.forEach(function(config) { + if (config.request === 'attach' && config.type === 'node') { + var outDir = config.outDir; + var resolvedOutDir = outDir; + if (resolvedOutDir) { + var workspaceRoot = path.dirname(packageFile); + resolvedOutDir = resolvedOutDir.replace(/\$\{workspaceRoot\}/g, workspaceRoot); + if (path.isAbsolute(resolvedOutDir)) { + resolvedOutDir = path.normalize(resolvedOutDir); + } else { + resolvedOutDir = path.join(workspaceRoot, outDir); + } + } + if (!resolvedOutDir || resolvedOutDir !== extensionServerDirectory) { + console.error('outDir in ./.vscode/launch.json must point to ' + extensionServerDirectory + ' but it points to ' + path.join(path.dirname(packageFile), outDir)); + console.error('Please change outDir in ./.vscode/launch.json to ' + path.relative(path.dirname(packageFile), extensionServerDirectory).replace(/\\/g, '/')); + process.exit(1); + } + } + }) + } + } catch (error) { + console.warn('Couldn\'t check launch.json file. Reading the file failed with: ' + error.message); + } +} + +function stripComments(content) { + var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + var result = content.replace(regexp, function (match, m1, m2, m3, m4) { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ""; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + var length_1 = m4.length; + if (length_1 > 2 && m4[length_1 - 1] === '\n') { + return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ""; + } + } + else { + // We match a string + return match; + } + }); + return result; +} + +if (!fs.existsSync(extensionServerDirectory)) { + fs.mkdirSync(extensionServerDirectory); +} + +var dest = path.join(extensionServerDirectory, 'package.json'); +console.log('Copying package.json to extension\'s server location...'); +fs.writeFileSync(dest, fs.readFileSync(packageFile)); + +console.log('Updating server npm modules into extension\'s server location...'); +cp.execSync('npm update --production --prefix ' + extensionServerDirectory); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.d.ts new file mode 100644 index 0000000..7179193 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.d.ts @@ -0,0 +1,10 @@ +export declare function uriToFilePath(uri: string): string; +export declare function resolveModule(workspaceRoot: string, moduleName: string): Thenable; +export declare function resolve(moduleName: string, nodePath: string, cwd: string, tracer: (message: string, verbose?: string) => void): Thenable; +export declare function resolveGlobalNodePath(tracer?: (message: string) => void): string; +export declare function resolveModulePath(workspaceRoot: string, moduleName: string, nodePath: string, tracer: (message: string, verbose?: string) => void): Thenable; +/** + * Resolves the given module relative to the given workspace root. In contrast to + * `resolveModule` this method considers the parent chain as well. + */ +export declare function resolveModule2(workspaceRoot: string, moduleName: string, nodePath: string, tracer: (message: string, verbose?: string) => void): Thenable; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.js new file mode 100644 index 0000000..679c7fe --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/files.js @@ -0,0 +1,220 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var url = require('url'); +var path = require('path'); +var child_process_1 = require('child_process'); +function uriToFilePath(uri) { + var parsed = url.parse(uri); + if (parsed.protocol !== 'file:' || !parsed.path) { + return null; + } + var segments = parsed.path.split('/'); + for (var i = 0, len = segments.length; i < len; i++) { + segments[i] = decodeURIComponent(segments[i]); + } + if (process.platform === 'win32' && segments.length > 1) { + var first = segments[0]; + var second = segments[1]; + // Do we have a drive letter and we started with a / which is the + // case if the first segement is empty (see split above) + if (first.length === 0 && second.length > 1 && second[1] === ':') { + // Remove first slash + segments.shift(); + } + } + return path.normalize(segments.join('/')); +} +exports.uriToFilePath = uriToFilePath; +function isWindows() { + return process.platform === 'win32'; +} +function resolveModule(workspaceRoot, moduleName) { + var nodePathKey = 'NODE_PATH'; + return new Promise(function (resolve, reject) { + var result = Object.create(null); + var nodePath = []; + if (workspaceRoot) { + nodePath.push(path.join(workspaceRoot, 'node_modules')); + } + child_process_1.exec('npm config get prefix', function (error, stdout, stderr) { + if (!error) { + var globalPath = stdout.toString().replace(/[\s\r\n]+$/, ''); + if (globalPath.length > 0) { + if (isWindows()) { + nodePath.push(path.join(globalPath, 'node_modules')); + } + else { + nodePath.push(path.join(globalPath, 'lib', 'node_modules')); + } + } + } + var separator = isWindows() ? ';' : ':'; + var env = process.env; + var newEnv = Object.create(null); + Object.keys(env).forEach(function (key) { return newEnv[key] = env[key]; }); + if (newEnv[nodePathKey]) { + newEnv[nodePathKey] = nodePath.join(separator) + separator + newEnv[nodePathKey]; + } + else { + newEnv[nodePathKey] = nodePath.join(separator); + } + try { + var cp_1 = child_process_1.fork(path.join(__dirname, 'resolve.js'), [], { env: newEnv, execArgv: [] }); + cp_1.on('message', function (message) { + if (message.command === 'resolve') { + var toRequire = moduleName; + if (message.success) { + toRequire = message.result; + } + cp_1.send({ command: 'exit' }); + try { + resolve(require(toRequire)); + } + catch (error) { + reject(error); + } + } + }); + var message = { + command: 'resolve', + args: moduleName + }; + cp_1.send(message); + } + catch (error) { + reject(error); + } + }); + }); +} +exports.resolveModule = resolveModule; +function resolve(moduleName, nodePath, cwd, tracer) { + var nodePathKey = 'NODE_PATH'; + var app = [ + "var p = process;", + "p.on('message',function(m){", + "if(m.c==='e'){", + "p.exit(0);", + "}", + "else if(m.c==='rs'){", + "try{", + "var r=require.resolve(m.a);", + "p.send({c:'r',s:true,r:r});", + "}", + "catch(err){", + "p.send({c:'r',s:false});", + "}", + "}", + "});" + ].join(''); + return new Promise(function (resolve, reject) { + var env = process.env; + var newEnv = Object.create(null); + Object.keys(env).forEach(function (key) { return newEnv[key] = env[key]; }); + if (nodePath) { + if (newEnv[nodePathKey]) { + newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey]; + } + else { + newEnv[nodePathKey] = nodePath; + } + if (tracer) { + tracer("NODE_PATH value is: " + newEnv[nodePathKey]); + } + } + newEnv['ATOM_SHELL_INTERNAL_RUN_AS_NODE'] = '1'; + try { + var cp_2 = child_process_1.fork('', [], { + cwd: cwd, + env: newEnv, + execArgv: ['-e', app] + }); + cp_2.on('error', function (error) { + reject(error); + }); + cp_2.on('message', function (message) { + if (message.c === 'r') { + cp_2.send({ c: 'e' }); + if (message.s) { + resolve(message.r); + } + else { + reject(new Error("Failed to resolve module: " + moduleName)); + } + } + }); + var message = { + c: 'rs', + a: moduleName + }; + cp_2.send(message); + } + catch (error) { + reject(error); + } + }); +} +exports.resolve = resolve; +function resolveGlobalNodePath(tracer) { + var npmCommand = isWindows() ? 'npm.cmd' : 'npm'; + var stdout = child_process_1.spawnSync(npmCommand, ['config', 'get', 'prefix'], { + encoding: 'utf8' + }).stdout; + if (!stdout) { + if (tracer) { + tracer("'npm config get prefix' didn't return a value."); + } + return undefined; + } + var prefix = stdout.trim(); + if (tracer) { + tracer("'npm config get prefix' value is: " + prefix); + } + if (prefix.length > 0) { + if (isWindows()) { + return path.join(prefix, 'node_modules'); + } + else { + return path.join(prefix, 'lib', 'node_modules'); + } + } + return undefined; +} +exports.resolveGlobalNodePath = resolveGlobalNodePath; +function resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) { + if (nodePath) { + if (!path.isAbsolute(nodePath)) { + nodePath = path.join(workspaceRoot, nodePath); + } + return resolve(moduleName, nodePath, nodePath, tracer).then(function (value) { + if (value.indexOf(path.normalize(nodePath)) === 0) { + return value; + } + else { + return Promise.reject(new Error("Failed to load " + moduleName + " from node path location.")); + } + }).then(null, function (error) { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + }); + } + else { + return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer); + } +} +exports.resolveModulePath = resolveModulePath; +/** + * Resolves the given module relative to the given workspace root. In contrast to + * `resolveModule` this method considers the parent chain as well. + */ +function resolveModule2(workspaceRoot, moduleName, nodePath, tracer) { + return resolveModulePath(workspaceRoot, moduleName, nodePath, tracer).then(function (path) { + if (tracer) { + tracer("Module " + moduleName + " got resolved to " + path); + } + return require(path); + }); +} +exports.resolveModule2 = resolveModule2; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.d.ts new file mode 100644 index 0000000..ba9a254 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.d.ts @@ -0,0 +1,435 @@ +import { RequestType, RequestHandler, NotificationType, NotificationHandler, ResponseError, ErrorCodes, MessageReader, DataCallback, StreamMessageReader, IPCMessageReader, MessageWriter, StreamMessageWriter, IPCMessageWriter, Event } from 'vscode-jsonrpc'; +import { TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Range, Position, Location, Diagnostic, DiagnosticSeverity, Command, TextEdit, WorkspaceEdit, WorkspaceChange, TextEditChange, TextDocumentIdentifier, CompletionItemKind, CompletionItem, CompletionList, Hover, MarkedString, SignatureHelp, SignatureInformation, ParameterInformation, Definition, CodeActionContext, DocumentHighlight, DocumentHighlightKind, SymbolInformation, SymbolKind, CodeLens, FormattingOptions, DocumentLink } from 'vscode-languageserver-types'; +import { InitializeParams, InitializeResult, InitializeError, ServerCapabilities, MessageActionItem, DidChangeConfigurationParams, DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, DidSaveTextDocumentParams, DidChangeWatchedFilesParams, FileEvent, FileChangeType, PublishDiagnosticsParams, TextDocumentPositionParams, TextDocumentSyncKind, CompletionOptions, ReferenceParams, DocumentSymbolParams, WorkspaceSymbolParams, CodeActionParams, CodeLensOptions, CodeLensRequest, CodeLensParams, CodeLensResolveRequest, DocumentFormattingRequest, DocumentFormattingParams, DocumentRangeFormattingRequest, DocumentRangeFormattingParams, DocumentOnTypeFormattingRequest, DocumentOnTypeFormattingParams, RenameRequest, RenameParams, DocumentLinkRequest, DocumentLinkResolveRequest, DocumentLinkParams } from './protocol'; +export { RequestType, RequestHandler, NotificationType, NotificationHandler, ResponseError, ErrorCodes, MessageReader, DataCallback, StreamMessageReader, IPCMessageReader, MessageWriter, StreamMessageWriter, IPCMessageWriter, MessageActionItem, InitializeParams, InitializeResult, InitializeError, ServerCapabilities, DidChangeConfigurationParams, DidChangeWatchedFilesParams, FileEvent, FileChangeType, DidOpenTextDocumentParams, DidChangeTextDocumentParams, TextDocumentContentChangeEvent, DidCloseTextDocumentParams, DidSaveTextDocumentParams, PublishDiagnosticsParams, Diagnostic, DiagnosticSeverity, Range, Position, Location, TextDocumentIdentifier, TextDocumentPositionParams, TextDocumentSyncKind, Hover, MarkedString, CompletionOptions, CompletionItemKind, CompletionItem, CompletionList, TextDocument, TextEdit, WorkspaceEdit, WorkspaceChange, TextEditChange, SignatureHelp, SignatureInformation, ParameterInformation, Definition, ReferenceParams, DocumentHighlight, DocumentHighlightKind, SymbolInformation, SymbolKind, DocumentSymbolParams, WorkspaceSymbolParams, CodeActionParams, CodeActionContext, Command, CodeLensRequest, CodeLensParams, CodeLensResolveRequest, CodeLens, CodeLensOptions, DocumentFormattingRequest, DocumentFormattingParams, DocumentRangeFormattingRequest, DocumentRangeFormattingParams, DocumentOnTypeFormattingRequest, DocumentOnTypeFormattingParams, FormattingOptions, RenameRequest, RenameParams, DocumentLink, DocumentLinkRequest, DocumentLinkResolveRequest }; +export { Event }; +import * as fm from './files'; +export declare namespace Files { + let uriToFilePath: typeof fm.uriToFilePath; + let resolveGlobalNodePath: typeof fm.resolveGlobalNodePath; + let resolve: typeof fm.resolve; + let resolveModule: typeof fm.resolveModule; + let resolveModule2: typeof fm.resolveModule2; + let resolveModulePath: typeof fm.resolveModulePath; +} +/** + * A manager for simple text documents + */ +export declare class TextDocuments { + private _documents; + private _onDidChangeContent; + private _onDidOpen; + private _onDidClose; + private _onDidSave; + /** + * Create a new text document manager. + */ + constructor(); + /** + * Returns the [TextDocumentSyncKind](#TextDocumentSyncKind) used by + * this text document manager. + */ + syncKind: TextDocumentSyncKind; + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + onDidChangeContent: Event; + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + onDidOpen: Event; + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + onDidClose: Event; + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + onDidSave: Event; + /** + * Returns the document for the given URI. Returns undefined if + * the document is not mananged by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + get(uri: string): TextDocument; + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + all(): TextDocument[]; + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + keys(): string[]; + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * @param connection The connection to listen on. + */ + listen(connection: IConnection): void; +} +/** + * Helps tracking error message. Equal occurences of the same + * message are only stored once. This class is for example + * usefull if text documents are validated in a loop and equal + * error message should be folded into one. + */ +export declare class ErrorMessageTracker { + private messages; + constructor(); + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + add(message: string): void; + /** + * Send all tracked messages to the conenction's window. + * + * @param connection The connection establised between client and server. + */ + sendErrors(connection: { + window: RemoteWindow; + }): void; +} +/** + * The RemoteConsole interface contains all functions to interact with + * the developer console of VS Code. + */ +export interface RemoteConsole { + /** + * Show an error message. + * + * @param message The message to show. + */ + error(message: string): any; + /** + * Show a warning message. + * + * @param message The message to show. + */ + warn(message: string): any; + /** + * Show an information message. + * + * @param message The message to show. + */ + info(message: string): any; + /** + * Log a message. + * + * @param message The message to log. + */ + log(message: string): any; +} +/** + * The RemoteWindow interface contains all functions to interact with + * the visual window of VS Code. + */ +export interface RemoteWindow { + /** + * Show an error message. + * + * @param message The message to show. + */ + showErrorMessage(message: string): any; + showErrorMessage(message: string, ...actions: T[]): Thenable; + /** + * Show a warning message. + * + * @param message The message to show. + */ + showWarningMessage(message: string): any; + showWarningMessage(message: string, ...actions: T[]): Thenable; + /** + * Show an information message. + * + * @param message The message to show. + */ + showInformationMessage(message: string): any; + showInformationMessage(message: string, ...actions: T[]): Thenable; +} +/** + * Interface to log telemetry events. The events are actually send to the client + * and the client needs to feed the event into a propert telemetry system. + */ +export interface Telemetry { + /** + * Log the given data to telemetry. + * + * @param data The data to log. Must be a JSON serializable object. + */ + logEvent(data: any): void; +} +/** + * Interface to log traces to the client. The events are sent to the client and the + * client needs to log the trace events. + */ +export interface Tracer { + /** + * Log the given data to the trace Log + */ + log(message: string, verbose?: string): void; +} +/** + * Interface to describe the shape of the server connection. + */ +export interface IConnection { + /** + * Start listening on the input stream for messages to process. + */ + listen(): void; + /** + * Installs a request handler described by the given [RequestType](#RequestType). + * + * @param type The [RequestType](#RequestType) describing the request. + * @param handler The handler to install + */ + onRequest(type: RequestType, handler: RequestHandler): void; + /** + * Installs a notification handler described by the given [NotificationType](#NotificationType). + * + * @param type The [NotificationType](#NotificationType) describing the notification. + * @param handler The handler to install + */ + onNotification

(type: NotificationType

, handler: NotificationHandler

): void; + /** + * Send a notification to the client. + * + * @param type The [NotificationType](#NotificationType) describing the notification. + * @param params The notification's parameters. + */ + sendNotification

(type: NotificationType

, params?: P): void; + /** + * Send a request to the client. + * + * @param type The [RequestType](#RequestType) describing the request. + * @param params The request's parameters. + */ + sendRequest(type: RequestType, params?: P): Thenable; + /** + * Installs a handler for the intialize request. + * + * @param handler The initialize handler. + */ + onInitialize(handler: RequestHandler): void; + /** + * Installs a handler for the shutdown request. + * + * @param handler The initialize handler. + */ + onShutdown(handler: RequestHandler): void; + /** + * Installs a handler for the exit notification. + * + * @param handler The exit handler. + */ + onExit(handler: NotificationHandler): void; + /** + * A proxy for VSCode's development console. See [RemoteConsole](#RemoteConsole) + */ + console: RemoteConsole; + /** + * A proxy for VSCode's window. See [RemoteWindow](#RemoteWindow) + */ + window: RemoteWindow; + /** + * A proxy to send telemetry events to the client. + */ + telemetry: Telemetry; + /** + * A proxy to send trace events to the client. + */ + tracer: Tracer; + /** + * Installs a handler for the `DidChangeConfiguration` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeConfiguration(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidChangeWatchedFiles` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeWatchedFiles(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidOpenTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidOpenTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidChangeTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidChangeTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidCloseTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidCloseTextDocument(handler: NotificationHandler): void; + /** + * Installs a handler for the `DidSaveTextDocument` notification. + * + * @param handler The corresponding handler. + */ + onDidSaveTextDocument(handler: NotificationHandler): void; + /** + * Sends diagnostics computed for a given document to VSCode to render them in the + * user interface. + * + * @param params The diagnostic parameters. + */ + sendDiagnostics(params: PublishDiagnosticsParams): void; + /** + * Installs a handler for the `Hover` request. + * + * @param handler The corresponding handler. + */ + onHover(handler: RequestHandler): void; + /** + * Installs a handler for the `Completion` request. + * + * @param handler The corresponding handler. + */ + onCompletion(handler: RequestHandler): void; + /** + * Installs a handler for the `CompletionResolve` request. + * + * @param handler The corresponding handler. + */ + onCompletionResolve(handler: RequestHandler): void; + /** + * Installs a handler for the `SignatureHelp` request. + * + * @param handler The corresponding handler. + */ + onSignatureHelp(handler: RequestHandler): void; + /** + * Installs a handler for the `Definition` request. + * + * @param handler The corresponding handler. + */ + onDefinition(handler: RequestHandler): void; + /** + * Installs a handler for the `References` request. + * + * @param handler The corresponding handler. + */ + onReferences(handler: RequestHandler): void; + /** + * Installs a handler for the `DocumentHighlight` request. + * + * @param handler The corresponding handler. + */ + onDocumentHighlight(handler: RequestHandler): void; + /** + * Installs a handler for the `DocumentSymbol` request. + * + * @param handler The corresponding handler. + */ + onDocumentSymbol(handler: RequestHandler): void; + /** + * Installs a handler for the `WorkspaceSymbol` request. + * + * @param handler The corresponding handler. + */ + onWorkspaceSymbol(handler: RequestHandler): void; + /** + * Installs a handler for the `CodeAction` request. + * + * @param handler The corresponding handler. + */ + onCodeAction(handler: RequestHandler): void; + /** + * Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if + * computing the commands is expensive implementors should only return code lens objects with the + * range set and handle the resolve request. + * + * @param handler The corresponding handler. + */ + onCodeLens(handler: RequestHandler): void; + /** + * This function will be called for each visible code lens, usually when scrolling and after + * the onCodeLens has been called. + * + * @param handler The corresponding handler. + */ + onCodeLensResolve(handler: RequestHandler): void; + /** + * Installs a handler for the document formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentFormatting(handler: RequestHandler): void; + /** + * Installs a handler for the document range formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentRangeFormatting(handler: RequestHandler): void; + /** + * Installs a handler for the document on type formatting request. + * + * @param handler The corresponding handler. + */ + onDocumentOnTypeFormatting(handler: RequestHandler): void; + /** + * Installs a handler for the rename request. + * + * @param handler The corresponding handler. + */ + onRenameRequest(handler: RequestHandler): void; + /** + * Installs a handler for the document links request. + * + * @param handler The corresponding handler. + */ + onDocumentLinks(handler: RequestHandler): void; + /** + * Installs a handler for the document links resolve request. + * + * @param handler The corresponding handler. + */ + onDocumentLinkResolve(handler: RequestHandler): void; + /** + * Disposes the connection + */ + dispose(): void; +} +/** + * Creates a new connection using a the given streams. + * + * @param inputStream The stream to read messages from. + * @param outputStream The stream to write messages to. + * @return a [connection](#IConnection) + */ +export declare function createConnection(inputStream: NodeJS.ReadableStream, outputStream: NodeJS.WritableStream): IConnection; +/** + * Creates a new connection. + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + */ +export declare function createConnection(reader: MessageReader, writer: MessageWriter): IConnection; +/** + * Creates a new connection based on the processes command line arguments: + * --ipc : connection using the node process ipc + * + * @param reader The message reader to read messages from. + * @param writer The message writer to write message to. + */ +export declare function createConnection(): IConnection; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.js new file mode 100644 index 0000000..7a6f0a4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/main.js @@ -0,0 +1,506 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var vscode_jsonrpc_1 = require('vscode-jsonrpc'); +exports.ResponseError = vscode_jsonrpc_1.ResponseError; +exports.ErrorCodes = vscode_jsonrpc_1.ErrorCodes; +exports.StreamMessageReader = vscode_jsonrpc_1.StreamMessageReader; +exports.IPCMessageReader = vscode_jsonrpc_1.IPCMessageReader; +exports.StreamMessageWriter = vscode_jsonrpc_1.StreamMessageWriter; +exports.IPCMessageWriter = vscode_jsonrpc_1.IPCMessageWriter; +exports.Event = vscode_jsonrpc_1.Event; +var vscode_languageserver_types_1 = require('vscode-languageserver-types'); +exports.TextDocument = vscode_languageserver_types_1.TextDocument; +exports.Range = vscode_languageserver_types_1.Range; +exports.Position = vscode_languageserver_types_1.Position; +exports.Location = vscode_languageserver_types_1.Location; +exports.Diagnostic = vscode_languageserver_types_1.Diagnostic; +exports.Command = vscode_languageserver_types_1.Command; +exports.TextEdit = vscode_languageserver_types_1.TextEdit; +exports.WorkspaceChange = vscode_languageserver_types_1.WorkspaceChange; +exports.TextDocumentIdentifier = vscode_languageserver_types_1.TextDocumentIdentifier; +exports.CompletionItem = vscode_languageserver_types_1.CompletionItem; +exports.CompletionList = vscode_languageserver_types_1.CompletionList; +exports.MarkedString = vscode_languageserver_types_1.MarkedString; +exports.SignatureInformation = vscode_languageserver_types_1.SignatureInformation; +exports.ParameterInformation = vscode_languageserver_types_1.ParameterInformation; +exports.CodeActionContext = vscode_languageserver_types_1.CodeActionContext; +exports.DocumentHighlight = vscode_languageserver_types_1.DocumentHighlight; +exports.SymbolInformation = vscode_languageserver_types_1.SymbolInformation; +exports.CodeLens = vscode_languageserver_types_1.CodeLens; +exports.FormattingOptions = vscode_languageserver_types_1.FormattingOptions; +exports.DocumentLink = vscode_languageserver_types_1.DocumentLink; +var protocol_1 = require('./protocol'); +exports.FileChangeType = protocol_1.FileChangeType; +exports.TextDocumentSyncKind = protocol_1.TextDocumentSyncKind; +exports.CodeLensRequest = protocol_1.CodeLensRequest; +exports.CodeLensResolveRequest = protocol_1.CodeLensResolveRequest; +exports.DocumentFormattingRequest = protocol_1.DocumentFormattingRequest; +exports.DocumentRangeFormattingRequest = protocol_1.DocumentRangeFormattingRequest; +exports.DocumentOnTypeFormattingRequest = protocol_1.DocumentOnTypeFormattingRequest; +exports.RenameRequest = protocol_1.RenameRequest; +exports.DocumentLinkRequest = protocol_1.DocumentLinkRequest; +exports.DocumentLinkResolveRequest = protocol_1.DocumentLinkResolveRequest; +var Is = require('./utils/is'); +// ------------- Reexport the API surface of the language worker API ---------------------- +var fm = require('./files'); +var net = require('net'); +var stream = require('stream'); +var Files; +(function (Files) { + Files.uriToFilePath = fm.uriToFilePath; + Files.resolveGlobalNodePath = fm.resolveGlobalNodePath; + Files.resolve = fm.resolve; + Files.resolveModule = fm.resolveModule; + Files.resolveModule2 = fm.resolveModule2; + Files.resolveModulePath = fm.resolveModulePath; +})(Files = exports.Files || (exports.Files = {})); +/** + * A manager for simple text documents + */ +var TextDocuments = (function () { + /** + * Create a new text document manager. + */ + function TextDocuments() { + this._documents = Object.create(null); + this._onDidChangeContent = new vscode_jsonrpc_1.Emitter(); + this._onDidOpen = new vscode_jsonrpc_1.Emitter(); + this._onDidClose = new vscode_jsonrpc_1.Emitter(); + this._onDidSave = new vscode_jsonrpc_1.Emitter(); + } + Object.defineProperty(TextDocuments.prototype, "syncKind", { + /** + * Returns the [TextDocumentSyncKind](#TextDocumentSyncKind) used by + * this text document manager. + */ + get: function () { + return protocol_1.TextDocumentSyncKind.Full; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextDocuments.prototype, "onDidChangeContent", { + /** + * An event that fires when a text document managed by this manager + * has been opened or the content changes. + */ + get: function () { + return this._onDidChangeContent.event; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextDocuments.prototype, "onDidOpen", { + /** + * An event that fires when a text document managed by this manager + * has been opened. + */ + get: function () { + return this._onDidOpen.event; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextDocuments.prototype, "onDidClose", { + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get: function () { + return this._onDidClose.event; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(TextDocuments.prototype, "onDidSave", { + /** + * An event that fires when a text document managed by this manager + * has been closed. + */ + get: function () { + return this._onDidSave.event; + }, + enumerable: true, + configurable: true + }); + /** + * Returns the document for the given URI. Returns undefined if + * the document is not mananged by this instance. + * + * @param uri The text document's URI to retrieve. + * @return the text document or `undefined`. + */ + TextDocuments.prototype.get = function (uri) { + return this._documents[uri]; + }; + /** + * Returns all text documents managed by this instance. + * + * @return all text documents. + */ + TextDocuments.prototype.all = function () { + var _this = this; + return Object.keys(this._documents).map(function (key) { return _this._documents[key]; }); + }; + /** + * Returns the URIs of all text documents managed by this instance. + * + * @return the URI's of all text documents. + */ + TextDocuments.prototype.keys = function () { + return Object.keys(this._documents); + }; + /** + * Listens for `low level` notification on the given connection to + * update the text documents managed by this instance. + * + * @param connection The connection to listen on. + */ + TextDocuments.prototype.listen = function (connection) { + var _this = this; + connection.__textDocumentSync = protocol_1.TextDocumentSyncKind.Full; + connection.onDidOpenTextDocument(function (event) { + var td = event.textDocument; + var document = vscode_languageserver_types_1.TextDocument.create(td.uri, td.languageId, td.version, td.text); + _this._documents[td.uri] = document; + _this._onDidOpen.fire({ document: document }); + _this._onDidChangeContent.fire({ document: document }); + }); + connection.onDidChangeTextDocument(function (event) { + var td = event.textDocument; + var changes = event.contentChanges; + var last = changes.length > 0 ? changes[changes.length - 1] : null; + if (last) { + var document_1 = _this._documents[td.uri]; + if (document_1 && Is.func(document_1['update'])) { + document_1.update(last, td.version); + _this._onDidChangeContent.fire({ document: document_1 }); + } + } + }); + connection.onDidCloseTextDocument(function (event) { + var document = _this._documents[event.textDocument.uri]; + if (document) { + delete _this._documents[event.textDocument.uri]; + _this._onDidClose.fire({ document: document }); + } + }); + connection.onDidSaveTextDocument(function (event) { + var document = _this._documents[event.textDocument.uri]; + if (document) { + _this._onDidSave.fire({ document: document }); + } + }); + }; + return TextDocuments; +}()); +exports.TextDocuments = TextDocuments; +// ------------------------- implementation of the language server protocol --------------------------------------------- +/** + * Helps tracking error message. Equal occurences of the same + * message are only stored once. This class is for example + * usefull if text documents are validated in a loop and equal + * error message should be folded into one. + */ +var ErrorMessageTracker = (function () { + function ErrorMessageTracker() { + this.messages = Object.create(null); + } + /** + * Add a message to the tracker. + * + * @param message The message to add. + */ + ErrorMessageTracker.prototype.add = function (message) { + var count = this.messages[message]; + if (!count) { + count = 0; + } + count++; + this.messages[message] = count; + }; + /** + * Send all tracked messages to the conenction's window. + * + * @param connection The connection establised between client and server. + */ + ErrorMessageTracker.prototype.sendErrors = function (connection) { + Object.keys(this.messages).forEach(function (message) { + connection.window.showErrorMessage(message); + }); + }; + return ErrorMessageTracker; +}()); +exports.ErrorMessageTracker = ErrorMessageTracker; +var ConnectionLogger = (function () { + function ConnectionLogger() { + } + ConnectionLogger.prototype.attach = function (connection) { + this.connection = connection; + }; + ConnectionLogger.prototype.error = function (message) { + this.send(protocol_1.MessageType.Error, message); + }; + ConnectionLogger.prototype.warn = function (message) { + this.send(protocol_1.MessageType.Warning, message); + }; + ConnectionLogger.prototype.info = function (message) { + this.send(protocol_1.MessageType.Info, message); + }; + ConnectionLogger.prototype.log = function (message) { + this.send(protocol_1.MessageType.Log, message); + }; + ConnectionLogger.prototype.send = function (type, message) { + if (this.connection) { + this.connection.sendNotification(protocol_1.LogMessageNotification.type, { type: type, message: message }); + } + }; + return ConnectionLogger; +}()); +var RemoteWindowImpl = (function () { + function RemoteWindowImpl(connection) { + this.connection = connection; + } + RemoteWindowImpl.prototype.showErrorMessage = function (message) { + var actions = []; + for (var _i = 1; _i < arguments.length; _i++) { + actions[_i - 1] = arguments[_i]; + } + return this.connection.sendRequest(protocol_1.ShowMessageRequest.type, { type: protocol_1.MessageType.Error, message: message, actions: actions }); + }; + RemoteWindowImpl.prototype.showWarningMessage = function (message) { + var actions = []; + for (var _i = 1; _i < arguments.length; _i++) { + actions[_i - 1] = arguments[_i]; + } + return this.connection.sendRequest(protocol_1.ShowMessageRequest.type, { type: protocol_1.MessageType.Warning, message: message, actions: actions }); + }; + RemoteWindowImpl.prototype.showInformationMessage = function (message) { + var actions = []; + for (var _i = 1; _i < arguments.length; _i++) { + actions[_i - 1] = arguments[_i]; + } + return this.connection.sendRequest(protocol_1.ShowMessageRequest.type, { type: protocol_1.MessageType.Info, message: message, actions: actions }); + }; + return RemoteWindowImpl; +}()); +var TracerImpl = (function () { + function TracerImpl(connection) { + this.connection = connection; + this._trace = vscode_jsonrpc_1.Trace.Off; + } + Object.defineProperty(TracerImpl.prototype, "trace", { + set: function (value) { + this._trace = value; + }, + enumerable: true, + configurable: true + }); + TracerImpl.prototype.log = function (message, verbose) { + if (this._trace === vscode_jsonrpc_1.Trace.Off) { + return; + } + this.connection.sendNotification(vscode_jsonrpc_1.LogTraceNotification.type, { + message: message, + verbose: this._trace === vscode_jsonrpc_1.Trace.Verbose ? verbose : null + }); + }; + return TracerImpl; +}()); +var TelemetryImpl = (function () { + function TelemetryImpl(connection) { + this.connection = connection; + } + TelemetryImpl.prototype.logEvent = function (data) { + this.connection.sendNotification(protocol_1.TelemetryEventNotification.type, data); + }; + return TelemetryImpl; +}()); +function createConnection(input, output) { + if (!input && !output && process.argv.length > 2) { + var port = void 0; + var argv = process.argv.slice(2); + for (var i = 0; i < argv.length; i++) { + var arg = argv[i]; + if (arg === '--node-ipc') { + input = new vscode_jsonrpc_1.IPCMessageReader(process); + output = new vscode_jsonrpc_1.IPCMessageWriter(process); + } + else if (arg === '--stdio') { + input = process.stdin; + output = process.stdout; + } + else if (arg === '--socket') { + port = parseInt(argv[i + 1]); + i++; + } + else { + var args = arg.split('='); + if (args[0] === '--socket') { + port = parseInt(args[1]); + } + } + } + if (port) { + output = new stream.PassThrough(); + input = new stream.PassThrough(); + var server_1 = net.createServer(function (socket) { + server_1.close(); + socket.pipe(output); + input.pipe(socket); + }).listen(port); + } + } + var commandLineMessage = "Use arguments of createConnection or set command line parameters: '--node-ipc', '--stdio' or '--socket={number}'"; + if (!input) { + throw new Error("Connection input stream is not set. " + commandLineMessage); + } + if (!output) { + throw new Error("Connection output stream is not set. " + commandLineMessage); + } + var shutdownReceived; + // Backwards compatibility + if (Is.func(input.read) && Is.func(input.on)) { + var inputStream = input; + inputStream.on('end', function () { + process.exit(shutdownReceived ? 0 : 1); + }); + inputStream.on('close', function () { + process.exit(shutdownReceived ? 0 : 1); + }); + } + var logger = new ConnectionLogger(); + var connection = vscode_jsonrpc_1.createServerMessageConnection(input, output, logger); + logger.attach(connection); + var remoteWindow = new RemoteWindowImpl(connection); + var telemetry = new TelemetryImpl(connection); + var tracer = new TracerImpl(connection); + function asThenable(value) { + if (Is.thenable(value)) { + return value; + } + else { + return Promise.resolve(value); + } + } + var shutdownHandler = null; + var initializeHandler = null; + var exitHandler = null; + var protocolConnection = { + listen: function () { return connection.listen(); }, + sendRequest: function (type, params) { return connection.sendRequest(type, params); }, + onRequest: function (type, handler) { return connection.onRequest(type, handler); }, + sendNotification: function (type, params) { return connection.sendNotification(type, params); }, + onNotification: function (type, handler) { return connection.onNotification(type, handler); }, + onInitialize: function (handler) { return initializeHandler = handler; }, + onShutdown: function (handler) { return shutdownHandler = handler; }, + onExit: function (handler) { return exitHandler = handler; }, + get console() { return logger; }, + get window() { return remoteWindow; }, + get telemetry() { return telemetry; }, + get tracer() { return tracer; }, + onDidChangeConfiguration: function (handler) { return connection.onNotification(protocol_1.DidChangeConfigurationNotification.type, handler); }, + onDidChangeWatchedFiles: function (handler) { return connection.onNotification(protocol_1.DidChangeWatchedFilesNotification.type, handler); }, + __textDocumentSync: undefined, + onDidOpenTextDocument: function (handler) { return connection.onNotification(protocol_1.DidOpenTextDocumentNotification.type, handler); }, + onDidChangeTextDocument: function (handler) { return connection.onNotification(protocol_1.DidChangeTextDocumentNotification.type, handler); }, + onDidCloseTextDocument: function (handler) { return connection.onNotification(protocol_1.DidCloseTextDocumentNotification.type, handler); }, + onDidSaveTextDocument: function (handler) { return connection.onNotification(protocol_1.DidSaveTextDocumentNotification.type, handler); }, + sendDiagnostics: function (params) { return connection.sendNotification(protocol_1.PublishDiagnosticsNotification.type, params); }, + onHover: function (handler) { return connection.onRequest(protocol_1.HoverRequest.type, handler); }, + onCompletion: function (handler) { return connection.onRequest(protocol_1.CompletionRequest.type, handler); }, + onCompletionResolve: function (handler) { return connection.onRequest(protocol_1.CompletionResolveRequest.type, handler); }, + onSignatureHelp: function (handler) { return connection.onRequest(protocol_1.SignatureHelpRequest.type, handler); }, + onDefinition: function (handler) { return connection.onRequest(protocol_1.DefinitionRequest.type, handler); }, + onReferences: function (handler) { return connection.onRequest(protocol_1.ReferencesRequest.type, handler); }, + onDocumentHighlight: function (handler) { return connection.onRequest(protocol_1.DocumentHighlightRequest.type, handler); }, + onDocumentSymbol: function (handler) { return connection.onRequest(protocol_1.DocumentSymbolRequest.type, handler); }, + onWorkspaceSymbol: function (handler) { return connection.onRequest(protocol_1.WorkspaceSymbolRequest.type, handler); }, + onCodeAction: function (handler) { return connection.onRequest(protocol_1.CodeActionRequest.type, handler); }, + onCodeLens: function (handler) { return connection.onRequest(protocol_1.CodeLensRequest.type, handler); }, + onCodeLensResolve: function (handler) { return connection.onRequest(protocol_1.CodeLensResolveRequest.type, handler); }, + onDocumentFormatting: function (handler) { return connection.onRequest(protocol_1.DocumentFormattingRequest.type, handler); }, + onDocumentRangeFormatting: function (handler) { return connection.onRequest(protocol_1.DocumentRangeFormattingRequest.type, handler); }, + onDocumentOnTypeFormatting: function (handler) { return connection.onRequest(protocol_1.DocumentOnTypeFormattingRequest.type, handler); }, + onRenameRequest: function (handler) { return connection.onRequest(protocol_1.RenameRequest.type, handler); }, + onDocumentLinks: function (handler) { return connection.onRequest(protocol_1.DocumentLinkRequest.type, handler); }, + onDocumentLinkResolve: function (handler) { return connection.onRequest(protocol_1.DocumentLinkResolveRequest.type, handler); }, + dispose: function () { return connection.dispose(); } + }; + connection.onRequest(protocol_1.InitializeRequest.type, function (params) { + if (Is.number(params.processId)) { + // We received a parent process id. Set up a timer to periodically check + // if the parent is still alive. + setInterval(function () { + try { + process.kill(params.processId, 0); + } + catch (ex) { + // Parent process doesn't exist anymore. Exit the server. + process.exit(shutdownReceived ? 0 : 1); + } + }, 3000); + } + if (Is.string(params.trace)) { + tracer.trace = vscode_jsonrpc_1.Trace.fromString(params.trace); + } + if (initializeHandler) { + var result = initializeHandler(params, new vscode_jsonrpc_1.CancellationTokenSource().token); + return asThenable(result).then(function (value) { + if (value instanceof vscode_jsonrpc_1.ResponseError) { + return value; + } + var result = value; + if (!result) { + result = { capabilities: {} }; + } + var capabilities = result.capabilities; + if (!capabilities) { + capabilities = {}; + result.capabilities = {}; + } + if (!Is.number(capabilities.textDocumentSync)) { + capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : protocol_1.TextDocumentSyncKind.None; + } + return result; + }); + } + else { + var result = { capabilities: { textDocumentSync: protocol_1.TextDocumentSyncKind.None } }; + return result; + } + }); + connection.onRequest(protocol_1.ShutdownRequest.type, function (params) { + shutdownReceived = true; + if (shutdownHandler) { + return shutdownHandler(params, new vscode_jsonrpc_1.CancellationTokenSource().token); + } + else { + return undefined; + } + }); + connection.onNotification(protocol_1.ExitNotification.type, function (params) { + try { + if (exitHandler) { + exitHandler(params); + } + } + finally { + if (shutdownReceived) { + process.exit(0); + } + else { + process.exit(1); + } + } + }); + connection.onNotification(vscode_jsonrpc_1.SetTraceNotification.type, function (params) { + tracer.trace = vscode_jsonrpc_1.Trace.fromString(params.value); + ; + }); + return protocolConnection; +} +exports.createConnection = createConnection; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.d.ts new file mode 100644 index 0000000..e32d107 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.d.ts @@ -0,0 +1,758 @@ +import { RequestType, NotificationType } from 'vscode-jsonrpc'; +import { TextDocumentContentChangeEvent, Range, Position, Location, Diagnostic, Command, TextEdit, WorkspaceEdit, TextDocumentIdentifier, VersionedTextDocumentIdentifier, TextDocumentItem, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, ReferenceContext, DocumentHighlight, SymbolInformation, CodeLens, CodeActionContext, FormattingOptions, DocumentLink } from 'vscode-languageserver-types'; +/** + * A parameter literal used in requests to pass a text document and a position inside that + * document. + */ +export interface TextDocumentPositionParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; + /** + * The position inside the text document. + */ + position: Position; +} +/** + * Defines the capabilities provided by the client. + */ +export interface ClientCapabilities { +} +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +export declare enum TextDocumentSyncKind { + /** + * Documents should not be synced at all. + */ + None = 0, + /** + * Documents are synced by always sending the full content + * of the document. + */ + Full = 1, + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + Incremental = 2, +} +/** + * Completion options. + */ +export interface CompletionOptions { + /** + * The server provides support to resolve additional + * information for a completion item. + */ + resolveProvider?: boolean; + /** + * The characters that trigger completion automatically. + */ + triggerCharacters?: string[]; +} +/** + * Signature help options. + */ +export interface SignatureHelpOptions { + /** + * The characters that trigger signature help + * automatically. + */ + triggerCharacters?: string[]; +} +/** + * Code Lens options. + */ +export interface CodeLensOptions { + /** + * Code lens has a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Format document on type options + */ +export interface DocumentOnTypeFormattingOptions { + /** + * A character on which formatting should be triggered, like `}`. + */ + firstTriggerCharacter: string; + /** + * More trigger characters. + */ + moreTriggerCharacter?: string[]; +} +/** + * Document link options + */ +export interface DocumentLinkOptions { + /** + * Document links have a resolve provider as well. + */ + resolveProvider?: boolean; +} +/** + * Defines the capabilities provided by a language + * server. + */ +export interface ServerCapabilities { + /** + * Defines how text documents are synced. + */ + textDocumentSync?: number; + /** + * The server provides hover support. + */ + hoverProvider?: boolean; + /** + * The server provides completion support. + */ + completionProvider?: CompletionOptions; + /** + * The server provides signature help support. + */ + signatureHelpProvider?: SignatureHelpOptions; + /** + * The server provides goto definition support. + */ + definitionProvider?: boolean; + /** + * The server provides find references support. + */ + referencesProvider?: boolean; + /** + * The server provides document highlight support. + */ + documentHighlightProvider?: boolean; + /** + * The server provides document symbol support. + */ + documentSymbolProvider?: boolean; + /** + * The server provides workspace symbol support. + */ + workspaceSymbolProvider?: boolean; + /** + * The server provides code actions. + */ + codeActionProvider?: boolean; + /** + * The server provides code lens. + */ + codeLensProvider?: CodeLensOptions; + /** + * The server provides document formatting. + */ + documentFormattingProvider?: boolean; + /** + * The server provides document range formatting. + */ + documentRangeFormattingProvider?: boolean; + /** + * The server provides document formatting on typing. + */ + documentOnTypeFormattingProvider?: DocumentOnTypeFormattingOptions; + /** + * The server provides rename support. + */ + renameProvider?: boolean; + /** + * The server provides document link support. + */ + documentLinkProvider?: DocumentLinkOptions; +} +/** + * The initialize method is sent from the client to the server. + * It is send once as the first method after starting up the + * worker. The requests parameter is of type [InitializeParams](#InitializeParams) + * the response if of type [InitializeResult](#InitializeResult) of a Thenable that + * resolves to such. + */ +export declare namespace InitializeRequest { + const type: RequestType; +} +/** + * The initialize parameters + */ +export interface InitializeParams { + /** + * The process Id of the parent process that started + * the server. + */ + processId: number; + /** + * The rootPath of the workspace. Is null + * if no folder is open. + */ + rootPath: string; + /** + * The capabilities provided by the client (editor) + */ + capabilities: ClientCapabilities; + /** + * User provided initialization options. + */ + initializationOptions?: any; + /** + * The initial trace setting. If omitted trace is disabled ('off'). + */ + trace?: 'off' | 'messages' | 'verbose'; +} +/** + * The result returned from an initilize request. + */ +export interface InitializeResult { + /** + * The capabilities the language server provides. + */ + capabilities: ServerCapabilities; +} +/** + * The data type of the ResponseError if the + * initialize request fails. + */ +export interface InitializeError { + /** + * Indicates whether the client should retry to send the + * initilize request after showing the message provided + * in the {@link ResponseError} + */ + retry: boolean; +} +/** + * A shutdown request is sent from the client to the server. + * It is send once when the client descides to shutdown the + * server. The only notification that is sent after a shudown request + * is the exit event. + */ +export declare namespace ShutdownRequest { + const type: RequestType; +} +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +export declare namespace ExitNotification { + const type: NotificationType; +} +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +export declare namespace DidChangeConfigurationNotification { + const type: NotificationType; +} +/** + * The parameters of a change configuration notification. + */ +export interface DidChangeConfigurationParams { + /** + * The actual changed settings + */ + settings: any; +} +/** + * The message type + */ +export declare enum MessageType { + /** + * An error message. + */ + Error = 1, + /** + * A warning message. + */ + Warning = 2, + /** + * An information message. + */ + Info = 3, + /** + * A log message. + */ + Log = 4, +} +/** + * The parameters of a notification message. + */ +export interface ShowMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: number; + /** + * The actual message + */ + message: string; +} +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +export declare namespace ShowMessageNotification { + const type: NotificationType; +} +export interface MessageActionItem { + /** + * A short title like 'Retry', 'Open Log' etc. + */ + title: string; +} +export interface ShowMessageRequestParams { + /** + * The message type. See {@link MessageType} + */ + type: number; + /** + * The actual message + */ + message: string; + /** + * The message action items to present. + */ + actions?: MessageActionItem[]; +} +/** + * The show message request is send from the server to the clinet to show a message + * and a set of options actions to the user. + */ +export declare namespace ShowMessageRequest { + const type: RequestType; +} +/** + * The log message notification is send from the server to the client to ask + * the client to log a particular message. + */ +export declare namespace LogMessageNotification { + let type: NotificationType; +} +/** + * The log message parameters. + */ +export interface LogMessageParams { + /** + * The message type. See {@link MessageType} + */ + type: number; + /** + * The actual message + */ + message: string; +} +/** + * The telemetry event notification is send from the server to the client to ask + * the client to log telemetry data. + */ +export declare namespace TelemetryEventNotification { + let type: NotificationType; +} +/** + * The parameters send in a open text document notification + */ +export interface DidOpenTextDocumentParams { + /** + * The document that was opened. + */ + textDocument: TextDocumentItem; +} +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. + */ +export declare namespace DidOpenTextDocumentNotification { + const type: NotificationType; +} +/** + * An event describing a change to a text document. If range and rangeLength are omitted + * the new text is considered to be the full content of the document. + */ +export interface TextDocumentContentChangeEvent { + /** + * The range of the document that changed. + */ + range?: Range; + /** + * The length of the range that got replaced. + */ + rangeLength?: number; + /** + * The new text of the document. + */ + text: string; +} +/** + * The change text document notification's parameters. + */ +export interface DidChangeTextDocumentParams { + /** + * The document that did change. The version number points + * to the version after all provided content changes have + * been applied. + */ + textDocument: VersionedTextDocumentIdentifier; + /** + * The actual content changes. + */ + contentChanges: TextDocumentContentChangeEvent[]; +} +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +export declare namespace DidChangeTextDocumentNotification { + const type: NotificationType; +} +/** + * The parameters send in a close text document notification + */ +export interface DidCloseTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists + * where the document's uri points to (e.g. if the document's uri is a file uri + * the truth now exists on disk). + */ +export declare namespace DidCloseTextDocumentNotification { + const type: NotificationType; +} +/** + * The parameters send in a save text document notification + */ +export interface DidSaveTextDocumentParams { + /** + * The document that was closed. + */ + textDocument: TextDocumentIdentifier; +} +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +export declare namespace DidSaveTextDocumentNotification { + const type: NotificationType; +} +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the lanaguage client. + */ +export declare namespace DidChangeWatchedFilesNotification { + const type: NotificationType; +} +/** + * The watched files change notification's parameters. + */ +export interface DidChangeWatchedFilesParams { + /** + * The actual file events. + */ + changes: FileEvent[]; +} +/** + * The file event type + */ +export declare enum FileChangeType { + /** + * The file got created. + */ + Created = 1, + /** + * The file got changed. + */ + Changed = 2, + /** + * The file got deleted. + */ + Deleted = 3, +} +/** + * An event describing a file change. + */ +export interface FileEvent { + /** + * The file's uri. + */ + uri: string; + /** + * The change type. + */ + type: number; +} +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +export declare namespace PublishDiagnosticsNotification { + const type: NotificationType; +} +/** + * The publish diagnostic notification's parameters. + */ +export interface PublishDiagnosticsParams { + /** + * The URI for which diagnostic information is reported. + */ + uri: string; + /** + * An array of diagnostic information items. + */ + diagnostics: Diagnostic[]; +} +/** + * Request to request completion at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response + * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList) + * or a Thenable that resolves to such. + */ +export declare namespace CompletionRequest { + const type: RequestType; +} +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type [CompletionItem](#CompletionItem) the response + * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such. + */ +export declare namespace CompletionResolveRequest { + const type: RequestType; +} +export declare type MarkedString = string | { + language: string; + value: string; +}; +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of + * type [Hover](#Hover) or a Thenable that resolves to such. + */ +export declare namespace HoverRequest { + const type: RequestType; +} +export declare namespace SignatureHelpRequest { + const type: RequestType; +} +/** + * A request to resolve the defintion location of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +export declare namespace DefinitionRequest { + const type: RequestType; +} +/** + * Parameters for a [ReferencesRequest](#ReferencesRequest). + */ +export interface ReferenceParams extends TextDocumentPositionParams { + context: ReferenceContext; +} +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type [ReferenceParams](#ReferenceParams) the response is of type + * [Location[]](#Location) or a Thenable that resolves to such. + */ +export declare namespace ReferencesRequest { + const type: RequestType; +} +/** + * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given + * text document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the request reponse is of type [DocumentHighlight[]] + * (#DocumentHighlight) or a Thenable that resolves to such. + */ +export declare namespace DocumentHighlightRequest { + const type: RequestType; +} +/** + * Parameters for a [DocumentSymbolRequest](#DocumentSymbolRequest). + */ +export interface DocumentSymbolParams { + /** + * The text document. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the + * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable + * that resolves to such. + */ +export declare namespace DocumentSymbolRequest { + const type: RequestType; +} +/** + * The parameters of a [WorkspaceSymbolRequest](#WorkspaceSymbolRequest). + */ +export interface WorkspaceSymbolParams { + /** + * A non-empty query string + */ + query: string; +} +/** + * A request to list project-wide symbols matching the query string given + * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is + * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that + * resolves to such. + */ +export declare namespace WorkspaceSymbolRequest { + const type: RequestType; +} +/** + * Params for the CodeActionRequest + */ +export interface CodeActionParams { + /** + * The document in which the command was invoked. + */ + textDocument: TextDocumentIdentifier; + /** + * The range for which the command was invoked. + */ + range: Range; + /** + * Context carrying additional information. + */ + context: CodeActionContext; +} +/** + * A request to provide commands for the given text document and range. + */ +export declare namespace CodeActionRequest { + const type: RequestType; +} +/** + * Params for the Code Lens request. + */ +export interface CodeLensParams { + /** + * The document to request code lens for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to provide code lens for the given text document. + */ +export declare namespace CodeLensRequest { + const type: RequestType; +} +/** + * A request to resolve a command for a given code lens. + */ +export declare namespace CodeLensResolveRequest { + const type: RequestType; +} +export interface DocumentFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * A request to to format a whole document. + */ +export declare namespace DocumentFormattingRequest { + const type: RequestType; +} +export interface DocumentRangeFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The range to format + */ + range: Range; + /** + * The format options + */ + options: FormattingOptions; +} +/** + * A request to to format a range in a document. + */ +export declare namespace DocumentRangeFormattingRequest { + const type: RequestType; +} +export interface DocumentOnTypeFormattingParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was send. + */ + position: Position; + /** + * The character that has been typed. + */ + ch: string; + /** + * The format options. + */ + options: FormattingOptions; +} +/** + * A request to format a document on type. + */ +export declare namespace DocumentOnTypeFormattingRequest { + const type: RequestType; +} +export interface RenameParams { + /** + * The document to format. + */ + textDocument: TextDocumentIdentifier; + /** + * The position at which this request was send. + */ + position: Position; + /** + * The new name of the symbol. If the given name is not valid the + * request must return a [ResponseError](#ResponseError) with an + * appropriate message set. + */ + newName: string; +} +/** + * A request to rename a symbol. + */ +export declare namespace RenameRequest { + const type: RequestType; +} +export interface DocumentLinkParams { + /** + * The document to provide document links for. + */ + textDocument: TextDocumentIdentifier; +} +/** + * A request to provide document links + */ +export declare namespace DocumentLinkRequest { + const type: RequestType; +} +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type [DocumentLink](#DocumentLink) the response + * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such. + */ +export declare namespace DocumentLinkResolveRequest { + const type: RequestType; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.js new file mode 100644 index 0000000..0b5ad4a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/protocol.js @@ -0,0 +1,347 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +/** + * Defines how the host (editor) should sync + * document changes to the language server. + */ +(function (TextDocumentSyncKind) { + /** + * Documents should not be synced at all. + */ + TextDocumentSyncKind[TextDocumentSyncKind["None"] = 0] = "None"; + /** + * Documents are synced by always sending the full content + * of the document. + */ + TextDocumentSyncKind[TextDocumentSyncKind["Full"] = 1] = "Full"; + /** + * Documents are synced by sending the full content on open. + * After that only incremental updates to the document are + * send. + */ + TextDocumentSyncKind[TextDocumentSyncKind["Incremental"] = 2] = "Incremental"; +})(exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {})); +var TextDocumentSyncKind = exports.TextDocumentSyncKind; +/** + * The initialize method is sent from the client to the server. + * It is send once as the first method after starting up the + * worker. The requests parameter is of type [InitializeParams](#InitializeParams) + * the response if of type [InitializeResult](#InitializeResult) of a Thenable that + * resolves to such. + */ +var InitializeRequest; +(function (InitializeRequest) { + InitializeRequest.type = { get method() { return 'initialize'; } }; +})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {})); +//---- Shutdown Method ---- +/** + * A shutdown request is sent from the client to the server. + * It is send once when the client descides to shutdown the + * server. The only notification that is sent after a shudown request + * is the exit event. + */ +var ShutdownRequest; +(function (ShutdownRequest) { + ShutdownRequest.type = { get method() { return 'shutdown'; } }; +})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {})); +//---- Exit Notification ---- +/** + * The exit event is sent from the client to the server to + * ask the server to exit its process. + */ +var ExitNotification; +(function (ExitNotification) { + ExitNotification.type = { get method() { return 'exit'; } }; +})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {})); +//---- Configuration notification ---- +/** + * The configuration change notification is sent from the client to the server + * when the client's configuration has changed. The notification contains + * the changed configuration as defined by the language client. + */ +var DidChangeConfigurationNotification; +(function (DidChangeConfigurationNotification) { + DidChangeConfigurationNotification.type = { get method() { return 'workspace/didChangeConfiguration'; } }; +})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {})); +//---- Message show and log notifications ---- +/** + * The message type + */ +(function (MessageType) { + /** + * An error message. + */ + MessageType[MessageType["Error"] = 1] = "Error"; + /** + * A warning message. + */ + MessageType[MessageType["Warning"] = 2] = "Warning"; + /** + * An information message. + */ + MessageType[MessageType["Info"] = 3] = "Info"; + /** + * A log message. + */ + MessageType[MessageType["Log"] = 4] = "Log"; +})(exports.MessageType || (exports.MessageType = {})); +var MessageType = exports.MessageType; +/** + * The show message notification is sent from a server to a client to ask + * the client to display a particular message in the user interface. + */ +var ShowMessageNotification; +(function (ShowMessageNotification) { + ShowMessageNotification.type = { get method() { return 'window/showMessage'; } }; +})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {})); +/** + * The show message request is send from the server to the clinet to show a message + * and a set of options actions to the user. + */ +var ShowMessageRequest; +(function (ShowMessageRequest) { + ShowMessageRequest.type = { get method() { return 'window/showMessageRequest'; } }; +})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {})); +/** + * The log message notification is send from the server to the client to ask + * the client to log a particular message. + */ +var LogMessageNotification; +(function (LogMessageNotification) { + LogMessageNotification.type = { get method() { return 'window/logMessage'; } }; +})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {})); +//---- Telemetry notification +/** + * The telemetry event notification is send from the server to the client to ask + * the client to log telemetry data. + */ +var TelemetryEventNotification; +(function (TelemetryEventNotification) { + TelemetryEventNotification.type = { get method() { return 'telemetry/event'; } }; +})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {})); +/** + * The document open notification is sent from the client to the server to signal + * newly opened text documents. The document's truth is now managed by the client + * and the server must not try to read the document's truth using the document's + * uri. + */ +var DidOpenTextDocumentNotification; +(function (DidOpenTextDocumentNotification) { + DidOpenTextDocumentNotification.type = { get method() { return 'textDocument/didOpen'; } }; +})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {})); +/** + * The document change notification is sent from the client to the server to signal + * changes to a text document. + */ +var DidChangeTextDocumentNotification; +(function (DidChangeTextDocumentNotification) { + DidChangeTextDocumentNotification.type = { get method() { return 'textDocument/didChange'; } }; +})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {})); +/** + * The document close notification is sent from the client to the server when + * the document got closed in the client. The document's truth now exists + * where the document's uri points to (e.g. if the document's uri is a file uri + * the truth now exists on disk). + */ +var DidCloseTextDocumentNotification; +(function (DidCloseTextDocumentNotification) { + DidCloseTextDocumentNotification.type = { get method() { return 'textDocument/didClose'; } }; +})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {})); +/** + * The document save notification is sent from the client to the server when + * the document got saved in the client. + */ +var DidSaveTextDocumentNotification; +(function (DidSaveTextDocumentNotification) { + DidSaveTextDocumentNotification.type = { get method() { return 'textDocument/didSave'; } }; +})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {})); +//---- File eventing ---- +/** + * The watched files notification is sent from the client to the server when + * the client detects changes to file watched by the lanaguage client. + */ +var DidChangeWatchedFilesNotification; +(function (DidChangeWatchedFilesNotification) { + DidChangeWatchedFilesNotification.type = { get method() { return 'workspace/didChangeWatchedFiles'; } }; +})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {})); +/** + * The file event type + */ +(function (FileChangeType) { + /** + * The file got created. + */ + FileChangeType[FileChangeType["Created"] = 1] = "Created"; + /** + * The file got changed. + */ + FileChangeType[FileChangeType["Changed"] = 2] = "Changed"; + /** + * The file got deleted. + */ + FileChangeType[FileChangeType["Deleted"] = 3] = "Deleted"; +})(exports.FileChangeType || (exports.FileChangeType = {})); +var FileChangeType = exports.FileChangeType; +//---- Diagnostic notification ---- +/** + * Diagnostics notification are sent from the server to the client to signal + * results of validation runs. + */ +var PublishDiagnosticsNotification; +(function (PublishDiagnosticsNotification) { + PublishDiagnosticsNotification.type = { get method() { return 'textDocument/publishDiagnostics'; } }; +})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {})); +//---- Completion Support -------------------------- +/** + * Request to request completion at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response + * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList) + * or a Thenable that resolves to such. + */ +var CompletionRequest; +(function (CompletionRequest) { + CompletionRequest.type = { get method() { return 'textDocument/completion'; } }; +})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {})); +/** + * Request to resolve additional information for a given completion item.The request's + * parameter is of type [CompletionItem](#CompletionItem) the response + * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such. + */ +var CompletionResolveRequest; +(function (CompletionResolveRequest) { + CompletionResolveRequest.type = { get method() { return 'completionItem/resolve'; } }; +})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {})); +/** + * Request to request hover information at a given text document position. The request's + * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of + * type [Hover](#Hover) or a Thenable that resolves to such. + */ +var HoverRequest; +(function (HoverRequest) { + HoverRequest.type = { get method() { return 'textDocument/hover'; } }; +})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {})); +//---- SignatureHelp ---------------------------------- +var SignatureHelpRequest; +(function (SignatureHelpRequest) { + SignatureHelpRequest.type = { get method() { return 'textDocument/signatureHelp'; } }; +})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {})); +//---- Goto Definition ------------------------------------- +/** + * A request to resolve the defintion location of a symbol at a given text + * document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the response is of type [Definition](#Definition) or a + * Thenable that resolves to such. + */ +var DefinitionRequest; +(function (DefinitionRequest) { + DefinitionRequest.type = { get method() { return 'textDocument/definition'; } }; +})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {})); +/** + * A request to resolve project-wide references for the symbol denoted + * by the given text document position. The request's parameter is of + * type [ReferenceParams](#ReferenceParams) the response is of type + * [Location[]](#Location) or a Thenable that resolves to such. + */ +var ReferencesRequest; +(function (ReferencesRequest) { + ReferencesRequest.type = { get method() { return 'textDocument/references'; } }; +})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {})); +//---- Document Highlight ---------------------------------- +/** + * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given + * text document position. The request's parameter is of type [TextDocumentPosition] + * (#TextDocumentPosition) the request reponse is of type [DocumentHighlight[]] + * (#DocumentHighlight) or a Thenable that resolves to such. + */ +var DocumentHighlightRequest; +(function (DocumentHighlightRequest) { + DocumentHighlightRequest.type = { get method() { return 'textDocument/documentHighlight'; } }; +})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {})); +/** + * A request to list all symbols found in a given text document. The request's + * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the + * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable + * that resolves to such. + */ +var DocumentSymbolRequest; +(function (DocumentSymbolRequest) { + DocumentSymbolRequest.type = { get method() { return 'textDocument/documentSymbol'; } }; +})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {})); +/** + * A request to list project-wide symbols matching the query string given + * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is + * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that + * resolves to such. + */ +var WorkspaceSymbolRequest; +(function (WorkspaceSymbolRequest) { + WorkspaceSymbolRequest.type = { get method() { return 'workspace/symbol'; } }; +})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {})); +/** + * A request to provide commands for the given text document and range. + */ +var CodeActionRequest; +(function (CodeActionRequest) { + CodeActionRequest.type = { get method() { return 'textDocument/codeAction'; } }; +})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {})); +/** + * A request to provide code lens for the given text document. + */ +var CodeLensRequest; +(function (CodeLensRequest) { + CodeLensRequest.type = { get method() { return 'textDocument/codeLens'; } }; +})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {})); +/** + * A request to resolve a command for a given code lens. + */ +var CodeLensResolveRequest; +(function (CodeLensResolveRequest) { + CodeLensResolveRequest.type = { get method() { return 'codeLens/resolve'; } }; +})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {})); +/** + * A request to to format a whole document. + */ +var DocumentFormattingRequest; +(function (DocumentFormattingRequest) { + DocumentFormattingRequest.type = { get method() { return 'textDocument/formatting'; } }; +})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {})); +/** + * A request to to format a range in a document. + */ +var DocumentRangeFormattingRequest; +(function (DocumentRangeFormattingRequest) { + DocumentRangeFormattingRequest.type = { get method() { return 'textDocument/rangeFormatting'; } }; +})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {})); +/** + * A request to format a document on type. + */ +var DocumentOnTypeFormattingRequest; +(function (DocumentOnTypeFormattingRequest) { + DocumentOnTypeFormattingRequest.type = { get method() { return 'textDocument/onTypeFormatting'; } }; +})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {})); +/** + * A request to rename a symbol. + */ +var RenameRequest; +(function (RenameRequest) { + RenameRequest.type = { get method() { return 'textDocument/rename'; } }; +})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {})); +/** + * A request to provide document links + */ +var DocumentLinkRequest; +(function (DocumentLinkRequest) { + DocumentLinkRequest.type = { get method() { return 'textDocument/documentLink'; } }; +})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {})); +/** + * Request to resolve additional information for a given document link. The request's + * parameter is of type [DocumentLink](#DocumentLink) the response + * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such. + */ +var DocumentLinkResolveRequest; +(function (DocumentLinkResolveRequest) { + DocumentLinkResolveRequest.type = { get method() { return 'documentLink/resolve'; } }; +})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {})); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.d.ts new file mode 100644 index 0000000..c124f0f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.d.ts @@ -0,0 +1,6 @@ +interface Message { + command: string; + success?: boolean; + args?: any; + result?: any; +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.js new file mode 100644 index 0000000..366b218 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/resolve.js @@ -0,0 +1,19 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +process.on('message', function (message) { + if (message.command === 'exit') { + process.exit(0); + } + else if (message.command === 'resolve') { + try { + var result = require.resolve(message.args); + process.send({ command: 'resolve', success: true, result: result }); + } + catch (err) { + process.send({ command: 'resolve', success: false }); + } + } +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.d.ts b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.d.ts new file mode 100644 index 0000000..32ab47c --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.d.ts @@ -0,0 +1,12 @@ +export declare function defined(value: any): boolean; +export declare function undefined(value: any): boolean; +export declare function nil(value: any): boolean; +export declare function boolean(value: any): value is boolean; +export declare function string(value: any): value is string; +export declare function number(value: any): value is number; +export declare function error(value: any): value is Error; +export declare function func(value: any): value is Function; +export declare function array(value: any): value is T[]; +export declare function stringArray(value: any): value is string[]; +export declare function typedArray(value: any, check: (value: any) => boolean): value is T[]; +export declare function thenable(value: any): value is Thenable; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.js new file mode 100644 index 0000000..3991284 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/lib/utils/is.js @@ -0,0 +1,54 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +var toString = Object.prototype.toString; +function defined(value) { + return typeof value !== 'undefined'; +} +exports.defined = defined; +function undefined(value) { + return typeof value === 'undefined'; +} +exports.undefined = undefined; +function nil(value) { + return value === null; +} +exports.nil = nil; +function boolean(value) { + return value === true || value === false; +} +exports.boolean = boolean; +function string(value) { + return toString.call(value) === '[object String]'; +} +exports.string = string; +function number(value) { + return toString.call(value) === '[object Number]'; +} +exports.number = number; +function error(value) { + return toString.call(value) === '[object Error]'; +} +exports.error = error; +function func(value) { + return toString.call(value) === '[object Function]'; +} +exports.func = func; +function array(value) { + return Array.isArray(value); +} +exports.array = array; +function stringArray(value) { + return array(value) && value.every(function (elem) { return string(elem); }); +} +exports.stringArray = stringArray; +function typedArray(value, check) { + return Array.isArray(value) && value.every(check); +} +exports.typedArray = typedArray; +function thenable(value) { + return value && func(value.then); +} +exports.thenable = thenable; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/package.json new file mode 100644 index 0000000..df994e9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/package.json @@ -0,0 +1,126 @@ +{ + "_args": [ + [ + { + "raw": "vscode-languageserver@^2.2.0", + "scope": null, + "escapedName": "vscode-languageserver", + "name": "vscode-languageserver", + "rawSpec": "^2.2.0", + "spec": ">=2.2.0 <3.0.0", + "type": "range" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources" + ] + ], + "_from": "vscode-languageserver@>=2.2.0 <3.0.0", + "_id": "vscode-languageserver@2.6.2", + "_inCache": true, + "_location": "/vscode-languageserver", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/vscode-languageserver-2.6.2.tgz_1479491773167_0.21343519049696624" + }, + "_npmUser": { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": {}, + "_requested": { + "raw": "vscode-languageserver@^2.2.0", + "scope": null, + "escapedName": "vscode-languageserver", + "name": "vscode-languageserver", + "rawSpec": "^2.2.0", + "spec": ">=2.2.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.6.2.tgz", + "_shasum": "c06d817a55c7c9e97bd0535424fc0d5754d61ea9", + "_shrinkwrap": null, + "_spec": "vscode-languageserver@^2.2.0", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources", + "author": { + "name": "Microsoft Corporation" + }, + "bin": { + "installServerIntoExtension": "./bin/installServerIntoExtension" + }, + "bugs": { + "url": "https://github.com/Microsoft/vscode-languageserver-node/issues" + }, + "dependencies": { + "vscode-jsonrpc": "^2.4.0", + "vscode-languageserver-types": "^1.0.4" + }, + "description": "Language server implementation for node", + "devDependencies": { + "mocha": "3.0.2", + "typescript": "^1.8.10" + }, + "directories": {}, + "dist": { + "shasum": "c06d817a55c7c9e97bd0535424fc0d5754d61ea9", + "tarball": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-2.6.2.tgz" + }, + "homepage": "https://github.com/Microsoft/vscode-languageserver-node#readme", + "license": "MIT", + "main": "./lib/main.js", + "maintainers": [ + { + "name": "aeschli", + "email": "martinae@microsoft.com" + }, + { + "name": "alexandrudima", + "email": "alexdima@microsoft.com" + }, + { + "name": "bpasero", + "email": "benjpas@microsoft.com" + }, + { + "name": "chrisdias", + "email": "cdias@microsoft.com" + }, + { + "name": "dbaeumer", + "email": "dirk.baeumer@gmail.com" + }, + { + "name": "egamma", + "email": "egamma@microsoft.com" + }, + { + "name": "isidor", + "email": "inikolic@microsoft.com" + }, + { + "name": "joaomoreno.ms", + "email": "joao.moreno@microsoft.com" + }, + { + "name": "jrieken", + "email": "jrieken@microsoft.com" + } + ], + "name": "vscode-languageserver", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/Microsoft/vscode-languageserver-node.git" + }, + "scripts": { + "compile": "tsc -p ./src", + "prepublish": "tsc -p ./src", + "watch": "tsc -w -p ./src" + }, + "typings": "./lib/main", + "version": "2.6.2" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/thirdpartynotices.txt b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/thirdpartynotices.txt new file mode 100644 index 0000000..03a7890 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/vscode-languageserver/thirdpartynotices.txt @@ -0,0 +1,31 @@ +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +For Microsoft vscode-languageserver + +This project incorporates material from the project(s) listed below (collectively, “Third Party Code”). +Microsoft is not the original author of the Third Party Code. The original copyright notice and license +under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed +to you under their original license terms set forth below. Microsoft reserves all other rights not expressly +granted, whether by implication, estoppel or otherwise. + +1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped) + +This project is licensed under the MIT license. +Copyrights are respective of each contributor listed at the beginning of each definition file. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/CHANGELOG.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/CHANGELOG.md new file mode 100644 index 0000000..28e80f5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/CHANGELOG.md @@ -0,0 +1,203 @@ +## v2.3.1 / 2017-01-20 +### WELCOME TO THE APOCALYPSE EDITION + +- [#868](https://github.com/winstonjs/winston/pull/868), Fix 'Maximum call stack size exceeded' error with custom formatter. + +## v2.3.0 / 2016-11-02 +### ZOMG WHY WOULD YOU ASK EDITION + +- Full `CHANGELOG.md` entry forthcoming. See [the `git` diff for `2.3.0`](https://github.com/winstonjs/winston/compare/2.2.0...2.3.0) for now. + +## v2.2.0 / 2016-02-25 +### LEAVING CALIFORNIA EDITION + +- Full `CHANGELOG.md` entry forthcoming. See [the `git` diff for `2.2.0`](https://github.com/winstonjs/winston/compare/2.1.1...2.2.0) for now. + +## v2.1.1 / 2015-11-18 +### COLOR ME IMPRESSED EDITION + +- [#751](https://github.com/winstonjs/winston/pull/751), Fix colors not appearing in non-tty environments. Fixes [#609](https://github.com/winstonjs/winston/issues/609), [#616](https://github.com/winstonjs/winston/issues/616), [#669](https://github.com/winstonjs/winston/issues/669), [#648](https://github.com/winstonjs/winston/issues/648) (`fiznool`). +- [#752](https://github.com/winstonjs/winston/pull/752) Correct syslog RFC number. 5424 instead of 524. (`jbenoit2011`) + +## v2.1.0 / 2015-11-03 +### TEST ALL THE ECOSYSTEM EDITION + +- [#742](https://github.com/winstonjs/winston/pull/742), [32d52b7](https://github.com/winstonjs/winston/commit/32d52b7) Distribute common test files used by transports in the `winston` ecosystem. + +## v2.0.1 / 2015-11-02 +### BUGS ALWAYS HAPPEN OK EDITION + +- [#739](https://github.com/winstonjs/winston/issues/739), [1f16861](https://github.com/winstonjs/winston/commit/1f16861) Ensure that `logger.log("info", undefined)` does not throw. + +## v2.0.0 / 2015-10-29 +### OMG IT'S MY SISTER'S BIRTHDAY EDITION + +#### Breaking changes + +**Most important** +- **[0f82204](https://github.com/winstonjs/winston/commit/0f82204) Move `winston.transports.DailyRotateFile` [into a separate module](https://github.com/winstonjs/winston-daily-rotate-file)**: `require('winston-daily-rotate-file');` +- **[fb9eec0](https://github.com/winstonjs/winston/commit/fb9eec0) Reverse log levels in `npm` and `cli` configs to conform to [RFC524](https://tools.ietf.org/html/rfc5424). Fixes [#424](https://github.com/winstonjs/winston/pull/424) [#406](https://github.com/winstonjs/winston/pull/406) [#290](https://github.com/winstonjs/winston/pull/290)** +- **[8cd8368](https://github.com/winstonjs/winston/commit/8cd8368) Change the method signature to a `filter` function to be consistent with `rewriter` and log functions:** +``` js +function filter (level, msg, meta, inst) { + // Filter logic goes here... +} +``` + +**Other breaking changes** +- [e0c9dde](https://github.com/winstonjs/winston/commit/e0c9dde) Remove `winston.transports.Webhook`. Use `winston.transports.Http` instead. +- [f71e638](https://github.com/winstonjs/winston/commit/f71e638) Remove `Logger.prototype.addRewriter` and `Logger.prototype.addFilter` since they just push to an Array of functions. Use `logger.filters.push` or `logger.rewriters.push` explicitly instead. +- [a470ab5](https://github.com/winstonjs/winston/commit/a470ab5) No longer respect the `handleExceptions` option to `new winston.Logger`. Instead just pass in the `exceptionHandlers` option itself. +- [8cb7048](https://github.com/winstonjs/winston/commit/8cb7048) Removed `Logger.prototype.extend` functionality + +#### New features +- [3aa990c](https://github.com/winstonjs/winston/commit/3aa990c) Added `Logger.prototype.configure` which now contains all logic previously in the `winston.Logger` constructor function. (`indexzero`) +- [#726](https://github.com/winstonjs/winston/pull/726) Update .npmignore (`coreybutler`) +- [#700](https://github.com/winstonjs/winston/pull/700) Add an `eol` option to the `Console` transport. (`aquavitae`) +- [#731](https://github.com/winstonjs/winston/pull/731) Update `lib/transports.js` for better static analysis. (`indexzero`) + +#### Fixes, refactoring, and optimizations. OH MY! +- [#632](https://github.com/winstonjs/winston/pull/632) Allow `File` transport to be an `objectMode` writable stream. (`stambata`) +- [#527](https://github.com/winstonjs/winston/issues/527), [163f4f9](https://github.com/winstonjs/winston/commit/163f4f9), [3747ccf](https://github.com/winstonjs/winston/commit/3747ccf) Performance optimizations and string interpolation edge cases (`indexzero`) +- [f0edafd](https://github.com/winstonjs/winston/commit/f0edafd) Code cleanup for reability, ad-hoc styleguide enforcement (`indexzero`) + +## v1.1.1 - v1.1.2 / 2015-10 +### MINOR FIXES EDITION + +#### Notable changes + * [727](https://github.com/winstonjs/winston/pull/727) Fix "raw" mode (`jcrugzz`) + * [703](https://github.com/winstonjs/winston/pull/703) Do not modify Error or Date objects when logging. Fixes #610 (`harriha`). + +## v1.1.0 / 2015-10-09 +### GREETINGS FROM CARTAGENA EDITION + +#### Notable Changes + * [#721](https://github.com/winstonjs/winston/pull/721) Fixed octal literal to work with node 4 strict mode (`wesleyeff`) + * [#630](https://github.com/winstonjs/winston/pull/630) Add stderrLevels option to Console Transport and update docs (`paulhroth`) + * [#626](https://github.com/winstonjs/winston/pull/626) Add the logger (this) in the fourth argument in the rewriters and filters functions (`christophehurpeau `) + * [#623](https://github.com/winstonjs/winston/pull/623) Fix Console Transport's align option tests (`paulhroth`, `kikobeats`) + * [#692](https://github.com/winstonjs/winston/pull/692) Adding winston-aws-cloudwatch to transport docs (`timdp`) + +## v1.0.2 2015-09-25 +### LET'S TALK ON GITTER EDITION + +#### Notable Changes + * [de80160](https://github.com/winstonjs/winston/commit/de80160) Add Gitter badge (`The Gitter Badger`) + * [44564de](https://github.com/winstonjs/winston/commit/44564de) [fix] Correct listeners in `logException`. Fixes [#218](https://github.com/winstonjs/winston/issues/218) [#213](https://github.com/winstonjs/winston/issues/213) [#327](https://github.com/winstonjs/winston/issues/327). (`indexzero`) + * [45b1eeb](https://github.com/winstonjs/winston/commit/45b1eeb) [fix] Get `tailFile` function working on latest/all node versions (`Christopher Jeffrey`) + * [c6d45f9](https://github.com/winstonjs/winston/commit/c6d45f9) Fixed event subscription on close (`Roman Stetsyshin`) + +#### Other changes + * TravisCI updates & best practices [87b97cc](https://github.com/winstonjs/winston/commit/87b97cc) [91a5bc4](https://github.com/winstonjs/winston/commit/91a5bc4), [cf24e6a](https://github.com/winstonjs/winston/commit/cf24e6a) (`indexzero`) + * [d5397e7](https://github.com/winstonjs/winston/commit/d5397e7) Bump async version (`Roderick Hsiao`) + * Documentation updates & fixes [86d7527](https://github.com/winstonjs/winston/commit/86d7527), [38254c1](https://github.com/winstonjs/winston/commit/38254c1), [04e2928](https://github.com/winstonjs/winston/commit/04e2928), [61c8a89](https://github.com/winstonjs/winston/commit/61c8a89), [c42a783](https://github.com/winstonjs/winston/commit/c42a783), [0688a22](https://github.com/winstonjs/winston/commit/0688a22), [eabc113](https://github.com/winstonjs/winston/commit/eabc113) [c9506b7](https://github.com/winstonjs/winston/commit/c9506b7), [17534d2](https://github.com/winstonjs/winston/commit/17534d2), [b575e7b](https://github.com/winstonjs/winston/commit/b575e7b) (`Stefan Thies`, `charukiewicz`, `unLucio`, `Adam Cohen`, `Denis Gorbachev`, `Frederik Ring`, `Luigi Pinca`, `jeffreypriebe`) + * Documentation refactor & cleanup [a19607e](https://github.com/winstonjs/winston/commit/a19607e), [d1932b4](https://github.com/winstonjs/winston/commit/d1932b4), [7a13132](https://github.com/winstonjs/winston/commit/7a13132) (`indexzero`) + + +## v1.0.1 / 2015-06-26 +### YAY DOCS EDITION + + * [#639](https://github.com/winstonjs/winston/pull/639) Fix for [#213](https://github.com/winstonjs/winston/issues/213): More than 10 containers triggers EventEmitter memory leak warning (`marcus`) + * Documentation and `package.json` updates [cec892c](https://github.com/winstonjs/winston/commit/cec892c), [2f13b4f](https://github.com/winstonjs/winston/commit/2f13b4f), [b246efd](https://github.com/winstonjs/winston/commit/b246efd), [22a5f5a](https://github.com/winstonjs/winston/commit/22a5f5a), [5868b78](https://github.com/winstonjs/winston/commit/5868b78), [99b6b44](https://github.com/winstonjs/winston/commit/99b6b44), [447a813](https://github.com/winstonjs/winston/commit/447a813), [7f75b48](https://github.com/winstonjs/winston/commit/7f75b48) (`peteward44`, `Gilad Peleg`, `Anton Ian Sipos`, `nimrod-becker`, `LarsTi`, `indexzero`) + +## v1.0.0 / 2015-04-07 +### OMG 1.0.0 FINALLY EDITION + +#### Breaking Changes + * [#587](https://github.com/winstonjs/winston/pull/587) Do not extend `String` prototypes as a side effect of using `colors`. (`kenperkins`) + * [#581](https://github.com/winstonjs/winston/pull/581) File transports now emit `error` on error of the underlying streams after `maxRetries` attempts. (`ambbell`). + * [#583](https://github.com/winstonjs/winston/pull/583), [92729a](https://github.com/winstonjs/winston/commit/92729a68d71d07715501c35d94d2ac06ac03ca08) Use `os.EOL` for all file writing by default. (`Mik13`, `indexzero`) + * [#532](https://github.com/winstonjs/winston/pull/532) Delete logger instance from `Container` when `close` event is emitted. (`snater`) + * [#380](https://github.com/winstonjs/winston/pull/380) Rename `duration` to `durationMs`, which is now a number a not a string ending in `ms`. (`neoziro`) + * [#253](https://github.com/winstonjs/winston/pull/253) Do not set a default level. When `level` is falsey on any `Transport` instance, any `Logger` instance uses the configured level (instead of the Transport level) (`jstamerj`). + +#### Other changes + + * [b83de62](https://github.com/winstonjs/winston/commit/b83de62) Fix rendering of stack traces. + * [c899cc](https://github.com/winstonjs/winston/commit/c899cc1f0719e49b26ec933e0fa263578168ea3b) Update documentation (Fixes [#549](https://github.com/winstonjs/winston/issues/549)) + * [#551](https://github.com/winstonjs/winston/pull/551) Filter metadata along with messages + * [#578](https://github.com/winstonjs/winston/pull/578) Fixes minor issue with `maxFiles` in `File` transport (Fixes [#556](https://github.com/winstonjs/winston/issues/556)). + * [#560](https://github.com/winstonjs/winston/pull/560) Added `showLevel` support to `File` transport. + * [#558](https://github.com/winstonjs/winston/pull/558) Added `showLevel` support to `Console` transport. + +## v0.9.0 / 2015-02-03 + + * [#496](https://github.com/flatiron/winston/pull/496) Updated default option handling for CLI (`oojacoboo`). + * [f37634b](https://github.com/flatiron/winston/commit/f37634b) [dist] Only support `node >= 0.8.0`. (`indexzero`) + * [91a1e90](https://github.com/flatiron/winston/commit/91a1e90), [50163a0](https://github.com/flatiron/winston/commit/50163a0) Fix #84 [Enable a better unhandled exception experience](https://github.com/flatiron/winston/issues/84) (`samz`) + * [8b5fbcd](https://github.com/flatiron/winston/commit/8b5fbcd) #448 Added tailable option to file transport which rolls files backwards instead of creating incrementing appends. Implements #268 (`neouser99`) + * [a34f7d2](https://github.com/flatiron/winston/commit/a34f7d2) Custom log formatter functionality were added. (`Melnyk Andii`) + * [4c08191](https://github.com/flatiron/winston/commit/4c08191) Added showLevel flag to common.js, file*, memory and console transports. (`Tony Germaneri`) + * [64ed8e0](https://github.com/flatiron/winston/commit/64ed8e0) Adding custom pretty print function test. (`Alberto Pose`) + * [3872dfb](https://github.com/flatiron/winston/commit/3872dfb) Adding prettyPrint parameter as function example. (`Alberto Pose`) + * [2b96eee](https://github.com/flatiron/winston/commit/2b96eee) implemented filters #526 (`Chris Oloff`) + * [72273b1](https://github.com/flatiron/winston/commit/72273b1) Added the options to colorize only the level, only the message or all. Default behavior is kept. Using true will only colorize the level and false will not colorize anything. (`Michiel De Mey`) + * [178e8a6](https://github.com/flatiron/winston/commit/178e8a6) Prevent message from meta input being overwritten (`Leonard Martin`) + * [270be86](https://github.com/flatiron/winston/commit/270be86) [api] Allow for transports to be removed by their string name [test fix] Add test coverage for multiple transports of the same type added in #187. [doc] Document using multiple transports of the same type (`indexzero`) + * [0a848fa](https://github.com/flatiron/winston/commit/0a848fa) Add depth options for meta pretty print (`Loïc Mahieu`) + * [106b670](https://github.com/flatiron/winston/commit/106b670) Allow debug messages to be sent to stdout (`John Frizelle`) + * [ad2d5e1](https://github.com/flatiron/winston/commit/ad2d5e1) [fix] Handle Error instances in a sane way since their properties are non-enumerable __by default.__ Fixes #280. (`indexzero`) + * [5109dd0](https://github.com/flatiron/winston/commit/5109dd0) [fix] Have a default `until` before a default `from`. Fixes #478. (`indexzero`) + * [d761960](https://github.com/flatiron/winston/commit/d761960) Fix logging regular expression objects (`Chasen Le Hara`) + * [2632eb8](https://github.com/flatiron/winston/commit/2632eb8) Add option for EOL chars on FileTransport (`José F. Romaniello`) + * [bdecce7](https://github.com/flatiron/winston/commit/bdecce7) Remove duplicate logstash option (`José F. Romaniello`) + * [7a01f9a](https://github.com/flatiron/winston/commit/7a01f9a) Update declaration block according to project's style guide (`Ricardo Torres`) + * [ae27a19](https://github.com/flatiron/winston/commit/ae27a19) Fixes #306: Can't set customlevels to my loggers (RangeError: Maximum call stack size exceeded) (`Alberto Pose`) + * [1ba4f51](https://github.com/flatiron/winston/commit/1ba4f51) [fix] Call `res.resume()` in HttpTransport to get around known issues in streams2. (`indexzero`) + * [39e0258](https://github.com/flatiron/winston/commit/39e0258) Updated default option handling for CLI (`Jacob Thomason`) + * [8252801](https://github.com/flatiron/winston/commit/8252801) Added logstash support to console transport (`Ramon Snir`) + * [18aa301](https://github.com/flatiron/winston/commit/18aa301) Module isStream should be isstream (`Michael Neil`) + * [2f5f296](https://github.com/flatiron/winston/commit/2f5f296) options.prettyPrint can now be a function (`Matt Zukowski`) + * [a87a876](https://github.com/flatiron/winston/commit/a87a876) Adding rotationFormat prop to file.js (`orcaman`) + * [ff187f4](https://github.com/flatiron/winston/commit/ff187f4) Allow custom exception level (`jupiter`) + +## 0.8.3 / 2014-11-04 + +* [fix lowercase issue (`jcrugzz`)](https://github.com/flatiron/winston/commit/b3ffaa10b5fe9d2a510af5348cf4fb3870534123) + +## 0.8.2 / 2014-11-04 + +* [Full fix for #296 with proper streams2 detection with `isstream` for file transport (`jcrugzz`)](https://github.com/flatiron/winston/commit/5c4bd4191468570e46805ed399cad63cfb1856cc) +* [Add isstream module (`jcrugzz`)](https://github.com/flatiron/winston/commit/498b216d0199aebaef72ee4d8659a00fb737b9ae) +* [Partially fix #296 with streams2 detection for file transport (`indexzero`)](https://github.com/flatiron/winston/commit/b0227b6c27cf651ffa8b8192ef79ab24296362e3) +* [add stress test for issue #288 (`indexzero`)](https://github.com/flatiron/winston/commit/e08e504b5b3a00f0acaade75c5ba69e6439c84a6) +* [lessen timeouts to check test sanity (`indexzero`)](https://github.com/flatiron/winston/commit/e925f5bc398a88464f3e796545ff88912aff7568) +* [update winston-graylog2 documentation (`unlucio`)](https://github.com/flatiron/winston/commit/49fa86c31baf12c8ac3adced3bdba6deeea2e363) +* [fix test formatting (`indexzero`)](https://github.com/flatiron/winston/commit/8e2225799520a4598044cdf93006d216812a27f9) +* [fix so options are not redefined (`indexzero`)](https://github.com/flatiron/winston/commit/d1d146e8a5bb73dcb01579ad433f6d4f70b668ea) +* [fix self/this issue that broke `http` transport (`indexzero`)](https://github.com/flatiron/winston/commit/d10cbc07755c853b60729ab0cd14aa665da2a63b) + + +## 0.8.1 / 2014-10-06 + +* [Add label option for DailyRotateFile transport (`francoisTemasys`)](https://github.com/flatiron/winston/pull/459) +* [fix Logger#transports length check upon Logger#log (`adriano-di-giovanni`, `indexzero`)](https://github.com/flatiron/winston/pull/404) +* [err can be a string. (`gdw2`, `indexzero`)](https://github.com/flatiron/winston/pull/396) +* [Added color for pre-defined cli set. (`danilo1105`, `indexzero`)](https://github.com/flatiron/winston/pull/365) +* [Fix dates on transport test (`revington`)](https://github.com/flatiron/winston/pull/346) +* [Included the label from options to the output in JSON mode. (`arxony`)](https://github.com/flatiron/winston/pull/326) +* [Allow using logstash option with the File transport (`gmajoulet`)](https://github.com/flatiron/winston/pull/299) +* [Be more defensive when working with `query` methods from Transports. Fixes #356. (indexzero)](https://github.com/flatiron/winston/commit/b80638974057f74b521dbe6f43fef2105110afa2) +* [Catch exceptions for file transport unlinkSync (`calvinfo`)](https://github.com/flatiron/winston/pull/266) +* [Adding the 'addRewriter' to winston (`machadogj`)](https://github.com/flatiron/winston/pull/258) +* [Updates to transport documentation (`pose`)](https://github.com/flatiron/winston/pull/262) +* [fix typo in "Extending another object with Logging" section.](https://github.com/flatiron/winston/pull/281) +* [Updated README.md - Replaced properties with those listed in winston-mongodb module](https://github.com/flatiron/winston/pull/264) + +## 0.8.0 / 2014-09-15 + * [Fixes for HTTP Transport](https://github.com/flatiron/winston/commit/a876a012641f8eba1a976eada15b6687d4a03f82) + * Removing [jsonquest](https://github.com/flatiron/winston/commit/4f088382aeda28012b7a0498829ceb243ed74ac1) and [request](https://github.com/flatiron/winston/commit/a5676313b4e9744802cc3b8e1468e4af48830876) dependencies. + * Configuration is now [shalow cloned](https://github.com/flatiron/winston/commit/08fccc81d18536d33050496102d98bde648853f2). + * [Added logstash support](https://github.com/flatiron/winston/pull/445/files) + * Fix for ["flush" event should always fire after "flush" call bug](https://github.com/flatiron/winston/pull/446/files) + * Added tests for file: [open and stress](https://github.com/flatiron/winston/commit/47d885797a2dd0d3cd879305ca813a0bd951c378). + * [Test fixes](https://github.com/flatiron/winston/commit/9e39150e0018f43d198ca4c160acef2af9860bf4) + * [Fix ")" on string interpolation](https://github.com/flatiron/winston/pull/394/files) + +## 0.6.2 / 2012-07-08 + + * Added prettyPrint option for console logging + * Multi-line values for conditional returns are not allowed + * Added acceptance of `stringify` option + * Fixed padding for log levels + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/LICENSE new file mode 100644 index 0000000..948d80d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2010 Charlie Robbins + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/README.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/README.md new file mode 100644 index 0000000..57f3009 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/README.md @@ -0,0 +1,848 @@ +# winston + +[![Join the chat at https://gitter.im/winstonjs/winston](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/winstonjs/winston?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + +[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![Build Status](https://img.shields.io/travis/winstonjs/winston/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston)[![Dependencies](https://img.shields.io/david/winstonjs/winston.svg?style=flat-square)](https://david-dm.org/winstonjs/winston) + +[![NPM](https://nodei.co/npm/winston.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston/) + +A multi-transport async logging library for node.js. "CHILL WINSTON! ... I put it in the logs." + +## Motivation +Winston is designed to be a simple and universal logging library with support for multiple transports. A transport is essentially a storage device for your logs. Each instance of a winston logger can have multiple transports configured at different levels. For example, one may want error logs to be stored in a persistent remote location (like a database), but all logs output to the console or a local file. + +There also seemed to be a lot of logging libraries out there that coupled their implementation of logging (i.e. how the logs are stored / indexed) to the API that they exposed to the programmer. This library aims to decouple those parts of the process to make it more flexible and extensible. + +## Installation + +```bashp +npm install winston +``` + +## Usage +There are two different ways to use winston: directly via the default logger, or by instantiating your own Logger. The former is merely intended to be a convenient shared logger to use throughout your application if you so choose. + +* [Logging](#logging) + * [Using the Default Logger](#using-the-default-logger) + * [Instantiating your own Logger](#instantiating-your-own-logger) + * [Logging with Metadata](#logging-with-metadata) + * [String interpolation](#string-interpolation) +* [Transports](https://github.com/winstonjs/winston/blob/master/docs/transports.md) + * [Multiple transports of the same type](#multiple-transports-of-the-same-type) +* [Profiling](#profiling) +* [Streaming Logs](#streaming-logs) +* [Querying Logs](#querying-logs) +* [Exceptions](#exceptions) + * [Handling Uncaught Exceptions with winston](#handling-uncaught-exceptions-with-winston) + * [To Exit or Not to Exit](#to-exit-or-not-to-exit) +* [Logging Levels](#logging-levels) + * [Using Logging Levels](#using-logging-levels) + * [Using Custom Logging Levels](#using-custom-logging-levels) +* [Further Reading](#further-reading) + * [Events and Callbacks in Winston](#events-and-callbacks-in-winston) + * [Working with multiple Loggers in winston](#working-with-multiple-loggers-in-winston) + * [Using winston in a CLI tool](#using-winston-in-a-cli-tool) + * [Filters and Rewriters](#filters-and-rewriters) + * [Adding Custom Transports](#adding-custom-transports) +* [Installation](#installation) +* [Run Tests](#run-tests) + + +## Logging + +Logging levels in `winston` conform to the severity ordering specified by [RFC5424](https://tools.ietf.org/html/rfc5424): _severity of all levels is assumed to be numerically **ascending** from most important to least important._ + +### Using the Default Logger +The default logger is accessible through the winston module directly. Any method that you could call on an instance of a logger is available on the default logger: + +``` js + var winston = require('winston'); + + winston.log('info', 'Hello distributed log files!'); + winston.info('Hello again distributed logs'); + + winston.level = 'debug'; + winston.log('debug', 'Now my debug messages are written to console!'); +``` + +By default, only the Console transport is set on the default logger. You can add or remove transports via the add() and remove() methods: + +``` js + winston.add(winston.transports.File, { filename: 'somefile.log' }); + winston.remove(winston.transports.Console); +``` + +Or do it with one call to configure(): + +``` js + winston.configure({ + transports: [ + new (winston.transports.File)({ filename: 'somefile.log' }) + ] + }); +``` + +For more documentation about working with each individual transport supported by Winston see the [Winston Transports](docs/transports.md) document. + +### Instantiating your own Logger +If you would prefer to manage the object lifetime of loggers you are free to instantiate them yourself: + +``` js + var logger = new (winston.Logger)({ + transports: [ + new (winston.transports.Console)(), + new (winston.transports.File)({ filename: 'somefile.log' }) + ] + }); +``` + +You can work with this logger in the same way that you work with the default logger: + +``` js + // + // Logging + // + logger.log('info', 'Hello distributed log files!'); + logger.info('Hello again distributed logs'); + + // + // Adding / Removing Transports + // (Yes It's chainable) + // + logger + .add(winston.transports.File) + .remove(winston.transports.Console); +``` + +You can also wholesale reconfigure a `winston.Logger` instance using the `configure` method: + +``` js + var logger = new winston.Logger({ + level: 'info', + transports: [ + new (winston.transports.Console)(), + new (winston.transports.File)({ filename: 'somefile.log' }) + ] + }); + + // + // Replaces the previous transports with those in the + // new configuration wholesale. + // + logger.configure({ + level: 'verbose', + transports: [ + new (require('winston-daily-rotate-file'))(opts) + ] + }); +``` + + +### Logging with Metadata +In addition to logging string messages, winston will also optionally log additional JSON metadata objects. Adding metadata is simple: + +``` js + winston.log('info', 'Test Log Message', { anything: 'This is metadata' }); +``` + +The way these objects are stored varies from transport to transport (to best support the storage mechanisms offered). Here's a quick summary of how each transports handles metadata: + +1. __Console:__ Logged via util.inspect(meta) +2. __File:__ Logged via util.inspect(meta) + +## Multiple transports of the same type + +It is possible to use multiple transports of the same type e.g. `winston.transports.File` by passing in a custom `name` when you construct the transport. + +``` js +var logger = new (winston.Logger)({ + transports: [ + new (winston.transports.File)({ + name: 'info-file', + filename: 'filelog-info.log', + level: 'info' + }), + new (winston.transports.File)({ + name: 'error-file', + filename: 'filelog-error.log', + level: 'error' + }) + ] +}); +``` + +If you later want to remove one of these transports you can do so by using the string name. e.g.: + +``` js +logger.remove('info-file'); +``` + +In this example one could also remove by passing in the instance of the Transport itself. e.g. this is equivalent to the string example above; + +``` js +// Notice it was first in the Array above +var infoFile = logger.transports[0]; +logger.remove(infoFile); +``` + +## Profiling +In addition to logging messages and metadata, winston also has a simple profiling mechanism implemented for any logger: + +``` js + // + // Start profile of 'test' + // Remark: Consider using Date.now() with async operations + // + winston.profile('test'); + + setTimeout(function () { + // + // Stop profile of 'test'. Logging will now take place: + // "17 Jan 21:00:00 - info: test duration=1000ms" + // + winston.profile('test'); + }, 1000); +``` + +All profile messages are set to the 'info' by default and both message and metadata are optional There are no plans in the Roadmap to make this configurable, but I'm open to suggestions / issues. + +### String interpolation +The `log` method provides the same string interpolation methods like [`util.format`][10]. + +This allows for the following log messages. +``` js +logger.log('info', 'test message %s', 'my string'); +// info: test message my string + +logger.log('info', 'test message %d', 123); +// info: test message 123 + +logger.log('info', 'test message %j', {number: 123}, {}); +// info: test message {"number":123} +// meta = {} + +logger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}); +// info: test message first, second +// meta = {number: 123} + +logger.log('info', 'test message', 'first', 'second', {number: 123}); +// info: test message first second +// meta = {number: 123} + +logger.log('info', 'test message %s, %s', 'first', 'second', {number: 123}, function(){}); +// info: test message first, second +// meta = {number: 123} +// callback = function(){} + +logger.log('info', 'test message', 'first', 'second', {number: 123}, function(){}); +// info: test message first second +// meta = {number: 123} +// callback = function(){} +``` + + + + + +## Querying Logs +Winston supports querying of logs with Loggly-like options. [See Loggly Search API](https://www.loggly.com/docs/api-retrieving-data/). +Specifically: `File`, `Couchdb`, `Redis`, `Loggly`, `Nssocket`, and `Http`. + +``` js + var options = { + from: new Date - 24 * 60 * 60 * 1000, + until: new Date, + limit: 10, + start: 0, + order: 'desc', + fields: ['message'] + }; + + // + // Find items logged between today and yesterday. + // + winston.query(options, function (err, results) { + if (err) { + throw err; + } + + console.log(results); + }); +``` + +## Streaming Logs +Streaming allows you to stream your logs back from your chosen transport. + +``` js + // + // Start at the end. + // + winston.stream({ start: -1 }).on('log', function(log) { + console.log(log); + }); +``` + +## Exceptions + +### Handling Uncaught Exceptions with winston + +With `winston`, it is possible to catch and log `uncaughtException` events from your process. There are two distinct ways of enabling this functionality either through the default winston logger or your own logger instance. + +If you want to use this feature with the default logger simply call `.handleExceptions()` with a transport instance. + +``` js + // + // You can add a separate exception logger by passing it to `.handleExceptions` + // + winston.handleExceptions(new winston.transports.File({ filename: 'path/to/exceptions.log' })) + + // + // Alternatively you can set `.handleExceptions` to true when adding transports to winston. + // You can use the `.humanReadableUnhandledException` option to get more readable exceptions. + // + winston.add(winston.transports.File, { + filename: 'path/to/all-logs.log', + handleExceptions: true, + humanReadableUnhandledException: true + }); + + // + // Exceptions can also be handled by multiple transports. + // + winston.handleExceptions([ transport1, transport2, ... ]); +``` + +### To Exit or Not to Exit + +By default, winston will exit after logging an uncaughtException. if this is not the behavior you want, +set `exitOnError = false` + +``` js + var logger = new (winston.Logger)({ exitOnError: false }); + + // + // or, like this: + // + logger.exitOnError = false; +``` + +When working with custom logger instances, you can pass in separate transports to the `exceptionHandlers` property or set `.handleExceptions` on any transport. + +Example 1 + +``` js + var logger = new (winston.Logger)({ + transports: [ + new winston.transports.File({ filename: 'path/to/all-logs.log' }) + ], + exceptionHandlers: [ + new winston.transports.File({ filename: 'path/to/exceptions.log' }) + ] + }); +``` + +Example 2 + +``` js +var logger = new winston.Logger({ + transports: [ + new winston.transports.Console({ + handleExceptions: true, + json: true + }) + ], + exitOnError: false +}); +``` + +The `exitOnError` option can also be a function to prevent exit on only certain types of errors: + +``` js + function ignoreEpipe(err) { + return err.code !== 'EPIPE'; + } + + var logger = new (winston.Logger)({ exitOnError: ignoreEpipe }); + + // + // or, like this: + // + logger.exitOnError = ignoreEpipe; +``` + +## Logging Levels + +Each `level` is given a specific integer priority. The higher the priority the more important the message is considered to be, and the lower the corresponding integer priority. For example, `npm` logging levels are prioritized from 0 to 5 (highest to lowest): + +``` js +{ error: 0, warn: 1, info: 2, verbose: 3, debug: 4, silly: 5 } +``` + +Similarly, as specified exactly in RFC5424 the `syslog` levels are prioritized from 0 to 7 (highest to lowest). + +```js +{ emerg: 0, alert: 1, crit: 2, error: 3, warning: 4, notice: 5, info: 6, debug: 7 } +``` + +If you do not explicitly define the levels that `winston` should use the `npm` levels above will be used. + +### Using Logging Levels +Setting the level for your logging message can be accomplished in one of two ways. You can pass a string representing the logging level to the log() method or use the level specified methods defined on every winston Logger. + +``` js + // + // Any logger instance + // + logger.log('silly', "127.0.0.1 - there's no place like home"); + logger.log('debug', "127.0.0.1 - there's no place like home"); + logger.log('verbose', "127.0.0.1 - there's no place like home"); + logger.log('info', "127.0.0.1 - there's no place like home"); + logger.log('warn', "127.0.0.1 - there's no place like home"); + logger.log('error', "127.0.0.1 - there's no place like home"); + logger.info("127.0.0.1 - there's no place like home"); + logger.warn("127.0.0.1 - there's no place like home"); + logger.error("127.0.0.1 - there's no place like home"); + + // + // Default logger + // + winston.log('info', "127.0.0.1 - there's no place like home"); + winston.info("127.0.0.1 - there's no place like home"); +``` + +`winston` allows you to define a `level` property on each transport which specifies the **maximum** level of messages that a transport should log. For example, using the `npm` levels you could log only `error` messages to the console and everything `info` and below to a file (which includes `error` messages): + +``` js + var logger = new (winston.Logger)({ + transports: [ + new (winston.transports.Console)({ level: 'error' }), + new (winston.transports.File)({ + filename: 'somefile.log', + level: 'info' + }) + ] + }); +``` + +You may also dynamically change the log level of a transport: + +``` js + var logger = new (winston.Logger)({ + transports: [ + new (winston.transports.Console)({ level: 'warn' }), + new (winston.transports.File)({ filename: 'somefile.log', level: 'error' }) + ] + }); + logger.debug("Will not be logged in either transport!"); + logger.transports.console.level = 'debug'; + logger.transports.file.level = 'verbose'; + logger.verbose("Will be logged in both transports!"); +``` + +As of 0.2.0, winston supports customizable logging levels, defaulting to [npm][0] style logging levels. Changing logging levels is easy: + +``` js + // + // Change levels on the default winston logger + // + winston.setLevels(winston.config.syslog.levels); + + // + // Change levels on an instance of a logger + // + logger.setLevels(winston.config.syslog.levels); +``` + +Calling `.setLevels` on a logger will remove all of the previous helper methods for the old levels and define helper methods for the new levels. Thus, you should be careful about the logging statements you use when changing levels. For example, if you ran this code after changing to the syslog levels: + +``` js + // + // Logger does not have 'silly' defined since that level is not in the syslog levels + // + logger.silly('some silly message'); +``` + +### Using Custom Logging Levels +In addition to the predefined `npm` and `syslog` levels available in Winston, you can also choose to define your own: + +``` js + var myCustomLevels = { + levels: { + foo: 0, + bar: 1, + baz: 2, + foobar: 3 + }, + colors: { + foo: 'blue', + bar: 'green', + baz: 'yellow', + foobar: 'red' + } + }; + + var customLevelLogger = new (winston.Logger)({ levels: myCustomLevels.levels }); + customLevelLogger.foobar('some foobar level-ed message'); +``` + +Although there is slight repetition in this data structure, it enables simple encapsulation if you do not want to have colors. If you do wish to have colors, in addition to passing the levels to the Logger itself, you must make winston aware of them: + +``` js + // + // Make winston aware of these colors + // + winston.addColors(myCustomLevels.colors); +``` + +This enables transports with the 'colorize' option set to appropriately color the output of custom levels. + +## Further Reading + +### Events and Callbacks in Winston +Each instance of winston.Logger is also an instance of an [EventEmitter][1]. A log event will be raised each time a transport successfully logs a message: + +``` js + logger.on('logging', function (transport, level, msg, meta) { + // [msg] and [meta] have now been logged at [level] to [transport] + }); + + logger.info('CHILL WINSTON!', { seriously: true }); +``` + +It is also worth mentioning that the logger also emits an 'error' event which you should handle or suppress if you don't want unhandled exceptions: + +``` js + // + // Handle errors + // + logger.on('error', function (err) { /* Do Something */ }); + + // + // Or just suppress them. + // + logger.emitErrs = false; +``` + +Every logging method described in the previous section also takes an optional callback which will be called only when all of the transports have logged the specified message. + +``` js + logger.info('CHILL WINSTON!', { seriously: true }, function (err, level, msg, meta) { + // [msg] and [meta] have now been logged at [level] to **every** transport. + }); +``` + +### Working with multiple Loggers in winston + +Often in larger, more complex applications it is necessary to have multiple logger instances with different settings. Each logger is responsible for a different feature area (or category). This is exposed in `winston` in two ways: through `winston.loggers` and instances of `winston.Container`. In fact, `winston.loggers` is just a predefined instance of `winston.Container`: + +``` js + var winston = require('winston'); + + // + // Configure the logger for `category1` + // + winston.loggers.add('category1', { + console: { + level: 'silly', + colorize: true, + label: 'category one' + }, + file: { + filename: '/path/to/some/file' + } + }); + + // + // Configure the logger for `category2` + // + winston.loggers.add('category2', { + couchdb: { + host: '127.0.0.1', + port: 5984 + } + }); +``` + +Now that your loggers are setup you can require winston _in any file in your application_ and access these pre-configured loggers: + +``` js + var winston = require('winston'); + + // + // Grab your preconfigured logger + // + var category1 = winston.loggers.get('category1'); + + category1.info('logging from your IoC container-based logger'); +``` + +If you prefer to manage the `Container` yourself you can simply instantiate one: + +``` js + var winston = require('winston'), + container = new winston.Container(); + + container.add('category1', { + console: { + level: 'silly', + colorize: true + }, + file: { + filename: '/path/to/some/file' + } + }); +``` + +### Sharing transports between Loggers in winston + +``` js + var winston = require('winston'); + + // + // Setup transports to be shared across all loggers + // in three ways: + // + // 1. By setting it on the default Container + // 2. By passing `transports` into the constructor function of winston.Container + // 3. By passing `transports` into the `.get()` or `.add()` methods + // + + // + // 1. By setting it on the default Container + // + winston.loggers.options.transports = [ + // Setup your shared transports here + ]; + + // + // 2. By passing `transports` into the constructor function of winston.Container + // + var container = new winston.Container({ + transports: [ + // Setup your shared transports here + ] + }); + + // + // 3. By passing `transports` into the `.get()` or `.add()` methods + // + winston.loggers.add('some-category', { + transports: [ + // Setup your shared transports here + ] + }); + + container.add('some-category', { + transports: [ + // Setup your shared transports here + ] + }); +``` + +### Using winston in a CLI tool +A common use-case for logging is output to a CLI tool. Winston has a special helper method which will pretty print output from your CLI tool. Here's an example from the [require-analyzer][2] written by [Nodejitsu][3]: + +``` + info: require-analyzer starting in /Users/Charlie/Nodejitsu/require-analyzer + info: Found existing dependencies + data: { + data: colors: '0.x.x', + data: eyes: '0.1.x', + data: findit: '0.0.x', + data: npm: '1.0.x', + data: optimist: '0.2.x', + data: semver: '1.0.x', + data: winston: '0.2.x' + data: } + info: Analyzing dependencies... + info: Done analyzing raw dependencies + info: Retrieved packages from npm + warn: No additional dependencies found +``` + +Configuring output for this style is easy, just use the `.cli()` method on `winston` or an instance of `winston.Logger`: + +``` js + var winston = require('winston'); + + // + // Configure CLI output on the default logger + // + winston.cli(); + + // + // Configure CLI on an instance of winston.Logger + // + var logger = new winston.Logger({ + transports: [ + new (winston.transports.Console)() + ] + }); + + logger.cli(); +``` + +### Filters and Rewriters +Filters allow modifying the contents of **log messages**, and Rewriters allow modifying the contents of **log meta** e.g. to mask data that should not appear in logs. + +Both filters and rewriters are simple Arrays of functions which can be provided when creating a `new winston.Logger(options)`. e.g.: + +``` js +var logger = new winston.Logger({ + rewriters: [function (level, msg, meta) { /* etc etc */ }], + filters: [function (level, msg, meta) { /* etc etc */ }] +}) +``` + +Like any Array they can also be modified at runtime with no adverse side-effects to the `winston` internals. + +``` js +logger.filters.push(function(level, msg, meta) { + return meta.production + ? maskCardNumbers(msg) + : msg; +}); + +logger.info('transaction with card number 123456789012345 successful.'); +``` + +This may result in this output: + +``` +info: transaction with card number 123456****2345 successful. +``` + +Where as for rewriters, if you wanted to sanitize the `creditCard` field of your `meta` you could: + +``` js +logger.rewriters.push(function(level, msg, meta) { + if (meta.creditCard) { + meta.creditCard = maskCardNumbers(meta.creditCard) + } + + return meta; +}); + +logger.info('transaction ok', { creditCard: 123456789012345 }); +``` + +which may result in this output: + +``` +info: transaction ok creditCard=123456****2345 +``` + +See [log-filter-test.js](./test/log-filter-test.js), where card number masking is implemented as an example along with [log-rewriter-test.js](./test/log-rewriter-test.js) + +## Adding Custom Transports +Adding a custom transport is actually pretty easy. All you need to do is accept a couple of options, set a name, implement a log() method, and add it to the set of transports exposed by winston. + +``` js + var util = require('util'), + winston = require('winston'); + + var CustomLogger = winston.transports.CustomLogger = function (options) { + // + // Name this logger + // + this.name = 'customLogger'; + + // + // Set the level from your options + // + this.level = options.level || 'info'; + + // + // Configure your storage backing as you see fit + // + }; + + // + // Inherit from `winston.Transport` so you can take advantage + // of the base functionality and `.handleExceptions()`. + // + util.inherits(CustomLogger, winston.Transport); + + CustomLogger.prototype.log = function (level, msg, meta, callback) { + // + // Store this message and metadata, maybe use some custom logic + // then callback indicating success. + // + callback(null, true); + }; +``` + +### Custom Log Format +To specify custom log format you should set formatter function for transport. Currently supported transports are: Console, File, Memory. +Options object will be passed to the format function. It's general properties are: timestamp, level, message, meta. Depending on the transport type may be additional properties. + +``` js +var logger = new (winston.Logger)({ + transports: [ + new (winston.transports.Console)({ + timestamp: function() { + return Date.now(); + }, + formatter: function(options) { + // Return string will be passed to logger. + return options.timestamp() +' '+ options.level.toUpperCase() +' '+ (options.message ? options.message : '') + + (options.meta && Object.keys(options.meta).length ? '\n\t'+ JSON.stringify(options.meta) : '' ); + } + }) + ] +}); +logger.info('Data to log.'); +``` + +### Inspirations +1. [npm][0] +2. [log.js][4] +3. [socket.io][5] +4. [node-rlog][6] +5. [BigBrother][7] +6. [Loggly][8] + +## Installation + +### Installing npm (node package manager) +``` + curl http://npmjs.org/install.sh | sh +``` + +### Installing winston +``` + [sudo] npm install winston +``` + +## Run Tests +All of the winston tests are written in [vows][9], and designed to be run with npm. + +``` bash + $ npm test +``` + +#### Author: [Charlie Robbins](http://twitter.com/indexzero) +#### Contributors: [Matthew Bergman](http://github.com/fotoverite), [Marak Squires](http://github.com/marak) + +[0]: https://github.com/npm/npmlog/blob/master/log.js +[1]: http://nodejs.org/docs/v0.3.5/api/events.html#events.EventEmitter +[2]: http://github.com/nodejitsu/require-analyzer +[3]: http://nodejitsu.com +[4]: https://github.com/visionmedia/log.js +[5]: http://socket.io +[6]: https://github.com/jbrisbin/node-rlog +[7]: https://github.com/feisty/BigBrother +[8]: http://loggly.com +[9]: http://vowsjs.org +[10]: http://nodejs.org/api/util.html#util_util_format_format +[14]: http://nodejs.org/api/stream.html#stream_class_stream_writable +[16]: https://github.com/indexzero/winston-mongodb +[17]: https://github.com/indexzero/winston-riak +[18]: https://github.com/appsattic/winston-simpledb +[19]: https://github.com/wavded/winston-mail +[21]: https://github.com/jesseditson/winston-sns +[22]: https://github.com/flite/winston-graylog2 +[23]: https://github.com/kenperkins/winston-papertrail +[24]: https://github.com/jorgebay/winston-cassandra +[25]: https://github.com/jesseditson/winston-sns +[26]: https://github.com/inspiredjw/winston-dynamodb/ diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston.js new file mode 100644 index 0000000..074f0e4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston.js @@ -0,0 +1,164 @@ +/* + * winston.js: Top-level include defining Winston. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var winston = exports; + +// +// use require method for webpack bundle +// +winston.version = require('../package.json').version + +// +// Include transports defined by default by winston +// +winston.transports = require('./winston/transports'); + +// +// Expose utility methods +// +var common = require('./winston/common'); +winston.hash = common.hash; +winston.clone = common.clone; +winston.longestElement = common.longestElement; +winston.exception = require('./winston/exception'); +winston.config = require('./winston/config'); +winston.addColors = winston.config.addColors; + +// +// Expose core Logging-related prototypes. +// +winston.Container = require('./winston/container').Container; +winston.Logger = require('./winston/logger').Logger; +winston.Transport = require('./winston/transports/transport').Transport; + +// +// We create and expose a default `Container` to `winston.loggers` so that the +// programmer may manage multiple `winston.Logger` instances without any additional overhead. +// +// ### some-file1.js +// +// var logger = require('winston').loggers.get('something'); +// +// ### some-file2.js +// +// var logger = require('winston').loggers.get('something'); +// +winston.loggers = new winston.Container(); + +// +// We create and expose a 'defaultLogger' so that the programmer may do the +// following without the need to create an instance of winston.Logger directly: +// +// var winston = require('winston'); +// winston.log('info', 'some message'); +// winston.error('some error'); +// +var defaultLogger = new winston.Logger({ + transports: [new winston.transports.Console()] +}); + +// +// Pass through the target methods onto `winston`. +// +var methods = [ + 'log', + 'query', + 'stream', + 'add', + 'remove', + 'clear', + 'profile', + 'startTimer', + 'extend', + 'cli', + 'handleExceptions', + 'unhandleExceptions', + 'configure' +]; +common.setLevels(winston, null, defaultLogger.levels); +methods.forEach(function (method) { + winston[method] = function () { + return defaultLogger[method].apply(defaultLogger, arguments); + }; +}); + +// +// ### function cli () +// Configures the default winston logger to have the +// settings for command-line interfaces: no timestamp, +// colors enabled, padded output, and additional levels. +// +winston.cli = function () { + winston.padLevels = true; + common.setLevels(winston, defaultLogger.levels, winston.config.cli.levels); + defaultLogger.setLevels(winston.config.cli.levels); + winston.config.addColors(winston.config.cli.colors); + + if (defaultLogger.transports.console) { + defaultLogger.transports.console.colorize = true; + defaultLogger.transports.console.timestamp = false; + } + + return winston; +}; + +// +// ### function setLevels (target) +// #### @target {Object} Target levels to use +// Sets the `target` levels specified on the default winston logger. +// +winston.setLevels = function (target) { + common.setLevels(winston, defaultLogger.levels, target); + defaultLogger.setLevels(target); +}; + +// +// Define getter / setter for the default logger level +// which need to be exposed by winston. +// +Object.defineProperty(winston, 'level', { + get: function () { + return defaultLogger.level; + }, + set: function (val) { + defaultLogger.level = val; + + Object.keys(defaultLogger.transports).forEach(function(key) { + defaultLogger.transports[key].level = val; + }); + } +}); + +// +// Define getters / setters for appropriate properties of the +// default logger which need to be exposed by winston. +// +['emitErrs', 'exitOnError', 'padLevels', 'levelLength', 'stripColors'].forEach(function (prop) { + Object.defineProperty(winston, prop, { + get: function () { + return defaultLogger[prop]; + }, + set: function (val) { + defaultLogger[prop] = val; + } + }); +}); + +// +// @default {Object} +// The default transports and exceptionHandlers for +// the default winston logger. +// +Object.defineProperty(winston, 'default', { + get: function () { + return { + transports: defaultLogger.transports, + exceptionHandlers: defaultLogger.exceptionHandlers + }; + } +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/common.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/common.js new file mode 100644 index 0000000..97a8f34 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/common.js @@ -0,0 +1,495 @@ +/* + * common.js: Internal helper and utility functions for winston + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var util = require('util'), + crypto = require('crypto'), + cycle = require('cycle'), + fs = require('fs'), + StringDecoder = require('string_decoder').StringDecoder, + Stream = require('stream').Stream, + config = require('./config'); + +// +// ### function setLevels (target, past, current) +// #### @target {Object} Object on which to set levels. +// #### @past {Object} Previous levels set on target. +// #### @current {Object} Current levels to set on target. +// Create functions on the target objects for each level +// in current.levels. If past is defined, remove functions +// for each of those levels. +// +exports.setLevels = function (target, past, current, isDefault) { + var self = this; + if (past) { + Object.keys(past).forEach(function (level) { + delete target[level]; + }); + } + + target.levels = current || config.npm.levels; + if (target.padLevels) { + target.levelLength = exports.longestElement(Object.keys(target.levels)); + } + + // + // Define prototype methods for each log level + // e.g. target.log('info', msg) <=> target.info(msg) + // + Object.keys(target.levels).forEach(function (level) { + + // TODO Refactor logging methods into a different object to avoid name clashes + if (level === 'log') { + console.warn('Log level named "log" will clash with the method "log". Consider using a different name.'); + return; + } + + target[level] = function (msg) { + // build argument list (level, msg, ... [string interpolate], [{metadata}], [callback]) + var args = [level].concat(Array.prototype.slice.call(arguments)); + target.log.apply(target, args); + }; + }); + + return target; +}; + +// +// ### function longestElement +// #### @xs {Array} Array to calculate against +// Returns the longest element in the `xs` array. +// +exports.longestElement = function (xs) { + return Math.max.apply( + null, + xs.map(function (x) { return x.length; }) + ); +}; + +// +// ### function clone (obj) +// #### @obj {Object} Object to clone. +// Helper method for deep cloning pure JSON objects +// i.e. JSON objects that are either literals or objects (no Arrays, etc) +// +exports.clone = function (obj) { + // + // We only need to clone reference types (Object) + // + var copy = {}; + + if (obj instanceof Error) { + // With potential custom Error objects, this might not be exactly correct, + // but probably close-enough for purposes of this lib. + copy = { message: obj.message }; + Object.getOwnPropertyNames(obj).forEach(function (key) { + copy[key] = obj[key]; + }); + + return copy; + } + else if (!(obj instanceof Object)) { + return obj; + } + else if (obj instanceof Date) { + return new Date(obj.getTime()); + } + + for (var i in obj) { + if (Array.isArray(obj[i])) { + copy[i] = obj[i].slice(0); + } + else if (obj[i] instanceof Buffer) { + copy[i] = obj[i].slice(0); + } + else if (typeof obj[i] != 'function') { + copy[i] = obj[i] instanceof Object ? exports.clone(obj[i]) : obj[i]; + } + else if (typeof obj[i] === 'function') { + copy[i] = obj[i]; + } + } + + return copy; +}; + +// +// ### function log (options) +// #### @options {Object} All information about the log serialization. +// Generic logging function for returning timestamped strings +// with the following options: +// +// { +// level: 'level to add to serialized message', +// message: 'message to serialize', +// meta: 'additional logging metadata to serialize', +// colorize: false, // Colorizes output (only if `.json` is false) +// align: false // Align message level. +// timestamp: true // Adds a timestamp to the serialized message +// label: 'label to prepend the message' +// } +// +exports.log = function (options) { + var timestampFn = typeof options.timestamp === 'function' + ? options.timestamp + : exports.timestamp, + timestamp = options.timestamp ? timestampFn() : null, + showLevel = options.showLevel === undefined ? true : options.showLevel, + meta = options.meta !== null && options.meta !== undefined && !(options.meta instanceof Error) + ? exports.clone(cycle.decycle(options.meta)) + : options.meta || null, + output; + + // + // raw mode is intended for outputing winston as streaming JSON to STDOUT + // + if (options.raw) { + if (typeof meta !== 'object' && meta != null) { + meta = { meta: meta }; + } + output = exports.clone(meta) || {}; + output.level = options.level; + // + // Remark (jcrugzz): This used to be output.message = options.message.stripColors. + // I do not know why this is, it does not make sense but im handling that + // case here as well as handling the case that does make sense which is to + // make the `output.message = options.message` + // + output.message = options.message.stripColors + ? options.message.stripColors + : options.message; + + return JSON.stringify(output); + } + + // + // json mode is intended for pretty printing multi-line json to the terminal + // + if (options.json || true === options.logstash) { + if (typeof meta !== 'object' && meta != null) { + meta = { meta: meta }; + } + + output = exports.clone(meta) || {}; + output.level = options.level; + output.message = output.message || ''; + + if (options.label) { output.label = options.label; } + if (options.message) { output.message = options.message; } + if (timestamp) { output.timestamp = timestamp; } + + if (options.logstash === true) { + // use logstash format + var logstashOutput = {}; + if (output.message !== undefined) { + logstashOutput['@message'] = output.message; + delete output.message; + } + + if (output.timestamp !== undefined) { + logstashOutput['@timestamp'] = output.timestamp; + delete output.timestamp; + } + + logstashOutput['@fields'] = exports.clone(output); + output = logstashOutput; + } + + if (typeof options.stringify === 'function') { + return options.stringify(output); + } + + return JSON.stringify(output, function (key, value) { + return value instanceof Buffer + ? value.toString('base64') + : value; + }); + } + + // + // Remark: this should really be a call to `util.format`. + // + if (typeof options.formatter == 'function') { + options.meta = meta; + return String(options.formatter(exports.clone(options))); + } + + output = timestamp ? timestamp + ' - ' : ''; + if (showLevel) { + output += options.colorize === 'all' || options.colorize === 'level' || options.colorize === true + ? config.colorize(options.level) + : options.level; + } + + output += (options.align) ? '\t' : ''; + output += (timestamp || showLevel) ? ': ' : ''; + output += options.label ? ('[' + options.label + '] ') : ''; + output += options.colorize === 'all' || options.colorize === 'message' + ? config.colorize(options.level, options.message) + : options.message; + + if (meta !== null && meta !== undefined) { + if (meta && meta instanceof Error && meta.stack) { + meta = meta.stack; + } + + if (typeof meta !== 'object') { + output += ' ' + meta; + } + else if (Object.keys(meta).length > 0) { + if (typeof options.prettyPrint === 'function') { + output += ' ' + options.prettyPrint(meta); + } else if (options.prettyPrint) { + output += ' ' + '\n' + util.inspect(meta, false, options.depth || null, options.colorize); + } else if ( + options.humanReadableUnhandledException + && Object.keys(meta).length === 5 + && meta.hasOwnProperty('date') + && meta.hasOwnProperty('process') + && meta.hasOwnProperty('os') + && meta.hasOwnProperty('trace') + && meta.hasOwnProperty('stack')) { + + // + // If meta carries unhandled exception data serialize the stack nicely + // + var stack = meta.stack; + delete meta.stack; + delete meta.trace; + output += ' ' + exports.serialize(meta); + + if (stack) { + output += '\n' + stack.join('\n'); + } + } else { + output += ' ' + exports.serialize(meta); + } + } + } + + return output; +}; + +exports.capitalize = function (str) { + return str && str[0].toUpperCase() + str.slice(1); +}; + +// +// ### function hash (str) +// #### @str {string} String to hash. +// Utility function for creating unique ids +// e.g. Profiling incoming HTTP requests on the same tick +// +exports.hash = function (str) { + return crypto.createHash('sha1').update(str).digest('hex'); +}; + +// +// ### function pad (n) +// Returns a padded string if `n < 10`. +// +exports.pad = function (n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +}; + +// +// ### function timestamp () +// Returns a timestamp string for the current time. +// +exports.timestamp = function () { + return new Date().toISOString(); +}; + +// +// ### function serialize (obj, key) +// #### @obj {Object|literal} Object to serialize +// #### @key {string} **Optional** Optional key represented by obj in a larger object +// Performs simple comma-separated, `key=value` serialization for Loggly when +// logging to non-JSON inputs. +// +exports.serialize = function (obj, key) { + // symbols cannot be directly casted to strings + if (typeof key === 'symbol') { + key = key.toString() + } + if (typeof obj === 'symbol') { + obj = obj.toString() + } + + if (obj === null) { + obj = 'null'; + } + else if (obj === undefined) { + obj = 'undefined'; + } + else if (obj === false) { + obj = 'false'; + } + + if (typeof obj !== 'object') { + return key ? key + '=' + obj : obj; + } + + if (obj instanceof Buffer) { + return key ? key + '=' + obj.toString('base64') : obj.toString('base64'); + } + + var msg = '', + keys = Object.keys(obj), + length = keys.length; + + for (var i = 0; i < length; i++) { + if (Array.isArray(obj[keys[i]])) { + msg += keys[i] + '=['; + + for (var j = 0, l = obj[keys[i]].length; j < l; j++) { + msg += exports.serialize(obj[keys[i]][j]); + if (j < l - 1) { + msg += ', '; + } + } + + msg += ']'; + } + else if (obj[keys[i]] instanceof Date) { + msg += keys[i] + '=' + obj[keys[i]]; + } + else { + msg += exports.serialize(obj[keys[i]], keys[i]); + } + + if (i < length - 1) { + msg += ', '; + } + } + + return msg; +}; + +// +// ### function tailFile (options, callback) +// #### @options {Object} Options for tail. +// #### @callback {function} Callback to execute on every line. +// `tail -f` a file. Options must include file. +// +exports.tailFile = function(options, callback) { + var buffer = new Buffer(64 * 1024) + , decode = new StringDecoder('utf8') + , stream = new Stream + , buff = '' + , pos = 0 + , row = 0; + + if (options.start === -1) { + delete options.start; + } + + stream.readable = true; + stream.destroy = function() { + stream.destroyed = true; + stream.emit('end'); + stream.emit('close'); + }; + + fs.open(options.file, 'a+', '0644', function(err, fd) { + if (err) { + if (!callback) { + stream.emit('error', err); + } else { + callback(err); + } + stream.destroy(); + return; + } + + (function read() { + if (stream.destroyed) { + fs.close(fd); + return; + } + + return fs.read(fd, buffer, 0, buffer.length, pos, function(err, bytes) { + if (err) { + if (!callback) { + stream.emit('error', err); + } else { + callback(err); + } + stream.destroy(); + return; + } + + if (!bytes) { + if (buff) { + if (options.start == null || row > options.start) { + if (!callback) { + stream.emit('line', buff); + } else { + callback(null, buff); + } + } + row++; + buff = ''; + } + return setTimeout(read, 1000); + } + + var data = decode.write(buffer.slice(0, bytes)); + + if (!callback) { + stream.emit('data', data); + } + + var data = (buff + data).split(/\n+/) + , l = data.length - 1 + , i = 0; + + for (; i < l; i++) { + if (options.start == null || row > options.start) { + if (!callback) { + stream.emit('line', data[i]); + } else { + callback(null, data[i]); + } + } + row++; + } + + buff = data[l]; + + pos += bytes; + + return read(); + }); + })(); + }); + + if (!callback) { + return stream; + } + + return stream.destroy; +}; + +// +// ### function stringArrayToSet (array) +// #### @strArray {Array} Array of Set-elements as strings. +// #### @errMsg {string} **Optional** Custom error message thrown on invalid input. +// Returns a Set-like object with strArray's elements as keys (each with the value true). +// +exports.stringArrayToSet = function (strArray, errMsg) { + if (typeof errMsg === 'undefined') { + errMsg = 'Cannot make set from Array with non-string elements'; + } + return strArray.reduce(function (set, el) { + if (!(typeof el === 'string' || el instanceof String)) { + throw new Error(errMsg); + } + set[el] = true; + return set; + }, Object.create(null)); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config.js new file mode 100644 index 0000000..1bb52fd --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config.js @@ -0,0 +1,68 @@ +/* + * config.js: Default settings for all levels that winston knows about + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var colors = require('colors/safe'); + +// Fix colors not appearing in non-tty environments +colors.enabled = true; + +var config = exports, + allColors = exports.allColors = {}; + +config.addColors = function (colors) { + mixin(allColors, colors); +}; + +config.colorize = function (level, message) { + if (typeof message === 'undefined') message = level; + + var colorized = message; + if (allColors[level] instanceof Array) { + for (var i = 0, l = allColors[level].length; i < l; ++i) { + colorized = colors[allColors[level][i]](colorized); + } + } + else if (allColors[level].match(/\s/)) { + var colorArr = allColors[level].split(/\s+/); + for (var i = 0; i < colorArr.length; ++i) { + colorized = colors[colorArr[i]](colorized); + } + allColors[level] = colorArr; + } + else { + colorized = colors[allColors[level]](colorized); + } + + return colorized; +}; + +// +// Export config sets +// +config.cli = require('./config/cli-config'); +config.npm = require('./config/npm-config'); +config.syslog = require('./config/syslog-config'); + +// +// Add colors for pre-defined config sets +// +config.addColors(config.cli.colors); +config.addColors(config.npm.colors); +config.addColors(config.syslog.colors); + +function mixin (target) { + var args = Array.prototype.slice.call(arguments, 1); + + args.forEach(function (a) { + var keys = Object.keys(a); + for (var i = 0; i < keys.length; i++) { + target[keys[i]] = a[keys[i]]; + } + }); + return target; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/cli-config.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/cli-config.js new file mode 100644 index 0000000..764d2a8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/cli-config.js @@ -0,0 +1,35 @@ +/* + * cli-config.js: Config that conform to commonly used CLI logging levels. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var cliConfig = exports; + +cliConfig.levels = { + error: 0, + warn: 1, + help: 2, + data: 3, + info: 4, + debug: 5, + prompt: 6, + verbose: 7, + input: 8, + silly: 9, +}; + +cliConfig.colors = { + error: 'red', + warn: 'yellow', + help: 'cyan', + data: 'grey', + info: 'green', + debug: 'blue', + prompt: 'grey', + verbose: 'cyan', + input: 'grey', + silly: 'magenta' +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/npm-config.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/npm-config.js new file mode 100644 index 0000000..6402ab3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/npm-config.js @@ -0,0 +1,27 @@ +/* + * npm-config.js: Config that conform to npm logging levels. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var npmConfig = exports; + +npmConfig.levels = { + error: 0, + warn: 1, + info: 2, + verbose: 3, + debug: 4, + silly: 5 +}; + +npmConfig.colors = { + error: 'red', + warn: 'yellow', + info: 'green', + verbose: 'cyan', + debug: 'blue', + silly: 'magenta' +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/syslog-config.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/syslog-config.js new file mode 100644 index 0000000..67c6a09 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/config/syslog-config.js @@ -0,0 +1,31 @@ +/* + * syslog-config.js: Config that conform to syslog logging levels. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var syslogConfig = exports; + +syslogConfig.levels = { + emerg: 0, + alert: 1, + crit: 2, + error: 3, + warning: 4, + notice: 5, + info: 6, + debug: 7 +}; + +syslogConfig.colors = { + emerg: 'red', + alert: 'yellow', + crit: 'red', + error: 'red', + warning: 'red', + notice: 'yellow', + info: 'green', + debug: 'blue' +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/container.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/container.js new file mode 100644 index 0000000..f333344 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/container.js @@ -0,0 +1,128 @@ +/* + * container.js: Inversion of control container for winston logger instances + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var common = require('./common'), + winston = require('../winston'), + extend = require('util')._extend; + +// +// ### function Container (options) +// #### @options {Object} Default pass-thru options for Loggers +// Constructor function for the Container object responsible for managing +// a set of `winston.Logger` instances based on string ids. +// +var Container = exports.Container = function (options) { + this.loggers = {}; + this.options = options || {}; + this.default = { + transports: [ + new winston.transports.Console({ + level: 'silly', + colorize: false + }) + ] + } +}; + +// +// ### function get / add (id, options) +// #### @id {string} Id of the Logger to get +// #### @options {Object} **Optional** Options for the Logger instance +// Retreives a `winston.Logger` instance for the specified `id`. If +// an instance does not exist, one is created. +// +Container.prototype.get = Container.prototype.add = function (id, options) { + var self = this, + existing; + + if (!this.loggers[id]) { + // + // Remark: Simple shallow clone for configuration options in case we pass in + // instantiated protoypal objects + // + options = extend({}, options || this.options || this.default); + existing = options.transports || this.options.transports; + // + // Remark: Make sure if we have an array of transports we slice it to make copies + // of those references. + // + options.transports = existing ? existing.slice() : []; + + if (options.transports.length === 0 && (!options || !options['console'])) { + options.transports.push(this.default.transports[0]); + } + + Object.keys(options).forEach(function (key) { + if (key === 'transports') { + return; + } + + var name = common.capitalize(key); + + if (!winston.transports[name]) { + throw new Error('Cannot add unknown transport: ' + name); + } + + var namedOptions = options[key]; + namedOptions.id = id; + options.transports.push(new (winston.transports[name])(namedOptions)); + }); + + options.id = id; + this.loggers[id] = new winston.Logger(options); + + this.loggers[id].on('close', function () { + self._delete(id); + }); + } + + return this.loggers[id]; +}; + +// +// ### function close (id) +// #### @id {string} **Optional** Id of the Logger instance to find +// Returns a boolean value indicating if this instance +// has a logger with the specified `id`. +// +Container.prototype.has = function (id) { + return !!this.loggers[id]; +}; + +// +// ### function close (id) +// #### @id {string} **Optional** Id of the Logger instance to close +// Closes a `Logger` instance with the specified `id` if it exists. +// If no `id` is supplied then all Loggers are closed. +// +Container.prototype.close = function (id) { + var self = this; + + function _close (id) { + if (!self.loggers[id]) { + return; + } + + self.loggers[id].close(); + self._delete(id); + } + + return id ? _close(id) : Object.keys(this.loggers).forEach(function (id) { + _close(id); + }); +}; + +// +// ### @private function _delete (id) +// #### @id {string} Id of the Logger instance to delete from container +// Deletes a `Logger` instance with the specified `id`. +// +Container.prototype._delete = function (id) { + delete this.loggers[id]; +} + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/exception.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/exception.js new file mode 100644 index 0000000..22717dd --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/exception.js @@ -0,0 +1,56 @@ +/* + * exception.js: Utility methods for gathing information about uncaughtExceptions. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var os = require('os'), + stackTrace = require('stack-trace'); + +var exception = exports; + +exception.getAllInfo = function (err) { + return { + date: new Date().toString(), + process: exception.getProcessInfo(), + os: exception.getOsInfo(), + trace: exception.getTrace(err), + stack: err.stack && err.stack.split('\n') + }; +}; + +exception.getProcessInfo = function () { + return { + pid: process.pid, + uid: process.getuid ? process.getuid() : null, + gid: process.getgid ? process.getgid() : null, + cwd: process.cwd(), + execPath: process.execPath, + version: process.version, + argv: process.argv, + memoryUsage: process.memoryUsage() + }; +}; + +exception.getOsInfo = function () { + return { + loadavg: os.loadavg(), + uptime: os.uptime() + }; +}; + +exception.getTrace = function (err) { + var trace = err ? stackTrace.parse(err) : stackTrace.get(); + return trace.map(function (site) { + return { + column: site.getColumnNumber(), + file: site.getFileName(), + function: site.getFunctionName(), + line: site.getLineNumber(), + method: site.getMethodName(), + native: site.isNative(), + } + }); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/logger.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/logger.js new file mode 100755 index 0000000..d1be627 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/logger.js @@ -0,0 +1,729 @@ +/* + * logger.js: Core logger object used by winston. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var events = require('events'), + util = require('util'), + async = require('async'), + config = require('./config'), + common = require('./common'), + exception = require('./exception'), + Stream = require('stream').Stream; + +var formatRegExp = /%[sdj%]/g; + +// +// ### function Logger (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Logger object responsible +// for persisting log messages and metadata to one or more transports. +// +var Logger = exports.Logger = function (options) { + events.EventEmitter.call(this); + this.configure(options); +}; + +// +// Inherit from `events.EventEmitter`. +// +util.inherits(Logger, events.EventEmitter); + +// +// ### function configure (options) +// This will wholesale reconfigure this instance by: +// 1. Resetting all transports. Older transports will be removed implicitly. +// 2. Set all other options including levels, colors, rewriters, filters, +// exceptionHandlers, etc. +// +Logger.prototype.configure = function (options) { + var self = this; + + // + // If we have already been setup with transports + // then remove them before proceeding. + // + if (Array.isArray(this._names) && this._names.length) { + this.clear(); + } + + options = options || {}; + this.transports = {}; + this._names = []; + + if (options.transports) { + options.transports.forEach(function (transport) { + self.add(transport, null, true); + }); + } + + // + // Set Levels and default logging level + // + this.padLevels = options.padLevels || false; + this.setLevels(options.levels); + if (options.colors) { + config.addColors(options.colors); + } + + // + // Hoist other options onto this instance. + // + this.id = options.id || null; + this.level = options.level || 'info'; + this.emitErrs = options.emitErrs || false; + this.stripColors = options.stripColors || false; + this.exitOnError = typeof options.exitOnError !== 'undefined' + ? options.exitOnError + : true; + + // + // Setup internal state as empty Objects even though it is + // defined lazily later to ensure a strong existential API contract. + // + this.exceptionHandlers = {}; + this.profilers = {}; + + ['rewriters', 'filters'].forEach(function (kind) { + self[kind] = Array.isArray(options[kind]) + ? options[kind] + : []; + }); + + if (options.exceptionHandlers) { + this.handleExceptions(options.exceptionHandlers); + } +}; + +// +// ### function log (level, msg, [meta], callback) +// #### @level {string} Level at which to log the message. +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Core logging method exposed to Winston. Metadata is optional. +// +Logger.prototype.log = function (level) { + var args = Array.prototype.slice.call(arguments, 1), + self = this, + transports; + + while (args[args.length - 1] === null) { + args.pop(); + } + + // + // Determining what is `meta` and what are arguments for string interpolation + // turns out to be VERY tricky. e.g. in the cases like this: + // + // logger.info('No interpolation symbols', 'ok', 'why', { meta: 'is-this' }); + // + var callback = typeof args[args.length - 1] === 'function' + ? args.pop() + : null; + + // + // Handle errors appropriately. + // + function onError(err) { + if (callback) { + callback(err); + } + else if (self.emitErrs) { + self.emit('error', err); + } + } + + if (this._names.length === 0) { + return onError(new Error('Cannot log with no transports.')); + } + else if (typeof self.levels[level] === 'undefined') { + return onError(new Error('Unknown log level: ' + level)); + } + + // + // If there are no transports that match the level + // then be eager and return. This could potentially be calculated + // during `setLevels` for more performance gains. + // + var targets = this._names.filter(function (name) { + var transport = self.transports[name]; + return (transport.level && self.levels[transport.level] >= self.levels[level]) + || (!transport.level && self.levels[self.level] >= self.levels[level]); + }); + + if (!targets.length) { + if (callback) { callback(); } + return; + } + + // + // Determining what is `meta` and what are arguments for string interpolation + // turns out to be VERY tricky. e.g. in the cases like this: + // + // logger.info('No interpolation symbols', 'ok', 'why', { meta: 'is-this' }); + // + var msg, meta = {}, validMeta = false; + var hasFormat = args && args[0] && args[0].match && args[0].match(formatRegExp) !== null; + var tokens = (hasFormat) ? args[0].match(formatRegExp) : []; + var ptokens = tokens.filter(function(t) { return t === '%%' }); + if (((args.length - 1) - (tokens.length - ptokens.length)) > 0 || args.length === 1) { + // last arg is meta + meta = args[args.length - 1] || args; + var metaType = Object.prototype.toString.call(meta); + validMeta = metaType === '[object Object]' || + metaType === '[object Error]' || metaType === '[object Array]'; + meta = validMeta ? args.pop() : {}; + } + msg = util.format.apply(null, args); + + // + // Respond to the callback. + // + function finish(err) { + if (callback) { + if (err) return callback(err); + callback(null, level, msg, meta); + } + + callback = null; + if (!err) { + self.emit('logged', level, msg, meta); + } + } + + // If we should pad for levels, do so + if (this.padLevels) { + msg = new Array(this.levelLength - level.length + 1).join(' ') + msg; + } + + this.rewriters.forEach(function (rewriter) { + meta = rewriter(level, msg, meta, self); + }); + + this.filters.forEach(function(filter) { + var filtered = filter(level, msg, meta, self); + if (typeof filtered === 'string') + msg = filtered; + else { + msg = filtered.msg; + meta = filtered.meta; + } + }); + + // + // For consideration of terminal 'color" programs like colors.js, + // which can add ANSI escape color codes to strings, we destyle the + // ANSI color escape codes when `this.stripColors` is set. + // + // see: http://en.wikipedia.org/wiki/ANSI_escape_code + // + if (this.stripColors) { + var code = /\u001b\[(\d+(;\d+)*)?m/g; + msg = ('' + msg).replace(code, ''); + } + + // + // Log for each transport and emit 'logging' event + // + function transportLog(name, next) { + var transport = self.transports[name]; + transport.log(level, msg, meta, function (err) { + if (err) { + err.transport = transport; + finish(err); + return next(); + } + + self.emit('logging', transport, level, msg, meta); + next(); + }); + } + + async.forEach(targets, transportLog, finish); + return this; +}; + +// +// ### function query (options, callback) +// #### @options {Object} Query options for this instance. +// #### @callback {function} Continuation to respond to when complete. +// Queries the all transports for this instance with the specified `options`. +// This will aggregate each transport's results into one object containing +// a property per transport. +// +Logger.prototype.query = function (options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + + var self = this, + options = options || {}, + results = {}, + query = common.clone(options.query) || {}, + transports; + + // + // Helper function to query a single transport + // + function queryTransport(transport, next) { + if (options.query) { + options.query = transport.formatQuery(query); + } + + transport.query(options, function (err, results) { + if (err) { + return next(err); + } + + next(null, transport.formatResults(results, options.format)); + }); + } + + // + // Helper function to accumulate the results from + // `queryTransport` into the `results`. + // + function addResults(transport, next) { + queryTransport(transport, function (err, result) { + // + // queryTransport could potentially invoke the callback + // multiple times since Transport code can be unpredictable. + // + if (next) { + result = err || result; + if (result) { + results[transport.name] = result; + } + + next(); + } + + next = null; + }); + } + + // + // If an explicit transport is being queried then + // respond with the results from only that transport + // + if (options.transport) { + options.transport = options.transport.toLowerCase(); + return queryTransport(this.transports[options.transport], callback); + } + + // + // Create a list of all transports for this instance. + // + transports = this._names.map(function (name) { + return self.transports[name]; + }).filter(function (transport) { + return !!transport.query; + }); + + // + // Iterate over the transports in parallel setting the + // appropriate key in the `results` + // + async.forEach(transports, addResults, function () { + callback(null, results); + }); +}; + +// +// ### function stream (options) +// #### @options {Object} Stream options for this instance. +// Returns a log stream for all transports. Options object is optional. +// +Logger.prototype.stream = function (options) { + var self = this, + options = options || {}, + out = new Stream, + streams = [], + transports; + + if (options.transport) { + var transport = this.transports[options.transport]; + delete options.transport; + if (transport && transport.stream) { + return transport.stream(options); + } + } + + out._streams = streams; + out.destroy = function () { + var i = streams.length; + while (i--) streams[i].destroy(); + }; + + // + // Create a list of all transports for this instance. + // + transports = this._names.map(function (name) { + return self.transports[name]; + }).filter(function (transport) { + return !!transport.stream; + }); + + transports.forEach(function (transport) { + var stream = transport.stream(options); + if (!stream) return; + + streams.push(stream); + + stream.on('log', function (log) { + log.transport = log.transport || []; + log.transport.push(transport.name); + out.emit('log', log); + }); + + stream.on('error', function (err) { + err.transport = err.transport || []; + err.transport.push(transport.name); + out.emit('error', err); + }); + }); + + return out; +}; + +// +// ### function close () +// Cleans up resources (streams, event listeners) for all +// transports associated with this instance (if necessary). +// +Logger.prototype.close = function () { + var self = this; + + this._names.forEach(function (name) { + var transport = self.transports[name]; + if (transport && transport.close) { + transport.close(); + } + }); + + this.emit('close'); +}; + +// +// ### function handleExceptions ([tr0, tr1...] || tr0, tr1, ...) +// Handles `uncaughtException` events for the current process by +// ADDING any handlers passed in. +// +Logger.prototype.handleExceptions = function () { + var args = Array.prototype.slice.call(arguments), + handlers = [], + self = this; + + args.forEach(function (a) { + if (Array.isArray(a)) { + handlers = handlers.concat(a); + } + else { + handlers.push(a); + } + }); + + this.exceptionHandlers = this.exceptionHandlers || {}; + handlers.forEach(function (handler) { + self.exceptionHandlers[handler.name] = handler; + }); + + this._hnames = Object.keys(self.exceptionHandlers); + + if (!this.catchExceptions) { + this.catchExceptions = this._uncaughtException.bind(this); + process.on('uncaughtException', this.catchExceptions); + } +}; + +// +// ### function unhandleExceptions () +// Removes any handlers to `uncaughtException` events +// for the current process +// +Logger.prototype.unhandleExceptions = function () { + var self = this; + + if (this.catchExceptions) { + Object.keys(this.exceptionHandlers).forEach(function (name) { + var handler = self.exceptionHandlers[name]; + if (handler.close) { + handler.close(); + } + }); + + this.exceptionHandlers = {}; + Object.keys(this.transports).forEach(function (name) { + var transport = self.transports[name]; + if (transport.handleExceptions) { + transport.handleExceptions = false; + } + }) + + process.removeListener('uncaughtException', this.catchExceptions); + this.catchExceptions = false; + } +}; + +// +// ### function add (transport, [options]) +// #### @transport {Transport} Prototype of the Transport object to add. +// #### @options {Object} **Optional** Options for the Transport to add. +// #### @instance {Boolean} **Optional** Value indicating if `transport` is already instantiated. +// Adds a transport of the specified type to this instance. +// +Logger.prototype.add = function (transport, options, created) { + var instance = created ? transport : (new (transport)(options)); + + if (!instance.name && !instance.log) { + throw new Error('Unknown transport with no log() method'); + } + else if (this.transports[instance.name]) { + throw new Error('Transport already attached: ' + instance.name + ", assign a different name"); + } + + this.transports[instance.name] = instance; + this._names = Object.keys(this.transports); + + // + // Listen for the `error` event on the new Transport + // + instance._onError = this._onError.bind(this, instance) + if (!created) { + instance.on('error', instance._onError); + } + + // + // If this transport has `handleExceptions` set to `true` + // and we are not already handling exceptions, do so. + // + if (instance.handleExceptions && !this.catchExceptions) { + this.handleExceptions(); + } + + return this; +}; + +// +// ### function clear () +// Remove all transports from this instance +// +Logger.prototype.clear = function () { + Object.keys(this.transports).forEach(function (name) { + this.remove({ name: name }); + }, this); +}; + +// +// ### function remove (transport) +// #### @transport {Transport|String} Transport or Name to remove. +// Removes a transport of the specified type from this instance. +// +Logger.prototype.remove = function (transport) { + var name = typeof transport !== 'string' + ? transport.name || transport.prototype.name + : transport; + + if (!this.transports[name]) { + throw new Error('Transport ' + name + ' not attached to this instance'); + } + + var instance = this.transports[name]; + delete this.transports[name]; + this._names = Object.keys(this.transports); + + if (instance.close) { + instance.close(); + } + + if (instance._onError) { + instance.removeListener('error', instance._onError); + } + return this; +}; + +// +// ### function startTimer () +// Returns an object corresponding to a specific timing. When done +// is called the timer will finish and log the duration. e.g.: +// +// timer = winston.startTimer() +// setTimeout(function(){ +// timer.done("Logging message"); +// }, 1000); +// +Logger.prototype.startTimer = function () { + return new ProfileHandler(this); +}; + +// +// ### function profile (id, [msg, meta, callback]) +// #### @id {string} Unique id of the profiler +// #### @msg {string} **Optional** Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} **Optional** Continuation to respond to when complete. +// Tracks the time inbetween subsequent calls to this method +// with the same `id` parameter. The second call to this method +// will log the difference in milliseconds along with the message. +// +Logger.prototype.profile = function (id) { + var now = Date.now(), then, args, + msg, meta, callback; + + if (this.profilers[id]) { + then = this.profilers[id]; + delete this.profilers[id]; + + // Support variable arguments: msg, meta, callback + args = Array.prototype.slice.call(arguments); + callback = typeof args[args.length - 1] === 'function' ? args.pop() : null; + meta = typeof args[args.length - 1] === 'object' ? args.pop() : {}; + msg = args.length === 2 ? args[1] : id; + + // Set the duration property of the metadata + meta.durationMs = now - then; + return this.info(msg, meta, callback); + } + else { + this.profilers[id] = now; + } + + return this; +}; + +// +// ### function setLevels (target) +// #### @target {Object} Target levels to use on this instance +// Sets the `target` levels specified on this instance. +// +Logger.prototype.setLevels = function (target) { + return common.setLevels(this, this.levels, target); +}; + +// +// ### function cli () +// Configures this instance to have the default +// settings for command-line interfaces: no timestamp, +// colors enabled, padded output, and additional levels. +// +Logger.prototype.cli = function () { + this.padLevels = true; + this.setLevels(config.cli.levels); + config.addColors(config.cli.colors); + + if (this.transports.console) { + this.transports.console.colorize = this.transports.console.colorize || true; + this.transports.console.timestamp = this.transports.console.timestamp || false; + } + + return this; +}; + +// +// ### @private function _uncaughtException (err) +// #### @err {Error} Error to handle +// Logs all relevant information around the `err` and +// exits the current process. +// +Logger.prototype._uncaughtException = function (err) { + var self = this, + responded = false, + info = exception.getAllInfo(err), + handlers = this._getExceptionHandlers(), + timeout, + doExit; + + // + // Calculate if we should exit on this error + // + doExit = typeof this.exitOnError === 'function' + ? this.exitOnError(err) + : this.exitOnError; + + function logAndWait(transport, next) { + transport.logException('uncaughtException: ' + (err.message || err), info, next, err); + } + + function gracefulExit() { + if (doExit && !responded) { + // + // Remark: Currently ignoring any exceptions from transports + // when catching uncaught exceptions. + // + clearTimeout(timeout); + responded = true; + process.exit(1); + } + } + + if (!handlers || handlers.length === 0) { + return gracefulExit(); + } + + // + // Log to all transports and allow the operation to take + // only up to `3000ms`. + // + async.forEach(handlers, logAndWait, gracefulExit); + if (doExit) { + timeout = setTimeout(gracefulExit, 3000); + } +}; + +// +// ### @private function _getExceptionHandlers () +// Returns the list of transports and exceptionHandlers +// for this instance. +// +Logger.prototype._getExceptionHandlers = function () { + var self = this; + + return this._hnames.map(function (name) { + return self.exceptionHandlers[name]; + }).concat(this._names.map(function (name) { + return self.transports[name].handleExceptions && self.transports[name]; + })).filter(Boolean); +}; + +// +// ### @private function _onError (transport, err) +// #### @transport {Object} Transport on which the error occured +// #### @err {Error} Error that occurred on the transport +// Bubbles the error, `err`, that occured on the specified `transport` +// up from this instance if `emitErrs` has been set. +// +Logger.prototype._onError = function (transport, err) { + if (this.emitErrs) { + this.emit('error', err, transport); + } +}; + +// +// ### @private ProfileHandler +// Constructor function for the ProfileHandler instance used by +// `Logger.prototype.startTimer`. When done is called the timer +// will finish and log the duration. +// +function ProfileHandler(logger) { + this.logger = logger; + this.start = Date.now(); +} + +// +// ### function done (msg) +// Ends the current timer (i.e. ProfileHandler) instance and +// logs the `msg` along with the duration since creation. +// +ProfileHandler.prototype.done = function (msg) { + var args = Array.prototype.slice.call(arguments), + callback = typeof args[args.length - 1] === 'function' ? args.pop() : null, + meta = typeof args[args.length - 1] === 'object' ? args.pop() : {}; + + meta.duration = (Date.now()) - this.start + 'ms'; + return this.logger.info(msg, meta, callback); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports.js new file mode 100644 index 0000000..bd7bdcb --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports.js @@ -0,0 +1,36 @@ +/* + * transports.js: Set of all transports Winston knows about + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +Object.defineProperty(exports, 'Console', { + configurable: true, + enumerable: true, + get: function () { + return require('./transports/console').Console; + } +}); +Object.defineProperty(exports, 'File', { + configurable: true, + enumerable: true, + get: function () { + return require('./transports/file').File; + } +}); +Object.defineProperty(exports, 'Http', { + configurable: true, + enumerable: true, + get: function () { + return require('./transports/http').Http; + } +}); +Object.defineProperty(exports, 'Memory', { + configurable: true, + enumerable: true, + get: function () { + return require('./transports/memory').Memory; + } +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/console.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/console.js new file mode 100644 index 0000000..e79318a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/console.js @@ -0,0 +1,130 @@ +/* + * console.js: Transport for outputting to the console + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var events = require('events'), + os = require('os'), + util = require('util'), + common = require('../common'), + Transport = require('./transport').Transport; + +// +// ### function Console (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Console transport object responsible +// for persisting log messages and metadata to a terminal or TTY. +// +var Console = exports.Console = function (options) { + Transport.call(this, options); + options = options || {}; + + this.json = options.json || false; + this.colorize = options.colorize || false; + this.prettyPrint = options.prettyPrint || false; + this.timestamp = typeof options.timestamp !== 'undefined' ? options.timestamp : false; + this.showLevel = options.showLevel === undefined ? true : options.showLevel; + this.label = options.label || null; + this.logstash = options.logstash || false; + this.depth = options.depth || null; + this.align = options.align || false; + this.stderrLevels = setStderrLevels(options.stderrLevels, options.debugStdout); + this.eol = options.eol || os.EOL; + + if (this.json) { + this.stringify = options.stringify || function (obj) { + return JSON.stringify(obj, null, 2); + }; + } + + // + // Convert stderrLevels into an Object for faster key-lookup times than an Array. + // + // For backwards compatibility, stderrLevels defaults to ['error', 'debug'] + // or ['error'] depending on whether options.debugStdout is true. + // + function setStderrLevels (levels, debugStdout) { + var defaultMsg = 'Cannot have non-string elements in stderrLevels Array'; + if (debugStdout) { + if (levels) { + // + // Don't allow setting both debugStdout and stderrLevels together, + // since this could cause behaviour a programmer might not expect. + // + throw new Error('Cannot set debugStdout and stderrLevels together'); + } + + return common.stringArrayToSet(['error'], defaultMsg); + } + + if (!levels) { + return common.stringArrayToSet(['error', 'debug'], defaultMsg); + } else if (!(Array.isArray(levels))) { + throw new Error('Cannot set stderrLevels to type other than Array'); + } + + return common.stringArrayToSet(levels, defaultMsg); + }; +}; + +// +// Inherit from `winston.Transport`. +// +util.inherits(Console, Transport); + +// +// Expose the name of this Transport on the prototype +// +Console.prototype.name = 'console'; + +// +// ### function log (level, msg, [meta], callback) +// #### @level {string} Level at which to log the message. +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Core logging method exposed to Winston. Metadata is optional. +// +Console.prototype.log = function (level, msg, meta, callback) { + if (this.silent) { + return callback(null, true); + } + + var self = this, + output; + + output = common.log({ + colorize: this.colorize, + json: this.json, + level: level, + message: msg, + meta: meta, + stringify: this.stringify, + timestamp: this.timestamp, + showLevel: this.showLevel, + prettyPrint: this.prettyPrint, + raw: this.raw, + label: this.label, + logstash: this.logstash, + depth: this.depth, + formatter: this.formatter, + align: this.align, + humanReadableUnhandledException: this.humanReadableUnhandledException + }); + + if (this.stderrLevels[level]) { + process.stderr.write(output + this.eol); + } else { + process.stdout.write(output + this.eol); + } + + // + // Emit the `logged` event immediately because the event loop + // will not exit until `process.stdout` has drained anyway. + // + self.emit('logged'); + callback(null, true); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/file.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/file.js new file mode 100644 index 0000000..d4de627 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/file.js @@ -0,0 +1,684 @@ +/* + * file.js: Transport for outputting to a local log file + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var events = require('events'), + fs = require('fs'), + path = require('path'), + util = require('util'), + async = require('async'), + zlib = require('zlib'), + common = require('../common'), + Transport = require('./transport').Transport, + isWritable = require('isstream').isWritable, + Stream = require('stream').Stream, + os = require('os'); + +// +// ### function File (options) +// #### @options {Object} Options for this instance. +// Constructor function for the File transport object responsible +// for persisting log messages and metadata to one or more files. +// +var File = exports.File = function (options) { + var self = this; + Transport.call(this, options); + + // + // Helper function which throws an `Error` in the event + // that any of the rest of the arguments is present in `options`. + // + function throwIf (target /*, illegal... */) { + Array.prototype.slice.call(arguments, 1).forEach(function (name) { + if (options[name]) { + throw new Error('Cannot set ' + name + ' and ' + target + 'together'); + } + }); + } + + if (options.filename || options.dirname) { + throwIf('filename or dirname', 'stream'); + this._basename = this.filename = options.filename + ? path.basename(options.filename) + : 'winston.log'; + + this.dirname = options.dirname || path.dirname(options.filename); + this.options = options.options || { flags: 'a' }; + + // + // "24 bytes" is maybe a good value for logging lines. + // + this.options.highWaterMark = this.options.highWaterMark || 24; + } + else if (options.stream) { + throwIf('stream', 'filename', 'maxsize'); + this._stream = options.stream; + this._isStreams2 = isWritable(this._stream); + this._stream.on('error', function(error){ + self.emit('error', error); + }); + // + // We need to listen for drain events when + // write() returns false. This can make node + // mad at times. + // + this._stream.setMaxListeners(Infinity); + } + else { + throw new Error('Cannot log to file without filename or stream.'); + } + + this.json = options.json !== false; + this.logstash = options.logstash || false; + this.colorize = options.colorize || false; + this.maxsize = options.maxsize || null; + this.rotationFormat = options.rotationFormat || false; + this.zippedArchive = options.zippedArchive || false; + this.maxFiles = options.maxFiles || null; + this.prettyPrint = options.prettyPrint || false; + this.label = options.label || null; + this.timestamp = options.timestamp != null ? options.timestamp : true; + this.eol = options.eol || os.EOL; + this.tailable = options.tailable || false; + this.depth = options.depth || null; + this.showLevel = options.showLevel === undefined ? true : options.showLevel; + this.maxRetries = options.maxRetries || 2; + + if (this.json) { + this.stringify = options.stringify; + } + + // + // Internal state variables representing the number + // of files this instance has created and the current + // size (in bytes) of the current logfile. + // + this._size = 0; + this._created = 0; + this._buffer = []; + this._draining = false; + this._opening = false; + this._failures = 0; + this._archive = null; +}; + +// +// Inherit from `winston.Transport`. +// +util.inherits(File, Transport); + +// +// Expose the name of this Transport on the prototype +// +File.prototype.name = 'file'; + +// +// ### function log (level, msg, [meta], callback) +// #### @level {string} Level at which to log the message. +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Core logging method exposed to Winston. Metadata is optional. +// +File.prototype.log = function (level, msg, meta, callback) { + if (this.silent) { + return callback(null, true); + } + + // + // If failures exceeds maxRetries then we can't access the + // stream. In this case we need to perform a noop and return + // an error. + // + if (this._failures >= this.maxRetries) { + return callback(new Error('Transport is in a failed state.')); + } + + var self = this; + + if (typeof msg !== 'string') { + msg = '' + msg; + } + + var output = common.log({ + level: level, + message: msg, + meta: meta, + json: this.json, + logstash: this.logstash, + colorize: this.colorize, + prettyPrint: this.prettyPrint, + timestamp: this.timestamp, + showLevel: this.showLevel, + stringify: this.stringify, + label: this.label, + depth: this.depth, + formatter: this.formatter, + humanReadableUnhandledException: this.humanReadableUnhandledException + }); + + if (typeof output === 'string') { + output += this.eol; + } + + if (!this.filename) { + // + // If there is no `filename` on this instance then it was configured + // with a raw `WriteableStream` instance and we should not perform any + // size restrictions. + // + this._write(output, callback); + this._size += output.length; + this._lazyDrain(); + } + else { + this.open(function (err) { + if (err) { + // + // If there was an error enqueue the message + // + return self._buffer.push([output, callback]); + } + + self._write(output, callback); + self._size += output.length; + self._lazyDrain(); + }); + } +}; + +// +// ### function _write (data, cb) +// #### @data {String|Buffer} Data to write to the instance's stream. +// #### @cb {function} Continuation to respond to when complete. +// Write to the stream, ensure execution of a callback on completion. +// +File.prototype._write = function(data, callback) { + if (this._isStreams2) { + this._stream.write(data); + return callback && process.nextTick(function () { + callback(null, true); + }); + } + + // If this is a file write stream, we could use the builtin + // callback functionality, however, the stream is not guaranteed + // to be an fs.WriteStream. + var ret = this._stream.write(data); + if (!callback) return; + if (ret === false) { + return this._stream.once('drain', function() { + callback(null, true); + }); + } + process.nextTick(function () { + callback(null, true); + }); +}; + +// +// ### function query (options, callback) +// #### @options {Object} Loggly-like query options for this instance. +// #### @callback {function} Continuation to respond to when complete. +// Query the transport. Options object is optional. +// +File.prototype.query = function (options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + + var file = path.join(this.dirname, this.filename), + options = this.normalizeQuery(options), + buff = '', + results = [], + row = 0; + + var stream = fs.createReadStream(file, { + encoding: 'utf8' + }); + + stream.on('error', function (err) { + if (stream.readable) { + stream.destroy(); + } + if (!callback) return; + return err.code !== 'ENOENT' + ? callback(err) + : callback(null, results); + }); + + stream.on('data', function (data) { + var data = (buff + data).split(/\n+/), + l = data.length - 1, + i = 0; + + for (; i < l; i++) { + if (!options.start || row >= options.start) { + add(data[i]); + } + row++; + } + + buff = data[l]; + }); + + stream.on('close', function () { + if (buff) add(buff, true); + if (options.order === 'desc') { + results = results.reverse(); + } + if (callback) callback(null, results); + }); + + function add(buff, attempt) { + try { + var log = JSON.parse(buff); + if (check(log)) push(log); + } catch (e) { + if (!attempt) { + stream.emit('error', e); + } + } + } + + function push(log) { + if (options.rows && results.length >= options.rows + && options.order != 'desc') { + if (stream.readable) { + stream.destroy(); + } + return; + } + + if (options.fields) { + var obj = {}; + options.fields.forEach(function (key) { + obj[key] = log[key]; + }); + log = obj; + } + + if (options.order === 'desc') { + if (results.length >= options.rows) { + results.shift(); + } + } + results.push(log); + } + + function check(log) { + if (!log) return; + + if (typeof log !== 'object') return; + + var time = new Date(log.timestamp); + if ((options.from && time < options.from) + || (options.until && time > options.until)) { + return; + } + + return true; + } +}; + +// +// ### function stream (options) +// #### @options {Object} Stream options for this instance. +// Returns a log stream for this transport. Options object is optional. +// +File.prototype.stream = function (options) { + var file = path.join(this.dirname, this.filename), + options = options || {}, + stream = new Stream; + + var tail = { + file: file, + start: options.start + }; + + stream.destroy = common.tailFile(tail, function (err, line) { + + if(err){ + return stream.emit('error',err); + } + + try { + stream.emit('data', line); + line = JSON.parse(line); + stream.emit('log', line); + } catch (e) { + stream.emit('error', e); + } + }); + + return stream; +}; + +// +// ### function open (callback) +// #### @callback {function} Continuation to respond to when complete +// Checks to see if a new file needs to be created based on the `maxsize` +// (if any) and the current size of the file used. +// +File.prototype.open = function (callback) { + if (this.opening) { + // + // If we are already attempting to open the next + // available file then respond with a value indicating + // that the message should be buffered. + // + return callback(true); + } + else if (!this._stream || (this.maxsize && this._size >= this.maxsize)) { + // + // If we dont have a stream or have exceeded our size, then create + // the next stream and respond with a value indicating that + // the message should be buffered. + // + callback(true); + return this._createStream(); + } + + this._archive = this.zippedArchive ? this._stream.path : null; + + // + // Otherwise we have a valid (and ready) stream. + // + callback(); +}; + +// +// ### function close () +// Closes the stream associated with this instance. +// +File.prototype.close = function () { + var self = this; + + if (this._stream) { + this._stream.end(); + this._stream.destroySoon(); + + this._stream.once('finish', function () { + self.emit('flush'); + self.emit('closed'); + }); + } +}; + +// +// ### function flush () +// Flushes any buffered messages to the current `stream` +// used by this instance. +// +File.prototype.flush = function () { + var self = this; + + // If nothing to flush, there will be no "flush" event from native stream + // Thus, the "open" event will never be fired (see _createStream.createAndFlush function) + // That means, self.opening will never set to false and no logs will be written to disk + if (!this._buffer.length) { + return self.emit('flush'); + } + + // + // Iterate over the `_buffer` of enqueued messaged + // and then write them to the newly created stream. + // + this._buffer.forEach(function (item) { + var str = item[0], + callback = item[1]; + + process.nextTick(function () { + self._write(str, callback); + self._size += str.length; + }); + }); + + // + // Quickly truncate the `_buffer` once the write operations + // have been started + // + self._buffer.length = 0; + + // + // When the stream has drained we have flushed + // our buffer. + // + self._stream.once('drain', function () { + self.emit('flush'); + self.emit('logged'); + }); +}; + +// +// ### @private function _createStream () +// Attempts to open the next appropriate file for this instance +// based on the common state (such as `maxsize` and `_basename`). +// +File.prototype._createStream = function () { + var self = this; + this.opening = true; + + (function checkFile (target) { + var fullname = path.join(self.dirname, target); + + // + // Creates the `WriteStream` and then flushes any + // buffered messages. + // + function createAndFlush (size) { + if (self._stream) { + self._stream.end(); + self._stream.destroySoon(); + } + + self._size = size; + self.filename = target; + self._stream = fs.createWriteStream(fullname, self.options); + self._isStreams2 = isWritable(self._stream); + self._stream.on('error', function(error){ + if (self._failures < self.maxRetries) { + self._createStream(); + self._failures++; + } + else { + self.emit('error', error); + } + }); + // + // We need to listen for drain events when + // write() returns false. This can make node + // mad at times. + // + self._stream.setMaxListeners(Infinity); + + // + // When the current stream has finished flushing + // then we can be sure we have finished opening + // and thus can emit the `open` event. + // + self.once('flush', function () { + // Because "flush" event is based on native stream "drain" event, + // logs could be written inbetween "self.flush()" and here + // Therefore, we need to flush again to make sure everything is flushed + self.flush(); + + self.opening = false; + self.emit('open', fullname); + }); + // + // Remark: It is possible that in the time it has taken to find the + // next logfile to be written more data than `maxsize` has been buffered, + // but for sensible limits (10s - 100s of MB) this seems unlikely in less + // than one second. + // + self.flush(); + compressFile(); + } + + function compressFile() { + if (self._archive) { + var gzip = zlib.createGzip(); + + var inp = fs.createReadStream(String(self._archive)); + var out = fs.createWriteStream(self._archive + '.gz'); + + inp.pipe(gzip).pipe(out); + + fs.unlink(String(self._archive)); + self._archive = ''; + } + } + + fs.stat(fullname, function (err, stats) { + if (err) { + if (err.code !== 'ENOENT') { + return self.emit('error', err); + } + return createAndFlush(0); + } + + if (!stats || (self.maxsize && stats.size >= self.maxsize)) { + // + // If `stats.size` is greater than the `maxsize` for + // this instance then try again + // + return self._incFile(function() { + checkFile(self._getFile()); + }); + } + + createAndFlush(stats.size); + }); + })(this._getFile()); +}; + + +File.prototype._incFile = function (callback) { + var ext = path.extname(this._basename), + basename = path.basename(this._basename, ext), + oldest, + target; + + if (!this.tailable) { + this._created += 1; + this._checkMaxFilesIncrementing(ext, basename, callback); + } + else { + this._checkMaxFilesTailable(ext, basename, callback); + } +}; + +// +// ### @private function _getFile () +// Gets the next filename to use for this instance +// in the case that log filesizes are being capped. +// +File.prototype._getFile = function () { + var ext = path.extname(this._basename), + basename = path.basename(this._basename, ext); + + // + // Caveat emptor (indexzero): rotationFormat() was broken by design + // when combined with max files because the set of files to unlink + // is never stored. + // + return !this.tailable && this._created + ? basename + (this.rotationFormat ? this.rotationFormat() : this._created) + ext + : basename + ext; +}; + +// +// ### @private function _checkMaxFilesIncrementing () +// Increment the number of files created or +// checked by this instance. +// +File.prototype._checkMaxFilesIncrementing = function (ext, basename, callback) { + var oldest, target, + self = this; + + if (self.zippedArchive) { + self._archive = path.join(self.dirname, basename + + ((self._created === 1) ? '' : self._created-1) + + ext); + } + + + // Check for maxFiles option and delete file + if (!self.maxFiles || self._created < self.maxFiles) { + return callback(); + } + + oldest = self._created - self.maxFiles; + target = path.join(self.dirname, basename + (oldest !== 0 ? oldest : '') + ext + + (self.zippedArchive ? '.gz' : '')); + fs.unlink(target, callback); +}; + +// +// ### @private function _checkMaxFilesTailable () +// +// Roll files forward based on integer, up to maxFiles. +// e.g. if base if file.log and it becomes oversized, roll +// to file1.log, and allow file.log to be re-used. If +// file is oversized again, roll file1.log to file2.log, +// roll file.log to file1.log, and so on. +File.prototype._checkMaxFilesTailable = function (ext, basename, callback) { + var tasks = [], + self = this; + + if (!this.maxFiles) + return; + + for (var x = this.maxFiles - 1; x > 0; x--) { + tasks.push(function (i) { + return function (cb) { + var tmppath = path.join(self.dirname, basename + (i - 1) + ext + + (self.zippedArchive ? '.gz' : '')); + fs.exists(tmppath, function (exists) { + if (!exists) { + return cb(null); + } + + fs.rename(tmppath, path.join(self.dirname, basename + i + ext + + (self.zippedArchive ? '.gz' : '')), cb); + }); + }; + }(x)); + } + + if (self.zippedArchive) { + self._archive = path.join(self.dirname, basename + 1 + ext); + } + async.series(tasks, function (err) { + fs.rename( + path.join(self.dirname, basename + ext), + path.join(self.dirname, basename + 1 + ext), + callback + ); + }); +}; + +// +// ### @private function _lazyDrain () +// Lazily attempts to emit the `logged` event when `this.stream` has +// drained. This is really just a simple mutex that only works because +// Node.js is single-threaded. +// +File.prototype._lazyDrain = function () { + var self = this; + + if (!this._draining && this._stream) { + this._draining = true; + + this._stream.once('drain', function () { + this._draining = false; + self.emit('logged'); + }); + } +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/http.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/http.js new file mode 100644 index 0000000..66a82e0 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/http.js @@ -0,0 +1,240 @@ +var util = require('util'), + winston = require('../../winston'), + http = require('http'), + https = require('https'), + Stream = require('stream').Stream, + Transport = require('./transport').Transport; + +// +// ### function Http (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Http transport object responsible +// for persisting log messages and metadata to a terminal or TTY. +// +var Http = exports.Http = function (options) { + Transport.call(this, options); + options = options || {}; + + this.name = 'http'; + this.ssl = !!options.ssl; + this.host = options.host || 'localhost'; + this.port = options.port; + this.auth = options.auth; + this.path = options.path || ''; + this.agent = options.agent; + + if (!this.port) { + this.port = this.ssl ? 443 : 80; + } +}; + +util.inherits(Http, winston.Transport); + +// +// Expose the name of this Transport on the prototype +// +Http.prototype.name = 'http'; + +// +// ### function _request (options, callback) +// #### @callback {function} Continuation to respond to when complete. +// Make a request to a winstond server or any http server which can +// handle json-rpc. +// +Http.prototype._request = function (options, callback) { + options = options || {}; + + var auth = options.auth || this.auth, + path = options.path || this.path || '', + req; + + delete options.auth; + delete options.path; + + // Prepare options for outgoing HTTP request + req = (this.ssl ? https : http).request({ + host: this.host, + port: this.port, + path: '/' + path.replace(/^\//, ''), + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + agent: this.agent, + auth: (auth) ? auth.username + ':' + auth.password : '' + }); + + req.on('error', callback); + req.on('response', function (res) { + var body = ''; + + res.on('data', function (chunk) { + body += chunk; + }); + + res.on('end', function () { + callback(null, res, body); + }); + + res.resume(); + }); + + req.end(new Buffer(JSON.stringify(options), 'utf8')); +}; + +// +// ### function log (level, msg, [meta], callback) +// #### @level {string} Level at which to log the message. +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Core logging method exposed to Winston. Metadata is optional. +// +Http.prototype.log = function (level, msg, meta, callback) { + var self = this; + + if (typeof meta === 'function') { + callback = meta; + meta = {}; + } + + var options = { + method: 'collect', + params: { + level: level, + message: msg, + meta: meta + } + }; + + if (meta) { + if (meta.path) { + options.path = meta.path; + delete meta.path; + } + + if (meta.auth) { + options.auth = meta.auth; + delete meta.auth; + } + } + + this._request(options, function (err, res) { + if (res && res.statusCode !== 200) { + err = new Error('HTTP Status Code: ' + res.statusCode); + } + + if (err) return callback(err); + + // TODO: emit 'logged' correctly, + // keep track of pending logs. + self.emit('logged'); + + if (callback) callback(null, true); + }); +}; + +// +// ### function query (options, callback) +// #### @options {Object} Loggly-like query options for this instance. +// #### @callback {function} Continuation to respond to when complete. +// Query the transport. Options object is optional. +// +Http.prototype.query = function (options, callback) { + if (typeof options === 'function') { + callback = options; + options = {}; + } + + var self = this, + options = this.normalizeQuery(options); + + options = { + method: 'query', + params: options + }; + + if (options.params.path) { + options.path = options.params.path; + delete options.params.path; + } + + if (options.params.auth) { + options.auth = options.params.auth; + delete options.params.auth; + } + + this._request(options, function (err, res, body) { + if (res && res.statusCode !== 200) { + err = new Error('HTTP Status Code: ' + res.statusCode); + } + + if (err) return callback(err); + + if (typeof body === 'string') { + try { + body = JSON.parse(body); + } catch (e) { + return callback(e); + } + } + + callback(null, body); + }); +}; + +// +// ### function stream (options) +// #### @options {Object} Stream options for this instance. +// Returns a log stream for this transport. Options object is optional. +// +Http.prototype.stream = function (options) { + options = options || {}; + + var self = this, + stream = new Stream, + req, + buff; + + stream.destroy = function () { + req.destroy(); + }; + + options = { + method: 'stream', + params: options + }; + + if (options.params.path) { + options.path = options.params.path; + delete options.params.path; + } + + if (options.params.auth) { + options.auth = options.params.auth; + delete options.params.auth; + } + + req = this._request(options); + buff = ''; + + req.on('data', function (data) { + var data = (buff + data).split(/\n+/), + l = data.length - 1, + i = 0; + + for (; i < l; i++) { + try { + stream.emit('log', JSON.parse(data[i])); + } catch (e) { + stream.emit('error', e); + } + } + + buff = data[l]; + }); + + req.on('error', function (err) { + stream.emit('error', err); + }); + + return stream; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/memory.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/memory.js new file mode 100644 index 0000000..e4f562e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/memory.js @@ -0,0 +1,89 @@ +var events = require('events'), + util = require('util'), + common = require('../common'), + Transport = require('./transport').Transport; + +// +// ### function Memory (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Memory transport object responsible +// for persisting log messages and metadata to a memory array of messages. +// +var Memory = exports.Memory = function (options) { + Transport.call(this, options); + options = options || {}; + + this.errorOutput = []; + this.writeOutput = []; + + this.json = options.json || false; + this.colorize = options.colorize || false; + this.prettyPrint = options.prettyPrint || false; + this.timestamp = typeof options.timestamp !== 'undefined' ? options.timestamp : false; + this.showLevel = options.showLevel === undefined ? true : options.showLevel; + this.label = options.label || null; + this.depth = options.depth || null; + + if (this.json) { + this.stringify = options.stringify || function (obj) { + return JSON.stringify(obj, null, 2); + }; + } +}; + +// +// Inherit from `winston.Transport`. +// +util.inherits(Memory, Transport); + +// +// Expose the name of this Transport on the prototype +// +Memory.prototype.name = 'memory'; + +// +// ### function log (level, msg, [meta], callback) +// #### @level {string} Level at which to log the message. +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Core logging method exposed to Winston. Metadata is optional. +// +Memory.prototype.log = function (level, msg, meta, callback) { + if (this.silent) { + return callback(null, true); + } + + var self = this, + output; + + output = common.log({ + colorize: this.colorize, + json: this.json, + level: level, + message: msg, + meta: meta, + stringify: this.stringify, + timestamp: this.timestamp, + prettyPrint: this.prettyPrint, + raw: this.raw, + label: this.label, + depth: this.depth, + formatter: this.formatter, + humanReadableUnhandledException: this.humanReadableUnhandledException + }); + + if (level === 'error' || level === 'debug') { + this.errorOutput.push(output); + } else { + this.writeOutput.push(output); + } + + self.emit('logged'); + callback(null, true); +}; + +Memory.prototype.clearLogs = function () { + this.errorOutput = []; + this.writeOutput = []; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/transport.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/transport.js new file mode 100644 index 0000000..d279d00 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/lib/winston/transports/transport.js @@ -0,0 +1,135 @@ +/* + * transport.js: Base Transport object for all Winston transports. + * + * (C) 2010 Charlie Robbins + * MIT LICENCE + * + */ + +var events = require('events'), + util = require('util'); + +// +// ### function Transport (options) +// #### @options {Object} Options for this instance. +// Constructor function for the Tranport object responsible +// base functionality for all winston transports. +// +var Transport = exports.Transport = function (options) { + events.EventEmitter.call(this); + + options = options || {}; + this.silent = options.silent || false; + this.raw = options.raw || false; + this.name = options.name || this.name; + this.formatter = options.formatter; + + // + // Do not set a default level. When `level` is falsey on any + // `Transport` instance, any `Logger` instance uses the + // configured level (instead of the Transport level) + // + this.level = options.level; + + this.handleExceptions = options.handleExceptions || false; + this.exceptionsLevel = options.exceptionsLevel || 'error'; + this.humanReadableUnhandledException = options.humanReadableUnhandledException || false; +}; + +// +// Inherit from `events.EventEmitter`. +// +util.inherits(Transport, events.EventEmitter); + +// +// ### function formatQuery (query) +// #### @query {string|Object} Query to format +// Formats the specified `query` Object (or string) to conform +// with the underlying implementation of this transport. +// +Transport.prototype.formatQuery = function (query) { + return query; +}; + +// +// ### function normalizeQuery (query) +// #### @options {string|Object} Query to normalize +// Normalize options for query +// +Transport.prototype.normalizeQuery = function (options) { + // + // Use options similar to loggly. + // [See Loggly Search API](http://wiki.loggly.com/retrieve_events#optional) + // + + options = options || {}; + + // limit + options.rows = options.rows || options.limit || 10; + + // starting row offset + options.start = options.start || 0; + + // now + options.until = options.until || new Date; + if (typeof options.until !== 'object') { + options.until = new Date(options.until); + } + + // now - 24 + options.from = options.from || (options.until - (24 * 60 * 60 * 1000)); + if (typeof options.from !== 'object') { + options.from = new Date(options.from); + } + + + // 'asc' or 'desc' + options.order = options.order || 'desc'; + + // which fields to select + options.fields = options.fields; + + return options; +}; + +// +// ### function formatResults (results, options) +// #### @results {Object|Array} Results returned from `.query`. +// #### @options {Object} **Optional** Formatting options +// Formats the specified `results` with the given `options` accordinging +// to the implementation of this transport. +// +Transport.prototype.formatResults = function (results, options) { + return results; +}; + +// +// ### function logException (msg, meta, callback) +// #### @msg {string} Message to log +// #### @meta {Object} **Optional** Additional metadata to attach +// #### @callback {function} Continuation to respond to when complete. +// Logs the specified `msg`, `meta` and responds to the callback once the log +// operation is complete to ensure that the event loop will not exit before +// all logging has completed. +// +Transport.prototype.logException = function (msg, meta, callback) { + var self = this, + called; + + if (this.silent) { + return callback(); + } + + function onComplete () { + if (!called) { + called = true; + self.removeListener('logged', onComplete); + self.removeListener('error', onComplete); + callback(); + } + } + + this.once('logged', onComplete); + this.once('error', onComplete); + this.log(self.exceptionsLevel, msg, meta, function () { }); +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/package.json new file mode 100644 index 0000000..eb23b76 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/package.json @@ -0,0 +1,125 @@ +{ + "_args": [ + [ + { + "raw": "winston@2.3.1", + "scope": null, + "escapedName": "winston", + "name": "winston", + "rawSpec": "2.3.1", + "spec": "2.3.1", + "type": "version" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources" + ] + ], + "_from": "winston@2.3.1", + "_id": "winston@2.3.1", + "_inCache": true, + "_location": "/winston", + "_nodeVersion": "4.7.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/winston-2.3.1.tgz_1484937497945_0.36467634653672576" + }, + "_npmUser": { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + "_npmVersion": "3.10.5", + "_phantomChildren": {}, + "_requested": { + "raw": "winston@2.3.1", + "scope": null, + "escapedName": "winston", + "name": "winston", + "rawSpec": "2.3.1", + "spec": "2.3.1", + "type": "version" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/winston/-/winston-2.3.1.tgz", + "_shasum": "0b48420d978c01804cf0230b648861598225a119", + "_shrinkwrap": null, + "_spec": "winston@2.3.1", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources", + "author": { + "name": "Charlie Robbins", + "email": "charlie.robbins@gmail.com" + }, + "bugs": { + "url": "https://github.com/winstonjs/winston/issues" + }, + "dependencies": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "description": "A multi-transport async logging library for Node.js", + "devDependencies": { + "cross-spawn-async": "^2.0.0", + "hock": "1.x.x", + "std-mocks": "~1.0.0", + "vows": "0.7.x" + }, + "directories": {}, + "dist": { + "shasum": "0b48420d978c01804cf0230b648861598225a119", + "tarball": "https://registry.npmjs.org/winston/-/winston-2.3.1.tgz" + }, + "engines": { + "node": ">= 0.10.0" + }, + "gitHead": "fba37b44f7875ba7c460df81fad27d6a941ed213", + "homepage": "https://github.com/winstonjs/winston#readme", + "keywords": [ + "winston", + "logging", + "sysadmin", + "tools" + ], + "license": "MIT", + "main": "./lib/winston", + "maintainers": [ + { + "name": "indexzero", + "email": "charlie.robbins@gmail.com" + }, + { + "name": "chjj", + "email": "chjjeffrey@gmail.com" + }, + { + "name": "jcrugzz", + "email": "jcrugzz@gmail.com" + }, + { + "name": "pose", + "email": "albertopose@gmail.com" + }, + { + "name": "v1", + "email": "info@3rd-Eden.com" + }, + { + "name": "3rdeden", + "email": "npm@3rd-Eden.com" + } + ], + "name": "winston", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/winstonjs/winston.git" + }, + "scripts": { + "test": "vows --spec --isolate" + }, + "version": "2.3.1" +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/helpers.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/helpers.js new file mode 100644 index 0000000..8575fb6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/helpers.js @@ -0,0 +1,256 @@ +/* + * helpers.js: Test helpers for winston + * + * (C) 2010 Charlie Robbins + * MIT LICENSE + * + */ + +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + spawn = require('child_process').spawn, + util = require('util'), + vows = require('vows'), + winston = require('../lib/winston'); + +var helpers = exports; + +helpers.size = function (obj) { + var size = 0, key; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + size++; + } + } + + return size; +}; + +helpers.tryUnlink = function (file) { + try { fs.unlinkSync(file) } + catch (ex) { } +}; + +helpers.assertDateInfo = function (info) { + assert.isNumber(Date.parse(info)); +}; + +helpers.assertProcessInfo = function (info) { + assert.isNumber(info.pid); + assert.isNumber(info.uid); + assert.isNumber(info.gid); + assert.isString(info.cwd); + assert.isString(info.execPath); + assert.isString(info.version); + assert.isArray(info.argv); + assert.isObject(info.memoryUsage); +}; + +helpers.assertOsInfo = function (info) { + assert.isArray(info.loadavg); + assert.isNumber(info.uptime); +}; + +helpers.assertTrace = function (trace) { + trace.forEach(function (site) { + assert.isTrue(!site.column || typeof site.column === 'number'); + assert.isTrue(!site.line || typeof site.line === 'number'); + assert.isTrue(!site.file || typeof site.file === 'string'); + assert.isTrue(!site.method || typeof site.method === 'string'); + assert.isTrue(!site.function || typeof site.function === 'string'); + assert.isTrue(typeof site.native === 'boolean'); + }); +}; + +helpers.assertLogger = function (logger, level) { + assert.instanceOf(logger, winston.Logger); + assert.isFunction(logger.log); + assert.isFunction(logger.add); + assert.isFunction(logger.remove); + assert.equal(logger.level, level || "info"); + Object.keys(logger.levels).forEach(function (method) { + assert.isFunction(logger[method]); + }); +}; + +helpers.assertConsole = function (transport) { + assert.instanceOf(transport, winston.transports.Console); + assert.isFunction(transport.log); +}; + +helpers.assertMemory = function (transport) { + assert.instanceOf(transport, winston.transports.Memory); + assert.isFunction(transport.log); +}; + +helpers.assertFile = function (transport) { + assert.instanceOf(transport, winston.transports.File); + assert.isFunction(transport.log); +}; + +helpers.assertCouchdb = function (transport) { + assert.instanceOf(transport, winston.transports.Couchdb); + assert.isFunction(transport.log); +}; + +helpers.assertHandleExceptions = function (options) { + return { + topic: function () { + var that = this, + child = spawn('node', [options.script]); + + helpers.tryUnlink(options.logfile); + child.on('exit', function () { + fs.readFile(options.logfile, that.callback); + }); + }, + "should save the error information to the specified file": function (err, data) { + assert.isTrue(!err); + data = JSON.parse(data); + + assert.isObject(data); + helpers.assertProcessInfo(data.process); + helpers.assertOsInfo(data.os); + helpers.assertTrace(data.trace); + if (options.message) { + assert.equal('uncaughtException: ' + options.message, data.message); + } + } + }; +}; + +helpers.assertFailedTransport = function (transport) { + return { + topic: function () { + var self = this; + transport.on('error', function(emitErr){ + transport.log('error', 'test message 2', {}, function(logErr, logged){ + self.callback(emitErr, logErr); + }); + }); + transport.log('error', 'test message'); + }, + "should emit an error": function (emitErr, logErr) { + assert.instanceOf(emitErr, Error); + assert.equal(emitErr.code, 'ENOENT'); + }, + "should enter noop failed state": function (emitErr, logErr) { + assert.instanceOf(logErr, Error); + assert.equal(transport._failures, transport.maxRetries); + } + }; +}; + +helpers.testNpmLevels = function (transport, assertMsg, assertFn) { + return helpers.testLevels(winston.config.npm.levels, transport, assertMsg, assertFn); +}; + +helpers.testSyslogLevels = function (transport, assertMsg, assertFn) { + return helpers.testLevels(winston.config.syslog.levels, transport, assertMsg, assertFn); +}; + +helpers.testLevels = function (levels, transport, assertMsg, assertFn) { + var tests = {}; + + Object.keys(levels).forEach(function (level) { + var test = { + topic: function () { + transport.log(level, 'test message', {}, this.callback.bind(this, null)); + } + }; + + test[assertMsg] = assertFn; + tests['with the ' + level + ' level'] = test; + }); + + var metadatatest = { + topic: function () { + transport.log('info', 'test message', { metadata: true }, this.callback.bind(this, null)); + } + }; + + metadatatest[assertMsg] = assertFn; + tests['when passed metadata'] = metadatatest; + + var primmetadatatest = { + topic: function () { + transport.log('info', 'test message', 'metadata', this.callback.bind(this, null)); + } + }; + + primmetadatatest[assertMsg] = assertFn; + tests['when passed primitive metadata'] = primmetadatatest; + + var circmetadata = { }; + circmetadata['metadata'] = circmetadata; + + var circmetadatatest = { + topic: function () { + transport.log('info', 'test message', circmetadata, this.callback.bind(this, null)); + } + }; + + circmetadatatest[assertMsg] = assertFn; + tests['when passed circular metadata'] = circmetadatatest; + + return tests; +}; + +helpers.assertOptionsThrow = function (options, errMsg) { + return function () { + assert.throws( + function () { + try { + new (winston.transports.Console)(options); + } catch (err) { + throw(err); + } + }, + new RegExp('^' + errMsg.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + '$') + ); + } +}; + +helpers.assertStderrLevels = function (transport, stderrLevels) { + return function () { + assert.equal( + JSON.stringify(Object.keys(transport.stderrLevels).sort()), + JSON.stringify(stderrLevels.sort()) + ); + } +}; + +helpers.testLoggingToStreams = function (levels, transport, stderrLevels, stdMocks) { + return { + topic: function () { + stdMocks.use(); + transport.showLevel = true; + Object.keys(levels).forEach(function (level) { + transport.log( + level, + level + ' should go to ' + (stderrLevels.indexOf(level) > -1 ? 'stderr' : 'stdout'), + {}, + function () {} + ); + }); + var output = stdMocks.flush(); + stdMocks.restore(); + this.callback(null, output, levels); + }, + "output should go to the appropriate streams": function (ign, output, levels) { + var outCount = 0, + errCount = 0; + Object.keys(levels).forEach(function (level) { + var line; + if (stderrLevels.indexOf(level) > -1) { + line = output.stderr[errCount++]; + assert.equal(line, level + ': ' + level + ' should go to stderr\n'); + } else { + line = output.stdout[outCount++]; + assert.equal(line, level + ': ' + level + ' should go to stdout\n'); + } + }); + } + } +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/console-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/console-test.js new file mode 100644 index 0000000..de868b3 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/console-test.js @@ -0,0 +1,202 @@ +/* + * console-test.js: Tests for instances of the Console transport + * + * (C) 2010 Charlie Robbins + * MIT LICENSE + * + */ + +var path = require('path'), + vows = require('vows'), + assert = require('assert'), + winston = require('../../lib/winston'), + helpers = require('../helpers'), + stdMocks = require('std-mocks'); + +var npmTransport = new (winston.transports.Console)(), + syslogTransport = new (winston.transports.Console)({ levels: winston.config.syslog.levels }), + alignTransport = new (winston.transports.Console)({ showLevel: true, align: true }), + defaultTransport = new (winston.transports.Console)(), + rawTransport = new (winston.transports.Console)({ level: 'verbose', raw: true }), + debugStdoutTransport = new (winston.transports.Console)({ debugStdout: true }), + stderrLevelsTransport = new (winston.transports.Console)({ stderrLevels: ['info', 'warn'] }), + customLevels = { + alpha: 0, + beta: 1, + gamma: 2, + delta: 3, + epsilon: 4, + }, + customLevelsAndStderrTransport = new (winston.transports.Console)({ + levels: customLevels, + stderrLevels: ['delta', 'epsilon'] + }), + noStderrTransport = new (winston.transports.Console)({ stderrLevels: [] }); + +vows.describe('winston/transports/console').addBatch({ + "An instance of the Console Transport": { + "with showLevel off": { + topic : function() { + npmTransport.showLevel = false; + stdMocks.use(); + npmTransport.log('info', 'Le message', { meta: true }, this.callback); + }, + "should not have level prepended": function () { + stdMocks.restore(); + var output = stdMocks.flush(), + line = output.stdout[0]; + + assert.equal(line, 'Le message meta=true\n'); + } + } + } +}).addBatch({ + "An instance of the Console Transport": { + "with showLevel on": { + topic : function() { + npmTransport.showLevel = true; + stdMocks.use(); + npmTransport.log('info', ''); + }, + "should have level prepended": function () { + stdMocks.restore(); + var output = stdMocks.flush(), + line = output.stdout[0]; + + assert.equal(line, 'info: \n'); + } + }, + } +}).addBatch({ + "An instance of the Console Transport": { + "with npm levels": { + "should have the proper methods defined": function () { + helpers.assertConsole(npmTransport); + }, + "the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + }, + "with syslog levels": { + "should have the proper methods defined": function () { + helpers.assertConsole(syslogTransport); + }, + "the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + }, + "with end-of-line": { + topic : function() { + npmTransport.eol = 'X'; + stdMocks.use(); + npmTransport.log('info', 'Le message', { meta: true }, this.callback); + }, + "should have end-of-line character appended": function () { + stdMocks.restore(); + var output = stdMocks.flush(), + line = output.stdout[0]; + console.dir(line); + + assert.equal(line, 'info: Le message meta=trueX'); + } + } + } +}).addBatch({ + "An instance of the Console Transport with the align option on": { + topic : function() { + stdMocks.use(); + alignTransport.log('info', ''); + }, + "should have logs aligned": function () { + stdMocks.restore(); + var output = stdMocks.flush(), + line = output.stdout[0]; + + assert.equal(line, 'info\011: \n'); + } + } +}).addBatch({ + "with align off": { + topic : function() { + alignTransport.align = false; + stdMocks.use(); + alignTransport.log('info', ''); + }, + "should not have logs aligned": function () { + stdMocks.restore(); + var output = stdMocks.flush(), + line = output.stdout[0]; + + assert.equal(line, 'info: \n'); + } + } +}).addBatch({ + 'An instance of a raw Console transport': { + 'logging to stdout': { + topic: function () { + stdMocks.use(); + rawTransport.log('verbose', 'hello there'); + }, 'should output json with message property': function () { + stdMocks.restore(); + var output = stdMocks.flush(); + assert.ok(output.stdout[0].indexOf('"message":"hello there"') > -1); + } + } + } +}).addBatch({ + "An instance of the Console Transport with no options": { + "should set stderrLevels to 'error' and 'debug' by default": helpers.assertStderrLevels( + defaultTransport, + ['error', 'debug'] + ), + "should log only 'error' and 'debug' to stderr": helpers.testLoggingToStreams( + winston.config.npm.levels, defaultTransport, ['debug', 'error'], stdMocks + ) + } +}).addBatch({ + "An instance of the Console Transport with debugStdout set": { + "should throw an Error if stderrLevels is set": helpers.assertOptionsThrow( + { debugStdout: true, stderrLevels: ['debug'] }, + "Error: Cannot set debugStdout and stderrLevels together" + ), + "should set stderrLevels to 'error' by default": helpers.assertStderrLevels( + debugStdoutTransport, + ['error'] + ), + "should log only the 'error' level to stderr": helpers.testLoggingToStreams( + winston.config.npm.levels, debugStdoutTransport, ['error'], stdMocks + ) + } +}).addBatch({ + "An instance of the Console Transport with stderrLevels set": { + "should throw an Error if stderrLevels is set but not an Array": helpers.assertOptionsThrow( + { debugStdout: false, stderrLevels: new String('Not an Array') }, + "Error: Cannot set stderrLevels to type other than Array" + ), + "should throw an Error if stderrLevels contains non-string elements": helpers.assertOptionsThrow( + { debugStdout: false, stderrLevels: ["good", /^invalid$/, "valid"] }, + "Error: Cannot have non-string elements in stderrLevels Array" + ), + "should correctly set stderrLevels": helpers.assertStderrLevels( + stderrLevelsTransport, + ['info', 'warn'] + ), + "should log only the levels in stderrLevels to stderr": helpers.testLoggingToStreams( + winston.config.npm.levels, stderrLevelsTransport, ['info', 'warn'], stdMocks + ) + } +}).addBatch({ + "An instance of the Console Transport with stderrLevels set to an empty array": { + "should log only to stdout, and not to stderr": helpers.testLoggingToStreams( + winston.config.npm.levels, noStderrTransport, [], stdMocks + ) + } +}).addBatch({ + "An instance of the Console Transport with custom levels and stderrLevels set": { + "should log only the levels in stderrLevels to stderr": helpers.testLoggingToStreams( + customLevels, customLevelsAndStderrTransport, ['delta', 'epsilon'], stdMocks + ) + } +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-archive-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-archive-test.js new file mode 100644 index 0000000..d076ce0 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-archive-test.js @@ -0,0 +1,83 @@ +/* + * file-archive-test.js: Tests for instances of the File transport setting the archive option, + * + * (C) 2015 Nimrod Becker + * MIT LICENSE + * + */ + +var assert = require('assert'), + exec = require('child_process').exec, + fs = require('fs'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +var archiveTransport = new winston.transports.File({ + timestamp: true, + json: false, + zippedArchive: true, + tailable: true, + filename: 'testarchive.log', + dirname: path.join(__dirname, '..', 'fixtures', 'logs'), + maxsize: 4096, + maxFiles: 3 +}); + +function data(ch) { + return new Array(1018).join(String.fromCharCode(65 + ch)); +} + +function logKbytes(kbytes, txt) { + // + // With no timestamp and at the info level, + // winston adds exactly 7 characters: + // [info](4)[ :](2)[\n](1) + // + for (var i = 0; i < kbytes; i++) { + archiveTransport.log('info', data(txt), null, function() {}); + } +} + +vows.describe('winston/transports/file/zippedArchive').addBatch({ + "An instance of the File Transport with tailable true": { + "when created archived files are rolled": { + topic: function() { + var that = this, + created = 0; + + archiveTransport.on('logged', function() { + if (++created === 6) { + return that.callback(); + } + + logKbytes(4, created); + }); + + logKbytes(4, created); + }, + "should be only 3 files called testarchive.log, testarchive1.log.gz and testarchive2.log.gz": function() { + //Give the archive a little time to settle + // setTimeout(function() { + for (var num = 0; num < 6; num++) { + var file = !num ? 'testarchive.log' : 'testarchive' + num + '.log.gz', + fullpath = path.join(__dirname, '..', 'fixtures', 'logs', file); + + // There should be no files with that name + if (num >= 3) { + assert.throws(function() { + fs.statSync(fullpath); + }, Error); + } else { + // The other files should exist + assert.doesNotThrow(function() { + fs.statSync(fullpath); + }, Error); + } + } + //},5000); + }, + } + }, +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxfiles-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxfiles-test.js new file mode 100644 index 0000000..62564a2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxfiles-test.js @@ -0,0 +1,102 @@ +/* + * file-maxfiles-test.js: Tests for instances of the File transport setting the max file size, + * and setting a number for max files created. + * maxSize * maxFiles = total storage used by winston. + * + * (C) 2011 Daniel Aristizabal + * MIT LICENSE + * + */ + +var assert = require('assert'), + exec = require('child_process').exec, + fs = require('fs'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +var maxfilesTransport = new winston.transports.File({ + timestamp: false, + json: false, + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxfiles.log'), + maxsize: 4096, + maxFiles: 3 +}); + +vows.describe('winston/transports/file/maxfiles').addBatch({ + "An instance of the File Transport": { + "when passed a valid filename": { + topic: maxfilesTransport, + "should be a valid transporter": function (transportTest) { + helpers.assertFile(transportTest); + }, + "should set the maxFiles option correctly": function (transportTest) { + assert.isNumber(transportTest.maxFiles); + } + }, + "when delete old test files": { + topic: function () { + exec('rm -rf ' + path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxfiles*'), this.callback); + }, + "and when passed more files than the maxFiles": { + topic: function () { + var that = this, + created = 0; + + function data(ch) { + return new Array(1018).join(String.fromCharCode(65 + ch)); + }; + + function logKbytes(kbytes, txt) { + // + // With no timestamp and at the info level, + // winston adds exactly 7 characters: + // [info](4)[ :](2)[\n](1) + // + for (var i = 0; i < kbytes; i++) { + maxfilesTransport.log('info', data(txt), null, function () { }); + } + } + + maxfilesTransport.on('logged', function () { + if (++created === 6) { + return that.callback(); + } + + logKbytes(4, created); + }); + + logKbytes(4, created); + }, + "should be only 3 files called 5.log, 4.log and 3.log": function () { + for (var num = 0; num < 6; num++) { + var file = !num ? 'testmaxfiles.log' : 'testmaxfiles' + num + '.log', + fullpath = path.join(__dirname, '..', 'fixtures', 'logs', file); + + // There should be no files with that name + if (num >= 0 && num < 3) { + assert.throws(function () { + fs.statSync(fullpath); + }, Error); + } else { + // The other files should be exist + assert.doesNotThrow(function () { + fs.statSync(fullpath); + }, Error); + } + } + }, + "should have the correct content": function () { + ['D', 'E', 'F'].forEach(function (name, inx) { + var counter = inx + 3, + logsDir = path.join(__dirname, '..', 'fixtures', 'logs'), + content = fs.readFileSync(path.join(logsDir, 'testmaxfiles' + counter + '.log'), 'utf-8'); + // The content minus the 7 characters added by winston + assert.lengthOf(content.match(new RegExp(name, 'g')), 4068); + }); + } + } + } + } +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxsize-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxsize-test.js new file mode 100644 index 0000000..7d20e08 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-maxsize-test.js @@ -0,0 +1,82 @@ +/* + * file-test.js: Tests for instances of the File transport + * + * (C) 2010 Charlie Robbins + * MIT LICENSE + * + */ + +var assert = require('assert'), + exec = require('child_process').exec, + fs = require('fs'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +var maxsizeTransport = new winston.transports.File({ + timestamp: false, + json: false, + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxsize.log'), + maxsize: 4096 +}); + +vows.describe('winston/transports/file/maxsize').addBatch({ + "An instance of the File Transport": { + "when passed a valid filename": { + "the log() method": { + topic: function () { + exec('rm -rf ' + path.join(__dirname, '..', 'fixtures', 'logs', 'testmaxsize*'), this.callback); + }, + "when passed more than the maxsize": { + topic: function () { + var that = this, + data = new Array(1018).join('-'); + + // + // Setup a list of files which we will later stat. + // + that.files = []; + + function logKbytes (kbytes) { + // + // With no timestamp and at the info level, + // winston adds exactly 7 characters: + // [info](4)[ :](2)[\n](1) + // + for (var i = 0; i < kbytes; i++) { + maxsizeTransport.log('info', data, null, function () { }); + } + } + + maxsizeTransport.on('open', function (file) { + var match = file.match(/(\d+)\.log$/), + count = match ? match[1] : 0; + + that.files.push(file); + + if (that.files.length === 5) { + return that.callback(); + } + + logKbytes(4); + }); + + logKbytes(4); + }, + "should create multiple files correctly": function () { + this.files.forEach(function (file) { + try { + var stats = fs.statSync(file); + assert.equal(stats.size, 4096); + } + catch (ex) { + assert.isNull(ex); + } + }); + } + } + } + } + } +}).export(module); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-open-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-open-test.js new file mode 100644 index 0000000..15427a0 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-open-test.js @@ -0,0 +1,57 @@ +/* + * file-open-test.js: Tests for File transport "open" event + * + * (C) 2014 William Wong + * MIT LICENSE + * + */ + +var assert = require('assert'), + fs = require('fs'), + os = require('os'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'); + +vows.describe('winston/transports/file').addBatch({ + 'An instance of the File Transport': { + topic: function () { + var callback = this.callback.bind(this), + logPath = path.resolve(__dirname, '../fixtures/logs/file-open-test.log'); + + try { + fs.unlinkSync(logPath); + } catch (ex) { + if (ex && ex.code !== 'ENOENT') { return callback(ex); } + } + + var fileTransport = new (winston.transports.File)({ + filename: logPath + }), + logger = new (winston.Logger)({ + transports: [fileTransport] + }), + timeline = {}; + + fileTransport.open(function () { + timeline.open = Date.now(); + + setTimeout(function () { + logger.info('Hello, World!', function () { + timeline.logged = Date.now(); + }); + }, 100); + + setTimeout(function () { + callback(null, timeline); + }, 1000); + }); + }, + 'should fire "open" event': function (results) { + assert.isTrue(!!results.open); + }, + 'should fire "logged" event': function (results) { + assert.isTrue(!!results.logged); + } + } +}).export(module); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-stress-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-stress-test.js new file mode 100644 index 0000000..8c4dcb9 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-stress-test.js @@ -0,0 +1,72 @@ +/* + * file-stress-test.js: Tests for stressing File transport + * + * (C) 2014 William Wong + * MIT LICENSE + * + */ + +var assert = require('assert'), + fs = require('fs'), + os = require('os'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'); + +vows.describe('winston/transports/file').addBatch({ + 'A stressed instance of the File Transport': { + topic: function () { + var callback = this.callback.bind(this), + logPath = path.resolve(__dirname, '../fixtures/logs/file-stress-test.log'); + + try { + fs.unlinkSync(logPath); + } catch (ex) { + if (ex && ex.code !== 'ENOENT') { return callback(ex); } + } + + var fileTransport = new (winston.transports.File)({ + filename: logPath + }), + logger = new (winston.Logger)({ + transports: [fileTransport] + }); + + fileTransport.on('open', function () { + setTimeout(function () { + clearInterval(interval); + + logger.query({ order: 'asc' }, function (err, results) { + callback(null, results); + }); + }, 100); + }); + + var logIndex = 0, + interval = setInterval(function () { + logger.info(++logIndex); + stress(200); + }, 0); + + logger.info(++logIndex); + stress(200); + + function stress(duration) { + var startTime = Date.now(); + + while (Date.now() - startTime < duration) { + Math.sqrt(Math.PI); + } + } + }, + 'should not skip any log lines': function (results) { + var testIndex = 0; + + results.file.forEach(function (log) { + if (+log.message !== ++testIndex) { + throw new Error('Number skipped'); + } + }); + } + } +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-tailrolling-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-tailrolling-test.js new file mode 100644 index 0000000..60a0674 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-tailrolling-test.js @@ -0,0 +1,92 @@ +var assert = require('assert'), + fs = require('fs'), + path = require('path'), + vows = require('vows'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +var maxfilesTransport = new winston.transports.File({ + timestamp: false, + json: false, + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testtailrollingfiles.log'), + maxsize: 4096, + maxFiles: 3, + tailable: true +}); + +process.on('uncaughtException', function (err) { + console.log('caught exception'); + console.error(err); +}); + +vows.describe('winston/transports/file/tailrolling').addBatch({ + "An instance of the File Transport": { + "when delete old test files": { + topic: function () { + var logs = path.join(__dirname, '..', 'fixtures', 'logs'); + fs.readdirSync(logs).forEach(function (file) { + if (~file.indexOf('testtailrollingfiles')) { + fs.unlinkSync(path.join(logs, file)); + } + }); + + this.callback(); + }, + "and when passed more files than the maxFiles": { + topic: function () { + var that = this, + created = 0; + + function data(ch) { + return new Array(1018).join(String.fromCharCode(65 + ch)); + }; + + function logKbytes(kbytes, txt) { + // + // With no timestamp and at the info level, + // winston adds exactly 7 characters: + // [info](4)[ :](2)[\n](1) + // + for (var i = 0; i < kbytes; i++) { + maxfilesTransport.log('info', data(txt), null, function () { }); + } + } + + maxfilesTransport.on('logged', function () { + if (++created == 4) { + return that.callback(); + } + + logKbytes(4, created); + }); + + logKbytes(4, created); + }, + "should be 3 log files, base to maxFiles - 1": function () { + var file, fullpath; + for (var num = 0; num < 4; num++) { + file = !num ? 'testtailrollingfiles.log' : 'testtailrollingfiles' + num + '.log'; + fullpath = path.join(__dirname, '..', 'fixtures', 'logs', file); + + if (num == 3) { + return assert.ok(!fs.existsSync(fullpath)); + } + + assert.ok(fs.existsSync(fullpath)); + } + + return false; + }, + "should have files in correct order": function () { + var file, fullpath, content; + ['D', 'C', 'B'].forEach(function (letter, i) { + file = !i ? 'testtailrollingfiles.log' : 'testtailrollingfiles' + i + '.log'; + content = fs.readFileSync(path.join(__dirname, '..', 'fixtures', 'logs', file), 'ascii'); + + assert.lengthOf(content.match(new RegExp(letter, 'g')), 4068); + }); + } + } + } + } +}).export(module); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-test.js new file mode 100644 index 0000000..e6f6b3a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/file-test.js @@ -0,0 +1,134 @@ +/* + * file-test.js: Tests for instances of the File transport + * + * (C) 2010 Charlie Robbins + * MIT LICENSE + * + */ + +var path = require('path'), + vows = require('vows'), + fs = require('fs'), + assert = require('assert'), + winston = require('../../lib/winston'), + stdMocks = require('std-mocks'), + helpers = require('../helpers'); + +var transport = require('./transport'); + +var stream = fs.createWriteStream( + path.join(__dirname, '..', 'fixtures', 'logs', 'testfile.log') + ), + fileTransport = new (winston.transports.File)({ + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testfilename.log') + }), + failedFileTransport = new (winston.transports.File)({ + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'dir404', 'testfile.log') + }), + streamTransport = new (winston.transports.File)({ stream: stream }); + +vows.describe('winston/transports/file').addBatch({ + "An instance of the File Transport": { + "when passed a valid filename": { + "should have the proper methods defined": function () { + helpers.assertFile(fileTransport); + }, + "the log() method": helpers.testNpmLevels(fileTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + }, + "when passed an invalid filename": { + "should have proper methods defined": function () { + helpers.assertFile(failedFileTransport); + }, + "should enter noop failed state": function () { + helpers.assertFailedTransport(failedFileTransport); + } + }, + "when passed a valid file stream": { + "should have the proper methods defined": function () { + helpers.assertFile(streamTransport); + }, + "the log() method": helpers.testNpmLevels(streamTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + }, + "streaming to stdout": { + topic: function () { + var transport = new (winston.transports.File)({ + stream: process.stdout, timestamp: false, json: false + }); + stdMocks.use(); + return transport; + }, + "with showLevel off": { + topic: function (stdoutStreamTransport) { + stdoutStreamTransport.showLevel = false; + stdoutStreamTransport.log('info', '', undefined, this.callback); + }, + "should not have level prepended": function () { + var output = stdMocks.flush(), + line = output.stdout[0]; + + assert.equal(line, '\n'); + } + }, + // there would be a "with showLevel on" here but I think it's a bug in + // this version of vows. ugprading causes even more problems + teardown: function() { + stdMocks.restore(); + } + } + } +}).addBatch({ + "These tests have a non-deterministic end": { + topic: function () { + setTimeout(this.callback, 200); + }, + "and this should be fixed before releasing": function () { + assert.isTrue(true); + } + } +}).addBatch({ + "Error object in metadata #610": { + topic: function () { + var myErr = new Error("foo"); + + fileTransport.log('info', 'test message', myErr, this.callback.bind(this, null, myErr)); + }, + "should not be modified": function (err, myErr) { + assert.equal(myErr.message, "foo"); + // Not sure if this is the best possible way to check if additional props appeared + assert.deepEqual(Object.getOwnPropertyNames(myErr), Object.getOwnPropertyNames(new Error("foo"))); + } + } +}).addBatch({ + "Date object in metadata": { + topic: function () { + var obj = new Date(1000); + + fileTransport.log('info', 'test message', obj, this.callback.bind(this, null, obj)); + }, + "should not be modified": function (err, obj) { + // Not sure if this is the best possible way to check if additional props appeared + assert.deepEqual(Object.getOwnPropertyNames(obj), Object.getOwnPropertyNames(new Date())); + } + } +}).addBatch({ + "Plain object in metadata": { + topic: function () { + var obj = { message: "foo" }; + + fileTransport.log('info', 'test message', obj, this.callback.bind(this, null, obj)); + }, + "should not be modified": function (err, obj) { + assert.deepEqual(obj, { message: "foo" }); + } + } +}).addBatch({ + "An instance of the File Transport": transport(winston.transports.File, { + filename: path.join(__dirname, '..', 'fixtures', 'logs', 'testfile.log') + }) +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/http-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/http-test.js new file mode 100644 index 0000000..65f3cc7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/http-test.js @@ -0,0 +1,70 @@ +/* + * http-test.js: Tests for instances of the HTTP transport + * + * MIT LICENSE + */ + +var path = require('path'), + vows = require('vows'), + http = require('http'), + fs = require('fs'), + assert = require('assert'), + winston = require('../../lib/winston'), + helpers = require('../helpers'), + hock = require('hock'); + +var transport = require('./transport'); + +var host = '127.0.0.1'; + +vows.describe('winston/transports/http').addBatch({ + "When the HTTP endpoint": { + topic: function () { + var mock = this.mock = hock.createHock(), + self = this; + + mock + .post('/log', { + "method":"collect", + "params":{ + "level":"info", + "message":"hello", + "meta":{} + } + }) + .min(1) + .max(1) + .reply(200); + + var server = this.server = http.createServer(mock.handler); + server.listen(0, '0.0.0.0', this.callback); + }, + "is running": function (err) { + assert.ifError(err); + }, + "an instance of the Http transport": { + topic: function () { + + var port = this.server.address().port; + var self = this, + httpTransport = new (winston.transports.Http)({ + host: host, + port: port, + path: 'log' + }); + + httpTransport.log('info', 'hello', function (logErr, logged) { + self.mock.done(function (doneErr) { + self.callback(null, logErr, logged, doneErr); + }); + }); + }, + "should log to the specified URL": function (_, err, logged, requested) { + assert.ifError(err); + assert.isTrue(logged); + assert.ifError(requested); + this.server.close(); + } + } + } +}).export(module); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/memory-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/memory-test.js new file mode 100644 index 0000000..e8e1043 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/memory-test.js @@ -0,0 +1,31 @@ +var path = require('path'), + vows = require('vows'), + assert = require('assert'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +var npmTransport = new (winston.transports.Memory)(), + syslogTransport = new (winston.transports.Memory)({ levels: winston.config.syslog.levels }); + +vows.describe('winston/transports/memory').addBatch({ + "An instance of the Memory Transport": { + "with npm levels": { + "should have the proper methods defined": function () { + helpers.assertMemory(npmTransport); + }, + "the log() method": helpers.testNpmLevels(npmTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + }, + "with syslog levels": { + "should have the proper methods defined": function () { + helpers.assertMemory(syslogTransport); + }, + "the log() method": helpers.testSyslogLevels(syslogTransport, "should respond with true", function (ign, err, logged) { + assert.isNull(err); + assert.isTrue(logged); + }) + } + } +}).export(module); \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/transport.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/transport.js new file mode 100644 index 0000000..0abf80a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/winston/test/transports/transport.js @@ -0,0 +1,212 @@ +var assert = require('assert'), + winston = require('../../lib/winston'), + helpers = require('../helpers'); + +module.exports = function (transport, options) { + var logger = transport instanceof winston.Logger + ? transport + : new winston.Logger({ + transports: [ + new transport(options) + ] + }); + + // hack to fix transports that don't log + // any unit of time smaller than seconds + var common = require('../../lib/winston/common'); + common.timestamp = function() { + return new Date().toISOString(); + }; + + var transport = logger.transports[logger._names[0]]; + + var out = { + 'topic': logger, + 'when passed valid options': { + 'should have the proper methods defined': function () { + switch (transport.name) { + case 'console': + helpers.assertConsole(transport); + break; + case 'file': + helpers.assertFile(transport); + break; + case 'couchdb': + helpers.assertCouchdb(transport); + break; + } + assert.isFunction(transport.log); + } + }, + 'the log() method': helpers.testNpmLevels(transport, + 'should respond with true', function (ign, err, logged) { + assert.isNull(err); + assert.isNotNull(logged); + } + ), + 'the stream() method': { + 'using no options': { + 'topic': function () { + if (!transport.stream) return; + + logger.log('info', 'hello world', {}); + + var cb = this.callback, + j = 10, + i = 10, + results = [], + stream = logger.stream(); + + stream.on('log', function (log) { + results.push(log); + results.stream = stream; + if (!--j) cb(null, results); + }); + + stream.on('error', function (err) { + j = -1; //don't call the callback again + cb(err); + }); + + while (i--) logger.log('info', 'hello world ' + i, {}); + }, + 'should stream logs': function (err, results) { + if (!transport.stream) return; + assert.isNull(err); + results.forEach(function (log) { + assert.ok(log.message.indexOf('hello world') === 0 + || log.message.indexOf('test message') === 0); + }); + results.stream.destroy(); + } + }, + 'using the `start` option': { + 'topic': function () { + if (!transport.stream) return; + + var cb = this.callback, + stream = logger.stream({ start: 0 }); + + stream.on('log', function (log) { + log.stream = stream; + if (cb) cb(null, log); + cb = null; + }); + }, + 'should stream logs': function (err, log) { + if (!transport.stream) return; + assert.isNull(err); + assert.isNotNull(log.message); + log.stream.destroy(); + } + } + }, + 'after the logs have flushed': { + topic: function () { + setTimeout(this.callback, 1000); + }, + 'the query() method': { + 'using basic querying': { + 'topic': function () { + if (!transport.query) return; + var cb = this.callback; + logger.log('info', 'hello world', {}, function () { + logger.query(cb); + }); + }, + 'should return matching results': function (err, results) { + if (!transport.query) return; + assert.isNull(err); + results = results[transport.name]; + while (!Array.isArray(results)) { + results = results[Object.keys(results).pop()]; + } + var log = results.pop(); + assert.ok(log.message.indexOf('hello world') === 0 + || log.message.indexOf('test message') === 0); + } + }, + 'using the `rows` option': { + 'topic': function () { + if (!transport.query) return; + var cb = this.callback; + logger.log('info', 'hello world', {}, function () { + logger.query({ rows: 1 }, cb); + }); + }, + 'should return one result': function (err, results) { + if (!transport.query) return; + assert.isNull(err); + results = results[transport.name]; + while (!Array.isArray(results)) { + results = results[Object.keys(results).pop()]; + } + assert.equal(results.length, 1); + } + }, + 'using `fields` and `order` option': { + 'topic': function () { + if (!transport.query) return; + var cb = this.callback; + logger.log('info', 'hello world', {}, function () { + logger.query({ order: 'asc', fields: ['timestamp'] }, cb); + }); + }, + 'should return matching results': function (err, results) { + if (!transport.query) return; + assert.isNull(err); + results = results[transport.name]; + while (!Array.isArray(results)) { + results = results[Object.keys(results).pop()]; + } + assert.equal(Object.keys(results[0]).length, 1); + assert.ok(new Date(results.shift().timestamp) + < new Date(results.pop().timestamp)); + } + }, + 'using the `from` and `until` option': { + 'topic': function () { + if (!transport.query) return; + var cb = this.callback; + var start = Date.now() - (100 * 1000); + var end = Date.now() + (100 * 1000); + logger.query({ from: start, until: end }, cb); + }, + 'should return matching results': function (err, results) { + if (!transport.query) return; + assert.isNull(err); + results = results[transport.name]; + while (!Array.isArray(results)) { + results = results[Object.keys(results).pop()]; + } + assert.ok(results.length >= 1); + } + }, + 'using a bad `from` and `until` option': { + 'topic': function () { + if (!transport.query) return; + var cb = this.callback; + logger.log('info', 'bad from and until', {}, function () { + var now = Date.now() + 1000000; + logger.query({ from: now, until: now }, cb); + }); + }, + 'should return no results': function (err, results) { + if (!transport.query) return; + assert.isNull(err); + results = results[transport.name]; + while (!Array.isArray(results)) { + results = results[Object.keys(results).pop()]; + } + results = [results.filter(function(log) { + return log.message === 'bad from and until'; + }).pop()]; + assert.isUndefined(results[0]); + } + } + } + } + }; + + return out; +}; diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/.npmignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/.npmignore new file mode 100644 index 0000000..70f6329 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/.npmignore @@ -0,0 +1,3 @@ +/node_modules +/npm-debug.log +/*.sublime-* diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/LICENSE b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/LICENSE new file mode 100644 index 0000000..6af9994 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/LICENSE @@ -0,0 +1,13 @@ +Copyright 2012 Ember Feather Enterprises, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/lib/xml2object.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/lib/xml2object.js new file mode 100644 index 0000000..84b001b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/lib/xml2object.js @@ -0,0 +1,199 @@ +/** + * Simple xml 2 javascript object parser based on sax.js + * + * https://github.com/emberfeather/node-xml2object + */ +var emitter = require('events').EventEmitter; +var fs = require('fs'); +var sax = require('sax'); +var Stream = require('stream'); +var util = require('util'); + +var xml2object = module.exports = function(elements, source, saxOptions) { + elements = elements || []; + saxOptions = saxOptions || {}; + + this._hasStarted = false; + + var self = this; + var currentObject; + var inObject = false; + var inObjectName; + var ancestors = []; + + // Define the inputStream property. + Object.defineProperty(self, 'source', { + get: function () { + return self.inputStream; + }, + set: function (val) { + if(val instanceof Stream) { + if(!val.readable) { + throw new Error('Source stream is not readable'); + } + + // Allowing for passing in a readable stream. + self.inputStream = val; + } else if(typeof val === 'string') { + // Allow for passing a filename. + self.inputStream = fs.createReadStream(val); + } + } + }); + + this.source = source; + this.saxStream = sax.createStream(true, saxOptions); + + var openTag = function(args) { + // if xmlns option set use the local tag name rather than full name. + var tagName = saxOptions.xmlns ? args.local : args.name; + + if(!inObject) { + // If we are not in an object and not tracking the element + // then we don't need to do anything. + if (elements.indexOf(tagName) < 0) { + return; + } + + // Start tracking a new object. + inObject = true; + inObjectName = tagName; + + currentObject = {}; + } + + if (!(tagName in currentObject)) { + currentObject[tagName] = args.attributes; + } else if (!util.isArray(currentObject[tagName])) { + // Put the existing object in an array. + var newArray = [currentObject[tagName]]; + + // Add the new object to the array. + newArray.push(args.attributes); + + // Point to the new array. + currentObject[tagName] = newArray; + } else { + // An array already exists, push the attributes on to it. + currentObject[tagName].push(args.attributes); + } + + // Store the current (old) parent. + ancestors.push(currentObject); + + // We are now working with this object, so it becomes the current parent. + if (currentObject[tagName] instanceof Array) { + // If it is an array, get the last element of the array. + currentObject = currentObject[tagName][currentObject[tagName].length - 1]; + } else { + // Otherwise, use the object itself. + currentObject = currentObject[tagName]; + } + }; + + var closeTag = function (name) { + // `name` is namespace prefixed always. + // Strip the ns off if xmlns option was set. + name = saxOptions.xmlns ? name.replace(/.+?:/,'') : name; + + if(!inObject) { + return; + } + + if(inObject && inObjectName === name) { + // Finished building the object. + self.emit('object', name, currentObject); + + inObject = false; + ancestors = []; + + return; + } + + if(ancestors.length) { + var ancestor = ancestors.pop(); + var keys = Object.keys(currentObject); + + if (keys.length == 1 && '$t' in currentObject) { + // Convert the text only objects into just the text. + if (ancestor[name] instanceof Array) { + ancestor[name].push(ancestor[name].pop()['$t']); + } else { + ancestor[name] = currentObject['$t']; + } + } else if (!keys.length) { + // Remove empty keys. + delete ancestor[name]; + } + + currentObject = ancestor; + } else { + currentObject = {}; + } + }; + + var text = function (data) { + if(!inObject) { + return; + } + + data = data.trim(); + + if (!data.length) { + return; + } + + currentObject['$t'] = (currentObject['$t'] || "") + data; + } + + this.saxStream.on("opentag", openTag); + this.saxStream.on("opencdata", function(args) { + openTag({ + name: "$d", + attributes: {} + }); + }); + + this.saxStream.on("text", text); + this.saxStream.on("cdata", text); + + this.saxStream.on("closetag", closeTag); + this.saxStream.on("closecdata", function(name) { + closeTag("$d"); + }); + + // Rebroadcast the error and keep going + this.saxStream.on("error", function (e) { + self.emit('error', e); + + // clear the error and resume + this._parser.error = null; + this._parser.resume(); + }); + + // Rebroadcast the end of the file read + this.saxStream.on("end", function() { + self.emit("end"); + }); +}; + +util.inherits(xml2object, emitter); + +xml2object.prototype.start = function() { + // Can only start once + if(this._hasStarted) { + return; + } + + // Must have a stream to start + if(!this.inputStream) { + throw new Error('Missing parsing source'); + } + + this._hasStarted = true; + + this.emit('start'); + + // Start the streaming! + this.inputStream.pipe(this.saxStream); +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/package.json b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/package.json new file mode 100644 index 0000000..f273b97 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "xml2object@0.1.2", + "scope": null, + "escapedName": "xml2object", + "name": "xml2object", + "rawSpec": "0.1.2", + "spec": "0.1.2", + "type": "version" + }, + "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources" + ] + ], + "_from": "xml2object@0.1.2", + "_id": "xml2object@0.1.2", + "_inCache": true, + "_location": "/xml2object", + "_npmUser": { + "name": "zoramite", + "email": "zoramite+npm@gmail.com" + }, + "_npmVersion": "1.4.15", + "_phantomChildren": {}, + "_requested": { + "raw": "xml2object@0.1.2", + "scope": null, + "escapedName": "xml2object", + "name": "xml2object", + "rawSpec": "0.1.2", + "spec": "0.1.2", + "type": "version" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/xml2object/-/xml2object-0.1.2.tgz", + "_shasum": "872964288e8181a50fdd44f7891097fe5c982b45", + "_shrinkwrap": null, + "_spec": "xml2object@0.1.2", + "_where": "/mnt/hudson_workspace/workspace/jbosstools-fabric8analytics-lsp-server_master/sources", + "author": { + "name": "Randy Merrill", + "email": "Zoramite+node@gmail.com", + "url": "http://forthedeveloper.com" + }, + "bugs": { + "url": "https://github.com/emberfeather/node-xml2object/issues" + }, + "dependencies": { + "sax": ">=0.3.5" + }, + "description": "Simple XML to JavaScript Object Converter", + "devDependencies": { + "mocha": ">=1.20.1" + }, + "directories": {}, + "dist": { + "shasum": "872964288e8181a50fdd44f7891097fe5c982b45", + "tarball": "https://registry.npmjs.org/xml2object/-/xml2object-0.1.2.tgz" + }, + "engines": { + "node": "~0.6.10" + }, + "gitHead": "5026ec191f1409b3de45e1a3c50bcc98bff395e5", + "homepage": "https://github.com/emberfeather/node-xml2object", + "main": "lib/xml2object.js", + "maintainers": [ + { + "name": "zoramite", + "email": "Zoramite+node@gmail.com" + } + ], + "name": "xml2object", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/emberfeather/node-xml2object.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "0.1.2", + "warnings": [ + { + "code": "ENOTSUP", + "required": { + "node": "~0.6.10" + }, + "pkgid": "xml2object@0.1.2" + } + ] +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/readme.md b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/readme.md new file mode 100644 index 0000000..de8c1a2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/readme.md @@ -0,0 +1,153 @@ +# Node.js xml2object + +Simple wrapper on the [SAX.js](https://github.com/isaacs/sax-js) parser to stream xml into JavaScript objects. + +Converts xml elements into JavaScript objects. + +[![Build Status](https://drone.io/github.com/emberfeather/node-xml2object/status.png)](https://drone.io/github.com/emberfeather/node-xml2object/latest) + +## Install + + npm install xml2object --save + +## Usage + +### From A File Name + + var xml2object = require('xml2object'); + + // Create a new xml parser with an array of xml elements to look for + var parser = new xml2object([ 'animal' ], 'myAnimals.xml'); + + // Bind to the object event to work with the objects found in the XML file + parser.on('object', function(name, obj) { + console.log('Found an object: %s', name); + console.log(obj); + }); + + // Bind to the file end event to tell when the file is done being streamed + parser.on('end', function() { + console.log('Finished parsing xml!'); + }); + + // Start parsing the XML + parser.start(); + +### From An Input Stream + + var xml2object = require('xml2object'); + var source = fs.createReadStream('/path/to/file.xml'); + + // Create a new xml parser with an array of xml elements to look for + var parser = new xml2object([ 'animal' ], source); + + // Bind to the object event to work with the objects found in the XML file + parser.on('object', function(name, obj) { + console.log('Found an object: %s', name); + console.log(obj); + }); + + // Bind to the file end event to tell when the file is done being streamed + parser.on('end', function() { + console.log('Finished parsing xml!'); + }); + + // Start parsing the input stream + parser.start(); + +### Piped From An Input Stream + +_Note:_ The following example uses the [`request`][1] package to simplify the http request. + + var xml2object = require('xml2object'); + var request = require('request'); + + // Create a new xml parser with an array of xml elements to look for + var parser = new xml2object([ 'animal' ]); + + // Bind to the object event to work with the objects found in the XML file + parser.on('object', function(name, obj) { + console.log('Found an object: %s', name); + console.log(obj); + }); + + // Bind to the file end event to tell when the file is done being streamed + parser.on('end', function() { + console.log('Finished parsing xml!'); + }); + + // Pipe a request into the parser + request.get('http://www.example.com/test.xml').pipe(parser.saxStream); + + +### Advanced Options + + var xml2object = require('xml2object'); + + // Create a new xml parser with an array of xml elements to look for + // but this time we have lower-level requirements + var parser = new xml2object([ 'Envelope' ], undefined, { xmlns:true }); + + // everything else the same + + +## Module + +### xml2object(elements[, source[, saxOptions]]) + +Constructor for creating an instance of the xml parser. + +The source argument is can be a path to an xml file or an input stream. + +If no source is specified you can set a readable Stream to `.source` or pipe a Stream into the `.saxStream`. + + var xml2object = require('xml2object'); + + // Parse the myAnimals.xml file looking for elements + var parser = new xml2object([ 'animal' ], 'myAnimals.xml'); + +`saxOptions` is passed directly to the [SAX parser](https://github.com/isaacs/sax-js#arguments). Options supported in node-xml2object are +* xmlns : XML namespaces, ignore namespaces. Helpful if you don't know the namespace(s) but do know the element names (example, some uPnP XML data) + +### .source + +The input Stream used as a source for parsing. Can be set to a xml file path or a readable stream. + + var parser = new xml2object([ 'animal' ]); + + parser.source = 'myAnimals.xml'; + +### .saxStream + +The underlying sax Stream. Data can be piped directly to the sax Stream using the `pipe()`. + +### .start() + +Triggers the xml file to start streaming to the parser. Call this method after you have bound to the events. + + // Start parsing the XML + parser.start(); + +### Event: 'object' + + function(name, obj) { ... } + +Triggered when an object has been parsed from the XML file with the name of the element found and the actual object. + +### Event: 'end' + + function() { ... } + +Marks the end of the input file when it has been completely streamed through the parser. + +### Event: 'start' + + function() { ... } + +Marks the start of reading from the source. This event will not fire if using the `.saxParser.pipe()` method. + +## Other Notes + +Elements being parsed cannot currently be nested. For example. if you have `root > bikes > bike > wheel` as a heirarchy and have done a `xml2object('transportation.xml', [ 'bike', 'wheel' ])` the bike objects will be returned, but the wheel elements inside the bike element will not be parsed separately. + + [1]: https://github.com/mikeal/request diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/cdata-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/cdata-test.js new file mode 100644 index 0000000..affda86 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/cdata-test.js @@ -0,0 +1,25 @@ +var assert = require("assert"); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('CDATA', function(){ + it('should find CDATA values', function(done){ + var parser = new xml2object( + ['tiger'], + path.normalize(__dirname + '/fixture/input03_CDATA.xml')); + var found = []; + + parser.on('object', function(name, obj) { + found.push(obj.$d); + }); + + parser.on('end', function() { + assert.equal(1, found.length); + assert.equal('string', typeof found[0]); + + done(); + }); + + parser.start(); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/error-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/error-test.js new file mode 100644 index 0000000..9b0fb80 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/error-test.js @@ -0,0 +1,24 @@ +var assert = require("assert"); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('Error', function(){ + it('should have an error when cannot parse', function(done){ + var parser = new xml2object( + ['dog'], + path.normalize(__dirname + '/fixture/input02_invalid.xml')); + var found = []; + + parser.on('error', function(error) { + assert.equal(true, error instanceof Error); + found.push(error); + + // Brittle, but the parser gets multiple errors with invalid input. + if (found.length == 2) { + done(); + } + }); + + parser.start(); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/file-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/file-test.js new file mode 100644 index 0000000..3580367 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/file-test.js @@ -0,0 +1,47 @@ +var assert = require("assert"); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('File Read', function(){ + it('should parse source from constructor', function(done){ + var parser = new xml2object( + ['dog'], path.normalize(__dirname + '/fixture/input01_simple.xml')); + var found = []; + + parser.on('object', function(name, obj) { + found.push(obj.name); + }); + + parser.on('end', function() { + assert.equal(2, found.length, "Should have found two objects"); + assert.equal('Fluffy', found[0], 'Name mismatch'); + assert.equal('Max', found[1], 'Name mismatch'); + + done(); + }); + + parser.start(); + }); + + it('should parse source from setter', function(done){ + var parser = new xml2object(['cat']); + var found = []; + + parser.source = path.normalize( + __dirname + '/fixture/input01_simple.xml'); + + parser.on('object', function(name, obj) { + found.push(obj.name); + }); + + parser.on('end', function() { + assert.equal(2, found.length, "Should have found two objects"); + assert.equal('Snuggles', found[0], 'Name mismatch'); + assert.equal('Snowball', found[1], 'Name mismatch'); + + done(); + }); + + parser.start(); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input01_simple.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input01_simple.xml new file mode 100644 index 0000000..f4a8cf2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input01_simple.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input02_invalid.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input02_invalid.xml new file mode 100644 index 0000000..a88097e --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input02_invalid.xml @@ -0,0 +1 @@ +invalid xml data \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input03_CDATA.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input03_CDATA.xml new file mode 100644 index 0000000..e2c0d40 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input03_CDATA.xml @@ -0,0 +1,15 @@ + + + + + + + + + + &*(%$ + ]]> + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input04_namespace.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input04_namespace.xml new file mode 100644 index 0000000..2a09ff7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input04_namespace.xml @@ -0,0 +1,10 @@ + + + + + + out arg value + + + + \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input101.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/fixture/input101.xml new file mode 100644 index 0000000..e69de29 diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/namespace-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/namespace-test.js new file mode 100644 index 0000000..7e4175a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/namespace-test.js @@ -0,0 +1,55 @@ +var assert = require("assert"); +var fs = require('fs'); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('Namespace', function(){ + it('should parse namespace correctly', function(done){ + var stream = fs.createReadStream(path.normalize( + __dirname + '/fixture/input04_namespace.xml')); + var parser = new xml2object(['Envelope'], undefined, {xmlns:true}); + var found = []; + + var expectedValue = { + 'xmlns:s': { + name: 'xmlns:s', + value: 'http://schemas.xmlsoap.org/soap/envelope/', + prefix: 'xmlns', + local: 's', + uri: 'http://www.w3.org/2000/xmlns/' + }, + 's:encodingStyle': { + name: 's:encodingStyle', + value: 'http://schemas.xmlsoap.org/soap/encoding/', + prefix: 's', + local: 'encodingStyle', + uri: 'http://schemas.xmlsoap.org/soap/envelope/' + }, + Body: { + actionNameResponse: { + 'xmlns:u': { + name: 'xmlns:u', + value: 'urn:schemas-upnp-org:service:serviceType:v', + prefix: 'xmlns', + local: 'u', + uri: 'http://www.w3.org/2000/xmlns/' + }, + argumentName: 'out arg value' + } + } + }; + + parser.on('object', function(name, obj) { + found.push(obj); + }); + + parser.on('end', function() { + assert.equal(1, found.length); + assert.deepEqual(expectedValue, found[0]); + + done(); + }); + + stream.pipe(parser.saxStream); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/pipe-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/pipe-test.js new file mode 100644 index 0000000..63b32a1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/pipe-test.js @@ -0,0 +1,27 @@ +var assert = require("assert"); +var fs = require('fs'); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('Pipe', function(){ + it('should parse from a piped stream', function(done){ + var stream = fs.createReadStream( + path.normalize(__dirname + '/fixture/input01_simple.xml')); + var parser = new xml2object(['dog']); + var found = []; + + parser.on('object', function(name, obj) { + found.push(obj.name); + }); + + parser.on('end', function() { + assert.equal(2, found.length, "Should have found two objects"); + assert.equal('Fluffy', found[0], 'Name mismatch'); + assert.equal('Max', found[1], 'Name mismatch'); + + done(); + }); + + stream.pipe(parser.saxStream); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/root-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/root-test.js new file mode 100644 index 0000000..f53ccdc --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/root-test.js @@ -0,0 +1,25 @@ +var assert = require("assert"); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('Root', function(){ + it('should match root element', function(done){ + var parser = new xml2object( + ['example'], + path.normalize(__dirname + '/fixture/input01_simple.xml')); + var found = []; + + parser.on('object', function(name, obj) { + found.push(obj.foo); + }); + + parser.on('end', function() { + assert.equal(1, found.length, 'Should have found two objects'); + assert.equal('bar', found[0], 'foobar mismatch'); + + done(); + }); + + parser.start(); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/stream-test.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/stream-test.js new file mode 100644 index 0000000..faa9d33 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/node_modules/xml2object/test/stream-test.js @@ -0,0 +1,75 @@ +var assert = require("assert"); +var fs = require('fs'); +var os = require('os'); +var path = require('path'); +var xml2object = require('../lib/xml2object'); + +describe('Stream', function(){ + it('should parse using a read stream in constructor', function(done){ + var stream = fs.createReadStream( + path.normalize(__dirname + '/fixture/input01_simple.xml')); + var parser = new xml2object(['dog'], stream); + var found = []; + + parser.on('object', function(name, obj) { + found.push(obj.name); + }); + + parser.on('end', function() { + assert.equal(2, found.length, 'Should have found two objects'); + assert.equal('Fluffy', found[0], 'Name mismatch'); + assert.equal('Max', found[1], 'Name mismatch'); + + done(); + }); + + parser.start(); + }); + + it('should parse using a read stream from setter', function(done){ + var stream = fs.createReadStream( + path.normalize(__dirname + '/fixture/input01_simple.xml')); + var parser = new xml2object(['cat']); + var found = []; + + parser.source = stream; + + parser.on('object', function(name, obj) { + found.push(obj.name); + }); + + parser.on('end', function() { + assert.equal(2, found.length, "Should have found two objects"); + assert.equal('Snuggles', found[0], 'Name mismatch'); + assert.equal('Snowball', found[1], 'Name mismatch'); + + done(); + }); + + parser.start(); + }); + + it('should error without a source', function(){ + var parser = new xml2object(['cat']); + + assert.throws(function() { + // Starting without any source should throw an error + parser.start(); + }, Error); + }); + + it('should error without a readable stream', function(){ + var stream = fs.createWriteStream( + path.normalize(os.tmpdir() + '/output.xml')); + var parser = new xml2object(['cat']); + var found = []; + + // Make the stream non-readable by destroying. + stream.destroy(); + + assert.throws(function() { + // Starting without any source should throw an error + parser.source = stream; + }, Error); + }); +}); diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js new file mode 100644 index 0000000..57764e7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js @@ -0,0 +1,282 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Pavel Odvody 2016 + * Licensed under the Apache-2.0 License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const path = require("path"); +const fs = require("fs"); +const vscode_languageserver_1 = require("vscode-languageserver"); +const utils_1 = require("./utils"); +const collector_1 = require("./collector"); +const consumers_1 = require("./consumers"); +const url = require('url'); +const https = require('https'); +const request = require('request'); +const winston = require('winston'); +winston.level = 'debug'; +winston.add(winston.transports.File, { filename: '/workspace-logs/ls-bayesian/bayesian.log' }); +winston.remove(winston.transports.Console); +winston.info('Starting Bayesian'); +/* +let log_file = fs.openSync('file_log.log', 'w'); +let _LOG = (data) => { + fs.writeFileSync('file_log.log', data + '\n'); +} +*/ +var EventStream; +(function (EventStream) { + EventStream[EventStream["Invalid"] = 0] = "Invalid"; + EventStream[EventStream["Diagnostics"] = 1] = "Diagnostics"; + EventStream[EventStream["CodeLens"] = 2] = "CodeLens"; +})(EventStream || (EventStream = {})); +; +let connection = null; +/* use stdio for transfer if applicable */ +if (process.argv.indexOf('--stdio') == -1) + connection = vscode_languageserver_1.createConnection(new vscode_languageserver_1.IPCMessageReader(process), new vscode_languageserver_1.IPCMessageWriter(process)); +else + connection = vscode_languageserver_1.createConnection(); +let documents = new vscode_languageserver_1.TextDocuments(); +documents.listen(connection); +let workspaceRoot; +connection.onInitialize((params) => { + workspaceRoot = params.rootPath; + return { + capabilities: { + textDocumentSync: documents.syncKind, + codeActionProvider: true + } + }; +}); +; +; +; +class AnalysisFileHandler { + constructor(matcher, stream, callback) { + this.stream = stream; + this.callback = callback; + this.matcher = new RegExp(matcher); + } +} +; +class AnalysisFiles { + constructor() { + this.handlers = []; + this.file_data = new Map(); + } + on(stream, matcher, cb) { + this.handlers.push(new AnalysisFileHandler(matcher, stream, cb)); + return this; + } + run(stream, uri, file, contents) { + for (let handler of this.handlers) { + if (handler.stream == stream && handler.matcher.test(file)) { + return handler.callback(uri, file, contents); + } + } + } +} +; +; +class AnalysisLSPServer { + constructor(connection, files) { + this.connection = connection; + this.files = files; + } + handle_file_event(uri, contents) { + let path_name = url.parse(uri).pathname; + let file_name = path.basename(path_name); + this.files.file_data[uri] = contents; + this.files.run(EventStream.Diagnostics, uri, file_name, contents); + } + handle_code_lens_event(uri) { + let path_name = url.parse(uri).pathname; + let file_name = path.basename(path_name); + let lenses = []; + let contents = this.files.file_data[uri]; + return this.files.run(EventStream.CodeLens, uri, file_name, contents); + } +} +; +; +class Aggregator { + constructor(items, callback) { + this.callback = callback; + this.mapping = new Map(); + for (let item of items) { + this.mapping.set(item, false); + } + } + is_ready() { + let val = true; + for (let m of this.mapping.entries()) { + val = val && m[1]; + } + return val; + } + aggregate(dep) { + this.mapping.set(dep, true); + if (this.is_ready()) { + this.callback(); + } + } +} +; +class AnalysisConfig { + constructor() { + // TODO: this needs to be configurable + this.server_url = process.env.RECOMMENDER_API_URL || "api-url-not-available-in-lsp"; + this.api_token = process.env.RECOMMENDER_API_TOKEN || "token-not-available-in-lsp"; + this.three_scale_user_token = process.env.THREE_SCALE_USER_TOKEN || ""; + this.forbidden_licenses = []; + this.no_crypto = false; + this.home_dir = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME']; + } +} +; +let config = new AnalysisConfig(); +let files = new AnalysisFiles(); +let server = new AnalysisLSPServer(connection, files); +let rc_file = path.join(config.home_dir, '.analysis_rc'); +if (fs.existsSync(rc_file)) { + let rc = JSON.parse(fs.readFileSync(rc_file, 'utf8')); + if ('server' in rc) { + config.server_url = `${rc.server}/api/v1`; + } +} +let DiagnosticsEngines = [consumers_1.SecurityEngine]; +// TODO: in-memory caching only, this needs to be more robust +let metadataCache = new Map(); +let get_metadata = (ecosystem, name, version, cb) => { + let cacheKey = ecosystem + " " + name + " " + version; + let metadata = metadataCache[cacheKey]; + if (metadata != null) { + winston.info('cache hit for ' + cacheKey); + cb(metadata); + return; + } + let part = [ecosystem, name, version].join('/'); + const options = url.parse(config.server_url); + if (config.three_scale_user_token) { + options['path'] += `/component-analyses/${part}?user_key=${config.three_scale_user_token}`; + } + else { + options['path'] += `/component-analyses/${part}/`; + } + //options['path'] += `/component-analyses/${part}/`; + options['headers'] = { 'Authorization': 'Bearer ' + config.api_token }; + winston.debug('get ' + options['host'] + options['path']); + if (process.env.RECOMMENDER_API_URL) { + https.get(options, function (res) { + let body = ''; + res.on('data', function (chunk) { body += chunk; }); + res.on('end', function () { + winston.info('status ' + this.statusCode); + if (this.statusCode == 200 || this.statusCode == 202) { + let response = JSON.parse(body); + winston.debug('response ' + response); + metadataCache[cacheKey] = response; + cb(response); + } + else { + cb(null); + } + }); + }); + } +}; +files.on(EventStream.Diagnostics, "^package\\.json$", (uri, name, contents) => { + /* Convert from readable stream into string */ + let stream = utils_1.stream_from_string(contents); + let collector = new collector_1.DependencyCollector(null); + collector.collect(stream).then((deps) => { + let diagnostics = []; + /* Aggregate asynchronous requests and send the diagnostics at once */ + let aggregator = new Aggregator(deps, () => { + connection.sendDiagnostics({ uri: uri, diagnostics: diagnostics }); + }); + for (let dependency of deps) { + get_metadata('npm', dependency.name.value, dependency.version.value, (response) => { + if (response != null) { + let pipeline = new consumers_1.DiagnosticsPipeline(DiagnosticsEngines, dependency, config, diagnostics); + pipeline.run(response); + } + aggregator.aggregate(dependency); + }); + } + }); +}); +files.on(EventStream.Diagnostics, "^pom\\.xml$", (uri, name, contents) => { + /* Convert from readable stream into string */ + let stream = utils_1.stream_from_string(contents); + let collector = new collector_1.PomXmlDependencyCollector(); + collector.collect(stream).then((deps) => { + let diagnostics = []; + /* Aggregate asynchronous requests and send the diagnostics at once */ + let aggregator = new Aggregator(deps, () => { + connection.sendDiagnostics({ uri: uri, diagnostics: diagnostics }); + }); + for (let dependency of deps) { + get_metadata('maven', dependency.name.value, dependency.version.value, (response) => { + if (response != null) { + let pipeline = new consumers_1.DiagnosticsPipeline(DiagnosticsEngines, dependency, config, diagnostics); + pipeline.run(response); + } + aggregator.aggregate(dependency); + }); + } + }); +}); +files.on(EventStream.Diagnostics, "^requirements\\.txt$", (uri, name, contents) => { + let collector = new collector_1.ReqDependencyCollector(); + collector.collect(contents).then((deps) => { + let diagnostics = []; + /* Aggregate asynchronous requests and send the diagnostics at once */ + let aggregator = new Aggregator(deps, () => { + connection.sendDiagnostics({ uri: uri, diagnostics: diagnostics }); + }); + for (let dependency of deps) { + winston.info('python cmp name' + dependency.name.value); + get_metadata('pypi', dependency.name.value, dependency.version.value, (response) => { + if (response != null) { + let pipeline = new consumers_1.DiagnosticsPipeline(DiagnosticsEngines, dependency, config, diagnostics); + pipeline.run(response); + } + aggregator.aggregate(dependency); + }); + } + }); +}); +let checkDelay; +connection.onDidSaveTextDocument((params) => { + clearTimeout(checkDelay); + server.handle_file_event(params.textDocument.uri, server.files.file_data[params.textDocument.uri]); +}); +connection.onDidChangeTextDocument((params) => { + /* Update internal state for code lenses */ + server.files.file_data[params.textDocument.uri] = params.contentChanges[0].text; + clearTimeout(checkDelay); + checkDelay = setTimeout(() => { + server.handle_file_event(params.textDocument.uri, server.files.file_data[params.textDocument.uri]); + }, 500); +}); +connection.onDidOpenTextDocument((params) => { + server.handle_file_event(params.textDocument.uri, params.textDocument.text); +}); +connection.onCodeAction((params, token) => { + clearTimeout(checkDelay); + let commands = []; + for (let diagnostic of params.context.diagnostics) { + let command = consumers_1.codeActionsMap[diagnostic.message]; + if (command != null) { + commands.push(command); + } + } + return commands; +}); +connection.onDidCloseTextDocument((params) => { + clearTimeout(checkDelay); +}); +connection.listen(); +//# sourceMappingURL=server.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js.map new file mode 100644 index 0000000..5d34233 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/server.js.map @@ -0,0 +1 @@ +{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js new file mode 100644 index 0000000..a889aa5 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js @@ -0,0 +1,44 @@ +/* -------------------------------------------------------------------------------------------- + * Copyright (c) Pavel Odvody 2016 + * Licensed under the Apache-2.0 License. See License.txt in the project root for license information. + * ------------------------------------------------------------------------------------------ */ +'use strict'; +Object.defineProperty(exports, "__esModule", { value: true }); +const stream_1 = require("stream"); +exports.stream_from_string = (s) => { + let stream = new stream_1.Readable(); + stream.push(s); + stream.push(null); + return stream; +}; +/* VSCode and Che transmit the file buffer in a different manner, + * so we have to use different functions for computing the + * positions and ranges so that the lines are rendered properly. + */ +let _to_lsp_position_vscode = (pos) => { + return { line: pos.line / 2, character: pos.column - 1 }; +}; +let _get_range_vscode = (ps) => { + let length = ps.value.length; + return { + start: exports.to_lsp_position(ps.position), + end: { line: ps.position.line / 2, character: ps.position.column + length - 1 } + }; +}; +let _to_lsp_position_che = (pos) => { + return { line: pos.line - 1, character: pos.column - 1 }; +}; +let _get_range_che = (ps) => { + let length = ps.value.length; + return { + start: exports.to_lsp_position(ps.position), + end: { line: ps.position.line - 1, character: ps.position.column + length - 1 } + }; +}; +exports.to_lsp_position = (pos) => { + return _to_lsp_position_che(pos); +}; +exports.get_range = (ps) => { + return _get_range_che(ps); +}; +//# sourceMappingURL=utils.js.map \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js.map b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js.map new file mode 100644 index 0000000..ea7285b --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/server/utils.js.map @@ -0,0 +1 @@ +{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAChG,YAAY,CAAC;;AACb,mCAA0C;AAK/B,QAAA,kBAAkB,GAAG,CAAC,CAAS,EAAU,EAAE;IACpD,IAAI,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACf,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClB,MAAM,CAAC,MAAM,CAAC;AAChB,CAAC,CAAA;AAED;;;GAGG;AACH,IAAI,uBAAuB,GAAG,CAAC,GAAc,EAAY,EAAE;IACzD,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAC,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,EAAC,CAAC;AACvD,CAAC,CAAC;AAEF,IAAI,iBAAiB,GAAG,CAAC,EAAqB,EAAS,EAAE;IACvD,IAAI,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IAC7B,MAAM,CAAC;QACH,KAAK,EAAE,uBAAe,CAAC,EAAE,CAAC,QAAQ,CAAC;QACnC,GAAG,EAAE,EAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,GAAC,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,EAAC;KAC9E,CAAC;AACJ,CAAC,CAAA;AAED,IAAI,oBAAoB,GAAG,CAAC,GAAc,EAAY,EAAE;IACtD,MAAM,CAAC,EAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,EAAC,CAAC;AACzD,CAAC,CAAC;AAEF,IAAI,cAAc,GAAG,CAAC,EAAqB,EAAS,EAAE;IACnD,IAAI,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC;QACH,KAAK,EAAE,uBAAe,CAAC,EAAE,CAAC,QAAQ,CAAC;QACnC,GAAG,EAAE,EAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,GAAG,MAAM,GAAG,CAAC,EAAC;KAChF,CAAC;AACJ,CAAC,CAAA;AAEU,QAAA,eAAe,GAAG,CAAC,GAAc,EAAY,EAAE;IACxD,MAAM,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC,CAAC;AAES,QAAA,SAAS,GAAG,CAAC,EAAqB,EAAS,EAAE;IACtD,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;AAC5B,CAAC,CAAC"} \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPCoreActivator.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPCoreActivator.java new file mode 100644 index 0000000..7179eb8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPCoreActivator.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright (c) 2017 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ + +package com.redhat.fabric8analytics.eclipse.lsp.core; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Fabric8AnalysisLSPCoreActivator extends Plugin { + + public static final String PLUGIN_ID = "com.redhat.fabric8analytics.eclipse.lsp.core"; + + // The shared instance + private static Fabric8AnalysisLSPCoreActivator plugin; + + /** + * The constructor + */ + public Fabric8AnalysisLSPCoreActivator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Fabric8AnalysisLSPCoreActivator getDefault() { + return plugin; + } + + public void logInfo(String msg) { + IStatus status = new Status(Status.INFO, PLUGIN_ID, msg); + getLog().log(status); + } + + public void logError(String msg) { + IStatus status = new Status(Status.ERROR, PLUGIN_ID, msg); + getLog().log(status); + } + + public void logError(String msg, Throwable t) { + IStatus status = new Status(Status.ERROR, PLUGIN_ID, msg, t); + getLog().log(status); + } +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPPreferences.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPPreferences.java new file mode 100644 index 0000000..37aabb2 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalysisLSPPreferences.java @@ -0,0 +1,29 @@ +package com.redhat.fabric8analytics.eclipse.lsp.core; + +import org.eclipse.core.runtime.preferences.InstanceScope; + +public class Fabric8AnalysisLSPPreferences { + + public static final String LSP_SERVER_ENABLED = "fabric8AnalysisPreferences.LSP_ENABLED"; + + private static Fabric8AnalysisLSPPreferences instance; + + private Fabric8AnalysisLSPPreferences() { + } + + public static Fabric8AnalysisLSPPreferences getInstance() { + if(instance == null) { + instance = new Fabric8AnalysisLSPPreferences(); + } + return instance; + } + + public boolean isLSPServerEnabled() { + return InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSPCoreActivator.PLUGIN_ID).getBoolean(LSP_SERVER_ENABLED, false); + } + + public void setLSPServerEnabled(boolean enabled) { + InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSPCoreActivator.PLUGIN_ID).putBoolean(LSP_SERVER_ENABLED, enabled); + } + +} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalyticsStreamConnectionProvider.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalyticsStreamConnectionProvider.java similarity index 82% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalyticsStreamConnectionProvider.java rename to plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalyticsStreamConnectionProvider.java index 310bb07..5b8fe3e 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalyticsStreamConnectionProvider.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.core/src/com/redhat/fabric8analytics/eclipse/lsp/core/Fabric8AnalyticsStreamConnectionProvider.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.lsp.core; import java.io.BufferedReader; import java.io.File; @@ -41,16 +41,13 @@ import org.eclipse.lsp4e.server.StreamConnectionProvider; import org.osgi.framework.Bundle; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisPreferences; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.MessageDialogUtils; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; public class Fabric8AnalyticsStreamConnectionProvider extends ProcessStreamConnectionProvider implements StreamConnectionProvider { - public static final String SERVER_ID = "com.redhat.fabric8analytics.lsp.eclipse.server"; + public static final String SERVER_ID = "com.redhat.fabric8analytics.eclipse.lsp.server"; private static final String LSP_SERVER_ID_ATTRIBUTE = "languageServerId"; @@ -80,7 +77,7 @@ public Fabric8AnalyticsStreamConnectionProvider(AnalyticsAuthService tokenCheck) } File serverLocation = getServerLocation(); - Fabric8AnalysisLSUIActivator.getDefault().logInfo("server location" + serverLocation); + Fabric8AnalysisLSPCoreActivator.getDefault().logInfo("server location" + serverLocation); if (serverLocation == null) { return; } @@ -94,7 +91,7 @@ public Fabric8AnalyticsStreamConnectionProvider(AnalyticsAuthService tokenCheck) @Override public void start() throws IOException { - if (!Fabric8AnalysisPreferences.getInstance().isLSPServerEnabled()) { + if (!Fabric8AnalysisLSPPreferences.getInstance().isLSPServerEnabled()) { throw new IOException("Fabric8Analytics LSP Server is not enabled"); } @@ -109,14 +106,14 @@ public void start() throws IOException { super.start(); // if super.start() does not throw exception, we're started - Fabric8AnalysisLSUIActivator.getDefault().logInfo("The Fabric8 analyses server is started "); + Fabric8AnalysisLSPCoreActivator.getDefault().logInfo("The Fabric8 analyses server is started "); } @Override public void stop() { super.stop(); removeMarkers(); - Fabric8AnalysisLSUIActivator.getDefault().logInfo("The Fabric8 analyses server is stopped"); + Fabric8AnalysisLSPCoreActivator.getDefault().logInfo("The Fabric8 analyses server is stopped"); } private void removeMarkers() { @@ -137,7 +134,7 @@ private void removeMarkers() { ResourcesPlugin.getWorkspace() .deleteMarkers(markersToDelete.toArray(new IMarker[markersToDelete.size()])); } catch (CoreException e) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Error occured while removing LSP markers", e); + Fabric8AnalysisLSPCoreActivator.getDefault().logError("Error occured while removing LSP markers", e); } } } @@ -153,13 +150,13 @@ protected ProcessBuilder createProcessBuilder() { } private void addPreferencesListener() { - InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSCoreActivator.PLUGIN_ID) + InstanceScope.INSTANCE.getNode(Fabric8AnalysisLSPCoreActivator.PLUGIN_ID) .addPreferenceChangeListener(new IPreferenceChangeListener() { @Override public void preferenceChange(PreferenceChangeEvent event) { - if (Fabric8AnalysisPreferences.LSP_SERVER_ENABLED.equals(event.getKey())) { - if(Fabric8AnalysisPreferences.getInstance().isLSPServerEnabled()) { + if (Fabric8AnalysisLSPPreferences.LSP_SERVER_ENABLED.equals(event.getKey())) { + if(Fabric8AnalysisLSPPreferences.getInstance().isLSPServerEnabled()) { try { // not sure if this actually works start(); @@ -176,10 +173,10 @@ public void preferenceChange(PreferenceChangeEvent event) { private static File getServerLocation() { try { - Bundle bundle = Platform.getBundle(Fabric8AnalysisLSUIActivator.PLUGIN_ID); + Bundle bundle = Platform.getBundle(Fabric8AnalysisLSPCoreActivator.PLUGIN_ID); return new File(FileLocator.getBundleFile(bundle), "server/server.js"); } catch (IOException e) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Cannot find the Fabric8 analyses server location", e); + Fabric8AnalysisLSPCoreActivator.getDefault().logError("Cannot find the Fabric8 analyses server location", e); return null; } } @@ -213,7 +210,7 @@ private static File getNodeJsLocation() { String message = "`node` is missing in your PATH, Fabric8 Fabric8 analyses server won't work.\n" + "Please install `node` and make it available in your PATH"; - MessageDialogUtils.displayErrorMessage(message); + Fabric8AnalysisLSPCoreActivator.getDefault().logError(message); return null; } diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/.gitignore b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/.gitignore new file mode 100644 index 0000000..0138dc4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/.gitignore @@ -0,0 +1,7 @@ +/bin/ +.classpath/ +.project/ +.settings/ +target/ +**/.DS_Store + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/META-INF/MANIFEST.MF b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000..f75e6cd --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/META-INF/MANIFEST.MF @@ -0,0 +1,20 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.lsp.ui;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.ui, + org.eclipse.swt, + org.eclipse.core.runtime, + com.redhat.fabric8analytics.eclipse.ui, + com.redhat.fabric8analytics.eclipse.lsp.core, + com.redhat.fabric8analytics.eclipse.core, + org.eclipse.equinox.security +Bundle-Activator: com.redhat.fabric8analytics.eclipse.lsp.ui.Fabric8AnalysisLSPUIActivator +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Export-Package: com.redhat.fabric8analytics.eclipse.lsp.ui + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/build.properties b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/build.properties new file mode 100644 index 0000000..0318a5f --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties +src.includes = * +src.excludes = src diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/plugin.properties b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.properties similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/plugin.properties rename to plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.properties diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.xml new file mode 100644 index 0000000..ab557db --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/plugin.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/pom.xml b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/pom.xml new file mode 100644 index 0000000..01e20f8 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/pom.xml @@ -0,0 +1,13 @@ + + 4.0.0 + + com.redhat.fabric8analytics.eclipse + plugins + 0.0.1-SNAPSHOT + + + com.redhat.fabric8analytics.eclipse.lsp.ui + eclipse-plugin + + diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisLSUIActivator.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/Fabric8AnalysisLSPUIActivator.java similarity index 82% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisLSUIActivator.java rename to plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/Fabric8AnalysisLSPUIActivator.java index 9534c48..1746558 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisLSUIActivator.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/Fabric8AnalysisLSPUIActivator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 Red Hat Inc.. + * Copyright (c) 2018 Red Hat Inc.. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.lsp.ui; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -19,17 +19,17 @@ /** * The activator class controls the plug-in life cycle */ -public class Fabric8AnalysisLSUIActivator extends AbstractUIPlugin { +public class Fabric8AnalysisLSPUIActivator extends AbstractUIPlugin { - public static final String PLUGIN_ID = "com.redhat.fabric8analytics.lsp.eclipse.ui"; + public static final String PLUGIN_ID = "com.redhat.fabric8analytics.eclipse.lsp.ui"; // The shared instance - private static Fabric8AnalysisLSUIActivator plugin; + private static Fabric8AnalysisLSPUIActivator plugin; /** * The constructor */ - public Fabric8AnalysisLSUIActivator() { + public Fabric8AnalysisLSPUIActivator() { } @Override @@ -49,7 +49,7 @@ public void stop(BundleContext context) throws Exception { * * @return the shared instance */ - public static Fabric8AnalysisLSUIActivator getDefault() { + public static Fabric8AnalysisLSPUIActivator getDefault() { return plugin; } @@ -67,4 +67,6 @@ public void logError(String msg, Throwable t) { IStatus status = new Status(Status.ERROR, PLUGIN_ID, msg, t); getLog().log(status); } + + } diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LSPService.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LSPService.java new file mode 100644 index 0000000..99d12c7 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LSPService.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ +package com.redhat.fabric8analytics.eclipse.lsp.ui; + +import org.eclipse.core.runtime.NullProgressMonitor; + +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; +import com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalysisLSPPreferences; +import com.redhat.fabric8analytics.eclipse.ui.OSIOService; +import com.redhat.fabric8analytics.eclipse.ui.ServiceEnablementException; + +public class LSPService implements OSIOService{ + + @Override + public String getServiceName() { + return "&Fabric8 Analytics LSP Server"; + } + + @Override + public void enable(boolean enable) throws ServiceEnablementException{ + if(enable) { + try { + AnalyticsAuthService.getInstance().login(new NullProgressMonitor()); + } catch (Exception e) { + throw new ServiceEnablementException("Error while logging to openshift.io", e); + } + } + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(enable); + } + + @Override + public boolean isEnabled() { + return Fabric8AnalysisLSPPreferences.getInstance().isLSPServerEnabled(); + } + +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LoginListener.java b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LoginListener.java new file mode 100644 index 0000000..11aa4f4 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.lsp.ui/src/com/redhat/fabric8analytics/eclipse/lsp/ui/LoginListener.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ +package com.redhat.fabric8analytics.eclipse.lsp.ui; + +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.PreferencesUtil; + +import com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalysisLSPPreferences; +import com.redhat.fabric8analytics.eclipse.ui.OSIOLoginListener; + +public class LoginListener implements OSIOLoginListener { + + @Override + public void loggedIn(boolean successfull) { + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(successfull); + if (successfull) { + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + PreferencesUtil + .createPreferenceDialogOn(shell, "com.redhat.fabric8analytics.eclipse.ui.preferences", + new String[] { "com.redhat.fabric8analytics.eclipse.ui.preferences" }, null) + .open(); + + } + }); + } + } + +} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/.gitignore b/plugins/com.redhat.fabric8analytics.eclipse.ui/.gitignore similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/.gitignore rename to plugins/com.redhat.fabric8analytics.eclipse.ui/.gitignore diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/META-INF/MANIFEST.MF b/plugins/com.redhat.fabric8analytics.eclipse.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000..49c2a42 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.ui;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.ui, + org.eclipse.swt, + org.eclipse.core.runtime, + org.eclipse.core.resources;bundle-version="3.12.0", + com.redhat.fabric8analytics.eclipse.core;bundle-version="0.0.1", + org.jboss.tools.openshift.io.ui;bundle-version="3.4.1", + org.eclipse.m2e.core, + org.eclipse.m2e.editor, + org.eclipse.ui.forms, + org.eclipse.ui.ide, + org.jboss.tools.openshift.io.core, + org.eclipse.equinox.security +Eclipse-BundleShape: dir +Bundle-Activator: com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator +Bundle-ActivationPolicy: lazy +Bundle-ClassPath: . +Export-Package: com.redhat.fabric8analytics.eclipse.ui, + com.redhat.fabric8analytics.eclipse.ui.internal;x-friends:="com.redhat.fabric8analytics.lsp.eclipse.ui.tests" + diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/build.properties b/plugins/com.redhat.fabric8analytics.eclipse.ui/build.properties similarity index 91% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/build.properties rename to plugins/com.redhat.fabric8analytics.eclipse.ui/build.properties index bde91b5..6ff4c19 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/build.properties +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/build.properties @@ -6,7 +6,6 @@ bin.includes = META-INF/,\ plugin.properties,\ templates/index.html,\ templates/,\ - server/,\ icons/ src.includes = * src.excludes = src diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/icons/osio-16x16.png b/plugins/com.redhat.fabric8analytics.eclipse.ui/icons/osio-16x16.png similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/icons/osio-16x16.png rename to plugins/com.redhat.fabric8analytics.eclipse.ui/icons/osio-16x16.png diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.properties b/plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.properties new file mode 100644 index 0000000..82b50a6 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.properties @@ -0,0 +1,3 @@ +Bundle-Name=Fabric8Analytics UI Plugin +F8Analytics.command.authorize=Enable Fabric8 Analytics +Bundle-Vendor=JBoss by Red Hat \ No newline at end of file diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/plugin.xml b/plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.xml similarity index 62% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/plugin.xml rename to plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.xml index 91c66a7..a315ee9 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/plugin.xml +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/plugin.xml @@ -1,52 +1,38 @@ - - - - - - - - + + + defaultHandler="com.redhat.fabric8analytics.eclipse.ui.internal.view.StackAnalysisHandler" + id="com.redhat.fabric8analytics.eclipse.ui.StackAnalysisHandler" + name="StackAnalysisHandler"> @@ -55,7 +41,7 @@ @@ -80,9 +66,9 @@ allPopups="false" locationURI="toolbar:org.eclipse.ui.main.toolbar?after=org.eclipse.ui.workbench.help"> + id="com.redhat.fabric8analytics.eclipse.ui.Authorize"> @@ -95,7 +81,7 @@ @@ -116,6 +102,6 @@ - + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/pom.xml b/plugins/com.redhat.fabric8analytics.eclipse.ui/pom.xml new file mode 100644 index 0000000..a175e11 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/pom.xml @@ -0,0 +1,13 @@ + + 4.0.0 + + com.redhat.fabric8analytics.eclipse + plugins + 0.0.1-SNAPSHOT + + + com.redhat.fabric8analytics.eclipse.ui + eclipse-plugin + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.login.listener.exsd b/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.login.listener.exsd new file mode 100644 index 0000000..017a2ac --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.login.listener.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.service.preference.exsd b/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.service.preference.exsd new file mode 100644 index 0000000..657d41d --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/schema/com.redhat.fabric8analytics.eclipse.ui.service.preference.exsd @@ -0,0 +1,85 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/Fabric8AnalysisUIActivator.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/Fabric8AnalysisUIActivator.java new file mode 100644 index 0000000..92715fc --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/Fabric8AnalysisUIActivator.java @@ -0,0 +1,119 @@ +/******************************************************************************* + * Copyright (c) 2017 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ + +package com.redhat.fabric8analytics.eclipse.ui; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Fabric8AnalysisUIActivator extends AbstractUIPlugin { + + public static final String PLUGIN_ID = "com.redhat.fabric8analytics.eclipse.ui"; + + public static final String SERVICES_EXTENSION_POINT_ID = "com.redhat.fabric8analytics.eclipse.ui.service.preference"; + public static final String LISTENERS_EXTENSION_POINT_ID = "com.redhat.fabric8analytics.eclipse.ui.login.listener"; + + private static List loginListeners; + private static List services; + + // The shared instance + private static Fabric8AnalysisUIActivator plugin; + + /** + * The constructor + */ + public Fabric8AnalysisUIActivator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Fabric8AnalysisUIActivator getDefault() { + return plugin; + } + + public void logInfo(String msg) { + IStatus status = new Status(Status.INFO, PLUGIN_ID, msg); + getLog().log(status); + } + + public void logError(String msg) { + IStatus status = new Status(Status.ERROR, PLUGIN_ID, msg); + getLog().log(status); + } + + public void logError(String msg, Throwable t) { + IStatus status = new Status(Status.ERROR, PLUGIN_ID, msg, t); + getLog().log(status); + } + + public List getOSIOLoginListeners() { + if (loginListeners == null) { + loginListeners = new ArrayList<>(); + for (IConfigurationElement element : Platform.getExtensionRegistry() + .getConfigurationElementsFor(LISTENERS_EXTENSION_POINT_ID)) { + try { + if (element.getName().equals("listener")) { + OSIOLoginListener osioService = (OSIOLoginListener) element.createExecutableExtension("class"); + loginListeners.add(osioService); + } + } catch (CoreException e) { + logError("Error occured while retrieving osio login listeners", e); + } + } + } + return loginListeners; + } + + public List getOSIOServices() { + if (services == null) { + services = new ArrayList<>(); + for (IConfigurationElement element : Platform.getExtensionRegistry() + .getConfigurationElementsFor(SERVICES_EXTENSION_POINT_ID)) { + try { + if (element.getName().equals("service")) { + OSIOService osioService = (OSIOService) element.createExecutableExtension("class"); + services.add(osioService); + } + } catch (CoreException e) { + logError("Error occured while retrieving osio services", e); + } + } + } + return services; + } + +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOLoginListener.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOLoginListener.java new file mode 100644 index 0000000..cd7cc80 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOLoginListener.java @@ -0,0 +1,7 @@ +package com.redhat.fabric8analytics.eclipse.ui; + +public interface OSIOLoginListener { + + public void loggedIn(boolean successfull); + +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOService.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOService.java new file mode 100644 index 0000000..ad4b0ba --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/OSIOService.java @@ -0,0 +1,11 @@ +package com.redhat.fabric8analytics.eclipse.ui; + +public interface OSIOService { + + public String getServiceName(); + + public boolean isEnabled(); + + public void enable(boolean enabled) throws ServiceEnablementException; + +} diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/ServiceEnablementException.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/ServiceEnablementException.java new file mode 100644 index 0000000..f87a2f1 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/ServiceEnablementException.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2017 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ + +package com.redhat.fabric8analytics.eclipse.ui; + +public class ServiceEnablementException extends Exception { + + private static final long serialVersionUID = -3361522461631654408L; + + public ServiceEnablementException(Exception e) { + super(e); + } + + public ServiceEnablementException(String msg, Exception e) { + super(msg,e ); + } +} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/AnalysesJobHandler.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/AnalysesJobHandler.java similarity index 76% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/AnalysesJobHandler.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/AnalysesJobHandler.java index 1337d9c..6ceee68 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/AnalysesJobHandler.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/AnalysesJobHandler.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.internal; +package com.redhat.fabric8analytics.eclipse.ui.internal; import java.io.IOException; import java.net.URL; @@ -23,13 +23,13 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IViewPart; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.job.RetrieveResultsJob; -import com.redhat.fabric8analytics.lsp.eclipse.core.job.SendToFabric8AnalysisJob; -import com.redhat.fabric8analytics.lsp.eclipse.ui.EditorComposite; -import com.redhat.fabric8analytics.lsp.eclipse.ui.ExitHandler; -import com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalysisLSUIActivator; -import com.redhat.fabric8analytics.lsp.eclipse.ui.StackAnalysesView; +import com.redhat.fabric8analytics.eclipse.ui.internal.pom.EditorComposite; +import com.redhat.fabric8analytics.eclipse.ui.internal.view.StackAnalysesView; +import com.redhat.fabric8analytics.eclipse.ui.internal.view.StackAnalysisHandler; +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.job.RetrieveResultsJob; +import com.redhat.fabric8analytics.eclipse.core.job.SendToFabric8AnalysisJob; public class AnalysesJobHandler { @@ -53,14 +53,14 @@ public AnalysesJobHandler(RecommenderAPIProvider provider, Set pomFiles, public void analyze() { URL url; try { - url = new URL("platform:/plugin/com.redhat.fabric8analytics.lsp.eclipse.ui/templates/index.html"); + url = new URL("platform:/plugin/"+Fabric8AnalysisUIActivator.PLUGIN_ID+"/templates/index.html"); url = FileLocator.toFileURL(url); } catch (IOException e ) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Error while retrieving browser template", e); + Fabric8AnalysisUIActivator.getDefault().logError("Error while retrieving browser template", e); return; } if (editorComposite == null) { - IViewPart mainView = ExitHandler.getView(); + IViewPart mainView = StackAnalysisHandler.getView(); ((StackAnalysesView) mainView).updatebrowserUrl(url.toString()); } else { editorComposite.updateBrowser(url.toString()); @@ -106,7 +106,7 @@ private void syncWithUi(String analysisURL) { Display.getDefault().asyncExec(new Runnable() { public void run() { if (editorComposite == null) { - ((StackAnalysesView) ExitHandler.getView()).updatebrowserUrl(analysisURL); + ((StackAnalysesView) StackAnalysisHandler.getView()).updatebrowserUrl(analysisURL); } else { editorComposite.updateBrowser(analysisURL); } @@ -119,7 +119,7 @@ private void disposeBrowsers() { Display.getDefault().syncExec(new Runnable () { public void run() { if(editorComposite == null) { - ((StackAnalysesView) ExitHandler.getView()).disposebrowserUrl(); + ((StackAnalysesView) StackAnalysisHandler.getView()).disposebrowserUrl(); } else { editorComposite.disposeBrowser(); } diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/MessageDialogUtils.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/MessageDialogUtils.java similarity index 79% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/MessageDialogUtils.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/MessageDialogUtils.java index 475f84c..9f403de 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/MessageDialogUtils.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/MessageDialogUtils.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.internal; +package com.redhat.fabric8analytics.eclipse.ui.internal; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.equinox.security.storage.StorageException; @@ -17,9 +17,9 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.PlatformUI; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalysisLSUIActivator; +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; public class MessageDialogUtils { @@ -38,14 +38,14 @@ public static AnalyticsAuthData proptForLogin(IProgressMonitor monitor) { try { return AnalyticsAuthService.getInstance().login(monitor); } catch (StorageException e) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Error while storing Fabric8Analytics data", e); + Fabric8AnalysisUIActivator.getDefault().logError("Error while storing Fabric8Analytics data", e); } } return null; } public static void displayErrorMessage(String message) { - Fabric8AnalysisLSUIActivator.getDefault().logError(message); + Fabric8AnalysisUIActivator.getDefault().logError(message); Display.getDefault().asyncExec(new Runnable() { public void run() { MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Fabric8 error message", message); @@ -54,7 +54,7 @@ public void run() { } public static void displayErrorMessage(String message, Throwable t) { - Fabric8AnalysisLSUIActivator.getDefault().logError(message, t); + Fabric8AnalysisUIActivator.getDefault().logError(message, t); Display.getDefault().asyncExec(new Runnable() { public void run() { MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Fabric8 error message", message); diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/WorkspaceFilesFinder.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/WorkspaceFilesFinder.java similarity index 97% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/WorkspaceFilesFinder.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/WorkspaceFilesFinder.java index d777332..6107bcb 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/WorkspaceFilesFinder.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/WorkspaceFilesFinder.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.internal; +package com.redhat.fabric8analytics.eclipse.ui.internal; import java.util.Collections; import java.util.HashSet; @@ -153,13 +153,10 @@ public IFile findLicense() throws CoreException { * @throws CoreException */ public IFile findLicense(IStructuredSelection selection) throws CoreException { - Set files = new HashSet(); if(selection instanceof IStructuredSelection) { IStructuredSelection structurredSelection = (IStructuredSelection)selection; Object firstSeleciton = structurredSelection.getFirstElement(); - IProject selectedProject = null; - if (firstSeleciton instanceof IProject) { // selectedProject = (IProject) firstSeleciton; for (Object o : selection.toList()) { diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/AuthorizeHandler.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/AuthorizeHandler.java new file mode 100644 index 0000000..6fa5540 --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/AuthorizeHandler.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2017 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ + +package com.redhat.fabric8analytics.eclipse.ui.internal.auth; + +import java.util.List; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.jobs.IJobChangeEvent; +import org.eclipse.core.runtime.jobs.JobChangeAdapter; + +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; +import com.redhat.fabric8analytics.eclipse.ui.OSIOLoginListener; +import com.redhat.fabric8analytics.eclipse.ui.internal.MessageDialogUtils; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.job.LoginToOSIOJob; + +/** + * Handler for menu item "Enable Fabric8 Analyses". + * + * @author Geetika Batra + * + */ +public class AuthorizeHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + LoginToOSIOJob authJob = new LoginToOSIOJob(); + + authJob.addJobChangeListener(new JobChangeAdapter() { + + @Override + public void done(IJobChangeEvent event) { + AnalyticsAuthData analyticsAuthData = authJob.getAnalyticsAuthData(); + if (analyticsAuthData == null) { + List listeners = Fabric8AnalysisUIActivator.getDefault().getOSIOLoginListeners(); + if (listeners != null) { + listeners.stream().forEach(l -> l.loggedIn(false)); + } + MessageDialogUtils.displayInfoMessage("Authorization to Openshift.io was not successful"); + } else { + List listeners = Fabric8AnalysisUIActivator.getDefault().getOSIOLoginListeners(); + if (listeners != null) { + listeners.stream().forEach(l -> l.loggedIn(true)); + } + } + } + }); + + authJob.schedule(); + return null; + } +} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/GetAnalyticsAuthDataJob.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/GetAnalyticsAuthDataJob.java similarity index 77% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/GetAnalyticsAuthDataJob.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/GetAnalyticsAuthDataJob.java index 1a7be20..d91a912 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/internal/GetAnalyticsAuthDataJob.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/auth/GetAnalyticsAuthDataJob.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.internal; +package com.redhat.fabric8analytics.eclipse.ui.internal.auth; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; @@ -18,9 +18,10 @@ import org.eclipse.equinox.security.storage.StorageException; import org.eclipse.swt.widgets.Display; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalysisLSUIActivator; +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; +import com.redhat.fabric8analytics.eclipse.ui.internal.MessageDialogUtils; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; public class GetAnalyticsAuthDataJob extends Job { @@ -40,8 +41,8 @@ protected IStatus run(IProgressMonitor progressMonitor) { } return Status.OK_STATUS; } catch (StorageException e) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Error while retrieving stored data", e); - return new Status(IStatus.ERROR, Fabric8AnalysisLSUIActivator.PLUGIN_ID, + Fabric8AnalysisUIActivator.getDefault().logError("Error while retrieving stored data", e); + return new Status(IStatus.ERROR, Fabric8AnalysisUIActivator.PLUGIN_ID, "Error while retrieving Fabric8Analytics auth data", e); } } diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/EditorComposite.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/EditorComposite.java similarity index 89% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/EditorComposite.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/EditorComposite.java index 2e111f8..a4c8165 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/EditorComposite.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/EditorComposite.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.ui.internal.pom; import java.util.Collections; @@ -30,11 +30,11 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.ui.forms.widgets.FormToolkit; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.AnalysesJobHandler; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.MessageDialogUtils; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.GetAnalyticsAuthDataJob; +import com.redhat.fabric8analytics.eclipse.ui.internal.AnalysesJobHandler; +import com.redhat.fabric8analytics.eclipse.ui.internal.MessageDialogUtils; +import com.redhat.fabric8analytics.eclipse.ui.internal.auth.GetAnalyticsAuthDataJob; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; /** * Class to create composite for page Fabric8Analyses. diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8FormPage.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8FormPage.java similarity index 97% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8FormPage.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8FormPage.java index dab6eef..18a63b3 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8FormPage.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8FormPage.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.ui.internal.pom; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.m2e.core.project.IMavenProjectChangedListener; diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8PomEditorFactory.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8PomEditorFactory.java similarity index 78% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8PomEditorFactory.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8PomEditorFactory.java index 2df1a0c..99fb23a 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8PomEditorFactory.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/pom/Fabric8PomEditorFactory.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.ui.internal.pom; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -18,6 +18,8 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.forms.editor.IFormPage; +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; + /** * Class to create add a page with pom editor. * @@ -32,7 +34,7 @@ public void addPages(MavenPomEditor pomEditor) { try { pomEditor.addPage(page); } catch (PartInitException e) { - Fabric8AnalysisLSUIActivator.getDefault().getLog().log(new Status(IStatus.ERROR, Fabric8AnalysisLSUIActivator.getDefault().getBundle().getSymbolicName(), e.getLocalizedMessage(), e)); + Fabric8AnalysisUIActivator.getDefault().getLog().log(new Status(IStatus.ERROR, Fabric8AnalysisUIActivator.getDefault().getBundle().getSymbolicName(), e.getLocalizedMessage(), e)); } } diff --git a/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/preferences/Fabric8AnalysisPreferencePage.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/preferences/Fabric8AnalysisPreferencePage.java new file mode 100644 index 0000000..fbf861a --- /dev/null +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/preferences/Fabric8AnalysisPreferencePage.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright (c) 2017 Red Hat Inc.. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat Incorporated - initial API and implementation + *******************************************************************************/ + +package com.redhat.fabric8analytics.eclipse.ui.internal.preferences; + +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +import com.redhat.fabric8analytics.eclipse.ui.Fabric8AnalysisUIActivator; +import com.redhat.fabric8analytics.eclipse.ui.OSIOService; +import com.redhat.fabric8analytics.eclipse.ui.ServiceEnablementException; +import com.redhat.fabric8analytics.eclipse.ui.internal.MessageDialogUtils; + +public class Fabric8AnalysisPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { + + public static final String EXTENSION_POINT_ID = "com.redhat.fabric8analytics.eclipse.ui.service.preference"; + + @Override + public void init(IWorkbench workbench) { + setTitle("Fabric8"); + setDescription("Following services will be enabled"); + } + + @Override + protected void performApply() { + super.performApply(); + } + + @Override + protected Control createContents(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + GridLayoutFactory.fillDefaults().applyTo(composite); + composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + for (OSIOService service : Fabric8AnalysisUIActivator.getDefault().getOSIOServices()) { + Button button = new Button(composite, SWT.CHECK); + button.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); + button.setText(service.getServiceName()); + button.setSelection(service.isEnabled()); + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + try { + service.enable(button.getSelection()); + } catch (ServiceEnablementException e1) { + button.setSelection(!button.getSelection()); + MessageDialogUtils.displayErrorMessage("Error occured while enabling osio service", e1); + } + } + }); + } + return composite; + + } +} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/StackAnalysesView.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysesView.java similarity index 94% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/StackAnalysesView.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysesView.java index 24bf691..dd661fd 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/StackAnalysesView.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysesView.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.ui.internal.view; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.swt.SWT; @@ -20,7 +20,7 @@ public class StackAnalysesView extends ViewPart { - public static final String NAME = "com.redhat.fabric8analytics.lsp.eclipse.ui.StackAnalysesView"; + public static final String NAME = "com.redhat.fabric8analytics.eclipse.ui.StackAnalysesView"; private static Browser browser = null; diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/ExitHandler.java b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysisHandler.java similarity index 80% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/ExitHandler.java rename to plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysisHandler.java index 266eb83..aa83e62 100644 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/ExitHandler.java +++ b/plugins/com.redhat.fabric8analytics.eclipse.ui/src/com/redhat/fabric8analytics/eclipse/ui/internal/view/StackAnalysisHandler.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui; +package com.redhat.fabric8analytics.eclipse.ui.internal.view; import java.util.Set; @@ -25,14 +25,14 @@ import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.AnalysesJobHandler; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.MessageDialogUtils; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.GetAnalyticsAuthDataJob; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.WorkspaceFilesFinder; +import com.redhat.fabric8analytics.eclipse.ui.internal.AnalysesJobHandler; +import com.redhat.fabric8analytics.eclipse.ui.internal.MessageDialogUtils; +import com.redhat.fabric8analytics.eclipse.ui.internal.WorkspaceFilesFinder; +import com.redhat.fabric8analytics.eclipse.ui.internal.auth.GetAnalyticsAuthDataJob; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; -public class ExitHandler extends AbstractHandler { +public class StackAnalysisHandler extends AbstractHandler { static String jobId; static IViewPart mainView = null; @@ -85,15 +85,15 @@ public void run() { } public static void setJobId(String jobId) { - ExitHandler.jobId = jobId; + StackAnalysisHandler.jobId = jobId; } public static String getJobId() { - return ExitHandler.jobId; + return StackAnalysisHandler.jobId; } public static void setView(IViewPart mainView) { - ExitHandler.mainView = mainView; + StackAnalysisHandler.mainView = mainView; } public static IViewPart getView() { diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/templates/index.html b/plugins/com.redhat.fabric8analytics.eclipse.ui/templates/index.html similarity index 100% rename from plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/templates/index.html rename to plugins/com.redhat.fabric8analytics.eclipse.ui/templates/index.html diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/META-INF/MANIFEST.MF b/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/META-INF/MANIFEST.MF deleted file mode 100644 index f49b4b1..0000000 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/META-INF/MANIFEST.MF +++ /dev/null @@ -1,31 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: com.redhat.fabric8analytics.lsp.eclipse.ui;singleton:=true -Bundle-Version: 0.0.1.qualifier -Bundle-Vendor: %Bundle-Vendor -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.lsp4e;bundle-version="0.3.0", - org.eclipse.ui, - org.eclipse.swt, - org.eclipse.core.runtime, - org.eclipse.core.resources;bundle-version="3.12.0", - org.json;bundle-version="1.0.0", - org.apache.commons.io;bundle-version="2.2.0", - com.redhat.fabric8analytics.lsp.eclipse.core;bundle-version="0.0.1", - org.jboss.tools.openshift.io.ui;bundle-version="3.4.1", - org.eclipse.m2e.core, - org.eclipse.m2e.editor, - org.eclipse.ui.forms, - org.eclipse.ui.ide, - org.eclipse.m2e.maven.runtime, - org.jboss.tools.openshift.io.core, - org.eclipse.equinox.security -Eclipse-BundleShape: dir -Bundle-Activator: com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalysisLSUIActivator -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: . -Export-Package: com.redhat.fabric8analytics.lsp.eclipse.ui, - com.redhat.fabric8analytics.lsp.eclipse.ui.internal;x-friends:="com.redhat.fabric8analytics.lsp.eclipse.ui.tests" - diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/AuthorizeHandler.java b/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/AuthorizeHandler.java deleted file mode 100644 index a297394..0000000 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/AuthorizeHandler.java +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2017 Red Hat Inc.. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat Incorporated - initial API and implementation - *******************************************************************************/ - -package com.redhat.fabric8analytics.lsp.eclipse.ui; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.IJobChangeEvent; -import org.eclipse.core.runtime.jobs.Job; -import org.eclipse.core.runtime.jobs.JobChangeAdapter; -import org.eclipse.equinox.security.storage.StorageException; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.PreferencesUtil; - -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisPreferences; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.MessageDialogUtils; - -/** - * Handler for menu item "Enable Fabric8 Analyses". - * - * @author Geetika Batra - * - */ -public class AuthorizeHandler extends AbstractHandler { - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - - LoginToOSIOJob authJob = new LoginToOSIOJob(); - - authJob.addJobChangeListener(new JobChangeAdapter() { - - @Override - public void done(IJobChangeEvent event) { - AnalyticsAuthData analyticsAuthData = authJob.getAnalyticsAuthData(); - if (analyticsAuthData == null) { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(false); - MessageDialogUtils.displayInfoMessage("Authorization to Openshift.io was not successful"); - return; - } - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(true); - Display.getDefault().syncExec(new Runnable() { - - @Override - public void run() { - PreferencesUtil - .createPreferenceDialogOn(shell, "com.redhat.fabric8analytics.lsp.eclipse.preferences", - new String[] { "com.redhat.fabric8analytics.lsp.eclipse.preferences" }, null) - .open(); - - } - }); - } - }); - - authJob.schedule(); - return null; - } - - class LoginToOSIOJob extends Job { - - private AnalyticsAuthData analyticsAuthData; - - public LoginToOSIOJob() { - super("Login to Openshift.io"); - } - - @Override - protected IStatus run(IProgressMonitor progressMonitor) { - try { - analyticsAuthData = AnalyticsAuthService.getInstance().login(progressMonitor); - } catch (StorageException e) { - return new Status(IStatus.ERROR, Fabric8AnalysisLSUIActivator.PLUGIN_ID, "Error occured while storing Fabric8Analytics data", e); - } - return Status.OK_STATUS; - } - - public AnalyticsAuthData getAnalyticsAuthData() { - return analyticsAuthData; - } - - } -} diff --git a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisPreferencePage.java b/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisPreferencePage.java deleted file mode 100644 index 4c83bc2..0000000 --- a/plugins/com.redhat.fabric8analytics.lsp.eclipse.ui/src/com/redhat/fabric8analytics/lsp/eclipse/ui/Fabric8AnalysisPreferencePage.java +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2017 Red Hat Inc.. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat Incorporated - initial API and implementation - *******************************************************************************/ - -package com.redhat.fabric8analytics.lsp.eclipse.ui; - -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.equinox.security.storage.StorageException; -import org.eclipse.jface.preference.BooleanFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.jface.util.PropertyChangeEvent; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.preferences.ScopedPreferenceStore; - -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisLSCoreActivator; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisPreferences; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; - -public class Fabric8AnalysisPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { - - static final String PREFERENCE_PAGE_ID = Fabric8AnalysisLSUIActivator.getDefault().getBundle().getSymbolicName() - + ".preferences"; //$NON-NLS-1$ - - private BooleanFieldEditor enableLSPField; - - public Fabric8AnalysisPreferencePage() { - - } - - @Override - public void init(IWorkbench workbench) { - setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, Fabric8AnalysisLSCoreActivator.PLUGIN_ID)); - setTitle("Fabric8"); - setDescription("Following services will be enabled"); - } - - @Override - protected void createFieldEditors() { - enableLSPField = new BooleanFieldEditor(Fabric8AnalysisPreferences.LSP_SERVER_ENABLED, - "&Fabric8 Analytics LSP Server", getFieldEditorParent()); - addField(enableLSPField); - } - - @Override - protected void performApply() { - super.performApply(); - if (enableLSPField != null) { - enableLSPField.load(); - } - } - - @Override - public void propertyChange(PropertyChangeEvent event) { - if(enableLSPField.equals(event.getSource()) && (Boolean)event.getNewValue()) { - // login - try { - AnalyticsAuthService.getInstance().login(new NullProgressMonitor()); - } catch (StorageException e) { - Fabric8AnalysisLSUIActivator.getDefault().logError("Error while logging to openshift.io", e); - } - } - super.propertyChange(event); - } -} diff --git a/plugins/pom.xml b/plugins/pom.xml index b0bc989..84ad343 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -7,13 +7,14 @@ com.redhat.fabric8analytics.parent 0.0.1-SNAPSHOT - com.redhat.fabric8analytics.eclipse plugins com.redhat.fabric8analytics.eclipse plugins pom - com.redhat.fabric8analytics.lsp.eclipse.core - com.redhat.fabric8analytics.lsp.eclipse.ui + com.redhat.fabric8analytics.eclipse.core + com.redhat.fabric8analytics.eclipse.ui + com.redhat.fabric8analytics.eclipse.lsp.core + com.redhat.fabric8analytics.eclipse.lsp.ui diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/META-INF/MANIFEST.MF b/tests/com.redhat.fabric8analytics.eclipse.core.tests/META-INF/MANIFEST.MF similarity index 61% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/META-INF/MANIFEST.MF rename to tests/com.redhat.fabric8analytics.eclipse.core.tests/META-INF/MANIFEST.MF index 7aaaec6..cec2e68 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/META-INF/MANIFEST.MF +++ b/tests/com.redhat.fabric8analytics.eclipse.core.tests/META-INF/MANIFEST.MF @@ -1,20 +1,20 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 -Bundle-Name: Fabricate8analysis Core Tests -Bundle-SymbolicName: com.redhat.fabric8analytics.lsp.eclipse.core.tests;singleton:=true +Bundle-Name: Fabric8Analysis Core Tests +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.core.tests;singleton:=true Bundle-Version: 0.0.1.qualifier Bundle-ActivationPolicy: lazy Bundle-Vendor: JBoss by Red Hat Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.reddeer.go;bundle-version="2.0.0", - org.junit;bundle-version="4.8.2", - com.redhat.fabric8analytics.lsp.eclipse.core;bundle-version="0.0.1", +Require-Bundle: org.junit;bundle-version="4.8.2", + com.redhat.fabric8analytics.eclipse.core;bundle-version="0.0.1", org.mockito;bundle-version="1.9.5", org.hamcrest.library;bundle-version="1.3.0", org.apache.httpcomponents.httpclient;bundle-version="4.5.2", org.apache.httpcomponents.httpcore;bundle-version="4.4.6", org.eclipse.core.resources;bundle-version="3.12.0", org.apache.commons.io;bundle-version="2.2.0", - org.json + org.json, + org.eclipse.core.runtime diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/build.properties b/tests/com.redhat.fabric8analytics.eclipse.core.tests/build.properties similarity index 100% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/build.properties rename to tests/com.redhat.fabric8analytics.eclipse.core.tests/build.properties diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/pom.xml b/tests/com.redhat.fabric8analytics.eclipse.core.tests/pom.xml similarity index 89% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/pom.xml rename to tests/com.redhat.fabric8analytics.eclipse.core.tests/pom.xml index a62b853..30e0676 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/pom.xml +++ b/tests/com.redhat.fabric8analytics.eclipse.core.tests/pom.xml @@ -7,8 +7,7 @@ tests 0.0.1-SNAPSHOT - com.redhat.fabric8analytics.lsp.eclipse.core.tests - com.redhat.fabric8analytics.lsp.eclipse.core.tests + com.redhat.fabric8analytics.eclipse.core.tests eclipse-test-plugin diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/RecommenderAPIProviderTest.java b/tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/RecommenderAPIProviderTest.java similarity index 97% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/RecommenderAPIProviderTest.java rename to tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/RecommenderAPIProviderTest.java index 162b878..6712919 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/RecommenderAPIProviderTest.java +++ b/tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/RecommenderAPIProviderTest.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.tests; +package com.redhat.fabric8analytics.eclipse.core.tests; import static org.hamcrest.CoreMatchers.containsString; @@ -51,10 +51,10 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIException; -import com.redhat.fabric8analytics.lsp.eclipse.core.RecommenderAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIException; +import com.redhat.fabric8analytics.eclipse.core.api.RecommenderAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; public class RecommenderAPIProviderTest { diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/ThreeScaleAPIProviderTest.java b/tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/ThreeScaleAPIProviderTest.java similarity index 95% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/ThreeScaleAPIProviderTest.java rename to tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/ThreeScaleAPIProviderTest.java index 8272bab..8f27cfc 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.core.tests/src/com/redhat/fabric8analytics/lsp/eclipse/core/tests/ThreeScaleAPIProviderTest.java +++ b/tests/com.redhat.fabric8analytics.eclipse.core.tests/src/com/redhat/fabric8analytics/eclipse/core/tests/ThreeScaleAPIProviderTest.java @@ -9,7 +9,7 @@ * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.core.tests; +package com.redhat.fabric8analytics.eclipse.core.tests; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.startsWith; import static org.junit.Assert.assertThat; @@ -34,9 +34,9 @@ import org.junit.Test; import org.mockito.ArgumentCaptor; -import com.redhat.fabric8analytics.lsp.eclipse.core.ThreeScaleAPIException; -import com.redhat.fabric8analytics.lsp.eclipse.core.ThreeScaleAPIProvider; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.api.ThreeScaleAPIException; +import com.redhat.fabric8analytics.eclipse.core.api.ThreeScaleAPIProvider; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; public class ThreeScaleAPIProviderTest { diff --git a/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/META-INF/MANIFEST.MF b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/META-INF/MANIFEST.MF new file mode 100644 index 0000000..8d57aaa --- /dev/null +++ b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Fabricate8analysis UI Tests +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.lsp.core.tests;singleton:=true +Bundle-Version: 0.0.1.qualifier +Bundle-ActivationPolicy: lazy +Bundle-Vendor: JBoss by Red Hat +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.junit;bundle-version="4.8.2", + org.eclipse.core.resources, + org.eclipse.m2e.core.ui, + org.eclipse.m2e.lifecyclemapping.defaults, + org.mockito;bundle-version="1.9.5", + org.hamcrest.library;bundle-version="1.3.0", + com.redhat.fabric8analytics.eclipse.core;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.ui;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.lsp.core;bundle-version="0.0.1", + org.eclipse.equinox.security, + org.eclipse.lsp4e, + org.eclipse.lsp4j.jsonrpc, + org.eclipse.lsp4j, + org.eclipse.core.runtime, + org.eclipse.jface diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/build.properties b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/build.properties similarity index 100% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/build.properties rename to tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/build.properties diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/pom.xml b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/pom.xml similarity index 92% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/pom.xml rename to tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/pom.xml index 70daf77..bb471ce 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/pom.xml +++ b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/pom.xml @@ -7,8 +7,7 @@ tests 0.0.1-SNAPSHOT - com.redhat.fabric8analytics.lsp.eclipse.ui.tests - com.redhat.fabric8analytics.lsp.eclipse.ui.tests + com.redhat.fabric8analytics.eclipse.lsp.core.tests eclipse-test-plugin diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/resources/securepass b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/resources/securepass similarity index 100% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/resources/securepass rename to tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/resources/securepass diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderTest.java b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderTest.java similarity index 83% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderTest.java rename to tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderTest.java index b4836f1..56f7d16 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderTest.java +++ b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.tests; +package com.redhat.fabric8analytics.eclipse.lsp.core.tests; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.is; @@ -34,11 +34,11 @@ import org.junit.Before; import org.junit.Test; -import com.redhat.fabric8analytics.lsp.eclipse.core.Fabric8AnalysisPreferences; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.AnalyticsAuthData; -import com.redhat.fabric8analytics.lsp.eclipse.core.data.ThreeScaleData; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalyticsStreamConnectionProvider; +import com.redhat.fabric8analytics.eclipse.core.data.AnalyticsAuthData; +import com.redhat.fabric8analytics.eclipse.core.data.ThreeScaleData; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; +import com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalysisLSPPreferences; +import com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalyticsStreamConnectionProvider; public class Fabric8AnalyticsStreamConnectionProviderTest { @@ -50,7 +50,7 @@ public class Fabric8AnalyticsStreamConnectionProviderTest { @Before public void setup() throws StorageException { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(true); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(true); ThreeScaleData scaleData = new ThreeScaleData("www.myurl.com", "www.myurl.com", "userKey"); AnalyticsAuthData data = new AnalyticsAuthData(scaleData, TOKEN); @@ -63,7 +63,7 @@ public void setup() throws StorageException { @After public void after() { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(true); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(true); } @Test @@ -102,7 +102,7 @@ public void start_noToken() throws IOException, StorageException { @Test(expected=IOException.class) public void start_analysesDisabled() throws IOException { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(false); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(false); provider.start(); } @@ -131,12 +131,12 @@ public void startAndStop() throws IOException { @Test public void propertyEnabled() throws IOException { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(false); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(false); assertThat(provider.getInputStream(), is(nullValue())); assertThat(provider.getOutputStream(), is(nullValue())); - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(true); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(true); assertThat(provider.getInputStream(), is(not(nullValue()))); assertThat(provider.getOutputStream(), is(not(nullValue()))); @@ -144,7 +144,7 @@ public void propertyEnabled() throws IOException { @Test public void propertyDisabled() throws IOException { - Fabric8AnalysisPreferences.getInstance().setLSPServerEnabled(false); + Fabric8AnalysisLSPPreferences.getInstance().setLSPServerEnabled(false); assertTrue("No exception expected", true); // there is no way of knowing if the server is stopped diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java similarity index 81% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java rename to tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java index 85757c8..064c466 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java +++ b/tests/com.redhat.fabric8analytics.eclipse.lsp.core.tests/src/com/redhat/fabric8analytics/eclipse/lsp/core/tests/Fabric8AnalyticsStreamConnectionProviderWrapper.java @@ -8,10 +8,10 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.tests; +package com.redhat.fabric8analytics.eclipse.lsp.core.tests; -import com.redhat.fabric8analytics.lsp.eclipse.core.internal.AnalyticsAuthService; -import com.redhat.fabric8analytics.lsp.eclipse.ui.Fabric8AnalyticsStreamConnectionProvider; +import com.redhat.fabric8analytics.eclipse.core.internal.AnalyticsAuthService; +import com.redhat.fabric8analytics.eclipse.lsp.core.Fabric8AnalyticsStreamConnectionProvider; //wrapper class for Fabric8AnalyticsStreamConnectionProvider to be able to access protected methods public class Fabric8AnalyticsStreamConnectionProviderWrapper extends Fabric8AnalyticsStreamConnectionProvider{ diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/META-INF/MANIFEST.MF b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/META-INF/MANIFEST.MF similarity index 55% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/META-INF/MANIFEST.MF rename to tests/com.redhat.fabric8analytics.eclipse.ui.tests/META-INF/MANIFEST.MF index 760262b..e54f6b1 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/META-INF/MANIFEST.MF +++ b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/META-INF/MANIFEST.MF @@ -1,21 +1,23 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Fabricate8analysis UI Tests -Bundle-SymbolicName: com.redhat.fabric8analytics.lsp.eclipse.ui.tests;singleton:=true +Bundle-SymbolicName: com.redhat.fabric8analytics.eclipse.ui.tests;singleton:=true Bundle-Version: 0.0.1.qualifier Bundle-ActivationPolicy: lazy Bundle-Vendor: JBoss by Red Hat Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.reddeer.go;bundle-version="2.0.0", - org.junit;bundle-version="4.8.2", +Require-Bundle: org.junit;bundle-version="4.8.2", org.eclipse.core.resources, org.eclipse.m2e.core.ui, org.eclipse.m2e.lifecyclemapping.defaults, org.mockito;bundle-version="1.9.5", org.hamcrest.library;bundle-version="1.3.0", - com.redhat.fabric8analytics.lsp.eclipse.core;bundle-version="0.0.1", - com.redhat.fabric8analytics.lsp.eclipse.ui;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.core;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.ui;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.lsp.core;bundle-version="0.0.1", org.eclipse.equinox.security, org.eclipse.lsp4e, org.eclipse.lsp4j.jsonrpc, - org.eclipse.lsp4j + org.eclipse.lsp4j, + org.eclipse.core.runtime, + org.eclipse.jface diff --git a/tests/com.redhat.fabric8analytics.eclipse.ui.tests/build.properties b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/build.properties new file mode 100644 index 0000000..34d2e4d --- /dev/null +++ b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/tests/com.redhat.fabric8analytics.eclipse.ui.tests/pom.xml b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/pom.xml new file mode 100644 index 0000000..6b4cb86 --- /dev/null +++ b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + + com.redhat.fabric8analytics.tests + tests + 0.0.1-SNAPSHOT + + com.redhat.fabric8analytics.eclipse.ui.tests + eclipse-test-plugin + + + + + org.eclipse.tycho + tycho-surefire-plugin + + -eclipse.password ${project.basedir}/resources/securepass + + **/*Test.class + + + **/Abstract*.class + + + + p2-installable-unit + org.mockito + 1.9.5 + + + p2-installable-unit + org.hamcrest + 0.0.0 + + + + + + org.eclipse.tycho + target-platform-configuration + + p2 + consider + true + + + + p2-installable-unit + org.eclipse.equinox.p2.core.feature.feature.group + 0.0.0 + + + + + + + + diff --git a/tests/com.redhat.fabric8analytics.eclipse.ui.tests/resources/securepass b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/resources/securepass new file mode 100644 index 0000000..b7e5ff7 --- /dev/null +++ b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/resources/securepass @@ -0,0 +1 @@ +masterpassword \ No newline at end of file diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/WorkspaceFilesFinderTest.java b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/src/com/redhat/fabric8analytics/eclipse/ui/tests/WorkspaceFilesFinderTest.java similarity index 98% rename from tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/WorkspaceFilesFinderTest.java rename to tests/com.redhat.fabric8analytics.eclipse.ui.tests/src/com/redhat/fabric8analytics/eclipse/ui/tests/WorkspaceFilesFinderTest.java index 44d9a9d..5f49abb 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.tests/src/com/redhat/fabric8analytics/lsp/eclipse/ui/tests/WorkspaceFilesFinderTest.java +++ b/tests/com.redhat.fabric8analytics.eclipse.ui.tests/src/com/redhat/fabric8analytics/eclipse/ui/tests/WorkspaceFilesFinderTest.java @@ -8,7 +8,7 @@ * Contributors: * Red Hat Incorporated - initial API and implementation *******************************************************************************/ -package com.redhat.fabric8analytics.lsp.eclipse.ui.tests; +package com.redhat.fabric8analytics.eclipse.ui.tests; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; @@ -36,7 +36,7 @@ import org.junit.After; import org.junit.Test; -import com.redhat.fabric8analytics.lsp.eclipse.ui.internal.WorkspaceFilesFinder; +import com.redhat.fabric8analytics.eclipse.ui.internal.WorkspaceFilesFinder; public class WorkspaceFilesFinderTest { diff --git a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.itests/META-INF/MANIFEST.MF b/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.itests/META-INF/MANIFEST.MF index 7e44bfc..b90f21e 100644 --- a/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.itests/META-INF/MANIFEST.MF +++ b/tests/com.redhat.fabric8analytics.lsp.eclipse.ui.itests/META-INF/MANIFEST.MF @@ -12,7 +12,9 @@ Require-Bundle: org.eclipse.reddeer.go;bundle-version="2.0.0", org.eclipse.core.resources, org.eclipse.m2e.core.ui, org.eclipse.m2e.lifecyclemapping.defaults, - com.redhat.fabric8analytics.lsp.eclipse.core;bundle-version="0.0.1", - com.redhat.fabric8analytics.lsp.eclipse.ui;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.core;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.ui;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.lsp.core;bundle-version="0.0.1", + com.redhat.fabric8analytics.eclipse.lsp.ui;bundle-version="0.0.1", org.jboss.tools.openshift.common.ui;bundle-version="3.4.2", org.jboss.tools.openshift.reddeer;bundle-version="3.4.2" diff --git a/tests/pom.xml b/tests/pom.xml index dc1eb32..4184221 100644 --- a/tests/pom.xml +++ b/tests/pom.xml @@ -17,7 +17,8 @@ - com.redhat.fabric8analytics.lsp.eclipse.core.tests - com.redhat.fabric8analytics.lsp.eclipse.ui.tests + com.redhat.fabric8analytics.eclipse.core.tests + com.redhat.fabric8analytics.eclipse.ui.tests + com.redhat.fabric8analytics.eclipse.lsp.core.tests