diff --git a/Code/package-lock.json b/Code/package-lock.json index bec1b89..fa1a346 100644 --- a/Code/package-lock.json +++ b/Code/package-lock.json @@ -38,21 +38,112 @@ } } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=" + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", @@ -67,6 +158,33 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "browserify-zlib": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", @@ -82,15 +200,33 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, "camelcase": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", + "dev": true }, "camelcase-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", + "dev": true, "requires": { "camelcase": "^2.0.0", "map-obj": "^1.0.0" @@ -106,6 +242,27 @@ "supports-color": "^5.3.0" } }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "clean-css": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", @@ -115,10 +272,14 @@ "source-map": "~0.6.0" } }, - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=" + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } }, "color-convert": { "version": "1.9.3", @@ -144,6 +305,11 @@ "integrity": "sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==", "dev": true }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -161,6 +327,11 @@ "typedarray": "^0.0.6" } }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -171,23 +342,76 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", + "dev": true, "requires": { "array-find-index": "^1.0.1" } }, "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" + "ms": "2.0.0" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" }, "duplexer": { "version": "0.1.1", @@ -204,6 +428,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -233,6 +458,46 @@ "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "exports-loader": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-0.7.0.tgz", @@ -249,6 +514,89 @@ } } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, "figures": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", @@ -265,10 +613,32 @@ "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", "dev": true }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -293,9 +663,52 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" } } }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "requires": { + "for-in": "^1.0.1" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -304,7 +717,13 @@ "get-stdin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=" + "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", + "dev": true + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "getobject": { "version": "0.1.0", @@ -312,62 +731,98 @@ "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=" }, "glob": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", - "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.2", + "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + } + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" } }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true }, "grunt": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.1.0.tgz", - "integrity": "sha512-+NGod0grmviZ7Nzdi9am7vuRS/h76PcWDsV635mEXF0PEQMUV6Kb+OjTdsVxbi0PZmfQOjCMKb3w8CVZcqsn1g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.2.0.tgz", + "integrity": "sha512-uGMrucC+isjLBEcEyQjaSj41ehhePr07uCykQFJR0ciKs9kDsLdr1L976+v5aFsLB+l0n7JoWpovs941xbI9MA==", "requires": { - "coffeescript": "~1.10.0", - "dateformat": "~1.0.12", + "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", - "exit": "~0.1.1", + "exit": "~0.1.2", "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", + "glob": "~7.1.6", + "grunt-cli": "~1.3.2", "grunt-known-options": "~1.1.0", "grunt-legacy-log": "~2.0.0", "grunt-legacy-util": "~1.1.1", "iconv-lite": "~0.4.13", - "js-yaml": "~3.13.1", - "minimatch": "~3.0.2", - "mkdirp": "~1.0.3", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.6.2" + "path-is-absolute": "~2.0.0", + "rimraf": "~3.0.2" }, "dependencies": { "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz", + "integrity": "sha512-8OHDiZZkcptxVXtMfDxJvmN7MVJNE8L/yIcPb4HB7TlyFD1kDvjHrb62uhySsU14wJx9ORMnTuhRMQ40lH/orQ==", "requires": { - "findup-sync": "~0.3.0", "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" + "interpret": "~1.1.0", + "liftoff": "~2.5.0", + "nopt": "~4.0.1", + "v8flags": "~3.1.1" + }, + "dependencies": { + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + } } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" } } }, @@ -580,6 +1035,43 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "requires": { + "parse-passwd": "^1.0.0" + } + }, "hooker": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", @@ -588,7 +1080,8 @@ "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true }, "iconv-lite": { "version": "0.4.24", @@ -611,6 +1104,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", + "dev": true, "requires": { "repeating": "^2.0.0" } @@ -629,41 +1123,190 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==" + "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", + "dev": true + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "requires": { + "unc-path-regex": "^0.1.2" + } }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, "jquery": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" }, "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -677,10 +1320,44 @@ "minimist": "^1.2.0" } }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + } + } + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -708,15 +1385,38 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", + "dev": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" } }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, "map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=" + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } }, "maxmin": { "version": "1.1.0", @@ -761,6 +1461,7 @@ "version": "3.7.0", "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", + "dev": true, "requires": { "camelcase-keys": "^2.0.0", "decamelize": "^1.1.2", @@ -774,6 +1475,26 @@ "trim-newlines": "^1.0.0" } }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -787,11 +1508,53 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -804,6 +1567,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", @@ -820,7 +1584,72 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "requires": { + "isobject": "^3.0.1" + } }, "once": { "version": "1.4.0", @@ -830,20 +1659,60 @@ "wrappy": "1" } }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "pako": { "version": "0.2.9", "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", "dev": true }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { "error-ex": "^1.2.0" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -857,24 +1726,39 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, "requires": { "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-2.0.0.tgz", + "integrity": "sha512-ajROpjq1SLxJZsgSVCcVIt+ZebVH+PwJtPnVESjfg6JKwJGwAgHRC3zIcjvI0LnecjIHCJhtfNZ/Y/RregqyXg==" }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=" + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -895,21 +1779,29 @@ "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, "requires": { "pinkie": "^2.0.0" } }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, "pretty-bytes": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", @@ -935,6 +1827,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -945,6 +1838,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -965,19 +1859,48 @@ "util-deprecate": "~1.0.1" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "requires": { + "resolve": "^1.1.6" + } + }, "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", + "dev": true, "requires": { "indent-string": "^2.1.0", "strip-indent": "^1.0.1" } }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, "repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", + "dev": true, "requires": { "is-finite": "^1.0.0" } @@ -990,27 +1913,31 @@ "path-parse": "^1.0.6" } }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" + }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "requires": { "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "safe-buffer": { @@ -1019,6 +1946,14 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1027,22 +1962,165 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" + }, "spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -1051,12 +2129,14 @@ "spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true }, "spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -1065,13 +2145,41 @@ "spdx-license-ids": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } }, "sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1094,6 +2202,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, "requires": { "is-utf8": "^0.2.0" } @@ -1102,6 +2211,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", + "dev": true, "requires": { "get-stdin": "^4.0.1" } @@ -1114,10 +2224,49 @@ "has-flag": "^3.0.0" } }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, "trim-newlines": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=" + "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", + "dev": true }, "typedarray": { "version": "0.0.6", @@ -1135,6 +2284,11 @@ "source-map": "~0.6.1" } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=" + }, "underscore.string": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", @@ -1144,12 +2298,69 @@ "util-deprecate": "^1.0.2" } }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } + }, "uri-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", "integrity": "sha1-l0fwGDWJM8Md4PzP2C0TjmcmLjI=", "dev": true }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", @@ -1170,10 +2381,19 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" diff --git a/Code/package.json b/Code/package.json index 95dcb62..d1b4ad7 100644 --- a/Code/package.json +++ b/Code/package.json @@ -9,7 +9,7 @@ "author": "Clément Maisonhaute", "license": "ISC", "dependencies": { - "grunt": "^1.1.0", + "grunt": "^1.2.0", "jquery": "^3.5.1", "phaser": "^3.23.0" }, diff --git a/Code/public/js/level2.min.js b/Code/public/js/level2.min.js index 19ce48b..e6397e9 100644 --- a/Code/public/js/level2.min.js +++ b/Code/public/js/level2.min.js @@ -1 +1 @@ -class AddAttack extends AddNode{constructor(e,t,s){super(e,t,s)}create(){console.log("ATTACK"),super.create(this),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/16,selectWord("ADD NODE : ATTACK","AJOUTER ACTION : ATTAQUE")),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/(16/3),selectWord("WHO ?","QUI ?")),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/(16/7),selectWord("TARGET FILTERS (OPTIONAL)","FILTRES CIBLES (FACULTATIF)")),super.addButton(WIDTH_WINDOW/2,HEIGHT_WINDOW/3.2,"enemyBot",super.newCategory("target",!0,!0),!1);let e=super.newCategory("range",!0,!0);super.addButton(WIDTH_WINDOW/3,HEIGHT_WINDOW/(16/9),"shortRange",e,1/3),super.addButton(WIDTH_WINDOW/1.5,HEIGHT_WINDOW/(16/9),"mediumRange",e,2/3),super.addButton(WIDTH_WINDOW/2,HEIGHT_WINDOW/(16/12),"longRange",e,1)}addNode(){super.verifyCategory()&&(this.selected.addRect(new RectangleNode(this.selected.getX(),this.selected.getY()+200,this.gameR,"attack",this.lCategory[1].getValue())),super.cancel())}}class AddCondition extends AddNode{constructor(e,t,s){super(e,t,s)}create(){super.create(this),console.log("CONDITION"),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/16,selectWord("ADD NODE : CONDITION","AJOUTER ACTION : CONDITION")),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/(16/3),selectWord("WHO ?","QUI ?")),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/(16/7),selectWord("TARGET FILTERS (OPTIONAL)","FILTRES CIBLES (FACULTATIF)"));let e=super.newCategory("target",!0,!0);super.addButton(WIDTH_WINDOW/3,HEIGHT_WINDOW/3.2,"enemyBot",e,!1),super.addButton(WIDTH_WINDOW/1.5,HEIGHT_WINDOW/3.2,"myself",e,!0);let t=super.newCategory("shield",!0,!0);super.addButton(WIDTH_WINDOW/3,HEIGHT_WINDOW/(16/9),"shield0",t,0),super.addButton(WIDTH_WINDOW/1.5,HEIGHT_WINDOW/(16/9),"shield33",t,1/3),super.addButton(WIDTH_WINDOW/3,HEIGHT_WINDOW/(16/12),"shield66",t,2/3),super.addButton(WIDTH_WINDOW/1.5,HEIGHT_WINDOW/(16/12),"shield100",t,1)}addNode(){super.verifyCategory()&&(this.selected.addRect(new RectangleNode(this.selected.getX(),this.selected.getY()+200,this.gameR,"condition",this.lCategory[0].getValue(),!0,!1,this.lCategory[1].getValue(),0)),super.cancel())}}class AddMove extends AddNode{constructor(e,t,s){super(e,t,s)}create(){console.log("MOVE"),super.create(this),super.addTitle(WIDTH_WINDOW/2,HEIGHT_WINDOW/16,selectWord("ADD NODE : MOVE","AJOUTER ACTION : DEPLACEMENT")),super.addTitle(WIDTH_WINDOW/4,HEIGHT_WINDOW/(16/3),selectWord("FLEE OR MOVE ?","RECULER OU AVANCER ?"));let e=super.newCategory("direction",!0,!0);super.addButton(WIDTH_WINDOW/6,HEIGHT_WINDOW/3.2,"fleeFrom",e,!1),super.addButton(WIDTH_WINDOW/3,HEIGHT_WINDOW/3.2,"moveToward",e,!0),super.addTitle(WIDTH_WINDOW/4*3,HEIGHT_WINDOW/(16/3),selectWord("WHO ?","QUI ?"));let t=super.newCategory("target",!0,!0);super.addButton(WIDTH_WINDOW/6*4,HEIGHT_WINDOW/3.2,"enemyBot",t,!0),super.addButton(WIDTH_WINDOW/6*5,HEIGHT_WINDOW/3.2,"bonus",t,!1)}addNode(){super.verifyCategory()&&(this.selected.addRect(new RectangleNode(this.selected.getX(),this.selected.getY()+200,this.gameR,"move",this.lCategory[0].getValue(),this.lCategory[1].getValue())),super.cancel())}}class Attack{constructor(e=1){e>1/3?e>2/3?(e=1,this.percentBonus=1):(e=2/3,this.percentBonus=1.5):(e=1/3,this.percentBonus=2),this.percentRange=e}do(e){return!(!e.haveTarget()||!e.isTargetInRange(this.percentRange))&&e.attackTarget(this.percentBonus)}getFrame(){return 3*this.percentRange-1}}class Bar extends HealthBar{constructor(e,t,s,i,h,a,n,r){super(e,t,s,i,h,n,r,r),this.scene=e,this.scene.input.on("pointerdown",this.doDrag,this);let o={font:s.toString()+"px stencil",fill:"#e2e2e2"};this.text=this.scene.add.text(this.bar.x+this.width+10,this.bar.y,this.value.toString(),o).setOrigin(0,0),this.setValue(a)}doDrag(){let e=this.scene.input;e.x>=this.bar.x&&e.x<=this.bar.x+this.width&&e.y>=this.bar.y&&e.y<=this.bar.y+this.height&&(this.scene.pauseScene(),this.clickOn())}clickOn(){this.onMove(),this.scene.input.on("pointermove",()=>this.onMove()),this.scene.input.on("pointerup",()=>this.stopClick())}stopClick(){this.scene.input.off("pointermove"),this.scene.input.off("pointerup")}onMove(){this.setValWithX(this.scene.input.x)}setValWithX(e){this.setValue(Math.round((e-this.bar.x)/this.width*this.valueMax))}draw(){super.draw();let e=this.value/this.valueMax*this.width-5;this.bar.fillStyle(9868950),this.bar.fillRect(e,0,10,this.height),void 0!==this.text&&this.text.setText(this.value.toString())}}class BonusAttack extends Bonus{constructor(e,t,s,i,h){super(e,t,s,i,"bonusAttack",h)}useOn(e){let t=e.speed;e.setSpeed(t+this.value),this.scene.time.addEvent({delay:this.time,callback:e.setSpeed(t)}),this.destroy()}}class BonusShield extends Bonus{constructor(e,t,s,i,h){super(e,t,s,i,"bonusShield",h)}useOn(e){e.shield.valueMax=e.shield.valueMax+this.value,e.shield.value=e.shield.value+this.val,this.destroy()}}class BonusSpeed extends Bonus{constructor(e,t,s,i,h,a){let n;switch(h){case 1:n="bonusSpeed0";break;case 2:n="bonusSpeed1";break;case 3:default:n="bonusSpeed2"}super(e,t,s,i,n,h),this.time=a}useOn(e){e.increaseSpeed(this.value),this.scene.time.addEvent({delay:this.time,callback:()=>e.decreaseSpeed(this.value)}),this.destroy()}}class Boot extends ManageLang{constructor(e){super("Boot",e)}create(){super.create();this.add.text(WIDTH_WINDOW/2,HEIGHT_WINDOW/3,"WARIA",{font:"200px stencil",fill:"#e2e2e2"}).setOrigin(.5,.5);let e=this.add.sprite(WIDTH_WINDOW/2,HEIGHT_WINDOW/3*2,"playLetter").setInteractive();e.on("pointerout",()=>e.setFrame(0)),e.on("pointerover",()=>e.setFrame(1)),e.on("pointerdown",()=>this.clickPlay(e))}clickPlay(e){console.log("Play"),this.father.scene.add("Type",new Type(this.father)),this.scene.start("Type")}}class Category{constructor(e="undefined",t=!0,s=!0){this.name=e,this.single=t,this.lBtn=[],this.lValue=[],this.obligatory=s}add(e,t){0!==this.lBtn.length&&this.single&&(this.lBtn[0].clearTint(),this.lValue=[],this.lBtn=[]),this.lValue.push(t),this.lBtn.push(e),e.tint=15718407}getValue(){return this.single?this.lValue[0]:this.lValue}validate(){return!(0===this.lBtn.length&&this.obligatory)}remove(e){let t=this.lBtn.indexOf(e);-1!==t&&(this.lBtn.splice(t,1),this.lValue.splice(t,1)),e.clearTint()}}class Condition{constructor(e,t=!1,s=!1,i,h){this.shieldFilter=t,this.rangeFilter=s,this.shield=i,this.range=h,this.myself=e,this.lNode=[]}addNode(e){this.lNode.push(e)}do(e){if(this.doCondition(e))for(let t=0;t=h&&(s>h&&(s=h,i=[]),i.push(t))}}),i.length>1?i[Math.floor(Math.random()*(i.length+1))]:i[0]}class Game extends ManageLang{constructor(e){super("Game",e),super.addOtherScenes("GamingBoard"),SPEED_GAME=1}create(){super.create(),this.doLine=!1,this.gm=new GamingBoard(this),-1!==this.father.scene.getIndex("GamingBoard")&&this.father.scene.remove("GamingBoard"),this.father.scene.add("GamingBoard",this.gm),this.scene.launch("GamingBoard"),this.scene.pause("GamingBoard"),this.selected=null,this.damageRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4,OFFY_MAP/2,DAMAGE_BEGIN,5,COLOR_ATTACK),this.speedReloadRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4,0,SPEED_RELOAD_BEGIN,5,COLOR_SPEED_RELOAD),this.speedRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4*3,0,SPEED,5,COLOR_MOVE),this.rangeRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4*3,OFFY_MAP/2,RANGE_BEGIN,5,COLOR_RANGE),this.createButton();let e=WIDTH_WINDOW/4*3,t=WIDTH_WINDOW/10;this.tree=new RectangleNode(e,HEIGHT_WINDOW/10,this,"waria"),this.tree.addRect(new RectangleNode(e-2*t,HEIGHT_WINDOW/3,this,"move",!0,!1)),this.tree.addRect(new RectangleNode(e+t,HEIGHT_WINDOW/3,this,"move",!0)),this.tree.addRect(new RectangleNode(e,HEIGHT_WINDOW/3,this,"attack",1/3));let s=new RectangleNode(e-t,HEIGHT_WINDOW/3,this,"condition",!0,!0,!1,1/3,0);s.addRect(new RectangleNode(e,HEIGHT_WINDOW/1.5,this,"move",!1)),s.addRect(new RectangleNode(e-t,HEIGHT_WINDOW/1.5,this,"attack")),this.tree.addRect(s),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.9*WIDTH_MAP,.9*WIDTH_MAP,6711039,this.gm,MYSELF)),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.2*WIDTH_MAP,.1*WIDTH_MAP,16711680,this.gm)),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.1*WIDTH_MAP,.9*WIDTH_MAP,16711680,this.gm)),this.input.keyboard.on("keydown-DELETE",()=>{this.clickBin()})}update(e,t){super.update(e,t),this.doLine&&this.tree.updateLine()}finish(){let e;console.log("FINISH"),e=this.gm.winner()?new Winner(this.father):new Looser(this.father),this.father.scene.add("Finish",e),this.scene.pause("Game"),this.scene.launch("Finish")}clickNode(){console.log("NODE"),this.tryClick(),this.selected=this.tree.getSelected(),null!==this.selected&&(this.selected!==this.tree&&(this.pencil.setVisible(!0),this.bin.setVisible(!0)),this.selected.canAddNode&&this.plus.setVisible(!0))}doDrag(e,t,s,i){t.setX(s),t.setY(i)}dragStart(){console.log("START DRAG"),this.doLine=!0,this.pauseScene()}dragEnd(){console.log("END DRAG"),this.doLine=!1}pauseScene(){this.linePlay=0,this.changeFrame(this.play,0),this.gm.pause()}resume(){this.linePlay=1;this.tree.sort((e,t)=>e.getX()-t.getX()),this.gm.modifyNodes(this.tree.getNode()),this.gm.modifyValue(this.speedRobot.value,this.rangeRobot.value,this.speedReloadRobot.value,this.damageRobot.value),this.gm.resume()}changeFrame(e,t=0,s=0){e.setFrame(t+2*s)}createButton(){let e=WIDTH_MAP+WIDTH_WINDOW/10,t=WIDTH_MAP+HEIGHT_WINDOW/10+5,s=HEIGHT_WINDOW/10,i=HEIGHT_WINDOW/15,h=this.add.sprite(10,10,"back").setOrigin(0,0).setInteractive();this.play=this.add.sprite(e,t,"play").setOrigin(1,0).setInteractive();let a=this.add.sprite(e-s,t,"speed").setOrigin(1,0).setInteractive();this.pencil=this.add.sprite(e-2*s,t,"pencil").setOrigin(1,0).setInteractive().setVisible(!1),this.bin=this.add.sprite(e-3*s,t,"bin").setOrigin(1,0).setInteractive().setVisible(!1),this.plus=this.add.sprite(e-4*s,t,"plus").setOrigin(1,0).setInteractive().setVisible(!1);let n=this.add.sprite(e-5*s,t,"mute").setOrigin(1,0).setInteractive();this.linePlay=0,this.lineSpeed=1===SPEED_GAME?0:1,this.changeFrame(a,0,this.lineSpeed),this.father.sound.mute?this.lineMute=1:this.lineMute=0,this.changeFrame(n,0,this.lineMute),h.displayHeight=h.displayWidth=i,this.play.displayHeight=this.play.displayWidth=i,a.displayHeight=a.displayWidth=i,n.displayHeight=n.displayWidth=i,this.pencil.displayHeight=this.pencil.displayWidth=i,this.bin.displayHeight=this.bin.displayWidth=i,this.plus.displayHeight=this.plus.displayWidth=i,this.play.on("pointerout",()=>this.changeFrame(this.play,0,this.linePlay)),this.play.on("pointerover",()=>this.changeFrame(this.play,1,this.linePlay)),a.on("pointerout",()=>this.changeFrame(a,0,this.lineSpeed)),a.on("pointerover",()=>this.changeFrame(a,1,this.lineSpeed)),n.on("pointerout",()=>this.changeFrame(n,0,this.lineMute)),n.on("pointerover",()=>this.changeFrame(n,1,this.lineMute)),this.creatBtnOutAndOver(h),this.creatBtnOutAndOver(this.pencil),this.creatBtnOutAndOver(this.bin),this.creatBtnOutAndOver(this.plus),this.play.on("pointerdown",()=>this.clickPlay()),a.on("pointerdown",()=>this.clickSpeed(a)),h.on("pointerdown",()=>this.clickBack()),n.on("pointerdown",()=>this.clickMute(n)),this.pencil.on("pointerdown",()=>this.clickPencil()),this.bin.on("pointerdown",()=>this.clickBin()),this.plus.on("pointerdown",()=>this.clickPlus()),this.input.on("pointerdown",()=>this.clickNode()),this.input.on("drag",this.doDrag),this.input.on("dragstart",()=>this.dragStart()),this.input.on("dragend",()=>this.dragEnd())}creatBtnOutAndOver(e){e.on("pointerout",()=>this.changeFrame(e,0)),e.on("pointerover",()=>this.changeFrame(e,1))}clickPlay(){this.scene.isPaused("GamingBoard")?this.resume():this.pauseScene(),this.changeFrame(this.play,1,this.linePlay)}clickSpeed(e){1===SPEED_GAME?(SPEED_GAME=2,this.lineSpeed=1):(SPEED_GAME=1,this.lineSpeed=0),this.changeFrame(e,1,this.lineSpeed)}clickPencil(){console.log("PENCIL"),this.changeFrame(this.pencil,0)}clickBin(){null!==this.selected&&(console.log("BIN"),this.tree.delete(this.selected),this.changeFrame(this.bin,0),this.tryClick())}clickPlus(){console.log("PLUS"),this.father.scene.add("PlusNode",new PlusNode(this.father,this,this.selected)),this.scene.launch("PlusNode"),this.changeFrame(this.plus,0),this.scene.pause("Game")}clickBack(){console.log("BACK"),this.father.scene.stop("GamingBoard"),this.father.scene.remove("GamingBoard"),this.father.scene.stop("Game"),this.father.scene.start("Type")}clickMute(e){console.log("MUTE"),this.father.sound.mute?(this.father.sound.mute=!1,this.lineMute=0):(this.father.sound.mute=!0,this.lineMute=1),this.changeFrame(e,1,this.lineMute)}tryClick(){this.pencil.setVisible(!1),this.bin.setVisible(!1),this.plus.setVisible(!1),null!=this.selected&&(this.selected.deselect(),this.selected=null)}}class GamingBoard extends Phaser.Scene{constructor(e){super("GamingBoard"),this.listRobot=[],listBonus=[],this.father=e,this.end=!1}preload(){this.cameras.main.setViewport(OFFX_MAP,OFFY_MAP,WIDTH_MAP,WIDTH_MAP),this.sound.add("shot"),this.sound.add("hit")}create(){listBonus.push(new BonusSpeed("Balle Argent",this,WIDTH_MAP/2,WIDTH_MAP/2,3,2e3)),this.add.image(0,0,"background").alpha=.1;for(let e=0;et.addNode(e)),!0)}modifyValue(e,t,s,i){let h=this.getMyRobot();return void 0!==h&&(h.setSpeed(e),h.setRange(t),h.setSpeedReload(s),h.setDamage(i),!0)}getMyRobot(){for(let e=0;ee.addShield(SHIELD_PER_SECOND)),this.time.addEvent({delay:1e3/SPEED_GAME,callback:this.upShield,callbackScope:this})}}class LoadFile extends Phaser.Scene{constructor(e,t,s){super("LoadFile"),this.father=e,this.son=s,this.nameSon=t,this.father.scene.pause(this.nameSon),this.father.scene.stop(this.nameSon),this.father.scene.remove("LoadFile")}preload(){let e=this.add.graphics(),t=this.add.graphics(),s=WIDTH_WINDOW/2-160,i=HEIGHT_WINDOW/2-25;t.fillStyle(2236962,.8),t.fillRect(s,i,320,50),this.load.on("progress",function(t){e.clear(),e.fillStyle(16777215,1),e.fillRect(s+10,i+10,300*t,30)}),this.load.on("complete",()=>{e.destroy(),t.destroy(),-1===this.father.scene.getIndex(this.nameSon)&&this.father.scene.add(this.nameSon,this.son),this.father.scene.start(this.nameSon)}),this.load.audio("shot","assets/sounds/shot.ogg"),this.load.audio("hit","assets/sounds/hit.ogg"),this.loadImage("en","flags/",!0),this.loadImage("fr","flags/",!0),this.loadImage("bonusSpeed0","bonus/",!0),this.loadImage("bonusSpeed1","bonus/",!0),this.loadImage("bonusSpeed2","bonus/",!0),this.loadImage("enemy","robots/"),this.loadSprite("playLetter",550,150,"buttons/"),this.loadSprite("cancel",550,150,"buttons/"),this.loadSprite("add",550,150,"buttons/"),this.loadSprite("home",550,150,"buttons/"),this.loadSprite("next",550,150,"buttons/"),this.loadSprite("retry",550,150,"buttons/"),this.loadSprite("duel",269,262,"buttons/"),this.loadSprite("last",269,262,"buttons/"),this.loadSprite("team",269,262,"buttons/"),this.loadSprite("flag",269,262,"buttons/"),this.loadSprite("map",269,262,"buttons/"),this.loadSprite("play",100,100,"buttons/"),this.loadSprite("bin",100,100,"buttons/"),this.loadSprite("plus",100,100,"buttons/"),this.loadSprite("pencil",100,100,"buttons/"),this.loadSprite("speed",100,100,"buttons/"),this.loadSprite("mute",100,100,"buttons/"),this.loadSprite("back",200,200,"buttons/"),this.loadSprite("shortRange",300,150,"buttons/"),this.loadSprite("mediumRange",300,150,"buttons/"),this.loadSprite("longRange",300,150,"buttons/"),this.loadSprite("shield0",300,150,"buttons/"),this.loadSprite("shield33",300,150,"buttons/"),this.loadSprite("shield66",300,150,"buttons/"),this.loadSprite("shield100",300,150,"buttons/"),this.loadSprite("myself",300,150,"buttons/"),this.loadSprite("enemyBot",300,150,"buttons/"),this.loadSprite("bonus",300,150,"buttons/"),this.loadSprite("moveToward",300,150,"buttons/"),this.loadSprite("fleeFrom",300,150,"buttons/"),this.loadSprite("attackNode",180,190,"nodes/",!0),this.loadSprite("moveNode",180,190,"nodes/",!0),this.loadSprite("conditionNode",180,190,"nodes/",!0),this.loadImage("background"),this.loadImage("bullet"),this.loadImage("logoWaria"),this.loadImage("attack","nodes/",!0),this.loadImage("move","nodes/",!0),this.loadImage("condition","nodes/",!0)}loadSprite(e,t,s,i="",h=!1){this.deleteLoad(e),h?this.load.spritesheet(e,"assets/"+i+e+".png",{frameWidth:t,frameHeight:s}):this.load.spritesheet(e,"assets/"+LANG+"/"+i+e+".png",{frameWidth:t,frameHeight:s})}loadImage(e,t="",s=!1){this.deleteLoad(e),s?this.load.image(e,"assets/"+t+e+".png"):this.load.image(e,"assets/"+LANG+"/"+t+e+".png")}deleteLoad(e){this.textures.exists(e)&&this.textures.remove(e)}}class Looser extends Finish{constructor(e){super(e)}create(){super.create(),super.addTitle(selectWord("GAME OVER","PARTIE PERDUE")),super.btnRetry(super.createButton(WIDTH_WINDOW/3,"retry")),super.btnHome(super.createButton(WIDTH_WINDOW/1.5,"home"))}}class Missile extends Phaser.GameObjects.Image{constructor(e,t,s,i){super(e,0,0,t),this.visible=!1,this.setOrigin(.5,.5),this.setScale(.02)}}class Move{constructor(e,t=!0){this.toward=e,this.enemyBot=t}do(e){if(this.enemyBot){if(e.verifyTarget())return!0===this.toward?this.moveToward(e):this.fleeFrom(e)}else{let t=chooseTarget(e,listBonus);if(void 0!==t){let s;return(s=!0===this.toward?this.moveToward(e,t):this.fleeFrom(e,t))||(t.useOn(e),listBonus.splice(listBonus.indexOf(t),1)),!0}}return!1}moveToward(e,t=e.target){return e.advanceTo(t)}fleeFrom(e,t=e.target){return e.fleeFrom(t)}getFrame(){let e;return e=this.toward?0:2,this.enemyBot||(e+=1),e}}class PlusNode extends Phaser.Scene{constructor(e,t,s){super("PlusNode"),this.father=e,this.gameR=t,this.selected=s}create(){this.add.rectangle(0,0,WIDTH_WINDOW,HEIGHT_WINDOW,0).setOrigin(0,0).setAlpha(.5),this.add.rectangle(0,HEIGHT_WINDOW/2,WIDTH_WINDOW,HEIGHT_WINDOW/2,3487290).setOrigin(0,.5),this.createNode(),this.createButton()}createNode(){let e=WIDTH_WINDOW/2,t=HEIGHT_WINDOW/2,s=WIDTH_WINDOW/3,i=HEIGHT_WINDOW/10,h={font:(i/1.5).toString()+"px stencil",fill:"#e2e2e2"};this.add.text(e-s,t-i,selectWord("ATTACK","ATTAQUE"),h).setOrigin(.5,.5),this.add.text(e,t-i,selectWord("MOVE","DEPLACEMENT"),h).setOrigin(.5,.5),this.add.text(e+s,t-i,selectWord("CONDITION","CONDITION"),h).setOrigin(.5,.5);let a=this.add.sprite(e-s,t+i,"attack").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("attack"));a.displayHeight=2*i,a.scaleX=a.scaleY,(a=this.add.sprite(e,t+i,"move").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("move"))).displayHeight=2*i,a.scaleX=a.scaleY,(a=this.add.sprite(e+s,t+i,"condition").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("condition"))).displayHeight=2*i,a.scaleX=a.scaleY}click(e){switch(e.toString()){case"attack":this.father.scene.add("AddNode",new AddAttack(this.father,this.gameR,this.selected));break;case"move":this.father.scene.add("AddNode",new AddMove(this.father,this.gameR,this.selected));break;case"condition":this.father.scene.add("AddNode",new AddCondition(this.father,this.gameR,this.selected))}this.scene.launch("AddNode"),this.scene.stop("PlusNode"),this.father.scene.remove("PlusNode")}createButton(){let e=WIDTH_WINDOW/2,t=HEIGHT_WINDOW-100,s=this.add.image(e,t,"cancel").setOrigin(.5,.5).setInteractive();s.on("pointerover",()=>s.setFrame(1)),s.on("pointerout",()=>s.setFrame(0)),s.on("pointerdown",()=>this.cancel()),s.displayHeight=HEIGHT_WINDOW/10,s.scaleX=s.scaleY}cancel(){this.scene.resume("Game"),this.scene.stop("PlusNode"),this.father.scene.remove("PlusNode")}}class RectangleNode{constructor(e,t,s,i,...h){switch(i.toString().toLowerCase()){case"attack":this.rect=new Phaser.GameObjects.Image(s,e,t,"attackNode"),this.node=new Attack(h[0]),this.canAddNode=!1,this.line=s.add.graphics();break;case"move":this.rect=new Phaser.GameObjects.Image(s,e,t,"moveNode"),this.node=new Move(h[0],h[1]),this.canAddNode=!1,this.line=s.add.graphics();break;case"condition":this.rect=new Phaser.GameObjects.Image(s,e,t,"conditionNode"),this.node=new Condition(h[0],h[1],h[2],h[3],h[4]),this.canAddNode=!0,this.lRect=[],this.scene=s,this.line=s.add.graphics();break;case"waria":this.rect=new Phaser.GameObjects.Image(s,e,t,"logoWaria").setInteractive(),this.canAddNode=!0,this.lRect=[],this.scene=s,this.scene.add.existing(this.rect),this.scene.input.setDraggable(this.rect);break;default:return void console.log("Création d'un node echoué")}"waria"!==i.toString().toLowerCase()&&this.rect.setFrame(this.node.getFrame()),this.rect.on("pointerdown",()=>this.click()),this.rect.setOrigin(.5,0),this.rect.displayHeight=HEIGHT_WINDOW/6,this.rect.scaleX=this.rect.scaleY}getSelected(){if(this.rect.isTinted)return this;if(this.canAddNode)for(let e=0;ethis.addLine(e))}addLine(e){e.setLine(this.rect.x,this.rect.y+.9*this.rect.displayHeight)}getNode(){if(void 0===this.node){let e=[];return this.lRect.forEach(function(t){e.push(t.getNode())}),e}return this.canAddNode&&(this.node.clearNodes(),this.lRect.forEach(e=>this.node.addNode(e.getNode()))),this.node}sort(e){this.canAddNode&&(this.lRect.sort(e),this.lRect.forEach(function(t){t.canAddNode&&t.sort(e)}))}destroy(){this.line.destroy(),this.rect.destroy(),void 0!==this.lRect&&this.lRect.forEach(e=>e.destroy())}delete(e){let t=this.lRect.indexOf(e);if(-1!==t)return this.lRect.splice(t,1),e.destroy(),!0;for(let t=0;tthis.click())}click(){null===this.circleRange?this.drawRange():this.eraseRange()}addShield(e){this.shield.increase(e)}setX(e){this.x=e,this.circle.setX(this.x),this.life.setX(this.x),this.shield.setX(this.x),this.drawCircleRange()}setY(e){this.y=e,this.life.setY(this.y-this.width),this.shield.setY(this.y-1.5*this.width),this.circle.setY(this.y),this.drawCircleRange()}setTarget(e){this.target=e}updateTarget(){this.verifyTarget()&&this.setTargetPos(this.target.x,this.target.y)}setTargetPos(e,t){}setDamage(e=this.damage){this.damage=e}setRange(e=this.range){this.range=e,this.drawCircleRange()}setSpeed(e=this.speed){this.speed=e}setSpeedReload(e=this.speedReload){this.speedReload=e}increaseSpeed(e){this.speed+=e}decreaseSpeed(e){this.speed-=e}advanceToTarget(){return this.verifyTarget()&&this.advanceTo(this.target),!1}advanceTo(e){if(e.x!==this.x||e.y!==this.y){let t=!1,s=!1,i=this.getVelocity(e),h=i[0]+this.x,a=i[1]+this.y;return i[0]>=0&&h>=e.x||i[0]<=0&&h<=e.x?(this.setX(e.x),t=!0):this.setX(this.x+i[0]),i[1]>=0&&a>=e.y||i[1]<=0&&a<=e.y?(this.setY(e.y),s=!0):this.setY(this.y+i[1]),!(t&&s)}return!1}fleeFromTarget(){return!!this.verifyTarget()&&this.fleeFrom(this.target)}fleeFrom(e){if(this.target.x!==this.x||this.target.y!==this.y){let t=this.getVelocity(e,!0);return t[0]>=0&&this.x-this.width/2<=0?this.setX(this.width/2):t[0]<=0&&this.x+this.width/2>=WIDTH_MAP?this.setX(WIDTH_MAP-this.width/2):this.setX(this.x-t[0]),t[1]>=0&&this.y-this.width/2<=0?this.setY(this.height/2):t[1]<=0&&this.y+this.width/2>=WIDTH_MAP?this.setY(WIDTH_MAP-this.height/2):this.setY(this.y-t[1]),!0}return!1}getVelocity(e,t=!1){let s=[],i=e.x-this.x,h=e.y-this.y,a=Math.hypot(i,h);return s[0]=i/a*WIDTH_MAP/1e3*SPEED*this.speed*SPEED_GAME,s[1]=h/a*WIDTH_MAP/1e3*SPEED*this.speed*SPEED_GAME,t&&(this.x+this.width/2+s[0]>WIDTH_MAP||this.x-this.width/2+s[0]<0?(console.log(s),s[1]+=s[0]*Math.sign(s[1]),s[0]=0,console.log(s)):(this.y+this.width/2+s[1]>WIDTH_MAP||this.y-this.width/2+s[1]<0)&&(console.log(s),s[0]+=s[1]*Math.sign(s[0]),s[1]=0)),s}attackTarget(e=0){return!!this.verifyTarget()&&(this.canAttack&&this.attack(this.target,e),!0)}verifyTarget(){return!!this.haveTarget()&&(!!this.target.isAlive()||(this.setTarget(null),!1))}attack(e,t){this.canAttack=!1,this.missile.setPosition(this.x,this.y).setVisible(!0),this.missile.setRotation(Math.atan2(this.y-this.target.y,this.x-this.target.x)-1.57),this.scene.sound.play("shot");let s=this.calcDistance(this.target)*WIDTH_MAP/1e3/SPEED_GAME;this.scene.tweens.add({targets:this.missile,x:e.x,y:e.y,ease:"Linear",duration:s,onComplete:()=>this.finishAttack(e,t)}),this.scene.time.addEvent({delay:TIME_RELOAD/this.speedReload/SPEED_GAME,callback:this.reload,callbackScope:this})}finishAttack(e,t){e.beAttack(this.damage*DAMAGE*t)&&this.setTarget(null),this.missile.setVisible(!1)}reload(){this.canAttack=!0}beAttack(e){let t=this.shield.decrease(e),s={font:HEIGHT_DAMAGE.toString()+"px stencil",fill:"#ffff00"},i=this.scene.add.text(this.x,this.y,e.toString(),s).setOrigin(0,1);return this.scene.tweens.add({targets:i,x:this.x+30,y:this.y-50,alpha:0,duration:DURATION_DAMAGE,ease:"Sine.easeOut",onComplete:()=>i.destroy()}),this.scene.sound.play("hit"),console.log("HIT"),t>0&&(console.log("Shield Broken"),this.life.decrease(t)),this.die()}isTargetInRange(e=1){return!!this.haveTarget()&&this.calcDistance(this.target)<=this.range*RANGE*e}calcDistance(e){return Math.hypot(e.x-this.x,e.y-this.y)}isAlive(){return this.life.value>0}die(){return 0===this.life.value&&(null!==this.circleRange&&this.circleRange.destroy(),this.circle.destroy(),this.shield.destroy(),this.life.destroy(),!0)}haveTarget(){return null!=this.target}read(){for(let e=0;ee.setFrame(0)),e.on("pointerover",()=>e.setFrame(1)),e.on("pointerdown",()=>this.clickPlay(e))}clickPlay(e){newGame(this.father),this.scene.start("Game")}}var listBonus=[],LANG=navigator.language.substr(0,2).toLowerCase(),SPEED_GAME=1;const MYSELF="myself",SHIELD_PER_SECOND=5,COLOR_ATTACK=16711680,COLOR_MOVE=255,COLOR_CONDITION=921102,COLOR_RED=16711680,COLOR_ORANGE=16744192,COLOR_GREEN=32768,COLOR_RANGE=32768,COLOR_SPEED_RELOAD=8323327,WIDTH_WINDOW=$(document).width()-20,HEIGHT_WINDOW=$(document).height()-20,WIDTH_MAP=WIDTH_WINDOW1/3?e>2/3?(e=1,this.percentBonus=1):(e=2/3,this.percentBonus=1.5):(e=1/3,this.percentBonus=2),this.percentRange=e}do(e){return!(!e.haveTarget()||!e.isTargetInRange(this.percentRange))&&e.attackTarget(this.percentBonus)}getFrame(){return 3*this.percentRange-1}}class Bar extends HealthBar{constructor(e,t,s,i,h,a,n=new CategoryBar,r=1){super(e,t,s,i,h,n.valueMax,a,a),this.scene=e,this.scene.input.on("pointerdown",this.doDrag,this);let o={font:s.toString()+"px stencil",fill:"#e2e2e2"};this.text=this.scene.add.text(this.bar.x+this.width+10,this.bar.y,this.value.toString(),o).setOrigin(0,0),this.categoryBar=n,this.setValue(0),this.categoryBar.setValueOf(this,r)}doDrag(){let e=this.scene.input;e.x>=this.bar.x-10&&e.x<=this.bar.x+this.width+10&&e.y>=this.bar.y&&e.y<=this.bar.y+this.height&&(this.scene.pauseScene(),this.clickOn())}clickOn(){this.onMove(),this.scene.input.on("pointermove",()=>this.onMove()),this.scene.input.on("pointerup",()=>this.stopClick())}stopClick(){this.scene.input.off("pointermove"),this.scene.input.off("pointerup")}onMove(){this.setValWithX(this.scene.input.x)}setValWithX(e){this.categoryBar.setValueOf(this,Math.round((e-this.bar.x)/this.width*this.valueMax))}draw(){super.draw();let e=this.value/this.valueMax*this.width-5;this.bar.fillStyle(9868950),this.bar.fillRect(e,0,10,this.height),void 0!==this.text&&this.text.setText(this.value)}}class BonusAttack extends Bonus{constructor(e,t,s,i,h){super(e,t,s,i,"bonusAttack",h)}useOn(e){let t=e.speed;e.setSpeed(t+this.value),this.scene.time.addEvent({delay:this.time,callback:e.setSpeed(t)}),this.destroy()}}class BonusShield extends Bonus{constructor(e,t,s,i,h){super(e,t,s,i,"bonusShield",h)}useOn(e){e.shield.valueMax=e.shield.valueMax+this.value,e.shield.value=e.shield.value+this.val,this.destroy()}}class BonusSpeed extends Bonus{constructor(e,t,s,i,h,a){let n;switch(h){case 1:n="bonusSpeed0";break;case 2:n="bonusSpeed1";break;case 3:default:n="bonusSpeed2"}super(e,t,s,i,n,h),this.time=a}useOn(e){e.increaseSpeedBonus(this.value),this.scene.time.addEvent({delay:this.time,callback:()=>e.decreaseSpeedBonus(this.value)}),this.destroy()}}class Boot extends ManageLang{constructor(e){super("Boot",e)}create(){super.create();this.add.text(WIDTH_WINDOW/2,HEIGHT_WINDOW/3,"WARIA",{font:"200px stencil",fill:"#e2e2e2"}).setOrigin(.5,.5);let e=this.add.sprite(WIDTH_WINDOW/2,HEIGHT_WINDOW/3*2,"playLetter").setInteractive();e.on("pointerout",()=>e.setFrame(0)),e.on("pointerover",()=>e.setFrame(1)),e.on("pointerdown",()=>this.clickPlay(e))}clickPlay(e){console.log("Play"),this.father.scene.add("Type",new Type(this.father)),this.scene.start("Type")}}class Category{constructor(e="undefined",t=!0,s=!0){this.name=e,this.single=t,this.lBtn=[],this.lValue=[],this.obligatory=s}add(e,t){0!==this.lBtn.length&&this.single&&(this.lBtn[0].clearTint(),this.lValue=[],this.lBtn=[]),this.lValue.push(t),this.lBtn.push(e),e.tint=15718407}getValue(){return this.single?this.lValue[0]:this.lValue}validate(){return!(0===this.lBtn.length&&this.obligatory)}remove(e){let t=this.lBtn.indexOf(e);-1!==t&&(this.lBtn.splice(t,1),this.lValue.splice(t,1)),e.clearTint()}}class CategoryBar{constructor(e=1,t=VALUE_MAX_BAR){this.startValue=e,this.valueMax=t,this.point=this.valueMax}addPoint(e){if(this.point+=e,this.point<0){let e=this.point;return this.point=0,e}return this.point>this.valueMax&&(this.point=this.valueMax),0}setValueOf(e,t){let s=t-e.value,i=e.value;this.point>=s?e.setValue(t):e.setValue(e.value+this.point),this.addPoint(i-e.value)}}class Condition{constructor(e,t=!1,s=!1,i,h){this.shieldFilter=t,this.rangeFilter=s,this.shield=i,this.range=h,this.myself=e,this.lNode=[]}addNode(e){this.lNode.push(e)}do(e){if(this.doCondition(e))for(let t=0;t=h&&(s>h&&(s=h,i=[]),i.push(t))}}),i.length>1?i[Math.floor(Math.random()*(i.length+1))]:i[0]}class Game extends ManageLang{constructor(e){super("Game",e),super.addOtherScenes("GamingBoard"),SPEED_GAME=1}create(){super.create(),this.doLine=!1,this.gm=new GamingBoard(this),-1!==this.father.scene.getIndex("GamingBoard")&&this.father.scene.remove("GamingBoard"),this.father.scene.add("GamingBoard",this.gm),this.scene.launch("GamingBoard"),this.scene.pause("GamingBoard"),this.selected=null;let e=new CategoryBar;this.damageRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4,OFFY_MAP/2,COLOR_ATTACK,e,DAMAGE_BEGIN),this.speedReloadRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4,0,COLOR_SPEED_RELOAD,e,SPEED_RELOAD_BEGIN);let t=new CategoryBar;this.speedRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4*3,0,COLOR_MOVE,t,SPEED_BEGIN),this.rangeRobot=new Bar(this,200,30,OFFX_MAP+WIDTH_MAP/4*3,OFFY_MAP/2,COLOR_RANGE,t,RANGE_BEGIN),this.createButton();let s=WIDTH_WINDOW/4*3,i=WIDTH_WINDOW/10;this.tree=new RectangleNode(s,HEIGHT_WINDOW/10,this,"waria"),this.tree.addRect(new RectangleNode(s-2*i,HEIGHT_WINDOW/3,this,"move",!0,!1)),this.tree.addRect(new RectangleNode(s+i,HEIGHT_WINDOW/3,this,"move",!0)),this.tree.addRect(new RectangleNode(s,HEIGHT_WINDOW/3,this,"attack",1/3));let h=new RectangleNode(s-i,HEIGHT_WINDOW/3,this,"condition",!0,!0,!1,1/3,0);h.addRect(new RectangleNode(s,HEIGHT_WINDOW/1.5,this,"move",!1)),h.addRect(new RectangleNode(s-i,HEIGHT_WINDOW/1.5,this,"attack")),this.tree.addRect(h),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.9*WIDTH_MAP,.9*WIDTH_MAP,6711039,this.gm,MYSELF)),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.2*WIDTH_MAP,.1*WIDTH_MAP,16711680,this.gm)),this.gm.addRobot(new Robot(.1*WIDTH_MAP,.1*WIDTH_MAP,.1*WIDTH_MAP,.9*WIDTH_MAP,16711680,this.gm)),this.input.keyboard.on("keydown-DELETE",()=>{this.clickBin()})}update(e,t){super.update(e,t),this.doLine&&this.tree.updateLine()}finish(){let e;console.log("FINISH"),e=this.gm.winner()?new Winner(this.father):new Looser(this.father),this.father.scene.add("Finish",e),this.scene.pause("Game"),this.scene.launch("Finish")}clickNode(){console.log("NODE"),this.tryClick(),this.selected=this.tree.getSelected(),null!==this.selected&&(this.selected!==this.tree&&(this.pencil.setVisible(!0),this.bin.setVisible(!0)),this.selected.canAddNode&&this.plus.setVisible(!0))}doDrag(e,t,s,i){t.setX(s),t.setY(i)}dragStart(){console.log("START DRAG"),this.doLine=!0,this.pauseScene()}dragEnd(){console.log("END DRAG"),this.doLine=!1}pauseScene(){this.linePlay=0,this.changeFrame(this.play,0),this.gm.pause()}resume(){this.linePlay=1;this.tree.sort((e,t)=>e.getX()-t.getX()),this.gm.modifyNodes(this.tree.getNode()),this.gm.modifyValue(this.speedRobot.value,this.rangeRobot.value,this.speedReloadRobot.value,this.damageRobot.value),this.gm.resume()}changeFrame(e,t=0,s=0){e.setFrame(t+2*s)}createButton(){let e=WIDTH_MAP+WIDTH_WINDOW/10,t=WIDTH_MAP+HEIGHT_WINDOW/10+5,s=HEIGHT_WINDOW/10,i=HEIGHT_WINDOW/15,h=this.add.sprite(10,10,"back").setOrigin(0,0).setInteractive();this.play=this.add.sprite(e,t,"play").setOrigin(1,0).setInteractive();let a=this.add.sprite(e-s,t,"speed").setOrigin(1,0).setInteractive();this.pencil=this.add.sprite(e-2*s,t,"pencil").setOrigin(1,0).setInteractive().setVisible(!1),this.bin=this.add.sprite(e-3*s,t,"bin").setOrigin(1,0).setInteractive().setVisible(!1),this.plus=this.add.sprite(e-4*s,t,"plus").setOrigin(1,0).setInteractive().setVisible(!1);let n=this.add.sprite(e-5*s,t,"mute").setOrigin(1,0).setInteractive();this.linePlay=0,this.lineSpeed=1===SPEED_GAME?0:1,this.changeFrame(a,0,this.lineSpeed),this.father.sound.mute?this.lineMute=1:this.lineMute=0,this.changeFrame(n,0,this.lineMute),h.displayHeight=h.displayWidth=i,this.play.displayHeight=this.play.displayWidth=i,a.displayHeight=a.displayWidth=i,n.displayHeight=n.displayWidth=i,this.pencil.displayHeight=this.pencil.displayWidth=i,this.bin.displayHeight=this.bin.displayWidth=i,this.plus.displayHeight=this.plus.displayWidth=i,this.play.on("pointerout",()=>this.changeFrame(this.play,0,this.linePlay)),this.play.on("pointerover",()=>this.changeFrame(this.play,1,this.linePlay)),a.on("pointerout",()=>this.changeFrame(a,0,this.lineSpeed)),a.on("pointerover",()=>this.changeFrame(a,1,this.lineSpeed)),n.on("pointerout",()=>this.changeFrame(n,0,this.lineMute)),n.on("pointerover",()=>this.changeFrame(n,1,this.lineMute)),this.creatBtnOutAndOver(h),this.creatBtnOutAndOver(this.pencil),this.creatBtnOutAndOver(this.bin),this.creatBtnOutAndOver(this.plus),this.play.on("pointerdown",()=>this.clickPlay()),a.on("pointerdown",()=>this.clickSpeed(a)),h.on("pointerdown",()=>this.clickBack()),n.on("pointerdown",()=>this.clickMute(n)),this.pencil.on("pointerdown",()=>this.clickPencil()),this.bin.on("pointerdown",()=>this.clickBin()),this.plus.on("pointerdown",()=>this.clickPlus()),this.input.on("pointerdown",()=>this.clickNode()),this.input.on("drag",this.doDrag),this.input.on("dragstart",()=>this.dragStart()),this.input.on("dragend",()=>this.dragEnd())}creatBtnOutAndOver(e){e.on("pointerout",()=>this.changeFrame(e,0)),e.on("pointerover",()=>this.changeFrame(e,1))}clickPlay(){this.scene.isPaused("GamingBoard")?this.resume():this.pauseScene(),this.changeFrame(this.play,1,this.linePlay)}clickSpeed(e){1===SPEED_GAME?(SPEED_GAME=2,this.lineSpeed=1):(SPEED_GAME=1,this.lineSpeed=0),this.changeFrame(e,1,this.lineSpeed)}clickPencil(){console.log("PENCIL"),this.changeFrame(this.pencil,0)}clickBin(){null!==this.selected&&(console.log("BIN"),this.tree.delete(this.selected),this.changeFrame(this.bin,0),this.tryClick())}clickPlus(){console.log("PLUS"),this.father.scene.add("PlusNode",new PlusNode(this.father,this,this.selected)),this.scene.launch("PlusNode"),this.changeFrame(this.plus,0),this.scene.pause("Game")}clickBack(){console.log("BACK"),this.father.scene.stop("GamingBoard"),this.father.scene.remove("GamingBoard"),this.father.scene.stop("Game"),this.father.scene.start("Type")}clickMute(e){console.log("MUTE"),this.father.sound.mute?(this.father.sound.mute=!1,this.lineMute=0):(this.father.sound.mute=!0,this.lineMute=1),this.changeFrame(e,1,this.lineMute)}tryClick(){this.pencil.setVisible(!1),this.bin.setVisible(!1),this.plus.setVisible(!1),null!=this.selected&&(this.selected.deselect(),this.selected=null)}}class GamingBoard extends Phaser.Scene{constructor(e){super("GamingBoard"),this.listRobot=[],listBonus=[],this.father=e,this.end=!1}preload(){this.cameras.main.setViewport(OFFX_MAP,OFFY_MAP,WIDTH_MAP,WIDTH_MAP),this.sound.add("shot"),this.sound.add("hit")}create(){listBonus.push(new BonusSpeed("Fusée",this,WIDTH_MAP/2,WIDTH_MAP/2,5,2e3)),this.add.image(0,0,"background").alpha=.1;for(let e=0;et.addNode(e)),!0)}modifyValue(e,t,s,i){let h=this.getMyRobot();return void 0!==h&&(h.setSpeed(e),h.setRange(t),h.setSpeedReload(s),h.setDamage(i),!0)}getMyRobot(){for(let e=0;ee.addShield(SHIELD_PER_SECOND)),this.time.addEvent({delay:1e3/SPEED_GAME,callback:this.upShield,callbackScope:this})}}class LoadFile extends Phaser.Scene{constructor(e,t,s){super("LoadFile"),this.father=e,this.son=s,this.nameSon=t,this.father.scene.pause(this.nameSon),this.father.scene.stop(this.nameSon),this.father.scene.remove("LoadFile")}preload(){let e=this.add.graphics(),t=this.add.graphics(),s=WIDTH_WINDOW/2-160,i=HEIGHT_WINDOW/2-25;t.fillStyle(2236962,.8),t.fillRect(s,i,320,50),this.load.on("progress",function(t){e.clear(),e.fillStyle(16777215,1),e.fillRect(s+10,i+10,300*t,30)}),this.load.on("complete",()=>{e.destroy(),t.destroy(),-1===this.father.scene.getIndex(this.nameSon)&&this.father.scene.add(this.nameSon,this.son),this.father.scene.start(this.nameSon)}),this.load.audio("shot","assets/sounds/shot.ogg"),this.load.audio("hit","assets/sounds/hit.ogg"),this.loadImage("en","flags/",!0),this.loadImage("fr","flags/",!0),this.loadImage("bonusSpeed0","bonus/",!0),this.loadImage("bonusSpeed1","bonus/",!0),this.loadImage("bonusSpeed2","bonus/",!0),this.loadImage("enemy","robots/"),this.loadSprite("playLetter",550,150,"buttons/"),this.loadSprite("cancel",550,150,"buttons/"),this.loadSprite("add",550,150,"buttons/"),this.loadSprite("home",550,150,"buttons/"),this.loadSprite("next",550,150,"buttons/"),this.loadSprite("retry",550,150,"buttons/"),this.loadSprite("duel",269,262,"buttons/"),this.loadSprite("last",269,262,"buttons/"),this.loadSprite("team",269,262,"buttons/"),this.loadSprite("flag",269,262,"buttons/"),this.loadSprite("map",269,262,"buttons/"),this.loadSprite("play",100,100,"buttons/"),this.loadSprite("bin",100,100,"buttons/"),this.loadSprite("plus",100,100,"buttons/"),this.loadSprite("pencil",100,100,"buttons/"),this.loadSprite("speed",100,100,"buttons/"),this.loadSprite("mute",100,100,"buttons/"),this.loadSprite("back",200,200,"buttons/"),this.loadSprite("shortRange",300,150,"buttons/"),this.loadSprite("mediumRange",300,150,"buttons/"),this.loadSprite("longRange",300,150,"buttons/"),this.loadSprite("shield0",300,150,"buttons/"),this.loadSprite("shield33",300,150,"buttons/"),this.loadSprite("shield66",300,150,"buttons/"),this.loadSprite("shield100",300,150,"buttons/"),this.loadSprite("myself",300,150,"buttons/"),this.loadSprite("enemyBot",300,150,"buttons/"),this.loadSprite("bonus",300,150,"buttons/"),this.loadSprite("moveToward",300,150,"buttons/"),this.loadSprite("fleeFrom",300,150,"buttons/"),this.loadSprite("attackNode",180,190,"nodes/",!0),this.loadSprite("moveNode",180,190,"nodes/",!0),this.loadSprite("conditionNode",180,190,"nodes/",!0),this.loadImage("background"),this.loadImage("bullet"),this.loadImage("logoWaria"),this.loadImage("attack","nodes/",!0),this.loadImage("move","nodes/",!0),this.loadImage("condition","nodes/",!0)}loadSprite(e,t,s,i="",h=!1){this.deleteLoad(e),h?this.load.spritesheet(e,"assets/"+i+e+".png",{frameWidth:t,frameHeight:s}):this.load.spritesheet(e,"assets/"+LANG+"/"+i+e+".png",{frameWidth:t,frameHeight:s})}loadImage(e,t="",s=!1){this.deleteLoad(e),s?this.load.image(e,"assets/"+t+e+".png"):this.load.image(e,"assets/"+LANG+"/"+t+e+".png")}deleteLoad(e){this.textures.exists(e)&&this.textures.remove(e)}}class Looser extends Finish{constructor(e){super(e)}create(){super.create(),super.addTitle(selectWord("GAME OVER","PARTIE PERDUE")),super.btnRetry(super.createButton(WIDTH_WINDOW/3,"retry")),super.btnHome(super.createButton(WIDTH_WINDOW/1.5,"home"))}}class Missile extends Phaser.GameObjects.Image{constructor(e,t,s,i){super(e,0,0,t),this.visible=!1,this.setOrigin(.5,.5),this.setScale(.02)}}class Move{constructor(e,t=!0){this.toward=e,this.enemyBot=t}do(e){if(this.enemyBot){if(e.verifyTarget())return!0===this.toward?this.moveToward(e):this.fleeFrom(e)}else{let t=chooseTarget(e,listBonus);if(void 0!==t){let s;return(s=!0===this.toward?this.moveToward(e,t):this.fleeFrom(e,t))||(t.useOn(e),listBonus.splice(listBonus.indexOf(t),1)),!0}}return!1}moveToward(e,t=e.target){return e.advanceTo(t)}fleeFrom(e,t=e.target){return e.fleeFrom(t)}getFrame(){let e;return e=this.toward?0:2,this.enemyBot||(e+=1),e}}class PlusNode extends Phaser.Scene{constructor(e,t,s){super("PlusNode"),this.father=e,this.gameR=t,this.selected=s}create(){this.add.rectangle(0,0,WIDTH_WINDOW,HEIGHT_WINDOW,0).setOrigin(0,0).setAlpha(.5),this.add.rectangle(0,HEIGHT_WINDOW/2,WIDTH_WINDOW,HEIGHT_WINDOW/2,3487290).setOrigin(0,.5),this.createNode(),this.createButton()}createNode(){let e=WIDTH_WINDOW/2,t=HEIGHT_WINDOW/2,s=WIDTH_WINDOW/3,i=HEIGHT_WINDOW/10,h={font:(i/1.5).toString()+"px stencil",fill:"#e2e2e2"};this.add.text(e-s,t-i,selectWord("ATTACK","ATTAQUE"),h).setOrigin(.5,.5),this.add.text(e,t-i,selectWord("MOVE","DEPLACEMENT"),h).setOrigin(.5,.5),this.add.text(e+s,t-i,selectWord("CONDITION","CONDITION"),h).setOrigin(.5,.5);let a=this.add.sprite(e-s,t+i,"attack").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("attack"));a.displayHeight=2*i,a.scaleX=a.scaleY,(a=this.add.sprite(e,t+i,"move").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("move"))).displayHeight=2*i,a.scaleX=a.scaleY,(a=this.add.sprite(e+s,t+i,"condition").setOrigin(.5,.5).setInteractive().on("pointerdown",()=>this.click("condition"))).displayHeight=2*i,a.scaleX=a.scaleY}click(e){switch(e.toString()){case"attack":this.father.scene.add("AddNode",new AddAttack(this.father,this.gameR,this.selected));break;case"move":this.father.scene.add("AddNode",new AddMove(this.father,this.gameR,this.selected));break;case"condition":this.father.scene.add("AddNode",new AddCondition(this.father,this.gameR,this.selected))}this.scene.launch("AddNode"),this.scene.stop("PlusNode"),this.father.scene.remove("PlusNode")}createButton(){let e=WIDTH_WINDOW/2,t=HEIGHT_WINDOW-100,s=this.add.image(e,t,"cancel").setOrigin(.5,.5).setInteractive();s.on("pointerover",()=>s.setFrame(1)),s.on("pointerout",()=>s.setFrame(0)),s.on("pointerdown",()=>this.cancel()),s.displayHeight=HEIGHT_WINDOW/10,s.scaleX=s.scaleY}cancel(){this.scene.resume("Game"),this.scene.stop("PlusNode"),this.father.scene.remove("PlusNode")}}class RectangleNode{constructor(e,t,s,i,...h){switch(i.toString().toLowerCase()){case"attack":this.rect=new Phaser.GameObjects.Image(s,e,t,"attackNode"),this.node=new Attack(h[0]),this.canAddNode=!1,this.line=s.add.graphics();break;case"move":this.rect=new Phaser.GameObjects.Image(s,e,t,"moveNode"),this.node=new Move(h[0],h[1]),this.canAddNode=!1,this.line=s.add.graphics();break;case"condition":this.rect=new Phaser.GameObjects.Image(s,e,t,"conditionNode"),this.node=new Condition(h[0],h[1],h[2],h[3],h[4]),this.canAddNode=!0,this.lRect=[],this.scene=s,this.line=s.add.graphics();break;case"waria":this.rect=new Phaser.GameObjects.Image(s,e,t,"logoWaria").setInteractive(),this.canAddNode=!0,this.lRect=[],this.scene=s,this.scene.add.existing(this.rect),this.scene.input.setDraggable(this.rect);break;default:return void console.log("Création d'un node echoué")}"waria"!==i.toString().toLowerCase()&&this.rect.setFrame(this.node.getFrame()),this.rect.on("pointerdown",()=>this.click()),this.rect.setOrigin(.5,0),this.rect.displayHeight=HEIGHT_WINDOW/6,this.rect.scaleX=this.rect.scaleY}getSelected(){if(this.rect.isTinted)return this;if(this.canAddNode)for(let e=0;ethis.addLine(e))}addLine(e){e.setLine(this.rect.x,this.rect.y+.9*this.rect.displayHeight)}getNode(){if(void 0===this.node){let e=[];return this.lRect.forEach(function(t){e.push(t.getNode())}),e}return this.canAddNode&&(this.node.clearNodes(),this.lRect.forEach(e=>this.node.addNode(e.getNode()))),this.node}sort(e){this.canAddNode&&(this.lRect.sort(e),this.lRect.forEach(function(t){t.canAddNode&&t.sort(e)}))}destroy(){this.line.destroy(),this.rect.destroy(),void 0!==this.lRect&&this.lRect.forEach(e=>e.destroy())}delete(e){let t=this.lRect.indexOf(e);if(-1!==t)return this.lRect.splice(t,1),e.destroy(),!0;for(let t=0;tthis.click())}click(){null===this.circleRange?this.drawRange():this.eraseRange()}addShield(e){this.shield.increase(e)}setX(e){this.x=e,this.circle.setX(this.x),this.life.setX(this.x),this.shield.setX(this.x),this.drawCircleRange()}setY(e){this.y=e,this.life.setY(this.y-this.width),this.shield.setY(this.y-1.5*this.width),this.circle.setY(this.y),this.drawCircleRange()}setTarget(e){this.target=e}updateTarget(){this.verifyTarget()&&this.setTargetPos(this.target.x,this.target.y)}setTargetPos(e,t){}setDamage(e=this.damage){this.damage=e+DAMAGE_BASE}setRange(e=this.range){this.range=e+RANGE_BASE,this.drawCircleRange()}setSpeed(e=this.speed){this.speed=e+SPEED_BASE}setSpeedReload(e=this.speedReload){this.speedReload=e+SPEED_RELOAD_BASE}increaseSpeedBonus(e){this.speedBonus+=e}decreaseSpeedBonus(e){this.speedBonus-=e,console.log(this.speed)}advanceToTarget(){return this.verifyTarget()&&this.advanceTo(this.target),!1}advanceTo(e){if(e.x!==this.x||e.y!==this.y){let t=!1,s=!1,i=this.getVelocity(e),h=i[0]+this.x,a=i[1]+this.y;return i[0]>=0&&h>=e.x||i[0]<=0&&h<=e.x?(this.setX(e.x),t=!0):this.setX(this.x+i[0]),i[1]>=0&&a>=e.y||i[1]<=0&&a<=e.y?(this.setY(e.y),s=!0):this.setY(this.y+i[1]),!(t&&s)}return!1}fleeFromTarget(){return!!this.verifyTarget()&&this.fleeFrom(this.target)}fleeFrom(e){if(this.target.x!==this.x||this.target.y!==this.y){let t=this.getVelocity(e,!0);return t[0]>=0&&this.x-this.width/2<=0?this.setX(this.width/2):t[0]<=0&&this.x+this.width/2>=WIDTH_MAP?this.setX(WIDTH_MAP-this.width/2):this.setX(this.x-t[0]),t[1]>=0&&this.y-this.width/2<=0?this.setY(this.height/2):t[1]<=0&&this.y+this.width/2>=WIDTH_MAP?this.setY(WIDTH_MAP-this.height/2):this.setY(this.y-t[1]),!0}return!1}getVelocity(e,t=!1){let s=[],i=e.x-this.x,h=e.y-this.y,a=Math.hypot(i,h);return s[0]=i/a*SPEED*this.speed*this.speedBonus*SPEED_GAME,s[1]=h/a*SPEED*this.speed*this.speedBonus*SPEED_GAME,t&&(this.x+this.width/2+s[0]>WIDTH_MAP||this.x-this.width/2-s[0]<0?(s[1]+=s[0]*Math.sign(s[1]),s[0]=0):(this.y+this.width/2-s[1]>WIDTH_MAP||this.y-this.width/2+s[1]<0)&&(s[0]+=s[1]*Math.sign(-s[0]),s[1]=0)),s}attackTarget(e=0){return!!this.verifyTarget()&&(this.canAttack&&this.attack(this.target,e),!0)}verifyTarget(){return!!this.haveTarget()&&(!!this.target.isAlive()||(this.setTarget(null),!1))}attack(e,t){this.canAttack=!1,this.missile.setPosition(this.x,this.y).setVisible(!0),this.missile.setRotation(Math.atan2(this.y-this.target.y,this.x-this.target.x)-1.57),this.scene.sound.play("shot");let s=this.calcDistance(this.target)*WIDTH_MAP/1e3/SPEED_GAME;this.scene.tweens.add({targets:this.missile,x:e.x,y:e.y,ease:"Linear",duration:s,onComplete:()=>this.finishAttack(e,t)}),this.scene.time.addEvent({delay:SPEED_RELOAD/this.speedReload/SPEED_GAME,callback:this.reload,callbackScope:this})}finishAttack(e,t){e.beAttack(this.damage*DAMAGE*t)&&this.setTarget(null),this.missile.setVisible(!1)}reload(){this.canAttack=!0}beAttack(e){let t=this.shield.decrease(e),s={font:HEIGHT_DAMAGE.toString()+"px stencil",fill:"#ffff00"},i=this.scene.add.text(this.x,this.y,e.toString(),s).setOrigin(0,1);return this.scene.tweens.add({targets:i,x:this.x+30,y:this.y-50,alpha:0,duration:DURATION_DAMAGE,ease:"Sine.easeOut",onComplete:()=>i.destroy()}),this.scene.sound.play("hit"),console.log("HIT"),t>0&&(console.log("Shield Broken"),this.life.decrease(t)),this.die()}isTargetInRange(e=1){return!!this.haveTarget()&&this.calcDistance(this.target)<=this.range*RANGE*e}calcDistance(e){return Math.hypot(e.x-this.x,e.y-this.y)}isAlive(){return this.life.value>0}die(){return 0===this.life.value&&(null!==this.circleRange&&this.circleRange.destroy(),this.circle.destroy(),this.shield.destroy(),this.life.destroy(),!0)}haveTarget(){return null!=this.target}read(){for(let e=0;ee.setFrame(0)),e.on("pointerover",()=>e.setFrame(1)),e.on("pointerdown",()=>this.clickPlay(e))}clickPlay(e){newGame(this.father),this.scene.start("Game")}}var listBonus=[],LANG=navigator.language.substr(0,2).toLowerCase(),SPEED_GAME=1;const MYSELF="myself",SHIELD_PER_SECOND=5,COLOR_ATTACK=16711680,COLOR_MOVE=255,COLOR_CONDITION=921102,COLOR_RED=16711680,COLOR_ORANGE=16744192,COLOR_GREEN=32768,COLOR_RANGE=32768,COLOR_SPEED_RELOAD=8323327,WIDTH_WINDOW=$(document).width()-20,HEIGHT_WINDOW=$(document).height()-20,WIDTH_MAP=WIDTH_WINDOW= this.bar.x && pointer.x <= this.bar.x + this.width && pointer.y >= this.bar.y && pointer.y <= this.bar.y + this.height) { + if (pointer.x >= this.bar.x - 10 && pointer.x <= this.bar.x + this.width + 10 && pointer.y >= this.bar.y && pointer.y <= this.bar.y + this.height) { this.scene.pauseScene(); this.clickOn(); } @@ -32,7 +34,7 @@ class Bar extends HealthBar { } setValWithX(posX) { - this.setValue(Math.round((posX - this.bar.x) / this.width * this.valueMax)); + this.categoryBar.setValueOf(this, Math.round((posX - this.bar.x) / this.width * this.valueMax)); } draw() { @@ -41,7 +43,7 @@ class Bar extends HealthBar { this.bar.fillStyle(0x969696); this.bar.fillRect(posX, 0, 10, this.height); if (this.text !== undefined) { - this.text.setText(this.value.toString()); + this.text.setText(this.value); } } } \ No newline at end of file diff --git a/Code/src/js/level2/BonusSpeed.js b/Code/src/js/level2/BonusSpeed.js index cee1716..dff5b1a 100644 --- a/Code/src/js/level2/BonusSpeed.js +++ b/Code/src/js/level2/BonusSpeed.js @@ -20,8 +20,8 @@ class BonusSpeed extends Bonus { } useOn(robot) { - robot.increaseSpeed(this.value); - this.scene.time.addEvent({delay: this.time, callback: () => robot.decreaseSpeed(this.value)}); + robot.increaseSpeedBonus(this.value); + this.scene.time.addEvent({delay: this.time, callback: () => robot.decreaseSpeedBonus(this.value)}); this.destroy(); } } \ No newline at end of file diff --git a/Code/src/js/level2/CategoryBar.js b/Code/src/js/level2/CategoryBar.js new file mode 100644 index 0000000..234ec9e --- /dev/null +++ b/Code/src/js/level2/CategoryBar.js @@ -0,0 +1,31 @@ +class CategoryBar { + constructor(startValue = 1, valueMax = VALUE_MAX_BAR) { + this.startValue = startValue; + this.valueMax = valueMax; + this.point = this.valueMax; + } + + addPoint(point) { + this.point += point; + if (this.point < 0) { + let send = this.point; + this.point = 0; + return send; + } + if (this.point > this.valueMax) { + this.point = this.valueMax; + } + return 0; + } + + setValueOf(bar, newValue) { + let diff = newValue - bar.value; + let oldValue = bar.value; + if (this.point >= diff) { + bar.setValue(newValue); + } else { + bar.setValue(bar.value + this.point); + } + this.addPoint(oldValue - bar.value); + } +} \ No newline at end of file diff --git a/Code/src/js/level2/Game.js b/Code/src/js/level2/Game.js index b40bc3c..606704a 100644 --- a/Code/src/js/level2/Game.js +++ b/Code/src/js/level2/Game.js @@ -18,11 +18,12 @@ class Game extends ManageLang { this.selected = null; - - this.damageRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4, OFFY_MAP / 2, DAMAGE_BEGIN, 5, COLOR_ATTACK); - this.speedReloadRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4, 0, SPEED_RELOAD_BEGIN, 5, COLOR_SPEED_RELOAD); - this.speedRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4 * 3, 0, SPEED, 5, COLOR_MOVE); - this.rangeRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4 * 3, OFFY_MAP / 2, RANGE_BEGIN, 5, COLOR_RANGE); + let c1 = new CategoryBar(); + this.damageRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4, OFFY_MAP / 2, COLOR_ATTACK, c1, DAMAGE_BEGIN); + this.speedReloadRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4, 0, COLOR_SPEED_RELOAD, c1, SPEED_RELOAD_BEGIN); + let c2 = new CategoryBar(); + this.speedRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4 * 3, 0, COLOR_MOVE, c2, SPEED_BEGIN); + this.rangeRobot = new Bar(this, 200, 30, OFFX_MAP + WIDTH_MAP / 4 * 3, OFFY_MAP / 2, COLOR_RANGE, c2, RANGE_BEGIN); this.createButton(); diff --git a/Code/src/js/level2/GamingBoard.js b/Code/src/js/level2/GamingBoard.js index d43f1c3..30b0dee 100644 --- a/Code/src/js/level2/GamingBoard.js +++ b/Code/src/js/level2/GamingBoard.js @@ -14,8 +14,7 @@ class GamingBoard extends Phaser.Scene { } create() { - - listBonus.push(new BonusSpeed('Balle Argent', this, WIDTH_MAP / 2, WIDTH_MAP / 2, 3, 2000)); + listBonus.push(new BonusSpeed('Fusée', this, WIDTH_MAP / 2, WIDTH_MAP / 2, 5, 2000)); this.add.image(0, 0, 'background').alpha = 0.1; @@ -31,6 +30,7 @@ class GamingBoard extends Phaser.Scene { update(time, delta) { super.update(time, delta); + console.log(delta); this.listRobot.forEach(function (robot) { robot.read(); }) diff --git a/Code/src/js/level2/Robot.js b/Code/src/js/level2/Robot.js index 08530f6..7c69a57 100644 --- a/Code/src/js/level2/Robot.js +++ b/Code/src/js/level2/Robot.js @@ -1,16 +1,16 @@ class Robot { - constructor(height, width, posX, posY, color, scene, name = 'enemy', speed = 1) { - this.speed = speed; - this.speedReload = SPEED_RELOAD_BEGIN; - this.timeReload = TIME_RELOAD; + constructor(height, width, posX, posY, color, scene, name = 'enemy') { + this.speed = SPEED_BASE + SPEED_BEGIN; + this.speedReload = SPEED_RELOAD_BASE + SPEED_RELOAD_BEGIN; + this.range = RANGE_BASE + RANGE_BEGIN; + this.damage = DAMAGE_BASE + DAMAGE_BEGIN; + this.speedBonus = 1; this.name = name; this.height = height; this.width = width; this.x = posX; this.y = posY; this.color = color; - this.range = RANGE_BEGIN; - this.damage = DAMAGE_BEGIN; this.life = new HealthBar(scene, this.width * 2, this.width / 3, this.x, this.y - this.width, LIFE, 0x008000); this.shield = new HealthBar(scene, this.width * 2, this.width / 3, this.x, this.y - this.width * 1.5, SHIELD, 0x0000FF); this.circleRange = null; @@ -82,28 +82,29 @@ class Robot { } setDamage(damage = this.damage) { - this.damage = damage; + this.damage = damage + DAMAGE_BASE; } setRange(range = this.range) { - this.range = range; + this.range = range + RANGE_BASE; this.drawCircleRange(); } setSpeed(speed = this.speed) { - this.speed = speed; + this.speed = speed + SPEED_BASE; } setSpeedReload(speedReload = this.speedReload) { - this.speedReload = speedReload; + this.speedReload = speedReload + SPEED_RELOAD_BASE; } - increaseSpeed(amount) { - this.speed += amount; + increaseSpeedBonus(amount) { + this.speedBonus += amount; } - decreaseSpeed(amount) { - this.speed -= amount; + decreaseSpeedBonus(amount) { + this.speedBonus -= amount; + console.log(this.speed); } advanceToTarget() { @@ -168,19 +169,19 @@ class Robot { let velocity = []; let diffX = target.x - this.x; let diffY = target.y - this.y; + if (diffX === 0 && diffY === 0) { + + } let hypot = Math.hypot(diffX, diffY); - velocity[0] = diffX / hypot * WIDTH_MAP / 1000 * SPEED * this.speed * SPEED_GAME; - velocity[1] = diffY / hypot * WIDTH_MAP / 1000 * SPEED * this.speed * SPEED_GAME; + velocity[0] = diffX / hypot * SPEED * this.speed * this.speedBonus * SPEED_GAME; // Velocity X + velocity[1] = diffY / hypot * SPEED * this.speed * this.speedBonus * SPEED_GAME; // Velocity Y if (calcul) { - if (this.x + this.width / 2 + velocity[0] > WIDTH_MAP || this.x - this.width / 2 + velocity[0] < 0) { - console.log(velocity); + if (this.x + this.width / 2 + velocity[0] > WIDTH_MAP || this.x - this.width / 2 - velocity[0] < 0) { velocity[1] += velocity[0] * Math.sign(velocity[1]); velocity[0] = 0; - console.log(velocity); } else { - if (this.y + this.width / 2 + velocity[1] > WIDTH_MAP || this.y - this.width / 2 + velocity[1] < 0) { - console.log(velocity); - velocity[0] += velocity[1] * Math.sign(velocity[0]); + if (this.y + this.width / 2 - velocity[1] > WIDTH_MAP || this.y - this.width / 2 + velocity[1] < 0) { + velocity[0] += velocity[1] * Math.sign(-velocity[0]); velocity[1] = 0; } } @@ -231,7 +232,7 @@ class Robot { }); this.scene.time.addEvent({ - delay: TIME_RELOAD / this.speedReload / SPEED_GAME, + delay: SPEED_RELOAD / this.speedReload / SPEED_GAME, callback: this.reload, callbackScope: this }); diff --git a/Code/src/js/level2/Variable.js b/Code/src/js/level2/Variable.js index 0b8d6e1..c737576 100644 --- a/Code/src/js/level2/Variable.js +++ b/Code/src/js/level2/Variable.js @@ -16,15 +16,28 @@ const HEIGHT_WINDOW = $(document).height() - 20; const WIDTH_MAP = WIDTH_WINDOW < HEIGHT_WINDOW ? WIDTH_WINDOW * 0.8 : HEIGHT_WINDOW * 0.8; const OFFX_MAP = WIDTH_WINDOW / 20; const OFFY_MAP = WIDTH_WINDOW / 20; -const SPEED = 2; + const LIFE = 100; -const DAMAGE = 10; -const DAMAGE_BEGIN = 3; const SHIELD = 100; + +const VALUE_MAX_BAR = 5; + +const SPEED = WIDTH_MAP / 1000; +const SPEED_BASE = 1; +const SPEED_BEGIN = 3; + +const RANGE = WIDTH_MAP / 16; +const RANGE_BASE = 3; const RANGE_BEGIN = 2; -const RANGE = WIDTH_MAP / 4; + +const SPEED_RELOAD = 4000; +const SPEED_RELOAD_BASE = 2; +const SPEED_RELOAD_BEGIN = 3; + +const DAMAGE = 3; +const DAMAGE_BASE = 10; +const DAMAGE_BEGIN = 2; + const HEIGHT_BONUS = WIDTH_MAP / 10; const HEIGHT_DAMAGE = WIDTH_MAP / 20; -const DURATION_DAMAGE = 700; -const TIME_RELOAD = 4000; -const SPEED_RELOAD_BEGIN = 2; \ No newline at end of file +const DURATION_DAMAGE = 700; \ No newline at end of file