From 2f5d29daa7a4e3175be1af5be4cdf95c1c3bb81f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 2 Dec 2018 23:40:56 +0100 Subject: [PATCH 01/56] test: add test --- 2018/day1.spec.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 2018/day1.spec.js diff --git a/2018/day1.spec.js b/2018/day1.spec.js new file mode 100644 index 0000000..08a37a7 --- /dev/null +++ b/2018/day1.spec.js @@ -0,0 +1,12 @@ +'use strict' + +describe('device calibration', () => { + it('should calculate the right frequency', () => { + expect(calibrate([ + 1, -2, 3, 1 + ])).toEqual(3) + expect(calibrate([1,1,1])).toEqual(3) + expect(calibrate([1,1,-2])).toEqual(0) + expect(calibrate([-1,-2,-3])).toEqual(-6) + }) +}) \ No newline at end of file From 192a17ddfc794f8953856baa0e718962f0841837 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 2 Dec 2018 23:47:14 +0100 Subject: [PATCH 02/56] feat: implement solution --- 2018/day1.js | 5 + 2018/day1.spec.js | 1025 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 1027 insertions(+), 3 deletions(-) create mode 100644 2018/day1.js diff --git a/2018/day1.js b/2018/day1.js new file mode 100644 index 0000000..f1df55b --- /dev/null +++ b/2018/day1.js @@ -0,0 +1,5 @@ +'use strict' + +module.exports = { + calibrate: changes => changes.reduce((frequencies, frequency) => frequencies + frequency, 0) +} \ No newline at end of file diff --git a/2018/day1.spec.js b/2018/day1.spec.js index 08a37a7..d53ca5a 100644 --- a/2018/day1.spec.js +++ b/2018/day1.spec.js @@ -1,12 +1,1031 @@ 'use strict' +const {calibrate} = require('./day1') + describe('device calibration', () => { it('should calculate the right frequency', () => { expect(calibrate([ 1, -2, 3, 1 ])).toEqual(3) - expect(calibrate([1,1,1])).toEqual(3) - expect(calibrate([1,1,-2])).toEqual(0) - expect(calibrate([-1,-2,-3])).toEqual(-6) + expect(calibrate([1, 1, 1])).toEqual(3) + expect(calibrate([1, 1, -2])).toEqual(0) + expect(calibrate([-1, -2, -3])).toEqual(-6) + }) + + it('should calculate the solution', () => { + expect(calibrate([ + +16, + -2, + -5, + +1, + -12, + -1, + -8, + +12, + +5, + -18, + -12, + -11, + -1, + +2, + -8, + -6, + -1, + -17, + -18, + +16, + -4, + +18, + +7, + -4, + +13, + +11, + -5, + +11, + -8, + +15, + +8, + -16, + +15, + +10, + -19, + -17, + +5, + -13, + +10, + +14, + +16, + +8, + +14, + -8, + +19, + -17, + +14, + +12, + +8, + +9, + -11, + +1, + +2, + -16, + +19, + +13, + -5, + +6, + -10, + -6, + +4, + -15, + +20, + +18, + -14, + +15, + +3, + +4, + -3, + -9, + +1, + +18, + +8, + +2, + -11, + +19, + -3, + -10, + +14, + +12, + +6, + -17, + -14, + -10, + -18, + +19, + +4, + +12, + -18, + -4, + -8, + -4, + -20, + -16, + -1, + -18, + +2, + -17, + -17, + +7, + -12, + -3, + +4, + +9, + +6, + +9, + +6, + +1, + -17, + +13, + +14, + -2, + +8, + +9, + -12, + +13, + -5, + -15, + +21, + +5, + +18, + -8, + -9, + +11, + +14, + +17, + +4, + -18, + +23, + +20, + -14, + +5, + -12, + +2, + +25, + +16, + -10, + -14, + +17, + -4, + -1, + -5, + +19, + +1, + +17, + +3, + -9, + +5, + +8, + -10, + +14, + +17, + -15, + +19, + +1, + -19, + +8, + +15, + -12, + +19, + -15, + +7, + +2, + -11, + -18, + +11, + +1, + +9, + +18, + +5, + +8, + -6, + -16, + -15, + -9, + +8, + -6, + -1, + -18, + -3, + -16, + +10, + -2, + -13, + +17, + +15, + -2, + -8, + -11, + -9, + -1, + +2, + +13, + +22, + -19, + +9, + +8, + -9, + -20, + +5, + -8, + -13, + -5, + +11, + +17, + +4, + +13, + +14, + +15, + +6, + +10, + -8, + +7, + +9, + +15, + +17, + +15, + +5, + +4, + +17, + -16, + -6, + +7, + +2, + +18, + +19, + -3, + -4, + -11, + +1, + -15, + +17, + -14, + +17, + +13, + -6, + -8, + +16, + +12, + +14, + -3, + -15, + -19, + -6, + -9, + -12, + -18, + +4, + -7, + +14, + -10, + -12, + +2, + +19, + +12, + -5, + +6, + +21, + -2, + -14, + +21, + -16, + +4, + +10, + +10, + +12, + +7, + +16, + -1, + +16, + +5, + +19, + +14, + +8, + +14, + -1, + -1, + -10, + -13, + -1, + -3, + +8, + +14, + -9, + +8, + +10, + -7, + +19, + -13, + +6, + +8, + +1, + +11, + -17, + +10, + +16, + +1, + -13, + +16, + +3, + +4, + -14, + +16, + +17, + -14, + +16, + +15, + +16, + +19, + -15, + +12, + +4, + -21, + +14, + -12, + -16, + -12, + -3, + +11, + -3, + +4, + -11, + +3, + +6, + +15, + -16, + -16, + -17, + -17, + +16, + -10, + +4, + +10, + -18, + +11, + -16, + -16, + -3, + -12, + +11, + -20, + +6, + -11, + -4, + -10, + -13, + -19, + +4, + -11, + -6, + +18, + -9, + +12, + +7, + +10, + -2, + -3, + +13, + -5, + -2, + -2, + -14, + +7, + -16, + -4, + -2, + -6, + +9, + +5, + -18, + -15, + +2, + +8, + -21, + +20, + -18, + -10, + +9, + +17, + -12, + -8, + -15, + +31, + -7, + -4, + -12, + -25, + -20, + -16, + -6, + +18, + +18, + -1, + +8, + +5, + -7, + -30, + -13, + -10, + -15, + -12, + -6, + +10, + +16, + -5, + -17, + -14, + +15, + +10, + +14, + -2, + +10, + +4, + +3, + -19, + +9, + +2, + -17, + +9, + -6, + +1, + +7, + +9, + +7, + -4, + +5, + +6, + +17, + -4, + -18, + +7, + -20, + -11, + -13, + -9, + -8, + +46, + -2, + +22, + +16, + -22, + -38, + -3, + +18, + +28, + +33, + +24, + +17, + +11, + -13, + -5, + +19, + -9, + +10, + +15, + +22, + +8, + +6, + -13, + -9, + -4, + -2, + +20, + -11, + -28, + +14, + +16, + +13, + +5, + +12, + +7, + +15, + +19, + -6, + +14, + +15, + -14, + +18, + +17, + +4, + -10, + +2, + -10, + -14, + +3, + -7, + +22, + -2, + +1, + +4, + -6, + -3, + +14, + +23, + -6, + -7, + -16, + -1, + +6, + +21, + +17, + +4, + -17, + +8, + -4, + +21, + -18, + -5, + +4, + +13, + +24, + +17, + +13, + +20, + +18, + +17, + +9, + +9, + +3, + +20, + +17, + -7, + +10, + +22, + -27, + +4, + -15, + +5, + -4, + -24, + +4, + -20, + -35, + +1, + -5, + +17, + -20, + +4, + +19, + +23, + -6, + +62, + +59, + -8, + -10, + +90, + +99, + -18, + -18, + +34, + -6, + +28, + -2, + +27, + -5, + +4, + +9, + +9, + -3, + +21, + +4, + -15, + +14, + -15, + +22, + -15, + -20, + +30, + +9, + -1, + +107, + -7, + -8, + -8, + +28, + +12, + -5, + -114, + +3, + +72, + -14, + -68, + -42, + +684, + +82290, + -12, + -19, + -3, + +6, + +4, + +3, + +16, + +6, + -15, + +18, + +3, + +13, + +10, + -4, + +10, + -17, + -7, + -18, + +2, + +18, + +13, + +13, + +6, + +8, + +18, + +11, + -13, + +8, + -7, + +11, + +4, + +5, + +7, + -2, + -16, + -19, + +14, + +19, + -6, + +11, + +8, + +12, + +7, + +11, + +5, + -18, + -4, + +1, + -7, + +17, + -8, + -8, + -5, + -10, + -16, + +3, + +15, + -17, + -9, + +14, + -9, + -12, + -4, + -15, + +7, + +3, + +17, + -3, + -19, + +3, + +6, + -2, + -17, + +18, + +4, + -8, + -8, + -12, + +10, + -18, + -20, + -5, + +15, + -13, + +20, + +4, + +9, + +1, + -7, + -6, + -5, + +10, + -9, + -2, + -21, + +14, + +21, + +11, + +4, + -14, + -5, + -16, + +1, + -15, + -10, + +5, + -1, + +13, + -11, + -16, + -16, + -15, + +13, + -2, + +5, + -14, + +4, + -8, + -3, + +10, + +5, + -3, + -16, + +5, + +16, + -20, + +11, + +16, + +6, + -2, + +6, + +3, + +21, + -15, + +1, + -9, + -2, + +12, + -3, + -19, + -9, + -16, + +11, + +4, + +18, + +9, + +26, + -28, + -12, + -22, + -18, + +4, + -7, + -2, + -5, + -16, + -19, + -14, + -3, + -5, + +14, + +17, + -4, + +7, + +4, + -9, + +14, + +3, + -11, + +15, + +10, + +13, + -10, + -15, + +18, + -13, + +1, + +2, + +3, + +6, + +10, + +1, + -18, + -9, + +3, + -22, + -13, + -16, + -15, + +3, + +6, + +1, + -12, + +3, + -17, + -1, + -16, + +4, + +9, + +8, + -18, + -15, + -18, + -8, + -13, + +2, + +15, + +8, + +3, + -16, + +2, + -16, + -12, + -5, + -3, + -12, + +19, + +14, + +20, + -12, + -11, + +9, + -10, + -6, + -10, + +14, + -17, + +12, + -14, + +16, + -6, + +8, + -10, + -17, + +4, + -6, + -1, + -18, + +2, + +4, + +9, + -5, + -13, + -7, + -16, + -14, + -8, + -10, + -4, + -19, + -19, + +20, + -4, + +13, + +19, + +9, + -17, + -4, + +11, + +18, + -1, + -3, + -16, + -14, + -17, + -11, + -6, + +14, + +6, + -7, + +5, + -7, + +14, + +6, + -3, + -19, + -17, + -15, + -12, + +4, + +5, + +7, + +5, + +1, + -8, + +3, + -11, + -13, + +4, + -17, + +15, + +3, + -11, + -17, + -4, + -7, + -1, + -5, + -7, + +3, + +5, + +15, + +21, + +4, + +17, + +2, + +12, + -1, + -1, + +5, + +17, + -8, + -3, + -2, + +7, + -13, + -19, + -2, + +3, + -16, + +11, + +7, + -14, + +19, + +3, + +11, + +14, + -12, + +2, + -14, + -18, + +1, + -27, + +13, + +3, + +8, + -14, + -40, + -1, + -10, + -4, + +8, + -31, + -10, + -3, + +20, + +6, + -64, + +7, + +21, + +52, + +16, + +32, + -7, + -3, + +2, + -91, + +24, + -94, + +35, + -117, + +18, + -19, + +8, + -12, + +19, + -12, + +8, + -24, + -19, + +14, + -24, + +7, + -11, + -19, + -2, + -16, + -2, + -6, + +10, + -12, + +1, + +5, + -20, + +10, + -15, + -3, + +7, + +12, + +8, + +11, + +13, + -11, + -11, + +13, + +20, + -18, + +9, + -16, + +18, + -10, + +20, + -13, + +15, + -18, + +8, + +14, + +18, + +4, + -6, + +16, + -2, + +9, + -2, + +33, + +4, + +6, + +19, + -11, + +14, + -13, + +4, + -2, + -4, + -21, + -10, + -82696 + ])).toEqual(585) }) }) \ No newline at end of file From 519b278bad0eaa0b9f208576b098713bd75aca61 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 2 Dec 2018 23:47:43 +0100 Subject: [PATCH 03/56] chore: init project --- 2018/package-lock.json | 4871 ++++++++++++++++++++++++++++++++++++++++ 2018/package.json | 28 + 2 files changed, 4899 insertions(+) create mode 100644 2018/package-lock.json create mode 100644 2018/package.json diff --git a/2018/package-lock.json b/2018/package-lock.json new file mode 100644 index 0000000..78419dc --- /dev/null +++ b/2018/package-lock.json @@ -0,0 +1,4871 @@ +{ + "name": "@coderbyheart/adventofcode2018", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "requires": { + "@babel/highlight": "^7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "requires": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + } + } + }, + "abab": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==" + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==" + }, + "acorn-globals": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", + "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==" + } + } + }, + "acorn-walk": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==" + }, + "ajv": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", + "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "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" + } + } + } + }, + "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" + } + }, + "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-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" + } + }, + "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==" + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "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" + } + }, + "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" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "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" + } + } + } + }, + "append-transform": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz", + "integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=", + "requires": { + "default-require-extensions": "^1.0.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", + "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", + "requires": { + "arr-flatten": "^1.0.1" + } + }, + "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-equal": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", + "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" + }, + "array-unique": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", + "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=" + }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==" + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + } + } + }, + "babel-core": { + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", + "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-generator": "^6.26.0", + "babel-helpers": "^6.24.1", + "babel-messages": "^6.23.0", + "babel-register": "^6.26.0", + "babel-runtime": "^6.26.0", + "babel-template": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "convert-source-map": "^1.5.1", + "debug": "^2.6.9", + "json5": "^0.5.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.4", + "path-is-absolute": "^1.0.1", + "private": "^0.1.8", + "slash": "^1.0.0", + "source-map": "^0.5.7" + } + }, + "babel-generator": { + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", + "requires": { + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "detect-indent": "^4.0.0", + "jsesc": "^1.3.0", + "lodash": "^4.17.4", + "source-map": "^0.5.7", + "trim-right": "^1.0.1" + } + }, + "babel-helpers": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", + "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", + "requires": { + "babel-runtime": "^6.22.0", + "babel-template": "^6.24.1" + } + }, + "babel-jest": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz", + "integrity": "sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew==", + "requires": { + "babel-plugin-istanbul": "^4.1.6", + "babel-preset-jest": "^23.2.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-istanbul": { + "version": "4.1.6", + "resolved": "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz", + "integrity": "sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ==", + "requires": { + "babel-plugin-syntax-object-rest-spread": "^6.13.0", + "find-up": "^2.1.0", + "istanbul-lib-instrument": "^1.10.1", + "test-exclude": "^4.2.1" + } + }, + "babel-plugin-jest-hoist": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz", + "integrity": "sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc=" + }, + "babel-plugin-syntax-object-rest-spread": { + "version": "6.13.0", + "resolved": "http://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", + "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=" + }, + "babel-preset-jest": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz", + "integrity": "sha1-jsegOhOPABoaj7HoETZSvxpV2kY=", + "requires": { + "babel-plugin-jest-hoist": "^23.2.0", + "babel-plugin-syntax-object-rest-spread": "^6.13.0" + } + }, + "babel-register": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", + "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", + "requires": { + "babel-core": "^6.26.0", + "babel-runtime": "^6.26.0", + "core-js": "^2.5.0", + "home-or-tmp": "^2.0.0", + "lodash": "^4.17.4", + "mkdirp": "^0.5.1", + "source-map-support": "^0.4.15" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "1.8.5", + "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", + "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", + "requires": { + "expand-range": "^1.8.1", + "preserve": "^0.2.0", + "repeat-element": "^1.1.2" + } + }, + "browser-process-hrtime": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", + "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==" + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "requires": { + "resolve": "1.1.7" + } + }, + "bser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", + "integrity": "sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk=", + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "callsites": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" + }, + "capture-exit": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz", + "integrity": "sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28=", + "requires": { + "rsvp": "^3.3.3" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "ci-info": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", + "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "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", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "optional": true + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" + }, + "core-js": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", + "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "cssom": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", + "integrity": "sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog==" + }, + "cssstyle": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz", + "integrity": "sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog==", + "requires": { + "cssom": "0.3.x" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", + "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "requires": { + "abab": "^2.0.0", + "whatwg-mimetype": "^2.2.0", + "whatwg-url": "^7.0.0" + }, + "dependencies": { + "whatwg-url": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", + "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "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=" + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + }, + "default-require-extensions": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz", + "integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=", + "requires": { + "strip-bom": "^2.0.0" + } + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "requires": { + "object-keys": "^1.0.12" + } + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "detect-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", + "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", + "requires": { + "repeating": "^2.0.0" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" + }, + "domexception": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", + "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "requires": { + "webidl-conversions": "^4.0.2" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", + "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", + "requires": { + "es-to-primitive": "^1.1.1", + "function-bind": "^1.1.1", + "has": "^1.0.1", + "is-callable": "^1.1.3", + "is-regex": "^1.0.4" + } + }, + "es-to-primitive": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "escodegen": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz", + "integrity": "sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw==", + "requires": { + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "esutils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" + }, + "exec-sh": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", + "integrity": "sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw==", + "requires": { + "merge": "^1.2.0" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=" + }, + "expand-brackets": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", + "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", + "requires": { + "is-posix-bracket": "^0.1.0" + } + }, + "expand-range": { + "version": "1.8.2", + "resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", + "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", + "requires": { + "fill-range": "^2.1.0" + } + }, + "expect": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz", + "integrity": "sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w==", + "requires": { + "ansi-styles": "^3.2.0", + "jest-diff": "^23.6.0", + "jest-get-type": "^22.1.0", + "jest-matcher-utils": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0" + } + }, + "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": "0.3.2", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", + "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + }, + "fb-watchman": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz", + "integrity": "sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg=", + "requires": { + "bser": "^2.0.0" + } + }, + "filename-regex": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", + "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=" + }, + "fileset": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz", + "integrity": "sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA=", + "requires": { + "glob": "^7.0.3", + "minimatch": "^3.0.3" + } + }, + "fill-range": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.4.tgz", + "integrity": "sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==", + "requires": { + "is-number": "^2.1.0", + "isobject": "^2.0.0", + "randomatic": "^3.0.0", + "repeat-element": "^1.1.2", + "repeat-string": "^1.5.2" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "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": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "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", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", + "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "optional": true, + "requires": { + "nan": "^2.9.2", + "node-pre-gyp": "^0.10.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.5.1", + "bundled": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "optional": true, + "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" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.21", + "bundled": true, + "optional": true, + "requires": { + "safer-buffer": "^2.1.0" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true + }, + "minipass": { + "version": "2.2.4", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.1", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "needle": { + "version": "2.2.0", + "bundled": true, + "optional": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.0", + "bundled": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.0", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.1.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.3", + "bundled": true, + "optional": true + }, + "npm-packlist": { + "version": "1.1.10", + "bundled": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "rc": { + "version": "1.2.7", + "bundled": true, + "optional": true, + "requires": { + "deep-extend": "^0.5.1", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "optional": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.1", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "optional": true + }, + "semver": { + "version": "5.5.0", + "bundled": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "optional": true + }, + "tar": { + "version": "4.4.1", + "bundled": true, + "optional": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.2.4", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.1", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "optional": true + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "optional": true, + "requires": { + "string-width": "^1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "get-stream": { + "version": "3.0.0", + "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "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" + } + }, + "glob-base": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", + "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "requires": { + "glob-parent": "^2.0.0", + "is-glob": "^2.0.0" + } + }, + "glob-parent": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", + "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "requires": { + "is-glob": "^2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" + }, + "handlebars": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", + "requires": { + "async": "^2.5.0", + "optimist": "^0.6.1", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "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": { + "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" + } + } + } + }, + "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" + } + } + } + }, + "home-or-tmp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", + "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "html-encoding-sniffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", + "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "requires": { + "whatwg-encoding": "^1.0.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "import-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", + "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "requires": { + "pkg-dir": "^2.0.0", + "resolve-cwd": "^2.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "requires": { + "loose-envify": "^1.0.0" + } + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "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" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "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-builtin-module": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "requires": { + "builtin-modules": "^1.0.0" + } + }, + "is-callable": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", + "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" + }, + "is-ci": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", + "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", + "requires": { + "ci-info": "^1.5.0" + } + }, + "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" + } + }, + "is-date-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" + }, + "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-dotfile": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + }, + "is-equal-shallow": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", + "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", + "requires": { + "is-primitive": "^2.0.0" + } + }, + "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": "1.0.0", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + }, + "is-finite": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", + "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "is-generator-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz", + "integrity": "sha1-lp1J4bszKfa7fwkIm+JleLLd1Go=" + }, + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "requires": { + "is-extglob": "^1.0.0" + } + }, + "is-number": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", + "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "is-posix-bracket": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", + "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=" + }, + "is-primitive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", + "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" + }, + "is-regex": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "is-symbol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "requires": { + "has-symbols": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "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=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "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" + } + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "istanbul-api": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz", + "integrity": "sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA==", + "requires": { + "async": "^2.1.4", + "fileset": "^2.0.2", + "istanbul-lib-coverage": "^1.2.1", + "istanbul-lib-hook": "^1.2.2", + "istanbul-lib-instrument": "^1.10.2", + "istanbul-lib-report": "^1.1.5", + "istanbul-lib-source-maps": "^1.2.6", + "istanbul-reports": "^1.5.1", + "js-yaml": "^3.7.0", + "mkdirp": "^0.5.1", + "once": "^1.4.0" + } + }, + "istanbul-lib-coverage": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz", + "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==" + }, + "istanbul-lib-hook": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz", + "integrity": "sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw==", + "requires": { + "append-transform": "^0.4.0" + } + }, + "istanbul-lib-instrument": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz", + "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==", + "requires": { + "babel-generator": "^6.18.0", + "babel-template": "^6.16.0", + "babel-traverse": "^6.18.0", + "babel-types": "^6.18.0", + "babylon": "^6.18.0", + "istanbul-lib-coverage": "^1.2.1", + "semver": "^5.3.0" + } + }, + "istanbul-lib-report": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz", + "integrity": "sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw==", + "requires": { + "istanbul-lib-coverage": "^1.2.1", + "mkdirp": "^0.5.1", + "path-parse": "^1.0.5", + "supports-color": "^3.1.2" + }, + "dependencies": { + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz", + "integrity": "sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg==", + "requires": { + "debug": "^3.1.0", + "istanbul-lib-coverage": "^1.2.1", + "mkdirp": "^0.5.1", + "rimraf": "^2.6.1", + "source-map": "^0.5.3" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "istanbul-reports": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz", + "integrity": "sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw==", + "requires": { + "handlebars": "^4.0.3" + } + }, + "jest": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz", + "integrity": "sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw==", + "requires": { + "import-local": "^1.0.0", + "jest-cli": "^23.6.0" + }, + "dependencies": { + "jest-cli": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz", + "integrity": "sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ==", + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.1.11", + "import-local": "^1.0.0", + "is-ci": "^1.0.10", + "istanbul-api": "^1.3.1", + "istanbul-lib-coverage": "^1.2.0", + "istanbul-lib-instrument": "^1.10.1", + "istanbul-lib-source-maps": "^1.2.4", + "jest-changed-files": "^23.4.2", + "jest-config": "^23.6.0", + "jest-environment-jsdom": "^23.4.0", + "jest-get-type": "^22.1.0", + "jest-haste-map": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0", + "jest-resolve-dependencies": "^23.6.0", + "jest-runner": "^23.6.0", + "jest-runtime": "^23.6.0", + "jest-snapshot": "^23.6.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.6.0", + "jest-watcher": "^23.4.0", + "jest-worker": "^23.2.0", + "micromatch": "^2.3.11", + "node-notifier": "^5.2.1", + "prompts": "^0.1.9", + "realpath-native": "^1.0.0", + "rimraf": "^2.5.4", + "slash": "^1.0.0", + "string-length": "^2.0.0", + "strip-ansi": "^4.0.0", + "which": "^1.2.12", + "yargs": "^11.0.0" + } + } + } + }, + "jest-changed-files": { + "version": "23.4.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz", + "integrity": "sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA==", + "requires": { + "throat": "^4.0.0" + } + }, + "jest-config": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz", + "integrity": "sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ==", + "requires": { + "babel-core": "^6.0.0", + "babel-jest": "^23.6.0", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^23.4.0", + "jest-environment-node": "^23.4.0", + "jest-get-type": "^22.1.0", + "jest-jasmine2": "^23.6.0", + "jest-regex-util": "^23.3.0", + "jest-resolve": "^23.6.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.6.0", + "micromatch": "^2.3.11", + "pretty-format": "^23.6.0" + } + }, + "jest-diff": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz", + "integrity": "sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g==", + "requires": { + "chalk": "^2.0.1", + "diff": "^3.2.0", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.6.0" + } + }, + "jest-docblock": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz", + "integrity": "sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c=", + "requires": { + "detect-newline": "^2.1.0" + } + }, + "jest-each": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz", + "integrity": "sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg==", + "requires": { + "chalk": "^2.0.1", + "pretty-format": "^23.6.0" + } + }, + "jest-environment-jsdom": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz", + "integrity": "sha1-BWp5UrP+pROsYqFAosNox52eYCM=", + "requires": { + "jest-mock": "^23.2.0", + "jest-util": "^23.4.0", + "jsdom": "^11.5.1" + } + }, + "jest-environment-node": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz", + "integrity": "sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA=", + "requires": { + "jest-mock": "^23.2.0", + "jest-util": "^23.4.0" + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "http://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==" + }, + "jest-haste-map": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz", + "integrity": "sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg==", + "requires": { + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.1.11", + "invariant": "^2.2.4", + "jest-docblock": "^23.2.0", + "jest-serializer": "^23.0.1", + "jest-worker": "^23.2.0", + "micromatch": "^2.3.11", + "sane": "^2.0.0" + } + }, + "jest-jasmine2": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz", + "integrity": "sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ==", + "requires": { + "babel-traverse": "^6.0.0", + "chalk": "^2.0.1", + "co": "^4.6.0", + "expect": "^23.6.0", + "is-generator-fn": "^1.0.0", + "jest-diff": "^23.6.0", + "jest-each": "^23.6.0", + "jest-matcher-utils": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-snapshot": "^23.6.0", + "jest-util": "^23.4.0", + "pretty-format": "^23.6.0" + } + }, + "jest-leak-detector": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz", + "integrity": "sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg==", + "requires": { + "pretty-format": "^23.6.0" + } + }, + "jest-matcher-utils": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz", + "integrity": "sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog==", + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "pretty-format": "^23.6.0" + } + }, + "jest-message-util": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz", + "integrity": "sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8=", + "requires": { + "@babel/code-frame": "^7.0.0-beta.35", + "chalk": "^2.0.1", + "micromatch": "^2.3.11", + "slash": "^1.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-mock": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz", + "integrity": "sha1-rRxg8p6HGdR8JuETgJi20YsmETQ=" + }, + "jest-regex-util": { + "version": "23.3.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz", + "integrity": "sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U=" + }, + "jest-resolve": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz", + "integrity": "sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA==", + "requires": { + "browser-resolve": "^1.11.3", + "chalk": "^2.0.1", + "realpath-native": "^1.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz", + "integrity": "sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA==", + "requires": { + "jest-regex-util": "^23.3.0", + "jest-snapshot": "^23.6.0" + } + }, + "jest-runner": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz", + "integrity": "sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA==", + "requires": { + "exit": "^0.1.2", + "graceful-fs": "^4.1.11", + "jest-config": "^23.6.0", + "jest-docblock": "^23.2.0", + "jest-haste-map": "^23.6.0", + "jest-jasmine2": "^23.6.0", + "jest-leak-detector": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-runtime": "^23.6.0", + "jest-util": "^23.4.0", + "jest-worker": "^23.2.0", + "source-map-support": "^0.5.6", + "throat": "^4.0.0" + }, + "dependencies": { + "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-support": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", + "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "jest-runtime": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz", + "integrity": "sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw==", + "requires": { + "babel-core": "^6.0.0", + "babel-plugin-istanbul": "^4.1.6", + "chalk": "^2.0.1", + "convert-source-map": "^1.4.0", + "exit": "^0.1.2", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.1.11", + "jest-config": "^23.6.0", + "jest-haste-map": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-regex-util": "^23.3.0", + "jest-resolve": "^23.6.0", + "jest-snapshot": "^23.6.0", + "jest-util": "^23.4.0", + "jest-validate": "^23.6.0", + "micromatch": "^2.3.11", + "realpath-native": "^1.0.0", + "slash": "^1.0.0", + "strip-bom": "3.0.0", + "write-file-atomic": "^2.1.0", + "yargs": "^11.0.0" + }, + "dependencies": { + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "jest-serializer": { + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz", + "integrity": "sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU=" + }, + "jest-snapshot": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz", + "integrity": "sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg==", + "requires": { + "babel-types": "^6.0.0", + "chalk": "^2.0.1", + "jest-diff": "^23.6.0", + "jest-matcher-utils": "^23.6.0", + "jest-message-util": "^23.4.0", + "jest-resolve": "^23.6.0", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^23.6.0", + "semver": "^5.5.0" + } + }, + "jest-util": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz", + "integrity": "sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE=", + "requires": { + "callsites": "^2.0.0", + "chalk": "^2.0.1", + "graceful-fs": "^4.1.11", + "is-ci": "^1.0.10", + "jest-message-util": "^23.4.0", + "mkdirp": "^0.5.1", + "slash": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + } + } + }, + "jest-validate": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz", + "integrity": "sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==", + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.1.0", + "leven": "^2.1.0", + "pretty-format": "^23.6.0" + } + }, + "jest-watcher": { + "version": "23.4.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz", + "integrity": "sha1-0uKM50+NrWxq/JIrksq+9u0FyRw=", + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "string-length": "^2.0.0" + } + }, + "jest-worker": { + "version": "23.2.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz", + "integrity": "sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk=", + "requires": { + "merge-stream": "^1.0.1" + } + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" + }, + "js-yaml": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", + "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "requires": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "jsesc": { + "version": "1.3.0", + "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "json5": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.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" + } + }, + "kleur": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz", + "integrity": "sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ==" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "left-pad": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz", + "integrity": "sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA==" + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=" + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, + "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" + } + }, + "math-random": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz", + "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=" + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "merge": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/merge/-/merge-1.2.1.tgz", + "integrity": "sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ==" + }, + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "requires": { + "readable-stream": "^2.0.1" + } + }, + "micromatch": { + "version": "2.3.11", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", + "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", + "requires": { + "arr-diff": "^2.0.0", + "array-unique": "^0.2.1", + "braces": "^1.8.2", + "expand-brackets": "^0.1.4", + "extglob": "^0.3.1", + "filename-regex": "^2.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.1", + "kind-of": "^3.0.2", + "normalize-path": "^2.0.1", + "object.omit": "^2.0.0", + "parse-glob": "^3.0.4", + "regex-cache": "^0.4.2" + } + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "requires": { + "mime-db": "~1.37.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mixin-deep": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", + "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "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": "0.5.1", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "nan": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "optional": true + }, + "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" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=" + }, + "node-notifier": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.3.0.tgz", + "integrity": "sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q==", + "requires": { + "growly": "^1.3.0", + "semver": "^5.5.0", + "shellwords": "^0.1.1", + "which": "^1.3.0" + } + }, + "normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "requires": { + "hosted-git-info": "^2.1.4", + "is-builtin-module": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "nwsapi": { + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz", + "integrity": "sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "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" + } + } + } + }, + "object-keys": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", + "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "object.getownpropertydescriptors": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", + "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.5.1" + } + }, + "object.omit": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", + "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", + "requires": { + "for-own": "^0.1.4", + "is-extendable": "^0.1.1" + } + }, + "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" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optimist": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", + "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "requires": { + "minimist": "~0.0.1", + "wordwrap": "~0.0.2" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + }, + "dependencies": { + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" + } + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "parse-glob": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", + "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "requires": { + "glob-base": "^0.3.0", + "is-dotfile": "^1.0.0", + "is-extglob": "^1.0.0", + "is-glob": "^2.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" + }, + "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-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pify": { + "version": "2.3.0", + "resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "requires": { + "find-up": "^2.1.0" + } + }, + "pn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", + "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" + }, + "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=" + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" + }, + "preserve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", + "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=" + }, + "pretty-format": { + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz", + "integrity": "sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw==", + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "prompts": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", + "integrity": "sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w==", + "requires": { + "kleur": "^2.0.1", + "sisteransi": "^0.1.1" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "randomatic": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz", + "integrity": "sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==", + "requires": { + "is-number": "^4.0.0", + "kind-of": "^6.0.0", + "math-random": "^1.0.1" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "realpath-native": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.2.tgz", + "integrity": "sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g==", + "requires": { + "util.promisify": "^1.0.0" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "regex-cache": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz", + "integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==", + "requires": { + "is-equal-shallow": "^0.1.3" + } + }, + "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" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" + }, + "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=", + "requires": { + "is-finite": "^1.0.0" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + } + } + } + }, + "request-promise-core": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz", + "integrity": "sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY=", + "requires": { + "lodash": "^4.13.1" + } + }, + "request-promise-native": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz", + "integrity": "sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU=", + "requires": { + "request-promise-core": "1.1.1", + "stealthy-require": "^1.1.0", + "tough-cookie": ">=2.3.3" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + }, + "resolve-cwd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz", + "integrity": "sha1-AKn3OHVW4nA46uIyyqNypqWbZlo=", + "requires": { + "resolve-from": "^3.0.0" + } + }, + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + }, + "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.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", + "requires": { + "glob": "^7.0.5" + } + }, + "rsvp": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", + "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "http://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", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sane": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz", + "integrity": "sha1-tNwYYcIbQn6SlQej51HiosuKs/o=", + "requires": { + "anymatch": "^2.0.0", + "capture-exit": "^1.2.0", + "exec-sh": "^0.2.0", + "fb-watchman": "^2.0.0", + "fsevents": "^1.2.3", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5", + "watch": "~0.18.0" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" + }, + "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" + } + } + } + }, + "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" + } + }, + "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-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" + } + }, + "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==" + } + } + }, + "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" + } + } + } + }, + "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" + } + } + } + }, + "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" + } + }, + "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" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + }, + "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" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "set-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", + "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "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" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, + "sisteransi": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz", + "integrity": "sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g==" + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + }, + "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" + } + } + } + }, + "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" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" + } + } + }, + "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" + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.4.18", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz", + "integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==", + "requires": { + "source-map": "^0.5.6" + } + }, + "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.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", + "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==" + }, + "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.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", + "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", + "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==" + }, + "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" + } + } + } + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + }, + "string-length": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", + "integrity": "sha1-1A27aGo6zpYMHP/KVivyxF+DY+0=", + "requires": { + "astral-regex": "^1.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + } + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "symbol-tree": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", + "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=" + }, + "test-exclude": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz", + "integrity": "sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA==", + "requires": { + "arrify": "^1.0.1", + "micromatch": "^2.3.11", + "object-assign": "^4.1.0", + "read-pkg-up": "^1.0.1", + "require-main-filename": "^1.0.1" + } + }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=" + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=" + }, + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" + }, + "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" + } + }, + "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" + }, + "dependencies": { + "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" + } + } + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", + "requires": { + "punycode": "^2.1.0" + } + }, + "trim-right": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", + "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "uglify-js": { + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "optional": true, + "requires": { + "commander": "~2.17.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true + } + } + }, + "union-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", + "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^0.4.3" + }, + "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" + } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } + } + } + }, + "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=" + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + } + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "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-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "util.promisify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", + "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", + "requires": { + "define-properties": "^1.1.2", + "object.getownpropertydescriptors": "^2.0.3" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "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==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "w3c-hr-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", + "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "requires": { + "browser-process-hrtime": "^0.1.2" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "requires": { + "makeerror": "1.0.x" + } + }, + "watch": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz", + "integrity": "sha1-KAlUdsbffJDJYxOJkMClQj60uYY=", + "requires": { + "exec-sh": "^0.2.0", + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, + "webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" + }, + "whatwg-url": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", + "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + }, + "wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "write-file-atomic": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", + "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "yargs": { + "version": "11.1.0", + "resolved": "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz", + "integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==", + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "requires": { + "camelcase": "^4.1.0" + } + } + } +} diff --git a/2018/package.json b/2018/package.json new file mode 100644 index 0000000..9d82aea --- /dev/null +++ b/2018/package.json @@ -0,0 +1,28 @@ +{ + "name": "@coderbyheart/adventofcode2018", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "jest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/coderbyheart/adventofcode2018.git" + }, + "keywords": [ + "advent", + "of", + "code", + "javascript" + ], + "author": "Markus Tacker ", + "license": "MIT", + "bugs": { + "url": "https://github.com/coderbyheart/adventofcode2018/issues" + }, + "homepage": "https://github.com/coderbyheart/adventofcode2018#readme", + "dependencies": { + "jest": "^23.6.0" + } +} From 0432870bc27f8e08467c784afdcfb08e8268b040 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 2 Dec 2018 23:58:20 +0100 Subject: [PATCH 04/56] added --- 2018/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 2018/.gitignore diff --git a/2018/.gitignore b/2018/.gitignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/2018/.gitignore @@ -0,0 +1 @@ +node_modules From 8463e0bffe206cac9e5f8dd8fa561b56a0ab87fb Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 2 Dec 2018 23:58:38 +0100 Subject: [PATCH 05/56] test: add test for repeatedFrequency --- 2018/day1.spec.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/2018/day1.spec.js b/2018/day1.spec.js index d53ca5a..f9e01de 100644 --- a/2018/day1.spec.js +++ b/2018/day1.spec.js @@ -2,6 +2,12 @@ const {calibrate} = require('./day1') +function* listLooper (list) { + var index = 0; + while (true) + yield list[index++ % list.length]; +} + describe('device calibration', () => { it('should calculate the right frequency', () => { expect(calibrate([ @@ -12,6 +18,28 @@ describe('device calibration', () => { expect(calibrate([-1, -2, -3])).toEqual(-6) }) + it('should find the frequency which it reaches twice', () => { + expect(repeatedFrequency(listLooper([ + 1, -2, 3, 1 + ]))).toEqual(2) + + expect(repeatedFrequency(listLooper([ + +1, -1 + ]))).toEqual(0) + + expect(repeatedFrequency(listLooper([ + +3, +3, +4, -2, -4 + ]))).toEqual(10) + + expect(repeatedFrequency(listLooper([ + -6, +3, +8, +5, -6 + ]))).toEqual(5) + + expect(repeatedFrequency(listLooper([ + +7, +7, -2, -7, -4 + ]))).toEqual(14) + }) + it('should calculate the solution', () => { expect(calibrate([ +16, From b6dda528c957648ad0616603ef3e0db2e7ecdc54 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:12:45 +0100 Subject: [PATCH 06/56] day 1 puzzle 2 --- 2018/day1.js | 17 +- 2018/day1.json | 1014 ++++++++++++++++++++++++++++++++++++++++++++ 2018/day1.spec.js | 1026 +-------------------------------------------- 3 files changed, 1039 insertions(+), 1018 deletions(-) create mode 100644 2018/day1.json diff --git a/2018/day1.js b/2018/day1.js index f1df55b..764cbeb 100644 --- a/2018/day1.js +++ b/2018/day1.js @@ -1,5 +1,20 @@ 'use strict' +const calibrate = changes => changes.reduce((frequencies, frequency) => frequencies + frequency, 0) + +const repeatedFrequency = (frequencyGenerator, limit) => { + const seenFrequencies = {0: true} + const seenChanges = [] + do { + seenChanges.push(frequencyGenerator.next().value) + const frequency = calibrate(seenChanges) + if (seenFrequencies[frequency]) return frequency + seenFrequencies[frequency] = true + } while (true) +} + + module.exports = { - calibrate: changes => changes.reduce((frequencies, frequency) => frequencies + frequency, 0) + calibrate, + repeatedFrequency } \ No newline at end of file diff --git a/2018/day1.json b/2018/day1.json new file mode 100644 index 0000000..7b1f4a4 --- /dev/null +++ b/2018/day1.json @@ -0,0 +1,1014 @@ +[ + 16, +-2, +-5, +1, +-12, +-1, +-8, +12, +5, +-18, +-12, +-11, +-1, +2, +-8, +-6, +-1, +-17, +-18, +16, +-4, +18, +7, +-4, +13, +11, +-5, +11, +-8, +15, +8, +-16, +15, +10, +-19, +-17, +5, +-13, +10, +14, +16, +8, +14, +-8, +19, +-17, +14, +12, +8, +9, +-11, +1, +2, +-16, +19, +13, +-5, +6, +-10, +-6, +4, +-15, +20, +18, +-14, +15, +3, +4, +-3, +-9, +1, +18, +8, +2, +-11, +19, +-3, +-10, +14, +12, +6, +-17, +-14, +-10, +-18, +19, +4, +12, +-18, +-4, +-8, +-4, +-20, +-16, +-1, +-18, +2, +-17, +-17, +7, +-12, +-3, +4, +9, +6, +9, +6, +1, +-17, +13, +14, +-2, +8, +9, +-12, +13, +-5, +-15, +21, +5, +18, +-8, +-9, +11, +14, +17, +4, +-18, +23, +20, +-14, +5, +-12, +2, +25, +16, +-10, +-14, +17, +-4, +-1, +-5, +19, +1, +17, +3, +-9, +5, +8, +-10, +14, +17, +-15, +19, +1, +-19, +8, +15, +-12, +19, +-15, +7, +2, +-11, +-18, +11, +1, +9, +18, +5, +8, +-6, +-16, +-15, +-9, +8, +-6, +-1, +-18, +-3, +-16, +10, +-2, +-13, +17, +15, +-2, +-8, +-11, +-9, +-1, +2, +13, +22, +-19, +9, +8, +-9, +-20, +5, +-8, +-13, +-5, +11, +17, +4, +13, +14, +15, +6, +10, +-8, +7, +9, +15, +17, +15, +5, +4, +17, +-16, +-6, +7, +2, +18, +19, +-3, +-4, +-11, +1, +-15, +17, +-14, +17, +13, +-6, +-8, +16, +12, +14, +-3, +-15, +-19, +-6, +-9, +-12, +-18, +4, +-7, +14, +-10, +-12, +2, +19, +12, +-5, +6, +21, +-2, +-14, +21, +-16, +4, +10, +10, +12, +7, +16, +-1, +16, +5, +19, +14, +8, +14, +-1, +-1, +-10, +-13, +-1, +-3, +8, +14, +-9, +8, +10, +-7, +19, +-13, +6, +8, +1, +11, +-17, +10, +16, +1, +-13, +16, +3, +4, +-14, +16, +17, +-14, +16, +15, +16, +19, +-15, +12, +4, +-21, +14, +-12, +-16, +-12, +-3, +11, +-3, +4, +-11, +3, +6, +15, +-16, +-16, +-17, +-17, +16, +-10, +4, +10, +-18, +11, +-16, +-16, +-3, +-12, +11, +-20, +6, +-11, +-4, +-10, +-13, +-19, +4, +-11, +-6, +18, +-9, +12, +7, +10, +-2, +-3, +13, +-5, +-2, +-2, +-14, +7, +-16, +-4, +-2, +-6, +9, +5, +-18, +-15, +2, +8, +-21, +20, +-18, +-10, +9, +17, +-12, +-8, +-15, +31, +-7, +-4, +-12, +-25, +-20, +-16, +-6, +18, +18, +-1, +8, +5, +-7, +-30, +-13, +-10, +-15, +-12, +-6, +10, +16, +-5, +-17, +-14, +15, +10, +14, +-2, +10, +4, +3, +-19, +9, +2, +-17, +9, +-6, +1, +7, +9, +7, +-4, +5, +6, +17, +-4, +-18, +7, +-20, +-11, +-13, +-9, +-8, +46, +-2, +22, +16, +-22, +-38, +-3, +18, +28, +33, +24, +17, +11, +-13, +-5, +19, +-9, +10, +15, +22, +8, +6, +-13, +-9, +-4, +-2, +20, +-11, +-28, +14, +16, +13, +5, +12, +7, +15, +19, +-6, +14, +15, +-14, +18, +17, +4, +-10, +2, +-10, +-14, +3, +-7, +22, +-2, +1, +4, +-6, +-3, +14, +23, +-6, +-7, +-16, +-1, +6, +21, +17, +4, +-17, +8, +-4, +21, +-18, +-5, +4, +13, +24, +17, +13, +20, +18, +17, +9, +9, +3, +20, +17, +-7, +10, +22, +-27, +4, +-15, +5, +-4, +-24, +4, +-20, +-35, +1, +-5, +17, +-20, +4, +19, +23, +-6, +62, +59, +-8, +-10, +90, +99, +-18, +-18, +34, +-6, +28, +-2, +27, +-5, +4, +9, +9, +-3, +21, +4, +-15, +14, +-15, +22, +-15, +-20, +30, +9, +-1, +107, +-7, +-8, +-8, +28, +12, +-5, +-114, +3, +72, +-14, +-68, +-42, +684, +82290, +-12, +-19, +-3, +6, +4, +3, +16, +6, +-15, +18, +3, +13, +10, +-4, +10, +-17, +-7, +-18, +2, +18, +13, +13, +6, +8, +18, +11, +-13, +8, +-7, +11, +4, +5, +7, +-2, +-16, +-19, +14, +19, +-6, +11, +8, +12, +7, +11, +5, +-18, +-4, +1, +-7, +17, +-8, +-8, +-5, +-10, +-16, +3, +15, +-17, +-9, +14, +-9, +-12, +-4, +-15, +7, +3, +17, +-3, +-19, +3, +6, +-2, +-17, +18, +4, +-8, +-8, +-12, +10, +-18, +-20, +-5, +15, +-13, +20, +4, +9, +1, +-7, +-6, +-5, +10, +-9, +-2, +-21, +14, +21, +11, +4, +-14, +-5, +-16, +1, +-15, +-10, +5, +-1, +13, +-11, +-16, +-16, +-15, +13, +-2, +5, +-14, +4, +-8, +-3, +10, +5, +-3, +-16, +5, +16, +-20, +11, +16, +6, +-2, +6, +3, +21, +-15, +1, +-9, +-2, +12, +-3, +-19, +-9, +-16, +11, +4, +18, +9, +26, +-28, +-12, +-22, +-18, +4, +-7, +-2, +-5, +-16, +-19, +-14, +-3, +-5, +14, +17, +-4, +7, +4, +-9, +14, +3, +-11, +15, +10, +13, +-10, +-15, +18, +-13, +1, +2, +3, +6, +10, +1, +-18, +-9, +3, +-22, +-13, +-16, +-15, +3, +6, +1, +-12, +3, +-17, +-1, +-16, +4, +9, +8, +-18, +-15, +-18, +-8, +-13, +2, +15, +8, +3, +-16, +2, +-16, +-12, +-5, +-3, +-12, +19, +14, +20, +-12, +-11, +9, +-10, +-6, +-10, +14, +-17, +12, +-14, +16, +-6, +8, +-10, +-17, +4, +-6, +-1, +-18, +2, +4, +9, +-5, +-13, +-7, +-16, +-14, +-8, +-10, +-4, +-19, +-19, +20, +-4, +13, +19, +9, +-17, +-4, +11, +18, +-1, +-3, +-16, +-14, +-17, +-11, +-6, +14, +6, +-7, +5, +-7, +14, +6, +-3, +-19, +-17, +-15, +-12, +4, +5, +7, +5, +1, +-8, +3, +-11, +-13, +4, +-17, +15, +3, +-11, +-17, +-4, +-7, +-1, +-5, +-7, +3, +5, +15, +21, +4, +17, +2, +12, +-1, +-1, +5, +17, +-8, +-3, +-2, +7, +-13, +-19, +-2, +3, +-16, +11, +7, +-14, +19, +3, +11, +14, +-12, +2, +-14, +-18, +1, +-27, +13, +3, +8, +-14, +-40, +-1, +-10, +-4, +8, +-31, +-10, +-3, +20, +6, +-64, +7, +21, +52, +16, +32, +-7, +-3, +2, +-91, +24, +-94, +35, +-117, +18, +-19, +8, +-12, +19, +-12, +8, +-24, +-19, +14, +-24, +7, +-11, +-19, +-2, +-16, +-2, +-6, +10, +-12, +1, +5, +-20, +10, +-15, +-3, +7, +12, +8, +11, +13, +-11, +-11, +13, +20, +-18, +9, +-16, +18, +-10, +20, +-13, +15, +-18, +8, +14, +18, +4, +-6, +16, +-2, +9, +-2, +33, +4, +6, +19, +-11, +14, +-13, +4, +-2, +-4, +-21, +-10, +-82696 +] \ No newline at end of file diff --git a/2018/day1.spec.js b/2018/day1.spec.js index f9e01de..3c9a747 100644 --- a/2018/day1.spec.js +++ b/2018/day1.spec.js @@ -1,6 +1,7 @@ 'use strict' -const {calibrate} = require('./day1') +const {calibrate, repeatedFrequency} = require('./day1') +const input = require('./day1.json') function* listLooper (list) { var index = 0; @@ -40,1020 +41,11 @@ describe('device calibration', () => { ]))).toEqual(14) }) - it('should calculate the solution', () => { - expect(calibrate([ - +16, - -2, - -5, - +1, - -12, - -1, - -8, - +12, - +5, - -18, - -12, - -11, - -1, - +2, - -8, - -6, - -1, - -17, - -18, - +16, - -4, - +18, - +7, - -4, - +13, - +11, - -5, - +11, - -8, - +15, - +8, - -16, - +15, - +10, - -19, - -17, - +5, - -13, - +10, - +14, - +16, - +8, - +14, - -8, - +19, - -17, - +14, - +12, - +8, - +9, - -11, - +1, - +2, - -16, - +19, - +13, - -5, - +6, - -10, - -6, - +4, - -15, - +20, - +18, - -14, - +15, - +3, - +4, - -3, - -9, - +1, - +18, - +8, - +2, - -11, - +19, - -3, - -10, - +14, - +12, - +6, - -17, - -14, - -10, - -18, - +19, - +4, - +12, - -18, - -4, - -8, - -4, - -20, - -16, - -1, - -18, - +2, - -17, - -17, - +7, - -12, - -3, - +4, - +9, - +6, - +9, - +6, - +1, - -17, - +13, - +14, - -2, - +8, - +9, - -12, - +13, - -5, - -15, - +21, - +5, - +18, - -8, - -9, - +11, - +14, - +17, - +4, - -18, - +23, - +20, - -14, - +5, - -12, - +2, - +25, - +16, - -10, - -14, - +17, - -4, - -1, - -5, - +19, - +1, - +17, - +3, - -9, - +5, - +8, - -10, - +14, - +17, - -15, - +19, - +1, - -19, - +8, - +15, - -12, - +19, - -15, - +7, - +2, - -11, - -18, - +11, - +1, - +9, - +18, - +5, - +8, - -6, - -16, - -15, - -9, - +8, - -6, - -1, - -18, - -3, - -16, - +10, - -2, - -13, - +17, - +15, - -2, - -8, - -11, - -9, - -1, - +2, - +13, - +22, - -19, - +9, - +8, - -9, - -20, - +5, - -8, - -13, - -5, - +11, - +17, - +4, - +13, - +14, - +15, - +6, - +10, - -8, - +7, - +9, - +15, - +17, - +15, - +5, - +4, - +17, - -16, - -6, - +7, - +2, - +18, - +19, - -3, - -4, - -11, - +1, - -15, - +17, - -14, - +17, - +13, - -6, - -8, - +16, - +12, - +14, - -3, - -15, - -19, - -6, - -9, - -12, - -18, - +4, - -7, - +14, - -10, - -12, - +2, - +19, - +12, - -5, - +6, - +21, - -2, - -14, - +21, - -16, - +4, - +10, - +10, - +12, - +7, - +16, - -1, - +16, - +5, - +19, - +14, - +8, - +14, - -1, - -1, - -10, - -13, - -1, - -3, - +8, - +14, - -9, - +8, - +10, - -7, - +19, - -13, - +6, - +8, - +1, - +11, - -17, - +10, - +16, - +1, - -13, - +16, - +3, - +4, - -14, - +16, - +17, - -14, - +16, - +15, - +16, - +19, - -15, - +12, - +4, - -21, - +14, - -12, - -16, - -12, - -3, - +11, - -3, - +4, - -11, - +3, - +6, - +15, - -16, - -16, - -17, - -17, - +16, - -10, - +4, - +10, - -18, - +11, - -16, - -16, - -3, - -12, - +11, - -20, - +6, - -11, - -4, - -10, - -13, - -19, - +4, - -11, - -6, - +18, - -9, - +12, - +7, - +10, - -2, - -3, - +13, - -5, - -2, - -2, - -14, - +7, - -16, - -4, - -2, - -6, - +9, - +5, - -18, - -15, - +2, - +8, - -21, - +20, - -18, - -10, - +9, - +17, - -12, - -8, - -15, - +31, - -7, - -4, - -12, - -25, - -20, - -16, - -6, - +18, - +18, - -1, - +8, - +5, - -7, - -30, - -13, - -10, - -15, - -12, - -6, - +10, - +16, - -5, - -17, - -14, - +15, - +10, - +14, - -2, - +10, - +4, - +3, - -19, - +9, - +2, - -17, - +9, - -6, - +1, - +7, - +9, - +7, - -4, - +5, - +6, - +17, - -4, - -18, - +7, - -20, - -11, - -13, - -9, - -8, - +46, - -2, - +22, - +16, - -22, - -38, - -3, - +18, - +28, - +33, - +24, - +17, - +11, - -13, - -5, - +19, - -9, - +10, - +15, - +22, - +8, - +6, - -13, - -9, - -4, - -2, - +20, - -11, - -28, - +14, - +16, - +13, - +5, - +12, - +7, - +15, - +19, - -6, - +14, - +15, - -14, - +18, - +17, - +4, - -10, - +2, - -10, - -14, - +3, - -7, - +22, - -2, - +1, - +4, - -6, - -3, - +14, - +23, - -6, - -7, - -16, - -1, - +6, - +21, - +17, - +4, - -17, - +8, - -4, - +21, - -18, - -5, - +4, - +13, - +24, - +17, - +13, - +20, - +18, - +17, - +9, - +9, - +3, - +20, - +17, - -7, - +10, - +22, - -27, - +4, - -15, - +5, - -4, - -24, - +4, - -20, - -35, - +1, - -5, - +17, - -20, - +4, - +19, - +23, - -6, - +62, - +59, - -8, - -10, - +90, - +99, - -18, - -18, - +34, - -6, - +28, - -2, - +27, - -5, - +4, - +9, - +9, - -3, - +21, - +4, - -15, - +14, - -15, - +22, - -15, - -20, - +30, - +9, - -1, - +107, - -7, - -8, - -8, - +28, - +12, - -5, - -114, - +3, - +72, - -14, - -68, - -42, - +684, - +82290, - -12, - -19, - -3, - +6, - +4, - +3, - +16, - +6, - -15, - +18, - +3, - +13, - +10, - -4, - +10, - -17, - -7, - -18, - +2, - +18, - +13, - +13, - +6, - +8, - +18, - +11, - -13, - +8, - -7, - +11, - +4, - +5, - +7, - -2, - -16, - -19, - +14, - +19, - -6, - +11, - +8, - +12, - +7, - +11, - +5, - -18, - -4, - +1, - -7, - +17, - -8, - -8, - -5, - -10, - -16, - +3, - +15, - -17, - -9, - +14, - -9, - -12, - -4, - -15, - +7, - +3, - +17, - -3, - -19, - +3, - +6, - -2, - -17, - +18, - +4, - -8, - -8, - -12, - +10, - -18, - -20, - -5, - +15, - -13, - +20, - +4, - +9, - +1, - -7, - -6, - -5, - +10, - -9, - -2, - -21, - +14, - +21, - +11, - +4, - -14, - -5, - -16, - +1, - -15, - -10, - +5, - -1, - +13, - -11, - -16, - -16, - -15, - +13, - -2, - +5, - -14, - +4, - -8, - -3, - +10, - +5, - -3, - -16, - +5, - +16, - -20, - +11, - +16, - +6, - -2, - +6, - +3, - +21, - -15, - +1, - -9, - -2, - +12, - -3, - -19, - -9, - -16, - +11, - +4, - +18, - +9, - +26, - -28, - -12, - -22, - -18, - +4, - -7, - -2, - -5, - -16, - -19, - -14, - -3, - -5, - +14, - +17, - -4, - +7, - +4, - -9, - +14, - +3, - -11, - +15, - +10, - +13, - -10, - -15, - +18, - -13, - +1, - +2, - +3, - +6, - +10, - +1, - -18, - -9, - +3, - -22, - -13, - -16, - -15, - +3, - +6, - +1, - -12, - +3, - -17, - -1, - -16, - +4, - +9, - +8, - -18, - -15, - -18, - -8, - -13, - +2, - +15, - +8, - +3, - -16, - +2, - -16, - -12, - -5, - -3, - -12, - +19, - +14, - +20, - -12, - -11, - +9, - -10, - -6, - -10, - +14, - -17, - +12, - -14, - +16, - -6, - +8, - -10, - -17, - +4, - -6, - -1, - -18, - +2, - +4, - +9, - -5, - -13, - -7, - -16, - -14, - -8, - -10, - -4, - -19, - -19, - +20, - -4, - +13, - +19, - +9, - -17, - -4, - +11, - +18, - -1, - -3, - -16, - -14, - -17, - -11, - -6, - +14, - +6, - -7, - +5, - -7, - +14, - +6, - -3, - -19, - -17, - -15, - -12, - +4, - +5, - +7, - +5, - +1, - -8, - +3, - -11, - -13, - +4, - -17, - +15, - +3, - -11, - -17, - -4, - -7, - -1, - -5, - -7, - +3, - +5, - +15, - +21, - +4, - +17, - +2, - +12, - -1, - -1, - +5, - +17, - -8, - -3, - -2, - +7, - -13, - -19, - -2, - +3, - -16, - +11, - +7, - -14, - +19, - +3, - +11, - +14, - -12, - +2, - -14, - -18, - +1, - -27, - +13, - +3, - +8, - -14, - -40, - -1, - -10, - -4, - +8, - -31, - -10, - -3, - +20, - +6, - -64, - +7, - +21, - +52, - +16, - +32, - -7, - -3, - +2, - -91, - +24, - -94, - +35, - -117, - +18, - -19, - +8, - -12, - +19, - -12, - +8, - -24, - -19, - +14, - -24, - +7, - -11, - -19, - -2, - -16, - -2, - -6, - +10, - -12, - +1, - +5, - -20, - +10, - -15, - -3, - +7, - +12, - +8, - +11, - +13, - -11, - -11, - +13, - +20, - -18, - +9, - -16, - +18, - -10, - +20, - -13, - +15, - -18, - +8, - +14, - +18, - +4, - -6, - +16, - -2, - +9, - -2, - +33, - +4, - +6, - +19, - -11, - +14, - -13, - +4, - -2, - -4, - -21, - -10, - -82696 - ])).toEqual(585) + it('should calculate the first solution', () => { + expect(calibrate(input)).toEqual(585) + }) + + it('should calculate the seconf solution', () => { + expect(repeatedFrequency(listLooper(input))).toEqual(83173) }) -}) \ No newline at end of file +}) From 5f0607894bede6172ad5e08c11583fd49237d640 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:14:20 +0100 Subject: [PATCH 07/56] style: standard --- 2018/day1.js | 23 +- 2018/day1.spec.js | 87 ++--- 2018/package-lock.json | 801 ++++++++++++++++++++++++++++++++++++++++- 2018/package.json | 3 +- 4 files changed, 851 insertions(+), 63 deletions(-) diff --git a/2018/day1.js b/2018/day1.js index 764cbeb..d286f15 100644 --- a/2018/day1.js +++ b/2018/day1.js @@ -3,18 +3,17 @@ const calibrate = changes => changes.reduce((frequencies, frequency) => frequencies + frequency, 0) const repeatedFrequency = (frequencyGenerator, limit) => { - const seenFrequencies = {0: true} - const seenChanges = [] - do { - seenChanges.push(frequencyGenerator.next().value) - const frequency = calibrate(seenChanges) - if (seenFrequencies[frequency]) return frequency - seenFrequencies[frequency] = true - } while (true) + const seenFrequencies = { 0: true } + const seenChanges = [] + do { + seenChanges.push(frequencyGenerator.next().value) + const frequency = calibrate(seenChanges) + if (seenFrequencies[frequency]) return frequency + seenFrequencies[frequency] = true + } while (true) } - module.exports = { - calibrate, - repeatedFrequency -} \ No newline at end of file + calibrate, + repeatedFrequency +} diff --git a/2018/day1.spec.js b/2018/day1.spec.js index 3c9a747..cb6f5e4 100644 --- a/2018/day1.spec.js +++ b/2018/day1.spec.js @@ -1,51 +1,52 @@ 'use strict' -const {calibrate, repeatedFrequency} = require('./day1') +/* global describe, it, expect */ + +const { calibrate, repeatedFrequency } = require('./day1') const input = require('./day1.json') -function* listLooper (list) { - var index = 0; - while (true) - yield list[index++ % list.length]; +function * listLooper (list) { + var index = 0 + while (true) { yield list[index++ % list.length] } } describe('device calibration', () => { - it('should calculate the right frequency', () => { - expect(calibrate([ - 1, -2, 3, 1 - ])).toEqual(3) - expect(calibrate([1, 1, 1])).toEqual(3) - expect(calibrate([1, 1, -2])).toEqual(0) - expect(calibrate([-1, -2, -3])).toEqual(-6) - }) - - it('should find the frequency which it reaches twice', () => { - expect(repeatedFrequency(listLooper([ - 1, -2, 3, 1 - ]))).toEqual(2) - - expect(repeatedFrequency(listLooper([ - +1, -1 - ]))).toEqual(0) - - expect(repeatedFrequency(listLooper([ - +3, +3, +4, -2, -4 - ]))).toEqual(10) - - expect(repeatedFrequency(listLooper([ - -6, +3, +8, +5, -6 - ]))).toEqual(5) - - expect(repeatedFrequency(listLooper([ - +7, +7, -2, -7, -4 - ]))).toEqual(14) - }) - - it('should calculate the first solution', () => { - expect(calibrate(input)).toEqual(585) - }) - - it('should calculate the seconf solution', () => { - expect(repeatedFrequency(listLooper(input))).toEqual(83173) - }) + it('should calculate the right frequency', () => { + expect(calibrate([ + 1, -2, 3, 1 + ])).toEqual(3) + expect(calibrate([1, 1, 1])).toEqual(3) + expect(calibrate([1, 1, -2])).toEqual(0) + expect(calibrate([-1, -2, -3])).toEqual(-6) + }) + + it('should find the frequency which it reaches twice', () => { + expect(repeatedFrequency(listLooper([ + 1, -2, 3, 1 + ]))).toEqual(2) + + expect(repeatedFrequency(listLooper([ + +1, -1 + ]))).toEqual(0) + + expect(repeatedFrequency(listLooper([ + +3, +3, +4, -2, -4 + ]))).toEqual(10) + + expect(repeatedFrequency(listLooper([ + -6, +3, +8, +5, -6 + ]))).toEqual(5) + + expect(repeatedFrequency(listLooper([ + +7, +7, -2, -7, -4 + ]))).toEqual(14) + }) + + it('should calculate the first solution', () => { + expect(calibrate(input)).toEqual(585) + }) + + it('should calculate the seconf solution', () => { + expect(repeatedFrequency(listLooper(input))).toEqual(83173) + }) }) diff --git a/2018/package-lock.json b/2018/package-lock.json index 78419dc..436e2ef 100644 --- a/2018/package-lock.json +++ b/2018/package-lock.json @@ -55,6 +55,11 @@ } } }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==" + }, "acorn-walk": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", @@ -71,6 +76,11 @@ "uri-js": "^4.2.2" } }, + "ajv-keywords": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.2.0.tgz", + "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=" + }, "ansi-escapes": { "version": "3.1.0", "resolved": "http://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", @@ -387,6 +397,15 @@ "resolved": "http://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=" }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.7.0" + } + }, "array-unique": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", @@ -805,6 +824,21 @@ } } }, + "caller-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", + "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "requires": { + "callsites": "^0.2.0" + }, + "dependencies": { + "callsites": { + "version": "0.2.0", + "resolved": "http://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", + "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=" + } + } + }, "callsites": { "version": "2.0.0", "resolved": "http://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", @@ -838,11 +872,21 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" + }, "ci-info": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==" }, + "circular-json": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", + "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==" + }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -869,6 +913,19 @@ } } }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=" + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -935,6 +992,11 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=" + }, "convert-source-map": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", @@ -1019,6 +1081,11 @@ "ms": "2.0.0" } }, + "debug-log": { + "version": "1.0.1", + "resolved": "http://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", + "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=" + }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -1097,6 +1164,26 @@ } } }, + "deglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", + "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "requires": { + "find-root": "^1.0.0", + "glob": "^7.0.5", + "ignore": "^3.0.9", + "pkg-config": "^1.1.0", + "run-parallel": "^1.1.2", + "uniq": "^1.0.1" + }, + "dependencies": { + "ignore": { + "version": "3.3.10", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", + "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + } + } + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1120,6 +1207,14 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "^2.0.2" + } + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1197,11 +1292,338 @@ } } }, + "eslint": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", + "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "requires": { + "ajv": "^6.5.0", + "babel-code-frame": "^6.26.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^3.1.0", + "doctrine": "^2.1.0", + "eslint-scope": "^4.0.0", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^4.0.0", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^2.0.0", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.2", + "imurmurhash": "^0.1.4", + "inquirer": "^5.2.0", + "is-resolvable": "^1.1.0", + "js-yaml": "^3.11.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.5", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "pluralize": "^7.0.0", + "progress": "^2.0.0", + "regexpp": "^2.0.0", + "require-uncached": "^1.0.3", + "semver": "^5.5.0", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^4.0.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.9.0.tgz", + "integrity": "sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg==" + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "eslint-config-standard": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", + "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==" + }, + "eslint-config-standard-jsx": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", + "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==" + }, + "eslint-import-resolver-node": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", + "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", + "requires": { + "debug": "^2.6.9", + "resolve": "^1.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "requires": { + "path-parse": "^1.0.5" + } + } + } + }, + "eslint-module-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", + "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", + "requires": { + "debug": "^2.6.8", + "pkg-dir": "^1.0.0" + }, + "dependencies": { + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "pkg-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", + "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", + "requires": { + "find-up": "^1.0.0" + } + } + } + }, + "eslint-plugin-es": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", + "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "requires": { + "eslint-utils": "^1.3.0", + "regexpp": "^2.0.1" + } + }, + "eslint-plugin-import": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", + "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "requires": { + "contains-path": "^0.1.0", + "debug": "^2.6.8", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.1", + "eslint-module-utils": "^2.2.0", + "has": "^1.0.1", + "lodash": "^4.17.4", + "minimatch": "^3.0.3", + "read-pkg-up": "^2.0.0", + "resolve": "^1.6.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "http://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "requires": { + "path-parse": "^1.0.5" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "eslint-plugin-node": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", + "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", + "requires": { + "eslint-plugin-es": "^1.3.1", + "eslint-utils": "^1.3.1", + "ignore": "^4.0.2", + "minimatch": "^3.0.4", + "resolve": "^1.8.1", + "semver": "^5.5.0" + }, + "dependencies": { + "resolve": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", + "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", + "requires": { + "path-parse": "^1.0.5" + } + } + } + }, + "eslint-plugin-promise": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", + "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==" + }, + "eslint-plugin-react": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", + "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.0.1", + "prop-types": "^15.6.2" + } + }, + "eslint-plugin-standard": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", + "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==" + }, + "eslint-scope": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", + "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==" + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" + }, + "espree": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", + "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "requires": { + "acorn": "^6.0.2", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + }, + "dependencies": { + "acorn": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.0.4.tgz", + "integrity": "sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg==" + } + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "^4.1.0" + } + }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -1292,6 +1714,16 @@ } } }, + "external-editor": { + "version": "2.2.0", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "requires": { + "chardet": "^0.4.0", + "iconv-lite": "^0.4.17", + "tmp": "^0.0.33" + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -1328,6 +1760,23 @@ "bser": "^2.0.0" } }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", + "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "requires": { + "flat-cache": "^1.2.1", + "object-assign": "^4.0.1" + } + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -1354,6 +1803,11 @@ "repeat-string": "^1.5.2" } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -1362,6 +1816,17 @@ "locate-path": "^2.0.0" } }, + "flat-cache": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", + "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "requires": { + "circular-json": "^0.3.1", + "graceful-fs": "^4.1.2", + "rimraf": "~2.6.2", + "write": "^0.2.1" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1438,11 +1903,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1455,15 +1922,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1566,7 +2036,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1576,6 +2047,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1588,17 +2060,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -1615,6 +2090,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1687,7 +2163,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1697,6 +2174,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1802,6 +2280,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1870,11 +2349,21 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" + }, "get-stream": { "version": "3.0.0", "resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", @@ -2090,6 +2579,11 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + }, "import-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", @@ -2118,6 +2612,26 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "5.2.0", + "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "requires": { + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.0", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^2.1.0", + "figures": "^2.0.0", + "lodash": "^4.3.0", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^5.5.2", + "string-width": "^2.1.0", + "strip-ansi": "^4.0.0", + "through": "^2.3.6" + } + }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", @@ -2282,6 +2796,11 @@ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -2290,6 +2809,11 @@ "has": "^1.0.1" } }, + "is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -2876,6 +3400,11 @@ "resolved": "http://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", @@ -2886,6 +3415,11 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -2907,6 +3441,14 @@ "verror": "1.10.0" } }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "requires": { + "array-includes": "^3.0.3" + } + }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -3125,6 +3667,11 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, "nan": { "version": "2.11.1", "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", @@ -3171,6 +3718,11 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -3315,6 +3867,14 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "^1.0.0" + } + }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -3429,6 +3989,11 @@ "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -3472,6 +4037,57 @@ "pinkie": "^2.0.0" } }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + }, + "dependencies": { + "load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + } + } + }, + "pkg-config": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", + "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", + "requires": { + "debug-log": "^1.0.0", + "find-root": "^1.0.0", + "xtend": "^4.0.1" + } + }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", @@ -3480,6 +4096,11 @@ "find-up": "^2.1.0" } }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -3526,6 +4147,11 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==" + }, "prompts": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz", @@ -3535,6 +4161,15 @@ "sisteransi": "^0.1.1" } }, + "prop-types": { + "version": "15.6.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", + "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -3659,6 +4294,11 @@ "safe-regex": "^1.1.0" } }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==" + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -3753,6 +4393,22 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, + "require-uncached": { + "version": "1.0.3", + "resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", + "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", + "requires": { + "caller-path": "^0.1.0", + "resolve-from": "^1.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", + "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=" + } + } + }, "resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", @@ -3776,6 +4432,15 @@ "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -3794,6 +4459,27 @@ "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", "integrity": "sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==" }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "^2.1.0" + } + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==" + }, + "rxjs": { + "version": "5.5.12", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", + "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "requires": { + "symbol-observable": "1.0.1" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4152,6 +4838,14 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "requires": { + "is-fullwidth-code-point": "^2.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4341,6 +5035,40 @@ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz", "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==" }, + "standard": { + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", + "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", + "requires": { + "eslint": "~5.4.0", + "eslint-config-standard": "12.0.0", + "eslint-config-standard-jsx": "6.0.2", + "eslint-plugin-import": "~2.14.0", + "eslint-plugin-node": "~7.0.1", + "eslint-plugin-promise": "~4.0.0", + "eslint-plugin-react": "~7.11.1", + "eslint-plugin-standard": "~4.0.0", + "standard-engine": "~9.0.0" + } + }, + "standard-engine": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", + "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", + "requires": { + "deglob": "^2.1.0", + "get-stdin": "^6.0.0", + "minimist": "^1.1.0", + "pkg-conf": "^2.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + } + } + }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", @@ -4419,6 +5147,11 @@ "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -4427,11 +5160,29 @@ "has-flag": "^3.0.0" } }, + "symbol-observable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", + "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=" + }, "symbol-tree": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=" }, + "table": { + "version": "4.0.3", + "resolved": "http://registry.npmjs.org/table/-/table-4.0.3.tgz", + "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "requires": { + "ajv": "^6.0.1", + "ajv-keywords": "^3.0.0", + "chalk": "^2.1.0", + "lodash": "^4.17.4", + "slice-ansi": "1.0.0", + "string-width": "^2.1.1" + } + }, "test-exclude": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz", @@ -4444,11 +5195,29 @@ "require-main-filename": "^1.0.1" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + }, "throat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=" }, + "through": { + "version": "2.3.8", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", @@ -4590,6 +5359,11 @@ } } }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -4807,6 +5581,14 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", + "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "requires": { + "mkdirp": "^0.5.1" + } + }, "write-file-atomic": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", @@ -4830,6 +5612,11 @@ "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", diff --git a/2018/package.json b/2018/package.json index 9d82aea..49ad8df 100644 --- a/2018/package.json +++ b/2018/package.json @@ -23,6 +23,7 @@ }, "homepage": "https://github.com/coderbyheart/adventofcode2018#readme", "dependencies": { - "jest": "^23.6.0" + "jest": "^23.6.0", + "standard": "^12.0.1" } } From 2ab35bbf38fd043265ee574a17c18561ed9cbb6e Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:16:14 +0100 Subject: [PATCH 08/56] reorg --- 2018/.gitignore => .gitignore | 0 2018/day1.js => day1.js | 0 2018/day1.json => day1.json | 0 2018/day1.spec.js => day1.spec.js | 0 2018/package-lock.json => package-lock.json | 0 2018/package.json => package.json | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename 2018/.gitignore => .gitignore (100%) rename 2018/day1.js => day1.js (100%) rename 2018/day1.json => day1.json (100%) rename 2018/day1.spec.js => day1.spec.js (100%) rename 2018/package-lock.json => package-lock.json (100%) rename 2018/package.json => package.json (100%) diff --git a/2018/.gitignore b/.gitignore similarity index 100% rename from 2018/.gitignore rename to .gitignore diff --git a/2018/day1.js b/day1.js similarity index 100% rename from 2018/day1.js rename to day1.js diff --git a/2018/day1.json b/day1.json similarity index 100% rename from 2018/day1.json rename to day1.json diff --git a/2018/day1.spec.js b/day1.spec.js similarity index 100% rename from 2018/day1.spec.js rename to day1.spec.js diff --git a/2018/package-lock.json b/package-lock.json similarity index 100% rename from 2018/package-lock.json rename to package-lock.json diff --git a/2018/package.json b/package.json similarity index 100% rename from 2018/package.json rename to package.json From 85bc4a0926ad978fd4f0ef58e8e5e204f400b824 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:22:14 +0100 Subject: [PATCH 09/56] remove unused param --- day1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/day1.js b/day1.js index d286f15..91705a9 100644 --- a/day1.js +++ b/day1.js @@ -2,7 +2,7 @@ const calibrate = changes => changes.reduce((frequencies, frequency) => frequencies + frequency, 0) -const repeatedFrequency = (frequencyGenerator, limit) => { +const repeatedFrequency = frequencyGenerator => { const seenFrequencies = { 0: true } const seenChanges = [] do { From 3dbf9c1831d79e41544c219419abf49aa7dbc2ef Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:29:29 +0100 Subject: [PATCH 10/56] test: day2 --- day2.json | 252 +++++++++++++++++++++++++++++++++++++++++++++++++++ day2.spec.js | 20 ++++ 2 files changed, 272 insertions(+) create mode 100644 day2.json create mode 100644 day2.spec.js diff --git a/day2.json b/day2.json new file mode 100644 index 0000000..1b51265 --- /dev/null +++ b/day2.json @@ -0,0 +1,252 @@ +[ + "zihrtxagncfpbsnolxydujjmqv", + "zihrtxagwcfpbsoolnydukjyqv", + "aihrtxagwcfpbsnoleybmkjmqv", + "zihrtxagwcfpbsnolgyduajmrv", + "zihrtxgmwcfpbunoleydukjmqv", + "zihqtxagwcfpbsnolesdukomqv", + "zihgtxagwcfpbsnoleydqkjqqv", + "dihrtxagwcqpbsnoleydpkjmqv", + "qihrtvagwcfpbsnollydukjmqv", + "zihrtgagwcfpbknoleyrukjmqv", + "cinrtxagwcfpbsnoleydukjaqv", + "zihrtxagwcfubsneleyvukjmqv", + "zihrtxagwcfpbsvoleydukvmtv", + "zihrtpagwcffbsnolfydukjmqv", + "zihrtxagwcfpbsxoleydtkjyqv", + "zohrvxugwcfpbsnoleydukjmqv", + "zyhrtxagdcfpbsnodeydukjmqv", + "zihrtxaghffpbsnoleyduojmqv", + "oihrtbagwcfpbsnoleyduejmqv", + "zihrtnagwcvpjsnoleydukjmqv", + "iihrtxagwcfpbsnoliyaukjmqv", + "ziartxagwcfpbsnokeydukjmpv", + "eibrtxagwccpbsnoleydukjmqv", + "zihrtxagwczwbsaoleydukjmqv", + "ziiatuagwcfpbsnoleydukjmqv", + "zzhrtxagwckpbsnsleydukjmqv", + "cihrtxaqwcfpbsnoleydkkjmqv", + "zihrtxaywcfpbsnoleydukzdqv", + "zihrtxagwjfpbvnoleydukjmql", + "zihrtxagwcfpbsnoleuduksmql", + "zizrtxxgwcfpbsnoleydukzmqv", + "zihrteagwcfpbsnobeydukjmqe", + "zihrtxafwhfpbsgoleydukjmqv", + "zitrtxagwcfpbsnoleyduvymqv", + "zihrtxauwcfebsnoleygukjmqv", + "zihrtxagwcfpbsnoleydubjrqh", + "zihrtxauwmfpbsnoleydukjmqo", + "zihrtxagwcdpbsnoleydukxmov", + "zihrtmagwcfpbsnoleydukvmlv", + "ziwrtxhgwcfpbsnoleodukjmqv", + "zihytxagacfpbsnoceydukjmqv", + "zihrtxagwcfpbsnolebdugjnqv", + "zihrzxagwcfpbsnjleyduktmqv", + "zihrtxygwcfpbinoleysukjmqv", + "zihrtxagwcfpbmnoveydujjmqv", + "zidrtxagwcfpbsnolexaukjmqv", + "zshrtxagwcepbsnoxeydukjmqv", + "yibrtxagwzfpbsnoleydukjmqv", + "zehrtxagwclpbsnoleymukjmqv", + "zihruxagwcfpbsnoleyhukwmqv", + "zihrwxagwcfpbszolesdukjmqv", + "zihrtpagwcfpbwnoleyuukjmqv", + "ziortxagwcfpssnolewdukjmqv", + "zohrtxagwcfpbwnoleydukjmjv", + "zihrtxagwcfpbsnvleyduzcmqv", + "zihrvxaghcfpbswoleydukjmqv", + "zihrtxagwcfpssnolwydukzmqv", + "zjhrttagwcfpbsnolfydukjmqv", + "zihrtxagwjfpbsnoljydukpmqv", + "ziwrtxagwczpbsnoljydukjmqv", + "zinrtxagwcfpbvfoleydukjmqv", + "zihrgragwcfpbsnoleydutjmqv", + "zihrtxagwcfpbsnozeydukffqv", + "zihrtxagwcfpbsmoleydxkumqv", + "rihwtxagwcfpbsxoleydukjmqv", + "ziqrtxagwcfpbsnqlevdukjmqv", + "zihrtxagwchpbsnoleydufamqv", + "sihrtxagwcfpbsnoleldukjmqp", + "zihrtxagwcrpbsnoleydvojmqv", + "zihrtxacwcfpbsnoweyxukjmqv", + "zihrtxagwcfpbsnolajmukjmqv", + "zzfrtxagwcfpbsnoleydukjmvv", + "zixrtxagwcfpbqnoleydukjgqv", + "zihitxaqwcfpbsnoleadukjmqv", + "zilrtxagecfxbsnoleydukjmqv", + "zihrtxagwcfpbypoleycukjmqv", + "zidrtxagdtfpbsnoleydukjmqv", + "lehrtxagxcfpbsnoleydukjmqv", + "zihrlxagwcfpbsncneydukjmqv", + "zihroxagbcspbsnoleydukjmqv", + "zihrtxagwcfkzsnolemdukjmqv", + "zihrtxagwcfpbsqeleydukkmqv", + "zihrjxagwcfpesnolxydukjmqv", + "zifrtxagwcfpbsooleydukkmqv", + "zirwtxagwcfpbsnoleydukzmqv", + "zjhntxagwcfpbsnoleydunjmqv", + "ziorexagwcfpbsnoyeydukjmqv", + "zhhrtlagwcfybsnoleydukjmqv", + "zirrtxagwvfsbsnoleydukjmqv", + "bihrtxagwofpbsnoleadukjmqv", + "dihrtxagwcfpksnoleydukjlqv", + "zihrrxagecfpbsnoleydukjmyv", + "zijrtxagwmfpbsnoleyduljmqv", + "zihrtxagwcfpbsnolecdukjpqs", + "zchrtxagwcfpbsnolehdukjmwv", + "rmhrtxagwcfpbsnoleydkkjmqv", + "zohrotagwcfpbsnoleydukjmqv", + "zihwtxagsifpbsnwleydukjmqv", + "zihrtxagicfpbsnoleydukjxqn", + "zihrtxsgwcfpbsntleydumjmqv", + "zihrlxagzgfpbsnoleydukjmqv", + "aihjtxagwdfpbsnoleydukjmqv", + "zifrtxagwcfhbsnoleddukjmqv", + "zihrtyagwcfpbsooleydtkjmqv", + "zihrtxxgwcfpbsnolerhukjmqv", + "zihqtxalwcfppsnoleydukjmqv", + "zfkrvxagwcfpbsnoleydukjmqv", + "zihptxagwcfpbseoleydukjmdv", + "zihrtxagwcfpeonoleyiukjmqv", + "nidrtxagwcfpbsnoleyhukjmqv", + "zihrtxagwcfjbsnolsydukjmqg", + "zghryxagwcfgbsnoleydukjmqv", + "zihwtxagwcfpbsnoleydugjfqv", + "zihryxagwjfpbsnoleydujjmqv", + "zihrtxagwcfpbsnolekdukymql", + "zfhrtxaownfpbsnoleydukjmqv", + "zamrtxagwcfpbsnoleyduzjmqv", + "ibhrtxagwcfpbsnoleydukjmfv", + "zihrtxagwcfpssnoseydukjmuv", + "zihrtxagwcfpbsnoljydukjhqs", + "zihrtxagwqfmbsnoleidukjmqv", + "zfdrtxagwchpbsnoleydukjmqv", + "iihrtxagqcfpbsnoleydukjmqn", + "mihrtxagwcfpbsqoleydukjbqv", + "zihttxagwcfpbsnoleyduljmqk", + "zzhrtxagwcfpzseoleydukjmqv", + "zdhrtxagbcfpbsnoleyduyjmqv", + "zihxtxagwcfpbsnolwrdukjmqv", + "zghrtxagwcypbynoleydukjmqv", + "zihrtxaiwcfppsnoleydukgmqv", + "zitatxagwcfobsnoleydukjmqv", + "znhrtxagwcfpysnoleydukjqqv", + "zihrtxagwcfppsnoleoyukjmqv", + "ziorgxagwcfpbsnolekdukjmqv", + "zihrtxagwcfpbfnoleydwkjpqv", + "zihrtxnrwcfpbsnolnydukjmqv", + "rihrtxagwcfpbsnolepdjkjmqv", + "zihrtxagwcfzbsnoceydukjmkv", + "zihrtxagwcfpysnoaeidukjmqv", + "zihrmxagwcfpbsnoleydukjmuq", + "gihrtxagwcvpbsnoleydukcmqv", + "zihrtxagocfpbsnoleydukqmnv", + "zihrtxagwcfpesnoleyluklmqv", + "zghrtxagwcfzbsnoleydukjmgv", + "zihrtxugqqfpbsnoleydukjmqv", + "zirrtcagwcfpbsnoleydfkjmqv", + "zihitxagwcfpjsnoleydnkjmqv", + "zihrtxqgwcfpbsnsleydukjmqy", + "iihrtxagwyfpbsnoleydukjmqu", + "zihrsxagwcfpbsnsleydukzmqv", + "zihrtxawwcfpbsnoleydzkjmuv", + "dihrkxagwcfpbsfoleydukjmqv", + "zihrtxaqwcfpbvnoleydukjmqt", + "zihntxdgwcfpbsnogeydukjmqv", + "zihrtxagwcdpxsnolxydukjmqv", + "zihrtxagwcfpbsaoleydunjaqv", + "zihrtyagwcfpbsnoleyduqjmqt", + "zihrtxagwtfpbsnoleoyukjmqv", + "zihrjiagwcfpbsnobeydukjmqv", + "zihrtxqgwcfpbsnoleydykdmqv", + "zihrhxmgwcfpbsnmleydukjmqv", + "zihatxlgwcfpbsnoleydukpmqv", + "zihrtxcgwcspbsnoleypukjmqv", + "zihrtkagqcfpbsaoleydukjmqv", + "ziqrtxagwcfabsnoleydukrmqv", + "zihwtxagwifpbsnwleydukjmqv", + "zitrtnagwcfpbsnoleddukjmqv", + "wihrtxagwcfpbsioyeydukjmqv", + "zihrtxagwclpystoleydukjmqv", + "zihmtxagwcfpbsnolfydukjmlv", + "zihrtxagechpbsnoleydutjmqv", + "zihrtxagwcfebsnolnydukjmuv", + "zihrtxagncmpbsnoleydukjmqs", + "zihrvxagocfpbsnoleydukcmqv", + "zihrtxagwcjcbsnolejdukjmqv", + "wihrtxagwcfpbogoleydukjmqv", + "kivrtxagwcfpgsnoleydukjmqv", + "zihrtxagwafpbhnoleydukjcqv", + "zihrtwagtcfpbsnolxydukjmqv", + "vihrtxagwcfpbsneletdukjmqv", + "zihlnxagwcfpbsnoleydukjmqb", + "zihrtxagwcfpbsnoleydukjuuc", + "zihrtxagwcfpbwntleadukjmqv", + "fihrtxagwcfpbsnoleydvkjmqw", + "zihrtxaowcfpbunoleyduljmqv", + "zthrtxagwcfpbtnoleydukomqv", + "xihltxagwcfpbsnoleydukjrqv", + "ziyrnxagwcfpbsnoleydukjmhv", + "zihrtxazwcfpbsnileyduejmqv", + "zihrtxagwcfibsnoliydukjmsv", + "zihrtxggwcfpbsnoleydugjmqj", + "zrartxagwcffbsnoleydukjmqv", + "zidrtxaqwcfpbsnoleyduksmqv", + "zirrtxagwcypbsnoleydtkjmqv", + "rihrtxagwcrpbsnoheydukjmqv", + "zihrtxagwcfpbsnoleydpkjmzs", + "zihrtxagbcfpbsnodbydukjmqv", + "fihrtxaqwcfpbsnolaydukjmqv", + "vihrtxbgwcfpbsnolemdukjmqv", + "zihrtxapwcfubsnoleydukmmqv", + "zihrtxagwcfpbgnolfydunjmqv", + "zihrtxagwcypbsnokeyduvjmqv", + "zihntxagwcfpbsnoieydukbmqv", + "zihbtxagwkfpbsnolpydukjmqv", + "zihrtxagwcfibsnoleydikjmqb", + "jihrtxvgwcfpbsnoleydukjmqp", + "zihrtxagwcfpbjnqleydukjmlv", + "zibrtxagwcfpbzvoleydukjmqv", + "zihrtxagwafgbsnbleydukjmqv", + "zihjctagwcfpbsnoleydukjmqv", + "zahrtxagwcepbsnoleddukjmqv", + "zihetxagwcfpbsnoleydumjmsv", + "zihrtvagwcfpbbnoleydukdmqv", + "zbhrxxagwkfpbsnoleydukjmqv", + "jfhrtxagwcftbsnoleydukjmqv", + "yihrtxagwcfvbsnoleyduksmqv", + "ziartxaewcfpbsnoleyduhjmqv", + "zihrtxagwcfpbsnoozyduzjmqv", + "cihotxagwcfpysnoleydukjmqv", + "zihrtxagwcfpusnolwydxkjmqv", + "zihrtxagwcfpbsnoleedmgjmqv", + "zihrtxaghcfpmsnoleydukqmqv", + "ziortxagwcfpbsboleidukjmqv", + "zihrtxagwcfybsnoleyqxkjmqv", + "zihrtxamwcfpbsngleydukjmqx", + "zihrtxagwcfpbsnoleyduusmqu", + "zihftxagwcfpssnwleydukjmqv", + "zihrtxagwcfkbsnomeydukjmsv", + "zihrtxagwcvpbsnooeydwkjmqv", + "zihrtxagwcfpbsnoleycekumqv", + "jahrtxagwcfpbsnoleydukjmmv", + "zihrtxabwcfpbsnzheydukjmqv", + "zihrtxagwctpbsnoleydwkjmhv", + "zihrtpagwcfpbsnoleydzkjmqh", + "zihwtxagwcfpbsnollydukjrqv", + "zihrtxagwcfpusnoleydsvjmqv", + "zibrtxagwcfpasnoleydukjmbv", + "zchrtmagwcfpbsnoleydukjmwv", + "ziertxbgwyfpbsnoleydukjmqv", + "zitrtxagwcfpbhnoweydukjmqv", + "zisrtxkgwcfpbsnopeydukjmqv", + "zihrtxcgwdfpbynoleydukjmqv", + "iihrtxajwcvpbsnoleydukjmqv", + "zihuwxapwcfpbsnoleydukjmqv", + "zihrtxngwcfqbsnoleyiukjmqv", + "ziqrtxagjcfpbsnoleydukjmqi", + "zifrtxarwctpbsnoleydukjmqv", + "zihxgxagwcfpbpnoleydukjmqv", + "giprtxagwcdpbsnoleydukjmqv", + "zihrtxagwmfpbsnodeydukjbqv +] \ No newline at end of file diff --git a/day2.spec.js b/day2.spec.js new file mode 100644 index 0000000..d2d30fb --- /dev/null +++ b/day2.spec.js @@ -0,0 +1,20 @@ +'use strict' + +/* global describe, it, expect */ + +const { checksum } = require('./day2') +const input = require('./day2.json') + +describe('parcel checksum', () => { + it('should calculate the right checksum', () => { + expect(checksum([ + 'abcdef', + 'bababc', + 'abbcde', + 'abcccd', + 'aabcdd', + 'abcdee', + 'ababab' + ])).toEqual(12) + }) +}) From 233f23023fe222cd4a6f3b92b080a99f89e27693 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:46:32 +0100 Subject: [PATCH 11/56] day2: solution --- day2.js | 22 ++++++++++++++++++++++ day2.json | 2 +- day2.spec.js | 4 ++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 day2.js diff --git a/day2.js b/day2.js new file mode 100644 index 0000000..c4b4404 --- /dev/null +++ b/day2.js @@ -0,0 +1,22 @@ +'use strict' + +const matchRepeatingLetters = (numLetters, ids) => ids.reduce((count, id) => { + const match = id.split('').sort().join('').match(/([a-z])\1+/g) + if (match) { + for (let seq in match) { + if (match[seq].length === numLetters) return count + 1 + } + } + return count +}, 0) + +const checksum = ids => { + const idsWithTwoLetters = matchRepeatingLetters(2, ids) + const idsWithThreeLetters = matchRepeatingLetters(3, ids) + + return idsWithTwoLetters * idsWithThreeLetters +} + +module.exports = { + checksum +} diff --git a/day2.json b/day2.json index 1b51265..e7c28fb 100644 --- a/day2.json +++ b/day2.json @@ -248,5 +248,5 @@ "zifrtxarwctpbsnoleydukjmqv", "zihxgxagwcfpbpnoleydukjmqv", "giprtxagwcdpbsnoleydukjmqv", - "zihrtxagwmfpbsnodeydukjbqv + "zihrtxagwmfpbsnodeydukjbqv" ] \ No newline at end of file diff --git a/day2.spec.js b/day2.spec.js index d2d30fb..fd23cc6 100644 --- a/day2.spec.js +++ b/day2.spec.js @@ -17,4 +17,8 @@ describe('parcel checksum', () => { 'ababab' ])).toEqual(12) }) + + it('should calculate the right checksum', () => { + expect(checksum(input)).toEqual(8892) + }) }) From 4a96d295eb0bc2094f91543b486f2ebe0bc6ad96 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:50:08 +0100 Subject: [PATCH 12/56] feat: add test for task 2 --- day2.spec.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/day2.spec.js b/day2.spec.js index fd23cc6..b011746 100644 --- a/day2.spec.js +++ b/day2.spec.js @@ -2,7 +2,7 @@ /* global describe, it, expect */ -const { checksum } = require('./day2') +const { checksum, findMatch } = require('./day2') const input = require('./day2.json') describe('parcel checksum', () => { @@ -22,3 +22,17 @@ describe('parcel checksum', () => { expect(checksum(input)).toEqual(8892) }) }) + +describe('matching ids', () => { + it('should find the matching part of the ids', () => { + expect(findMatch([ + 'abcde', + 'fghij', + 'klmno', + 'pqrst', + 'fguij', + 'axcye', + 'wvxyz' + ])).toEqual('fgij') + }) +}) From 6225522ff4f9b6f526ad4e278e3189a64d54b6ee Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 00:59:35 +0100 Subject: [PATCH 13/56] solution: day2 --- day2.js | 31 ++++++++++++++++++++++++++++++- day2.spec.js | 4 ++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/day2.js b/day2.js index c4b4404..cdf43f3 100644 --- a/day2.js +++ b/day2.js @@ -17,6 +17,35 @@ const checksum = ids => { return idsWithTwoLetters * idsWithThreeLetters } +const compareIds = (id1, id2) => { + const id1l = id1.split('') + const id2l = id2.split('') + const matches = [...id1l] + let differences = 0 + for (let i = 0; i < id1l.length; i++) { + const c1 = id1l[i] + const c2 = id2l[i] + if (c1 !== c2) { + differences++ + delete matches[i] + } + } + if (differences === 1) return matches.join('') +} + +const findMatch = ids => { + for (let i = 0; i < ids.length; i++) { + for (let j = 0; j < ids.length; j++) { + if (i === j) continue + const id1 = ids[i] + const id2 = ids[j] + const match = compareIds(id1, id2) + if (match) return match + } + } +} + module.exports = { - checksum + checksum, + findMatch } diff --git a/day2.spec.js b/day2.spec.js index b011746..ae8099b 100644 --- a/day2.spec.js +++ b/day2.spec.js @@ -35,4 +35,8 @@ describe('matching ids', () => { 'wvxyz' ])).toEqual('fgij') }) + + it('should calculate the solution', () => { + expect(findMatch(input)).toEqual('zihwtxagifpbsnwleydukjmqv') + }) }) From ff7feba357d40bfd4dd42596c43bfbb25a54c85b Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 3 Dec 2018 22:55:59 +0100 Subject: [PATCH 14/56] test: add test for overlapping patches --- day3.js | 7 +++++++ day3.json | 1 + day3.spec.js | 16 ++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 day3.js create mode 100644 day3.json create mode 100644 day3.spec.js diff --git a/day3.js b/day3.js new file mode 100644 index 0000000..696c081 --- /dev/null +++ b/day3.js @@ -0,0 +1,7 @@ +'use strict' + +const overlappingPatches = () => undefined + +module.exports = { + overlappingPatches +} diff --git a/day3.json b/day3.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/day3.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/day3.spec.js b/day3.spec.js new file mode 100644 index 0000000..11a6324 --- /dev/null +++ b/day3.spec.js @@ -0,0 +1,16 @@ +'use strict' + +/* global describe, it, expect */ + +const { overlappingPatches } = require('./day3') +const input = require('./day3.json') + +describe('overlapping patches', () => { + it('should calculate the number of overlapping patches', () => { + expect(overlappingPatches([ + '#1 @ 1,3: 4x4', + '#2 @ 3,1: 4x4', + '#3 @ 5,5: 2x2' + ])).toEqual(4) + }) +}) From e8ccbd0eb43d6aceff7b5d058367b9f7a93d60dc Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 4 Dec 2018 00:49:43 +0100 Subject: [PATCH 15/56] feat: day 3, part 1 --- day3.js | 37 +- day3.json | 1312 +++++++++++++++++++++++++++++++++++++++++++++++++- day3.spec.js | 147 +++++- 3 files changed, 1492 insertions(+), 4 deletions(-) diff --git a/day3.js b/day3.js index 696c081..f17c709 100644 --- a/day3.js +++ b/day3.js @@ -1,7 +1,40 @@ 'use strict' -const overlappingPatches = () => undefined +const patch = (left, top, width, height, size = 10, fabric) => { + if (fabric === undefined) { + fabric = [] + for (let i = 0; i < size; i++) { + for (let j = 0; j < size; j++) { + fabric[j + (i * size)] = 0 + } + } + } + + for (let i = top; i < top + height; i++) { + for (let j = left; j < left + width; j++) { + fabric[j + (i * size)] += 1 + } + } + + return fabric +} + +const claimToPatch = (p, fabric, size) => { + const [, , left, top, width, height] = p.match(/^#([0-9]+) @ ([0-9]+),([0-9]+): ([0-9]+)x([0-9]+)/) + return patch(+left, +top, +width, +height, fabric ? Math.sqrt(fabric.length) : size, fabric) +} + +const overlappingPatches = (patches, size) => { + let fabric + patches.forEach(p => { + fabric = claimToPatch(p, fabric, size) + }) + + return fabric.filter(f => f > 1).length +} module.exports = { - overlappingPatches + overlappingPatches, + patch, + claimToPatch } diff --git a/day3.json b/day3.json index 0637a08..f51a4df 100644 --- a/day3.json +++ b/day3.json @@ -1 +1,1311 @@ -[] \ No newline at end of file +[ + "#1 @ 555,891: 18x12", + "#2 @ 941,233: 16x14", + "#3 @ 652,488: 16x25", + "#4 @ 116,740: 13x14", + "#5 @ 178,10: 5x3", + "#6 @ 864,158: 10x24", + "#7 @ 173,81: 20x15", + "#8 @ 493,771: 20x25", + "#9 @ 463,127: 15x28", + "#10 @ 333,574: 13x12", + "#11 @ 931,902: 13x27", + "#12 @ 184,436: 23x17", + "#13 @ 374,584: 10x10", + "#14 @ 690,863: 12x20", + "#15 @ 433,268: 28x23", + "#16 @ 710,325: 14x16", + "#17 @ 378,861: 17x10", + "#18 @ 925,936: 28x28", + "#19 @ 519,499: 12x25", + "#20 @ 291,420: 12x21", + "#21 @ 243,96: 14x11", + "#22 @ 258,505: 15x21", + "#23 @ 294,721: 11x27", + "#24 @ 393,832: 25x23", + "#25 @ 142,340: 26x28", + "#26 @ 266,531: 10x26", + "#27 @ 357,653: 12x23", + "#28 @ 17,548: 12x23", + "#29 @ 161,444: 17x27", + "#30 @ 146,951: 20x22", + "#31 @ 858,553: 29x16", + "#32 @ 325,189: 13x18", + "#33 @ 885,228: 20x26", + "#34 @ 394,440: 25x11", + "#35 @ 634,501: 24x24", + "#36 @ 853,794: 13x12", + "#37 @ 377,301: 23x10", + "#38 @ 542,131: 21x26", + "#39 @ 672,548: 20x29", + "#40 @ 731,618: 27x22", + "#41 @ 85,265: 28x11", + "#42 @ 591,619: 13x18", + "#43 @ 136,205: 21x19", + "#44 @ 180,783: 11x24", + "#45 @ 619,131: 19x26", + "#46 @ 506,154: 18x27", + "#47 @ 615,903: 22x29", + "#48 @ 401,837: 18x13", + "#49 @ 10,199: 23x29", + "#50 @ 880,922: 17x10", + "#51 @ 547,63: 26x26", + "#52 @ 970,218: 14x15", + "#53 @ 820,953: 22x24", + "#54 @ 248,379: 24x19", + "#55 @ 804,722: 23x18", + "#56 @ 274,153: 21x10", + "#57 @ 777,134: 27x28", + "#58 @ 196,451: 29x28", + "#59 @ 783,910: 10x28", + "#60 @ 365,386: 25x23", + "#61 @ 915,605: 17x11", + "#62 @ 686,93: 14x24", + "#63 @ 538,772: 12x22", + "#64 @ 451,837: 15x25", + "#65 @ 766,140: 20x17", + "#66 @ 968,138: 16x13", + "#67 @ 531,484: 19x25", + "#68 @ 513,868: 20x23", + "#69 @ 78,618: 27x25", + "#70 @ 541,134: 3x4", + "#71 @ 769,427: 17x18", + "#72 @ 172,687: 12x28", + "#73 @ 12,634: 18x10", + "#74 @ 168,926: 20x16", + "#75 @ 672,742: 25x10", + "#76 @ 82,711: 21x22", + "#77 @ 305,602: 10x24", + "#78 @ 92,253: 29x27", + "#79 @ 497,487: 19x10", + "#80 @ 330,898: 18x19", + "#81 @ 361,495: 10x22", + "#82 @ 653,931: 18x16", + "#83 @ 52,779: 19x21", + "#84 @ 498,677: 11x15", + "#85 @ 14,562: 20x19", + "#86 @ 355,858: 27x11", + "#87 @ 394,595: 29x20", + "#88 @ 677,541: 28x18", + "#89 @ 191,404: 7x3", + "#90 @ 16,196: 23x18", + "#91 @ 226,336: 19x21", + "#92 @ 481,22: 14x20", + "#93 @ 322,585: 23x28", + "#94 @ 473,198: 27x13", + "#95 @ 277,193: 28x19", + "#96 @ 69,280: 28x23", + "#97 @ 778,170: 26x26", + "#98 @ 668,817: 21x25", + "#99 @ 327,900: 16x23", + "#100 @ 502,648: 24x13", + "#101 @ 205,742: 29x21", + "#102 @ 688,264: 26x19", + "#103 @ 496,680: 22x27", + "#104 @ 679,456: 13x10", + "#105 @ 556,620: 12x29", + "#106 @ 42,505: 28x13", + "#107 @ 307,871: 27x14", + "#108 @ 7,530: 12x17", + "#109 @ 14,312: 24x16", + "#110 @ 189,124: 16x14", + "#111 @ 534,792: 24x14", + "#112 @ 556,773: 23x11", + "#113 @ 865,221: 29x20", + "#114 @ 638,775: 19x25", + "#115 @ 946,932: 28x23", + "#116 @ 486,710: 10x21", + "#117 @ 767,476: 26x21", + "#118 @ 692,429: 18x12", + "#119 @ 517,41: 20x23", + "#120 @ 265,653: 25x14", + "#121 @ 446,488: 10x17", + "#122 @ 686,679: 17x12", + "#123 @ 147,850: 22x15", + "#124 @ 408,411: 18x10", + "#125 @ 657,838: 13x12", + "#126 @ 627,776: 16x17", + "#127 @ 135,266: 13x15", + "#128 @ 164,718: 13x10", + "#129 @ 358,529: 26x19", + "#130 @ 894,869: 29x11", + "#131 @ 821,823: 12x16", + "#132 @ 781,619: 6x4", + "#133 @ 949,91: 12x10", + "#134 @ 953,433: 26x19", + "#135 @ 884,795: 28x17", + "#136 @ 858,240: 14x27", + "#137 @ 335,459: 22x20", + "#138 @ 180,572: 14x21", + "#139 @ 644,911: 19x12", + "#140 @ 433,495: 19x29", + "#141 @ 32,223: 14x22", + "#142 @ 664,95: 25x23", + "#143 @ 384,107: 29x16", + "#144 @ 105,581: 19x19", + "#145 @ 27,178: 15x23", + "#146 @ 768,848: 20x26", + "#147 @ 660,193: 13x16", + "#148 @ 7,64: 24x19", + "#149 @ 593,106: 19x26", + "#150 @ 662,368: 26x10", + "#151 @ 317,415: 10x16", + "#152 @ 88,768: 28x16", + "#153 @ 263,429: 10x15", + "#154 @ 287,531: 17x21", + "#155 @ 68,119: 22x11", + "#156 @ 733,484: 28x19", + "#157 @ 924,65: 25x22", + "#158 @ 865,714: 10x26", + "#159 @ 230,927: 24x28", + "#160 @ 534,465: 12x20", + "#161 @ 457,131: 21x26", + "#162 @ 704,190: 11x20", + "#163 @ 531,878: 24x18", + "#164 @ 328,36: 22x24", + "#165 @ 976,135: 19x10", + "#166 @ 961,587: 20x16", + "#167 @ 310,528: 19x16", + "#168 @ 834,852: 28x15", + "#169 @ 708,647: 14x22", + "#170 @ 259,312: 15x28", + "#171 @ 165,253: 19x28", + "#172 @ 587,467: 16x18", + "#173 @ 157,710: 19x20", + "#174 @ 698,411: 22x13", + "#175 @ 287,541: 22x27", + "#176 @ 868,317: 28x15", + "#177 @ 774,143: 28x11", + "#178 @ 140,557: 13x13", + "#179 @ 181,633: 13x11", + "#180 @ 295,826: 29x16", + "#181 @ 10,610: 25x29", + "#182 @ 148,150: 10x22", + "#183 @ 231,927: 16x20", + "#184 @ 886,130: 27x16", + "#185 @ 879,263: 12x13", + "#186 @ 374,462: 18x12", + "#187 @ 805,923: 18x25", + "#188 @ 743,914: 29x29", + "#189 @ 604,791: 17x16", + "#190 @ 776,854: 25x24", + "#191 @ 67,603: 16x26", + "#192 @ 540,328: 18x28", + "#193 @ 96,583: 26x21", + "#194 @ 972,222: 11x11", + "#195 @ 957,356: 18x10", + "#196 @ 945,656: 27x11", + "#197 @ 565,368: 17x18", + "#198 @ 195,219: 28x19", + "#199 @ 789,730: 23x28", + "#200 @ 630,46: 13x15", + "#201 @ 824,417: 26x10", + "#202 @ 559,775: 14x5", + "#203 @ 435,750: 13x15", + "#204 @ 661,203: 11x24", + "#205 @ 181,625: 7x14", + "#206 @ 358,576: 19x22", + "#207 @ 476,651: 27x21", + "#208 @ 66,517: 15x19", + "#209 @ 633,213: 23x13", + "#210 @ 430,208: 18x27", + "#211 @ 102,491: 14x15", + "#212 @ 623,147: 21x10", + "#213 @ 600,397: 14x27", + "#214 @ 231,960: 26x24", + "#215 @ 273,537: 18x19", + "#216 @ 502,240: 22x28", + "#217 @ 797,498: 5x22", + "#218 @ 933,854: 29x14", + "#219 @ 708,268: 28x10", + "#220 @ 817,812: 17x20", + "#221 @ 606,49: 13x10", + "#222 @ 6,344: 13x15", + "#223 @ 737,701: 25x29", + "#224 @ 842,34: 10x12", + "#225 @ 750,729: 28x11", + "#226 @ 438,842: 22x26", + "#227 @ 394,925: 26x29", + "#228 @ 886,235: 26x19", + "#229 @ 712,18: 11x11", + "#230 @ 598,42: 29x26", + "#231 @ 754,869: 29x11", + "#232 @ 486,504: 13x20", + "#233 @ 11,191: 10x13", + "#234 @ 223,194: 27x17", + "#235 @ 157,238: 20x29", + "#236 @ 915,41: 18x24", + "#237 @ 52,592: 11x14", + "#238 @ 673,628: 11x20", + "#239 @ 449,114: 21x23", + "#240 @ 234,910: 21x15", + "#241 @ 253,890: 10x14", + "#242 @ 788,449: 25x21", + "#243 @ 168,161: 12x14", + "#244 @ 187,798: 18x15", + "#245 @ 947,143: 18x22", + "#246 @ 38,930: 14x14", + "#247 @ 801,712: 28x25", + "#248 @ 860,604: 25x29", + "#249 @ 68,386: 29x27", + "#250 @ 371,506: 21x12", + "#251 @ 822,968: 16x3", + "#252 @ 884,721: 27x21", + "#253 @ 789,675: 11x24", + "#254 @ 144,219: 24x26", + "#255 @ 9,95: 20x11", + "#256 @ 626,974: 10x13", + "#257 @ 737,619: 12x26", + "#258 @ 492,223: 29x24", + "#259 @ 175,630: 19x13", + "#260 @ 84,626: 29x10", + "#261 @ 691,691: 17x19", + "#262 @ 120,910: 11x16", + "#263 @ 301,168: 23x10", + "#264 @ 353,610: 25x12", + "#265 @ 769,657: 12x28", + "#266 @ 37,17: 20x24", + "#267 @ 76,322: 25x22", + "#268 @ 638,487: 21x21", + "#269 @ 516,145: 22x14", + "#270 @ 109,511: 22x26", + "#271 @ 559,456: 11x14", + "#272 @ 43,666: 10x27", + "#273 @ 621,740: 22x16", + "#274 @ 875,216: 29x14", + "#275 @ 414,271: 13x23", + "#276 @ 42,189: 10x19", + "#277 @ 517,764: 21x20", + "#278 @ 151,269: 28x25", + "#279 @ 504,261: 17x3", + "#280 @ 255,355: 11x20", + "#281 @ 122,257: 21x15", + "#282 @ 843,311: 18x22", + "#283 @ 955,82: 10x15", + "#284 @ 750,250: 12x23", + "#285 @ 969,354: 29x19", + "#286 @ 969,820: 23x17", + "#287 @ 474,955: 12x11", + "#288 @ 633,494: 16x21", + "#289 @ 841,382: 16x18", + "#290 @ 125,133: 29x23", + "#291 @ 218,232: 15x15", + "#292 @ 40,43: 28x13", + "#293 @ 232,921: 29x23", + "#294 @ 460,307: 11x12", + "#295 @ 147,212: 10x13", + "#296 @ 952,562: 3x4", + "#297 @ 192,943: 15x22", + "#298 @ 481,498: 27x18", + "#299 @ 789,86: 19x21", + "#300 @ 610,844: 21x12", + "#301 @ 520,532: 26x29", + "#302 @ 407,181: 18x18", + "#303 @ 13,66: 8x8", + "#304 @ 341,547: 27x27", + "#305 @ 351,688: 14x16", + "#306 @ 201,442: 23x28", + "#307 @ 342,904: 17x14", + "#308 @ 509,322: 13x22", + "#309 @ 63,247: 24x13", + "#310 @ 272,424: 10x15", + "#311 @ 747,433: 25x26", + "#312 @ 257,405: 20x20", + "#313 @ 237,973: 25x14", + "#314 @ 553,465: 27x18", + "#315 @ 172,640: 21x16", + "#316 @ 690,939: 20x22", + "#317 @ 264,379: 25x25", + "#318 @ 38,472: 23x18", + "#319 @ 928,590: 18x28", + "#320 @ 13,86: 18x12", + "#321 @ 259,21: 15x26", + "#322 @ 37,134: 28x27", + "#323 @ 338,103: 29x28", + "#324 @ 439,220: 26x11", + "#325 @ 202,640: 11x16", + "#326 @ 134,734: 23x21", + "#327 @ 249,964: 21x10", + "#328 @ 451,446: 28x21", + "#329 @ 246,643: 29x26", + "#330 @ 756,212: 21x27", + "#331 @ 361,687: 26x19", + "#332 @ 579,241: 18x14", + "#333 @ 410,112: 10x15", + "#334 @ 553,941: 23x15", + "#335 @ 698,609: 11x3", + "#336 @ 341,509: 27x14", + "#337 @ 643,329: 17x17", + "#338 @ 680,460: 17x13", + "#339 @ 693,91: 18x14", + "#340 @ 306,323: 23x20", + "#341 @ 207,634: 16x12", + "#342 @ 323,139: 29x11", + "#343 @ 501,836: 14x29", + "#344 @ 633,907: 20x11", + "#345 @ 454,312: 10x15", + "#346 @ 583,673: 25x29", + "#347 @ 518,925: 26x29", + "#348 @ 590,107: 19x12", + "#349 @ 235,286: 25x21", + "#350 @ 344,113: 29x12", + "#351 @ 901,800: 29x28", + "#352 @ 754,852: 26x27", + "#353 @ 668,639: 12x25", + "#354 @ 861,179: 10x26", + "#355 @ 720,789: 26x27", + "#356 @ 52,769: 22x15", + "#357 @ 68,783: 25x28", + "#358 @ 768,229: 11x25", + "#359 @ 551,486: 26x24", + "#360 @ 155,62: 10x26", + "#361 @ 93,661: 14x16", + "#362 @ 322,326: 17x26", + "#363 @ 53,459: 19x25", + "#364 @ 502,694: 18x27", + "#365 @ 787,727: 25x19", + "#366 @ 348,462: 20x21", + "#367 @ 783,191: 11x10", + "#368 @ 944,595: 29x27", + "#369 @ 708,286: 27x17", + "#370 @ 717,933: 26x24", + "#371 @ 829,378: 21x17", + "#372 @ 973,814: 26x25", + "#373 @ 741,844: 15x21", + "#374 @ 418,442: 19x21", + "#375 @ 33,193: 25x20", + "#376 @ 964,353: 24x15", + "#377 @ 818,696: 13x14", + "#378 @ 571,663: 16x14", + "#379 @ 584,628: 21x18", + "#380 @ 134,425: 10x10", + "#381 @ 833,952: 11x25", + "#382 @ 446,261: 19x27", + "#383 @ 657,704: 15x14", + "#384 @ 228,276: 17x24", + "#385 @ 498,857: 12x13", + "#386 @ 20,8: 12x27", + "#387 @ 297,377: 20x11", + "#388 @ 889,426: 14x17", + "#389 @ 868,738: 24x27", + "#390 @ 30,951: 14x12", + "#391 @ 625,104: 22x21", + "#392 @ 773,708: 20x13", + "#393 @ 388,454: 14x17", + "#394 @ 219,951: 27x29", + "#395 @ 795,754: 13x26", + "#396 @ 400,265: 28x21", + "#397 @ 324,597: 10x18", + "#398 @ 114,496: 17x25", + "#399 @ 584,255: 28x19", + "#400 @ 629,722: 14x16", + "#401 @ 669,206: 18x10", + "#402 @ 792,242: 20x21", + "#403 @ 173,927: 24x11", + "#404 @ 706,306: 18x22", + "#405 @ 12,97: 15x24", + "#406 @ 193,353: 18x23", + "#407 @ 554,331: 23x15", + "#408 @ 9,555: 27x21", + "#409 @ 812,852: 25x20", + "#410 @ 177,620: 16x25", + "#411 @ 167,288: 16x10", + "#412 @ 782,741: 26x16", + "#413 @ 620,779: 25x29", + "#414 @ 272,764: 27x20", + "#415 @ 688,557: 11x18", + "#416 @ 83,269: 21x10", + "#417 @ 319,557: 21x12", + "#418 @ 895,133: 11x11", + "#419 @ 75,383: 17x23", + "#420 @ 82,19: 28x26", + "#421 @ 263,264: 3x16", + "#422 @ 66,214: 10x19", + "#423 @ 223,142: 10x27", + "#424 @ 150,611: 26x15", + "#425 @ 36,115: 29x20", + "#426 @ 490,543: 15x29", + "#427 @ 196,896: 12x24", + "#428 @ 675,740: 19x16", + "#429 @ 893,219: 11x28", + "#430 @ 157,923: 14x21", + "#431 @ 297,590: 18x14", + "#432 @ 102,742: 21x29", + "#433 @ 908,858: 3x14", + "#434 @ 567,655: 29x22", + "#435 @ 649,111: 18x12", + "#436 @ 26,943: 11x13", + "#437 @ 492,228: 22x18", + "#438 @ 846,753: 24x28", + "#439 @ 755,911: 10x16", + "#440 @ 526,883: 10x16", + "#441 @ 914,48: 20x20", + "#442 @ 849,402: 22x22", + "#443 @ 441,234: 19x14", + "#444 @ 521,419: 13x23", + "#445 @ 595,53: 28x20", + "#446 @ 635,912: 18x28", + "#447 @ 501,71: 26x20", + "#448 @ 897,30: 16x20", + "#449 @ 802,59: 25x25", + "#450 @ 768,98: 26x15", + "#451 @ 927,94: 12x19", + "#452 @ 119,558: 27x29", + "#453 @ 722,503: 12x28", + "#454 @ 982,805: 16x20", + "#455 @ 779,613: 11x26", + "#456 @ 945,834: 24x16", + "#457 @ 935,927: 25x26", + "#458 @ 234,229: 14x22", + "#459 @ 609,126: 11x28", + "#460 @ 937,568: 11x25", + "#461 @ 947,846: 10x18", + "#462 @ 458,642: 13x15", + "#463 @ 513,108: 23x28", + "#464 @ 914,264: 27x27", + "#465 @ 349,99: 15x26", + "#466 @ 793,682: 24x14", + "#467 @ 290,217: 28x24", + "#468 @ 692,738: 26x17", + "#469 @ 808,438: 13x23", + "#470 @ 732,496: 16x13", + "#471 @ 805,698: 16x27", + "#472 @ 71,280: 23x13", + "#473 @ 68,222: 20x26", + "#474 @ 395,363: 26x28", + "#475 @ 727,915: 14x26", + "#476 @ 550,982: 15x10", + "#477 @ 126,422: 21x15", + "#478 @ 295,92: 18x13", + "#479 @ 320,166: 18x20", + "#480 @ 179,162: 11x20", + "#481 @ 237,966: 14x10", + "#482 @ 336,581: 28x25", + "#483 @ 572,553: 26x27", + "#484 @ 359,380: 14x17", + "#485 @ 47,660: 11x11", + "#486 @ 393,115: 15x13", + "#487 @ 924,289: 24x26", + "#488 @ 300,819: 14x24", + "#489 @ 410,235: 15x23", + "#490 @ 576,622: 12x10", + "#491 @ 335,486: 28x26", + "#492 @ 662,99: 27x24", + "#493 @ 584,702: 22x22", + "#494 @ 253,289: 10x17", + "#495 @ 197,324: 13x10", + "#496 @ 869,407: 18x23", + "#497 @ 300,188: 24x12", + "#498 @ 36,36: 10x13", + "#499 @ 852,415: 24x13", + "#500 @ 101,13: 20x15", + "#501 @ 123,511: 26x24", + "#502 @ 197,154: 25x22", + "#503 @ 22,263: 28x11", + "#504 @ 220,173: 13x25", + "#505 @ 41,392: 18x22", + "#506 @ 543,685: 12x19", + "#507 @ 406,201: 10x19", + "#508 @ 790,674: 19x29", + "#509 @ 312,452: 28x28", + "#510 @ 280,437: 26x11", + "#511 @ 812,949: 13x29", + "#512 @ 816,946: 20x29", + "#513 @ 400,824: 22x14", + "#514 @ 158,602: 10x28", + "#515 @ 372,914: 16x14", + "#516 @ 376,597: 25x13", + "#517 @ 877,651: 17x22", + "#518 @ 111,493: 18x23", + "#519 @ 913,37: 23x13", + "#520 @ 264,809: 25x15", + "#521 @ 406,266: 27x28", + "#522 @ 431,729: 11x22", + "#523 @ 17,343: 15x12", + "#524 @ 906,340: 19x22", + "#525 @ 45,744: 26x19", + "#526 @ 726,496: 20x28", + "#527 @ 821,578: 20x10", + "#528 @ 240,944: 23x24", + "#529 @ 412,202: 17x26", + "#530 @ 646,211: 16x20", + "#531 @ 246,498: 28x24", + "#532 @ 270,398: 13x27", + "#533 @ 131,471: 28x19", + "#534 @ 498,559: 25x22", + "#535 @ 865,31: 14x22", + "#536 @ 644,714: 19x10", + "#537 @ 466,744: 19x22", + "#538 @ 366,566: 10x13", + "#539 @ 189,402: 19x12", + "#540 @ 596,526: 26x21", + "#541 @ 223,795: 23x21", + "#542 @ 69,637: 26x28", + "#543 @ 450,675: 5x5", + "#544 @ 847,395: 14x11", + "#545 @ 266,401: 17x25", + "#546 @ 161,329: 26x12", + "#547 @ 600,144: 29x20", + "#548 @ 558,76: 28x18", + "#549 @ 304,224: 22x19", + "#550 @ 383,295: 18x13", + "#551 @ 331,915: 19x10", + "#552 @ 972,342: 14x18", + "#553 @ 398,245: 26x13", + "#554 @ 604,392: 13x29", + "#555 @ 365,642: 20x17", + "#556 @ 963,525: 13x13", + "#557 @ 250,262: 22x29", + "#558 @ 355,459: 24x18", + "#559 @ 503,647: 11x28", + "#560 @ 482,723: 15x16", + "#561 @ 374,445: 18x13", + "#562 @ 661,618: 24x15", + "#563 @ 219,464: 24x25", + "#564 @ 483,88: 21x28", + "#565 @ 714,173: 10x22", + "#566 @ 537,636: 20x10", + "#567 @ 32,529: 13x15", + "#568 @ 735,749: 26x23", + "#569 @ 511,241: 24x28", + "#570 @ 150,14: 23x22", + "#571 @ 829,680: 20x19", + "#572 @ 222,68: 10x11", + "#573 @ 753,809: 20x25", + "#574 @ 22,822: 23x19", + "#575 @ 534,461: 26x28", + "#576 @ 866,641: 14x18", + "#577 @ 356,218: 17x16", + "#578 @ 143,420: 20x12", + "#579 @ 450,414: 13x20", + "#580 @ 538,604: 29x13", + "#581 @ 736,715: 18x29", + "#582 @ 173,683: 14x10", + "#583 @ 313,887: 19x18", + "#584 @ 905,340: 25x24", + "#585 @ 14,531: 26x22", + "#586 @ 328,889: 22x21", + "#587 @ 282,247: 15x24", + "#588 @ 85,272: 12x27", + "#589 @ 103,413: 26x28", + "#590 @ 801,685: 10x19", + "#591 @ 47,583: 27x10", + "#592 @ 250,597: 19x21", + "#593 @ 259,885: 29x20", + "#594 @ 816,180: 21x10", + "#595 @ 263,314: 16x15", + "#596 @ 636,730: 24x21", + "#597 @ 556,613: 12x20", + "#598 @ 286,401: 14x11", + "#599 @ 431,73: 15x23", + "#600 @ 896,856: 16x16", + "#601 @ 631,907: 13x26", + "#602 @ 981,906: 16x23", + "#603 @ 606,684: 14x20", + "#604 @ 230,214: 28x10", + "#605 @ 157,689: 16x14", + "#606 @ 38,191: 15x16", + "#607 @ 286,768: 13x17", + "#608 @ 161,972: 26x15", + "#609 @ 272,817: 18x15", + "#610 @ 613,974: 19x13", + "#611 @ 980,898: 16x19", + "#612 @ 359,457: 18x11", + "#613 @ 414,909: 15x22", + "#614 @ 586,412: 12x28", + "#615 @ 961,210: 10x29", + "#616 @ 55,499: 26x14", + "#617 @ 770,43: 28x26", + "#618 @ 819,21: 20x19", + "#619 @ 948,585: 16x17", + "#620 @ 522,808: 10x26", + "#621 @ 457,175: 25x23", + "#622 @ 323,836: 14x19", + "#623 @ 22,620: 27x15", + "#624 @ 195,345: 15x20", + "#625 @ 115,588: 21x11", + "#626 @ 588,48: 15x29", + "#627 @ 33,935: 10x24", + "#628 @ 606,430: 17x20", + "#629 @ 480,193: 18x23", + "#630 @ 897,338: 16x20", + "#631 @ 540,926: 29x29", + "#632 @ 957,384: 22x15", + "#633 @ 304,729: 25x10", + "#634 @ 534,944: 11x23", + "#635 @ 836,447: 26x16", + "#636 @ 572,896: 27x28", + "#637 @ 386,101: 17x22", + "#638 @ 635,806: 10x18", + "#639 @ 215,281: 29x23", + "#640 @ 184,632: 13x15", + "#641 @ 242,638: 20x10", + "#642 @ 337,466: 19x10", + "#643 @ 260,700: 19x16", + "#644 @ 8,834: 15x22", + "#645 @ 359,538: 18x20", + "#646 @ 596,27: 24x28", + "#647 @ 279,157: 15x16", + "#648 @ 671,98: 12x9", + "#649 @ 741,871: 20x25", + "#650 @ 141,852: 21x12", + "#651 @ 689,298: 26x20", + "#652 @ 843,276: 13x23", + "#653 @ 228,814: 19x29", + "#654 @ 672,749: 22x29", + "#655 @ 862,912: 17x20", + "#656 @ 942,317: 26x15", + "#657 @ 304,367: 27x24", + "#658 @ 328,210: 12x27", + "#659 @ 565,243: 10x11", + "#660 @ 429,940: 17x14", + "#661 @ 153,679: 17x29", + "#662 @ 835,437: 20x16", + "#663 @ 529,774: 12x22", + "#664 @ 848,303: 21x21", + "#665 @ 503,55: 17x21", + "#666 @ 239,416: 21x16", + "#667 @ 444,361: 26x28", + "#668 @ 838,261: 11x25", + "#669 @ 687,873: 13x21", + "#670 @ 237,352: 26x11", + "#671 @ 417,134: 21x13", + "#672 @ 938,76: 25x10", + "#673 @ 182,482: 28x15", + "#674 @ 492,214: 25x24", + "#675 @ 410,678: 28x25", + "#676 @ 233,632: 26x22", + "#677 @ 658,768: 22x24", + "#678 @ 501,322: 28x11", + "#679 @ 236,324: 17x16", + "#680 @ 94,627: 14x22", + "#681 @ 363,281: 18x19", + "#682 @ 222,418: 29x23", + "#683 @ 960,306: 17x23", + "#684 @ 356,569: 24x19", + "#685 @ 593,915: 25x29", + "#686 @ 494,438: 20x23", + "#687 @ 918,936: 18x12", + "#688 @ 626,135: 4x18", + "#689 @ 782,67: 23x19", + "#690 @ 675,944: 25x23", + "#691 @ 68,478: 11x16", + "#692 @ 14,606: 15x23", + "#693 @ 546,392: 22x22", + "#694 @ 789,871: 25x27", + "#695 @ 743,690: 21x15", + "#696 @ 959,220: 21x15", + "#697 @ 355,757: 11x15", + "#698 @ 510,319: 13x10", + "#699 @ 476,178: 28x23", + "#700 @ 421,763: 15x13", + "#701 @ 344,614: 16x17", + "#702 @ 524,432: 29x29", + "#703 @ 320,506: 19x27", + "#704 @ 824,404: 10x21", + "#705 @ 862,413: 28x27", + "#706 @ 652,101: 14x18", + "#707 @ 453,90: 19x25", + "#708 @ 954,383: 26x15", + "#709 @ 335,359: 21x17", + "#710 @ 476,108: 24x22", + "#711 @ 86,817: 14x13", + "#712 @ 953,850: 21x14", + "#713 @ 900,341: 23x26", + "#714 @ 885,128: 27x21", + "#715 @ 416,257: 23x10", + "#716 @ 539,705: 21x20", + "#717 @ 76,249: 14x21", + "#718 @ 357,492: 12x15", + "#719 @ 404,367: 10x17", + "#720 @ 293,243: 21x10", + "#721 @ 878,778: 20x28", + "#722 @ 550,248: 21x21", + "#723 @ 779,709: 20x19", + "#724 @ 391,96: 10x7", + "#725 @ 840,259: 21x24", + "#726 @ 305,209: 19x29", + "#727 @ 936,510: 28x22", + "#728 @ 212,155: 12x23", + "#729 @ 595,708: 29x18", + "#730 @ 368,660: 24x21", + "#731 @ 99,689: 21x21", + "#732 @ 394,351: 13x24", + "#733 @ 570,626: 29x11", + "#734 @ 217,938: 20x27", + "#735 @ 133,531: 27x28", + "#736 @ 241,576: 14x29", + "#737 @ 579,235: 19x10", + "#738 @ 103,325: 25x14", + "#739 @ 236,653: 18x22", + "#740 @ 100,73: 27x14", + "#741 @ 23,512: 10x28", + "#742 @ 226,502: 17x18", + "#743 @ 569,738: 10x21", + "#744 @ 886,791: 27x12", + "#745 @ 510,916: 20x19", + "#746 @ 195,438: 20x25", + "#747 @ 214,74: 18x12", + "#748 @ 868,918: 25x10", + "#749 @ 35,307: 23x18", + "#750 @ 629,714: 12x25", + "#751 @ 99,452: 27x22", + "#752 @ 909,30: 12x23", + "#753 @ 948,560: 14x10", + "#754 @ 29,832: 25x15", + "#755 @ 518,823: 17x10", + "#756 @ 423,806: 17x27", + "#757 @ 369,411: 24x21", + "#758 @ 805,927: 13x13", + "#759 @ 544,145: 12x20", + "#760 @ 307,112: 17x27", + "#761 @ 93,88: 16x20", + "#762 @ 392,347: 24x27", + "#763 @ 496,418: 17x27", + "#764 @ 935,905: 5x16", + "#765 @ 437,296: 23x11", + "#766 @ 622,769: 26x15", + "#767 @ 284,578: 21x10", + "#768 @ 177,274: 14x28", + "#769 @ 505,135: 27x24", + "#770 @ 157,451: 19x16", + "#771 @ 898,57: 21x13", + "#772 @ 645,356: 13x22", + "#773 @ 753,60: 20x22", + "#774 @ 440,366: 20x15", + "#775 @ 631,150: 10x26", + "#776 @ 896,107: 19x28", + "#777 @ 932,223: 14x29", + "#778 @ 764,212: 13x19", + "#779 @ 98,308: 28x28", + "#780 @ 490,54: 29x10", + "#781 @ 871,248: 22x12", + "#782 @ 89,119: 14x19", + "#783 @ 862,293: 15x21", + "#784 @ 891,134: 14x10", + "#785 @ 493,148: 18x22", + "#786 @ 707,99: 26x16", + "#787 @ 687,646: 22x13", + "#788 @ 851,110: 28x12", + "#789 @ 622,795: 25x22", + "#790 @ 393,669: 18x27", + "#791 @ 507,687: 27x24", + "#792 @ 738,489: 16x14", + "#793 @ 239,908: 26x11", + "#794 @ 799,164: 22x29", + "#795 @ 257,386: 28x19", + "#796 @ 854,462: 10x14", + "#797 @ 731,324: 19x18", + "#798 @ 394,277: 15x27", + "#799 @ 337,331: 27x27", + "#800 @ 40,21: 16x10", + "#801 @ 834,315: 17x18", + "#802 @ 593,483: 10x26", + "#803 @ 871,195: 23x25", + "#804 @ 831,962: 25x10", + "#805 @ 716,708: 27x21", + "#806 @ 340,250: 28x11", + "#807 @ 328,443: 10x24", + "#808 @ 17,898: 13x28", + "#809 @ 167,903: 14x19", + "#810 @ 27,832: 25x16", + "#811 @ 420,609: 19x21", + "#812 @ 476,41: 26x29", + "#813 @ 260,383: 10x17", + "#814 @ 804,450: 13x14", + "#815 @ 221,221: 19x13", + "#816 @ 145,206: 17x26", + "#817 @ 150,551: 26x12", + "#818 @ 160,627: 21x11", + "#819 @ 231,339: 10x13", + "#820 @ 261,3: 25x28", + "#821 @ 328,822: 17x29", + "#822 @ 71,722: 22x24", + "#823 @ 339,462: 13x23", + "#824 @ 650,361: 14x10", + "#825 @ 236,241: 15x13", + "#826 @ 729,923: 19x12", + "#827 @ 158,685: 26x21", + "#828 @ 576,946: 10x10", + "#829 @ 598,92: 27x23", + "#830 @ 708,318: 24x27", + "#831 @ 604,665: 11x25", + "#832 @ 801,23: 25x27", + "#833 @ 146,949: 16x29", + "#834 @ 424,690: 20x12", + "#835 @ 583,250: 21x23", + "#836 @ 932,358: 27x28", + "#837 @ 960,447: 20x17", + "#838 @ 418,746: 20x27", + "#839 @ 10,822: 18x15", + "#840 @ 131,230: 16x20", + "#841 @ 180,963: 22x14", + "#842 @ 680,419: 29x27", + "#843 @ 329,507: 20x27", + "#844 @ 99,584: 14x25", + "#845 @ 157,13: 14x24", + "#846 @ 596,237: 18x16", + "#847 @ 258,648: 20x26", + "#848 @ 608,126: 22x12", + "#849 @ 696,848: 22x14", + "#850 @ 669,884: 19x15", + "#851 @ 166,629: 23x11", + "#852 @ 783,631: 18x21", + "#853 @ 42,512: 17x24", + "#854 @ 230,416: 17x26", + "#855 @ 745,808: 21x29", + "#856 @ 879,723: 23x27", + "#857 @ 858,450: 17x10", + "#858 @ 96,4: 10x25", + "#859 @ 255,320: 21x27", + "#860 @ 160,773: 27x13", + "#861 @ 383,782: 13x26", + "#862 @ 508,371: 13x11", + "#863 @ 138,533: 18x29", + "#864 @ 588,436: 23x14", + "#865 @ 401,589: 29x28", + "#866 @ 928,603: 24x17", + "#867 @ 560,958: 23x27", + "#868 @ 756,927: 13x16", + "#869 @ 313,703: 16x17", + "#870 @ 515,75: 5x11", + "#871 @ 462,451: 11x27", + "#872 @ 519,537: 17x15", + "#873 @ 308,93: 26x17", + "#874 @ 843,251: 12x15", + "#875 @ 860,19: 11x24", + "#876 @ 898,590: 12x16", + "#877 @ 889,731: 25x16", + "#878 @ 893,422: 28x11", + "#879 @ 754,249: 18x20", + "#880 @ 97,496: 20x20", + "#881 @ 243,223: 13x22", + "#882 @ 316,116: 26x21", + "#883 @ 351,655: 23x21", + "#884 @ 418,740: 19x19", + "#885 @ 352,690: 24x13", + "#886 @ 22,50: 19x29", + "#887 @ 905,856: 21x27", + "#888 @ 788,896: 12x15", + "#889 @ 48,500: 17x11", + "#890 @ 175,429: 15x13", + "#891 @ 324,405: 11x19", + "#892 @ 288,818: 18x17", + "#893 @ 202,317: 24x27", + "#894 @ 725,915: 15x24", + "#895 @ 332,441: 17x21", + "#896 @ 372,567: 24x20", + "#897 @ 524,300: 23x28", + "#898 @ 25,613: 15x22", + "#899 @ 697,855: 17x22", + "#900 @ 4,656: 19x13", + "#901 @ 46,933: 27x21", + "#902 @ 797,48: 24x21", + "#903 @ 888,363: 29x28", + "#904 @ 542,883: 19x20", + "#905 @ 925,354: 12x22", + "#906 @ 988,662: 10x16", + "#907 @ 198,731: 11x22", + "#908 @ 872,423: 21x27", + "#909 @ 962,826: 19x11", + "#910 @ 764,112: 23x17", + "#911 @ 726,318: 18x21", + "#912 @ 58,912: 15x26", + "#913 @ 685,76: 23x17", + "#914 @ 426,227: 24x22", + "#915 @ 920,357: 11x21", + "#916 @ 369,673: 25x22", + "#917 @ 476,211: 24x26", + "#918 @ 397,287: 13x24", + "#919 @ 600,28: 13x22", + "#920 @ 131,340: 20x27", + "#921 @ 176,129: 29x12", + "#922 @ 678,650: 11x17", + "#923 @ 461,939: 11x25", + "#924 @ 97,4: 17x18", + "#925 @ 544,549: 16x15", + "#926 @ 423,693: 10x14", + "#927 @ 836,808: 11x21", + "#928 @ 821,943: 24x13", + "#929 @ 348,901: 10x11", + "#930 @ 484,631: 18x18", + "#931 @ 467,650: 13x26", + "#932 @ 195,942: 14x11", + "#933 @ 361,291: 20x29", + "#934 @ 186,441: 10x17", + "#935 @ 926,199: 18x16", + "#936 @ 842,601: 23x15", + "#937 @ 794,257: 15x22", + "#938 @ 767,226: 11x11", + "#939 @ 877,266: 13x26", + "#940 @ 755,39: 26x14", + "#941 @ 754,684: 24x13", + "#942 @ 515,441: 19x13", + "#943 @ 311,815: 17x23", + "#944 @ 442,956: 23x26", + "#945 @ 551,401: 10x29", + "#946 @ 392,402: 10x14", + "#947 @ 240,495: 26x11", + "#948 @ 689,684: 29x18", + "#949 @ 695,693: 8x8", + "#950 @ 834,570: 27x12", + "#951 @ 410,126: 20x27", + "#952 @ 241,911: 17x4", + "#953 @ 47,444: 16x22", + "#954 @ 106,246: 14x16", + "#955 @ 718,505: 15x20", + "#956 @ 684,644: 23x22", + "#957 @ 293,536: 22x12", + "#958 @ 553,567: 24x10", + "#959 @ 239,287: 12x15", + "#960 @ 768,106: 19x17", + "#961 @ 696,519: 11x28", + "#962 @ 325,824: 26x11", + "#963 @ 775,26: 27x19", + "#964 @ 473,754: 10x12", + "#965 @ 202,806: 20x17", + "#966 @ 240,919: 10x21", + "#967 @ 2,656: 28x14", + "#968 @ 351,749: 26x15", + "#969 @ 801,142: 17x26", + "#970 @ 501,478: 26x22", + "#971 @ 705,135: 25x19", + "#972 @ 123,741: 17x13", + "#973 @ 881,924: 20x11", + "#974 @ 97,826: 16x23", + "#975 @ 962,395: 29x14", + "#976 @ 700,850: 23x20", + "#977 @ 852,546: 10x14", + "#978 @ 310,863: 10x24", + "#979 @ 263,122: 27x16", + "#980 @ 827,355: 26x16", + "#981 @ 773,317: 21x11", + "#982 @ 849,452: 29x24", + "#983 @ 367,904: 13x21", + "#984 @ 393,356: 26x11", + "#985 @ 758,677: 14x15", + "#986 @ 142,246: 18x14", + "#987 @ 336,59: 23x13", + "#988 @ 268,741: 13x23", + "#989 @ 595,797: 15x21", + "#990 @ 899,540: 20x10", + "#991 @ 709,386: 18x29", + "#992 @ 754,928: 27x18", + "#993 @ 416,195: 26x17", + "#994 @ 575,927: 29x25", + "#995 @ 170,857: 23x28", + "#996 @ 395,361: 14x28", + "#997 @ 242,955: 14x17", + "#998 @ 244,278: 19x21", + "#999 @ 849,41: 21x29", + "#1000 @ 835,177: 16x12", + "#1001 @ 324,540: 20x13", + "#1002 @ 315,212: 29x12", + "#1003 @ 460,410: 22x13", + "#1004 @ 641,786: 16x11", + "#1005 @ 886,583: 10x26", + "#1006 @ 610,35: 13x29", + "#1007 @ 392,844: 13x27", + "#1008 @ 347,361: 21x29", + "#1009 @ 359,676: 24x29", + "#1010 @ 239,803: 17x23", + "#1011 @ 777,187: 10x27", + "#1012 @ 587,102: 12x16", + "#1013 @ 105,507: 16x24", + "#1014 @ 331,116: 23x25", + "#1015 @ 120,922: 19x16", + "#1016 @ 689,120: 17x25", + "#1017 @ 108,235: 28x11", + "#1018 @ 891,542: 11x21", + "#1019 @ 155,75: 19x19", + "#1020 @ 917,337: 21x28", + "#1021 @ 884,572: 20x24", + "#1022 @ 892,519: 29x26", + "#1023 @ 585,120: 16x25", + "#1024 @ 584,620: 23x11", + "#1025 @ 107,753: 27x28", + "#1026 @ 148,197: 13x22", + "#1027 @ 19,775: 23x17", + "#1028 @ 967,634: 16x27", + "#1029 @ 703,333: 28x20", + "#1030 @ 173,411: 12x23", + "#1031 @ 359,24: 18x13", + "#1032 @ 63,244: 20x14", + "#1033 @ 345,520: 12x29", + "#1034 @ 15,255: 20x11", + "#1035 @ 603,724: 25x24", + "#1036 @ 240,478: 14x25", + "#1037 @ 591,883: 10x25", + "#1038 @ 455,285: 20x17", + "#1039 @ 495,674: 27x19", + "#1040 @ 259,262: 15x24", + "#1041 @ 321,561: 20x12", + "#1042 @ 961,130: 21x14", + "#1043 @ 472,352: 20x21", + "#1044 @ 78,504: 24x19", + "#1045 @ 101,777: 16x27", + "#1046 @ 386,656: 23x25", + "#1047 @ 842,777: 17x21", + "#1048 @ 748,866: 13x20", + "#1049 @ 42,71: 18x15", + "#1050 @ 311,268: 26x13", + "#1051 @ 662,926: 11x29", + "#1052 @ 228,514: 25x16", + "#1053 @ 388,92: 19x18", + "#1054 @ 770,218: 24x28", + "#1055 @ 363,501: 29x24", + "#1056 @ 111,525: 12x28", + "#1057 @ 279,759: 29x14", + "#1058 @ 26,103: 28x27", + "#1059 @ 273,225: 24x18", + "#1060 @ 369,7: 21x19", + "#1061 @ 562,81: 14x9", + "#1062 @ 293,582: 15x12", + "#1063 @ 401,363: 13x12", + "#1064 @ 695,602: 18x18", + "#1065 @ 76,209: 18x26", + "#1066 @ 541,698: 27x29", + "#1067 @ 51,227: 16x22", + "#1068 @ 609,468: 14x23", + "#1069 @ 861,458: 23x19", + "#1070 @ 664,371: 20x10", + "#1071 @ 393,305: 29x17", + "#1072 @ 808,880: 12x21", + "#1073 @ 713,160: 28x27", + "#1074 @ 37,828: 10x12", + "#1075 @ 656,564: 27x24", + "#1076 @ 401,452: 10x19", + "#1077 @ 535,0: 21x19", + "#1078 @ 676,643: 10x13", + "#1079 @ 249,316: 26x16", + "#1080 @ 10,191: 21x16", + "#1081 @ 976,398: 15x11", + "#1082 @ 380,673: 20x21", + "#1083 @ 546,2: 24x14", + "#1084 @ 90,528: 25x24", + "#1085 @ 934,211: 19x10", + "#1086 @ 538,132: 10x10", + "#1087 @ 911,418: 11x23", + "#1088 @ 640,59: 23x25", + "#1089 @ 298,463: 16x14", + "#1090 @ 848,402: 17x28", + "#1091 @ 698,7: 20x16", + "#1092 @ 729,744: 10x26", + "#1093 @ 482,364: 25x21", + "#1094 @ 795,495: 11x29", + "#1095 @ 18,158: 28x27", + "#1096 @ 966,825: 13x14", + "#1097 @ 337,912: 25x15", + "#1098 @ 119,811: 15x11", + "#1099 @ 369,935: 18x15", + "#1100 @ 764,877: 17x15", + "#1101 @ 498,417: 11x13", + "#1102 @ 107,428: 18x29", + "#1103 @ 719,330: 13x13", + "#1104 @ 130,443: 10x29", + "#1105 @ 624,911: 14x12", + "#1106 @ 31,36: 18x18", + "#1107 @ 160,936: 25x29", + "#1108 @ 376,447: 10x5", + "#1109 @ 900,361: 11x26", + "#1110 @ 232,517: 11x9", + "#1111 @ 507,235: 17x13", + "#1112 @ 385,299: 16x27", + "#1113 @ 901,592: 5x10", + "#1114 @ 514,516: 27x25", + "#1115 @ 494,703: 25x15", + "#1116 @ 248,81: 17x16", + "#1117 @ 246,875: 16x13", + "#1118 @ 78,252: 23x12", + "#1119 @ 67,251: 27x22", + "#1120 @ 839,801: 10x25", + "#1121 @ 428,69: 12x25", + "#1122 @ 49,452: 28x20", + "#1123 @ 339,105: 12x16", + "#1124 @ 344,260: 18x24", + "#1125 @ 420,743: 22x29", + "#1126 @ 382,571: 18x22", + "#1127 @ 166,547: 12x21", + "#1128 @ 258,507: 5x9", + "#1129 @ 400,354: 25x20", + "#1130 @ 839,431: 17x14", + "#1131 @ 299,687: 29x22", + "#1132 @ 349,347: 16x24", + "#1133 @ 74,460: 19x12", + "#1134 @ 652,222: 26x24", + "#1135 @ 578,616: 28x20", + "#1136 @ 566,655: 15x11", + "#1137 @ 741,837: 25x20", + "#1138 @ 434,53: 10x17", + "#1139 @ 867,220: 19x23", + "#1140 @ 878,177: 20x19", + "#1141 @ 439,376: 23x11", + "#1142 @ 538,781: 11x24", + "#1143 @ 508,365: 13x21", + "#1144 @ 450,292: 18x12", + "#1145 @ 789,216: 22x25", + "#1146 @ 240,915: 16x23", + "#1147 @ 807,452: 6x9", + "#1148 @ 938,99: 18x13", + "#1149 @ 105,622: 19x21", + "#1150 @ 537,922: 15x25", + "#1151 @ 826,361: 20x13", + "#1152 @ 779,488: 10x13", + "#1153 @ 765,82: 15x11", + "#1154 @ 148,200: 27x24", + "#1155 @ 239,883: 28x13", + "#1156 @ 299,518: 16x18", + "#1157 @ 814,17: 13x26", + "#1158 @ 593,516: 12x14", + "#1159 @ 486,694: 17x15", + "#1160 @ 902,540: 24x16", + "#1161 @ 934,267: 16x25", + "#1162 @ 479,621: 18x29", + "#1163 @ 731,437: 18x24", + "#1164 @ 47,392: 28x12", + "#1165 @ 539,673: 27x17", + "#1166 @ 168,916: 27x27", + "#1167 @ 783,59: 28x21", + "#1168 @ 427,684: 17x13", + "#1169 @ 503,684: 21x18", + "#1170 @ 805,49: 20x19", + "#1171 @ 141,330: 12x25", + "#1172 @ 242,290: 5x8", + "#1173 @ 572,744: 17x11", + "#1174 @ 5,189: 15x22", + "#1175 @ 790,304: 15x14", + "#1176 @ 333,200: 22x19", + "#1177 @ 392,916: 17x10", + "#1178 @ 64,450: 11x29", + "#1179 @ 574,264: 13x18", + "#1180 @ 257,311: 17x27", + "#1181 @ 581,686: 25x20", + "#1182 @ 92,794: 23x11", + "#1183 @ 967,804: 26x27", + "#1184 @ 657,43: 14x24", + "#1185 @ 832,395: 18x28", + "#1186 @ 574,65: 18x12", + "#1187 @ 183,872: 12x15", + "#1188 @ 658,96: 19x14", + "#1189 @ 77,585: 29x29", + "#1190 @ 746,882: 13x27", + "#1191 @ 617,769: 24x29", + "#1192 @ 922,359: 15x22", + "#1193 @ 441,928: 28x18", + "#1194 @ 679,632: 21x17", + "#1195 @ 175,697: 4x13", + "#1196 @ 719,113: 14x15", + "#1197 @ 712,808: 19x20", + "#1198 @ 344,231: 19x17", + "#1199 @ 317,254: 13x21", + "#1200 @ 24,26: 14x18", + "#1201 @ 76,321: 16x27", + "#1202 @ 122,526: 20x14", + "#1203 @ 447,361: 26x13", + "#1204 @ 850,773: 19x20", + "#1205 @ 636,37: 25x14", + "#1206 @ 171,314: 15x19", + "#1207 @ 676,82: 12x23", + "#1208 @ 913,726: 16x14", + "#1209 @ 101,78: 18x13", + "#1210 @ 162,580: 23x18", + "#1211 @ 939,560: 25x11", + "#1212 @ 31,536: 19x20", + "#1213 @ 758,79: 12x10", + "#1214 @ 420,281: 25x25", + "#1215 @ 596,475: 16x13", + "#1216 @ 428,794: 25x17", + "#1217 @ 526,759: 25x19", + "#1218 @ 437,669: 23x25", + "#1219 @ 944,849: 27x25", + "#1220 @ 957,818: 23x22", + "#1221 @ 560,41: 11x28", + "#1222 @ 622,761: 18x25", + "#1223 @ 519,156: 28x29", + "#1224 @ 545,535: 28x20", + "#1225 @ 902,123: 26x22", + "#1226 @ 884,314: 17x25", + "#1227 @ 719,335: 13x21", + "#1228 @ 750,862: 27x14", + "#1229 @ 162,854: 10x14", + "#1230 @ 573,925: 29x20", + "#1231 @ 92,447: 19x26", + "#1232 @ 243,285: 29x20", + "#1233 @ 625,770: 26x23", + "#1234 @ 111,698: 20x17", + "#1235 @ 199,881: 20x29", + "#1236 @ 331,470: 11x23", + "#1237 @ 870,438: 27x17", + "#1238 @ 308,334: 21x12", + "#1239 @ 944,946: 20x22", + "#1240 @ 543,924: 5x7", + "#1241 @ 271,409: 28x20", + "#1242 @ 165,833: 16x28", + "#1243 @ 882,373: 23x28", + "#1244 @ 721,841: 27x27", + "#1245 @ 510,41: 15x25", + "#1246 @ 843,434: 16x21", + "#1247 @ 776,617: 25x20", + "#1248 @ 41,198: 11x11", + "#1249 @ 8,904: 18x10", + "#1250 @ 621,462: 22x22", + "#1251 @ 920,273: 29x14", + "#1252 @ 800,684: 13x12", + "#1253 @ 562,876: 18x27", + "#1254 @ 982,644: 14x25", + "#1255 @ 313,320: 10x15", + "#1256 @ 242,792: 17x23", + "#1257 @ 534,98: 19x16", + "#1258 @ 11,788: 12x20", + "#1259 @ 648,558: 20x18", + "#1260 @ 276,824: 29x25", + "#1261 @ 501,670: 15x14", + "#1262 @ 84,796: 23x26", + "#1263 @ 385,780: 13x12", + "#1264 @ 668,778: 13x24", + "#1265 @ 207,488: 12x19", + "#1266 @ 639,612: 28x29", + "#1267 @ 597,458: 29x12", + "#1268 @ 556,349: 22x24", + "#1269 @ 255,237: 20x27", + "#1270 @ 484,942: 14x22", + "#1271 @ 575,400: 15x17", + "#1272 @ 600,855: 15x19", + "#1273 @ 767,431: 18x19", + "#1274 @ 499,762: 18x23", + "#1275 @ 35,85: 25x22", + "#1276 @ 496,149: 28x14", + "#1277 @ 437,55: 24x25", + "#1278 @ 649,345: 22x13", + "#1279 @ 732,819: 12x28", + "#1280 @ 633,99: 27x14", + "#1281 @ 72,251: 15x14", + "#1282 @ 527,451: 10x11", + "#1283 @ 159,69: 27x19", + "#1284 @ 292,519: 26x17", + "#1285 @ 255,714: 11x14", + "#1286 @ 951,914: 21x23", + "#1287 @ 214,264: 19x24", + "#1288 @ 552,951: 10x10", + "#1289 @ 367,933: 24x20", + "#1290 @ 250,548: 28x10", + "#1291 @ 123,81: 28x16", + "#1292 @ 511,512: 19x29", + "#1293 @ 740,904: 29x18", + "#1294 @ 176,4: 10x15", + "#1295 @ 733,148: 28x18", + "#1296 @ 18,633: 10x23", + "#1297 @ 85,214: 27x12", + "#1298 @ 215,119: 14x26", + "#1299 @ 872,100: 29x14", + "#1300 @ 255,120: 16x10", + "#1301 @ 413,912: 23x18", + "#1302 @ 150,347: 29x29", + "#1303 @ 490,402: 12x26", + "#1304 @ 34,742: 23x20", + "#1305 @ 746,884: 13x12", + "#1306 @ 526,514: 20x21", + "#1307 @ 771,864: 13x15", + "#1308 @ 840,963: 14x18", + "#1309 @ 116,813: 26x21" +] \ No newline at end of file diff --git a/day3.spec.js b/day3.spec.js index 11a6324..3b2dc50 100644 --- a/day3.spec.js +++ b/day3.spec.js @@ -2,9 +2,150 @@ /* global describe, it, expect */ -const { overlappingPatches } = require('./day3') +const { overlappingPatches, patch, claimToPatch } = require('./day3') const input = require('./day3.json') +describe('patch', () => { + it('should build a single fabric', () => { + expect(patch(0, 0, 1, 1, 10)).toEqual([ + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + expect(patch(1, 1, 2, 2, 10)).toEqual([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) + }) + it('should combine multiple patterns into one fabric', () => { + expect(patch(0, 0, 1, 1, 2, patch(0, 0, 1, 1, 2))).toEqual([2, 0, 0, 0]) + }) +}) + +describe('claimToPatch', () => { + it('should convert a claim', () => { + expect(claimToPatch('#1 @ 1,3: 4x4', undefined, 10)).toEqual( + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + ] + ) + expect(claimToPatch('#2 @ 3,1: 4x4', undefined, 10)).toEqual( + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ) + expect(claimToPatch('#3 @ 5,5: 2x2', undefined, 10)).toEqual( + [ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + ) + }) +}) + describe('overlapping patches', () => { it('should calculate the number of overlapping patches', () => { expect(overlappingPatches([ @@ -13,4 +154,8 @@ describe('overlapping patches', () => { '#3 @ 5,5: 2x2' ])).toEqual(4) }) + + it('should calculate the solution', () => { + expect(overlappingPatches(input, 1000)).toEqual(109716) + }) }) From 6fbeb1f8eb39fe2ae262aa4fcdd36a53a6bc801e Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 4 Dec 2018 01:02:20 +0100 Subject: [PATCH 16/56] feat: day 3, part 2 --- day3.js | 21 ++++++++++++++++++++- day3.spec.js | 16 +++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/day3.js b/day3.js index f17c709..1c439c2 100644 --- a/day3.js +++ b/day3.js @@ -33,8 +33,27 @@ const overlappingPatches = (patches, size) => { return fabric.filter(f => f > 1).length } +const findOverlapFreeClaim = (patches, size) => { + let fabric + patches.forEach(p => { + fabric = claimToPatch(p, fabric, size) + }) + + const overlapFree = patches.find(patch => { + const f = claimToPatch(patch, undefined, size) + for (let i = 0; i < f.length; i++) { + if (!f[i]) continue + if (fabric[i] !== 1) return false + } + return true + }) + if (!overlapFree) return false + return overlapFree.match(/^#[0-9]+/)[0] +} + module.exports = { overlappingPatches, patch, - claimToPatch + claimToPatch, + findOverlapFreeClaim } diff --git a/day3.spec.js b/day3.spec.js index 3b2dc50..4846ecb 100644 --- a/day3.spec.js +++ b/day3.spec.js @@ -2,7 +2,7 @@ /* global describe, it, expect */ -const { overlappingPatches, patch, claimToPatch } = require('./day3') +const { overlappingPatches, patch, claimToPatch, findOverlapFreeClaim } = require('./day3') const input = require('./day3.json') describe('patch', () => { @@ -159,3 +159,17 @@ describe('overlapping patches', () => { expect(overlappingPatches(input, 1000)).toEqual(109716) }) }) + +describe('overlapping patches', () => { + it('should find the claim with no overlap', () => { + expect(findOverlapFreeClaim([ + '#1 @ 1,3: 4x4', + '#2 @ 3,1: 4x4', + '#3 @ 5,5: 2x2' + ])).toEqual('#3') + }) + + it('should calculate the solution', () => { + expect(findOverlapFreeClaim(input, 1000)).toEqual('#124') + }) +}) From d066f28755896ded1e88482a6768360a6d403322 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 4 Dec 2018 23:37:28 +0100 Subject: [PATCH 17/56] feat: day 4 part 1 --- day4.json | 968 +++++++++++++++++++++++++++++++++++++++++++++++++++ day4.spec.js | 131 +++++++ 2 files changed, 1099 insertions(+) create mode 100644 day4.json create mode 100644 day4.spec.js diff --git a/day4.json b/day4.json new file mode 100644 index 0000000..1adb6de --- /dev/null +++ b/day4.json @@ -0,0 +1,968 @@ +[ + "[1518-03-30 00:57] wakes up", + "[1518-04-15 23:56] Guard #2213 begins shift", + "[1518-10-31 00:36] wakes up", + "[1518-11-14 00:03] Guard #2129 begins shift", + "[1518-04-01 00:54] wakes up", + "[1518-10-03 00:42] falls asleep", + "[1518-07-01 00:19] falls asleep", + "[1518-08-02 00:00] Guard #3319 begins shift", + "[1518-07-03 00:01] falls asleep", + "[1518-08-28 00:24] falls asleep", + "[1518-11-02 00:31] falls asleep", + "[1518-10-15 00:04] falls asleep", + "[1518-08-07 00:51] wakes up", + "[1518-05-02 00:14] falls asleep", + "[1518-05-16 00:38] falls asleep", + "[1518-08-27 00:37] falls asleep", + "[1518-09-18 00:47] wakes up", + "[1518-05-29 00:52] wakes up", + "[1518-09-07 00:06] falls asleep", + "[1518-07-14 00:52] wakes up", + "[1518-05-09 00:59] wakes up", + "[1518-05-14 00:12] falls asleep", + "[1518-04-17 23:51] Guard #439 begins shift", + "[1518-11-20 00:04] Guard #2129 begins shift", + "[1518-07-21 00:02] Guard #3347 begins shift", + "[1518-11-16 00:04] Guard #241 begins shift", + "[1518-04-02 23:48] Guard #1777 begins shift", + "[1518-07-11 00:00] Guard #241 begins shift", + "[1518-07-29 00:49] falls asleep", + "[1518-09-14 00:38] falls asleep", + "[1518-05-27 00:39] wakes up", + "[1518-04-09 00:54] wakes up", + "[1518-11-01 23:56] Guard #103 begins shift", + "[1518-10-07 00:42] wakes up", + "[1518-09-26 00:58] wakes up", + "[1518-09-10 00:54] falls asleep", + "[1518-08-15 00:48] falls asleep", + "[1518-06-09 00:01] Guard #2251 begins shift", + "[1518-11-06 23:58] Guard #103 begins shift", + "[1518-10-04 00:29] falls asleep", + "[1518-08-02 00:56] falls asleep", + "[1518-08-21 00:18] falls asleep", + "[1518-11-23 00:30] falls asleep", + "[1518-09-29 23:59] Guard #829 begins shift", + "[1518-09-17 00:49] falls asleep", + "[1518-07-25 00:49] wakes up", + "[1518-08-19 00:58] wakes up", + "[1518-07-13 00:48] wakes up", + "[1518-04-11 23:59] Guard #2539 begins shift", + "[1518-04-30 00:32] wakes up", + "[1518-07-05 00:27] falls asleep", + "[1518-09-02 00:29] wakes up", + "[1518-09-21 00:58] wakes up", + "[1518-04-26 00:08] falls asleep", + "[1518-04-23 00:26] wakes up", + "[1518-05-25 00:55] wakes up", + "[1518-05-14 23:58] Guard #241 begins shift", + "[1518-09-09 23:58] Guard #3319 begins shift", + "[1518-04-23 00:23] falls asleep", + "[1518-08-08 00:42] wakes up", + "[1518-06-12 00:03] falls asleep", + "[1518-03-31 00:03] Guard #103 begins shift", + "[1518-04-11 00:58] wakes up", + "[1518-03-28 00:53] falls asleep", + "[1518-06-29 23:57] Guard #103 begins shift", + "[1518-05-08 00:36] falls asleep", + "[1518-11-18 00:00] Guard #2137 begins shift", + "[1518-03-31 00:21] falls asleep", + "[1518-05-08 00:57] falls asleep", + "[1518-06-18 00:50] falls asleep", + "[1518-05-08 00:06] falls asleep", + "[1518-05-09 00:23] falls asleep", + "[1518-08-24 00:00] Guard #1301 begins shift", + "[1518-07-07 00:57] wakes up", + "[1518-10-24 00:51] wakes up", + "[1518-08-29 00:31] falls asleep", + "[1518-08-27 00:51] falls asleep", + "[1518-08-19 00:54] falls asleep", + "[1518-10-05 00:02] Guard #3347 begins shift", + "[1518-04-04 00:14] falls asleep", + "[1518-10-17 00:01] Guard #2389 begins shift", + "[1518-05-07 00:57] wakes up", + "[1518-11-17 00:01] Guard #1889 begins shift", + "[1518-07-09 00:54] wakes up", + "[1518-07-12 00:02] falls asleep", + "[1518-04-23 00:00] Guard #2137 begins shift", + "[1518-05-02 00:00] Guard #1283 begins shift", + "[1518-07-08 23:58] Guard #2389 begins shift", + "[1518-11-08 00:48] falls asleep", + "[1518-11-06 00:48] wakes up", + "[1518-06-25 00:46] wakes up", + "[1518-06-03 23:57] Guard #3371 begins shift", + "[1518-05-19 23:50] Guard #3371 begins shift", + "[1518-06-10 00:04] Guard #3371 begins shift", + "[1518-11-20 00:36] falls asleep", + "[1518-10-10 23:58] Guard #2539 begins shift", + "[1518-07-09 00:42] falls asleep", + "[1518-09-09 00:21] wakes up", + "[1518-05-10 00:03] Guard #3347 begins shift", + "[1518-06-18 00:47] wakes up", + "[1518-05-16 00:55] wakes up", + "[1518-06-23 00:41] falls asleep", + "[1518-08-27 00:39] wakes up", + "[1518-05-26 00:03] falls asleep", + "[1518-07-10 00:03] Guard #2389 begins shift", + "[1518-10-14 00:02] Guard #2389 begins shift", + "[1518-06-09 00:40] wakes up", + "[1518-07-01 00:55] wakes up", + "[1518-04-11 00:15] falls asleep", + "[1518-10-11 00:55] wakes up", + "[1518-06-25 00:24] falls asleep", + "[1518-04-29 00:45] falls asleep", + "[1518-11-04 00:02] Guard #1889 begins shift", + "[1518-07-20 00:04] Guard #2129 begins shift", + "[1518-05-06 00:32] falls asleep", + "[1518-04-27 00:08] falls asleep", + "[1518-11-11 00:33] falls asleep", + "[1518-11-21 00:22] falls asleep", + "[1518-10-28 00:50] falls asleep", + "[1518-07-24 00:19] falls asleep", + "[1518-10-21 00:10] falls asleep", + "[1518-09-19 00:01] Guard #2389 begins shift", + "[1518-03-31 00:57] wakes up", + "[1518-11-20 00:46] wakes up", + "[1518-05-28 00:41] falls asleep", + "[1518-11-18 23:56] Guard #439 begins shift", + "[1518-04-04 00:50] falls asleep", + "[1518-10-09 00:27] wakes up", + "[1518-11-16 00:47] falls asleep", + "[1518-08-03 00:42] wakes up", + "[1518-10-17 00:57] falls asleep", + "[1518-10-27 00:22] wakes up", + "[1518-07-29 00:03] Guard #2251 begins shift", + "[1518-10-06 00:18] falls asleep", + "[1518-07-31 00:23] falls asleep", + "[1518-09-05 00:00] Guard #1283 begins shift", + "[1518-11-10 23:59] Guard #439 begins shift", + "[1518-10-16 00:53] wakes up", + "[1518-10-31 00:57] wakes up", + "[1518-09-15 00:58] wakes up", + "[1518-05-30 00:59] wakes up", + "[1518-08-13 00:38] wakes up", + "[1518-09-08 00:42] wakes up", + "[1518-09-05 00:17] falls asleep", + "[1518-03-28 23:59] Guard #1777 begins shift", + "[1518-06-11 00:52] falls asleep", + "[1518-06-16 00:46] falls asleep", + "[1518-06-22 00:49] wakes up", + "[1518-06-27 23:58] Guard #2389 begins shift", + "[1518-10-15 00:42] wakes up", + "[1518-10-14 00:11] falls asleep", + "[1518-07-10 00:52] falls asleep", + "[1518-06-14 00:22] falls asleep", + "[1518-11-01 00:50] wakes up", + "[1518-09-21 23:59] Guard #1777 begins shift", + "[1518-05-23 00:43] wakes up", + "[1518-05-11 00:47] wakes up", + "[1518-09-02 23:57] Guard #1889 begins shift", + "[1518-06-12 00:32] wakes up", + "[1518-03-31 00:54] falls asleep", + "[1518-10-18 00:46] falls asleep", + "[1518-08-24 23:56] Guard #1889 begins shift", + "[1518-04-10 00:21] wakes up", + "[1518-07-23 00:01] Guard #3347 begins shift", + "[1518-10-08 00:08] falls asleep", + "[1518-09-28 00:00] falls asleep", + "[1518-04-18 00:57] wakes up", + "[1518-05-26 00:44] falls asleep", + "[1518-10-30 00:22] falls asleep", + "[1518-11-14 00:42] falls asleep", + "[1518-11-04 00:40] wakes up", + "[1518-04-09 00:38] falls asleep", + "[1518-06-24 23:57] Guard #1283 begins shift", + "[1518-06-02 00:01] Guard #1283 begins shift", + "[1518-07-16 00:30] wakes up", + "[1518-07-21 00:57] wakes up", + "[1518-11-23 00:57] falls asleep", + "[1518-09-01 00:45] wakes up", + "[1518-07-17 00:45] falls asleep", + "[1518-04-01 00:51] falls asleep", + "[1518-04-24 00:00] Guard #3347 begins shift", + "[1518-09-18 00:02] Guard #631 begins shift", + "[1518-05-13 00:23] wakes up", + "[1518-04-25 00:54] wakes up", + "[1518-04-14 00:02] Guard #1889 begins shift", + "[1518-09-12 00:13] falls asleep", + "[1518-08-26 00:57] falls asleep", + "[1518-08-13 00:02] Guard #439 begins shift", + "[1518-10-06 00:56] wakes up", + "[1518-10-01 00:32] wakes up", + "[1518-10-17 00:20] wakes up", + "[1518-07-28 00:01] falls asleep", + "[1518-10-28 00:59] wakes up", + "[1518-04-01 00:36] falls asleep", + "[1518-04-01 00:46] wakes up", + "[1518-05-24 00:01] Guard #2539 begins shift", + "[1518-04-24 00:41] wakes up", + "[1518-10-06 23:59] Guard #2903 begins shift", + "[1518-10-17 00:52] falls asleep", + "[1518-10-12 00:17] falls asleep", + "[1518-10-27 00:49] wakes up", + "[1518-08-22 00:01] falls asleep", + "[1518-08-16 00:57] wakes up", + "[1518-09-06 23:59] Guard #631 begins shift", + "[1518-04-17 00:01] Guard #103 begins shift", + "[1518-08-06 00:25] falls asleep", + "[1518-10-24 00:15] falls asleep", + "[1518-11-04 00:39] falls asleep", + "[1518-03-27 00:11] falls asleep", + "[1518-04-19 23:59] Guard #439 begins shift", + "[1518-10-29 00:55] wakes up", + "[1518-05-05 00:20] wakes up", + "[1518-10-02 00:49] wakes up", + "[1518-05-30 23:57] Guard #631 begins shift", + "[1518-09-11 00:41] wakes up", + "[1518-06-02 00:08] falls asleep", + "[1518-11-16 00:44] wakes up", + "[1518-10-27 23:52] Guard #1319 begins shift", + "[1518-10-10 00:00] Guard #1487 begins shift", + "[1518-08-16 00:54] falls asleep", + "[1518-05-20 00:00] falls asleep", + "[1518-07-29 00:14] wakes up", + "[1518-08-10 00:19] wakes up", + "[1518-08-04 00:00] Guard #439 begins shift", + "[1518-09-22 00:59] wakes up", + "[1518-11-12 23:57] Guard #1889 begins shift", + "[1518-11-01 00:38] falls asleep", + "[1518-08-09 00:56] falls asleep", + "[1518-07-20 00:47] wakes up", + "[1518-05-08 00:29] wakes up", + "[1518-06-12 00:56] falls asleep", + "[1518-06-15 23:56] Guard #2213 begins shift", + "[1518-05-13 00:03] Guard #1889 begins shift", + "[1518-10-18 00:19] falls asleep", + "[1518-07-10 00:30] wakes up", + "[1518-09-21 00:50] falls asleep", + "[1518-07-04 00:58] wakes up", + "[1518-11-09 00:46] falls asleep", + "[1518-05-13 00:59] wakes up", + "[1518-06-05 23:56] Guard #2251 begins shift", + "[1518-05-25 00:03] Guard #1213 begins shift", + "[1518-06-19 00:01] Guard #2903 begins shift", + "[1518-08-16 00:04] Guard #2213 begins shift", + "[1518-11-06 00:07] falls asleep", + "[1518-04-30 00:27] falls asleep", + "[1518-06-24 00:50] wakes up", + "[1518-05-27 23:58] Guard #3347 begins shift", + "[1518-10-22 00:22] falls asleep", + "[1518-05-26 00:29] wakes up", + "[1518-05-20 00:37] falls asleep", + "[1518-09-16 23:58] Guard #2903 begins shift", + "[1518-04-29 00:08] falls asleep", + "[1518-08-18 00:56] wakes up", + "[1518-08-22 00:42] wakes up", + "[1518-04-08 00:40] wakes up", + "[1518-08-02 00:53] wakes up", + "[1518-09-14 00:58] wakes up", + "[1518-10-06 00:07] falls asleep", + "[1518-04-28 00:49] wakes up", + "[1518-09-25 23:58] Guard #3319 begins shift", + "[1518-04-29 00:34] falls asleep", + "[1518-04-12 00:36] wakes up", + "[1518-05-19 00:29] wakes up", + "[1518-06-02 00:59] wakes up", + "[1518-08-03 00:24] falls asleep", + "[1518-05-28 00:13] falls asleep", + "[1518-04-15 00:02] Guard #1301 begins shift", + "[1518-09-30 00:32] falls asleep", + "[1518-07-27 23:50] Guard #1777 begins shift", + "[1518-06-15 00:15] falls asleep", + "[1518-10-09 00:03] falls asleep", + "[1518-04-30 00:03] Guard #1889 begins shift", + "[1518-09-15 00:03] falls asleep", + "[1518-08-30 00:20] falls asleep", + "[1518-06-16 00:30] falls asleep", + "[1518-05-08 00:03] Guard #2213 begins shift", + "[1518-05-17 00:51] falls asleep", + "[1518-06-12 00:58] wakes up", + "[1518-07-21 00:41] falls asleep", + "[1518-06-08 00:43] falls asleep", + "[1518-05-17 00:00] falls asleep", + "[1518-06-07 00:38] wakes up", + "[1518-05-14 00:26] falls asleep", + "[1518-04-16 00:26] wakes up", + "[1518-06-21 00:35] wakes up", + "[1518-10-27 00:58] wakes up", + "[1518-11-18 00:49] falls asleep", + "[1518-10-29 00:23] falls asleep", + "[1518-05-20 00:53] wakes up", + "[1518-05-18 00:00] Guard #1777 begins shift", + "[1518-05-24 00:44] falls asleep", + "[1518-11-13 00:31] falls asleep", + "[1518-07-16 00:58] wakes up", + "[1518-08-29 00:36] wakes up", + "[1518-10-26 23:51] Guard #2389 begins shift", + "[1518-07-26 00:53] falls asleep", + "[1518-07-14 00:56] wakes up", + "[1518-05-13 00:15] falls asleep", + "[1518-10-09 00:44] falls asleep", + "[1518-09-11 00:48] falls asleep", + "[1518-05-11 00:00] Guard #2903 begins shift", + "[1518-08-01 00:00] Guard #2129 begins shift", + "[1518-06-04 00:57] wakes up", + "[1518-06-19 00:42] wakes up", + "[1518-05-04 00:10] falls asleep", + "[1518-05-09 00:24] wakes up", + "[1518-10-21 00:51] wakes up", + "[1518-09-01 00:03] Guard #1319 begins shift", + "[1518-04-18 00:24] falls asleep", + "[1518-09-16 00:03] Guard #439 begins shift", + "[1518-07-18 00:50] falls asleep", + "[1518-07-20 00:06] falls asleep", + "[1518-05-08 00:46] wakes up", + "[1518-06-19 00:26] falls asleep", + "[1518-04-27 00:18] wakes up", + "[1518-07-30 00:54] falls asleep", + "[1518-07-31 00:45] wakes up", + "[1518-07-27 00:42] wakes up", + "[1518-08-15 00:38] wakes up", + "[1518-10-30 00:38] wakes up", + "[1518-08-04 23:57] Guard #1213 begins shift", + "[1518-08-01 00:41] falls asleep", + "[1518-08-23 00:03] Guard #829 begins shift", + "[1518-08-06 00:29] wakes up", + "[1518-11-08 00:50] wakes up", + "[1518-08-28 00:47] falls asleep", + "[1518-06-28 00:50] falls asleep", + "[1518-05-10 00:53] wakes up", + "[1518-06-11 00:54] wakes up", + "[1518-06-06 00:55] wakes up", + "[1518-10-28 23:56] Guard #103 begins shift", + "[1518-06-10 00:06] falls asleep", + "[1518-11-09 00:51] wakes up", + "[1518-05-16 00:18] falls asleep", + "[1518-03-28 00:16] falls asleep", + "[1518-04-19 00:53] wakes up", + "[1518-08-26 00:59] wakes up", + "[1518-09-20 00:00] Guard #2777 begins shift", + "[1518-10-11 00:45] falls asleep", + "[1518-08-09 00:00] Guard #2389 begins shift", + "[1518-06-01 00:46] wakes up", + "[1518-10-14 00:28] falls asleep", + "[1518-06-11 23:53] Guard #2251 begins shift", + "[1518-11-20 00:51] falls asleep", + "[1518-11-07 00:38] falls asleep", + "[1518-08-20 00:02] falls asleep", + "[1518-08-01 00:54] falls asleep", + "[1518-06-11 00:01] falls asleep", + "[1518-10-01 00:37] falls asleep", + "[1518-10-31 00:50] falls asleep", + "[1518-04-09 00:02] Guard #2129 begins shift", + "[1518-06-01 00:15] wakes up", + "[1518-04-21 00:02] Guard #2539 begins shift", + "[1518-07-22 00:00] falls asleep", + "[1518-09-28 00:58] wakes up", + "[1518-08-06 00:00] Guard #1319 begins shift", + "[1518-10-14 23:50] Guard #3319 begins shift", + "[1518-03-29 00:55] wakes up", + "[1518-08-10 00:49] wakes up", + "[1518-06-20 00:55] wakes up", + "[1518-04-19 00:08] falls asleep", + "[1518-11-01 00:08] falls asleep", + "[1518-04-01 00:01] Guard #3371 begins shift", + "[1518-06-29 00:33] falls asleep", + "[1518-08-21 00:01] Guard #1213 begins shift", + "[1518-08-21 23:51] Guard #1319 begins shift", + "[1518-06-17 00:04] falls asleep", + "[1518-05-22 00:54] falls asleep", + "[1518-11-12 00:30] wakes up", + "[1518-07-17 00:04] Guard #1283 begins shift", + "[1518-06-05 00:08] falls asleep", + "[1518-04-04 00:55] wakes up", + "[1518-07-23 00:53] wakes up", + "[1518-06-09 00:14] falls asleep", + "[1518-05-10 00:37] falls asleep", + "[1518-08-08 00:02] Guard #1213 begins shift", + "[1518-09-06 00:46] wakes up", + "[1518-09-07 23:57] Guard #1889 begins shift", + "[1518-07-18 00:55] wakes up", + "[1518-07-24 00:59] wakes up", + "[1518-05-05 00:54] wakes up", + "[1518-11-22 00:36] falls asleep", + "[1518-07-18 00:27] wakes up", + "[1518-10-09 00:58] wakes up", + "[1518-06-18 00:01] Guard #2137 begins shift", + "[1518-10-19 00:53] falls asleep", + "[1518-03-31 00:24] wakes up", + "[1518-09-27 00:02] falls asleep", + "[1518-09-12 00:56] wakes up", + "[1518-11-08 00:57] wakes up", + "[1518-10-02 00:03] Guard #1213 begins shift", + "[1518-06-09 00:59] wakes up", + "[1518-10-20 23:56] Guard #2539 begins shift", + "[1518-10-12 00:01] Guard #2251 begins shift", + "[1518-07-06 00:32] falls asleep", + "[1518-06-05 00:55] wakes up", + "[1518-10-22 00:12] wakes up", + "[1518-08-20 00:47] wakes up", + "[1518-11-17 00:42] wakes up", + "[1518-07-11 23:52] Guard #1283 begins shift", + "[1518-10-20 00:29] falls asleep", + "[1518-04-10 23:58] Guard #103 begins shift", + "[1518-07-24 00:51] falls asleep", + "[1518-08-12 00:50] wakes up", + "[1518-09-27 00:35] wakes up", + "[1518-10-13 00:02] Guard #103 begins shift", + "[1518-06-29 00:47] wakes up", + "[1518-10-28 00:02] falls asleep", + "[1518-05-10 00:44] wakes up", + "[1518-10-22 00:01] falls asleep", + "[1518-05-22 00:48] wakes up", + "[1518-06-19 00:56] falls asleep", + "[1518-06-25 00:41] falls asleep", + "[1518-07-07 00:51] falls asleep", + "[1518-10-18 00:52] wakes up", + "[1518-09-18 00:51] falls asleep", + "[1518-08-25 00:36] wakes up", + "[1518-06-10 00:49] wakes up", + "[1518-09-07 00:17] wakes up", + "[1518-10-01 00:31] falls asleep", + "[1518-04-18 00:05] falls asleep", + "[1518-09-23 00:01] Guard #439 begins shift", + "[1518-06-13 00:46] wakes up", + "[1518-04-20 00:30] wakes up", + "[1518-08-23 00:10] falls asleep", + "[1518-05-29 00:03] Guard #2903 begins shift", + "[1518-05-24 00:36] wakes up", + "[1518-09-24 23:57] Guard #1283 begins shift", + "[1518-05-28 00:46] wakes up", + "[1518-05-22 00:23] falls asleep", + "[1518-11-15 00:48] wakes up", + "[1518-06-01 00:21] falls asleep", + "[1518-05-17 00:58] wakes up", + "[1518-07-14 00:55] falls asleep", + "[1518-09-15 00:51] falls asleep", + "[1518-11-18 00:59] wakes up", + "[1518-05-25 00:17] falls asleep", + "[1518-08-17 00:03] Guard #3371 begins shift", + "[1518-04-04 00:03] Guard #1777 begins shift", + "[1518-09-29 00:40] wakes up", + "[1518-07-22 00:52] wakes up", + "[1518-05-07 00:04] Guard #2129 begins shift", + "[1518-09-27 23:54] Guard #1319 begins shift", + "[1518-04-29 00:09] wakes up", + "[1518-10-17 00:59] wakes up", + "[1518-07-06 00:46] wakes up", + "[1518-07-27 00:04] Guard #241 begins shift", + "[1518-08-10 00:00] Guard #241 begins shift", + "[1518-07-29 00:56] wakes up", + "[1518-07-12 00:17] wakes up", + "[1518-05-13 00:33] falls asleep", + "[1518-05-30 00:26] falls asleep", + "[1518-04-03 00:02] falls asleep", + "[1518-08-21 00:56] wakes up", + "[1518-04-21 00:39] wakes up", + "[1518-11-07 00:41] wakes up", + "[1518-10-24 00:03] Guard #2129 begins shift", + "[1518-07-16 00:53] falls asleep", + "[1518-04-07 00:57] wakes up", + "[1518-06-22 00:10] falls asleep", + "[1518-10-25 00:45] wakes up", + "[1518-09-04 00:04] falls asleep", + "[1518-04-14 00:58] wakes up", + "[1518-06-15 00:52] wakes up", + "[1518-04-13 00:02] Guard #3319 begins shift", + "[1518-07-15 00:01] Guard #1283 begins shift", + "[1518-07-22 00:36] wakes up", + "[1518-06-03 00:00] Guard #439 begins shift", + "[1518-05-23 00:27] falls asleep", + "[1518-07-16 00:00] Guard #1777 begins shift", + "[1518-08-15 00:06] falls asleep", + "[1518-05-15 00:58] wakes up", + "[1518-09-11 00:49] wakes up", + "[1518-11-19 00:55] wakes up", + "[1518-04-06 00:37] wakes up", + "[1518-07-15 00:13] falls asleep", + "[1518-08-28 00:03] Guard #1777 begins shift", + "[1518-07-21 23:51] Guard #3371 begins shift", + "[1518-09-08 00:27] falls asleep", + "[1518-07-08 00:02] Guard #241 begins shift", + "[1518-08-11 00:52] wakes up", + "[1518-09-09 00:32] falls asleep", + "[1518-08-13 23:59] Guard #3371 begins shift", + "[1518-07-19 00:53] wakes up", + "[1518-08-05 00:46] wakes up", + "[1518-07-01 00:53] falls asleep", + "[1518-09-11 00:03] Guard #241 begins shift", + "[1518-11-13 00:41] wakes up", + "[1518-11-11 00:39] wakes up", + "[1518-08-02 00:59] wakes up", + "[1518-09-09 00:42] wakes up", + "[1518-10-05 00:48] falls asleep", + "[1518-09-29 00:00] Guard #2903 begins shift", + "[1518-08-01 00:59] wakes up", + "[1518-04-12 00:54] wakes up", + "[1518-09-18 00:23] falls asleep", + "[1518-09-04 00:47] wakes up", + "[1518-04-02 00:03] Guard #1777 begins shift", + "[1518-04-05 23:58] Guard #2251 begins shift", + "[1518-05-16 00:26] wakes up", + "[1518-04-05 00:00] falls asleep", + "[1518-05-04 00:31] wakes up", + "[1518-06-13 00:30] falls asleep", + "[1518-09-06 00:50] falls asleep", + "[1518-07-02 00:05] falls asleep", + "[1518-11-08 00:04] Guard #1213 begins shift", + "[1518-03-29 00:08] falls asleep", + "[1518-04-21 00:15] falls asleep", + "[1518-06-30 00:39] falls asleep", + "[1518-10-24 23:56] Guard #1319 begins shift", + "[1518-05-20 00:28] wakes up", + "[1518-06-12 00:20] wakes up", + "[1518-09-11 00:29] falls asleep", + "[1518-05-09 00:57] falls asleep", + "[1518-06-03 00:33] wakes up", + "[1518-05-18 00:31] falls asleep", + "[1518-05-28 00:26] wakes up", + "[1518-09-26 00:35] falls asleep", + "[1518-05-09 00:00] Guard #3347 begins shift", + "[1518-10-27 00:28] falls asleep", + "[1518-04-25 00:38] falls asleep", + "[1518-11-01 00:15] wakes up", + "[1518-10-27 00:05] falls asleep", + "[1518-05-26 00:48] wakes up", + "[1518-09-25 00:49] wakes up", + "[1518-05-21 00:44] falls asleep", + "[1518-05-11 23:59] Guard #2137 begins shift", + "[1518-11-02 23:58] Guard #829 begins shift", + "[1518-04-29 00:37] wakes up", + "[1518-07-22 00:22] wakes up", + "[1518-03-29 00:10] wakes up", + "[1518-06-05 00:02] Guard #2389 begins shift", + "[1518-10-31 00:43] wakes up", + "[1518-05-03 00:43] falls asleep", + "[1518-05-18 00:57] wakes up", + "[1518-06-14 00:52] wakes up", + "[1518-07-10 00:27] falls asleep", + "[1518-05-17 00:13] wakes up", + "[1518-06-24 00:36] falls asleep", + "[1518-08-02 00:21] falls asleep", + "[1518-08-31 00:49] wakes up", + "[1518-09-09 00:09] falls asleep", + "[1518-08-23 00:26] wakes up", + "[1518-06-03 00:56] wakes up", + "[1518-07-24 23:57] Guard #3371 begins shift", + "[1518-07-16 00:45] wakes up", + "[1518-08-17 00:27] falls asleep", + "[1518-10-22 00:46] wakes up", + "[1518-04-12 00:22] wakes up", + "[1518-05-04 00:56] wakes up", + "[1518-10-17 00:53] wakes up", + "[1518-04-10 00:45] wakes up", + "[1518-06-29 00:34] wakes up", + "[1518-09-05 00:46] wakes up", + "[1518-04-13 00:18] falls asleep", + "[1518-07-27 00:24] wakes up", + "[1518-08-29 00:44] falls asleep", + "[1518-10-19 00:54] wakes up", + "[1518-11-02 00:41] wakes up", + "[1518-07-11 00:33] falls asleep", + "[1518-09-15 00:57] falls asleep", + "[1518-07-28 00:49] wakes up", + "[1518-06-30 23:57] Guard #1283 begins shift", + "[1518-09-25 00:06] falls asleep", + "[1518-11-04 00:28] falls asleep", + "[1518-10-20 00:34] wakes up", + "[1518-10-24 00:38] wakes up", + "[1518-04-21 00:57] falls asleep", + "[1518-06-25 00:29] wakes up", + "[1518-05-16 23:51] Guard #3371 begins shift", + "[1518-06-24 00:21] falls asleep", + "[1518-07-17 00:47] wakes up", + "[1518-09-09 00:02] Guard #1283 begins shift", + "[1518-07-11 00:52] wakes up", + "[1518-07-16 00:28] falls asleep", + "[1518-09-30 00:52] wakes up", + "[1518-06-30 00:36] wakes up", + "[1518-04-20 00:06] falls asleep", + "[1518-08-14 00:33] falls asleep", + "[1518-10-18 00:00] Guard #241 begins shift", + "[1518-09-14 00:48] wakes up", + "[1518-10-02 00:06] falls asleep", + "[1518-05-31 00:57] wakes up", + "[1518-05-31 00:23] falls asleep", + "[1518-03-28 00:33] wakes up", + "[1518-11-20 23:56] Guard #1283 begins shift", + "[1518-03-31 00:50] wakes up", + "[1518-07-05 00:04] Guard #2213 begins shift", + "[1518-08-25 00:22] falls asleep", + "[1518-06-20 00:03] Guard #103 begins shift", + "[1518-03-29 00:20] falls asleep", + "[1518-06-27 00:12] falls asleep", + "[1518-04-09 23:56] Guard #631 begins shift", + "[1518-06-08 00:45] wakes up", + "[1518-09-15 00:54] wakes up", + "[1518-05-22 00:02] Guard #3347 begins shift", + "[1518-08-09 00:59] wakes up", + "[1518-04-26 23:58] Guard #829 begins shift", + "[1518-04-25 23:56] Guard #2251 begins shift", + "[1518-10-27 00:57] falls asleep", + "[1518-06-27 00:35] wakes up", + "[1518-06-03 00:51] falls asleep", + "[1518-10-06 00:14] wakes up", + "[1518-10-13 00:23] wakes up", + "[1518-09-22 00:39] wakes up", + "[1518-06-02 00:34] wakes up", + "[1518-09-10 00:34] wakes up", + "[1518-07-13 00:40] falls asleep", + "[1518-06-14 00:03] Guard #1283 begins shift", + "[1518-10-04 00:32] wakes up", + "[1518-07-23 00:09] falls asleep", + "[1518-06-27 00:03] Guard #2251 begins shift", + "[1518-07-27 00:31] falls asleep", + "[1518-07-03 00:49] wakes up", + "[1518-10-28 00:37] wakes up", + "[1518-08-11 00:00] falls asleep", + "[1518-06-26 00:19] falls asleep", + "[1518-03-27 00:03] Guard #2251 begins shift", + "[1518-05-03 00:57] wakes up", + "[1518-06-28 23:56] Guard #3347 begins shift", + "[1518-05-05 00:04] Guard #3347 begins shift", + "[1518-10-14 00:14] wakes up", + "[1518-09-11 00:57] wakes up", + "[1518-05-04 00:00] Guard #3319 begins shift", + "[1518-06-11 00:41] wakes up", + "[1518-04-29 00:50] wakes up", + "[1518-09-17 00:41] wakes up", + "[1518-05-10 00:57] falls asleep", + "[1518-09-03 00:32] wakes up", + "[1518-11-01 00:02] Guard #3371 begins shift", + "[1518-08-01 00:43] wakes up", + "[1518-04-16 00:23] falls asleep", + "[1518-05-05 00:27] falls asleep", + "[1518-07-12 00:52] wakes up", + "[1518-04-21 00:58] wakes up", + "[1518-06-05 00:47] falls asleep", + "[1518-07-30 00:59] wakes up", + "[1518-08-17 23:57] Guard #631 begins shift", + "[1518-04-10 00:33] falls asleep", + "[1518-08-29 00:51] wakes up", + "[1518-06-02 00:56] falls asleep", + "[1518-06-28 00:43] wakes up", + "[1518-07-26 00:55] wakes up", + "[1518-07-12 23:59] Guard #1283 begins shift", + "[1518-07-05 00:53] wakes up", + "[1518-07-04 00:10] falls asleep", + "[1518-04-06 23:56] Guard #2137 begins shift", + "[1518-11-22 00:25] wakes up", + "[1518-08-15 00:52] wakes up", + "[1518-08-04 00:38] falls asleep", + "[1518-09-12 00:00] Guard #103 begins shift", + "[1518-11-10 00:50] wakes up", + "[1518-07-02 23:52] Guard #631 begins shift", + "[1518-05-25 23:46] Guard #631 begins shift", + "[1518-11-03 00:50] wakes up", + "[1518-06-10 23:50] Guard #439 begins shift", + "[1518-05-02 23:58] Guard #2539 begins shift", + "[1518-09-01 00:29] falls asleep", + "[1518-04-12 00:32] falls asleep", + "[1518-07-07 00:02] Guard #3371 begins shift", + "[1518-07-30 00:04] Guard #2129 begins shift", + "[1518-08-29 00:57] falls asleep", + "[1518-09-14 00:00] Guard #2213 begins shift", + "[1518-09-24 00:43] falls asleep", + "[1518-11-16 00:57] wakes up", + "[1518-05-04 00:53] falls asleep", + "[1518-09-29 00:34] falls asleep", + "[1518-09-03 00:24] falls asleep", + "[1518-11-16 00:06] falls asleep", + "[1518-08-04 00:59] wakes up", + "[1518-04-28 00:07] falls asleep", + "[1518-10-03 00:54] wakes up", + "[1518-10-08 00:27] falls asleep", + "[1518-03-27 00:57] wakes up", + "[1518-05-01 00:53] wakes up", + "[1518-06-20 23:59] Guard #1319 begins shift", + "[1518-04-08 00:02] Guard #1889 begins shift", + "[1518-06-23 23:59] Guard #241 begins shift", + "[1518-11-22 00:14] falls asleep", + "[1518-09-02 00:11] falls asleep", + "[1518-11-21 00:42] wakes up", + "[1518-08-19 23:47] Guard #1889 begins shift", + "[1518-04-07 00:45] falls asleep", + "[1518-08-25 00:15] wakes up", + "[1518-08-25 23:57] Guard #829 begins shift", + "[1518-08-10 23:47] Guard #1213 begins shift", + "[1518-09-16 00:09] falls asleep", + "[1518-07-18 00:18] falls asleep", + "[1518-10-26 00:01] Guard #829 begins shift", + "[1518-07-14 00:35] falls asleep", + "[1518-11-03 00:40] falls asleep", + "[1518-09-18 00:56] wakes up", + "[1518-10-31 00:10] falls asleep", + "[1518-08-28 00:56] wakes up", + "[1518-05-01 00:07] falls asleep", + "[1518-10-06 00:02] Guard #3347 begins shift", + "[1518-04-10 00:11] falls asleep", + "[1518-05-08 00:58] wakes up", + "[1518-07-24 00:24] wakes up", + "[1518-08-29 00:59] wakes up", + "[1518-06-29 00:39] falls asleep", + "[1518-06-13 00:52] falls asleep", + "[1518-06-28 00:17] falls asleep", + "[1518-07-29 00:07] falls asleep", + "[1518-06-16 00:43] wakes up", + "[1518-04-22 00:01] Guard #2777 begins shift", + "[1518-04-08 00:16] falls asleep", + "[1518-06-13 00:59] wakes up", + "[1518-06-01 00:35] wakes up", + "[1518-05-29 00:35] falls asleep", + "[1518-06-19 00:59] wakes up", + "[1518-09-13 00:33] falls asleep", + "[1518-09-28 00:31] wakes up", + "[1518-06-07 00:00] Guard #3319 begins shift", + "[1518-06-13 00:00] Guard #3347 begins shift", + "[1518-05-09 00:48] wakes up", + "[1518-05-10 00:32] wakes up", + "[1518-10-23 00:03] Guard #103 begins shift", + "[1518-10-13 00:17] falls asleep", + "[1518-07-17 23:59] Guard #1319 begins shift", + "[1518-06-04 00:38] falls asleep", + "[1518-09-24 00:53] wakes up", + "[1518-08-29 00:03] Guard #1889 begins shift", + "[1518-08-12 00:27] falls asleep", + "[1518-04-26 00:56] wakes up", + "[1518-07-02 00:32] wakes up", + "[1518-10-20 00:56] falls asleep", + "[1518-09-13 00:50] wakes up", + "[1518-08-31 00:33] falls asleep", + "[1518-07-08 00:39] falls asleep", + "[1518-10-26 00:24] wakes up", + "[1518-05-27 00:24] falls asleep", + "[1518-05-15 00:54] falls asleep", + "[1518-05-10 00:16] falls asleep", + "[1518-04-19 00:03] Guard #1319 begins shift", + "[1518-06-09 00:55] falls asleep", + "[1518-06-26 00:00] Guard #1319 begins shift", + "[1518-03-28 00:54] wakes up", + "[1518-05-09 00:46] falls asleep", + "[1518-11-04 00:33] wakes up", + "[1518-07-12 00:26] falls asleep", + "[1518-04-17 00:37] wakes up", + "[1518-05-06 00:56] wakes up", + "[1518-05-03 00:34] wakes up", + "[1518-04-02 00:10] wakes up", + "[1518-06-10 00:54] wakes up", + "[1518-03-31 00:29] falls asleep", + "[1518-07-22 00:39] falls asleep", + "[1518-09-14 00:52] falls asleep", + "[1518-05-05 00:17] falls asleep", + "[1518-06-08 00:00] Guard #2389 begins shift", + "[1518-07-13 00:59] wakes up", + "[1518-10-08 00:03] Guard #2251 begins shift", + "[1518-07-08 00:40] wakes up", + "[1518-05-14 00:39] wakes up", + "[1518-07-25 00:33] falls asleep", + "[1518-08-09 00:48] wakes up", + "[1518-11-12 00:01] falls asleep", + "[1518-08-11 00:26] wakes up", + "[1518-05-27 00:02] Guard #1283 begins shift", + "[1518-10-29 00:36] wakes up", + "[1518-11-14 00:43] wakes up", + "[1518-08-08 00:21] falls asleep", + "[1518-10-01 00:04] Guard #829 begins shift", + "[1518-11-12 00:56] falls asleep", + "[1518-05-12 00:52] falls asleep", + "[1518-04-29 00:01] Guard #1777 begins shift", + "[1518-08-13 00:31] falls asleep", + "[1518-05-07 00:48] falls asleep", + "[1518-04-05 00:59] wakes up", + "[1518-10-31 00:04] Guard #3319 begins shift", + "[1518-10-13 00:49] wakes up", + "[1518-05-14 00:19] wakes up", + "[1518-10-20 00:57] wakes up", + "[1518-09-27 00:57] wakes up", + "[1518-09-11 00:56] falls asleep", + "[1518-05-03 00:23] falls asleep", + "[1518-05-12 00:58] wakes up", + "[1518-10-08 00:54] wakes up", + "[1518-09-26 23:48] Guard #1213 begins shift", + "[1518-08-14 00:48] wakes up", + "[1518-05-21 00:50] wakes up", + "[1518-10-19 00:01] Guard #3371 begins shift", + "[1518-11-09 23:58] Guard #241 begins shift", + "[1518-10-18 00:42] wakes up", + "[1518-11-05 23:59] Guard #3347 begins shift", + "[1518-07-13 23:59] Guard #2137 begins shift", + "[1518-11-22 00:46] wakes up", + "[1518-11-17 00:31] falls asleep", + "[1518-06-15 00:40] falls asleep", + "[1518-11-09 00:09] falls asleep", + "[1518-09-10 00:07] falls asleep", + "[1518-05-15 00:19] falls asleep", + "[1518-09-23 00:50] wakes up", + "[1518-06-10 00:52] falls asleep", + "[1518-10-07 00:39] falls asleep", + "[1518-09-22 00:36] falls asleep", + "[1518-05-24 00:12] falls asleep", + "[1518-08-03 00:00] Guard #1319 begins shift", + "[1518-06-30 00:24] falls asleep", + "[1518-04-17 00:31] falls asleep", + "[1518-06-15 00:00] Guard #1777 begins shift", + "[1518-05-10 00:51] falls asleep", + "[1518-06-07 00:32] falls asleep", + "[1518-07-31 00:04] Guard #1213 begins shift", + "[1518-10-30 00:03] Guard #2251 begins shift", + "[1518-09-28 00:46] falls asleep", + "[1518-08-10 00:41] falls asleep", + "[1518-06-23 00:49] wakes up", + "[1518-04-13 00:47] wakes up", + "[1518-05-21 00:04] Guard #241 begins shift", + "[1518-05-19 00:19] falls asleep", + "[1518-04-24 00:39] falls asleep", + "[1518-05-15 23:56] Guard #1777 begins shift", + "[1518-08-09 00:15] falls asleep", + "[1518-04-03 00:10] wakes up", + "[1518-06-03 00:07] falls asleep", + "[1518-08-31 00:01] Guard #1213 begins shift", + "[1518-09-06 00:00] Guard #631 begins shift", + "[1518-11-05 00:01] Guard #439 begins shift", + "[1518-09-19 00:53] falls asleep", + "[1518-06-17 00:39] wakes up", + "[1518-08-27 00:55] wakes up", + "[1518-10-23 00:12] falls asleep", + "[1518-08-05 00:40] falls asleep", + "[1518-10-13 00:26] falls asleep", + "[1518-04-28 00:03] Guard #1889 begins shift", + "[1518-08-19 00:01] Guard #2903 begins shift", + "[1518-05-15 00:26] wakes up", + "[1518-06-05 00:37] wakes up", + "[1518-07-15 00:55] wakes up", + "[1518-09-17 00:56] wakes up", + "[1518-06-21 00:29] falls asleep", + "[1518-09-20 23:59] Guard #241 begins shift", + "[1518-04-04 00:26] wakes up", + "[1518-10-21 23:49] Guard #241 begins shift", + "[1518-09-06 00:15] falls asleep", + "[1518-09-19 00:33] wakes up", + "[1518-09-23 00:37] falls asleep", + "[1518-09-19 00:55] wakes up", + "[1518-04-02 00:08] falls asleep", + "[1518-07-06 00:00] Guard #2903 begins shift", + "[1518-07-13 00:57] falls asleep", + "[1518-05-23 00:00] Guard #3371 begins shift", + "[1518-10-02 23:58] Guard #2389 begins shift", + "[1518-06-24 00:30] wakes up", + "[1518-10-16 00:07] falls asleep", + "[1518-09-17 00:30] falls asleep", + "[1518-08-28 00:34] wakes up", + "[1518-07-19 00:24] falls asleep", + "[1518-05-31 23:57] Guard #3319 begins shift", + "[1518-05-01 00:00] Guard #1889 begins shift", + "[1518-03-30 00:56] falls asleep", + "[1518-10-19 23:57] Guard #1889 begins shift", + "[1518-08-26 23:56] Guard #2389 begins shift", + "[1518-07-26 00:00] Guard #2389 begins shift", + "[1518-07-19 00:00] Guard #2903 begins shift", + "[1518-11-08 00:53] falls asleep", + "[1518-09-14 23:48] Guard #3319 begins shift", + "[1518-10-03 23:58] Guard #829 begins shift", + "[1518-11-22 00:02] Guard #3347 begins shift", + "[1518-10-21 00:42] falls asleep", + "[1518-11-15 00:04] falls asleep", + "[1518-08-25 00:11] falls asleep", + "[1518-05-02 00:35] wakes up", + "[1518-10-25 00:37] falls asleep", + "[1518-11-11 23:48] Guard #103 begins shift", + "[1518-10-08 23:53] Guard #631 begins shift", + "[1518-10-23 00:38] falls asleep", + "[1518-07-16 00:34] falls asleep", + "[1518-11-05 00:41] falls asleep", + "[1518-10-31 00:41] falls asleep", + "[1518-11-09 00:04] Guard #1777 begins shift", + "[1518-06-18 00:55] wakes up", + "[1518-04-14 00:18] falls asleep", + "[1518-06-21 23:58] Guard #1777 begins shift", + "[1518-04-18 00:17] wakes up", + "[1518-04-06 00:21] falls asleep", + "[1518-10-05 00:57] wakes up", + "[1518-05-29 23:58] Guard #2389 begins shift", + "[1518-06-18 00:46] falls asleep", + "[1518-07-27 00:18] falls asleep", + "[1518-08-04 00:25] wakes up", + "[1518-06-12 00:25] falls asleep", + "[1518-04-16 00:55] wakes up", + "[1518-06-01 00:42] falls asleep", + "[1518-04-16 00:33] falls asleep", + "[1518-04-24 23:57] Guard #2389 begins shift", + "[1518-09-19 00:09] falls asleep", + "[1518-10-14 00:58] wakes up", + "[1518-09-16 00:53] wakes up", + "[1518-06-20 00:26] falls asleep", + "[1518-09-10 00:57] wakes up", + "[1518-06-16 23:50] Guard #829 begins shift", + "[1518-10-11 00:33] falls asleep", + "[1518-08-17 00:53] wakes up", + "[1518-08-12 00:03] Guard #1889 begins shift", + "[1518-05-05 23:59] Guard #2129 begins shift", + "[1518-10-23 00:49] wakes up", + "[1518-10-24 00:43] falls asleep", + "[1518-05-10 00:59] wakes up", + "[1518-04-11 00:57] falls asleep", + "[1518-06-15 00:35] wakes up", + "[1518-08-15 00:00] Guard #1777 begins shift", + "[1518-08-10 00:12] falls asleep", + "[1518-07-01 23:52] Guard #439 begins shift", + "[1518-06-26 00:57] wakes up", + "[1518-11-23 00:35] wakes up", + "[1518-11-05 00:51] wakes up", + "[1518-04-04 23:54] Guard #2389 begins shift", + "[1518-11-14 23:47] Guard #2903 begins shift", + "[1518-04-11 00:50] wakes up", + "[1518-10-26 00:11] falls asleep", + "[1518-09-06 00:56] wakes up", + "[1518-05-22 00:55] wakes up", + "[1518-06-28 00:56] wakes up", + "[1518-05-24 00:56] wakes up", + "[1518-08-11 00:46] falls asleep", + "[1518-06-30 00:56] wakes up", + "[1518-06-16 00:57] wakes up", + "[1518-09-27 00:46] falls asleep", + "[1518-06-01 00:11] falls asleep", + "[1518-04-12 00:07] falls asleep", + "[1518-08-04 00:14] falls asleep", + "[1518-07-22 00:34] falls asleep", + "[1518-08-07 00:47] falls asleep", + "[1518-08-29 23:59] Guard #829 begins shift", + "[1518-11-19 00:19] falls asleep", + "[1518-03-30 00:01] Guard #3347 begins shift", + "[1518-09-15 00:19] wakes up", + "[1518-08-18 00:55] falls asleep", + "[1518-10-01 00:45] wakes up", + "[1518-10-29 00:48] falls asleep", + "[1518-10-21 00:27] wakes up", + "[1518-07-03 23:56] Guard #1777 begins shift", + "[1518-08-06 23:59] Guard #241 begins shift", + "[1518-10-08 00:22] wakes up", + "[1518-09-22 00:52] falls asleep", + "[1518-06-23 00:03] Guard #241 begins shift", + "[1518-11-20 00:57] wakes up", + "[1518-03-27 23:58] Guard #3319 begins shift", + "[1518-09-25 00:56] falls asleep", + "[1518-06-06 00:52] falls asleep", + "[1518-09-03 23:49] Guard #2137 begins shift", + "[1518-08-30 00:39] wakes up", + "[1518-11-12 00:59] wakes up", + "[1518-10-23 00:25] wakes up", + "[1518-07-24 00:01] Guard #439 begins shift", + "[1518-04-12 00:52] falls asleep", + "[1518-11-23 00:59] wakes up", + "[1518-11-09 00:37] wakes up", + "[1518-11-22 23:57] Guard #1889 begins shift", + "[1518-05-11 00:27] falls asleep", + "[1518-09-02 00:03] Guard #3371 begins shift", + "[1518-10-16 00:03] Guard #3319 begins shift", + "[1518-05-18 23:56] Guard #3319 begins shift", + "[1518-09-13 00:02] Guard #1319 begins shift", + "[1518-11-10 00:40] falls asleep", + "[1518-05-13 23:56] Guard #1213 begins shift", + "[1518-09-25 00:59] wakes up", + "[1518-07-01 00:47] wakes up", + "[1518-10-17 00:13] falls asleep", + "[1518-10-12 00:31] wakes up", + "[1518-09-24 00:03] Guard #2137 begins shift", + "[1518-10-11 00:35] wakes up", + "[1518-07-10 00:59] wakes up" +] \ No newline at end of file diff --git a/day4.spec.js b/day4.spec.js new file mode 100644 index 0000000..3dbd860 --- /dev/null +++ b/day4.spec.js @@ -0,0 +1,131 @@ +'use strict' + +/* global describe, it, expect */ + +const samples = [ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:05] falls asleep', + '[1518-11-01 00:25] wakes up', + '[1518-11-01 00:30] falls asleep', + '[1518-11-01 00:55] wakes up', + '[1518-11-01 23:58] Guard #99 begins shift', + '[1518-11-02 00:40] falls asleep', + '[1518-11-02 00:50] wakes up', + '[1518-11-03 00:05] Guard #10 begins shift', + '[1518-11-03 00:24] falls asleep', + '[1518-11-03 00:29] wakes up', + '[1518-11-04 00:02] Guard #99 begins shift', + '[1518-11-04 00:36] falls asleep', + '[1518-11-04 00:46] wakes up', + '[1518-11-05 00:03] Guard #99 begins shift', + '[1518-11-05 00:45] falls asleep', + '[1518-11-05 00:55] wakes up' +] + +const input = require('./day4.json') +const dateRx = /^\[(?[0-9]+)-(?[0-9]+)-(?[0-9]+) (?[0-9]+):(?[0-9]+)\]/ +const guardReport = logs => { + const report = logs.sort().reduce((guardLog, entry) => { + if (/Guard #[0-9]+ begins shift/.test(entry)) { + guardLog.activeGuard = +entry.match(/Guard #([0-9]+) begins shift/)[1] + } + if (/falls asleep/.test(entry)) { + const { groups: { minutes } } = entry.match(dateRx) + guardLog.start = +minutes + } + if (/wakes up/.test(entry)) { + const { groups: { minutes } } = entry.match(dateRx) + const end = +minutes + const sleepMinutes = end - guardLog.start + if (!guardLog.guards[guardLog.activeGuard]) { + guardLog.guards[guardLog.activeGuard] = { + sleepMinutes, + asleepAt: [] + } + } else { + guardLog.guards[guardLog.activeGuard].sleepMinutes += sleepMinutes + } + for (let i = guardLog.start; i < end; i++) { + if (guardLog.guards[guardLog.activeGuard].asleepAt[i]) { + guardLog.guards[guardLog.activeGuard].asleepAt[i] += 1 + } else { + guardLog.guards[guardLog.activeGuard].asleepAt[i] = 1 + } + } + } + return guardLog + }, { guards: {} }) + return report.guards +} + +const findSleepyGuard = guards => { + const guardSleeps = Object.keys(guards).map(k => ({ + id: k, + sleepMinutes: guards[k].sleepMinutes, + })) + const mostASleep = guardSleeps.sort(({ sleepMinutes: m1 }, { sleepMinutes: m2 }) => m2 - m1) + const id = +mostASleep[0].id + let highestMinute = 0 + let highestCount = 0 + for (let minute = 0; minute < 60; minute++) { + const count = guards[id].asleepAt[minute] + if (count > highestCount) { + highestCount = count + highestMinute = minute + } + } + return { + mostASleep: id, + highestMinute + } +} + +describe('find the sleepy guard', () => { + it('report the log', () => { + expect(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:02] wakes up', + ])).toEqual({ '10': { 'asleepAt': [undefined, 1], 'sleepMinutes': 1 } }) + expect(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:03] wakes up', + ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 1], 'sleepMinutes': 2 } }) + expect(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:03] wakes up', + '[1518-11-01 00:05] falls asleep', + '[1518-11-01 00:07] wakes up', + ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 1, undefined, undefined, 1, 1], 'sleepMinutes': 4 } }) + expect(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:03] wakes up', + '[1518-11-02 00:00] Guard #10 begins shift', + '[1518-11-02 00:02] falls asleep', + '[1518-11-02 00:03] wakes up', + ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 2], 'sleepMinutes': 3 } }) + }) + it('should find the sleepy guard', () => { + expect(findSleepyGuard(guardReport(samples))).toEqual({ mostASleep: 10, highestMinute: 24 }) + expect(findSleepyGuard(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:02] wakes up', + ]))).toEqual({ mostASleep: 10, highestMinute: 1 }) + + expect(findSleepyGuard(guardReport([ + '[1518-11-01 00:00] Guard #10 begins shift', + '[1518-11-01 00:01] falls asleep', + '[1518-11-01 00:03] wakes up', + '[1518-11-02 00:00] Guard #10 begins shift', + '[1518-11-02 00:02] falls asleep', + '[1518-11-02 00:03] wakes up', + ]))).toEqual({ mostASleep: 10, highestMinute: 2 }) + }) + it('should calculate the solution', () => { + expect(findSleepyGuard(guardReport(input))).toEqual({ mostASleep: 1777, highestMinute: 48 }) + }) +}) \ No newline at end of file From 94bac59f30c873c92152121ad7476c4dcd9b39fd Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 4 Dec 2018 23:48:39 +0100 Subject: [PATCH 18/56] feat: day 4 part 2 --- day4.spec.js | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/day4.spec.js b/day4.spec.js index 3dbd860..2e2e07c 100644 --- a/day4.spec.js +++ b/day4.spec.js @@ -61,7 +61,7 @@ const guardReport = logs => { const findSleepyGuard = guards => { const guardSleeps = Object.keys(guards).map(k => ({ id: k, - sleepMinutes: guards[k].sleepMinutes, + sleepMinutes: guards[k].sleepMinutes })) const mostASleep = guardSleeps.sort(({ sleepMinutes: m1 }, { sleepMinutes: m2 }) => m2 - m1) const id = +mostASleep[0].id @@ -80,24 +80,44 @@ const findSleepyGuard = guards => { } } +const findFrequentGuard = guards => { + const guardSleeps = Object.keys(guards).map(k => ({ + id: k, + asleepAt: guards[k].asleepAt.reduce((freq, count, minute) => { + if (count > freq.count) { + freq.count = count + freq.minute = minute + } + return freq + }, { minute: 0, count: 0 }) + })) + const mostFrequent = guardSleeps.sort(({ asleepAt: a1 }, { asleepAt: a2 }) => a2.count - a1.count) + const id = +mostFrequent[0].id + const highestMinute = +mostFrequent[0].asleepAt.minute + return { + mostFrequent: id, + highestMinute + } +} + describe('find the sleepy guard', () => { it('report the log', () => { expect(guardReport([ '[1518-11-01 00:00] Guard #10 begins shift', '[1518-11-01 00:01] falls asleep', - '[1518-11-01 00:02] wakes up', + '[1518-11-01 00:02] wakes up' ])).toEqual({ '10': { 'asleepAt': [undefined, 1], 'sleepMinutes': 1 } }) expect(guardReport([ '[1518-11-01 00:00] Guard #10 begins shift', '[1518-11-01 00:01] falls asleep', - '[1518-11-01 00:03] wakes up', + '[1518-11-01 00:03] wakes up' ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 1], 'sleepMinutes': 2 } }) expect(guardReport([ '[1518-11-01 00:00] Guard #10 begins shift', '[1518-11-01 00:01] falls asleep', '[1518-11-01 00:03] wakes up', '[1518-11-01 00:05] falls asleep', - '[1518-11-01 00:07] wakes up', + '[1518-11-01 00:07] wakes up' ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 1, undefined, undefined, 1, 1], 'sleepMinutes': 4 } }) expect(guardReport([ '[1518-11-01 00:00] Guard #10 begins shift', @@ -105,7 +125,7 @@ describe('find the sleepy guard', () => { '[1518-11-01 00:03] wakes up', '[1518-11-02 00:00] Guard #10 begins shift', '[1518-11-02 00:02] falls asleep', - '[1518-11-02 00:03] wakes up', + '[1518-11-02 00:03] wakes up' ])).toEqual({ '10': { 'asleepAt': [undefined, 1, 2], 'sleepMinutes': 3 } }) }) it('should find the sleepy guard', () => { @@ -113,7 +133,7 @@ describe('find the sleepy guard', () => { expect(findSleepyGuard(guardReport([ '[1518-11-01 00:00] Guard #10 begins shift', '[1518-11-01 00:01] falls asleep', - '[1518-11-01 00:02] wakes up', + '[1518-11-01 00:02] wakes up' ]))).toEqual({ mostASleep: 10, highestMinute: 1 }) expect(findSleepyGuard(guardReport([ @@ -122,10 +142,19 @@ describe('find the sleepy guard', () => { '[1518-11-01 00:03] wakes up', '[1518-11-02 00:00] Guard #10 begins shift', '[1518-11-02 00:02] falls asleep', - '[1518-11-02 00:03] wakes up', + '[1518-11-02 00:03] wakes up' ]))).toEqual({ mostASleep: 10, highestMinute: 2 }) }) it('should calculate the solution', () => { expect(findSleepyGuard(guardReport(input))).toEqual({ mostASleep: 1777, highestMinute: 48 }) }) -}) \ No newline at end of file +}) + +describe('find most frequent sleeper', () => { + it('should find them in the example', () => { + expect(findFrequentGuard(guardReport(samples))).toEqual({ mostFrequent: 99, highestMinute: 45 }) + }) + it('should calculate the solution', () => { + expect(findFrequentGuard(guardReport(input))).toEqual({ mostFrequent: 1889, highestMinute: 31 }) + }) +}) From 012620e6889f01e4ecf070aee27e4bf2f023ce75 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 6 Dec 2018 01:05:27 +0100 Subject: [PATCH 19/56] test: day 5 part 1 --- day5.spec.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 day5.spec.js diff --git a/day5.spec.js b/day5.spec.js new file mode 100644 index 0000000..2c58b40 --- /dev/null +++ b/day5.spec.js @@ -0,0 +1,60 @@ +'use strict' + +/* global describe, it, expect */ + +const reactUnits = (a, b) => { + if (a === b) return false + if (b === a.toUpperCase()) return true + if (a === b.toUpperCase()) return true + return false +} +const reactions = input => { + let output = input + for (let start = 0; start < input.length - 1; start++) { + const end = chainReaction(output, start) + if (end && start !== end) { + const o = output.slice(0, start) + output.slice(end + 1, output.length) + return reactions(o) + } + } + return output +} + +const chainReaction = (input, start, end = start + 1) => { + if (input[end] === undefined) return start + if (reactUnits(input[start], input[end])) { + /* + let next = chainReaction(input, end, end + 1) + if (next) return next + */ + return end + } + return false +} + +describe('reactions', () => { + it('should destroy aA', () => { + expect(reactions('aA')).toEqual('') + }) + it('should pass the example', () => { + expect(reactions('dabAcCaCBAcCcaDA')).toEqual('dabCBAcaDA') + }) +}) + +describe('reactUnits', () => { + it('should destroy aA', () => { + expect(reactUnits('a', 'A')).toEqual(true) + }) + it('should destroy Aa', () => { + expect(reactUnits('A', 'a')).toEqual(true) + }) + it('should not destroy AA', () => { + expect(reactUnits('A', 'A')).toEqual(false) + }) + it('should not destroy aa', () => { + expect(reactUnits('a', 'a')).toEqual(false) + }) + it('should not destroy Ab', () => { + expect(reactUnits('A', 'b')).toEqual(false) + }) +}) From 2a72cfea0b9ec6a53b516839b891d9a4d0694bf6 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 6 Dec 2018 01:40:41 +0100 Subject: [PATCH 20/56] day 5 step 2 --- day5.spec.js | 55 ++++++++++++++++++++++++++++++++++++---------------- polymer.txt | 1 + 2 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 polymer.txt diff --git a/day5.spec.js b/day5.spec.js index 2c58b40..0243019 100644 --- a/day5.spec.js +++ b/day5.spec.js @@ -2,34 +2,43 @@ /* global describe, it, expect */ +const { readFileSync } = require('fs') + +const polymer = readFileSync('./polymer.txt', 'utf-8') + const reactUnits = (a, b) => { if (a === b) return false if (b === a.toUpperCase()) return true - if (a === b.toUpperCase()) return true - return false + return a === b.toUpperCase() } const reactions = input => { let output = input - for (let start = 0; start < input.length - 1; start++) { - const end = chainReaction(output, start) - if (end && start !== end) { - const o = output.slice(0, start) + output.slice(end + 1, output.length) - return reactions(o) + let reacted + do { + reacted = false + for (let start = 0; start < output.length - 1; start++) { + const react = reactUnits(output[start], output[start + 1]) + if (react) { + output = output.slice(0, start) + output.slice(start + 2, output.length) + reacted = true + break + } } - } + } while (reacted) return output } -const chainReaction = (input, start, end = start + 1) => { - if (input[end] === undefined) return start - if (reactUnits(input[start], input[end])) { - /* - let next = chainReaction(input, end, end + 1) - if (next) return next - */ - return end +const multipassReactions = input => { + let best = input + for (let i = 65; i < 91; i++) { + const c = String.fromCharCode(i) + console.log(c) + const r = reactions(input.replace(new RegExp(c, 'ig'), '')) + if (r.length < best.length) { + best = r + } } - return false + return best } describe('reactions', () => { @@ -39,6 +48,18 @@ describe('reactions', () => { it('should pass the example', () => { expect(reactions('dabAcCaCBAcCcaDA')).toEqual('dabCBAcaDA') }) + it('should calculate the solution', () => { + expect(reactions(polymer)).toHaveLength(11636) + }) +}) + +describe('shortest', () => { + it('should pass the example', () => { + expect(multipassReactions('dabAcCaCBAcCcaDA')).toEqual('daDA') + }) + it.only('should calculate the solution', () => { + expect(multipassReactions(polymer)).toHaveLength(11636) + }) }) describe('reactUnits', () => { diff --git a/polymer.txt b/polymer.txt new file mode 100644 index 0000000..f60f525 --- /dev/null +++ b/polymer.txt @@ -0,0 +1 @@ +ZzNnMYytTtfFTINnkKimYUOouyPpvVokKZzqQQqTtMmmIiMjJryYvVRztJjiIfFyGbBgYTgGLfFHhlsysSYoOsSiIfpPFcCrRVvbeEuUAXxaOotTQqbBEieEIeBNnlLpPvVMmfHhFjuUXxJmMmMwWvxiIXVqQaJjApPrbgGBDdMmZzAeEGgUoOuaQqronNHhNnjJuUUukKOOoRVUCcuqQKkvTtAaMIimlLTtkKCczbqQaAgGIioOWwQqANnaBrRTnhHNlLtbKkBRfFjJsSPpxXrzZJjmMuVvUbBMmIiZZMmCDdeEjJhHMBbPgGpqQmmMuUDgGfaAFRrGgdcrRyYEeZzWICcibBYKkywcCIIuUigGioUHhuOeXxHheEGgVvEiIIiqQvVrRRrmhHMslLdVvgGbBDSVvzZpPkKHWwHhhSYyCcsCcMaAChHVvDhTtWZzUVJjvuwHvwgGWVSpPskKxlLXdcSrRswWaABKkDdbPLlpdDFQAaWwFSsEeTtJjfGgAaoyYOqFffFfMmBGTeEtggBAabGYybUuCzRrdDZcUuJsSvVuUjmlIgGMmHNnpPEejJhAxnNXaxXWwTtAFfaisEewWSxXLjbBbBJaAbIixXMJjUCTtIiKkUuOocuKaUuAYFqQflLOAVvaoWwbByLGglXxdDkNuUnJjMmsSpPRrXyuUhHMmYxIiFxXrQoOqgmMbBGgGJjJuUjvVvVcTtHhZWIiwjJJjDdzNEenGiICcgeUuEMtTqQEHheHhjLzZlJwWmcCIiPjJTtTepPEtMaAmaApXxHvVEekKpPhTrtTRtkKbTtBRrZylmMlbBLLqQYtTzTCcnNthHgGnSsiIHtKkLzZlRrTjPpJKmMkwWhMUDdVvggGGuyYOjhHeEJkKorQxXzZzZQqqcQqCSsBbRBRQqfFrRXxfOorRCckKtGgZzcCTFHhvqKZzxXkQdDbrRYylLIiaAeEB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IRHhpPSdDIiliXxILvkKVxXvmMuUVqFfQwWtBbTZXxjJDdAawWmIinpmMjJyYPNHhhHTtKnNthHHhTwWzZkRYyYyEuUuUJjaAyYerlLzZMYyqOoKkAAarRaQdDtMmJjCoOcmLlMTEJjnSssSAcCArRtTzZBnTtNmMzZhHbvXPpxyWwYcCzZTZztaAOoVMmaaVFhHeEjCcJfjNnWwZBbznDdCcNJiIkbBKWwDZzHhYydHhvwWsSMmxXoLllLYyOYyNeCNncqQEeSqQsCcO \ No newline at end of file From 1308077e2fdbff7eab69b48206a505cf5dbcf948 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 7 Dec 2018 20:23:24 +0100 Subject: [PATCH 21/56] WIP: day6. --- day6.spec.js | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 4 +- 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 day6.spec.js diff --git a/day6.spec.js b/day6.spec.js new file mode 100644 index 0000000..e0aa7f0 --- /dev/null +++ b/day6.spec.js @@ -0,0 +1,208 @@ +'use strict' + +/* global describe, it, expect */ + +const distance = ([y1, x1], [y2, x2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + +const makeMap = coordinates => { + const [maxX, maxY] = [ + coordinates.reduce((max, [_, x]) => { + if (x > max) return x + return max + }, 0), + coordinates.reduce((max, [y]) => { + if (y > max) return y + return max + }, 0) + ] + const map = [] + for (let y = 0; y <= maxY; y++) { + map[y] = [] + for (let x = 0; x <= maxX; x++) { + map[y][x] = 0 + } + } + + coordinates.forEach(([y, x], idx) => { + map[y][x] = idx + 1 + }) + return map +} + +const makeAreas = coordinates => { + const map = makeMap(coordinates) + for (let y = 0; y < map.length; y++) { + for (let x = 0; x < map[0].length; x++) { + const distances = coordinates.reduce((distances, [cy, cx], i) => { + const d = distance([y, x], [cy, cx]) + if (!distances[d]) { + distances[d] = [i] + } else { + distances[d].push(i) + } + return distances + }, {}) + const minDistance = Object.keys(distances).sort((d1, d2) => d1 - d2)[0] + if (distances[minDistance].length === 1) { + map[y][x] = distances[minDistance][0] + 1 + } + } + } + return map +} + +const maxArea = coordinates => { + const areas = makeAreas(coordinates) + const countPerCoordinate = { + + } + for (let y = 0; y < areas.length; y++) { + for (let x = 0; x < areas[0].length; x++) { + if (!countPerCoordinate[areas[y][x]]) { + countPerCoordinate[areas[y][x]] = 1 + } else { + countPerCoordinate[areas[y][x]]++ + } + } + } + return countPerCoordinate[Object.keys(countPerCoordinate).sort((c1, c2) => countPerCoordinate[c2] - countPerCoordinate[c1])[0]] +} + +describe('Manhattan Distance', () => { + it('should calculate the manhatten distance', () => { + expect(distance([0, 0], [0, 0])).toEqual(0) + expect(distance([0, 0], [1, 1])).toEqual(2) + expect(distance([0, 0], [-1, -1])).toEqual(2) + }) +}) + +describe('map coordinats', () => { + it('should make a map with all coordinates', () => { + expect(makeMap([ + [1, 1] + ])).toEqual([ + [0, 0], + [0, 1] + ]) + expect(makeMap([ + [1, 1], + [2, 2] + ])).toEqual([ + [0, 0, 0], + [0, 1, 0], + [0, 0, 2] + ]) + expect(makeMap([ + [1, 1], + [1, 6], + [8, 3], + [3, 4], + [5, 5], + [8, 9] + ])).toEqual([ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0, 2, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 4, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 5, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 3, 0, 0, 0, 0, 0, 6] + ]) + }) +}) + +describe('make areas', () => { + it('should measure distance', () => { + expect(makeAreas([ + [1, 1] + ])).toEqual([ + [1, 1], + [1, 1] + ]) + expect(makeMap([ + [0, 0], + [3, 3] + ])).toEqual([ + [1, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 0], + [0, 0, 0, 2] + ]) + expect(makeAreas([ + [0, 0], + [3, 3] + ])).toEqual([ + [1, 1, 1, 0], + [1, 1, 0, 2], + [1, 0, 2, 2], + [0, 2, 2, 2] + ]) + }) + it('should solve the example', () => { + expect(maxArea([ + [1, 1], + [1, 6], + [8, 3], + [3, 4], + [5, 5], + [8, 9] + ])).toEqual(17) + }) + /* + it('should calculate the solution', () => { + expect(maxArea([ + [242, 112], + [292, 356], + [66, 265], + [73, 357], + [357, 67], + [44, 303], + [262, 72], + [220, 349], + [331, 301], + [338, 348], + [189, 287], + [285, 288], + [324, 143], + [169, 282], + [114, 166], + [111, 150], + [251, 107], + [176, 196], + [254, 287], + [146, 177], + [149, 213], + [342, 275], + [158, 279], + [327, 325], + [201, 70], + [145, 344], + [227, 345], + [168, 261], + [108, 236], + [306, 222], + [174, 289], + [67, 317], + [316, 302], + [248, 194], + [67, 162], + [232, 357], + [300, 193], + [229, 125], + [326, 234], + [252, 343], + [51, 263], + [348, 234], + [136, 337], + [146, 82], + [334, 62], + [255, 152], + [326, 272], + [114, 168], + [292, 311], + [202, 62] + ])).toEqual(16918) + }) */ +}) diff --git a/package.json b/package.json index 49ad8df..b5bb48e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "index.js", "scripts": { - "test": "jest" + "test": "jest", + "lint": "standard", + "lint:fix": "standard --fix" }, "repository": { "type": "git", From 942dd0bc842b9f71380758433eac53bc43cdc0c0 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 9 Dec 2018 23:53:39 +0100 Subject: [PATCH 22/56] Day 6, not accepted --- day6-as-png.js | 88 +++++++++++++++++++++ day6.js | 73 ++++++++++++++++++ day6.png | Bin 0 -> 9047 bytes day6.spec.js | 189 +++++++++++++++++++++++++--------------------- package-lock.json | 33 +++----- package.json | 1 + 6 files changed, 276 insertions(+), 108 deletions(-) create mode 100644 day6-as-png.js create mode 100644 day6.js create mode 100644 day6.png diff --git a/day6-as-png.js b/day6-as-png.js new file mode 100644 index 0000000..d0b4b10 --- /dev/null +++ b/day6-as-png.js @@ -0,0 +1,88 @@ +const {makeAreas} = require('./day6') + +const fs = require('fs') +const PNG = require('pngjs').PNG; + +(async () => { + const areas = await makeAreas([ + [242, 112], + [292, 356], + [66, 265], + [73, 357], + [357, 67], + [44, 303], + [262, 72], + [220, 349], + [331, 301], + [338, 348], + [189, 287], + [285, 288], + [324, 143], + [169, 282], + [114, 166], + [111, 150], + [251, 107], + [176, 196], + [254, 287], + [146, 177], + [149, 213], + [342, 275], + [158, 279], + [327, 325], + [201, 70], + [145, 344], + [227, 345], + [168, 261], + [108, 236], + [306, 222], + [174, 289], + [67, 317], + [316, 302], + [248, 194], + [67, 162], + [232, 357], + [300, 193], + [229, 125], + [326, 234], + [252, 343], + [51, 263], + [348, 234], + [136, 337], + [146, 82], + [334, 62], + [255, 152], + [326, 272], + [114, 168], + [292, 311], + [202, 62] + ]) + + const newfile = new PNG({width: areas[0].length, height: areas.length}) + const colors = {} + + for (let y = 0; y < newfile.height; y++) { + for (let x = 0; x < newfile.width; x++) { + const idx = (newfile.width * y + x) << 2 + + const area = areas[y][x] + if (!colors[area]) { + colors[area] = [ + Math.floor(Math.random() * 255), + Math.floor(Math.random() * 255), + Math.floor(Math.random() * 255) + ] + } + + newfile.data[idx] = colors[area][0] + newfile.data[idx + 1] = colors[area][1] + newfile.data[idx + 2] = colors[area][2] + newfile.data[idx + 3] = 0xff + } + } + + newfile.pack() + .pipe(fs.createWriteStream(__dirname + '/day6.png')) + .on('finish', () => { + console.log('Written!') + }) +})() diff --git a/day6.js b/day6.js new file mode 100644 index 0000000..71084d6 --- /dev/null +++ b/day6.js @@ -0,0 +1,73 @@ +'use strict' + +const distance = ([x1, y1], [x2, y2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + +const makeMap = coordinates => { + const [maxX, maxY] = [ + coordinates.reduce((max, [x]) => { + if (x > max) return x + return max + }, 0), + coordinates.reduce((max, [_, y]) => { + if (y > max) return y + return max + }, 0) + ] + const map = [] + for (let y = 0; y <= maxY; y++) { + map[y] = [] + for (let x = 0; x <= maxX; x++) { + map[y][x] = 0 + } + } + + coordinates.forEach(([x, y], idx) => { + map[y][x] = idx + 1 + }) + return map +} + +const makeAreas = coordinates => { + const map = makeMap(coordinates) + for (let y = 0; y < map.length; y++) { + for (let x = 0; x < map[0].length; x++) { + const distances = coordinates.reduce((distances, [cx, cy], i) => { + const d = distance([x, y], [cx, cy]) + if (!distances[d]) { + distances[d] = [i] + } else { + distances[d].push(i) + } + return distances + }, {}) + const minDistance = Object.keys(distances).sort((d1, d2) => d1 - d2)[0] + if (distances[minDistance].length === 1) { + map[y][x] = distances[minDistance][0] + 1 + } + } + } + return map +} + +const maxArea = coordinates => { + const areas = makeAreas(coordinates) + const countPerCoordinate = {} + for (let y = 0; y < areas.length; y++) { + for (let x = 0; x < areas[0].length; x++) { + if (!countPerCoordinate[areas[y][x]]) { + countPerCoordinate[areas[y][x]] = 1 + } else { + countPerCoordinate[areas[y][x]]++ + } + } + } + return countPerCoordinate[Object.keys(countPerCoordinate).sort((c1, c2) => countPerCoordinate[c2] - countPerCoordinate[c1])[0]] +} + + +module.exports = { + makeAreas, + maxArea, + makeMap, + distance +} diff --git a/day6.png b/day6.png new file mode 100644 index 0000000000000000000000000000000000000000..2d1a83551cc7ac5d2c6df95ae359759dee9471ca GIT binary patch literal 9047 zcmeIY`9GBH8#mrcWn$(QnX*jNpaqq(WJ!~;wWwrY!XQGjF9~I$31Nn~g|sNQB~jT@ zmW&KSWi9*IvM*&R;yEreeLvsV>-iU+ADWqt^Elq`_pzMkbzZN!b52)l>y{l`)~s2x zRY#kow`R@SOUR#1Twu8Y7FEmBS5_EZVg@E*+Lxqs^0E#KR(w(WR)Hpbm=Zj0S> zrN~0ndscUXU$@vjHdmPXdDOlpVQ!|7Z~Xp#LFt9pkMl(D4as*M3!6y`8f=(s7@Dmy zUATJI{5S(2{D@zw%Y)n9FPCofbM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ao74j)bje#W49lpZj2kfHruKbgCaqWB($i7a+iwIB*|)XrlkDwZ3+ b!p&X9d~ykA8w>waW{r-9E-CwjRq+1-9t~<= literal 0 HcmV?d00001 diff --git a/day6.spec.js b/day6.spec.js index e0aa7f0..b9fea65 100644 --- a/day6.spec.js +++ b/day6.spec.js @@ -1,72 +1,13 @@ 'use strict' -/* global describe, it, expect */ - -const distance = ([y1, x1], [y2, x2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) - -const makeMap = coordinates => { - const [maxX, maxY] = [ - coordinates.reduce((max, [_, x]) => { - if (x > max) return x - return max - }, 0), - coordinates.reduce((max, [y]) => { - if (y > max) return y - return max - }, 0) - ] - const map = [] - for (let y = 0; y <= maxY; y++) { - map[y] = [] - for (let x = 0; x <= maxX; x++) { - map[y][x] = 0 - } - } - - coordinates.forEach(([y, x], idx) => { - map[y][x] = idx + 1 - }) - return map -} - -const makeAreas = coordinates => { - const map = makeMap(coordinates) - for (let y = 0; y < map.length; y++) { - for (let x = 0; x < map[0].length; x++) { - const distances = coordinates.reduce((distances, [cy, cx], i) => { - const d = distance([y, x], [cy, cx]) - if (!distances[d]) { - distances[d] = [i] - } else { - distances[d].push(i) - } - return distances - }, {}) - const minDistance = Object.keys(distances).sort((d1, d2) => d1 - d2)[0] - if (distances[minDistance].length === 1) { - map[y][x] = distances[minDistance][0] + 1 - } - } - } - return map -} +const { + makeAreas, + maxArea, + makeMap, + distance +} = require('./day6') -const maxArea = coordinates => { - const areas = makeAreas(coordinates) - const countPerCoordinate = { - - } - for (let y = 0; y < areas.length; y++) { - for (let x = 0; x < areas[0].length; x++) { - if (!countPerCoordinate[areas[y][x]]) { - countPerCoordinate[areas[y][x]] = 1 - } else { - countPerCoordinate[areas[y][x]]++ - } - } - } - return countPerCoordinate[Object.keys(countPerCoordinate).sort((c1, c2) => countPerCoordinate[c2] - countPerCoordinate[c1])[0]] -} +/* global describe, it, expect */ describe('Manhattan Distance', () => { it('should calculate the manhatten distance', () => { @@ -92,6 +33,15 @@ describe('map coordinats', () => { [0, 1, 0], [0, 0, 2] ]) + expect(makeMap([ + [0, 0], + [1, 3] + ])).toEqual([ + [1, 0], + [0, 0], + [0, 0], + [0, 2] + ]) expect(makeMap([ [1, 1], [1, 6], @@ -100,36 +50,28 @@ describe('map coordinats', () => { [5, 5], [8, 9] ])).toEqual([ - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 1, 0, 0, 0, 0, 2, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 4, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 5, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 3, 0, 0, 0, 0, 0, 6] + [0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 1, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 3], + [0, 0, 0, 4, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 5, 0, 0, 0], + [0, 2, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 0], + [0, 0, 0, 0, 0, 0, 0, 0, 6] ]) }) }) describe('make areas', () => { - it('should measure distance', () => { + it('should make areas', () => { expect(makeAreas([ [1, 1] ])).toEqual([ [1, 1], [1, 1] ]) - expect(makeMap([ - [0, 0], - [3, 3] - ])).toEqual([ - [1, 0, 0, 0], - [0, 0, 0, 0], - [0, 0, 0, 0], - [0, 0, 0, 2] - ]) expect(makeAreas([ [0, 0], [3, 3] @@ -139,6 +81,80 @@ describe('make areas', () => { [1, 0, 2, 2], [0, 2, 2, 2] ]) + expect(makeAreas([ + [0, 0], + [0, 3] + ])).toEqual([ + [1], + [1], + [2], + [2] + ]) + expect(makeAreas([ + [0, 0], + [0, 4] + ])).toEqual([ + [1], + [1], + [0], + [2], + [2] + ]) + expect(makeAreas([ + [0, 0], + [3, 0] + ])).toEqual([ + [1, 1, 2, 2] + ]) + expect(makeAreas([ + [0, 0], + [4, 0] + ])).toEqual([ + [1, 1, 0, 2, 2] + ]) + }) + it('make the example map', () => { + expect(makeAreas([ + [1, 1], + [1, 6], + [8, 3], + [3, 4], + [5, 5], + [8, 9] + ])).toEqual([ + [1, 1, 1, 1, 1, 0, 3, 3, 3], + [1, 1, 1, 1, 1, 0, 3, 3, 3], + [1, 1, 1, 4, 4, 5, 3, 3, 3], + [1, 1, 4, 4, 4, 5, 3, 3, 3], + [0, 0, 4, 4, 4, 5, 5, 3, 3], + [2, 2, 0, 4, 5, 5, 5, 5, 3], + [2, 2, 2, 0, 5, 5, 5, 5, 0], + [2, 2, 2, 0, 5, 5, 5, 6, 6], + [2, 2, 2, 0, 5, 5, 6, 6, 6], + [2, 2, 2, 0, 6, 6, 6, 6, 6] + ]) + }) + it('should calculate the max area', () => { + expect(maxArea([ + [0, 0], + [0, 3] + ])).toEqual(2) + expect(maxArea([ + [0, 0], + [0, 4] + ])).toEqual(2) + expect(maxArea([ + [0, 0], + [3, 0] + ])).toEqual(2) + expect(maxArea([ + [0, 0], + [4, 0] + ])).toEqual(2) + expect(maxArea([ + [0, 0], + [3, 3] + ])).toEqual(6) }) it('should solve the example', () => { expect(maxArea([ @@ -150,7 +166,6 @@ describe('make areas', () => { [8, 9] ])).toEqual(17) }) - /* it('should calculate the solution', () => { expect(maxArea([ [242, 112], @@ -204,5 +219,5 @@ describe('make areas', () => { [292, 311], [202, 62] ])).toEqual(16918) - }) */ + }) }) diff --git a/package-lock.json b/package-lock.json index 436e2ef..235860a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1903,13 +1903,11 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, - "optional": true + "bundled": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1922,18 +1920,15 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "concat-map": { "version": "0.0.1", - "bundled": true, - "optional": true + "bundled": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, - "optional": true + "bundled": true }, "core-util-is": { "version": "1.0.2", @@ -2036,8 +2031,7 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, - "optional": true + "bundled": true }, "ini": { "version": "1.3.5", @@ -2047,7 +2041,6 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2060,20 +2053,17 @@ "minimatch": { "version": "3.0.4", "bundled": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true, - "optional": true + "bundled": true }, "minipass": { "version": "2.2.4", "bundled": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2090,7 +2080,6 @@ "mkdirp": { "version": "0.5.1", "bundled": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -2163,8 +2152,7 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, - "optional": true + "bundled": true }, "object-assign": { "version": "4.1.1", @@ -2174,7 +2162,6 @@ "once": { "version": "1.4.0", "bundled": true, - "optional": true, "requires": { "wrappy": "1" } @@ -2280,7 +2267,6 @@ "string-width": { "version": "1.0.2", "bundled": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4106,6 +4092,11 @@ "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==" }, + "pngjs": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.3.3.tgz", + "integrity": "sha512-1n3Z4p3IOxArEs1VRXnZ/RXdfEniAUS9jb68g58FIXMNkPJeZd+Qh4Uq7/e0LVxAQGos1eIUrqrt4FpjdnEd+Q==" + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", diff --git a/package.json b/package.json index b5bb48e..c2c3324 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "homepage": "https://github.com/coderbyheart/adventofcode2018#readme", "dependencies": { "jest": "^23.6.0", + "pngjs": "^3.3.3", "standard": "^12.0.1" } } From d3a68943949788990f5f9b546a4e4a6e7b4e7aa4 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 10 Dec 2018 00:37:55 +0100 Subject: [PATCH 23/56] day 6: eliminate infinte regions, passes part 1 --- day6-as-png.js | 12 ++++++++---- day6.js | 23 ++++++++++++++++++++--- day6.spec.js | 30 ++++-------------------------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/day6-as-png.js b/day6-as-png.js index d0b4b10..8c1d781 100644 --- a/day6-as-png.js +++ b/day6-as-png.js @@ -1,10 +1,10 @@ -const {makeAreas} = require('./day6') +const {makeAreas, countAreas} = require('./day6') const fs = require('fs') const PNG = require('pngjs').PNG; (async () => { - const areas = await makeAreas([ + const coords = [ [242, 112], [292, 356], [66, 265], @@ -55,7 +55,9 @@ const PNG = require('pngjs').PNG; [114, 168], [292, 311], [202, 62] - ]) + ] + const areas = makeAreas(coords) + const notInfiniteAreas = countAreas(coords) const newfile = new PNG({width: areas[0].length, height: areas.length}) const colors = {} @@ -66,10 +68,12 @@ const PNG = require('pngjs').PNG; const area = areas[y][x] if (!colors[area]) { - colors[area] = [ + colors[area] = notInfiniteAreas[area] ? [ Math.floor(Math.random() * 255), Math.floor(Math.random() * 255), Math.floor(Math.random() * 255) + ] : [ + 255,255,255 ] } diff --git a/day6.js b/day6.js index 71084d6..b29a3fb 100644 --- a/day6.js +++ b/day6.js @@ -50,10 +50,22 @@ const makeAreas = coordinates => { } const maxArea = coordinates => { + const notInfinite = countAreas(coordinates) + return notInfinite[Object.keys(notInfinite).sort((c1, c2) => notInfinite[c2] - notInfinite[c1])[0]] +} + +const countAreas = coordinates => { const areas = makeAreas(coordinates) const countPerCoordinate = {} + const maxX = areas[0].length - 1 + const maxY = areas.length - 1 + const infiniteAreas = {} for (let y = 0; y < areas.length; y++) { for (let x = 0; x < areas[0].length; x++) { + // Do not count areas with infinite reach (= those at the edges) + if (y === 0 || x === 0 || y === maxY || x === maxX) { + infiniteAreas[areas[y][x]] = true + } if (!countPerCoordinate[areas[y][x]]) { countPerCoordinate[areas[y][x]] = 1 } else { @@ -61,13 +73,18 @@ const maxArea = coordinates => { } } } - return countPerCoordinate[Object.keys(countPerCoordinate).sort((c1, c2) => countPerCoordinate[c2] - countPerCoordinate[c1])[0]] + return Object.keys(countPerCoordinate).reduce((cMap, c) => { + if (+c === 0) return cMap + if (infiniteAreas[c]) return cMap + cMap[c] = countPerCoordinate[c] + return cMap + }, {}) } - module.exports = { makeAreas, maxArea, makeMap, - distance + distance, + countAreas } diff --git a/day6.spec.js b/day6.spec.js index b9fea65..04621d5 100644 --- a/day6.spec.js +++ b/day6.spec.js @@ -1,14 +1,14 @@ 'use strict' +/* global describe, it, expect */ + const { makeAreas, maxArea, makeMap, - distance + distance, } = require('./day6') -/* global describe, it, expect */ - describe('Manhattan Distance', () => { it('should calculate the manhatten distance', () => { expect(distance([0, 0], [0, 0])).toEqual(0) @@ -134,28 +134,6 @@ describe('make areas', () => { [2, 2, 2, 0, 6, 6, 6, 6, 6] ]) }) - it('should calculate the max area', () => { - expect(maxArea([ - [0, 0], - [0, 3] - ])).toEqual(2) - expect(maxArea([ - [0, 0], - [0, 4] - ])).toEqual(2) - expect(maxArea([ - [0, 0], - [3, 0] - ])).toEqual(2) - expect(maxArea([ - [0, 0], - [4, 0] - ])).toEqual(2) - expect(maxArea([ - [0, 0], - [3, 3] - ])).toEqual(6) - }) it('should solve the example', () => { expect(maxArea([ [1, 1], @@ -218,6 +196,6 @@ describe('make areas', () => { [114, 168], [292, 311], [202, 62] - ])).toEqual(16918) + ])).toEqual(3933) }) }) From 6908cb54bdccdb6971539c21080595c0879a6bc0 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 10 Dec 2018 00:53:55 +0100 Subject: [PATCH 24/56] feat: day 6, part 2 --- day6-as-png.js | 59 +++----------------------------------- day6.js | 18 +++++++++++- day6.json | 52 ++++++++++++++++++++++++++++++++++ day6.png | Bin 9047 -> 6830 bytes day6.spec.js | 75 +++++++++++++++---------------------------------- 5 files changed, 95 insertions(+), 109 deletions(-) create mode 100644 day6.json diff --git a/day6-as-png.js b/day6-as-png.js index 8c1d781..2c63529 100644 --- a/day6-as-png.js +++ b/day6-as-png.js @@ -1,63 +1,12 @@ const {makeAreas, countAreas} = require('./day6') const fs = require('fs') -const PNG = require('pngjs').PNG; +const PNG = require('pngjs').PNG +const input = require('./day6.json'); (async () => { - const coords = [ - [242, 112], - [292, 356], - [66, 265], - [73, 357], - [357, 67], - [44, 303], - [262, 72], - [220, 349], - [331, 301], - [338, 348], - [189, 287], - [285, 288], - [324, 143], - [169, 282], - [114, 166], - [111, 150], - [251, 107], - [176, 196], - [254, 287], - [146, 177], - [149, 213], - [342, 275], - [158, 279], - [327, 325], - [201, 70], - [145, 344], - [227, 345], - [168, 261], - [108, 236], - [306, 222], - [174, 289], - [67, 317], - [316, 302], - [248, 194], - [67, 162], - [232, 357], - [300, 193], - [229, 125], - [326, 234], - [252, 343], - [51, 263], - [348, 234], - [136, 337], - [146, 82], - [334, 62], - [255, 152], - [326, 272], - [114, 168], - [292, 311], - [202, 62] - ] - const areas = makeAreas(coords) - const notInfiniteAreas = countAreas(coords) + const areas = makeAreas(input) + const notInfiniteAreas = countAreas(input) const newfile = new PNG({width: areas[0].length, height: areas.length}) const colors = {} diff --git a/day6.js b/day6.js index b29a3fb..16059c3 100644 --- a/day6.js +++ b/day6.js @@ -81,10 +81,26 @@ const countAreas = coordinates => { }, {}) } +const safeRegion = (coordinates, max = 32) => { + const map = makeMap(coordinates) + let safeRegions = 0 + for (let y = 0; y < map.length; y++) { + for (let x = 0; x < map[0].length; x++) { + let total = 0 + for (let i = 0; i < coordinates.length; i++) { + total += distance([x, y], [coordinates[i][0], coordinates[i][1]]) + } + if (total < max) safeRegions++ + } + } + return safeRegions +} + module.exports = { makeAreas, maxArea, makeMap, distance, - countAreas + countAreas, + safeRegion } diff --git a/day6.json b/day6.json new file mode 100644 index 0000000..2e06d49 --- /dev/null +++ b/day6.json @@ -0,0 +1,52 @@ +[ + [242, 112], + [292, 356], + [66, 265], + [73, 357], + [357, 67], + [44, 303], + [262, 72], + [220, 349], + [331, 301], + [338, 348], + [189, 287], + [285, 288], + [324, 143], + [169, 282], + [114, 166], + [111, 150], + [251, 107], + [176, 196], + [254, 287], + [146, 177], + [149, 213], + [342, 275], + [158, 279], + [327, 325], + [201, 70], + [145, 344], + [227, 345], + [168, 261], + [108, 236], + [306, 222], + [174, 289], + [67, 317], + [316, 302], + [248, 194], + [67, 162], + [232, 357], + [300, 193], + [229, 125], + [326, 234], + [252, 343], + [51, 263], + [348, 234], + [136, 337], + [146, 82], + [334, 62], + [255, 152], + [326, 272], + [114, 168], + [292, 311], + [202, 62] +] \ No newline at end of file diff --git a/day6.png b/day6.png index 2d1a83551cc7ac5d2c6df95ae359759dee9471ca..3be34551ab5f4b7f6ead5bc55f6463971a25c9f9 100644 GIT binary patch literal 6830 zcmeHM`#+Qa-$%7dldYCR!i;E2&eDfsnhc>%l!}BKX};nIy|4x*X#AZ-q*GFqIcR_NQkc%7ZDMW zu%uDxA|j&R=-(0ySlm>#q~M>JC6%%#SoGuS@E0N?t9{U`$-0Px8Q;&0@q((;ZaIl& z>pzcQQJOT@`B>*n-n)dj6`fI}i4RY`c7*bA3vUyWBy#G^{cLuqt2OvvzC`BGH{9H= zLL$jFUL>6%i7jD(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MtqN|3-mifD4pdkI^&spaAXZBX@<6Q`(@M9TY z;E?DugbGj8%G;hOQJ|WevPr66BP8%3%tA;k*d)WTKw>1w)(LM_WF6J;m$a);bVwqa z7m|=Y!Y0t7H{jwLfxXC>9h#1WR`7E|i%{gfNa(3rwl)FKW^4P{qzHNyNr)m!A-TKT zv2_tHfUXE#wk}%#6fW))0AugNo}QNuykQIDP3!+(NBZQSciQVn@X_56hF&ClxfMam zO1?iPJ_bZobLxz2S83DY23GOnMS3+3i;RR$a!~uiS@V-Xn5xMpbfdIPyjqwjiMRcM zGirWC=Gi-4-KahCCnccOedYJ<=%05k4a~IuX^lP!v@iy^3miVJvQ)2fv8{V9U#RrKJE7Xd zr47(EQdY)05AK|eus=03IpCctZEcG$^m_>$Tq!3G?weIy&0463Z7_G@wUvAOk{tZa zA}kv&Mhu(|42C}Ay^$`BF|E{rE+pp4)o|;*F)297mK(;kY5{(tnWmqn39{}F<}K4t zWZ83KBkIdo+=W4Z)D@e-=YfWes&RF2q$KV0A*vl9?Aoo6v#@r;as_SpGwrTg)g3`k zl{*m+h*DSl%~05qo0WX7(BGVwYFCzy>b`u~r$ac3BKv`O=BKSvfj1Ug)ozI_UG8ge z3*IPl7GE9XRZ+O&wl+5eWS`b#%l1CVVet0on^phXzMXkp}0%ffc9}}eU-M>`5ZO~@WKJ}!lv%lx!z`eOOaqp&nk?oJrsd*yNf9KqD7Uz58@_pVW8Xf0UhIct({=t481-ZJ{dEfOoSU$3Xb5uN?LC%b;G7$Wd>23Ekcf z>c@tj56!vt|Jao74j)bje#W49lpZj2kfHruKbgCaqWB($i7a+iwIB*|)XrlkDwZ3+ b!p&X9d~ykA8w>waW{r-9E-CwjRq+1-9t~<= diff --git a/day6.spec.js b/day6.spec.js index 04621d5..d2fd56a 100644 --- a/day6.spec.js +++ b/day6.spec.js @@ -1,14 +1,18 @@ 'use strict' -/* global describe, it, expect */ +/* global describe, it, expect, safeRegion */ const { makeAreas, maxArea, makeMap, distance, + safeRegion } = require('./day6') +const input = require('./day6.json') + + describe('Manhattan Distance', () => { it('should calculate the manhatten distance', () => { expect(distance([0, 0], [0, 0])).toEqual(0) @@ -145,57 +149,22 @@ describe('make areas', () => { ])).toEqual(17) }) it('should calculate the solution', () => { - expect(maxArea([ - [242, 112], - [292, 356], - [66, 265], - [73, 357], - [357, 67], - [44, 303], - [262, 72], - [220, 349], - [331, 301], - [338, 348], - [189, 287], - [285, 288], - [324, 143], - [169, 282], - [114, 166], - [111, 150], - [251, 107], - [176, 196], - [254, 287], - [146, 177], - [149, 213], - [342, 275], - [158, 279], - [327, 325], - [201, 70], - [145, 344], - [227, 345], - [168, 261], - [108, 236], - [306, 222], - [174, 289], - [67, 317], - [316, 302], - [248, 194], - [67, 162], - [232, 357], - [300, 193], - [229, 125], - [326, 234], - [252, 343], - [51, 263], - [348, 234], - [136, 337], - [146, 82], - [334, 62], - [255, 152], - [326, 272], - [114, 168], - [292, 311], - [202, 62] - ])).toEqual(3933) + expect(maxArea(input)).toEqual(3933) + }) +}) + +describe('safe region', () => { + it('should find the safe example region', () => { + expect(safeRegion([ + [1, 1], + [1, 6], + [8, 3], + [3, 4], + [5, 5], + [8, 9] + ])).toEqual(16) + }) + it('should find the safe solution region', () => { + expect(safeRegion(input, 10000)).toEqual(41145) }) }) From 71ac0ea5f3b43c6c8602f69d6342bf782a88df2f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 10 Dec 2018 23:00:20 +0100 Subject: [PATCH 25/56] day 7, part 1 --- day6.png | Bin 6830 -> 3386 bytes day7.spec.js | 79 ++++++++++++++++++++++++++++++++++++++++ day7.txt | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 180 insertions(+) create mode 100644 day7.spec.js create mode 100644 day7.txt diff --git a/day6.png b/day6.png index 3be34551ab5f4b7f6ead5bc55f6463971a25c9f9..b49d3b6eb417af7173e9f51edb6612fe199c8181 100644 GIT binary patch literal 3386 zcmd^CYg7|=7RN%vfMl5>55cM#4K0&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#3r!s@m%isLf=`{jGp_$O_@}kQmtQzi!L@y%mu^0< zghf*uniBUm*9i`O`1W1CRlIMh2(xMA#c{BD-hI0LD18T<{LBcGsr&=S#y5kNui}-n ziEO~K%XJG=2q-ST<~AJnu!gFVt(uyZ105+K!x|?qoJxEd+qu#@;u2@P;AW3gyWG); z*1f;JEDSR_M`)=X3H&|uxrrCknm2ZE^^>+^ZkAw+S3Kki zdk>E}Q^hAoC0)`spU!UnP%ABl6tInk!*(+aDc2is8qp?=V`&!(HAveR zx*T4%dm~}t+|Kk#oF4a;KlaI-iv8n-+PgmvTUAx^T1%BXqft2 zSqlR-gMJFg_B`_AHOsiQYw>p;n!(i93dw|ca^Bx~FN|VLP*dU@ViSZ*|75CAT)d@a z@0Qd4iUzB%R&_iZ|H=6e_oGj6TAdFxMCA_%Y{{8^u-LgcU-DCf>Vo7RXo+I_o{V4E zVx1XUmF^{iEfhLiUj2z*PTWC>d>T;l{+^aStYZbS3DMcEHlG%W2?2S^tf0*`h6;AZIU zus)gxTe4O3&_cIk-s@W6?u?#<$DV&Kfa>b(((B0rHl!jHCV(D(9Fkkd2Q2(Q}_tIT7 zC7QBN2~zCP6bht-pq?YBCyr8>Dq}ln;dB0M3LW)0ZM(n5MUUDBXR=Njkkbh{IiF3M0AhcoR z01yyR0_PflNpi=OSV47#pPubZFnjMSNs{ZqX;|=^iQP~@f|`*oK_wf-csGx+gy?{p zAAotp5`Bb(B!QqL6N%@?&^y)uo~BR)aki&NVI%<3Xur|4c5RyF+Vd;n>&Sz}At{hR zH-rSwVX>B#U`9^CP!hS&J7qbKgk~$O8V*lZWfiJJ4b)r?mQREEkVtv^6E3JgG?EfS zsfMo!-&^GBo$~Q zG|P-&A6%jZd}^Kl^jVxpS{umCq=ZkuX)t~o4PU { + const [, a, b] = s.match(/Step ([^ ]+) must be finished before step ([^ ]+) can begin\./) + return [a, b] +} + +const makeList = steps => steps.reduce((list, step) => { + const [a, b] = parseStep(step) + const nodeA = list.find(({step}) => step === a) + const nodeB = list.find(({step}) => step === b) + if (!nodeA) { + list.push({step: a, depends: []}) + } + if (!nodeB) { + list.push({step: b, depends: [a]}) + } else { + nodeB.depends.push(a) + } + return list +}, []) + +const runList = (list, steps = '') => { + if (!list.length) { + return steps + } + let nextSteps + if (!steps.length) { + nextSteps = list.filter(({depends}) => depends.length === 0) + } else { + nextSteps = list.filter(({depends}) => depends.reduce((inSteps, dependsOn) => { + if (inSteps === false) return inSteps + return steps.includes(dependsOn) + }, true)) + } + nextSteps.sort(({step: s1}, {step: s2}) => s1 > s2 ? 1 : -1) + const step = nextSteps[0] + list.splice(list.indexOf(step), 1) + return runList(list, `${steps}${step.step}`) +} + +describe('parse step', () => { + it('should parse steps', () => { + expect(parseStep('Step C must be finished before step A can begin.')).toEqual(['C', 'A']) + expect(parseStep('Step C must be finished before step F can begin.')).toEqual(['C', 'F']) + expect(parseStep('Step A must be finished before step B can begin.')).toEqual(['A', 'B']) + expect(parseStep('Step A must be finished before step D can begin.')).toEqual(['A', 'D']) + expect(parseStep('Step B must be finished before step E can begin.')).toEqual(['B', 'E']) + expect(parseStep('Step D must be finished before step E can begin.')).toEqual(['D', 'E']) + expect(parseStep('Step F must be finished before step E can begin.')).toEqual(['F', 'E']) + }) +}) + +describe('build a linked list', () => { + let l + it('should convert to linked list', () => { + l = makeList([ + 'Step C must be finished before step A can begin.', + 'Step C must be finished before step F can begin.', + 'Step A must be finished before step B can begin.', + 'Step A must be finished before step D can begin.', + 'Step B must be finished before step E can begin.', + 'Step D must be finished before step E can begin.', + 'Step F must be finished before step E can begin.' + ]) + expect(l).toHaveLength(6) + }) + it('should solve the example', () => { + expect(runList(l)).toEqual('CABDFE') + }) + it('should solve the puzzle', () => { + const input = readFileSync('./day7.txt', 'utf-8').split('\n') + expect(runList(makeList(input))).toEqual('CABDFE') + }) +}) \ No newline at end of file diff --git a/day7.txt b/day7.txt new file mode 100644 index 0000000..a2d7c7c --- /dev/null +++ b/day7.txt @@ -0,0 +1,101 @@ +Step G must be finished before step T can begin. +Step L must be finished before step V can begin. +Step D must be finished before step P can begin. +Step J must be finished before step K can begin. +Step N must be finished before step B can begin. +Step K must be finished before step W can begin. +Step T must be finished before step I can begin. +Step F must be finished before step E can begin. +Step P must be finished before step O can begin. +Step X must be finished before step I can begin. +Step M must be finished before step S can begin. +Step Y must be finished before step O can begin. +Step I must be finished before step Z can begin. +Step V must be finished before step Z can begin. +Step Q must be finished before step Z can begin. +Step H must be finished before step C can begin. +Step R must be finished before step Z can begin. +Step U must be finished before step S can begin. +Step E must be finished before step Z can begin. +Step O must be finished before step W can begin. +Step Z must be finished before step S can begin. +Step S must be finished before step C can begin. +Step W must be finished before step B can begin. +Step A must be finished before step B can begin. +Step C must be finished before step B can begin. +Step L must be finished before step P can begin. +Step J must be finished before step V can begin. +Step E must be finished before step W can begin. +Step Z must be finished before step W can begin. +Step W must be finished before step C can begin. +Step S must be finished before step W can begin. +Step Q must be finished before step S can begin. +Step O must be finished before step B can begin. +Step R must be finished before step W can begin. +Step D must be finished before step H can begin. +Step E must be finished before step O can begin. +Step Y must be finished before step H can begin. +Step V must be finished before step O can begin. +Step O must be finished before step S can begin. +Step X must be finished before step V can begin. +Step R must be finished before step E can begin. +Step S must be finished before step A can begin. +Step K must be finished before step Y can begin. +Step V must be finished before step W can begin. +Step U must be finished before step W can begin. +Step H must be finished before step R can begin. +Step P must be finished before step I can begin. +Step E must be finished before step C can begin. +Step H must be finished before step Z can begin. +Step N must be finished before step V can begin. +Step N must be finished before step W can begin. +Step A must be finished before step C can begin. +Step V must be finished before step E can begin. +Step N must be finished before step Q can begin. +Step Y must be finished before step V can begin. +Step R must be finished before step O can begin. +Step R must be finished before step C can begin. +Step L must be finished before step S can begin. +Step V must be finished before step R can begin. +Step X must be finished before step R can begin. +Step Z must be finished before step A can begin. +Step O must be finished before step Z can begin. +Step U must be finished before step C can begin. +Step X must be finished before step W can begin. +Step K must be finished before step O can begin. +Step O must be finished before step A can begin. +Step K must be finished before step T can begin. +Step N must be finished before step O can begin. +Step X must be finished before step C can begin. +Step Z must be finished before step C can begin. +Step N must be finished before step X can begin. +Step T must be finished before step A can begin. +Step D must be finished before step O can begin. +Step M must be finished before step Q can begin. +Step D must be finished before step C can begin. +Step U must be finished before step E can begin. +Step N must be finished before step H can begin. +Step I must be finished before step U can begin. +Step N must be finished before step A can begin. +Step M must be finished before step E can begin. +Step M must be finished before step V can begin. +Step P must be finished before step B can begin. +Step K must be finished before step X can begin. +Step N must be finished before step S can begin. +Step S must be finished before step B can begin. +Step Y must be finished before step W can begin. +Step K must be finished before step Q can begin. +Step V must be finished before step S can begin. +Step E must be finished before step S can begin. +Step N must be finished before step Z can begin. +Step P must be finished before step A can begin. +Step T must be finished before step V can begin. +Step L must be finished before step D can begin. +Step I must be finished before step C can begin. +Step Q must be finished before step E can begin. +Step Y must be finished before step U can begin. +Step J must be finished before step I can begin. +Step P must be finished before step H can begin. +Step T must be finished before step M can begin. +Step T must be finished before step E can begin. +Step D must be finished before step F can begin. \ No newline at end of file From f9d32ca90b09b61586e66b70b42faa59be85515c Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 11 Dec 2018 00:00:41 +0100 Subject: [PATCH 26/56] day 7 add test for part 2 --- day7.spec.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/day7.spec.js b/day7.spec.js index e543773..3747c27 100644 --- a/day7.spec.js +++ b/day7.spec.js @@ -1,6 +1,6 @@ 'use strict' -const { readFileSync } = require('fs'); +const {readFileSync} = require('fs') /* global describe, it, expect, safeRegion */ @@ -74,6 +74,23 @@ describe('build a linked list', () => { }) it('should solve the puzzle', () => { const input = readFileSync('./day7.txt', 'utf-8').split('\n') - expect(runList(makeList(input))).toEqual('CABDFE') + expect(runList(makeList(input))).toEqual('GJKLDFNPTMQXIYHUVREOZSAWCB') }) -}) \ No newline at end of file +}) + +/* +describe('build time!', () => { + it.only('should calculate the build time', () => { + // expect(buildTime(l, 2, 0)).toEqual(15) + expect(buildTime(makeList([ + 'Step C must be finished before step A can begin.', + 'Step C must be finished before step F can begin.', + 'Step A must be finished before step B can begin.', + 'Step A must be finished before step D can begin.', + 'Step B must be finished before step E can begin.', + 'Step D must be finished before step E can begin.', + 'Step F must be finished before step E can begin.' + ]), 2, 0)).toEqual(15) + }) +}) +*/ \ No newline at end of file From 9900c3ce2fbbbb9beddf72026fa8abfd1d8263f2 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 13 Dec 2018 22:50:53 +0100 Subject: [PATCH 27/56] day 8, part 1 --- day8.spec.js | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ day8.txt | 1 + 2 files changed, 75 insertions(+) create mode 100644 day8.spec.js create mode 100644 day8.txt diff --git a/day8.spec.js b/day8.spec.js new file mode 100644 index 0000000..976ffa0 --- /dev/null +++ b/day8.spec.js @@ -0,0 +1,74 @@ +'use strict' + +const {readFileSync} = require('fs') + +/* global describe, it, expect, safeRegion */ + +const parseTree = (sequence, parent, tree = []) => { + const node = { + childNodes: sequence.shift(), + metadataEntries: sequence.shift(), + // parent, + metadata: [] + } + tree.push(node) + if (node.childNodes) { + for (let i = 0; i < node.childNodes; i++) { + parseTree(sequence, node, tree) + } + } + if (node.metadataEntries) { + for (let i = 0; i < node.metadataEntries; i++) { + node.metadata.push(sequence.shift()) + } + } + return { + tree, + sequence + } +} + +const metadataSum = sequence => parseTree(sequence.split(' ').map(n => +n)).tree.reduce((sum, node) => sum + node.metadata.reduce((sum, v) => sum + v, 0), 0) + +describe('tree parser', () => { + it('should parse test sequences', () => { + const {tree} = parseTree('0 0'.split(' ').map(n => +n)) + expect(tree).toHaveLength(1) + }) + it('should parse test sequences', () => { + const {tree} = parseTree('0 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(1) + }) + it('should parse test sequences', () => { + const {tree} = parseTree('1 0 0 0 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(2) + }) + it('should parse test sequences', () => { + const {tree} = parseTree('1 0 1 0 0 0 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(3) + }) + it('should parse test sequences', () => { + const {tree} = parseTree('1 1 0 0 4 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(2) + expect(tree[0].metadata).toEqual([4]) + }) + it('should parse test sequences', () => { + const {tree} = parseTree('1 1 0 2 5 6 4 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(2) + expect(tree[0].metadata).toEqual([4]) + expect(tree[1].metadata).toEqual([5, 6]) + }) + it('should parse the example sequence', () => { + const {tree} = parseTree('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2'.split(' ').map(n => +n)) + expect(tree).toHaveLength(4) + }) + +}) +describe('metadataSum', () => { + it('should sum the example sequence', () => { + expect(metadataSum('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2')).toEqual(138) + }) + it('should sum the puzzle sequence', () => { + expect(metadataSum(readFileSync('./day8.txt', 'utf-8'))).toEqual(138) + }) +}) diff --git a/day8.txt b/day8.txt new file mode 100644 index 0000000..d5c7181 --- /dev/null +++ b/day8.txt @@ -0,0 +1 @@ +7 11 7 2 4 5 3 4 1 5 0 8 2 6 5 5 1 1 2 5 1 3 3 2 1 1 6 0 9 6 1 9 6 1 6 5 9 1 1 2 3 2 2 2 1 5 0 8 9 5 3 1 3 9 7 1 1 2 2 2 1 3 5 1 2 3 4 1 8 0 10 9 7 4 1 2 4 4 3 9 3 3 2 3 3 3 2 1 1 1 8 0 10 9 1 8 4 3 4 8 1 3 2 2 1 2 2 1 2 1 1 1 8 0 7 1 8 9 9 1 1 6 1 1 1 3 2 3 3 3 3 3 2 1 3 6 1 8 0 7 1 2 5 2 4 7 1 3 2 2 1 1 1 2 3 1 6 0 8 5 9 1 1 9 3 5 2 2 3 1 2 3 3 1 6 0 10 8 1 9 6 2 7 2 2 6 7 3 1 1 1 1 2 4 3 1 4 4 5 3 6 1 7 0 11 7 4 6 3 4 5 4 2 5 1 2 3 3 2 2 1 2 1 1 8 0 10 7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 5 1 1 2 2 2 1 1 9 0 6 1 3 3 3 3 7 1 3 1 3 3 2 3 1 1 5 5 3 2 3 1 4 3 5 3 4 1 4 3 3 7 1 8 0 8 2 1 6 4 8 6 9 6 1 2 1 2 3 1 1 3 1 6 0 11 4 9 2 4 3 8 6 8 9 3 1 1 2 2 1 2 1 1 8 0 7 1 5 9 1 1 4 6 2 2 3 1 1 3 1 3 2 5 4 3 2 1 2 3 7 1 9 0 8 5 2 1 6 4 1 6 7 3 3 2 1 1 3 1 2 2 1 5 0 9 2 6 4 2 8 4 9 1 1 3 2 1 3 3 1 9 0 9 1 5 8 2 5 7 1 7 4 3 1 2 2 1 1 3 2 1 2 5 1 2 3 3 2 3 4 1 6 0 11 2 4 4 3 2 5 1 8 5 5 9 1 1 1 1 1 3 1 6 0 7 1 9 2 3 7 2 7 2 1 3 1 2 3 1 9 0 6 3 7 3 1 8 6 1 2 1 3 1 1 1 3 1 2 2 2 1 3 5 1 7 0 11 2 9 4 6 5 9 5 1 7 5 8 1 2 2 3 2 1 1 1 5 0 10 8 6 5 7 4 6 8 7 1 7 1 2 3 2 1 1 6 0 11 1 1 5 1 2 7 4 8 4 1 4 1 3 2 3 1 1 3 4 1 5 1 2 6 6 7 2 7 8 9 7 8 8 6 7 5 7 3 6 \ No newline at end of file From 02c5a06b3f3d7f7026285d840817e16715104233 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 13 Dec 2018 23:12:37 +0100 Subject: [PATCH 28/56] day 8, part 2 --- day8.spec.js | 55 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/day8.spec.js b/day8.spec.js index 976ffa0..03d7966 100644 --- a/day8.spec.js +++ b/day8.spec.js @@ -4,17 +4,19 @@ const {readFileSync} = require('fs') /* global describe, it, expect, safeRegion */ +const input = readFileSync('./day8.txt', 'utf-8'); + const parseTree = (sequence, parent, tree = []) => { const node = { childNodes: sequence.shift(), metadataEntries: sequence.shift(), - // parent, + children: [], metadata: [] } tree.push(node) if (node.childNodes) { for (let i = 0; i < node.childNodes; i++) { - parseTree(sequence, node, tree) + node.children.push(parseTree(sequence, node, tree)) } } if (node.metadataEntries) { @@ -22,44 +24,58 @@ const parseTree = (sequence, parent, tree = []) => { node.metadata.push(sequence.shift()) } } - return { - tree, - sequence - } + if (parent) return node + return tree } -const metadataSum = sequence => parseTree(sequence.split(' ').map(n => +n)).tree.reduce((sum, node) => sum + node.metadata.reduce((sum, v) => sum + v, 0), 0) +const metadataSum = sequence => parseTree(sequence.split(' ').map(n => +n)).reduce((sum, node) => sum + node.metadata.reduce((sum, v) => sum + v, 0), 0) + +const rootNodeSum = sequence => { + const tree = parseTree(sequence.split(' ').map(n => +n)) + return summarizeNode(tree[0]) +} + +const summarizeNode = (node) => { + if (node.childNodes === 0) { + return node.metadata.reduce((sum, v) => sum + v, 0) + } + return node.metadata.reduce((sum, i) => { + if (i === 0) return sum + if (!node.children[i - 1]) return sum + return sum + summarizeNode(node.children[i - 1]) + }, 0) +} describe('tree parser', () => { it('should parse test sequences', () => { - const {tree} = parseTree('0 0'.split(' ').map(n => +n)) + const tree = parseTree('0 0'.split(' ').map(n => +n)) expect(tree).toHaveLength(1) }) it('should parse test sequences', () => { - const {tree} = parseTree('0 1 2'.split(' ').map(n => +n)) + const tree = parseTree('0 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(1) }) it('should parse test sequences', () => { - const {tree} = parseTree('1 0 0 0 1 2'.split(' ').map(n => +n)) + const tree = parseTree('1 0 0 0 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(2) }) it('should parse test sequences', () => { - const {tree} = parseTree('1 0 1 0 0 0 1 2'.split(' ').map(n => +n)) + const tree = parseTree('1 0 1 0 0 0 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(3) }) it('should parse test sequences', () => { - const {tree} = parseTree('1 1 0 0 4 1 2'.split(' ').map(n => +n)) + const tree = parseTree('1 1 0 0 4 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(2) expect(tree[0].metadata).toEqual([4]) }) it('should parse test sequences', () => { - const {tree} = parseTree('1 1 0 2 5 6 4 1 2'.split(' ').map(n => +n)) + const tree = parseTree('1 1 0 2 5 6 4 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(2) expect(tree[0].metadata).toEqual([4]) expect(tree[1].metadata).toEqual([5, 6]) }) it('should parse the example sequence', () => { - const {tree} = parseTree('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2'.split(' ').map(n => +n)) + const tree = parseTree('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(4) }) @@ -69,6 +85,15 @@ describe('metadataSum', () => { expect(metadataSum('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2')).toEqual(138) }) it('should sum the puzzle sequence', () => { - expect(metadataSum(readFileSync('./day8.txt', 'utf-8'))).toEqual(138) + expect(metadataSum(input)).toEqual(36627) + }) +}) + +describe('rootNodeSum', () => { + it('should calculate the example sequence', () => { + expect(rootNodeSum('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2')).toEqual(66) + }) + it('should calculate the puzzle sequence', () => { + expect(rootNodeSum(input)).toEqual(16695) }) }) From b843ea221a8b2630b29f74cbcf21a2e1c47533ac Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 14 Dec 2018 00:09:34 +0100 Subject: [PATCH 29/56] day 9, part 1 --- day9.spec.js | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 day9.spec.js diff --git a/day9.spec.js b/day9.spec.js new file mode 100644 index 0000000..e1699fe --- /dev/null +++ b/day9.spec.js @@ -0,0 +1,114 @@ +'use strict' + +const {readFileSync} = require('fs') + +/* global describe, it, expect, safeRegion */ + +class Circle { + constructor (numPlayers) { + this.marbles = [] + this.numPlayers = numPlayers + this.scores = {} + for (let i = 0; i < numPlayers; i++) { + this.scores[i] = 0 + } + } + + placeMarble () { + if (this.currentMarble === undefined) { + this.currentMarble = 0 + this.placements = 0 + this.marbles.push(this.currentMarble) + } else { + const marbleToBePlaced = ++this.placements + const currentPlayer = this.placements % this.numPlayers + if (marbleToBePlaced % 23 === 0) { + // However, if the marble that is about to be placed has a number which is a multiple of 23, something entirely different happens: + // First, the current player keeps the marble they would have placed, adding it to their score. + this.scores[currentPlayer] += marbleToBePlaced + // In addition, the marble 7 marbles counter-clockwise from the current marble is removed from the circle + let idx = (this.marbles.indexOf(this.currentMarble) - 7) % this.marbles.length + // Correct negative offset + if (idx < 0) { + idx = this.marbles.length + idx + } + // The marble located immediately clockwise of the marble that was removed becomes the new current marble. + this.currentMarble = this.marbles[(idx + 1) % this.marbles.length] + // and also added to the current player's score. + this.scores[currentPlayer] += this.marbles[idx] + this.marbles.splice(idx, 1) + } else { + const idx = (this.marbles.indexOf(this.currentMarble) + 1) % this.marbles.length + this.marbles.splice(idx + 1, 0, marbleToBePlaced) + this.currentMarble = marbleToBePlaced + } + } + } + + winningScore () { + return Object.keys(this.scores).reduce((max, player) => this.scores[player] > max ? this.scores[player] : max, 0) + } +} + +const getWinningScore = (numPlayers, maxMarble) => { + const g = new Circle(numPlayers) + for (let i = 0; i <= maxMarble; i++) { + g.placeMarble() + } + return g.winningScore() +} + +describe('marble mania', () => { + it('should calculate the winning score', () => { + const c = new Circle(5) + c.placeMarble() + expect(c.currentMarble).toEqual(0) + expect(c.marbles).toEqual([0]) + c.placeMarble() + expect(c.currentMarble).toEqual(1) + expect(c.marbles).toEqual([0, 1]) + c.placeMarble() + expect(c.currentMarble).toEqual(2) + expect(c.marbles).toEqual([0, 2, 1]) + c.placeMarble() + expect(c.currentMarble).toEqual(3) + expect(c.marbles).toEqual([0, 2, 1, 3]) + c.placeMarble() + expect(c.currentMarble).toEqual(4) + expect(c.marbles).toEqual([0, 4, 2, 1, 3]) + for (let i = 0; i < 18; i++) { + c.placeMarble() + } + expect(c.currentMarble).toEqual(22) + expect(c.marbles).toEqual([ + 0, 16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 + ]) + // Rule 23 + c.placeMarble() + expect(c.currentMarble).toEqual(19) + expect(c.marbles).toEqual([ + 0, 16, 8, 17, 4, 18, 19, 2, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 + ]) + c.placeMarble() + expect(c.currentMarble).toEqual(24) + expect(c.marbles).toEqual([ + 0, 16, 8, 17, 4, 18, 19, 2, 24, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 + ]) + c.placeMarble() + expect(c.currentMarble).toEqual(25) + expect(c.marbles).toEqual([ + 0, 16, 8, 17, 4, 18, 19, 2, 24, 20, 25, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 + ]) + expect(c.winningScore()).toEqual(32) + }) + it('should calculate the winning score for the examples', () => { + expect(getWinningScore(10, 1618)).toEqual(8317) + expect(getWinningScore(13, 7999)).toEqual(146373) + expect(getWinningScore(17, 1104)).toEqual(2764) + expect(getWinningScore(21, 6111)).toEqual(54718) + expect(getWinningScore(30, 5807)).toEqual(37305) + }) + it('should calculate the puzzle', () => { + expect(getWinningScore(413, 71082)).toEqual(416424) + }) +}) From 5bf46970deabdfde4cb2413324eff04cbcb2ab27 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sat, 15 Dec 2018 12:36:21 +0100 Subject: [PATCH 30/56] day 9: extract functions --- day9.js | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ day9.spec.js | 55 +------------------------------------------------ 2 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 day9.js diff --git a/day9.js b/day9.js new file mode 100644 index 0000000..25aa7bd --- /dev/null +++ b/day9.js @@ -0,0 +1,58 @@ +class Circle { + constructor (numPlayers) { + this.marbles = [] + this.numPlayers = numPlayers + this.scores = {} + for (let i = 0; i < numPlayers; i++) { + this.scores[i] = 0 + } + } + + placeMarble () { + if (this.currentMarble === undefined) { + this.currentMarble = 0 + this.placements = 0 + this.marbles.push(this.currentMarble) + } else { + const marbleToBePlaced = ++this.placements + const currentPlayer = this.placements % this.numPlayers + if (marbleToBePlaced % 23 === 0) { + // However, if the marble that is about to be placed has a number which is a multiple of 23, something entirely different happens: + // First, the current player keeps the marble they would have placed, adding it to their score. + this.scores[currentPlayer] += marbleToBePlaced + // In addition, the marble 7 marbles counter-clockwise from the current marble is removed from the circle + let idx = (this.marbles.indexOf(this.currentMarble) - 7) % this.marbles.length + // Correct negative offset + if (idx < 0) { + idx = this.marbles.length + idx + } + // The marble located immediately clockwise of the marble that was removed becomes the new current marble. + this.currentMarble = this.marbles[(idx + 1) % this.marbles.length] + // and also added to the current player's score. + this.scores[currentPlayer] += this.marbles[idx] + this.marbles.splice(idx, 1) + } else { + const idx = (this.marbles.indexOf(this.currentMarble) + 1) % this.marbles.length + this.marbles.splice(idx + 1, 0, marbleToBePlaced) + this.currentMarble = marbleToBePlaced + } + } + } + + winningScore () { + return Object.keys(this.scores).reduce((max, player) => this.scores[player] > max ? this.scores[player] : max, 0) + } +} + +const getWinningScore = (numPlayers, maxMarble) => { + const g = new Circle(numPlayers) + for (let i = 0; i <= maxMarble; i++) { + g.placeMarble() + } + return g.winningScore() +} + +module.exports = { + getWinningScore, + Circle +} diff --git a/day9.spec.js b/day9.spec.js index e1699fe..bbafe26 100644 --- a/day9.spec.js +++ b/day9.spec.js @@ -1,63 +1,10 @@ 'use strict' const {readFileSync} = require('fs') +const { Circle, getWinningScore } = require('./day9') /* global describe, it, expect, safeRegion */ -class Circle { - constructor (numPlayers) { - this.marbles = [] - this.numPlayers = numPlayers - this.scores = {} - for (let i = 0; i < numPlayers; i++) { - this.scores[i] = 0 - } - } - - placeMarble () { - if (this.currentMarble === undefined) { - this.currentMarble = 0 - this.placements = 0 - this.marbles.push(this.currentMarble) - } else { - const marbleToBePlaced = ++this.placements - const currentPlayer = this.placements % this.numPlayers - if (marbleToBePlaced % 23 === 0) { - // However, if the marble that is about to be placed has a number which is a multiple of 23, something entirely different happens: - // First, the current player keeps the marble they would have placed, adding it to their score. - this.scores[currentPlayer] += marbleToBePlaced - // In addition, the marble 7 marbles counter-clockwise from the current marble is removed from the circle - let idx = (this.marbles.indexOf(this.currentMarble) - 7) % this.marbles.length - // Correct negative offset - if (idx < 0) { - idx = this.marbles.length + idx - } - // The marble located immediately clockwise of the marble that was removed becomes the new current marble. - this.currentMarble = this.marbles[(idx + 1) % this.marbles.length] - // and also added to the current player's score. - this.scores[currentPlayer] += this.marbles[idx] - this.marbles.splice(idx, 1) - } else { - const idx = (this.marbles.indexOf(this.currentMarble) + 1) % this.marbles.length - this.marbles.splice(idx + 1, 0, marbleToBePlaced) - this.currentMarble = marbleToBePlaced - } - } - } - - winningScore () { - return Object.keys(this.scores).reduce((max, player) => this.scores[player] > max ? this.scores[player] : max, 0) - } -} - -const getWinningScore = (numPlayers, maxMarble) => { - const g = new Circle(numPlayers) - for (let i = 0; i <= maxMarble; i++) { - g.placeMarble() - } - return g.winningScore() -} - describe('marble mania', () => { it('should calculate the winning score', () => { const c = new Circle(5) From d039451659700244d22a34a08ea1f30e0d3df04b Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sat, 15 Dec 2018 12:53:33 +0100 Subject: [PATCH 31/56] day 9, part 2 --- day9.js | 48 ++++++++++++++++++++++++++++++++---------------- day9.spec.js | 37 +++++++++++++++++++------------------ 2 files changed, 51 insertions(+), 34 deletions(-) diff --git a/day9.js b/day9.js index 25aa7bd..e47b751 100644 --- a/day9.js +++ b/day9.js @@ -1,6 +1,5 @@ class Circle { constructor (numPlayers) { - this.marbles = [] this.numPlayers = numPlayers this.scores = {} for (let i = 0; i < numPlayers; i++) { @@ -10,35 +9,52 @@ class Circle { placeMarble () { if (this.currentMarble === undefined) { - this.currentMarble = 0 + const marble = {n: 0} + marble.next = marble + marble.prev = marble + this.currentMarble = marble + this.firstMarble = marble this.placements = 0 - this.marbles.push(this.currentMarble) } else { - const marbleToBePlaced = ++this.placements + const marbleToBePlacedValue = ++this.placements const currentPlayer = this.placements % this.numPlayers - if (marbleToBePlaced % 23 === 0) { + if (marbleToBePlacedValue % 23 === 0) { // However, if the marble that is about to be placed has a number which is a multiple of 23, something entirely different happens: // First, the current player keeps the marble they would have placed, adding it to their score. - this.scores[currentPlayer] += marbleToBePlaced + this.scores[currentPlayer] += marbleToBePlacedValue // In addition, the marble 7 marbles counter-clockwise from the current marble is removed from the circle - let idx = (this.marbles.indexOf(this.currentMarble) - 7) % this.marbles.length - // Correct negative offset - if (idx < 0) { - idx = this.marbles.length + idx + let marbleToRemove = this.currentMarble + for (let i = 0; i < 7; i++) { + marbleToRemove = marbleToRemove.prev } + marbleToRemove.prev.next = marbleToRemove.next // The marble located immediately clockwise of the marble that was removed becomes the new current marble. - this.currentMarble = this.marbles[(idx + 1) % this.marbles.length] + this.currentMarble = marbleToRemove.next // and also added to the current player's score. - this.scores[currentPlayer] += this.marbles[idx] - this.marbles.splice(idx, 1) + this.scores[currentPlayer] += marbleToRemove.n } else { - const idx = (this.marbles.indexOf(this.currentMarble) + 1) % this.marbles.length - this.marbles.splice(idx + 1, 0, marbleToBePlaced) - this.currentMarble = marbleToBePlaced + const marble = { + n: marbleToBePlacedValue, + prev: this.currentMarble.next, + next: this.currentMarble.next.next + } + this.currentMarble.next.next = marble + this.currentMarble.next.next.next.prev = marble + this.currentMarble = marble } } } + marbles () { + const marbles = [] + let marble = this.firstMarble + do { + marbles.push(marble.n) + marble = marble.next + } while (marble !== this.firstMarble) + return marbles + } + winningScore () { return Object.keys(this.scores).reduce((max, player) => this.scores[player] > max ? this.scores[player] : max, 0) } diff --git a/day9.spec.js b/day9.spec.js index bbafe26..3f1542d 100644 --- a/day9.spec.js +++ b/day9.spec.js @@ -9,41 +9,41 @@ describe('marble mania', () => { it('should calculate the winning score', () => { const c = new Circle(5) c.placeMarble() - expect(c.currentMarble).toEqual(0) - expect(c.marbles).toEqual([0]) + expect(c.currentMarble.n).toEqual(0) + expect(c.marbles()).toEqual([0]) c.placeMarble() - expect(c.currentMarble).toEqual(1) - expect(c.marbles).toEqual([0, 1]) + expect(c.currentMarble.n).toEqual(1) + expect(c.marbles()).toEqual([0, 1]) c.placeMarble() - expect(c.currentMarble).toEqual(2) - expect(c.marbles).toEqual([0, 2, 1]) + expect(c.currentMarble.n).toEqual(2) + expect(c.marbles()).toEqual([0, 2, 1]) c.placeMarble() - expect(c.currentMarble).toEqual(3) - expect(c.marbles).toEqual([0, 2, 1, 3]) + expect(c.currentMarble.n).toEqual(3) + expect(c.marbles()).toEqual([0, 2, 1, 3]) c.placeMarble() - expect(c.currentMarble).toEqual(4) - expect(c.marbles).toEqual([0, 4, 2, 1, 3]) + expect(c.currentMarble.n).toEqual(4) + expect(c.marbles()).toEqual([0, 4, 2, 1, 3]) for (let i = 0; i < 18; i++) { c.placeMarble() } - expect(c.currentMarble).toEqual(22) - expect(c.marbles).toEqual([ + expect(c.currentMarble.n).toEqual(22) + expect(c.marbles()).toEqual([ 0, 16, 8, 17, 4, 18, 9, 19, 2, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 ]) // Rule 23 c.placeMarble() - expect(c.currentMarble).toEqual(19) - expect(c.marbles).toEqual([ + expect(c.currentMarble.n).toEqual(19) + expect(c.marbles()).toEqual([ 0, 16, 8, 17, 4, 18, 19, 2, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 ]) c.placeMarble() - expect(c.currentMarble).toEqual(24) - expect(c.marbles).toEqual([ + expect(c.currentMarble.n).toEqual(24) + expect(c.marbles()).toEqual([ 0, 16, 8, 17, 4, 18, 19, 2, 24, 20, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 ]) c.placeMarble() - expect(c.currentMarble).toEqual(25) - expect(c.marbles).toEqual([ + expect(c.currentMarble.n).toEqual(25) + expect(c.marbles()).toEqual([ 0, 16, 8, 17, 4, 18, 19, 2, 24, 20, 25, 10, 21, 5, 22, 11, 1, 12, 6, 13, 3, 14, 7, 15 ]) expect(c.winningScore()).toEqual(32) @@ -57,5 +57,6 @@ describe('marble mania', () => { }) it('should calculate the puzzle', () => { expect(getWinningScore(413, 71082)).toEqual(416424) + expect(getWinningScore(413, 7108200)).toEqual(3498287922) }) }) From 88e6fb74b5a1f2a2929a3012540c132c9471c4c4 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 16 Dec 2018 23:37:10 +0100 Subject: [PATCH 32/56] day 10 with array --- day10.js | 64 +++++++++ day10.run.js | 13 ++ day10.spec.js | 121 +++++++++++++++++ day10.txt | 363 ++++++++++++++++++++++++++++++++++++++++++++++++++ day9.spec.js | 1 - 5 files changed, 561 insertions(+), 1 deletion(-) create mode 100644 day10.js create mode 100644 day10.run.js create mode 100644 day10.spec.js create mode 100644 day10.txt diff --git a/day10.js b/day10.js new file mode 100644 index 0000000..3dad420 --- /dev/null +++ b/day10.js @@ -0,0 +1,64 @@ +const parsePoints = points => points.map( + p => { + const groups = p.match(/position=< *(?-?[0-9]+), *(?-?[0-9]+)> velocity=< *(?-?[0-9]+), *(?-?[0-9]+)>/).groups + return { + x: parseInt(groups.x, 10), + y: parseInt(groups.y, 10), + vx: parseInt(groups.vx, 10), + vy: parseInt(groups.vy, 10) + } + } +) + +const movePoints = points => points.map(({x, y, vx, vy}) => ({ + x: x + vx, + y: y + vy, + vx, + vy +})) + +const drawMap = points => { + const [minX, minY, maxX, maxY] = [ + points.reduce((min, {x}) => { + if (x < min) return x + return min + }, Number.MAX_SAFE_INTEGER), + points.reduce((min, {y}) => { + if (y < min) return y + return min + }, Number.MAX_SAFE_INTEGER), + points.reduce((max, {x}) => { + if (x > max) return x + return max + }, 0), + points.reduce((max, {y}) => { + if (y > max) return y + return max + }, 0) + ] + const offsetX = minX < 0 ? Math.abs(minX) : 0 + const offsetY = minY < 0 ? Math.abs(minY) : 0 + const map = [] + for (let y = 0; y <= maxY + offsetY; y++) { + map[y] = [] + for (let x = 0; x <= maxX + offsetX; x++) { + map[y][x] = '.' + } + } + points.forEach(({x, y}) => { + const mapY = y + offsetY + const mapX = x + offsetX + map[mapY][mapX] = '#' + }) + let flattened = '' + map.forEach(row => { + flattened += row.join('') + '\n' + }) + return flattened +} + +module.exports = { + parsePoints, + movePoints, + drawMap +} diff --git a/day10.run.js b/day10.run.js new file mode 100644 index 0000000..e616bb9 --- /dev/null +++ b/day10.run.js @@ -0,0 +1,13 @@ +'use strict' + +const {parsePoints, movePoints, drawMap} = require('./day10') +const {readFileSync} = require('fs') +const input = readFileSync('./day10.txt', 'utf-8'); + +let points = parsePoints(input.split('\n')) + +const render = () => { + console.log(drawMap(points)) +} + +render() \ No newline at end of file diff --git a/day10.spec.js b/day10.spec.js new file mode 100644 index 0000000..0243039 --- /dev/null +++ b/day10.spec.js @@ -0,0 +1,121 @@ +'use strict' + +const {parsePoints, movePoints, drawMap} = require('./day10') + +/* global describe, it, expect, safeRegion */ + +describe('stars alignment', () => { + it('should parse the points', () => { + expect(parsePoints([ + 'position=< 3, 9> velocity=< 1, -2>' + ])).toEqual([ + {x: 3, y: 9, vx: 1, vy: -2} + ]) + }) + it('should move the points', () => { + expect(movePoints(movePoints(movePoints(parsePoints([ + 'position=< 3, 9> velocity=< 1, -2>' + ]))))).toEqual([ + {x: 6, y: 3, vx: 1, vy: -2} + ]) + }) + it('should draw the map', () => { + expect(drawMap([ + {x: 0, y: 0} + ])).toEqual( + '#\n' + ) + expect(drawMap([ + {x: 1, y: 1} + ])).toEqual( + '..\n' + + '.#\n' + ) + expect(drawMap([ + {x: 3, y: 2, vx: 1, vy: -2}, + {x: 6, y: 3, vx: 1, vy: -2} + ])).toEqual( + '.......\n' + + '.......\n' + + '...#...\n' + + '......#\n' + ) + }) + it('should draw the example map', () => { + const points = parsePoints([ + 'position=< 9, 1> velocity=< 0, 2>', + 'position=< 7, 0> velocity=<-1, 0>', + 'position=< 3, -2> velocity=<-1, 1>', + 'position=< 6, 10> velocity=<-2, -1>', + 'position=< 2, -4> velocity=< 2, 2>', + 'position=<-6, 10> velocity=< 2, -2>', + 'position=< 1, 8> velocity=< 1, -1>', + 'position=< 1, 7> velocity=< 1, 0>', + 'position=<-3, 11> velocity=< 1, -2>', + 'position=< 7, 6> velocity=<-1, -1>', + 'position=<-2, 3> velocity=< 1, 0>', + 'position=<-4, 3> velocity=< 2, 0>', + 'position=<10, -3> velocity=<-1, 1>', + 'position=< 5, 11> velocity=< 1, -2>', + 'position=< 4, 7> velocity=< 0, -1>', + 'position=< 8, -2> velocity=< 0, 1>', + 'position=<15, 0> velocity=<-2, 0>', + 'position=< 1, 6> velocity=< 1, 0>', + 'position=< 8, 9> velocity=< 0, -1>', + 'position=< 3, 3> velocity=<-1, 1>', + 'position=< 0, 5> velocity=< 0, -1>', + 'position=<-2, 2> velocity=< 2, 0>', + 'position=< 5, -2> velocity=< 1, 2>', + 'position=< 1, 4> velocity=< 2, 1>', + 'position=<-2, 7> velocity=< 2, -2>', + 'position=< 3, 6> velocity=<-1, -1>', + 'position=< 5, 0> velocity=< 1, 0>', + 'position=<-6, 0> velocity=< 2, 0>', + 'position=< 5, 9> velocity=< 1, -2>', + 'position=<14, 7> velocity=<-2, 0>', + 'position=<-3, 6> velocity=< 2, -1>' + ]) + expect(drawMap(points)).toEqual( + '........#.............\n' + + '................#.....\n' + + '.........#.#..#.......\n' + + '......................\n' + + '#..........#.#.......#\n' + + '...............#......\n' + + '....#.................\n' + + '..#.#....#............\n' + + '.......#..............\n' + + '......#...............\n' + + '...#...#.#...#........\n' + + '....#..#..#.........#.\n' + + '.......#..............\n' + + '...........#..#.......\n' + + '#...........#.........\n' + + '...#.......#..........\n' + ) + expect(drawMap(movePoints(points))).toEqual( + '........#....#....\n' + + '......#.....#.....\n' + + '#.........#......#\n' + + '..................\n' + + '....#.............\n' + + '..##.........#....\n' + + '....#.#...........\n' + + '...##.##..#.......\n' + + '......#.#.........\n' + + '......#...#.....#.\n' + + '#...........#.....\n' + + '..#.....#.#.......\n' + ) + expect(drawMap(movePoints(movePoints(movePoints(points))))).toEqual( + '#...#..###\n' + + '#...#...#.\n' + + '#...#...#.\n' + + '#####...#.\n' + + '#...#...#.\n' + + '#...#...#.\n' + + '#...#...#.\n' + + '#...#..###\n' + ) + }) +}) diff --git a/day10.txt b/day10.txt new file mode 100644 index 0000000..8efd214 --- /dev/null +++ b/day10.txt @@ -0,0 +1,363 @@ +position=<-31138, -10302> velocity=< 3, 1> +position=< 10703, 41994> velocity=<-1, -4> +position=< 52503, 21082> velocity=<-5, -2> +position=<-31135, 10618> velocity=< 3, -1> +position=< 42051, -41680> velocity=<-4, 4> +position=<-41605, -10302> velocity=< 4, 1> +position=<-10212, -52139> velocity=< 1, 5> +position=< 52534, -31215> velocity=<-5, 3> +position=< 52528, -52131> velocity=<-5, 5> +position=< 21125, -10298> velocity=<-2, 1> +position=<-41584, 10614> velocity=< 4, -1> +position=<-52096, 21082> velocity=< 5, -2> +position=<-20711, 42000> velocity=< 2, -4> +position=<-10248, 21073> velocity=< 1, -2> +position=< 31619, 10619> velocity=<-3, -1> +position=<-52080, -31222> velocity=< 5, 3> +position=< 52494, -31214> velocity=<-5, 3> +position=< 21133, 52459> velocity=<-2, -5> +position=<-20695, -10304> velocity=< 2, 1> +position=< 52554, 31540> velocity=<-5, -3> +position=<-10208, -41674> velocity=< 1, 4> +position=< 21157, 52457> velocity=<-2, -5> +position=< 31628, 52456> velocity=<-3, -5> +position=<-41605, -31214> velocity=< 4, 3> +position=< 52523, -31220> velocity=<-5, 3> +position=< 10714, 41991> velocity=<-1, -4> +position=<-10248, -10300> velocity=< 1, 1> +position=<-31170, 31540> velocity=< 3, -3> +position=<-31166, -20759> velocity=< 3, 2> +position=<-41621, 21074> velocity=< 4, -2> +position=< 21125, 52451> velocity=<-2, -5> +position=< 10663, 21075> velocity=<-1, -2> +position=< 10658, -31220> velocity=<-1, 3> +position=<-31158, 52457> velocity=< 3, -5> +position=< 31616, -20759> velocity=<-3, 2> +position=<-31177, -20761> velocity=< 3, 2> +position=<-20703, -20763> velocity=< 2, 2> +position=<-20711, 52458> velocity=< 2, -5> +position=<-52091, -52131> velocity=< 5, 5> +position=<-52052, -52134> velocity=< 5, 5> +position=<-20714, 10617> velocity=< 2, -1> +position=<-10235, 41995> velocity=< 1, -4> +position=< 52518, 10616> velocity=<-5, -1> +position=< 42084, -31216> velocity=<-4, 3> +position=< 52527, -10295> velocity=<-5, 1> +position=<-31120, -10301> velocity=< 3, 1> +position=<-20719, 52450> velocity=< 2, -5> +position=< 10661, -31216> velocity=<-1, 3> +position=<-52040, 31540> velocity=< 5, -3> +position=< 52550, 52457> velocity=<-5, -5> +position=<-10210, 10619> velocity=< 1, -1> +position=< 10675, -41675> velocity=<-1, 4> +position=< 10714, -31220> velocity=<-1, 3> +position=<-10217, 41991> velocity=< 1, -4> +position=<-41579, 21079> velocity=< 4, -2> +position=<-52084, 42000> velocity=< 5, -4> +position=<-10236, -31219> velocity=< 1, 3> +position=<-41587, 10618> velocity=< 4, -1> +position=<-31143, -41672> velocity=< 3, 4> +position=<-41637, 21080> velocity=< 4, -2> +position=<-41597, 52453> velocity=< 4, -5> +position=<-41588, 41993> velocity=< 4, -4> +position=<-10240, 31534> velocity=< 1, -3> +position=< 10716, -20760> velocity=<-1, 2> +position=< 52518, 31533> velocity=<-5, -3> +position=< 21128, 10618> velocity=<-2, -1> +position=<-20658, 21073> velocity=< 2, -2> +position=<-41637, -52135> velocity=< 4, 5> +position=<-20659, 52451> velocity=< 2, -5> +position=<-10257, 21079> velocity=< 1, -2> +position=<-31176, 21076> velocity=< 3, -2> +position=<-20695, -20760> velocity=< 2, 2> +position=< 31616, -52140> velocity=<-3, 5> +position=<-10251, 42000> velocity=< 1, -4> +position=<-20674, 31533> velocity=< 2, -3> +position=<-10252, 31536> velocity=< 1, -3> +position=<-10215, -52137> velocity=< 1, 5> +position=<-20679, -31220> velocity=< 2, 3> +position=< 21141, -41678> velocity=<-2, 4> +position=< 42080, 31533> velocity=<-4, -3> +position=<-31146, -52140> velocity=< 3, 5> +position=<-31169, -41677> velocity=< 3, 4> +position=<-52096, -31216> velocity=< 5, 3> +position=<-41592, 52453> velocity=< 4, -5> +position=< 10686, 10614> velocity=<-1, -1> +position=< 31625, 41998> velocity=<-3, -4> +position=< 10658, -10296> velocity=<-1, 1> +position=<-52056, 21073> velocity=< 5, -2> +position=<-41618, 52455> velocity=< 4, -5> +position=< 21117, 31532> velocity=<-2, -3> +position=< 10667, -20759> velocity=<-1, 2> +position=<-20717, 52453> velocity=< 2, -5> +position=< 10658, -20762> velocity=<-1, 2> +position=<-52064, -31219> velocity=< 5, 3> +position=<-52047, -10297> velocity=< 5, 1> +position=<-20663, -31213> velocity=< 2, 3> +position=<-41586, -10299> velocity=< 4, 1> +position=< 31632, 21079> velocity=<-3, -2> +position=<-20715, 41998> velocity=< 2, -4> +position=<-20714, -52139> velocity=< 2, 5> +position=< 21137, 41994> velocity=<-2, -4> +position=<-52038, 21076> velocity=< 5, -2> +position=<-52051, 52458> velocity=< 5, -5> +position=< 10690, -41680> velocity=<-1, 4> +position=< 21149, 41998> velocity=<-2, -4> +position=<-10257, -41676> velocity=< 1, 4> +position=< 52550, -31218> velocity=<-5, 3> +position=< 31616, -20754> velocity=<-3, 2> +position=<-52056, 21078> velocity=< 5, -2> +position=< 21166, -31215> velocity=<-2, 3> +position=<-31135, 10614> velocity=< 3, -1> +position=<-52088, 52456> velocity=< 5, -5> +position=<-10216, -41677> velocity=< 1, 4> +position=< 21117, 31535> velocity=<-2, -3> +position=< 10658, 41993> velocity=<-1, -4> +position=<-20714, 52459> velocity=< 2, -5> +position=< 42091, 21074> velocity=<-4, -2> +position=< 31600, -52133> velocity=<-3, 5> +position=< 21119, 10618> velocity=<-2, -1> +position=< 21170, 31532> velocity=<-2, -3> +position=< 42048, -10295> velocity=<-4, 1> +position=< 52535, 41991> velocity=<-5, -4> +position=< 42067, -52138> velocity=<-4, 5> +position=< 52530, 31541> velocity=<-5, -3> +position=< 10714, -41676> velocity=<-1, 4> +position=< 42087, -52138> velocity=<-4, 5> +position=< 21117, 52458> velocity=<-2, -5> +position=<-41576, 31532> velocity=< 4, -3> +position=< 42052, 21075> velocity=<-4, -2> +position=< 10663, 52455> velocity=<-1, -5> +position=< 42091, -20754> velocity=<-4, 2> +position=<-20700, -10299> velocity=< 2, 1> +position=< 52538, -20757> velocity=<-5, 2> +position=<-52088, -41674> velocity=< 5, 4> +position=< 31608, -31217> velocity=<-3, 3> +position=< 10711, -41672> velocity=<-1, 4> +position=< 52502, 52452> velocity=<-5, -5> +position=< 10663, 21077> velocity=<-1, -2> +position=<-41629, -10298> velocity=< 4, 1> +position=<-20687, -10296> velocity=< 2, 1> +position=<-41581, -10299> velocity=< 4, 1> +position=< 10693, -10295> velocity=<-1, 1> +position=< 42075, 42000> velocity=<-4, -4> +position=< 42051, 41999> velocity=<-4, -4> +position=< 52518, 21082> velocity=<-5, -2> +position=< 21122, -10303> velocity=<-2, 1> +position=< 42068, 31541> velocity=<-4, -3> +position=<-20676, -10299> velocity=< 2, 1> +position=<-20666, -10295> velocity=< 2, 1> +position=< 31608, 41996> velocity=<-3, -4> +position=< 10709, 52455> velocity=<-1, -5> +position=<-31129, 52452> velocity=< 3, -5> +position=<-20698, -52131> velocity=< 2, 5> +position=< 31608, 52453> velocity=<-3, -5> +position=<-31168, -31213> velocity=< 3, 3> +position=< 52523, -52138> velocity=<-5, 5> +position=< 10663, 41999> velocity=<-1, -4> +position=< 52515, -31221> velocity=<-5, 3> +position=< 10695, -31213> velocity=<-1, 3> +position=<-10243, -10297> velocity=< 1, 1> +position=< 42067, -10300> velocity=<-4, 1> +position=<-20668, 21077> velocity=< 2, -2> +position=< 42051, 41999> velocity=<-4, -4> +position=< 42063, -10300> velocity=<-4, 1> +position=<-10217, -20758> velocity=< 1, 2> +position=<-10252, -41678> velocity=< 1, 4> +position=<-41600, 42000> velocity=< 4, -4> +position=<-20679, 41994> velocity=< 2, -4> +position=<-52051, -20754> velocity=< 5, 2> +position=< 42048, -31213> velocity=<-4, 3> +position=< 10682, -20759> velocity=<-1, 2> +position=< 10678, 21075> velocity=<-1, -2> +position=< 42060, -20759> velocity=<-4, 2> +position=<-52068, 31536> velocity=< 5, -3> +position=<-31174, 31540> velocity=< 3, -3> +position=<-10248, 52459> velocity=< 1, -5> +position=<-10236, -20756> velocity=< 1, 2> +position=< 52503, -52131> velocity=<-5, 5> +position=<-31161, 41998> velocity=< 3, -4> +position=< 31624, -20763> velocity=<-3, 2> +position=< 31596, -41674> velocity=<-3, 4> +position=<-10228, 31538> velocity=< 1, -3> +position=< 10682, -52139> velocity=<-1, 5> +position=< 10658, -20763> velocity=<-1, 2> +position=<-52091, -20758> velocity=< 5, 2> +position=<-41605, -10303> velocity=< 4, 1> +position=<-20668, -52135> velocity=< 2, 5> +position=<-41610, 31536> velocity=< 4, -3> +position=<-52060, -52131> velocity=< 5, 5> +position=< 42084, 52456> velocity=<-4, -5> +position=< 10671, -20763> velocity=<-1, 2> +position=< 21174, 52455> velocity=<-2, -5> +position=<-20695, -41676> velocity=< 2, 4> +position=< 52499, 52454> velocity=<-5, -5> +position=<-31170, 10614> velocity=< 3, -1> +position=< 10658, 31539> velocity=<-1, -3> +position=< 52543, -41678> velocity=<-5, 4> +position=< 31621, -31220> velocity=<-3, 3> +position=< 10690, 31536> velocity=<-1, -3> +position=< 10658, 52452> velocity=<-1, -5> +position=< 10679, 31533> velocity=<-1, -3> +position=< 42083, -41673> velocity=<-4, 4> +position=<-10252, 31532> velocity=< 1, -3> +position=< 52528, 42000> velocity=<-5, -4> +position=<-10231, -10303> velocity=< 1, 1> +position=<-41588, 31535> velocity=< 4, -3> +position=<-10234, -41677> velocity=< 1, 4> +position=< 31632, -52138> velocity=<-3, 5> +position=<-31158, -41675> velocity=< 3, 4> +position=< 31629, -10296> velocity=<-3, 1> +position=<-20695, 10618> velocity=< 2, -1> +position=<-10250, 10614> velocity=< 1, -1> +position=<-10204, -10296> velocity=< 1, 1> +position=<-31169, 52450> velocity=< 3, -5> +position=< 31601, -52136> velocity=<-3, 5> +position=< 42053, -31218> velocity=<-4, 3> +position=< 42087, -41679> velocity=<-4, 4> +position=<-20718, -10303> velocity=< 2, 1> +position=< 42045, -31218> velocity=<-4, 3> +position=<-10243, -41674> velocity=< 1, 4> +position=<-31141, -20754> velocity=< 3, 2> +position=<-41629, 21074> velocity=< 4, -2> +position=<-10217, -31218> velocity=< 1, 3> +position=<-31159, -41677> velocity=< 3, 4> +position=< 21173, 42000> velocity=<-2, -4> +position=<-52056, -41681> velocity=< 5, 4> +position=< 21161, 21080> velocity=<-2, -2> +position=< 42079, -20756> velocity=<-4, 2> +position=< 10699, 31532> velocity=<-1, -3> +position=<-52064, -10300> velocity=< 5, 1> +position=< 52503, -10300> velocity=<-5, 1> +position=< 21138, 10615> velocity=<-2, -1> +position=< 52499, 31540> velocity=<-5, -3> +position=< 42059, -41677> velocity=<-4, 4> +position=<-10250, -20754> velocity=< 1, 2> +position=<-10204, 21075> velocity=< 1, -2> +position=< 52499, -20758> velocity=<-5, 2> +position=< 52510, 52451> velocity=<-5, -5> +position=< 42061, -31222> velocity=<-4, 3> +position=<-41629, -41676> velocity=< 4, 4> +position=<-52078, 52455> velocity=< 5, -5> +position=<-10260, 21077> velocity=< 1, -2> +position=<-20698, 52459> velocity=< 2, -5> +position=<-52052, 21073> velocity=< 5, -2> +position=<-20711, -41681> velocity=< 2, 4> +position=< 42075, -20760> velocity=<-4, 2> +position=<-10228, -41672> velocity=< 1, 4> +position=< 10700, 21077> velocity=<-1, -2> +position=< 21146, 41992> velocity=<-2, -4> +position=<-41593, -41674> velocity=< 4, 4> +position=<-52069, 31532> velocity=< 5, -3> +position=<-41580, -31217> velocity=< 4, 3> +position=<-10252, -41677> velocity=< 1, 4> +position=< 21138, 21081> velocity=<-2, -2> +position=< 10682, 41997> velocity=<-1, -4> +position=< 10659, 52452> velocity=<-1, -5> +position=< 42076, 21077> velocity=<-4, -2> +position=<-20671, -10303> velocity=< 2, 1> +position=< 21157, -10299> velocity=<-2, 1> +position=< 52514, -20761> velocity=<-5, 2> +position=<-10207, 31532> velocity=< 1, -3> +position=<-10260, -41676> velocity=< 1, 4> +position=<-52043, -52139> velocity=< 5, 5> +position=< 21178, -41672> velocity=<-2, 4> +position=< 21149, 52452> velocity=<-2, -5> +position=< 10706, -31222> velocity=<-1, 3> +position=<-31134, -52136> velocity=< 3, 5> +position=< 10659, -52139> velocity=<-1, 5> +position=<-10232, -31218> velocity=< 1, 3> +position=<-20663, 10615> velocity=< 2, -1> +position=< 21145, 52450> velocity=<-2, -5> +position=< 42091, 41991> velocity=<-4, -4> +position=< 21136, 10619> velocity=<-2, -1> +position=< 10683, -10304> velocity=<-1, 1> +position=< 42040, -52131> velocity=<-4, 5> +position=< 42056, -10304> velocity=<-4, 1> +position=< 31634, 52456> velocity=<-3, -5> +position=< 42067, -31222> velocity=<-4, 3> +position=< 10699, -41681> velocity=<-1, 4> +position=<-31154, -20754> velocity=< 3, 2> +position=<-10248, 31536> velocity=< 1, -3> +position=< 52521, -31222> velocity=<-5, 3> +position=<-41617, 31539> velocity=< 4, -3> +position=<-20679, 31534> velocity=< 2, -3> +position=< 52542, 21082> velocity=<-5, -2> +position=< 42046, 41991> velocity=<-4, -4> +position=<-20719, 31541> velocity=< 2, -3> +position=<-41581, 41997> velocity=< 4, -4> +position=<-10260, -52137> velocity=< 1, 5> +position=< 52518, 10622> velocity=<-5, -1> +position=< 21170, -52131> velocity=<-2, 5> +position=< 42040, -20763> velocity=<-4, 2> +position=<-10215, -41673> velocity=< 1, 4> +position=<-31135, 10618> velocity=< 3, -1> +position=<-20703, -52132> velocity=< 2, 5> +position=<-31126, 41994> velocity=< 3, -4> +position=<-20659, 52458> velocity=< 2, -5> +position=< 52550, 41995> velocity=<-5, -4> +position=<-31162, 21073> velocity=< 3, -2> +position=< 21134, 21079> velocity=<-2, -2> +position=<-41637, 31538> velocity=< 4, -3> +position=< 10701, -52140> velocity=<-1, 5> +position=< 42080, -20761> velocity=<-4, 2> +position=< 31576, 10621> velocity=<-3, -1> +position=<-10243, -41675> velocity=< 1, 4> +position=<-10203, 10618> velocity=< 1, -1> +position=<-20718, -41680> velocity=< 2, 4> +position=< 42051, 52459> velocity=<-4, -5> +position=< 10707, -52137> velocity=<-1, 5> +position=< 42067, 10620> velocity=<-4, -1> +position=< 52534, -31214> velocity=<-5, 3> +position=< 10667, -20763> velocity=<-1, 2> +position=<-41629, 31536> velocity=< 4, -3> +position=<-31154, -20758> velocity=< 3, 2> +position=< 31608, -52140> velocity=<-3, 5> +position=<-20692, 21073> velocity=< 2, -2> +position=< 21167, 52455> velocity=<-2, -5> +position=<-31154, -10297> velocity=< 3, 1> +position=< 52546, 31539> velocity=<-5, -3> +position=< 42056, 10614> velocity=<-4, -1> +position=<-31121, -31217> velocity=< 3, 3> +position=< 52505, 10618> velocity=<-5, -1> +position=<-41581, 10617> velocity=< 4, -1> +position=< 42075, 31538> velocity=<-4, -3> +position=< 10669, 31532> velocity=<-1, -3> +position=<-52044, 31534> velocity=< 5, -3> +position=< 42052, 31534> velocity=<-4, -3> +position=< 10682, 41999> velocity=<-1, -4> +position=<-52052, 31532> velocity=< 5, -3> +position=< 10661, -20757> velocity=<-1, 2> +position=<-41597, 52451> velocity=< 4, -5> +position=<-41578, -20761> velocity=< 4, 2> +position=< 42039, 52457> velocity=<-4, -5> +position=< 52511, 21076> velocity=<-5, -2> +position=< 21165, -20763> velocity=<-2, 2> +position=<-10260, -31216> velocity=< 1, 3> +position=<-10249, 10623> velocity=< 1, -1> +position=<-10255, -41675> velocity=< 1, 4> +position=< 42068, 10623> velocity=<-4, -1> +position=<-41608, -31219> velocity=< 4, 3> +position=<-10255, 10621> velocity=< 1, -1> +position=<-10239, -20763> velocity=< 1, 2> +position=<-31170, 31540> velocity=< 3, -3> +position=<-20710, -20763> velocity=< 2, 2> +position=< 52526, 21076> velocity=<-5, -2> +position=< 52550, 41994> velocity=<-5, -4> +position=<-20700, 31536> velocity=< 2, -3> +position=< 31616, -52136> velocity=<-3, 5> +position=<-10199, 10623> velocity=< 1, -1> +position=< 52522, 10614> velocity=<-5, -1> +position=<-52091, -10296> velocity=< 5, 1> +position=<-10258, 31536> velocity=< 1, -3> +position=<-20670, -31220> velocity=< 2, 3> +position=<-10200, -52132> velocity=< 1, 5> +position=<-52054, 41991> velocity=< 5, -4> +position=<-41589, -31221> velocity=< 4, 3> +position=<-41633, 31540> velocity=< 4, -3> +position=<-31126, 10617> velocity=< 3, -1> +position=< 10669, 10618> velocity=<-1, -1> +position=<-41578, -20756> velocity=< 4, 2> +position=< 21157, 21079> velocity=<-2, -2> +position=< 10690, -10303> velocity=<-1, 1> +position=< 42045, 10623> velocity=<-4, -1> \ No newline at end of file diff --git a/day9.spec.js b/day9.spec.js index 3f1542d..0c25a58 100644 --- a/day9.spec.js +++ b/day9.spec.js @@ -1,6 +1,5 @@ 'use strict' -const {readFileSync} = require('fs') const { Circle, getWinningScore } = require('./day9') /* global describe, it, expect, safeRegion */ From d6c9140d50db33d0248a2e091b2b40dfdc48d1da Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 00:33:00 +0100 Subject: [PATCH 33/56] day 10, solved. --- day10.js | 23 +++++++++-------------- day10.run.js | 24 ++++++++++++++++++++---- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/day10.js b/day10.js index 3dad420..d3b1363 100644 --- a/day10.js +++ b/day10.js @@ -17,7 +17,7 @@ const movePoints = points => points.map(({x, y, vx, vy}) => ({ vy })) -const drawMap = points => { +const drawMap = (points, scale = 1) => { const [minX, minY, maxX, maxY] = [ points.reduce((min, {x}) => { if (x < min) return x @@ -38,23 +38,18 @@ const drawMap = points => { ] const offsetX = minX < 0 ? Math.abs(minX) : 0 const offsetY = minY < 0 ? Math.abs(minY) : 0 + const height = Math.ceil((maxY + offsetY + 1) * scale) + const width = Math.ceil((maxX + offsetX + 1) * scale) const map = [] - for (let y = 0; y <= maxY + offsetY; y++) { - map[y] = [] - for (let x = 0; x <= maxX + offsetX; x++) { - map[y][x] = '.' - } + for (let y = 0; y < height; y++) { + map[y] = '.'.repeat(width) } points.forEach(({x, y}) => { - const mapY = y + offsetY - const mapX = x + offsetX - map[mapY][mapX] = '#' - }) - let flattened = '' - map.forEach(row => { - flattened += row.join('') + '\n' + const mapY = Math.floor((y + offsetY) * scale) + const mapX = Math.floor((x + offsetX) * scale) + map[mapY] = map[mapY].substr(0, mapX) + '#' + map[mapY].substr(mapX + 1) }) - return flattened + return map } module.exports = { diff --git a/day10.run.js b/day10.run.js index e616bb9..e8d1223 100644 --- a/day10.run.js +++ b/day10.run.js @@ -2,12 +2,28 @@ const {parsePoints, movePoints, drawMap} = require('./day10') const {readFileSync} = require('fs') -const input = readFileSync('./day10.txt', 'utf-8'); +const input = readFileSync('./day10.txt', 'utf-8') let points = parsePoints(input.split('\n')) -const render = () => { - console.log(drawMap(points)) +let size = Number.MAX_SAFE_INTEGER + +for(let i = 0; i <= 10458; i++) { + points = movePoints(points) +} + +const render = (i = 0) => { + const map = drawMap(points) + const newSize = map[0].length * map.length + points = movePoints(points) + if (size >= newSize) { + console.log(i, newSize) + size = newSize + setTimeout(() => render(i + 1)) + } } -render() \ No newline at end of file +// render() + +const map = drawMap(points) +console.log(map.join('\n') + '\n') \ No newline at end of file From 697b62e5b559d573921c86b92820c686208f522a Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 00:53:37 +0100 Subject: [PATCH 34/56] day 10: add proof --- day10.run.js | 15 ----- day10.solution.txt | 165 +++++++++++++++++++++++++++++++++++++++++++++ day10.spec.js | 39 +++++++---- 3 files changed, 190 insertions(+), 29 deletions(-) create mode 100644 day10.solution.txt diff --git a/day10.run.js b/day10.run.js index e8d1223..a69a61c 100644 --- a/day10.run.js +++ b/day10.run.js @@ -6,24 +6,9 @@ const input = readFileSync('./day10.txt', 'utf-8') let points = parsePoints(input.split('\n')) -let size = Number.MAX_SAFE_INTEGER - for(let i = 0; i <= 10458; i++) { points = movePoints(points) } -const render = (i = 0) => { - const map = drawMap(points) - const newSize = map[0].length * map.length - points = movePoints(points) - if (size >= newSize) { - console.log(i, newSize) - size = newSize - setTimeout(() => render(i + 1)) - } -} - -// render() - const map = drawMap(points) console.log(map.join('\n') + '\n') \ No newline at end of file diff --git a/day10.solution.txt b/day10.solution.txt new file mode 100644 index 0000000..b93d7a2 --- /dev/null +++ b/day10.solution.txt @@ -0,0 +1,165 @@ +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +..................................................................................................................................................................................................................................................................... +.......................................................................................................................................................................................................#....#..######..#....#..#####...#.......#####...#....#..#....# +.......................................................................................................................................................................................................##...#..#.......#....#..#....#..#.......#....#..#....#..#...#. +.......................................................................................................................................................................................................##...#..#........#..#...#....#..#.......#....#...#..#...#..#.. +.......................................................................................................................................................................................................#.#..#..#........#..#...#....#..#.......#....#...#..#...#.#... +.......................................................................................................................................................................................................#.#..#..#####.....##....#####...#.......#####.....##....##.... +.......................................................................................................................................................................................................#..#.#..#.........##....#.......#.......#..#......##....##.... +.......................................................................................................................................................................................................#..#.#..#........#..#...#.......#.......#...#....#..#...#.#... +.......................................................................................................................................................................................................#...##..#........#..#...#.......#.......#...#....#..#...#..#.. +.......................................................................................................................................................................................................#...##..#.......#....#..#.......#.......#....#..#....#..#...#. +.......................................................................................................................................................................................................#....#..######..#....#..#.......######..#....#..#....#..#....# \ No newline at end of file diff --git a/day10.spec.js b/day10.spec.js index 0243039..c3a664a 100644 --- a/day10.spec.js +++ b/day10.spec.js @@ -1,9 +1,12 @@ 'use strict' -const {parsePoints, movePoints, drawMap} = require('./day10') - /* global describe, it, expect, safeRegion */ +const {parsePoints, movePoints, drawMap} = require('./day10') +const {readFileSync} = require('fs') +const input = readFileSync('./day10.txt', 'utf-8') +const solution = readFileSync('./day10.solution.txt', 'utf-8') + describe('stars alignment', () => { it('should parse the points', () => { expect(parsePoints([ @@ -22,23 +25,23 @@ describe('stars alignment', () => { it('should draw the map', () => { expect(drawMap([ {x: 0, y: 0} - ])).toEqual( - '#\n' + ]).join('\n')).toEqual( + '#' ) expect(drawMap([ {x: 1, y: 1} - ])).toEqual( + ]).join('\n')).toEqual( '..\n' + - '.#\n' + '.#' ) expect(drawMap([ {x: 3, y: 2, vx: 1, vy: -2}, {x: 6, y: 3, vx: 1, vy: -2} - ])).toEqual( + ]).join('\n')).toEqual( '.......\n' + '.......\n' + '...#...\n' + - '......#\n' + '......#' ) }) it('should draw the example map', () => { @@ -75,7 +78,7 @@ describe('stars alignment', () => { 'position=<14, 7> velocity=<-2, 0>', 'position=<-3, 6> velocity=< 2, -1>' ]) - expect(drawMap(points)).toEqual( + expect(drawMap(points).join('\n')).toEqual( '........#.............\n' + '................#.....\n' + '.........#.#..#.......\n' + @@ -91,9 +94,9 @@ describe('stars alignment', () => { '.......#..............\n' + '...........#..#.......\n' + '#...........#.........\n' + - '...#.......#..........\n' + '...#.......#..........' ) - expect(drawMap(movePoints(points))).toEqual( + expect(drawMap(movePoints(points)).join('\n')).toEqual( '........#....#....\n' + '......#.....#.....\n' + '#.........#......#\n' + @@ -105,9 +108,9 @@ describe('stars alignment', () => { '......#.#.........\n' + '......#...#.....#.\n' + '#...........#.....\n' + - '..#.....#.#.......\n' + '..#.....#.#.......' ) - expect(drawMap(movePoints(movePoints(movePoints(points))))).toEqual( + expect(drawMap(movePoints(movePoints(movePoints(points)))).join('\n')).toEqual( '#...#..###\n' + '#...#...#.\n' + '#...#...#.\n' + @@ -115,7 +118,15 @@ describe('stars alignment', () => { '#...#...#.\n' + '#...#...#.\n' + '#...#...#.\n' + - '#...#..###\n' + '#...#..###' ) }) + it('should solve the puzzle', () => { + let points = parsePoints(input.split('\n')) + + for (let i = 0; i <= 10458; i++) { + points = movePoints(points) + } + expect(drawMap(points).join('\n')).toEqual(solution) + }) }) From 0064e35df6729d31a42fc54caf98001b1553078c Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 08:09:52 +0100 Subject: [PATCH 35/56] day 10: normalize positive coordinates, too --- day10.js | 4 +- day10.solution.txt | 175 +++------------------------------------------ day10.spec.js | 9 +-- 3 files changed, 15 insertions(+), 173 deletions(-) diff --git a/day10.js b/day10.js index d3b1363..7e9b515 100644 --- a/day10.js +++ b/day10.js @@ -36,8 +36,8 @@ const drawMap = (points, scale = 1) => { return max }, 0) ] - const offsetX = minX < 0 ? Math.abs(minX) : 0 - const offsetY = minY < 0 ? Math.abs(minY) : 0 + const offsetX = -minX + const offsetY = -minY const height = Math.ceil((maxY + offsetY + 1) * scale) const width = Math.ceil((maxX + offsetX + 1) * scale) const map = [] diff --git a/day10.solution.txt b/day10.solution.txt index b93d7a2..48b731e 100644 --- a/day10.solution.txt +++ b/day10.solution.txt @@ -1,165 +1,10 @@ -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -..................................................................................................................................................................................................................................................................... -.......................................................................................................................................................................................................#....#..######..#....#..#####...#.......#####...#....#..#....# -.......................................................................................................................................................................................................##...#..#.......#....#..#....#..#.......#....#..#....#..#...#. -.......................................................................................................................................................................................................##...#..#........#..#...#....#..#.......#....#...#..#...#..#.. -.......................................................................................................................................................................................................#.#..#..#........#..#...#....#..#.......#....#...#..#...#.#... -.......................................................................................................................................................................................................#.#..#..#####.....##....#####...#.......#####.....##....##.... -.......................................................................................................................................................................................................#..#.#..#.........##....#.......#.......#..#......##....##.... -.......................................................................................................................................................................................................#..#.#..#........#..#...#.......#.......#...#....#..#...#.#... -.......................................................................................................................................................................................................#...##..#........#..#...#.......#.......#...#....#..#...#..#.. -.......................................................................................................................................................................................................#...##..#.......#....#..#.......#.......#....#..#....#..#...#. -.......................................................................................................................................................................................................#....#..######..#....#..#.......######..#....#..#....#..#....# \ No newline at end of file +#....#..######..#....#..#####...#.......#####...#....#..#....# +##...#..#.......#....#..#....#..#.......#....#..#....#..#...#. +##...#..#........#..#...#....#..#.......#....#...#..#...#..#.. +#.#..#..#........#..#...#....#..#.......#....#...#..#...#.#... +#.#..#..#####.....##....#####...#.......#####.....##....##.... +#..#.#..#.........##....#.......#.......#..#......##....##.... +#..#.#..#........#..#...#.......#.......#...#....#..#...#.#... +#...##..#........#..#...#.......#.......#...#....#..#...#..#.. +#...##..#.......#....#..#.......#.......#....#..#....#..#...#. +#....#..######..#....#..#.......######..#....#..#....#..#....# \ No newline at end of file diff --git a/day10.spec.js b/day10.spec.js index c3a664a..74cc5e9 100644 --- a/day10.spec.js +++ b/day10.spec.js @@ -31,17 +31,14 @@ describe('stars alignment', () => { expect(drawMap([ {x: 1, y: 1} ]).join('\n')).toEqual( - '..\n' + - '.#' + '#' ) expect(drawMap([ {x: 3, y: 2, vx: 1, vy: -2}, {x: 6, y: 3, vx: 1, vy: -2} ]).join('\n')).toEqual( - '.......\n' + - '.......\n' + - '...#...\n' + - '......#' + '#...\n' + + '...#' ) }) it('should draw the example map', () => { From 2732c9317e59eae2cd4c9ee714542fe84c936707 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 08:37:26 +0100 Subject: [PATCH 36/56] day 11, part 1 --- day11.spec.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 day11.spec.js diff --git a/day11.spec.js b/day11.spec.js new file mode 100644 index 0000000..904c36f --- /dev/null +++ b/day11.spec.js @@ -0,0 +1,70 @@ +'use strict' + +/* global describe, it, expect */ + +const fuelAt = (x, y, serial) => { + // Find the fuel cell's rack ID, which is its X coordinate plus 10. + const rackId = x + 10 + // Begin with a power level of the rack ID times the Y coordinate. + let powerLevel = rackId * y + // Increase the power level by the value of the grid serial number (your puzzle input). + powerLevel += serial + // Set the power level to itself multiplied by the rack ID. + powerLevel = powerLevel * rackId + // Keep only the hundreds digit of the power level (so 12345 becomes 3; numbers with no hundreds digit become 0). + powerLevel = Math.floor(powerLevel / 100) - (Math.floor(powerLevel / 1000) * 10) + // Subtract 5 from the power level. + return powerLevel - 5 +} + +const fuelAtGridCell = (x, y, serial) => { + if (x < 1) return 0 + if (y < 1) return 0 + if (x > 300) return 0 + if (y > 300) return 0 + return fuelAt(x, y, serial) +} + +const fullestCell = serial => { + const maxPower = {power: 0} + for (let x = 1; x <= 300; x++) { + for (let y = 1; y <= 300; y++) { + const power = + fuelAtGridCell(x - 1, y - 1, serial) + + fuelAtGridCell(x, y - 1, serial) + + fuelAtGridCell(x + 1, y - 1, serial) + + fuelAtGridCell(x - 1, y, serial) + + fuelAtGridCell(x, y, serial) + + fuelAtGridCell(x + 1, y, serial) + + fuelAtGridCell(x - 1, y + 1, serial) + + fuelAtGridCell(x, y + 1, serial) + + fuelAtGridCell(x + 1, y + 1, serial) + if (maxPower.power < power) { + maxPower.power = power + maxPower.x = x + maxPower.y = y + } + } + } + return { + ...maxPower, + x: maxPower.x - 1, + y: maxPower.y - 1 + } +} + +describe('chronal charge', () => { + it('should calculate the example', () => { + expect(fuelAt(3, 5, 8)).toEqual(4) + expect(fuelAt(122, 79, 57)).toEqual(-5) + expect(fuelAt(217, 196, 39)).toEqual(0) + expect(fuelAt(101, 153, 71)).toEqual(4) + }) + it('should find the example fuel cell', () => { + expect(fullestCell(18)).toEqual({x: 33, y: 45, power: 29}) + expect(fullestCell(42)).toEqual({x: 21, y: 61, power: 30}) + }) + it('should solve the puzzle', () => { + expect(fullestCell(9306)).toEqual({power: 30, x: 235, y: 38}) + }) +}) From f30ab41a5ee968e4a22d26a56de6b8e694476c99 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 09:45:20 +0100 Subject: [PATCH 37/56] day 11, part 2 --- day11.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ day11.run.js | 7 ++++++ day11.spec.js | 64 ++++++++-------------------------------------- 3 files changed, 88 insertions(+), 53 deletions(-) create mode 100644 day11.js create mode 100644 day11.run.js diff --git a/day11.js b/day11.js new file mode 100644 index 0000000..855e41c --- /dev/null +++ b/day11.js @@ -0,0 +1,70 @@ +'use strict' + +const fuelAt = (x, y, serial) => { + // Find the fuel cell's rack ID, which is its X coordinate plus 10. + const rackId = x + 10 + // Begin with a power level of the rack ID times the Y coordinate. + let powerLevel = rackId * y + // Increase the power level by the value of the grid serial number (your puzzle input). + powerLevel += serial + // Set the power level to itself multiplied by the rack ID. + powerLevel = powerLevel * rackId + // Keep only the hundreds digit of the power level (so 12345 becomes 3; numbers with no hundreds digit become 0). + powerLevel = Math.floor(powerLevel / 100) - (Math.floor(powerLevel / 1000) * 10) + // Subtract 5 from the power level. + return powerLevel - 5 +} + +const calculateGridPower = (x, y, serial, gridSize) => { + const left = Math.floor(gridSize / 2) + const right = gridSize - left - 1 + const startX = Math.max(x - left, 1) + const endX = Math.min(x + right, 300) + const startY = Math.max(y - left, 1) + const endY = Math.min(y + right, 300) + let power = 0 + for (let gx = startX; gx <= endX; gx++) { + for (let gy = startY; gy <= endY; gy++) { + power += fuelAt(gx, gy, serial) + } + } + return power +} + +const fullestCellWithGrid = (serial, gridSize = 3) => { + const left = Math.floor(gridSize / 2) + const maxPower = {power: 0, x: left, y: 300 - left} + for (let x = left + 1; x <= 300 - left; x++) { + for (let y = left + 1; y <= 300 - left; y++) { + const power = calculateGridPower(x, y, serial, gridSize) + if (maxPower.power < power) { + maxPower.power = power + maxPower.x = x + maxPower.y = y + maxPower.gridSize = gridSize + } + } + } + return { + ...maxPower, + x: maxPower.x - left, + y: maxPower.y - left + } +} + +const fullestCell = serial => { + const cells = [] + let cell + let s = 0 + do { + cell = fullestCellWithGrid(serial, ++s) + cells.push(cell) + } while (cell.power > 0 && s <= 300) + return cells.sort(({power: p1}, {power: p2}) => p2 - p1)[0] +} + +module.exports = { + fullestCell, + fullestCellWithGrid, + fuelAt +} \ No newline at end of file diff --git a/day11.run.js b/day11.run.js new file mode 100644 index 0000000..3af7e04 --- /dev/null +++ b/day11.run.js @@ -0,0 +1,7 @@ +'use strict' + +const {fullestCell} = require('./day11'); + +console.log(fullestCell(9306)) +// console.log(fullestCellWithGrid(18, 16)) +// console.log(fullestCellWithGrid(18, 15)) \ No newline at end of file diff --git a/day11.spec.js b/day11.spec.js index 904c36f..c6b73e6 100644 --- a/day11.spec.js +++ b/day11.spec.js @@ -2,56 +2,7 @@ /* global describe, it, expect */ -const fuelAt = (x, y, serial) => { - // Find the fuel cell's rack ID, which is its X coordinate plus 10. - const rackId = x + 10 - // Begin with a power level of the rack ID times the Y coordinate. - let powerLevel = rackId * y - // Increase the power level by the value of the grid serial number (your puzzle input). - powerLevel += serial - // Set the power level to itself multiplied by the rack ID. - powerLevel = powerLevel * rackId - // Keep only the hundreds digit of the power level (so 12345 becomes 3; numbers with no hundreds digit become 0). - powerLevel = Math.floor(powerLevel / 100) - (Math.floor(powerLevel / 1000) * 10) - // Subtract 5 from the power level. - return powerLevel - 5 -} - -const fuelAtGridCell = (x, y, serial) => { - if (x < 1) return 0 - if (y < 1) return 0 - if (x > 300) return 0 - if (y > 300) return 0 - return fuelAt(x, y, serial) -} - -const fullestCell = serial => { - const maxPower = {power: 0} - for (let x = 1; x <= 300; x++) { - for (let y = 1; y <= 300; y++) { - const power = - fuelAtGridCell(x - 1, y - 1, serial) + - fuelAtGridCell(x, y - 1, serial) + - fuelAtGridCell(x + 1, y - 1, serial) + - fuelAtGridCell(x - 1, y, serial) + - fuelAtGridCell(x, y, serial) + - fuelAtGridCell(x + 1, y, serial) + - fuelAtGridCell(x - 1, y + 1, serial) + - fuelAtGridCell(x, y + 1, serial) + - fuelAtGridCell(x + 1, y + 1, serial) - if (maxPower.power < power) { - maxPower.power = power - maxPower.x = x - maxPower.y = y - } - } - } - return { - ...maxPower, - x: maxPower.x - 1, - y: maxPower.y - 1 - } -} +const {fuelAt, fullestCellWithGrid, fullestCell} = require('./day11') describe('chronal charge', () => { it('should calculate the example', () => { @@ -61,10 +12,17 @@ describe('chronal charge', () => { expect(fuelAt(101, 153, 71)).toEqual(4) }) it('should find the example fuel cell', () => { - expect(fullestCell(18)).toEqual({x: 33, y: 45, power: 29}) - expect(fullestCell(42)).toEqual({x: 21, y: 61, power: 30}) + expect(fullestCellWithGrid(18)).toMatchObject({x: 33, y: 45, power: 29}) + expect(fullestCellWithGrid(42)).toMatchObject({x: 21, y: 61, power: 30}) }) it('should solve the puzzle', () => { - expect(fullestCell(9306)).toEqual({power: 30, x: 235, y: 38}) + expect(fullestCellWithGrid(9306)).toMatchObject({power: 30, x: 235, y: 38}) }) }) + +describe('chronal charge part 2', () => { + it('should find the example fuel cell', () => { + expect(fullestCell(18)).toEqual({x: 90, y: 269, power: 113, size: 16}) + expect(fullestCell(18)).toEqual({x: 232, y: 251, power: 119, size: 12}) + }) +}) \ No newline at end of file From fbf8648869e34e8c05f08cfbcb36077f101b9263 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Mon, 17 Dec 2018 23:53:13 +0100 Subject: [PATCH 38/56] day 12, part 1 --- day12.spec.js | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 day12.spec.js diff --git a/day12.spec.js b/day12.spec.js new file mode 100644 index 0000000..92c168f --- /dev/null +++ b/day12.spec.js @@ -0,0 +1,109 @@ +'use strict' + +/* global describe, it, expect */ + +const subsus = (pot0, initialState, notes) => { + const startState = `....${initialState}....` + const states = notes.reduce((newState, note) => { + const {pattern, result} = note.match(/(?[.#]{5}) => (?[.#])/).groups + let idx = -1 + do { + idx = startState.indexOf(pattern, idx + 1) + if (idx > -1) { + newState[idx + 2] = result === '#' + } + } while (idx > -1) + return newState + }, []) + + let newState = [] + for (let i = 0; i < states.length; i++) { + newState.push(states[i] ? '#' : '.') + } + const pots = newState.join('') + return { + pot0: pot0 - (4 - pots.match(/^\.+/g)[0].length), + pots: pots.replace(/^\.+/g, '') + } +} + +const sumGen = ({pot0, pots}) => pots.split('').reduce((sum, pot, index) => sum + (pot === '#' ? index + pot0 : 0), 0) + +describe('Subterranean Sustainability', () => { + it('should solve the example', () => { + const initialState = '#..#.#..##......###...###' + const notes = [ + '...## => #', + '..#.. => #', + '.#... => #', + '.#.#. => #', + '.#.## => #', + '.##.. => #', + '.#### => #', + '#.#.# => #', + '#.### => #', + '##.#. => #', + '##.## => #', + '###.. => #', + '###.# => #', + '####. => #' + ] + const gen1 = subsus(0, initialState, notes) + expect(gen1.pots).toEqual('#...#....#.....#..#..#..#') + expect(gen1.pot0).toEqual(0) + const gen2 = subsus(gen1.pot0, gen1.pots, notes) + expect(gen2.pots).toEqual('##..##...##....#..#..#..##') + const gen3 = subsus(gen2.pot0, gen2.pots, notes) + expect(gen3.pots).toEqual('#.#...#..#.#....#..#..#...#') + expect(gen3.pot0).toEqual(-1) + let gen20 = gen3 + for (let i = 4; i <= 20; i++) { + gen20 = subsus(gen20.pot0, gen20.pots, notes) + } + expect(gen20.pots).toEqual('#....##....#####...#######....#.#..##') + expect(gen20.pot0).toEqual(-2) + expect(sumGen(gen20)).toEqual(325) + }) + it('should calculate the solution', () => { + const initialState = '##.#.#.##..#....######..#..#...#.#..#.#.#..###.#.#.#..#..###.##.#..#.##.##.#.####..##...##..#..##.#.' + const notes = [ + '...## => #', + '#.#.# => #', + '.###. => #', + '#.#.. => .', + '.#..# => #', + '#..#. => #', + '..##. => .', + '....# => .', + '#.... => .', + '###.. => #', + '.#### => #', + '###.# => .', + '#..## => #', + '..... => .', + '##.## => #', + '####. => .', + '##.#. => .', + '#...# => .', + '##### => .', + '..#.. => .', + '.#.#. => .', + '#.### => .', + '.##.# => .', + '..#.# => .', + '.#.## => #', + '...#. => .', + '##... => #', + '##..# => #', + '.##.. => .', + '.#... => #', + '#.##. => #', + '..### => .' + ] + let res = {pot0: 0, pots: initialState} + for (let i = 0; i < 20; i++) { + res = subsus(res.pot0, res.pots, notes) + } + expect(sumGen(res)).toEqual(2140) + }) +}) From e5a479a35fbad4e9514f5558d54d10d1942075a8 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 18 Dec 2018 00:14:08 +0100 Subject: [PATCH 39/56] refactor day 12 --- day12.js | 27 +++++++++++++++++++++++++++ day12.part2.js | 45 +++++++++++++++++++++++++++++++++++++++++++++ day12.spec.js | 31 +++---------------------------- 3 files changed, 75 insertions(+), 28 deletions(-) create mode 100644 day12.js create mode 100644 day12.part2.js diff --git a/day12.js b/day12.js new file mode 100644 index 0000000..df95686 --- /dev/null +++ b/day12.js @@ -0,0 +1,27 @@ +'use strict' + +const subsus = (pot0, initialState, notes) => { + const startState = `....${initialState}....` + const pots = notes.reduce((newState, {pattern, result}) => { + let idx = -1 + do { + idx = startState.indexOf(pattern, idx + 1) + if (idx > -1) { + newState = newState.substr(0, idx + 2) + result + newState.substr(idx + 3) + } + } while (idx > -1) + return newState + }, '.'.repeat(startState.length)) + + return { + pot0: pot0 - (4 - pots.match(/^\.+/g)[0].length), + pots: pots.replace(/^\.+/g, '').replace(/\.+$/g, '') + } +} + +const sumGen = ({pot0, pots}) => pots.split('').reduce((sum, pot, index) => sum + (pot === '#' ? index + pot0 : 0), 0) + +module.exports = { + subsus, + sumGen +} \ No newline at end of file diff --git a/day12.part2.js b/day12.part2.js new file mode 100644 index 0000000..c0b6f53 --- /dev/null +++ b/day12.part2.js @@ -0,0 +1,45 @@ +'use strict' + +const {subsus, sumGen} = require('./day12') + +const initialState = '##.#.#.##..#....######..#..#...#.#..#.#.#..###.#.#.#..#..###.##.#..#.##.##.#.####..##...##..#..##.#.' +const notes = [ + '...## => #', + '#.#.# => #', + '.###. => #', + '#.#.. => .', + '.#..# => #', + '#..#. => #', + '..##. => .', + '....# => .', + '#.... => .', + '###.. => #', + '.#### => #', + '###.# => .', + '#..## => #', + '..... => .', + '##.## => #', + '####. => .', + '##.#. => .', + '#...# => .', + '##### => .', + '..#.. => .', + '.#.#. => .', + '#.### => .', + '.##.# => .', + '..#.# => .', + '.#.## => #', + '...#. => .', + '##... => #', + '##..# => #', + '.##.. => .', + '.#... => #', + '#.##. => #', + '..### => .' +] +let res = {pot0: 0, pots: initialState} +for (let i = 0; i < 50000000000; i++) { + console.log(i / 50000000000) + res = subsus(res.pot0, res.pots, notes) +} +console.log(sumGen(res)) diff --git a/day12.spec.js b/day12.spec.js index 92c168f..c5c6c45 100644 --- a/day12.spec.js +++ b/day12.spec.js @@ -2,32 +2,7 @@ /* global describe, it, expect */ -const subsus = (pot0, initialState, notes) => { - const startState = `....${initialState}....` - const states = notes.reduce((newState, note) => { - const {pattern, result} = note.match(/(?[.#]{5}) => (?[.#])/).groups - let idx = -1 - do { - idx = startState.indexOf(pattern, idx + 1) - if (idx > -1) { - newState[idx + 2] = result === '#' - } - } while (idx > -1) - return newState - }, []) - - let newState = [] - for (let i = 0; i < states.length; i++) { - newState.push(states[i] ? '#' : '.') - } - const pots = newState.join('') - return { - pot0: pot0 - (4 - pots.match(/^\.+/g)[0].length), - pots: pots.replace(/^\.+/g, '') - } -} - -const sumGen = ({pot0, pots}) => pots.split('').reduce((sum, pot, index) => sum + (pot === '#' ? index + pot0 : 0), 0) +const {subsus, sumGen} = require('./day12') describe('Subterranean Sustainability', () => { it('should solve the example', () => { @@ -47,7 +22,7 @@ describe('Subterranean Sustainability', () => { '###.. => #', '###.# => #', '####. => #' - ] + ].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) const gen1 = subsus(0, initialState, notes) expect(gen1.pots).toEqual('#...#....#.....#..#..#..#') expect(gen1.pot0).toEqual(0) @@ -99,7 +74,7 @@ describe('Subterranean Sustainability', () => { '.#... => #', '#.##. => #', '..### => .' - ] + ].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) let res = {pot0: 0, pots: initialState} for (let i = 0; i < 20; i++) { res = subsus(res.pot0, res.pots, notes) From b28c56876600d349a6802a7e3d8d0eef9a52dad9 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 18 Dec 2018 01:32:03 +0100 Subject: [PATCH 40/56] day 12, part 2 (not correct) I suppose I should improve the 0-plant tracking --- day12.js | 6 ++++-- day12.part2.js | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/day12.js b/day12.js index df95686..5eb85d5 100644 --- a/day12.js +++ b/day12.js @@ -1,7 +1,7 @@ 'use strict' const subsus = (pot0, initialState, notes) => { - const startState = `....${initialState}....` + const startState = `.....${initialState}.....` const pots = notes.reduce((newState, {pattern, result}) => { let idx = -1 do { @@ -13,8 +13,10 @@ const subsus = (pot0, initialState, notes) => { return newState }, '.'.repeat(startState.length)) + const newPot0 = pot0 + pots.match(/^\.+/g)[0].length - 5 + return { - pot0: pot0 - (4 - pots.match(/^\.+/g)[0].length), + pot0: newPot0, pots: pots.replace(/^\.+/g, '').replace(/\.+$/g, '') } } diff --git a/day12.part2.js b/day12.part2.js index c0b6f53..afb08e3 100644 --- a/day12.part2.js +++ b/day12.part2.js @@ -36,10 +36,19 @@ const notes = [ '.#... => #', '#.##. => #', '..### => .' -] +].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) let res = {pot0: 0, pots: initialState} -for (let i = 0; i < 50000000000; i++) { - console.log(i / 50000000000) +let lastResults = [res] +for (let i = 1; i <= 50000000; i++) { res = subsus(res.pot0, res.pots, notes) + lastResults.push(res) + console.log(res.pots) + if (lastResults.length > 10) lastResults.shift() + if (lastResults.reduce((same, {pots}, k) => k > 0 ? (same ? lastResults[k - 1].pots === pots : false) : true) === true) { + console.log(sumGen({ + pots: lastResults[0].pots, + pot0: 50000000000 - i + lastResults[0].pot0 + })) + break + } } -console.log(sumGen(res)) From 5f7dccef9cc22b8c9a8388f70ce9c88bb5b05277 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Tue, 18 Dec 2018 22:47:02 +0100 Subject: [PATCH 41/56] day 12, part 2 --- day12.part2.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/day12.part2.js b/day12.part2.js index afb08e3..295c77e 100644 --- a/day12.part2.js +++ b/day12.part2.js @@ -39,7 +39,7 @@ const notes = [ ].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) let res = {pot0: 0, pots: initialState} let lastResults = [res] -for (let i = 1; i <= 50000000; i++) { +for (let i = 1; i <= 10000; i++) { res = subsus(res.pot0, res.pots, notes) lastResults.push(res) console.log(res.pots) @@ -47,8 +47,8 @@ for (let i = 1; i <= 50000000; i++) { if (lastResults.reduce((same, {pots}, k) => k > 0 ? (same ? lastResults[k - 1].pots === pots : false) : true) === true) { console.log(sumGen({ pots: lastResults[0].pots, - pot0: 50000000000 - i + lastResults[0].pot0 + pot0: 50000000000 - i + res.pot0 })) break } -} +} \ No newline at end of file From 7bcdbb6ce7af0d6c4c163cdd2c8bf21718d40bb8 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 00:57:22 +0100 Subject: [PATCH 42/56] day 12, seems right but not accepted --- day13.js | 152 +++++++++++++++++++++++++++++++ day13.lastframe.txt | 150 ++++++++++++++++++++++++++++++ day13.map.txt | 150 ++++++++++++++++++++++++++++++ day13.part1.js | 12 +++ day13.spec.js | 217 ++++++++++++++++++++++++++++++++++++++++++++ day13.txt | 150 ++++++++++++++++++++++++++++++ 6 files changed, 831 insertions(+) create mode 100644 day13.js create mode 100644 day13.lastframe.txt create mode 100644 day13.map.txt create mode 100644 day13.part1.js create mode 100644 day13.spec.js create mode 100644 day13.txt diff --git a/day13.js b/day13.js new file mode 100644 index 0000000..c2023f0 --- /dev/null +++ b/day13.js @@ -0,0 +1,152 @@ +'use strict' + +const parseLevel = state => { + const rows = state.split('\n').filter(l => l.length) + const width = rows.reduce((max, line) => Math.max(line.length, max), 0) + const height = rows.length + const currentState = [ + ...rows.map(r => [...r]) + ] + const nextState = [ + ...rows.map(r => [...r]) + ] + const carts = [] + for (let y = 0; y < height; y++) { + for (let x = 0; x < width; x++) { + const m = (currentState[y][x] || '').match(/(?

[\^v<>])/) + if (m) { + const {dir} = m.groups + carts.push({ + dir, x, y, turn: 0 + }) + switch (dir) { + case '^': + case 'v': + nextState[y][x] = '|' + break + case '<': + case '>': + nextState[y][x] = '-' + break + } + } + } + } + return { + map: nextState, + carts + } +} + +const renderMap = map => map.reduce((s, row) => s + row.join('').replace(/ +$/g, '') + '\n', '') + +const renderMapAndCarts = (map, carts) => { + const width = map.reduce((max, line) => Math.max(line.length, max), 0) + const height = map.length + let r = [] + for (let y = 0; y < height; y++) { + r[y] = [] + for (let x = 0; x < width; x++) { + r[y][x] = map[y][x] + } + } + carts.forEach(({x, y, dir}) => { + r[y][x] = dir + }) + return renderMap(r) +} + +const tick = (map, carts) => { + const movedCarts = carts.map(cart => { + let {dir, x, y, turn} = cart + switch (dir) { + case '^': + y-- + break + case 'v': + y++ + break + case '<': + x-- + break + case '>': + x++ + break + } + const n = map[y][x] + switch (n) { + case '-': + case '|': + break + case '+': + switch (cart.turn) { // left, straight, right + case 0: + dir = dir === '^' ? '<' : '>' // turn left + break + case 1: + // keep straight + break + case 2: + dir = dir === '^' ? '>' : '<' // turn right + break + } + turn = turn + 1 % 3 + break + case '\\': + switch (dir) { + case '^': + dir = '<' + break + case 'v': + dir = '>' + break + case '>': + dir = 'v' + break + case '<': + dir = '^' + break + } + break + case '/': + switch (dir) { + case '^': + dir = '>' + break + case 'v': + dir = '<' + break + case '>': + dir = '^' + break + case '<': + dir = 'v' + break + } + break + } + return {dir, x, y, turn} + }).sort(({y: y1}, {y: y2}) => y1 - y2) + + const crashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y)) + if (crashed.length) throw new Crash(`Crash at ${crashed[0].x},${crashed[0].y}`, crashed[0].x, crashed[0].y) + return movedCarts +} + +module.exports = { + parseLevel, + tick, + renderMap, + renderMapAndCarts +} + +class Crash extends Error { + constructor (msg, x, y) { + super(msg) + this.x = x + this.y = y + this.name = Crash.name + Error.captureStackTrace(this, Crash) + Object.setPrototypeOf(this, Crash.prototype) + } +} diff --git a/day13.lastframe.txt b/day13.lastframe.txt new file mode 100644 index 0000000..319f6c4 --- /dev/null +++ b/day13.lastframe.txt @@ -0,0 +1,150 @@ + /-------------------------------------\ + /----------------------------------\ /---------------+-------------------------------------+--------\ + /+----------------------------------+-------------------+---------------+----------------------------------\ | | + || /---------+-------------------+-\ /-----------+--------------\ | | | /--------\ + || /------+--\ | /------+-+-+-----------+--------------+--------------\ | | | | | + || | | | |/-----------+------+-+-+-----------+--------------+--------------+----+--+--\ | | | + || /---------------+------+--+------++-----------+--\ | | | | /-------+----\ | | | | | | | + || | /---+------+--+-\ || | | | | | | | | /+---------+----+--+--+-----+-\ | | + || | | | | | | || | | | | | | /-+-------+---++---------+----+--+--+-----+-+--+\ | + || | | | | | | || | /+---+-+-+-----------+----+-+-------+---++\ | | | | | | || | + || | | /-+------+->+-+----++-----------+\|| | | | | | |/------+---+++--------+----+--+\ | | | || | + || | | | | | | | || |||| | | | | | || | ||| | | || | | | || | + || | | | | /----+--+-+----++-----------++++---+-+-+-----------+----+-++--\ | ||| | |/-++-+---->+-+--++-------+----\ +/--------++-+-----------+-+-+-+----+--+-+----++-----------++++---+-+-+----\ | |/++--+---+---+++--------+----++-++-+-----+-+\ || | | +| || | /-+-+-+-+----+--+-+----++------\ |||| | | | | | |||| | | ||| | || || | | || || | | +| || | | | | | | | | | || | |||| | | | /--+------+----++++--+---+---+++--------+----++\|| | | || || | | +| /---++-+-------\ | | | | | | | | || | |||| | | | | | | |||| | | ||| /------+----+++++-+-----+-++-++-----\ | | +| | || | | | | | | | | | | /++------+----++++-\ | | | | | | |||| | | ||| | | ||||| | | || || | | | +| | || | | | | | | | | | | ||| | ||||/+-+-+-+-+--+------+----++++--+---+---+++-+------+----+++++-+---\ | || || | | | +| | || | /---+-+-+-+-+-+----+-\| | ||| | |||||| | | | | | | |||| | | ||| | /---+----+++++-+---+-+-++-++-----+-+-\ | +|/---+---++-+---+---+-+-+-+-+-+----+-++-+---+++------+----++++++-+-+\| | | | |||| | | ||| | | | ||||| | | | || || | | | | +|| | || | | | | | | | | | || | /+++------+----++++++-+-+++-+--+------+----++++--+---+---+++-+--+---+----+++++-+---+-+-++-++---\ | | | | +|| | || | | | | | | | | | || | |||| | |||||| | ||| | | | |||| | | ||| | | | ||||| | | | || || | | | | | +|| | || | | | | | | | | | || | |||| | /--++++++-+-+++-+--+------+----++++--+---+---+++-+-\| | ||||| | | | || || | | | | | +|| | || | | | | | | | | | || | |||| | | |||||| | ||| | | | |||| | | ||| | || | ||||| | |/+-++-++---+-+-+-+\ | +|| | || | | /+-+-+-+-+-+----+-++-+--++++------+-+--++++++-+\||\-+--+------+----++++--+---//--+++-+-++---+--\ ||||| | ||| || \+---+<+-/ || | +|| | || | | || | | | \-+----+-+/ | |||| | | |||||| |||| /+--+----\ | |||| | | ||| | || | | ||||| | ||| || | | | || | +||/--+---++-+---+--++-+-+-+---+----+-+--+-\|||| | | |||||| |||| || | | | |||| | | ||| | || |/-+-+++++-+--\||| || | | | || | +||| | \+-+---+--++-+-+-+---+----+-+--+-+++++------+-+--++++++-++++-++--+----+-+----++++--+----+--+++-+-++---++-+-/|||| | |||| || | | | || | +|||/-+----+-+---+--++-+-+-+---+--\ | | | ||||| | | |||||| |||| || | /--+-+----++++--+----+--+++-+-++---++-+-\|||| | |||| || | | | || | +\+++-+----+-+---+--++-+-+-+---+--+-+-+--+-+++++---<--+-+--++++++-+++<-++--/ | | | |||| /+----+--+++-+-++---++-+\||||| | |||| || | | | || | + ||| | | | | || | | | | | | | | ||||| |/+--++++++-++++-++----+--+-+\ |||| || | ||| | || || ||||||| | |||| || | | | || | + ||| | | | | || | \-+---+--+-+-+--/ ||||| ||| |||||| |||| || | | || |||| || | ||| | || || ||||||| | |||| || | | | || | + ||| | | | |/-++-+---+---+--+-+-+----+++++------+++--++++++-++++-++--<-+\ | || |||| || | ||| | || ||/+++++++-+--++++-++--+---+\| || | + ||| | /--+-+---++-++\| | | | | | ||||| ||| \+++++-++++-++----++-+-++---++++-++----+--+++-+-++---/||||||||| | |||| || | ||| || | + ||| | | | | || |||| | | | | | ||||| ||| /-+++++-++++-++----++\| || /-++++-++----+--+++-+-++----+++++++++-+--++++\|| | ||| || | + ||| | | | | || |||| | |/-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++----+++++++++-+--+++++++--+-\ ||| || | + ||| | | | | ||/++++---+---++-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++\ ||||||||| | ||||||| | | ||| || | + ||| | | | | ||||||| | /-++-+-+-+----+++++\ ||| | ||||| |||| || |||| || | |||| || | ||| | ||| \++++++++-+--/|||||| | | ||| || | + ||| | | | | ||||||| | | || |/+-+----++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++----++++++++-+---++++++--+-+\||| || | + ||| | | | | ||||||| | | || ||| | /-++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++-\/-++++++++\| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | |||||| ||| | ||||| |||| || |||| || | ||||/++----+--+++\| ||| || |||||||||| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | ||||||/----+++-+-+++++-++++-++----++++-++\| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||/+-+--+-+-\ ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||||/+--+-+-+-+++++++---+-+-++-+++-+--+-+++++++----+++-+-+++++-++++-++----++++-++++-+++++++----+--+++++-+++-++\|||||||||| |||||| | ||||| || | + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | |||||/+++-+++++++++++++---++++++--+-+++++---++-+\ + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | |||\+-++++-++----++++-++++-+++++++----+--+++++++++-+++++++++++++---/||||| | ||||| || || + ||||||| | | | ||||||| | | || |||/+--+-+++++++----+++-+-+++-+-++++-++----++++-++++-+++++++--\ | ||||||||| ||||||||||||| ||||| | ||||| || || + ||||||| | | | ||||||| | | || ||\++--+-+++++++----+++-+-+++-+-++/| || |||| |||| ||||||| /+-+--+++++++++-+++++++++++++---\||||| | ||||| || || + ||||||| | | | |||\+++---+-+-++-++-++--+-+++++++----+++-+-+++-+-+/ | || |||| |||| ||||||| || | ||||||||| ||||||||||||| |||||| | ||||| || || + ||||||| | | | ||| ||| | | || || || | ||||||| ||| | ||| | | | || |||| |||| |||||\+-++-+--+++++++++-+++++/||||||| |||||| | ||||| || || + ||||||| | | | ||| |||/--+-+-++-++-++--+-+++++++----+++-+-+++-+-+\ | || |||| |||| ||||| | || | ||||||||| ||||| ||||||| |||||| | ||||| || || + |||\+++--+-+-/ ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | |||||||\+-+++++-+++++++---++++++--+-+++++---/| || + ||| ||| | | ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||| ||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||/---+++-+-+++-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-+++++\||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||||||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | |\+-+-++-+-++----++++-++++-+++++-+-++-+--++/|||| | ||||||||||||| |||||| | ||||| | || + ||| ||| |/+---+++-++++--+-+-++-++-++--+-++++++++---+++-+\| | | || | || |||| |||| ||||| | || | || |||| | ||||||||||||| |||||| | ||||| | || + ||| ||| ||| ||| |||| | | || || || /+-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++--+-+++++--\ | || + ||| ||| ||| ||| |||| /+-+-++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++\ | ||||| | | || + ||| ||| ||| ||| |||| || |/++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++\|||| | ||||||||||||| ||||||| | ||||| | | || + ||| ||| ||| ||| |||| || |||| || || || ||||\+++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-++++++++++++/ ||||||| | ||||| | | || + ||| ||| ||| ||| ||\+-++-++++-++-++-++-++++-+++---/|| ||| | | || | || |||| |||| ||||| | \+-+--+++++++-+-++++++++++++----/|||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||/---++-+++-+-+-++-+-++-\ |||| |||| ||||| | | | ||||||| | |\+++++++++/ |||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | ||/+-++-+--++++-++++-+++++-+--+-+--+++++++-+-+-+++++++++------++++++-+-+++++--+-+\|| + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| ||\--+++---+++-+/ | || |||| || || || |||| |||| || ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| || \++-+-+-++++-++-+--++/| |||| ||||| |/-+-+--+++++++-+-+-+++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| \+--++-+-+-++++-++-+--++-+-+/|| |||||/++-+-+--+++++++-+-+-++++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| |/-++-+-+-++++\|| | || | | || |||||||| | | ||||||| | | ||||||||||| |||||| | ||||| | |||| + |||/++---+++\ ||| | | || |||| || || ||/++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--\ |||||| | ||||| | |||| + |||||| |||| ||| | | || |||| || ||/+++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--+-++++++\| ||||| | |||| + |||||| |||| ||| | | || ||||/++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--+-++++++++\||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || |||||||| | | ||||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || ||\+++++-+-+--+/||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || |\+++++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-+++++-+-+--+-/|||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||||||||| |||| || || | | ||||||| | || | | || || ||||\-+-+--+--++++-+-+-+++++++++/| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||\++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+-+-+++++++++-+--+-++++++++++++++--/ |||| + |||||| |||| ||| | | ||/+-+++++-+++-++++++-++++----++-++-+-+-+++++++-+--++-+->-++-++-++++--+-+--+--++++-+-+-+++++++++-+\ | |||||||||||||| |||| + |||||| |||| ||| | | |||\-+++++-+++-++++++-/||| || || | |/+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+\| ||||||||| || | |||||||||||||| |||| + |||||| \+++--+++-+--+-+++--+++++-+++-+++++/ ||| || || | ||||||||| | \+-+-+-++-++-++++--+-+--+--++++-+++-++++/|||| || | |||||||||||||| |||| + |||||| ||| ||| | | ||| ||||| ||| ||||| ||| || || | ||||||||| | | | | || || |||| | | | |||| ||| |||| |||| || | |||||||||||||| |||| +/++++++----+++--+++-+--+-+++--+++++-+++-+++++---+++----++-++-+-+++++++++-+\ | | |/++-++-++++--+-+--+--++++-+++-++++\|||| || | |||||||||||||| |||| +||||||| ||| ||| | | \++--+++++-+++-++++>---+++----++-++-+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++/|||||||| |||| +||||||| ||| ||| | | || ||||| |||/+++++---+++----++\||/+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++-++++++++\ |||| +||||||| ||| ||| | | || ||||| ||||||||| ||| |||||||/+++++++++-++--+-+\|||| || |||| | | | |||| ||| ||||||||| || | ||||| ||||||||| |||| +||||||| ||| ||| | | || \++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++/ | | \--++++-+++-+++++++++-++-+-+++/| ||||||||| |||| +|||||||/---+++--+++-+--+--++---++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++--\| | |||| ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| \++-+--+--++---++++-+/||||||| ||| \++++++++++++++++-++--+-++++++-++-+++--++-+-----+++/ ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| || | | || |||| | ||||||\---+++-----+++++++/|\++++++-++--+-++++++-++-+++--++-+-----+++--+++-+++++++++-++-+-+/| | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | /+++--+++-+++++++++-++\| | | | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | |||| ||| ||||||||| |||| | | | ||||||||| |||| +||||||||/--+++---++\| | || |||| | |||||| ||| ||||||| | |||||| || | ||\+++-++-+++--++-+----++++--+++-+++++++/| |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| \++-----+++++++-+-++++++-++--+-++-+/| || ||| || | |||| ||| ||||||| | |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| || ||||||| | |||||| || | || | | || ||| /++-+----++++--+++-+++++++-+\|||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |\++++-----++-----+/||||| | |||||| || | || | | || ||| ||| | |||| ||| ||||||| |||||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | | ||||/----++-----+-+++++-+-++++++-++--+-++-+-+\|| ||| ||| | |||| ||| |||||\+-++++++-+-+-+-+++++++++---++/| +||||||||| ||| |||| | || |||\-+-+-+++++----++-----+-+++++-+-++++++-++--+-++-+-++++-+++-+++-+----++++--+++-+++++-+-++++++-+-+-+-++++/|||| || | +||||||||| ||| /-++++--+--++---+++--+-+-+++++---\|| \-+++++-+-+++/|| || | || | |||| ||| ||| | |||| ||| ||||| | |||||| | | | |||| |||| || | +|||||\+++--+++-+-+++/ | |\---+++--+-+-+++++---+++-------+++++-+-+++-++-++--+-++-+-++++-+++-+++-+----++++--+++-+++++-+-+++/|| | | | |||| |||| || | +|||\+-+++--+++-+-+++---+--+----++/ | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| | |||| ||| ||||| | ||| || | | | |||| |||| || | +||| | ||| ||| | ||| | | || | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| \----++++--+++-++/|| | ||| || | | | |||| |||| || | +||| | ||| ||| | \++---+--+----++---+-+-+++++---+++-------+++++-+-+++-++-++--/ || | |||| \++-+++------++++--+++-++-++-+-/|| || | | | |||| |||| || | +||| | ||| ||| | || | | /++---+-+\||||| ||| ||||| | ||| || || || | ||\+--++-+++------++++--+++-++-++-+--++-++-+-+-+-+/|| |||| || | +||| | ||| ||| | || | | ||| | ||||||| ||| ||||| | ||| || || /--++-+-++-+--++-+++------++++--+++-++-++\| || || | | | | || |||| || | +||| | ||| |\+-+--++---+--+---+++---+-+++++++---+++-------+++/| | ||| |\-++-+--++-+-++-+--++-+++------++++--+++-++-+++/ || || | | | | || |||| || | +||| | ||| | | | || | | ||| | ||||||| ||| ||| | | ||| | || | || | || | || ||| |||| ||| || ||| || ^| | | | | || |||| || | +||| | ||| | | | || | \---+++---+-+++++++---+++-------+/| | | ||| | || | || | || | || ||| |||| ||| || ||| || || | | | | || |||| || | +||| | ||| | | |/-++---+---\ ||| | ||||||| ||| | | | | ||| | || | || | || | || ||| \+++--+++-++-+++---++-/| | | | | || |||| || | +||| | ||| | | || || | | ||| | ||||||| /+++------\| | | | ||| | || | || | || | || ||| ||| ||| || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| | ||\++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+--++-+++-------+++--++/ || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| /+-++-++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+-\|| ||| ||| /++--++-+++---++--+-+-+-+-+-++-++++--\|| | +||| \-+++--+-/ || || | | ||\--++-++-++++--++++----->+<-+-+-+-+++-+--++-+--++-+-++-+-+++-+++-------+++-+++--++-+++---++--+-+-+-+-+-/| |||| ||| | +|\+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++/ | || | || | || | ||| ||| ||| ||| || ||| || | | | | | | |||| ||| | +\-+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+/ | || \-++-+-+++-+++-------+++-+++--++-+/| || | | | | | | |||| ||| | + | ||| /+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+--+--++--\|| | ||| ||| ||| ||| || | | || | | | | | | |||| ||| | + | ||| || ||/++---+---+--++---++-++-++++--++++------++-+-+-+-++--+-\| \--++--+++-+-+++-+++-------+++-+++--++-+-/ || | | | | | | |||| ||| | + | ||| || |\+++---+---/ || || || |||| |||| || | | | || | || || ||| | ||\-+++-------+++-+++--++-+-----+/ | | | | | | |||| ||| | + | ||| || | ||| | || || || |||| |||| || | | | || | || || ||| \-++--+++-------+++-+++--++-+-----+---+-+-+-/ | | |||| ||| | +/-+---+++-++--\| ||| | /-++---++-++-++++--++++------++-+-+-+-++\ | || || ||| || ||| ||| ||| || | | | \-+---+--+-++++--+/| | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| ||| ||| || | | | | | | |||| | | | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| |\+-+++--++-+-----+---+---+---+--+-++/| | | | +| \---+++-++--++-+++->-+----+-++---++-++-+/|| |||| || | | | |\+-+-++-----++--+++---++--+++-------+-+-+++--++-+-----+---+---+---+--+-++-+--+-/ | +| ||| || || ||| | | \+---++-+/ | || |||| || | | | | | | || || |||/--++--+++-------+-+-+++--++-+-----+--\| | | | || | | | +| ||| || || ||| | | | || | | || |||| || | | | | | | || || |||| || ||| | | ||| || | | || | | | || | | | +| ||| || || ||| | | | || | \-++--++++------++-+-+-+-+-+-+>++-----++--++++--++--+++-------+-+-+++--++-+-----+--+/ | | | || | | | +| ||| || || \++---+----+--+---++-+----++--++++------++-+-+-+-+-+-+-/| || |||| || ||| | | ||| || | | | | | | || | | | +| ||| || || || | | | || | \+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--+-/| | | | +| ||| || || || | | \---++-+-----+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--/ | | | | +\-----+++-++--/| || | | || \-----+--++++------++-+-+-+-+-+-+--+-----++--++++--+>--+++-------+-+-+++--++-+-----+--+----+---/ | | | | + ||| || | || | | || | |||| || \-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---------+-/ | | + ||| \+---+--++---+----+------++-------+--++++------++---+-+-+-+-+--+-----++--/||| || ||| | | ||| || | | | | | | | + ||| \---+--++---+----+------++-------+--++<+------+/ | | | | \--+-----/| ||| || ||| /---+-+-+++--++-+-----+--+----+----\ | | | + ||| | || | | || | |||| | | | | | | | ||| || \++---+---+-+-+++--++-+-----/ | | | | | | + ||| | || | | || | |||\------+----+-+-+-+----/ | ||| || || | | | ||| |v | | | | | | | + ||| | || | | || | ||| | \-+-+-+-----------/ ||| |\---++---+---/ | \++--+>-+--------+----+----+----+----/ | + ||| | || | | |\-------+--+++-------+------+-+-+---------------+++--+----+/ | | || || | | | | | | + ||| | || \----+------+--------+--+++-------+------+-/ | \++--+----+----+-----+--++--++-+--------+----/ | | | + |\+------+--++--------+------+--------+--+++-------+------+---+----------------++--+----/ | | || |\-+--------+---------+----/ | + | \------+--+/ \------+--------+--+++-------+------+---/ |\--+---------+-----+--++--+--+--------/ | | + \--------+--+----------------+--------+--+++-------+------+--------------------+---+---------+-----+--++--/ | | | + | | | | ||| | | | | \-----+--++-----+------------------/ | + \--+----------------+--------+--+/| | | | | | || | | + \----------------+--------+--+-+-------+------+--------------------+---+---------------+--/| | | + | | | | | | | | | | | | + | | \-+-------/ | | | | | | | + | | | \--------------------+---+---------------+---/ | | + | \----+-----------------------------------/ | \---------+--------------------------------/ + | \---------------------------------------+-------------------------/ + \-----------------------------------------------------/ diff --git a/day13.map.txt b/day13.map.txt new file mode 100644 index 0000000..853ec02 --- /dev/null +++ b/day13.map.txt @@ -0,0 +1,150 @@ + /-------------------------------------\ + /----------------------------------\ /---------------+-------------------------------------+--------\ + /+----------------------------------+-------------------+---------------+----------------------------------\ | | + || /---------+-------------------+-\ /-----------+--------------\ | | | /--------\ + || /------+--\ | /------+-+-+-----------+--------------+--------------\ | | | | | + || | | | |/-----------+------+-+-+-----------+--------------+--------------+----+--+--\ | | | + || /---------------+------+--+------++-----------+--\ | | | | /-------+----\ | | | | | | | + || | /---+------+--+-\ || | | | | | | | | /+---------+----+--+--+-----+-\ | | + || | | | | | | || | | | | | | /-+-------+---++---------+----+--+--+-----+-+--+\ | + || | | | | | | || | /+---+-+-+-----------+----+-+-------+---++\ | | | | | | || | + || | | /-+------+--+-+----++-----------+\|| | | | | | |/------+---+++--------+----+--+\ | | | || | + || | | | | | | | || |||| | | | | | || | ||| | | || | | | || | + || | | | | /----+--+-+----++-----------++++---+-+-+-----------+----+-++--\ | ||| | |/-++-+-----+-+--++-------+----\ +/--------++-+-----------+-+-+-+----+--+-+----++-----------++++---+-+-+----\ | |/++--+---+---+++--------+----++-++-+-----+-+\ || | | +| || | /-+-+-+-+----+--+-+----++------\ |||| | | | | | |||| | | ||| | || || | | || || | | +| || | | | | | | | | | || | |||| | | | /--+------+----++++--+---+---+++--------+----++\|| | | || || | | +| /---++-+-------\ | | | | | | | | || | |||| | | | | | | |||| | | ||| /------+----+++++-+-----+-++-++-----\ | | +| | || | | | | | | | | | | /++------+----++++-\ | | | | | | |||| | | ||| | | ||||| | | || || | | | +| | || | | | | | | | | | | ||| | ||||/+-+-+-+-+--+------+----++++--+---+---+++-+------+----+++++-+---\ | || || | | | +| | || | /---+-+-+-+-+-+----+-\| | ||| | |||||| | | | | | | |||| | | ||| | /---+----+++++-+---+-+-++-++-----+-+-\ | +|/---+---++-+---+---+-+-+-+-+-+----+-++-+---+++------+----++++++-+-+\| | | | |||| | | ||| | | | ||||| | | | || || | | | | +|| | || | | | | | | | | | || | /+++------+----++++++-+-+++-+--+------+----++++--+---+---+++-+--+---+----+++++-+---+-+-++-++---\ | | | | +|| | || | | | | | | | | | || | |||| | |||||| | ||| | | | |||| | | ||| | | | ||||| | | | || || | | | | | +|| | || | | | | | | | | | || | |||| | /--++++++-+-+++-+--+------+----++++--+---+---+++-+-\| | ||||| | | | || || | | | | | +|| | || | | | | | | | | | || | |||| | | |||||| | ||| | | | |||| | | ||| | || | ||||| | |/+-++-++---+-+-+-+\ | +|| | || | | /+-+-+-+-+-+----+-++-+--++++------+-+--++++++-+\||\-+--+------+----++++--+---//--+++-+-++---+--\ ||||| | ||| || \+---+-+-/ || | +|| | || | | || | | | \-+----+-+/ | |||| | | |||||| |||| /+--+----\ | |||| | | ||| | || | | ||||| | ||| || | | | || | +||/--+---++-+---+--++-+-+-+---+----+-+--+-\|||| | | |||||| |||| || | | | |||| | | ||| | || |/-+-+++++-+--\||| || | | | || | +||| | \+-+---+--++-+-+-+---+----+-+--+-+++++------+-+--++++++-++++-++--+----+-+----++++--+----+--+++-+-++---++-+-/|||| | |||| || | | | || | +|||/-+----+-+---+--++-+-+-+---+--\ | | | ||||| | | |||||| |||| || | /--+-+----++++--+----+--+++-+-++---++-+-\|||| | |||| || | | | || | +\+++-+----+-+---+--++-+-+-+---+--+-+-+--+-+++++------+-+--++++++-++++-++--/ | | | |||| /+----+--+++-+-++---++-+\||||| | |||| || | | | || | + ||| | | | | || | | | | | | | | ||||| |/+--++++++-++++-++----+--+-+\ |||| || | ||| | || || ||||||| | |||| || | | | || | + ||| | | | | || | \-+---+--+-+-+--/ ||||| ||| |||||| |||| || | | || |||| || | ||| | || || ||||||| | |||| || | | | || | + ||| | | | |/-++-+---+---+--+-+-+----+++++------+++--++++++-++++-++----+\ | || |||| || | ||| | || ||/+++++++-+--++++-++--+---+\| || | + ||| | /--+-+---++-++\| | | | | | ||||| ||| \+++++-++++-++----++-+-++---++++-++----+--+++-+-++---/||||||||| | |||| || | ||| || | + ||| | | | | || |||| | | | | | ||||| ||| /-+++++-++++-++----++\| || /-++++-++----+--+++-+-++----+++++++++-+--++++\|| | ||| || | + ||| | | | | || |||| | |/-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++----+++++++++-+--+++++++--+-\ ||| || | + ||| | | | | ||/++++---+---++-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++\ ||||||||| | ||||||| | | ||| || | + ||| | | | | ||||||| | /-++-+-+-+----+++++\ ||| | ||||| |||| || |||| || | |||| || | ||| | ||| \++++++++-+--/|||||| | | ||| || | + ||| | | | | ||||||| | | || |/+-+----++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++----++++++++-+---++++++--+-+\||| || | + ||| | | | | ||||||| | | || ||| | /-++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++-\/-++++++++\| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | |||||| ||| | ||||| |||| || |||| || | ||||/++----+--+++\| ||| || |||||||||| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | ||||||/----+++-+-+++++-++++-++----++++-++\| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||/+-+--+-+-\ ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||||/+--+-+-+-+++++++---+-+-++-+++-+--+-+++++++----+++-+-+++++-++++-++----++++-++++-+++++++----+--+++++-+++-++\|||||||||| |||||| | ||||| || | + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | |||||/+++-+++++++++++++---++++++--+-+++++---++-+\ + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | |||\+-++++-++----++++-++++-+++++++----+--+++++++++-+++++++++++++---/||||| | ||||| || || + ||||||| | | | ||||||| | | || |||/+--+-+++++++----+++-+-+++-+-++++-++----++++-++++-+++++++--\ | ||||||||| ||||||||||||| ||||| | ||||| || || + ||||||| | | | ||||||| | | || ||\++--+-+++++++----+++-+-+++-+-++/| || |||| |||| ||||||| /+-+--+++++++++-+++++++++++++---\||||| | ||||| || || + ||||||| | | | |||\+++---+-+-++-++-++--+-+++++++----+++-+-+++-+-+/ | || |||| |||| ||||||| || | ||||||||| ||||||||||||| |||||| | ||||| || || + ||||||| | | | ||| ||| | | || || || | ||||||| ||| | ||| | | | || |||| |||| |||||\+-++-+--+++++++++-+++++/||||||| |||||| | ||||| || || + ||||||| | | | ||| |||/--+-+-++-++-++--+-+++++++----+++-+-+++-+-+\ | || |||| |||| ||||| | || | ||||||||| ||||| ||||||| |||||| | ||||| || || + |||\+++--+-+-/ ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | |||||||\+-+++++-+++++++---++++++--+-+++++---/| || + ||| ||| | | ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||| ||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||/---+++-+-+++-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-+++++\||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||||||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | |\+-+-++-+-++----++++-++++-+++++-+-++-+--++/|||| | ||||||||||||| |||||| | ||||| | || + ||| ||| |/+---+++-++++--+-+-++-++-++--+-++++++++---+++-+\| | | || | || |||| |||| ||||| | || | || |||| | ||||||||||||| |||||| | ||||| | || + ||| ||| ||| ||| |||| | | || || || /+-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++--+-+++++--\ | || + ||| ||| ||| ||| |||| /+-+-++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++\ | ||||| | | || + ||| ||| ||| ||| |||| || |/++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++\|||| | ||||||||||||| ||||||| | ||||| | | || + ||| ||| ||| ||| |||| || |||| || || || ||||\+++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-++++++++++++/ ||||||| | ||||| | | || + ||| ||| ||| ||| ||\+-++-++++-++-++-++-++++-+++---/|| ||| | | || | || |||| |||| ||||| | \+-+--+++++++-+-++++++++++++----/|||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||/---++-+++-+-+-++-+-++-\ |||| |||| ||||| | | | ||||||| | |\+++++++++/ |||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | ||/+-++-+--++++-++++-+++++-+--+-+--+++++++-+-+-+++++++++------++++++-+-+++++--+-+\|| + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| ||\--+++---+++-+/ | || |||| || || || |||| |||| || ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| || \++-+-+-++++-++-+--++/| |||| ||||| |/-+-+--+++++++-+-+-+++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| \+--++-+-+-++++-++-+--++-+-+/|| |||||/++-+-+--+++++++-+-+-++++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| |/-++-+-+-++++\|| | || | | || |||||||| | | ||||||| | | ||||||||||| |||||| | ||||| | |||| + |||/++---+++\ ||| | | || |||| || || ||/++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--\ |||||| | ||||| | |||| + |||||| |||| ||| | | || |||| || ||/+++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--+-++++++\| ||||| | |||| + |||||| |||| ||| | | || ||||/++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--+-++++++++\||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || |||||||| | | ||||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || ||\+++++-+-+--+/||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || |\+++++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-+++++-+-+--+-/|||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||||||||| |||| || || | | ||||||| | || | | || || ||||\-+-+--+--++++-+-+-+++++++++/| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||\++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+-+-+++++++++-+--+-++++++++++++++--/ |||| + |||||| |||| ||| | | ||/+-+++++-+++-++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+-+-+++++++++-+\ | |||||||||||||| |||| + |||||| |||| ||| | | |||\-+++++-+++-++++++-/||| || || | |/+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+\| ||||||||| || | |||||||||||||| |||| + |||||| \+++--+++-+--+-+++--+++++-+++-+++++/ ||| || || | ||||||||| | \+-+-+-++-++-++++--+-+--+--++++-+++-++++/|||| || | |||||||||||||| |||| + |||||| ||| ||| | | ||| ||||| ||| ||||| ||| || || | ||||||||| | | | | || || |||| | | | |||| ||| |||| |||| || | |||||||||||||| |||| +/++++++----+++--+++-+--+-+++--+++++-+++-+++++---+++----++-++-+-+++++++++-+\ | | |/++-++-++++--+-+--+--++++-+++-++++\|||| || | |||||||||||||| |||| +||||||| ||| ||| | | \++--+++++-+++-+++++---+++----++-++-+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++/|||||||| |||| +||||||| ||| ||| | | || ||||| |||/+++++---+++----++\||/+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++-++++++++\ |||| +||||||| ||| ||| | | || ||||| ||||||||| ||| |||||||/+++++++++-++--+-+\|||| || |||| | | | |||| ||| ||||||||| || | ||||| ||||||||| |||| +||||||| ||| ||| | | || \++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++/ | | \--++++-+++-+++++++++-++-+-+++/| ||||||||| |||| +|||||||/---+++--+++-+--+--++---++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++--\| | |||| ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| \++-+--+--++---++++-+/||||||| ||| \++++++++++++++++-++--+-++++++-++-+++--++-+-----+++/ ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| || | | || |||| | ||||||\---+++-----+++++++/|\++++++-++--+-++++++-++-+++--++-+-----+++--+++-+++++++++-++-+-+/| | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | /+++--+++-+++++++++-++\| | | | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | |||| ||| ||||||||| |||| | | | ||||||||| |||| +||||||||/--+++---++\| | || |||| | |||||| ||| ||||||| | |||||| || | ||\+++-++-+++--++-+----++++--+++-+++++++/| |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| \++-----+++++++-+-++++++-++--+-++-+/| || ||| || | |||| ||| ||||||| | |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| || ||||||| | |||||| || | || | | || ||| /++-+----++++--+++-+++++++-+\|||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |\++++-----++-----+/||||| | |||||| || | || | | || ||| ||| | |||| ||| ||||||| |||||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | | ||||/----++-----+-+++++-+-++++++-++--+-++-+-+\|| ||| ||| | |||| ||| |||||\+-++++++-+-+-+-+++++++++---++/| +||||||||| ||| |||| | || |||\-+-+-+++++----++-----+-+++++-+-++++++-++--+-++-+-++++-+++-+++-+----++++--+++-+++++-+-++++++-+-+-+-++++/|||| || | +||||||||| ||| /-++++--+--++---+++--+-+-+++++---\|| \-+++++-+-+++/|| || | || | |||| ||| ||| | |||| ||| ||||| | |||||| | | | |||| |||| || | +|||||\+++--+++-+-+++/ | |\---+++--+-+-+++++---+++-------+++++-+-+++-++-++--+-++-+-++++-+++-+++-+----++++--+++-+++++-+-+++/|| | | | |||| |||| || | +|||\+-+++--+++-+-+++---+--+----++/ | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| | |||| ||| ||||| | ||| || | | | |||| |||| || | +||| | ||| ||| | ||| | | || | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| \----++++--+++-++/|| | ||| || | | | |||| |||| || | +||| | ||| ||| | \++---+--+----++---+-+-+++++---+++-------+++++-+-+++-++-++--/ || | |||| \++-+++------++++--+++-++-++-+-/|| || | | | |||| |||| || | +||| | ||| ||| | || | | /++---+-+\||||| ||| ||||| | ||| || || || | ||\+--++-+++------++++--+++-++-++-+--++-++-+-+-+-+/|| |||| || | +||| | ||| ||| | || | | ||| | ||||||| ||| ||||| | ||| || || /--++-+-++-+--++-+++------++++--+++-++-++\| || || | | | | || |||| || | +||| | ||| |\+-+--++---+--+---+++---+-+++++++---+++-------+++/| | ||| |\-++-+--++-+-++-+--++-+++------++++--+++-++-+++/ || || | | | | || |||| || | +||| | ||| | | | || | | ||| | ||||||| ||| ||| | | ||| | || | || | || | || ||| |||| ||| || ||| || || | | | | || |||| || | +||| | ||| | | | || | \---+++---+-+++++++---+++-------+/| | | ||| | || | || | || | || ||| |||| ||| || ||| || || | | | | || |||| || | +||| | ||| | | |/-++---+---\ ||| | ||||||| ||| | | | | ||| | || | || | || | || ||| \+++--+++-++-+++---++-/| | | | | || |||| || | +||| | ||| | | || || | | ||| | ||||||| /+++------\| | | | ||| | || | || | || | || ||| ||| ||| || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| | ||\++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+--++-+++-------+++--++/ || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| /+-++-++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+-\|| ||| ||| /++--++-+++---++--+-+-+-+-+-++-++++--\|| | +||| \-+++--+-/ || || | | ||\--++-++-++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+-+++-+++-------+++-+++--++-+++---++--+-+-+-+-+-/| |||| ||| | +|\+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++/ | || | || | || | ||| ||| ||| ||| || ||| || | | | | | | |||| ||| | +\-+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+/ | || \-++-+-+++-+++-------+++-+++--++-+/| || | | | | | | |||| ||| | + | ||| /+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+--+--++--\|| | ||| ||| ||| ||| || | | || | | | | | | |||| ||| | + | ||| || ||/++---+---+--++---++-++-++++--++++------++-+-+-+-++--+-\| \--++--+++-+-+++-+++-------+++-+++--++-+-/ || | | | | | | |||| ||| | + | ||| || |\+++---+---/ || || || |||| |||| || | | | || | || || ||| | ||\-+++-------+++-+++--++-+-----+/ | | | | | | |||| ||| | + | ||| || | ||| | || || || |||| |||| || | | | || | || || ||| \-++--+++-------+++-+++--++-+-----+---+-+-+-/ | | |||| ||| | +/-+---+++-++--\| ||| | /-++---++-++-++++--++++------++-+-+-+-++\ | || || ||| || ||| ||| ||| || | | | \-+---+--+-++++--+/| | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| ||| ||| || | | | | | | |||| | | | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| |\+-+++--++-+-----+---+---+---+--+-++/| | | | +| \---+++-++--++-+++---+----+-++---++-++-+/|| |||| || | | | |\+-+-++-----++--+++---++--+++-------+-+-+++--++-+-----+---+---+---+--+-++-+--+-/ | +| ||| || || ||| | | \+---++-+/ | || |||| || | | | | | | || || |||/--++--+++-------+-+-+++--++-+-----+--\| | | | || | | | +| ||| || || ||| | | | || | | || |||| || | | | | | | || || |||| || ||| | | ||| || | | || | | | || | | | +| ||| || || ||| | | | || | \-++--++++------++-+-+-+-+-+-+-++-----++--++++--++--+++-------+-+-+++--++-+-----+--+/ | | | || | | | +| ||| || || \++---+----+--+---++-+----++--++++------++-+-+-+-+-+-+-/| || |||| || ||| | | ||| || | | | | | | || | | | +| ||| || || || | | | || | \+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--+-/| | | | +| ||| || || || | | \---++-+-----+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--/ | | | | +\-----+++-++--/| || | | || \-----+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---/ | | | | + ||| || | || | | || | |||| || \-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---------+-/ | | + ||| \+---+--++---+----+------++-------+--++++------++---+-+-+-+-+--+-----++--/||| || ||| | | ||| || | | | | | | | + ||| \---+--++---+----+------++-------+--++++------+/ | | | | \--+-----/| ||| || ||| /---+-+-+++--++-+-----+--+----+----\ | | | + ||| | || | | || | |||| | | | | | | | ||| || \++---+---+-+-+++--++-+-----/ | | | | | | + ||| | || | | || | |||\------+----+-+-+-+----/ | ||| || || | | | ||| || | | | | | | | + ||| | || | | || | ||| | \-+-+-+-----------/ ||| |\---++---+---/ | \++--++-+--------+----+----+----+----/ | + ||| | || | | |\-------+--+++-------+------+-+-+---------------+++--+----+/ | | || || | | | | | | + ||| | || \----+------+--------+--+++-------+------+-/ | \++--+----+----+-----+--++--++-+--------+----/ | | | + |\+------+--++--------+------+--------+--+++-------+------+---+----------------++--+----/ | | || |\-+--------+---------+----/ | + | \------+--+/ \------+--------+--+++-------+------+---/ |\--+---------+-----+--++--+--+--------/ | | + \--------+--+----------------+--------+--+++-------+------+--------------------+---+---------+-----+--++--/ | | | + | | | | ||| | | | | \-----+--++-----+------------------/ | + \--+----------------+--------+--+/| | | | | | || | | + \----------------+--------+--+-+-------+------+--------------------+---+---------------+--/| | | + | | | | | | | | | | | | + | | \-+-------/ | | | | | | | + | | | \--------------------+---+---------------+---/ | | + | \----+-----------------------------------/ | \---------+--------------------------------/ + | \---------------------------------------+-------------------------/ + \-----------------------------------------------------/ diff --git a/day13.part1.js b/day13.part1.js new file mode 100644 index 0000000..a59f86b --- /dev/null +++ b/day13.part1.js @@ -0,0 +1,12 @@ +'use strict' + +const {parseLevel, tick, renderMapAndCarts} = require('./day13') + +const {readFileSync} = require('fs') +const input = readFileSync('./day13.txt', 'utf-8') + +let {map, carts} = parseLevel(input) +do { + carts = tick(map, carts) + console.log(renderMapAndCarts(map, carts)) +} while (true) \ No newline at end of file diff --git a/day13.spec.js b/day13.spec.js new file mode 100644 index 0000000..4057bd0 --- /dev/null +++ b/day13.spec.js @@ -0,0 +1,217 @@ +'use strict' + +/* global describe, it, expect */ + +const {parseLevel, tick, renderMap, renderMapAndCarts} = require('./day13') + +const {readFileSync} = require('fs') +const input = readFileSync('./day13.txt', 'utf-8') +const inputAsMap = readFileSync('./day13.map.txt', 'utf-8') + +const states = [ + '/->-\\\n' + + '| | /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | v |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/-->\\\n' + + '| | /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\->--/\n' + + ' \\------/\n' + + '', + '/---v\n' + + '| | /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+>-/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| v /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+->/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----\\\n' + + '| /->--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--^\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----\\\n' + + '| /-+>-+-\\ |\n' + + '| | | | | ^\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----\\\n' + + '| /-+->+-\\ ^\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----<\n' + + '| /-+-->-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /---<\\\n' + + '| /-+--+>\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /--<-\\\n' + + '| /-+--+-v |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /-<--\\\n' + + '| /-+--+-\\ |\n' + + '| | | | v |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /<---\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-<--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | v----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\<+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----\\\n' + + '| /-+--v-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ ^-+--/\n' + + ' \\------/\n' + + '', + '/---\\\n' + + '| | /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | X | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/ ' +] + +describe('Mine Cart Madness', () => { + it('should parse the level', () => { + const {carts, map} = parseLevel(states[0]) + expect(renderMap(map)).toEqual( + '/---\\\n' + + '| | /----\\\n' + + '| /-+--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n' + ) + expect(carts).toEqual([ + { + x: 2, + y: 0, + dir: '>', + turn: 0 + }, + { + x: 9, + y: 3, + dir: 'v', + turn: 0 + } + ]) + }) + it('should move the carts', () => { + const {map, carts} = parseLevel(states[0]) + const mapTick = tick.bind(undefined, map) + expect(mapTick(carts)).toEqual([ + { + x: 3, + y: 0, + dir: '>', + turn: 0 + }, + { + x: 9, + y: 4, + dir: '>', + turn: 1 + } + ]) + expect(mapTick(mapTick(carts))).toEqual([ + { + x: 4, + y: 0, + dir: 'v', + turn: 0 + }, + { + x: 10, + y: 4, + dir: '>', + turn: 1 + } + ]) + let {carts: tickedCarts} = parseLevel(states[0]) + for (let i = 0; i < 13; i++) { + tickedCarts = mapTick(tickedCarts) + } + expect(tickedCarts).toMatchObject([ + { + x: 7, + y: 2, + dir: 'v' + }, + { + x: 7, + y: 4, + dir: '^' + } + ]) + + try { + mapTick(tickedCarts) + throw new Error('Fail!') + } catch (err) { + expect(err.message).toEqual('Crash at 7,3') + expect(err.x).toEqual(7) + expect(err.y).toEqual(3) + } + }) + + it('should solve the puzzle', () => { + let {map, carts} = parseLevel(input) + expect(renderMap(map)).toEqual(inputAsMap) + expect(renderMapAndCarts(map, carts)).toEqual(input) + try { + do { + carts = tick(map, carts) + renderMapAndCarts(map, carts) + } while (true) + } catch (err) { + expect(err.message).toEqual('Crash at 57,112') + expect(err.x).toEqual(57) + expect(err.y).toEqual(112) + } + }) +}) diff --git a/day13.txt b/day13.txt new file mode 100644 index 0000000..912fff1 --- /dev/null +++ b/day13.txt @@ -0,0 +1,150 @@ + /-------------------------------------\ + /----------------------------------\ /---------------+-------------------------------------+--------\ + /+----------------------------------+-------------------+---------------+----------------------------------\ | | + || /---------+-------------------+-\ /-----------+--------------\ | | | /--------\ + || /------+--\ | /------+-+-+-----------+--------------+--------------\ | | | | | + || | | | |/-----------+------+-+-+-----------+--------------+--------------+----+--+--\ | | | + || /---------------+------+--+------++-----------+--\ | | | | /-------+----\ | | | | | | | + || | /---+------+--+-\ || | | | | | | | | /+---------+----+--+--+-----+-\ | | + || | | | | | | || | | | | | | /-+-------+---++---------+----+--+--+-----+-+--+\ | + || | | | | | | || | /+---+-+-+-----------+----+-+-------+---++\ | | | | | | || | + || | | /-+------+--+-+----++-----------+\|| | | | | | |/------+---+++--------+----+--+\ | | | || | + || | | | | | | | || |||| | | | | | || | ||| | | || | | | || | + || | | | | /----+--+-+----++-----------++++---+-+-+-----------+----+-++--\ | ||| | |/-++-+-----+-+--++-------+----\ +/--------++-+-----------+-+-+-+----+--+-+----++-----------++++---+-+-+----\ | |/++--+---+---+++--------+----++-++-+-----+-+\ || | | +| || | /-+-+-+-+----+--+-+----++------\ |||| | | | | | |||| | | ||| | || || | | || || | | +| || | | | | | | | | | || | |||| | | | /--+------+----++++--+---+---+++--------+----++\|| | | || || | | +| /---++-+-------\ | | | | | | | | || | |||| | | | | | | |||| | | ||| /------+----+++++-+-----+-++-++-----\ | | +| | || | | | | | | | | | | /++------+----++++-\ | | | | | | |||| | | ||| | | ||||| | | || || | | | +| | || | | | | | | | | | | ||| | ||||/+-+-+-+-+--+------+----++++--+---+---+++-+------+----+++++-+---\ | || || | | | +| | || | /---+-+-+-+-+-+----+-\| | ||| | |||||| | | | | | | |||| | | ||| | /---+----+++++-+---+-+-++-++-----+-+-\ | +|/---+---++-+---+---+-+-+-+-+-+----+-++-+---+++------+----++++++-+-+\| | | | |||| | | ||| | | | ||||| | | | || || | | | | +|| | || | | | | | | | | | || | /+++------+----++++++-+-+++-+--+------+----++++--+---+---+++-+--+---+----+++++-+---+-+-++-++---\ | | | | +|| | || | | | | | | | | | || | |||| | |||||| | ||| | | | |||| | | ||| | | | ||||| | | | || || | | | | | +|| | || | | | | | | | | | || | |||| | /--++++++-+-+++-+--+------+----++++--+---+---+++-+-\| | ||||| | | | || || ^ | | | | +|| | |v | | | | | | | | | || | |||| | | |||||| | ||| | | | |||| | | ||| | || | ||||| | |/+-++-++---+-+-+-+\ | +|| | || | | /+-+-+-+-+-+----+-++-+--++++------+-+--++++++-+\||\-+--+------+----++++--+---//--+++-+-++---+--\ ||||| | ||| || \+---+-+-/ || | +|| | || | | || | | | \-+----+-+/ | |||| | | |||||| |||| /+--+----\ | |||| | | ||| | || | | ||||| | ||| || | | | || | +||/--+---++-+---+--++-+-+-+---+----+-+--+-\|||| | | |||||| |||| || | | | |||| | | ||| | || |/-+-+++++-+--\||| || | | | || | +||| | \+-+---+--++-+-+-+---+----+-+--+-+++++------+-+--++++++-++++-++--+----+-+----++++--+----+--+++-+-++---++-+-/|||| | |||| || | | | || | +|||/-+----+-+---+--++-+-+-+---+--\ | | | ||||| | | |||||| |||| || | /--+-+----++++--+----+--+++-+-++---++-+-\|||| | |||| || | | | || | +\+++-+----+-+---+--++-+-+-+---+--+-+-+--+-+++++------+-+--++++++-++++-++--/ | | | |||| /+----+--+++-+-++---++-+\||||| | |||| || | | | || | + ||| | | | | || | | | | | | | | ||||| |/+--++++++-++++-++----+--+-+\ |||| || | ||| | || || ||||||| | |||| || | | | || | + ||^ | | | | || | \-+---+--+-+-+--/ ||||| ||| |||||| |||| || | | || |||| || | ||| | || || ||||||| | |||| || | | | || | + ||| | | | |/-++-+---+---+--+-+-+----+++++------+++--++++++-++++-++----+\ | || |||| || | ||| | || ||/+++++++-+--++++-++--+---+\| || | + ||| | /--+-+---++-++\| | | | | | ||||| ||| \+++++-++++-++----++-+-++---++++-++----+--+++-+-++---/||||||||| | |||| || | ||| || | + ||| | | | | || |||| | | | | | ||||| ||| /-+++++-++++-++----++\| || /-++++-++----+--+++-+-++----+++++++++-+--++++\|| | ||| || | + ||| | | | | || |||| | |/-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++----+++++++++-+--+++++++--+-\ ||| || | + ||| | | | | ||/++++---+---++-+-+-+----+++++------+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-++\ ||||||||| | ||||||| | | ||| || | + ||| | | | | ||||||| | /-++-+-+-+----+++++\ ||| | ||||| |||| || |||| || | |||| || | ||| | ||| \++++++++-+--/|||||| | | ||| || | + ||| | | | | ||||||| | | || |/+-+----++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++----++++++++-+---++++++--+-+\||| || | + ||| | | | | ||||||| | | || ||| | /-++++++-----+++-+-+++++-++++-++----++++-++-+-++++-++----+--+++-+-+++-\/-++++++++\| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | |||||| ||| | ||||| |||| || |||| || | ||||/++----+--+++\| ||| || |||||||||| |||||| | ||||| || | + ||| | | | | ||||||| | | || ||| | | ||||||/----+++-+-+++++-++++-++----++++-++\| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||/+-+--+-+-\ ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | ||||| ||| || |||||||||| |||||| | ||||| || | + |||||/+--+-+-+-+++++++---+-+-++-+++-+--+-+++++++----+++-+-+++++-++++-++----++++-++++-+++++++----+--+++++-+++-++\|||||||||| |||||| | ||^|| || | + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | ||||| |||| || |||| |||| ||||||| | |||||/+++-+++++++++++++---++++++--+-+++++---++-+\ + ||||||| | | | ||||||| | | || ||| | | ||||||| ||| | |||\+-++++-++----++++-++++-+++++++----+--+++++++++-+++++++++++++---/||||| | ||||| || || + ||||||| | | | ||||||| | | || |||/+--+-+++++++----+++-+-+++-+-++++-++----++++-++++-+++++++--\ | ||||||||| ||||||||||||| ||||| | ||||| || || + ||||||| | | | ||||||| | | || ||\++--+-+++++++----+++-+-+++-+-++/| || |||| |||| ||||||| /+-+--+++++++++-+++++++++++++---\||||| | ||||| || || + ||||||| | | | |||\+++---+-+-++-++-++--+-+++++++----+++-+-+++-+-+/ | || |||| |||| ||||||| || | ||||||||| ||||||||||||| |||||| | ||||| || || + ||^|||| | | | ||| ||| | | || || || | ||||||| ||| | ||| | | | || |||| |||| |||||\+-++-+--+++++++++-+++++/||||||| |||||| | ||||| || || + ||||||| | | | ||| |||/--+-+-++-++-++--+-+++++++----+++-+-+++-+-+\ | || |||| |||| ||||| | || | ||||||||| ||||| ||||||| |||||| | ||||| || || + |||\+++--+-+-/ ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | |||||||\+-+++++-+++++++---++++++--+-+++++---/| || + ||| ||| | | ||| |||| | | || || || | ||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||| ||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||/---+++-+-+++-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-+++++\||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | ||| | || | || |||| |||| ||||| | || | ||||||| | ||||||||||||| |||||| | ||||| | || + ||| ||| | | ||| |||| | | || || || | |||||||| ||| | |\+-+-++-+-++----++++-++++-+++++-+-++-+--++/|||| | ||||||||||||| |||||| | ||||| | || + ||| ||| |/+---+++-++++--+-+-++-++-++--+-++++++++---+++-+\| | | || | || |||| |||| ||||| | || | || |||| | ||||||||||||| |||||| | ||||| | || + ||| ||| ||| ||| |||| | | || || || /+-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++--+-+++++--\ | || + ||| ||| ||| ||| |||| /+-+-++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++-++++-+-+++++++++++++---++++++\ | ||||| | | || + ||| ||| ||| ||| |||| || |/++-++-++-++-++++++++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--++\|||| | ||||||||^|||| ||||||| | ||||| | | || + ||| ||| ||| ||| |||| || |||| || || || ||||\+++---+++-+++-+-+-++-+-++----++++-++++-+++++-+-++-+--+++++++-+-++++++++++++/ ||||||| | ||||| | | || + ||| ||| ||| ||| ||\+-++-++++-++-++-++-++++-+++---/|| ||| | | || | || |||| |||| ||||| | \+-+--+++++++-+-++++++++++++----/|||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||/---++-+++-+-+-++-+-++-\ |||| |||| ||||| | | | ||||||| | |\+++++++++/ |||||| | ||||| | | || + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | ||/+-++-+--++++-++++-+++++-+--+-+--+++++++-+-+-+++++++++------++++++-+-+++++--+-+\|| + ||| ||| ||| ||| || | || |||| || || || |||| |||| || ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| ||\--+++---+++-+/ | || |||| || || || |||| |||| ^| ||| | | |||| || | |||| |||| ||||| | | | ||||||| | | ||||||||| |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| || \++-+-+-++++-++-+--++/| |||| v|||| |/-+-+--+++++++-+-+-+++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| \+--++-+-+-++++-++-+--++-+-+/|| |||||/++-+-+--+++++++-+-+-++++++++++\ |||||| | ||||| | |||| + ||| || ||| ||| | | || |||| || || || |||| |||| |/-++-+-+-++++\|| | || | | || |||||||| | | ||||||| | | ||||||||||| |||||| | ||||| | |||| + |||/++---+++\ ||| | | || |||| || || ||/++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--\ |||||| | ||||| | |||| + |||||| |||| ||| | | ^| |||| || ||/+++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+--+++++++-+-+-+++++++++++--+-++++++\| ||||| | |||| + |||||| |||| ||| | | || ||||/++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++++++++-+-+->+++++++-+-+-+++++++++++--+-++++++++\||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || |||||||| | | ||||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || ||||||| |||||||||| |||| || || | | ||||||| | || | | || ||\+++++-+-+--+/||||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || |\+++++-++++++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-+++++-+-+--+-/|||| | | ||||||||||| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||||||||| |||| || || | | ||||||| | || | | || || ||||\-+-+--+--++++-+-+-+++++++++/| | |||||||||||||| | |||| + |||||| |||| ||| | | || | ||||| |||\++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+-+-+++++++++-+--+-++++++++++++++--/ |||| + |||||| |||| ||| | | ||/+-+++++-+++-++++++-++++----++-++-+-+-+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+-+-+++++++++-+\ | |||||||||||||| |||| + |||||| |||| ||| | | |||\-+++++-+++-++++++-/||| || || | |/+++++++-+--++-+-+-++-++-++++--+-+--+--++++-+\| ||||||||| || | |||||v||||||v| |||| + |||||| \+++--+++-+--+-+++--+++++-+++-+++++/ ||| || || | ||||||||| | \+-+-+-++-++-++++--+-+--+--++++-+++-++++/|||| || | |||||||||||||| |||| + |||||| ||| ||| | | ||| ||||| ||| ||||| ||| || || | ||||||||| | | | | || || |||| | | | |||| ||| |||| |||| || | |||||||||||||| |||| +/++++++----+++--+++-+--+-+++--+++++-+++-+++++---+++----++-++-+-+++++++++-+\ | | |/++-++-++++--+-+--+--++++-+++-++++\|||| || | |||||||||||||| |||| +||||||| ||| ||| | | \++--+++++-+++-+++++---+++----++-++-+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++/|||||||| |||| +||||||| ||| ||| | | || ||||| |||/+++++---+++----++\||/+-+++++++++-++--+-+-++++-++-++++--+-+--+--++++-+++-+++++++++-++-+-+++++-++++++++\ |||| +||||||| ||| ||| | | || ||||| ||||||||| ||| |||||||/+++++++++-++--+-+\|||| || |||| | | | |||| ||| ||||||||| || | ||||| ||||||||| |||| +||||||| ||| ||| | | || \++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++/ | | \--++++-+++-+++++++++-++-+-+++/| ||||||||| |||| +|||||||/---+++--+++-+--+--++---++++-+++++++++---+++----+++++++++++++++++-++--+-++++++-++-+++--\| | |||| ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| \++-+--+--++---++++-+/||||||| ||| \++++++++++++++++-++--+-++++++-++-+++--++-+-----+++/ ||| ||||||||| || | ||| | ||||||||| |||| +|||||||| ||| || | | || |||| | ||||||\---+++-----+++++++/|\++++++-++--+-++++++-++-+++--++-+-----+++--+++-+++++++++-++-+-+/| | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | /+++--+++<+++++++++-++\| | | | ||||||||| |||| +|||||||| ||| || | | || |||| | |||||| ||| ||||||| | |||||| || | |||||| || ||| || | |||| ||| ||||||||| |||| | | | ||||||||| |||| +||||||||/--+++---++\| | || |||| | |||||| ||| ||||||| | |||||| || | ||\+++-++-+++--++-+----++++--+++-+++++++/| |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| \++-----+++++++-+-++++++-++--+-++-+/| || ||| || | |||| ||| ||||||| | |||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |||||| || ||||||| | |||||| || | || | | || ||| /++-+----++++--+++-+++++++-+\|||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | |\++++-----++-----+/||||| | |||||| || | || | | || ||| ||| | |||| ||| ||||||| |||||| | | | ||||||||| |||| +||||||||| ||| |||| | || |||| | | ||||/----++-----+-+++++-+-++++++-++--+-++-+-+\|| ||| ||| | |||| ||| |||||\+-++++++-+-+-+-+++++++++---++/| +||||||||| ||| |||| | || |||\-+-+-+++++----++-----+-+++++-+-++++++-++--+-++-+-++++-+++-+++-+----++++--+++-+++++-+-++++++-+-+-+-++++/|||| || | +||||||||| ||| /-++++--+--++---+++--+-+-+++++---\|| \-+++++-+-+++/|| || | || | |||| ||| ||| | |||| ||| ||||| | |||||| | | | |||| |||| || | +|||||\+++--+++-+-+++/ | |\---+++--+-+-+++++---+++-------+++++-+-+++-++-++--+-++<+-++++-+++-+++-+----++++--+++-+++++-+-+++/|| | | | |||| |||| || | +|||\+-+++--+++-+-+++---+--+----++/ | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| | |||| ||| ||||| | ||| || | | | |||| |||| || | +||| | ||| ||| | ||| | | || | | ||||| ||| ||||| | ||| || || | || | |||| ||| ||| \----++++--+++-++/|| | ||| || | | | |||| |||| || | +||| | ||| ||| | \++---+--+----++---+-+-+++++---+++-------+++++-+-+++-++-++--/ || | |||| \++-+++------++++--+++-++-++-+-/|| || | | | |||| |||| || | +||| | ||| ||| | || | | /++---+-+\||||| ||| ||||| | ||| || || || | ||\+--++-+++------++++--+++-++-++-+--++-++-+-+-+-+/|| |||| || | +||| | ||| ||| | || | | ||| | ||||||| ||| ||||| | ||| || || /--++-+-++-+--++-+++------++++--+++-++-++\| || || | | | | || |||| || | +||| | ||| |\+-+--++---+--+---+++---+-+++++++---+++-------+++/| | ||| |\-++-+--++-+-++-+--++-+++------++++--+++-++-+++/ || || | | | | || |||| || | +||| | ||| | | | || | | ||| | ||||||v ||| ||| | | ||| | || | || | || | || ||| |||| ||| || ||| || || | | | | || |||| || | +||| | ||| | | | || | \---+++---+-+++++++---+++-------+/| | | ||| | || | || | || | || ||| |||| ||| || ||| || || | | | | || |||| || | +||| | ||| | | |/-++---+---\ ||| | ||||||| ||| | | | | ||| | || | || | || | || ||| \+++--+++-++-+++---++-/| | | | | || |||| || | +||| | ||| | | || || | | ||| | ||||||| /+++------\| | | | ||| | || | || | || | || ||| ||| ||| || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| | ||\++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+--++-+++-------+++--++/ || ||| || | | | | | || |||| || | +||| | ||| | | || || | | ||| /+-++-++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+-\|| ||| ||| /++--++-+++---++--+-+-+-+-+-++-++++--\|| | +||| \-+++--+-/ || || | | ^|\--++-++-++++--++++------++-+-+-+-+++-+--++-+--++-+-++-+-+++-+++-------+++-+++--++-+++---++--+-+-+-+-+-/| |||| ||| | +|\+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++/ | || | || | || | ||| ||| ||| ||| || ||| || | | | | | | |||| ||| | +\-+---+++--+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+/ | || \-++-+-+++-+++-------+++-+++--++-+/| || | | | | | | |||| ||| | + | ||| /+---++-++---+---+--++---++-++-++++--++++------++-+-+-+-++--+--+--+--++--\|| | ||| ||| ||| ||| || | | || | | | | | | |||| ||| | + | ||| || ||/++---+---+--++---++-++-++++--++++------++-+-+-+-++--+-\| \--++--+++-+-+++-+++-------+++-+++--++-+-/ || | | | | | | |||| ||| | + | ||| || |\+++---+---/ || || || |||| |||| || | | | || | || || ||| | ||\-+++-------+++-+++--++-+-----+/ | | | | | | |||| ||| | + | ||| || | ||| | || || || |||| |||| || | | | || | || || ||| \-++--+++-------+++-+++--++-+-----+---+-+-+-/ | | |||| ||| | +/-+---+++-++--\| ||| | /-++---++-++-++++--++++------++-+-+-+-++\ | || || ||| || ||| ||| ||| || | | | \-+---+--+-++++--+/| | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| ||| ||| || | | | | | | |||| | | | +| | ||| || || ||| | | || || || |||| |||| || | | | ||| | || || ||| || ||| |\+-+++--++-+-----+---+---+---+--+-++/| | | | +| \---+++-++--++-+++---+----+-++---++-++-+/|| |||| || | | | |\+-+-++-----++--+++---++--+++-------+-+-+++--++-+-----+---+---+---+--+-++-+--+-/ | +| ||| || || ||| | | \+---++-+/ | || |||| || | | | | | | || || |||/--++--+++-------+-+-+++--++-+-----+--\| | | | || | | | +| ||| || || ||| | | | || | | || |||| || | | | | | | || || |||| || ||| | | ||| || | | || | | | || | | | +| ||| || || ||| | | | || | \-++--++++------++-+-+-+-+-+-+-++-----++--++++--++--+++-------+-+-+++--++-+-----+--+/ | | | || | | | +| ||| || || \++---+----+--+---++-+----++--++++------++-+-+-+-+-+-+-/| || |||| || ||| | | ||| || | | | | | | || | | | +| ||| || || || | | | || | \+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--+-/| | | | +| ||| || || || | | \---++-+-----+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---+--/ | | | | +\-----+++-++--/| || | | || \-----+--++++------++-+-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---/ | | | | + ||| || | || | | || | |||| || \-+-+-+-+-+--+-----++--++++--++--+++-------+-+-+++--++-+-----+--+----+---------+-/ | | + ||| \+---+--++---+----+------++-------+--++++------++---+-+-+-+-+--+-----++--/||| || ||| | | ||| || | | | | | | | + ||| \---+--++---+----+------++-------+--++++------+/ | | | | \--+-----/| ||| || ||| /---+-+-+++--++-+-----+--+----+----\ | | | + ||| | || | | || | |||| | | | | | | | ||| || \++---+---+-+-+++--++-+-----/ | | | | | | + ||| | || | | || | |||\------+----+-+-+-+----/ | ||| || || | | | ||| || | | | | | | | + ||| | || | | || | ||| | \-+-+-+-----------/ ||| |\---++---+---/ | \++--++-+--------+----+----+----+----/ | + ||| | || | | |\-------+--+++-------+------+-+-+---------------+++--+----+/ | | || || | | | | | | + ||| | || \----+------+--------+--+++-------+------+-/ | \++--+----+----+-----+--++--++-+--------+----/ | | | + |\+------+--++--------+------+--------+--+++-------+------+---+----------------++--+----/ | | || |\-+--------+---------+----/ | + | \------+--+/ \------+--------+--+++-------+------+---/ |\--+---------+-----+--++--+--+--------/ | | + \--------+--+----------------+--------+--+++-------+------+--------------------+---+---------+-----+--++--/ | | | + | | | | ||| | | | | \-----+--++-----+----------<-------/ | + \--+----------------+--------+--+/| | | | | | || | | + \----------------+--------+--+-+-------+------+--------------------+---+---------------+--/| | | + | | | | | | | | | | | | + | | \-+-------/ | | | | | | | + | | | \--------------------+---+---------------+---/ | | + | \----+-----------------------------------/ | \---------+--------------------------------/ + | \---------------------------------------+-------------------------/ + \-----------------------------------------------------/ From d837999440e9db18f5758817a124ba3f529f7054 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 10:03:38 +0100 Subject: [PATCH 43/56] day 13, part1 --- day13.js | 52 +++++++++++++++++++++++++++++++++++++++----------- day13.part1.js | 10 +++++----- day13.spec.js | 18 ++++++++--------- 3 files changed, 55 insertions(+), 25 deletions(-) diff --git a/day13.js b/day13.js index c2023f0..0bb3b87 100644 --- a/day13.js +++ b/day13.js @@ -1,5 +1,7 @@ 'use strict' +const chalk = require('chalk') + const parseLevel = state => { const rows = state.split('\n').filter(l => l.length) const width = rows.reduce((max, line) => Math.max(line.length, max), 0) @@ -15,7 +17,7 @@ const parseLevel = state => { for (let x = 0; x < width; x++) { const m = (currentState[y][x] || '').match(/(?[\^v<>])/) if (m) { - const {dir} = m.groups + const { dir } = m.groups carts.push({ dir, x, y, turn: 0 }) @@ -40,25 +42,25 @@ const parseLevel = state => { const renderMap = map => map.reduce((s, row) => s + row.join('').replace(/ +$/g, '') + '\n', '') -const renderMapAndCarts = (map, carts) => { +const renderMapAndCarts = (map, carts, colored = false) => { const width = map.reduce((max, line) => Math.max(line.length, max), 0) const height = map.length let r = [] for (let y = 0; y < height; y++) { r[y] = [] for (let x = 0; x < width; x++) { - r[y][x] = map[y][x] + r[y][x] = colored ? chalk.gray(map[y][x] || '') : map[y][x] || '' } } - carts.forEach(({x, y, dir}) => { - r[y][x] = dir + carts.forEach(({ x, y, dir }) => { + r[y][x] = colored ? chalk.green(dir) : dir }) return renderMap(r) } const tick = (map, carts) => { const movedCarts = carts.map(cart => { - let {dir, x, y, turn} = cart + let { dir, x, y, turn } = cart switch (dir) { case '^': y-- @@ -81,16 +83,16 @@ const tick = (map, carts) => { case '+': switch (cart.turn) { // left, straight, right case 0: - dir = dir === '^' ? '<' : '>' // turn left + dir = turnLeft(dir) break case 1: // keep straight break case 2: - dir = dir === '^' ? '>' : '<' // turn right + dir = turnRight(dir) break } - turn = turn + 1 % 3 + turn = (turn + 1) % 3 break case '\\': switch (dir) { @@ -124,15 +126,43 @@ const tick = (map, carts) => { break } break + default: + throw Error('Off track!') } - return {dir, x, y, turn} - }).sort(({y: y1}, {y: y2}) => y1 - y2) + return { dir, x, y, turn } + }).sort(({ y: y1 }, { y: y2 }) => y1 - y2) const crashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y)) if (crashed.length) throw new Crash(`Crash at ${crashed[0].x},${crashed[0].y}`, crashed[0].x, crashed[0].y) return movedCarts } +const turnLeft = dir => { + switch (dir) { + case '^': + return '<' + case 'v': + return '>' + case '>': + return '^' + case '<': + return 'v' + } +} + +const turnRight = dir => { + switch (dir) { + case '^': + return '>' + case 'v': + return '<' + case '>': + return 'v' + case '<': + return '^' + } +} + module.exports = { parseLevel, tick, diff --git a/day13.part1.js b/day13.part1.js index a59f86b..281fc43 100644 --- a/day13.part1.js +++ b/day13.part1.js @@ -1,12 +1,12 @@ 'use strict' -const {parseLevel, tick, renderMapAndCarts} = require('./day13') +const { parseLevel, tick, renderMapAndCarts } = require('./day13') -const {readFileSync} = require('fs') +const { readFileSync } = require('fs') const input = readFileSync('./day13.txt', 'utf-8') -let {map, carts} = parseLevel(input) +let { map, carts } = parseLevel(input) do { carts = tick(map, carts) - console.log(renderMapAndCarts(map, carts)) -} while (true) \ No newline at end of file + console.log(renderMapAndCarts(map, carts, true)) +} while (true) diff --git a/day13.spec.js b/day13.spec.js index 4057bd0..f290a48 100644 --- a/day13.spec.js +++ b/day13.spec.js @@ -2,9 +2,9 @@ /* global describe, it, expect */ -const {parseLevel, tick, renderMap, renderMapAndCarts} = require('./day13') +const { parseLevel, tick, renderMap, renderMapAndCarts } = require('./day13') -const {readFileSync} = require('fs') +const { readFileSync } = require('fs') const input = readFileSync('./day13.txt', 'utf-8') const inputAsMap = readFileSync('./day13.map.txt', 'utf-8') @@ -117,7 +117,7 @@ const states = [ describe('Mine Cart Madness', () => { it('should parse the level', () => { - const {carts, map} = parseLevel(states[0]) + const { carts, map } = parseLevel(states[0]) expect(renderMap(map)).toEqual( '/---\\\n' + '| | /----\\\n' + @@ -142,7 +142,7 @@ describe('Mine Cart Madness', () => { ]) }) it('should move the carts', () => { - const {map, carts} = parseLevel(states[0]) + const { map, carts } = parseLevel(states[0]) const mapTick = tick.bind(undefined, map) expect(mapTick(carts)).toEqual([ { @@ -172,7 +172,7 @@ describe('Mine Cart Madness', () => { turn: 1 } ]) - let {carts: tickedCarts} = parseLevel(states[0]) + let { carts: tickedCarts } = parseLevel(states[0]) for (let i = 0; i < 13; i++) { tickedCarts = mapTick(tickedCarts) } @@ -200,7 +200,7 @@ describe('Mine Cart Madness', () => { }) it('should solve the puzzle', () => { - let {map, carts} = parseLevel(input) + let { map, carts } = parseLevel(input) expect(renderMap(map)).toEqual(inputAsMap) expect(renderMapAndCarts(map, carts)).toEqual(input) try { @@ -209,9 +209,9 @@ describe('Mine Cart Madness', () => { renderMapAndCarts(map, carts) } while (true) } catch (err) { - expect(err.message).toEqual('Crash at 57,112') - expect(err.x).toEqual(57) - expect(err.y).toEqual(112) + expect(err.message).toEqual('Crash at 100,21') + expect(err.x).toEqual(100) + expect(err.y).toEqual(21) } }) }) From b8e33a11484a047e5dd51c92d362af6f9b936a1f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 17:07:51 +0100 Subject: [PATCH 44/56] refactor day 12, use strings --- day13.js | 56 ++++++++++++++++++++++++++++++++------------------ day13.part2.js | 22 ++++++++++++++++++++ day13.spec.js | 8 +++----- 3 files changed, 61 insertions(+), 25 deletions(-) create mode 100644 day13.part2.js diff --git a/day13.js b/day13.js index 0bb3b87..d4567d2 100644 --- a/day13.js +++ b/day13.js @@ -2,20 +2,16 @@ const chalk = require('chalk') -const parseLevel = state => { - const rows = state.split('\n').filter(l => l.length) +const parseLevel = level => { + const rows = level.split('\n').filter(l => l.length) const width = rows.reduce((max, line) => Math.max(line.length, max), 0) const height = rows.length - const currentState = [ - ...rows.map(r => [...r]) - ] - const nextState = [ - ...rows.map(r => [...r]) - ] + let normalizedMap = rows.map(r => r.padEnd(width, ' ')).join('') // Make sure all lines are of same length + let mapWithoutCarts = `${normalizedMap}` const carts = [] for (let y = 0; y < height; y++) { for (let x = 0; x < width; x++) { - const m = (currentState[y][x] || '').match(/(?[\^v<>])/) + const m = (normalizedMap[y * width + x] || '').match(/(?[\^v<>])/) if (m) { const { dir } = m.groups carts.push({ @@ -24,41 +20,43 @@ const parseLevel = state => { switch (dir) { case '^': case 'v': - nextState[y][x] = '|' + mapWithoutCarts = mapWithoutCarts.substr(0, y * width + x) + '|' + mapWithoutCarts.substr(y * width + x + 1) break case '<': case '>': - nextState[y][x] = '-' + mapWithoutCarts = mapWithoutCarts.substr(0, y * width + x) + '-' + mapWithoutCarts.substr(y * width + x + 1) break } } } } return { - map: nextState, + map: { + width, height, map: mapWithoutCarts + }, carts } } -const renderMap = map => map.reduce((s, row) => s + row.join('').replace(/ +$/g, '') + '\n', '') +const renderMap = ({ map, width }) => { + return map.match(new RegExp(`.{${width}}`, 'g')).join('\n') +} -const renderMapAndCarts = (map, carts, colored = false) => { - const width = map.reduce((max, line) => Math.max(line.length, max), 0) - const height = map.length +const renderMapAndCarts = ({ map, width, height }, carts, colored = false) => { let r = [] for (let y = 0; y < height; y++) { r[y] = [] for (let x = 0; x < width; x++) { - r[y][x] = colored ? chalk.gray(map[y][x] || '') : map[y][x] || '' + r[y][x] = colored ? chalk.gray(map[y * width + x]) : map[y * width + x] } } carts.forEach(({ x, y, dir }) => { r[y][x] = colored ? chalk.green(dir) : dir }) - return renderMap(r) + return r.reduce((s, r) => s + r.join('') + '\n', '') } -const tick = (map, carts) => { +const tick = ({ map, width }, carts, removeCrashingCarts = false) => { const movedCarts = carts.map(cart => { let { dir, x, y, turn } = cart switch (dir) { @@ -75,7 +73,7 @@ const tick = (map, carts) => { x++ break } - const n = map[y][x] + const n = map[y * width + x] switch (n) { case '-': case '|': @@ -132,6 +130,13 @@ const tick = (map, carts) => { return { dir, x, y, turn } }).sort(({ y: y1 }, { y: y2 }) => y1 - y2) + if (removeCrashingCarts) { + const notCrashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y) === undefined) + if (notCrashed.length === 1) { + throw new LastCartError(`Last cart at ${notCrashed[0].x},${notCrashed[0].y}`, notCrashed[0].x, notCrashed[0].y) + } + return notCrashed + } const crashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y)) if (crashed.length) throw new Crash(`Crash at ${crashed[0].x},${crashed[0].y}`, crashed[0].x, crashed[0].y) return movedCarts @@ -180,3 +185,14 @@ class Crash extends Error { Object.setPrototypeOf(this, Crash.prototype) } } + +class LastCartError extends Error { + constructor (msg, x, y) { + super(msg) + this.x = x + this.y = y + this.name = Crash.name + Error.captureStackTrace(this, Crash) + Object.setPrototypeOf(this, Crash.prototype) + } +} diff --git a/day13.part2.js b/day13.part2.js new file mode 100644 index 0000000..9668bf8 --- /dev/null +++ b/day13.part2.js @@ -0,0 +1,22 @@ +'use strict' + +const { parseLevel, tick } = require('./day13') + +const { readFileSync } = require('fs') +const input = readFileSync('./day13.txt', 'utf-8') + +let { map, carts } = parseLevel(input) +let i = 0 + +const NS_PER_SEC = 1e9 +let start = process.hrtime() +const benchEvery = 10000000 +do { + carts = tick(map, carts, true) + if (++i % benchEvery === 0) { + console.log(i) + const diff = process.hrtime(start) + console.log(`${Math.round((diff[0] * NS_PER_SEC + diff[1]) / benchEvery)}ns / tick`) + start = process.hrtime() + } +} while (true) \ No newline at end of file diff --git a/day13.spec.js b/day13.spec.js index f290a48..6ee9d18 100644 --- a/day13.spec.js +++ b/day13.spec.js @@ -9,7 +9,7 @@ const input = readFileSync('./day13.txt', 'utf-8') const inputAsMap = readFileSync('./day13.map.txt', 'utf-8') const states = [ - '/->-\\\n' + + '/->-\\ \n' + '| | /----\\\n' + '| /-+--+-\\ |\n' + '| | | | v |\n' + @@ -119,12 +119,12 @@ describe('Mine Cart Madness', () => { it('should parse the level', () => { const { carts, map } = parseLevel(states[0]) expect(renderMap(map)).toEqual( - '/---\\\n' + + '/---\\ \n' + '| | /----\\\n' + '| /-+--+-\\ |\n' + '| | | | | |\n' + '\\-+-/ \\-+--/\n' + - ' \\------/\n' + ' \\------/ ' ) expect(carts).toEqual([ { @@ -201,8 +201,6 @@ describe('Mine Cart Madness', () => { it('should solve the puzzle', () => { let { map, carts } = parseLevel(input) - expect(renderMap(map)).toEqual(inputAsMap) - expect(renderMapAndCarts(map, carts)).toEqual(input) try { do { carts = tick(map, carts) From b19f5b024834b212d5a69aaee66b3679c6d85395 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 22:28:42 +0100 Subject: [PATCH 45/56] day 13: do not multicrash --- day13.js | 170 ++++++++++++++++++++++++++----------------------- day13.part2.js | 2 +- day13.spec.js | 28 ++++---- 3 files changed, 107 insertions(+), 93 deletions(-) diff --git a/day13.js b/day13.js index d4567d2..b0621ca 100644 --- a/day13.js +++ b/day13.js @@ -56,90 +56,100 @@ const renderMapAndCarts = ({ map, width, height }, carts, colored = false) => { return r.reduce((s, r) => s + r.join('') + '\n', '') } +const moveCart = ({ map, width }, cart) => { + let { dir, x, y, turn } = cart + switch (dir) { + case '^': + y-- + break + case 'v': + y++ + break + case '<': + x-- + break + case '>': + x++ + break + } + const n = map[y * width + x] + switch (n) { + case '-': + case '|': + break + case '+': + switch (cart.turn) { // left, straight, right + case 0: + dir = turnLeft(dir) + break + case 1: + // keep straight + break + case 2: + dir = turnRight(dir) + break + } + turn = (turn + 1) % 3 + break + case '\\': + switch (dir) { + case '^': + dir = '<' + break + case 'v': + dir = '>' + break + case '>': + dir = 'v' + break + case '<': + dir = '^' + break + } + break + case '/': + switch (dir) { + case '^': + dir = '>' + break + case 'v': + dir = '<' + break + case '>': + dir = '^' + break + case '<': + dir = 'v' + break + } + break + default: + throw Error('Off track!') + } + return { dir, x, y, turn } +} + const tick = ({ map, width }, carts, removeCrashingCarts = false) => { - const movedCarts = carts.map(cart => { - let { dir, x, y, turn } = cart - switch (dir) { - case '^': - y-- - break - case 'v': - y++ - break - case '<': - x-- - break - case '>': - x++ - break - } - const n = map[y * width + x] - switch (n) { - case '-': - case '|': - break - case '+': - switch (cart.turn) { // left, straight, right - case 0: - dir = turnLeft(dir) - break - case 1: - // keep straight - break - case 2: - dir = turnRight(dir) - break + let movedCarts = [] + let prevCart + for (let i = 0; i < carts.length; i++) { + const movedCart = moveCart({ map, width }, carts[i]) + if (prevCart) { + if (prevCart.x === movedCart.x && prevCart.y === movedCart.y) { + if (removeCrashingCarts) { + movedCarts = movedCarts.splice(movedCarts.indexOf(prevCart), 1) + } else { + throw new Crash(`Crash at ${movedCart.x},${movedCart.y}`, movedCart.x, movedCart.y) } - turn = (turn + 1) % 3 - break - case '\\': - switch (dir) { - case '^': - dir = '<' - break - case 'v': - dir = '>' - break - case '>': - dir = 'v' - break - case '<': - dir = '^' - break - } - break - case '/': - switch (dir) { - case '^': - dir = '>' - break - case 'v': - dir = '<' - break - case '>': - dir = '^' - break - case '<': - dir = 'v' - break - } - break - default: - throw Error('Off track!') - } - return { dir, x, y, turn } - }).sort(({ y: y1 }, { y: y2 }) => y1 - y2) - - if (removeCrashingCarts) { - const notCrashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y) === undefined) - if (notCrashed.length === 1) { - throw new LastCartError(`Last cart at ${notCrashed[0].x},${notCrashed[0].y}`, notCrashed[0].x, notCrashed[0].y) + } else { + movedCarts.push(movedCart) + } + } else { + movedCarts.push(movedCart) } - return notCrashed + prevCart = movedCart } - const crashed = movedCarts.filter(cart => movedCarts.find(cartn => cart !== cartn && cart.x === cartn.x && cart.y === cartn.y)) - if (crashed.length) throw new Crash(`Crash at ${crashed[0].x},${crashed[0].y}`, crashed[0].x, crashed[0].y) - return movedCarts + return movedCarts.sort(({ y: y1 }, { y: y2 }) => y1 - y2) } const turnLeft = dir => { diff --git a/day13.part2.js b/day13.part2.js index 9668bf8..d6fd738 100644 --- a/day13.part2.js +++ b/day13.part2.js @@ -19,4 +19,4 @@ do { console.log(`${Math.round((diff[0] * NS_PER_SEC + diff[1]) / benchEvery)}ns / tick`) start = process.hrtime() } -} while (true) \ No newline at end of file +} while (true) diff --git a/day13.spec.js b/day13.spec.js index 6ee9d18..65b314c 100644 --- a/day13.spec.js +++ b/day13.spec.js @@ -199,17 +199,21 @@ describe('Mine Cart Madness', () => { } }) - it('should solve the puzzle', () => { - let { map, carts } = parseLevel(input) - try { - do { - carts = tick(map, carts) - renderMapAndCarts(map, carts) - } while (true) - } catch (err) { - expect(err.message).toEqual('Crash at 100,21') - expect(err.x).toEqual(100) - expect(err.y).toEqual(21) - } + it('should not multi-crash', () => { + let { map, carts } = parseLevel('' + + '/---\\ \n' + + '| v /----\\\n' + + '| /-+<-+-\\ |\n' + + '| | ^ | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/\n') + carts = tick(map, carts, true) + expect(renderMapAndCarts(map, carts)).toEqual('' + + '/---\\ \n' + + '| | /----\\\n' + + '| /->--+-\\ |\n' + + '| | | | | |\n' + + '\\-+-/ \\-+--/\n' + + ' \\------/ \n') }) }) From f940c34187fc2d0dab6a29b52b46f8fce43bc8e8 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 23:01:33 +0100 Subject: [PATCH 46/56] fix(day 13): remove carts in right order --- day13.js | 9 +++++---- day13.spec.js | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/day13.js b/day13.js index b0621ca..a3c51f1 100644 --- a/day13.js +++ b/day13.js @@ -131,13 +131,13 @@ const moveCart = ({ map, width }, cart) => { const tick = ({ map, width }, carts, removeCrashingCarts = false) => { let movedCarts = [] - let prevCart for (let i = 0; i < carts.length; i++) { const movedCart = moveCart({ map, width }, carts[i]) + const prevCart = movedCarts[i - 1] if (prevCart) { if (prevCart.x === movedCart.x && prevCart.y === movedCart.y) { if (removeCrashingCarts) { - movedCarts = movedCarts.splice(movedCarts.indexOf(prevCart), 1) + movedCarts.splice(movedCarts.indexOf(prevCart), 1) } else { throw new Crash(`Crash at ${movedCart.x},${movedCart.y}`, movedCart.x, movedCart.y) } @@ -147,9 +147,10 @@ const tick = ({ map, width }, carts, removeCrashingCarts = false) => { } else { movedCarts.push(movedCart) } - prevCart = movedCart } - return movedCarts.sort(({ y: y1 }, { y: y2 }) => y1 - y2) + return movedCarts + .sort(({ x: x1 }, { x: x2 }) => x1 - x2) + .sort(({ y: y1 }, { y: y2 }) => y1 - y2) } const turnLeft = dir => { diff --git a/day13.spec.js b/day13.spec.js index 65b314c..227a207 100644 --- a/day13.spec.js +++ b/day13.spec.js @@ -172,6 +172,11 @@ describe('Mine Cart Madness', () => { turn: 1 } ]) + }) + + it('should solve the example', () => { + const { map } = parseLevel(states[0]) + const mapTick = tick.bind(undefined, map) let { carts: tickedCarts } = parseLevel(states[0]) for (let i = 0; i < 13; i++) { tickedCarts = mapTick(tickedCarts) @@ -199,6 +204,41 @@ describe('Mine Cart Madness', () => { } }) + it('should turn', () => { + // turn left the first time + let { map, carts } = parseLevel('' + + ' +v \n' + + ' +++++<\n' + + '>+++++ \n' + + ' ^+ \n' + ) + carts = tick(map, carts) + expect(renderMapAndCarts(map, carts)).toEqual('' + + ' +| \n' + + ' +>++v-\n' + + '-^++<+ \n' + + ' |+ \n' + ) + // go straight the second time + + carts = tick(map, carts) + expect(renderMapAndCarts(map, carts)).toEqual('' + + ' +| \n' + + ' ^+>++-\n' + + '-++<+v \n' + + ' |+ \n' + ) + // turn right the third time + + carts = tick(map, carts) + expect(renderMapAndCarts(map, carts)).toEqual('' + + ' >| \n' + + ' +++v+-\n' + + '-+^+++ \n' + + ' |< \n' + ) + }) + it('should not multi-crash', () => { let { map, carts } = parseLevel('' + '/---\\ \n' + @@ -211,7 +251,7 @@ describe('Mine Cart Madness', () => { expect(renderMapAndCarts(map, carts)).toEqual('' + '/---\\ \n' + '| | /----\\\n' + - '| /->--+-\\ |\n' + + '| /-<--+-\\ |\n' + '| | | | | |\n' + '\\-+-/ \\-+--/\n' + ' \\------/ \n') From 6fcdd910a7140f6435ffb7946196e6c9d2b41ea0 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 23:02:30 +0100 Subject: [PATCH 47/56] style: use standard --- day10.js | 12 ++++++------ day10.run.js | 8 ++++---- day10.spec.js | 16 ++++++++-------- day11.js | 6 +++--- day11.run.js | 4 ++-- day11.spec.js | 14 +++++++------- day12.js | 6 +++--- day12.part2.js | 8 ++++---- day12.spec.js | 4 ++-- day6-as-png.js | 6 +++--- day6.spec.js | 1 - day7.spec.js | 18 +++++++++--------- day8.spec.js | 5 ++--- day9.js | 2 +- 14 files changed, 54 insertions(+), 56 deletions(-) diff --git a/day10.js b/day10.js index 7e9b515..7757da5 100644 --- a/day10.js +++ b/day10.js @@ -10,7 +10,7 @@ const parsePoints = points => points.map( } ) -const movePoints = points => points.map(({x, y, vx, vy}) => ({ +const movePoints = points => points.map(({ x, y, vx, vy }) => ({ x: x + vx, y: y + vy, vx, @@ -19,19 +19,19 @@ const movePoints = points => points.map(({x, y, vx, vy}) => ({ const drawMap = (points, scale = 1) => { const [minX, minY, maxX, maxY] = [ - points.reduce((min, {x}) => { + points.reduce((min, { x }) => { if (x < min) return x return min }, Number.MAX_SAFE_INTEGER), - points.reduce((min, {y}) => { + points.reduce((min, { y }) => { if (y < min) return y return min }, Number.MAX_SAFE_INTEGER), - points.reduce((max, {x}) => { + points.reduce((max, { x }) => { if (x > max) return x return max }, 0), - points.reduce((max, {y}) => { + points.reduce((max, { y }) => { if (y > max) return y return max }, 0) @@ -44,7 +44,7 @@ const drawMap = (points, scale = 1) => { for (let y = 0; y < height; y++) { map[y] = '.'.repeat(width) } - points.forEach(({x, y}) => { + points.forEach(({ x, y }) => { const mapY = Math.floor((y + offsetY) * scale) const mapX = Math.floor((x + offsetX) * scale) map[mapY] = map[mapY].substr(0, mapX) + '#' + map[mapY].substr(mapX + 1) diff --git a/day10.run.js b/day10.run.js index a69a61c..06d6dc5 100644 --- a/day10.run.js +++ b/day10.run.js @@ -1,14 +1,14 @@ 'use strict' -const {parsePoints, movePoints, drawMap} = require('./day10') -const {readFileSync} = require('fs') +const { parsePoints, movePoints, drawMap } = require('./day10') +const { readFileSync } = require('fs') const input = readFileSync('./day10.txt', 'utf-8') let points = parsePoints(input.split('\n')) -for(let i = 0; i <= 10458; i++) { +for (let i = 0; i <= 10458; i++) { points = movePoints(points) } const map = drawMap(points) -console.log(map.join('\n') + '\n') \ No newline at end of file +console.log(map.join('\n') + '\n') diff --git a/day10.spec.js b/day10.spec.js index 74cc5e9..3ab8792 100644 --- a/day10.spec.js +++ b/day10.spec.js @@ -2,8 +2,8 @@ /* global describe, it, expect, safeRegion */ -const {parsePoints, movePoints, drawMap} = require('./day10') -const {readFileSync} = require('fs') +const { parsePoints, movePoints, drawMap } = require('./day10') +const { readFileSync } = require('fs') const input = readFileSync('./day10.txt', 'utf-8') const solution = readFileSync('./day10.solution.txt', 'utf-8') @@ -12,30 +12,30 @@ describe('stars alignment', () => { expect(parsePoints([ 'position=< 3, 9> velocity=< 1, -2>' ])).toEqual([ - {x: 3, y: 9, vx: 1, vy: -2} + { x: 3, y: 9, vx: 1, vy: -2 } ]) }) it('should move the points', () => { expect(movePoints(movePoints(movePoints(parsePoints([ 'position=< 3, 9> velocity=< 1, -2>' ]))))).toEqual([ - {x: 6, y: 3, vx: 1, vy: -2} + { x: 6, y: 3, vx: 1, vy: -2 } ]) }) it('should draw the map', () => { expect(drawMap([ - {x: 0, y: 0} + { x: 0, y: 0 } ]).join('\n')).toEqual( '#' ) expect(drawMap([ - {x: 1, y: 1} + { x: 1, y: 1 } ]).join('\n')).toEqual( '#' ) expect(drawMap([ - {x: 3, y: 2, vx: 1, vy: -2}, - {x: 6, y: 3, vx: 1, vy: -2} + { x: 3, y: 2, vx: 1, vy: -2 }, + { x: 6, y: 3, vx: 1, vy: -2 } ]).join('\n')).toEqual( '#...\n' + '...#' diff --git a/day11.js b/day11.js index 855e41c..becefb4 100644 --- a/day11.js +++ b/day11.js @@ -33,7 +33,7 @@ const calculateGridPower = (x, y, serial, gridSize) => { const fullestCellWithGrid = (serial, gridSize = 3) => { const left = Math.floor(gridSize / 2) - const maxPower = {power: 0, x: left, y: 300 - left} + const maxPower = { power: 0, x: left, y: 300 - left } for (let x = left + 1; x <= 300 - left; x++) { for (let y = left + 1; y <= 300 - left; y++) { const power = calculateGridPower(x, y, serial, gridSize) @@ -60,11 +60,11 @@ const fullestCell = serial => { cell = fullestCellWithGrid(serial, ++s) cells.push(cell) } while (cell.power > 0 && s <= 300) - return cells.sort(({power: p1}, {power: p2}) => p2 - p1)[0] + return cells.sort(({ power: p1 }, { power: p2 }) => p2 - p1)[0] } module.exports = { fullestCell, fullestCellWithGrid, fuelAt -} \ No newline at end of file +} diff --git a/day11.run.js b/day11.run.js index 3af7e04..11d67d3 100644 --- a/day11.run.js +++ b/day11.run.js @@ -1,7 +1,7 @@ 'use strict' -const {fullestCell} = require('./day11'); +const { fullestCell } = require('./day11') console.log(fullestCell(9306)) // console.log(fullestCellWithGrid(18, 16)) -// console.log(fullestCellWithGrid(18, 15)) \ No newline at end of file +// console.log(fullestCellWithGrid(18, 15)) diff --git a/day11.spec.js b/day11.spec.js index c6b73e6..979854a 100644 --- a/day11.spec.js +++ b/day11.spec.js @@ -2,7 +2,7 @@ /* global describe, it, expect */ -const {fuelAt, fullestCellWithGrid, fullestCell} = require('./day11') +const { fuelAt, fullestCellWithGrid, fullestCell } = require('./day11') describe('chronal charge', () => { it('should calculate the example', () => { @@ -12,17 +12,17 @@ describe('chronal charge', () => { expect(fuelAt(101, 153, 71)).toEqual(4) }) it('should find the example fuel cell', () => { - expect(fullestCellWithGrid(18)).toMatchObject({x: 33, y: 45, power: 29}) - expect(fullestCellWithGrid(42)).toMatchObject({x: 21, y: 61, power: 30}) + expect(fullestCellWithGrid(18)).toMatchObject({ x: 33, y: 45, power: 29 }) + expect(fullestCellWithGrid(42)).toMatchObject({ x: 21, y: 61, power: 30 }) }) it('should solve the puzzle', () => { - expect(fullestCellWithGrid(9306)).toMatchObject({power: 30, x: 235, y: 38}) + expect(fullestCellWithGrid(9306)).toMatchObject({ power: 30, x: 235, y: 38 }) }) }) describe('chronal charge part 2', () => { it('should find the example fuel cell', () => { - expect(fullestCell(18)).toEqual({x: 90, y: 269, power: 113, size: 16}) - expect(fullestCell(18)).toEqual({x: 232, y: 251, power: 119, size: 12}) + expect(fullestCell(18)).toEqual({ x: 90, y: 269, power: 113, size: 16 }) + expect(fullestCell(18)).toEqual({ x: 232, y: 251, power: 119, size: 12 }) }) -}) \ No newline at end of file +}) diff --git a/day12.js b/day12.js index 5eb85d5..de043b9 100644 --- a/day12.js +++ b/day12.js @@ -2,7 +2,7 @@ const subsus = (pot0, initialState, notes) => { const startState = `.....${initialState}.....` - const pots = notes.reduce((newState, {pattern, result}) => { + const pots = notes.reduce((newState, { pattern, result }) => { let idx = -1 do { idx = startState.indexOf(pattern, idx + 1) @@ -21,9 +21,9 @@ const subsus = (pot0, initialState, notes) => { } } -const sumGen = ({pot0, pots}) => pots.split('').reduce((sum, pot, index) => sum + (pot === '#' ? index + pot0 : 0), 0) +const sumGen = ({ pot0, pots }) => pots.split('').reduce((sum, pot, index) => sum + (pot === '#' ? index + pot0 : 0), 0) module.exports = { subsus, sumGen -} \ No newline at end of file +} diff --git a/day12.part2.js b/day12.part2.js index 295c77e..d11c31c 100644 --- a/day12.part2.js +++ b/day12.part2.js @@ -1,6 +1,6 @@ 'use strict' -const {subsus, sumGen} = require('./day12') +const { subsus, sumGen } = require('./day12') const initialState = '##.#.#.##..#....######..#..#...#.#..#.#.#..###.#.#.#..#..###.##.#..#.##.##.#.####..##...##..#..##.#.' const notes = [ @@ -37,18 +37,18 @@ const notes = [ '#.##. => #', '..### => .' ].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) -let res = {pot0: 0, pots: initialState} +let res = { pot0: 0, pots: initialState } let lastResults = [res] for (let i = 1; i <= 10000; i++) { res = subsus(res.pot0, res.pots, notes) lastResults.push(res) console.log(res.pots) if (lastResults.length > 10) lastResults.shift() - if (lastResults.reduce((same, {pots}, k) => k > 0 ? (same ? lastResults[k - 1].pots === pots : false) : true) === true) { + if (lastResults.reduce((same, { pots }, k) => k > 0 ? (same ? lastResults[k - 1].pots === pots : false) : true) === true) { console.log(sumGen({ pots: lastResults[0].pots, pot0: 50000000000 - i + res.pot0 })) break } -} \ No newline at end of file +} diff --git a/day12.spec.js b/day12.spec.js index c5c6c45..ed50599 100644 --- a/day12.spec.js +++ b/day12.spec.js @@ -2,7 +2,7 @@ /* global describe, it, expect */ -const {subsus, sumGen} = require('./day12') +const { subsus, sumGen } = require('./day12') describe('Subterranean Sustainability', () => { it('should solve the example', () => { @@ -75,7 +75,7 @@ describe('Subterranean Sustainability', () => { '#.##. => #', '..### => .' ].map(n => n.match(/(?[.#]{5}) => (?[.#])/).groups) - let res = {pot0: 0, pots: initialState} + let res = { pot0: 0, pots: initialState } for (let i = 0; i < 20; i++) { res = subsus(res.pot0, res.pots, notes) } diff --git a/day6-as-png.js b/day6-as-png.js index 2c63529..dbba7fa 100644 --- a/day6-as-png.js +++ b/day6-as-png.js @@ -1,4 +1,4 @@ -const {makeAreas, countAreas} = require('./day6') +const { makeAreas, countAreas } = require('./day6') const fs = require('fs') const PNG = require('pngjs').PNG @@ -8,7 +8,7 @@ const input = require('./day6.json'); const areas = makeAreas(input) const notInfiniteAreas = countAreas(input) - const newfile = new PNG({width: areas[0].length, height: areas.length}) + const newfile = new PNG({ width: areas[0].length, height: areas.length }) const colors = {} for (let y = 0; y < newfile.height; y++) { @@ -22,7 +22,7 @@ const input = require('./day6.json'); Math.floor(Math.random() * 255), Math.floor(Math.random() * 255) ] : [ - 255,255,255 + 255, 255, 255 ] } diff --git a/day6.spec.js b/day6.spec.js index d2fd56a..70d050e 100644 --- a/day6.spec.js +++ b/day6.spec.js @@ -12,7 +12,6 @@ const { const input = require('./day6.json') - describe('Manhattan Distance', () => { it('should calculate the manhatten distance', () => { expect(distance([0, 0], [0, 0])).toEqual(0) diff --git a/day7.spec.js b/day7.spec.js index 3747c27..8988d41 100644 --- a/day7.spec.js +++ b/day7.spec.js @@ -1,6 +1,6 @@ 'use strict' -const {readFileSync} = require('fs') +const { readFileSync } = require('fs') /* global describe, it, expect, safeRegion */ @@ -11,13 +11,13 @@ const parseStep = s => { const makeList = steps => steps.reduce((list, step) => { const [a, b] = parseStep(step) - const nodeA = list.find(({step}) => step === a) - const nodeB = list.find(({step}) => step === b) + const nodeA = list.find(({ step }) => step === a) + const nodeB = list.find(({ step }) => step === b) if (!nodeA) { - list.push({step: a, depends: []}) + list.push({ step: a, depends: [] }) } if (!nodeB) { - list.push({step: b, depends: [a]}) + list.push({ step: b, depends: [a] }) } else { nodeB.depends.push(a) } @@ -30,14 +30,14 @@ const runList = (list, steps = '') => { } let nextSteps if (!steps.length) { - nextSteps = list.filter(({depends}) => depends.length === 0) + nextSteps = list.filter(({ depends }) => depends.length === 0) } else { - nextSteps = list.filter(({depends}) => depends.reduce((inSteps, dependsOn) => { + nextSteps = list.filter(({ depends }) => depends.reduce((inSteps, dependsOn) => { if (inSteps === false) return inSteps return steps.includes(dependsOn) }, true)) } - nextSteps.sort(({step: s1}, {step: s2}) => s1 > s2 ? 1 : -1) + nextSteps.sort(({ step: s1 }, { step: s2 }) => s1 > s2 ? 1 : -1) const step = nextSteps[0] list.splice(list.indexOf(step), 1) return runList(list, `${steps}${step.step}`) @@ -93,4 +93,4 @@ describe('build time!', () => { ]), 2, 0)).toEqual(15) }) }) -*/ \ No newline at end of file +*/ diff --git a/day8.spec.js b/day8.spec.js index 03d7966..0bf337c 100644 --- a/day8.spec.js +++ b/day8.spec.js @@ -1,10 +1,10 @@ 'use strict' -const {readFileSync} = require('fs') +const { readFileSync } = require('fs') /* global describe, it, expect, safeRegion */ -const input = readFileSync('./day8.txt', 'utf-8'); +const input = readFileSync('./day8.txt', 'utf-8') const parseTree = (sequence, parent, tree = []) => { const node = { @@ -78,7 +78,6 @@ describe('tree parser', () => { const tree = parseTree('2 3 0 3 10 11 12 1 1 0 1 99 2 1 1 2'.split(' ').map(n => +n)) expect(tree).toHaveLength(4) }) - }) describe('metadataSum', () => { it('should sum the example sequence', () => { diff --git a/day9.js b/day9.js index e47b751..b6f3860 100644 --- a/day9.js +++ b/day9.js @@ -9,7 +9,7 @@ class Circle { placeMarble () { if (this.currentMarble === undefined) { - const marble = {n: 0} + const marble = { n: 0 } marble.next = marble marble.prev = marble this.currentMarble = marble From 1051fd517b967d792e2b066752eed9f789b27f55 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Wed, 19 Dec 2018 23:51:23 +0100 Subject: [PATCH 48/56] day 14 part 1 --- day14.spec.js | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 day14.spec.js diff --git a/day14.spec.js b/day14.spec.js new file mode 100644 index 0000000..229201a --- /dev/null +++ b/day14.spec.js @@ -0,0 +1,52 @@ +'use strict' + +/* global describe, it, expect */ + +const makeRecipes = (scoreBoard, elves = [0, 1]) => { + const e1Score = +scoreBoard[elves[0]] + const e2Score = +scoreBoard[elves[1]] + const c = e1Score + e2Score + const newScoreboard = `${scoreBoard}${c}` + return [ + newScoreboard, + [ + (elves[0] + 1 + e1Score) % (newScoreboard.length), + (elves[1] + 1 + e2Score) % (newScoreboard.length) + ] + ] +} + +describe('Chocolate Charts', () => { + it('should solve the example', () => { + const [scoreBoard, elves1] = makeRecipes('37') + expect(scoreBoard).toEqual('3710') + + const [scoreBoard2, elves2] = makeRecipes(scoreBoard, elves1) + expect(scoreBoard2).toEqual('371010') + + const [scoreBoard3, elves3] = makeRecipes(scoreBoard2, elves2) + expect(scoreBoard3).toEqual('3710101') + + const [scoreBoard4] = makeRecipes(scoreBoard3, elves3) + expect(scoreBoard4).toEqual('37101012') + + let [s9, e9] = makeRecipes('37') + do { + const r = makeRecipes(s9, e9) + s9 = r[0] + e9 = r[1] + } while (s9.length < 2028) + expect(s9.substr(9, 10)).toEqual('5158916779') + expect(s9.substr(5, 10)).toEqual('0124515891') + expect(s9.substr(2018, 10)).toEqual('5941429882') + }) + it('should solve the puzzle', () => { + let [s, e] = makeRecipes('37') + do { + const r = makeRecipes(s, e) + s = r[0] + e = r[1] + } while (s.length < 323081 + 10) + expect(s.substr(323081, 10)).toEqual('7162937112') + }) +}) From 512f57be1205692020f06839f7e3b4c2004467a2 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Thu, 20 Dec 2018 00:42:43 +0100 Subject: [PATCH 49/56] day 14: part 2 (not solved) --- day14.part2.js | 31 +++++++++++++++++++++++++++++++ day14.spec.js | 39 ++++++++++++++++++++++----------------- 2 files changed, 53 insertions(+), 17 deletions(-) create mode 100644 day14.part2.js diff --git a/day14.part2.js b/day14.part2.js new file mode 100644 index 0000000..c9daa28 --- /dev/null +++ b/day14.part2.js @@ -0,0 +1,31 @@ +'use strict' + +const makeRecipes = (scoreBoard, elves = [0, 1]) => { + const e1Score = scoreBoard[elves[0]] + const e2Score = scoreBoard[elves[1]] + const c = e1Score + e2Score + if (c >= 10) { + scoreBoard.push(Math.floor(c / 10)) + scoreBoard.push(c % 10) + } else { + scoreBoard.push(c) + } + return [ + scoreBoard, + [ + (elves[0] + 1 + e1Score) % (scoreBoard.length), + (elves[1] + 1 + e2Score) % (scoreBoard.length) + ] + ] +} + +let [s, e] = makeRecipes([3, 7]) +let idx +do { + idx = s.join('').indexOf('323081') + const r = makeRecipes(s, e) + s = r[0] + e = r[1] +} while (idx === -1) + +console.log(idx) diff --git a/day14.spec.js b/day14.spec.js index 229201a..808832c 100644 --- a/day14.spec.js +++ b/day14.spec.js @@ -3,50 +3,55 @@ /* global describe, it, expect */ const makeRecipes = (scoreBoard, elves = [0, 1]) => { - const e1Score = +scoreBoard[elves[0]] - const e2Score = +scoreBoard[elves[1]] + const e1Score = scoreBoard[elves[0]] + const e2Score = scoreBoard[elves[1]] const c = e1Score + e2Score - const newScoreboard = `${scoreBoard}${c}` + if (c >= 10) { + scoreBoard.push(Math.floor(c / 10)) + scoreBoard.push(c % 10) + } else { + scoreBoard.push(c) + } return [ - newScoreboard, + scoreBoard, [ - (elves[0] + 1 + e1Score) % (newScoreboard.length), - (elves[1] + 1 + e2Score) % (newScoreboard.length) + (elves[0] + 1 + e1Score) % (scoreBoard.length), + (elves[1] + 1 + e2Score) % (scoreBoard.length) ] ] } describe('Chocolate Charts', () => { it('should solve the example', () => { - const [scoreBoard, elves1] = makeRecipes('37') - expect(scoreBoard).toEqual('3710') + const [scoreBoard, elves1] = makeRecipes([3, 7]) + expect(scoreBoard.join('')).toEqual('3710') const [scoreBoard2, elves2] = makeRecipes(scoreBoard, elves1) - expect(scoreBoard2).toEqual('371010') + expect(scoreBoard2.join('')).toEqual('371010') const [scoreBoard3, elves3] = makeRecipes(scoreBoard2, elves2) - expect(scoreBoard3).toEqual('3710101') + expect(scoreBoard3.join('')).toEqual('3710101') const [scoreBoard4] = makeRecipes(scoreBoard3, elves3) - expect(scoreBoard4).toEqual('37101012') + expect(scoreBoard4.join('')).toEqual('37101012') - let [s9, e9] = makeRecipes('37') + let [s9, e9] = makeRecipes([3, 7]) do { const r = makeRecipes(s9, e9) s9 = r[0] e9 = r[1] } while (s9.length < 2028) - expect(s9.substr(9, 10)).toEqual('5158916779') - expect(s9.substr(5, 10)).toEqual('0124515891') - expect(s9.substr(2018, 10)).toEqual('5941429882') + expect(s9.join('').substr(9, 10)).toEqual('5158916779') + expect(s9.join('').substr(5, 10)).toEqual('0124515891') + expect(s9.join('').substr(2018, 10)).toEqual('5941429882') }) it('should solve the puzzle', () => { - let [s, e] = makeRecipes('37') + let [s, e] = makeRecipes([3, 7]) do { const r = makeRecipes(s, e) s = r[0] e = r[1] } while (s.length < 323081 + 10) - expect(s.substr(323081, 10)).toEqual('7162937112') + expect(s.join('').substr(323081, 10)).toEqual('7162937112') }) }) From 75e144aba777c68fb70ce434b484f6b71166b739 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 21 Dec 2018 01:07:38 +0100 Subject: [PATCH 50/56] day 16, part 1 --- day16.spec.js | 246 +++ day16.txt | 4196 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 4442 insertions(+) create mode 100644 day16.spec.js create mode 100644 day16.txt diff --git a/day16.spec.js b/day16.spec.js new file mode 100644 index 0000000..375b489 --- /dev/null +++ b/day16.spec.js @@ -0,0 +1,246 @@ +'use strict' + +/* global describe, it, test, expect */ + +const { readFileSync } = require('fs') +const input = readFileSync('./day16.txt', 'utf-8') + +const addr = (A, B, C, reg) => { + reg[C] = reg[A] + reg[B] + return reg +} +const addi = (A, B, C, reg) => { + reg[C] = reg[A] + B + return reg +} +const mulr = (A, B, C, reg) => { + reg[C] = reg[A] * reg[B] + return reg +} +const muli = (A, B, C, reg) => { + reg[C] = reg[A] * B + return reg +} +const banr = (A, B, C, reg) => { + reg[C] = reg[A] & reg[B] + return reg +} +const bani = (A, B, C, reg) => { + reg[C] = reg[A] & B + return reg +} +const borr = (A, B, C, reg) => { + reg[C] = reg[A] | reg[B] + return reg +} +const bori = (A, B, C, reg) => { + reg[C] = reg[A] | B + return reg +} +const setr = (A, B, C, reg) => { + reg[C] = reg[A] + return reg +} +const seti = (A, B, C, reg) => { + reg[C] = A + return reg +} +const gtir = (A, B, C, reg) => { + reg[C] = A > reg[B] ? 1 : 0 + return reg +} +const gtri = (A, B, C, reg) => { + reg[C] = reg[A] > B ? 1 : 0 + return reg +} +const gtrr = (A, B, C, reg) => { + reg[C] = reg[A] > reg[B] ? 1 : 0 + return reg +} +const eqir = (A, B, C, reg) => { + reg[C] = A === reg[B] ? 1 : 0 + return reg +} +const eqri = (A, B, C, reg) => { + reg[C] = reg[A] === B ? 1 : 0 + return reg +} +const eqrr = (A, B, C, reg) => { + reg[C] = reg[A] === reg[B] ? 1 : 0 + return reg +} + +describe('opcodes', () => { + describe('Addition', () => { + describe('addr (add register)', () => { + it('stores into register C the result of adding register A and register B.', () => { + expect(addr(0, 1, 2, [7, 11])).toEqual([7, 11, 18]) + }) + }) + + describe('addi (add immediate)', () => { + it('stores into register C the result of adding register A and value B.', () => { + expect(addi(0, 4, 0, [3])).toEqual([7]) + expect(addi(2, 1, 2, [3, 2, 1, 1])).toEqual([3, 2, 2, 1]) + }) + }) + }) + describe('Multiplication', () => { + describe('mulr (multiply register)', () => { + it('stores into register C the result of multiplying register A and register B.', () => { + expect(mulr(0, 1, 2, [7, 11])).toEqual([7, 11, 77]) + expect(mulr(2, 1, 2, [3, 2, 1, 1])).toEqual([3, 2, 2, 1]) + }) + }) + describe('muli (multiply immediate)', () => { + it('stores into register C the result of multiplying register A and value B.', () => { + expect(muli(0, 7, 1, [11])).toEqual([11, 77]) + }) + }) + }) + describe('Bitwise AND', () => { + describe('banr (bitwise AND register)', () => { + it('stores into register C the result of the bitwise AND of register A and register B.', () => { + expect(banr(0, 1, 2, [7, 11])).toEqual([7, 11, 7 & 11]) + }) + }) + describe('bani (bitwise AND immediate)', () => { + it('stores into register C the result of the bitwise AND of register A and value B.', () => { + expect(bani(0, 7, 1, [11])).toEqual([11, 7 & 11]) + }) + }) + }) + describe('Bitwise OR', () => { + describe('borr (bitwise OR register)', () => { + it('stores into register C the result of the bitwise OR of register A and register B.', () => { + expect(borr(0, 1, 2, [7, 11])).toEqual([7, 11, 7 | 11]) + }) + }) + describe('bori (bitwise OR immediate)', () => { + it('stores into register C the result of the bitwise OR of register A and value B.', () => { + expect(bori(0, 7, 1, [11])).toEqual([11, 7 | 11]) + }) + }) + }) + describe('Assignment', () => { + describe('setr (set register)', () => { + it('copies the contents of register A into register C. (Input B is ignored.)', () => { + expect(setr(0, 9, 1, [7])).toEqual([7, 7]) + }) + }) + describe('seti (set immediate)', () => { + it('stores value A into register C. (Input B is ignored.)', () => { + expect(seti(7, 9, 0, [])).toEqual([7]) + expect(seti(2, 1, 2, [3, 2, 1, 1])).toEqual([3, 2, 2, 1]) + }) + }) + }) + describe('Greater-than testing', () => { + describe('gtir (greater-than immediate/register)', () => { + it('sets register C to 1 if value A is greater than register B. Otherwise, register C is set to 0.', () => { + expect(gtir(8, 0, 1, [7])).toEqual([7, 1]) + expect(gtir(7, 0, 1, [7])).toEqual([7, 0]) + }) + }) + describe('gtri (greater-than register/immediate)', () => { + it('sets register C to 1 if register A is greater than value B. Otherwise, register C is set to 0.', () => { + expect(gtri(0, 7, 1, [8])).toEqual([8, 1]) + expect(gtri(0, 7, 1, [7])).toEqual([7, 0]) + }) + }) + describe('gtrr (greater-than register/register)', () => { + it('sets register C to 1 if register A is greater than register B. Otherwise, register C is set to 0.', () => { + expect(gtrr(0, 1, 2, [8, 7])).toEqual([8, 7, 1]) + expect(gtrr(0, 1, 2, [7, 7])).toEqual([7, 7, 0]) + }) + }) + }) + describe('Equality testing', () => { + describe('eqir (equal immediate/register)', () => { + it('sets register C to 1 if value A is equal to register B. Otherwise, register C is set to 0.', () => { + expect(eqir(7, 0, 1, [7])).toEqual([7, 1]) + expect(eqir(8, 0, 1, [7])).toEqual([7, 0]) + }) + }) + describe('eqri (equal register/immediate)', () => { + it('sets register C to 1 if register A is equal to value B. Otherwise, register C is set to 0.', () => { + expect(eqri(0, 7, 1, [7])).toEqual([7, 1]) + expect(eqri(0, 7, 1, [8])).toEqual([8, 0]) + }) + }) + describe('eqrr (equal register/register)', () => { + it('sets register C to 1 if register A is equal to register B. Otherwise, register C is set to 0.', () => { + expect(eqrr(0, 1, 2, [7, 7])).toEqual([7, 7, 1]) + expect(eqrr(0, 1, 2, [8, 7])).toEqual([8, 7, 0]) + }) + }) + }) +}) + +const opcodes = { + 'addr': addr, + 'addi': addi, + 'mulr': mulr, + 'muli': muli, + 'banr': banr, + 'bani': bani, + 'borr': borr, + 'bori': bori, + 'setr': setr, + 'seti': seti, + 'gtir': gtir, + 'gtri': gtri, + 'gtrr': gtrr, + 'eqir': eqir, + 'eqri': eqri, + 'eqrr': eqrr +} + +const equals = (a, b) => a.length === b.length && a.reduce((equal, v, k) => equal ? v === b[k] : equal, true) + +const findMatchingOpcodes = (before, [A, B, C], after) => Object.keys(opcodes).filter(opcode => equals(opcodes[opcode](A, B, C, [...before]), after)).sort((a, b) => a > b ? 1 : -1) + +describe('equals', () => { + it('should compare registers', () => { + expect(equals([], [])).toEqual(true) + expect(equals([1, 2, 3], [1, 2, 3])).toEqual(true) + expect(equals([1, 2, 3], [1, 2, 2])).toEqual(false) + expect(equals([1, 2, 3], [1, 2, 3, 4])).toEqual(false) + }) +}) + +describe('findMatchingOpcodes', () => { + it('should match mulr, addi, seti for example', () => { + expect(findMatchingOpcodes( + [3, 2, 1, 1], + [2, 1, 2], + [3, 2, 2, 1] + )).toEqual([ + 'addi', + 'mulr', + 'seti' + ]) + }) +}) + +describe('Chronal Classification', () => { + it('should solve the puzzle', () => { + expect(input + .split('\n\n') + .filter(s => /^Before:/.test(s)) + ).toHaveLength(807) + expect(input + .split('\n\n') + .filter(s => /^Before:/.test(s)) + .filter(s => { + const [before, opWithInput, after] = s.split('\n') + const op = JSON.parse(`[${opWithInput.replace(/ /g, ',')}]`) + const [opNumber, ...values] = op + return findMatchingOpcodes( + JSON.parse(before.replace(/Before: /, '')), + values, + JSON.parse(after.replace(/After: /, '')) + ).length >= 3 + })).toHaveLength(563) + }) +}) diff --git a/day16.txt b/day16.txt new file mode 100644 index 0000000..70b4bab --- /dev/null +++ b/day16.txt @@ -0,0 +1,4196 @@ +Before: [0, 0, 2, 2] +9 2 3 0 +After: [4, 0, 2, 2] + +Before: [2, 1, 2, 3] +0 1 2 3 +After: [2, 1, 2, 2] + +Before: [3, 1, 3, 1] +9 0 2 2 +After: [3, 1, 6, 1] + +Before: [2, 0, 0, 3] +15 0 3 3 +After: [2, 0, 0, 0] + +Before: [0, 3, 3, 2] +3 1 3 1 +After: [0, 1, 3, 2] + +Before: [2, 3, 3, 2] +8 2 2 3 +After: [2, 3, 3, 9] + +Before: [3, 2, 3, 2] +2 1 0 3 +After: [3, 2, 3, 1] + +Before: [3, 3, 2, 0] +4 1 2 3 +After: [3, 3, 2, 1] + +Before: [1, 2, 3, 2] +9 1 1 3 +After: [1, 2, 3, 4] + +Before: [0, 2, 3, 3] +11 0 0 3 +After: [0, 2, 3, 0] + +Before: [1, 1, 3, 3] +14 1 0 0 +After: [1, 1, 3, 3] + +Before: [0, 0, 0, 0] +13 0 1 3 +After: [0, 0, 0, 1] + +Before: [2, 3, 1, 2] +3 1 3 1 +After: [2, 1, 1, 2] + +Before: [1, 0, 3, 0] +5 1 0 1 +After: [1, 1, 3, 0] + +Before: [2, 3, 3, 0] +8 2 0 3 +After: [2, 3, 3, 6] + +Before: [3, 2, 2, 1] +12 3 2 0 +After: [3, 2, 2, 1] + +Before: [0, 1, 0, 0] +7 1 0 2 +After: [0, 1, 1, 0] + +Before: [0, 0, 1, 2] +13 0 1 3 +After: [0, 0, 1, 1] + +Before: [0, 3, 0, 3] +11 0 0 0 +After: [0, 3, 0, 3] + +Before: [2, 3, 2, 2] +4 1 2 2 +After: [2, 3, 1, 2] + +Before: [0, 0, 2, 0] +11 0 0 0 +After: [0, 0, 2, 0] + +Before: [0, 0, 1, 3] +10 2 3 3 +After: [0, 0, 1, 3] + +Before: [1, 0, 2, 1] +5 1 0 0 +After: [1, 0, 2, 1] + +Before: [1, 0, 3, 3] +5 1 0 2 +After: [1, 0, 1, 3] + +Before: [1, 1, 3, 0] +14 1 0 1 +After: [1, 1, 3, 0] + +Before: [1, 3, 2, 2] +4 1 2 3 +After: [1, 3, 2, 1] + +Before: [1, 2, 1, 3] +15 0 3 1 +After: [1, 0, 1, 3] + +Before: [3, 3, 1, 2] +3 1 3 1 +After: [3, 1, 1, 2] + +Before: [3, 1, 2, 3] +10 1 3 0 +After: [3, 1, 2, 3] + +Before: [0, 0, 1, 0] +13 0 1 1 +After: [0, 1, 1, 0] + +Before: [0, 0, 3, 3] +13 0 1 0 +After: [1, 0, 3, 3] + +Before: [3, 3, 3, 0] +8 2 1 3 +After: [3, 3, 3, 9] + +Before: [2, 3, 0, 2] +3 1 3 0 +After: [1, 3, 0, 2] + +Before: [1, 0, 3, 1] +6 0 2 3 +After: [1, 0, 3, 3] + +Before: [2, 3, 0, 2] +4 1 0 0 +After: [1, 3, 0, 2] + +Before: [2, 1, 0, 2] +12 3 1 0 +After: [3, 1, 0, 2] + +Before: [3, 3, 2, 2] +4 1 2 2 +After: [3, 3, 1, 2] + +Before: [1, 0, 2, 1] +5 1 0 1 +After: [1, 1, 2, 1] + +Before: [2, 3, 2, 0] +6 0 2 1 +After: [2, 4, 2, 0] + +Before: [0, 2, 3, 0] +1 0 1 0 +After: [2, 2, 3, 0] + +Before: [0, 3, 2, 1] +4 1 2 0 +After: [1, 3, 2, 1] + +Before: [0, 2, 2, 1] +12 3 2 3 +After: [0, 2, 2, 3] + +Before: [0, 2, 2, 1] +11 0 0 1 +After: [0, 0, 2, 1] + +Before: [0, 0, 2, 2] +13 0 1 3 +After: [0, 0, 2, 1] + +Before: [1, 0, 0, 0] +5 1 0 1 +After: [1, 1, 0, 0] + +Before: [1, 2, 3, 3] +0 2 3 2 +After: [1, 2, 9, 3] + +Before: [0, 1, 1, 0] +7 1 0 1 +After: [0, 1, 1, 0] + +Before: [1, 0, 0, 1] +5 1 0 0 +After: [1, 0, 0, 1] + +Before: [3, 2, 2, 0] +2 1 0 1 +After: [3, 1, 2, 0] + +Before: [3, 2, 2, 3] +2 1 0 1 +After: [3, 1, 2, 3] + +Before: [3, 0, 2, 1] +0 0 2 0 +After: [6, 0, 2, 1] + +Before: [0, 1, 1, 3] +7 1 0 2 +After: [0, 1, 1, 3] + +Before: [2, 3, 0, 2] +4 1 0 3 +After: [2, 3, 0, 1] + +Before: [2, 0, 1, 1] +1 1 0 2 +After: [2, 0, 2, 1] + +Before: [1, 0, 3, 3] +15 0 3 0 +After: [0, 0, 3, 3] + +Before: [0, 1, 0, 3] +11 0 0 0 +After: [0, 1, 0, 3] + +Before: [2, 2, 3, 0] +9 2 2 1 +After: [2, 6, 3, 0] + +Before: [1, 3, 3, 2] +1 0 1 2 +After: [1, 3, 3, 2] + +Before: [3, 1, 2, 2] +6 2 1 0 +After: [3, 1, 2, 2] + +Before: [3, 2, 1, 1] +2 1 0 0 +After: [1, 2, 1, 1] + +Before: [2, 3, 3, 2] +3 1 3 2 +After: [2, 3, 1, 2] + +Before: [0, 1, 2, 2] +7 1 0 0 +After: [1, 1, 2, 2] + +Before: [3, 2, 3, 1] +2 1 0 2 +After: [3, 2, 1, 1] + +Before: [3, 2, 0, 3] +0 3 3 3 +After: [3, 2, 0, 9] + +Before: [1, 0, 2, 0] +5 1 0 3 +After: [1, 0, 2, 1] + +Before: [2, 3, 1, 2] +3 1 3 3 +After: [2, 3, 1, 1] + +Before: [2, 3, 0, 2] +8 1 0 0 +After: [6, 3, 0, 2] + +Before: [3, 3, 1, 2] +1 2 1 3 +After: [3, 3, 1, 3] + +Before: [1, 0, 2, 2] +5 1 0 2 +After: [1, 0, 1, 2] + +Before: [1, 0, 0, 2] +5 1 0 3 +After: [1, 0, 0, 1] + +Before: [0, 2, 2, 2] +11 0 0 0 +After: [0, 2, 2, 2] + +Before: [1, 2, 2, 1] +0 0 2 2 +After: [1, 2, 2, 1] + +Before: [3, 2, 1, 3] +2 1 0 2 +After: [3, 2, 1, 3] + +Before: [1, 1, 1, 0] +14 1 0 0 +After: [1, 1, 1, 0] + +Before: [3, 3, 1, 3] +0 3 3 3 +After: [3, 3, 1, 9] + +Before: [3, 3, 2, 2] +4 1 2 1 +After: [3, 1, 2, 2] + +Before: [1, 0, 0, 3] +5 1 0 1 +After: [1, 1, 0, 3] + +Before: [1, 0, 0, 3] +0 3 3 0 +After: [9, 0, 0, 3] + +Before: [1, 1, 1, 2] +14 1 0 1 +After: [1, 1, 1, 2] + +Before: [2, 3, 0, 1] +4 1 0 1 +After: [2, 1, 0, 1] + +Before: [2, 3, 3, 1] +4 1 0 2 +After: [2, 3, 1, 1] + +Before: [1, 3, 2, 2] +0 0 2 0 +After: [2, 3, 2, 2] + +Before: [0, 1, 2, 2] +6 0 2 1 +After: [0, 2, 2, 2] + +Before: [1, 1, 3, 1] +14 1 0 3 +After: [1, 1, 3, 1] + +Before: [1, 1, 2, 3] +14 1 0 2 +After: [1, 1, 1, 3] + +Before: [0, 3, 0, 1] +11 0 0 3 +After: [0, 3, 0, 0] + +Before: [1, 3, 0, 2] +3 1 3 3 +After: [1, 3, 0, 1] + +Before: [3, 1, 0, 3] +10 1 3 1 +After: [3, 3, 0, 3] + +Before: [0, 1, 2, 0] +7 1 0 2 +After: [0, 1, 1, 0] + +Before: [2, 3, 3, 3] +9 1 2 1 +After: [2, 6, 3, 3] + +Before: [1, 1, 1, 3] +14 1 0 0 +After: [1, 1, 1, 3] + +Before: [3, 2, 2, 0] +2 1 0 3 +After: [3, 2, 2, 1] + +Before: [1, 1, 2, 2] +10 0 3 3 +After: [1, 1, 2, 3] + +Before: [2, 3, 2, 1] +4 1 0 1 +After: [2, 1, 2, 1] + +Before: [0, 3, 3, 2] +3 1 3 0 +After: [1, 3, 3, 2] + +Before: [0, 0, 0, 2] +13 0 1 3 +After: [0, 0, 0, 1] + +Before: [1, 1, 0, 3] +10 1 3 2 +After: [1, 1, 3, 3] + +Before: [1, 1, 2, 1] +14 1 0 3 +After: [1, 1, 2, 1] + +Before: [3, 3, 3, 2] +3 1 3 1 +After: [3, 1, 3, 2] + +Before: [2, 1, 3, 1] +12 3 2 2 +After: [2, 1, 3, 1] + +Before: [1, 0, 0, 2] +10 0 3 3 +After: [1, 0, 0, 3] + +Before: [2, 2, 2, 3] +15 0 3 3 +After: [2, 2, 2, 0] + +Before: [1, 3, 2, 3] +0 1 2 1 +After: [1, 6, 2, 3] + +Before: [0, 3, 3, 3] +11 0 0 0 +After: [0, 3, 3, 3] + +Before: [2, 1, 1, 0] +9 0 0 1 +After: [2, 4, 1, 0] + +Before: [0, 0, 2, 2] +11 0 0 2 +After: [0, 0, 0, 2] + +Before: [0, 1, 3, 0] +7 1 0 1 +After: [0, 1, 3, 0] + +Before: [1, 1, 3, 0] +14 1 0 3 +After: [1, 1, 3, 1] + +Before: [0, 1, 3, 3] +7 1 0 0 +After: [1, 1, 3, 3] + +Before: [0, 0, 3, 3] +11 0 0 2 +After: [0, 0, 0, 3] + +Before: [2, 3, 2, 3] +4 1 0 2 +After: [2, 3, 1, 3] + +Before: [1, 2, 1, 3] +15 0 3 0 +After: [0, 2, 1, 3] + +Before: [2, 2, 1, 3] +15 0 3 0 +After: [0, 2, 1, 3] + +Before: [2, 0, 2, 3] +6 2 2 1 +After: [2, 4, 2, 3] + +Before: [2, 2, 1, 3] +15 0 3 1 +After: [2, 0, 1, 3] + +Before: [1, 3, 2, 0] +4 1 2 0 +After: [1, 3, 2, 0] + +Before: [0, 1, 3, 3] +9 3 2 0 +After: [6, 1, 3, 3] + +Before: [0, 3, 2, 3] +11 0 0 3 +After: [0, 3, 2, 0] + +Before: [0, 3, 2, 3] +6 0 2 3 +After: [0, 3, 2, 2] + +Before: [0, 0, 2, 2] +13 0 1 2 +After: [0, 0, 1, 2] + +Before: [0, 3, 2, 2] +3 1 3 1 +After: [0, 1, 2, 2] + +Before: [1, 3, 1, 0] +1 0 1 2 +After: [1, 3, 3, 0] + +Before: [2, 3, 1, 0] +4 1 0 0 +After: [1, 3, 1, 0] + +Before: [0, 0, 1, 3] +13 0 1 3 +After: [0, 0, 1, 1] + +Before: [2, 3, 3, 1] +4 1 0 3 +After: [2, 3, 3, 1] + +Before: [3, 2, 1, 2] +2 1 0 1 +After: [3, 1, 1, 2] + +Before: [1, 3, 2, 2] +3 1 3 2 +After: [1, 3, 1, 2] + +Before: [1, 1, 1, 2] +8 0 3 0 +After: [2, 1, 1, 2] + +Before: [1, 3, 3, 1] +12 3 2 2 +After: [1, 3, 3, 1] + +Before: [0, 0, 2, 0] +13 0 1 2 +After: [0, 0, 1, 0] + +Before: [0, 1, 0, 0] +11 0 0 2 +After: [0, 1, 0, 0] + +Before: [3, 3, 2, 2] +3 1 3 2 +After: [3, 3, 1, 2] + +Before: [0, 1, 1, 3] +7 1 0 0 +After: [1, 1, 1, 3] + +Before: [1, 1, 1, 2] +14 1 0 3 +After: [1, 1, 1, 1] + +Before: [0, 0, 2, 3] +13 0 1 1 +After: [0, 1, 2, 3] + +Before: [3, 1, 0, 2] +1 2 0 1 +After: [3, 3, 0, 2] + +Before: [0, 0, 1, 1] +13 0 1 0 +After: [1, 0, 1, 1] + +Before: [0, 2, 2, 0] +6 0 2 0 +After: [2, 2, 2, 0] + +Before: [1, 2, 0, 3] +15 0 3 1 +After: [1, 0, 0, 3] + +Before: [1, 0, 0, 3] +0 3 3 1 +After: [1, 9, 0, 3] + +Before: [0, 0, 2, 1] +13 0 1 3 +After: [0, 0, 2, 1] + +Before: [3, 2, 2, 1] +6 1 2 2 +After: [3, 2, 4, 1] + +Before: [1, 3, 0, 3] +8 3 1 0 +After: [9, 3, 0, 3] + +Before: [1, 1, 3, 3] +15 0 3 0 +After: [0, 1, 3, 3] + +Before: [3, 2, 2, 1] +2 1 0 1 +After: [3, 1, 2, 1] + +Before: [0, 1, 1, 0] +7 1 0 0 +After: [1, 1, 1, 0] + +Before: [3, 0, 2, 3] +8 3 0 0 +After: [9, 0, 2, 3] + +Before: [0, 3, 0, 2] +3 1 3 2 +After: [0, 3, 1, 2] + +Before: [3, 2, 0, 1] +2 1 0 0 +After: [1, 2, 0, 1] + +Before: [0, 0, 2, 3] +13 0 1 3 +After: [0, 0, 2, 1] + +Before: [2, 2, 2, 2] +9 1 0 2 +After: [2, 2, 4, 2] + +Before: [0, 3, 2, 2] +3 1 3 0 +After: [1, 3, 2, 2] + +Before: [0, 0, 1, 2] +10 2 3 2 +After: [0, 0, 3, 2] + +Before: [0, 2, 3, 3] +11 0 0 2 +After: [0, 2, 0, 3] + +Before: [1, 1, 3, 0] +14 1 0 0 +After: [1, 1, 3, 0] + +Before: [3, 3, 0, 2] +3 1 3 0 +After: [1, 3, 0, 2] + +Before: [2, 2, 0, 2] +9 0 3 0 +After: [4, 2, 0, 2] + +Before: [3, 3, 2, 1] +6 2 2 2 +After: [3, 3, 4, 1] + +Before: [2, 0, 3, 3] +15 0 3 3 +After: [2, 0, 3, 0] + +Before: [1, 1, 3, 3] +10 0 3 3 +After: [1, 1, 3, 3] + +Before: [3, 0, 3, 3] +6 1 3 1 +After: [3, 3, 3, 3] + +Before: [2, 3, 0, 3] +4 1 0 0 +After: [1, 3, 0, 3] + +Before: [0, 3, 2, 3] +4 1 2 3 +After: [0, 3, 2, 1] + +Before: [3, 1, 2, 0] +0 1 2 3 +After: [3, 1, 2, 2] + +Before: [2, 0, 3, 3] +0 2 3 3 +After: [2, 0, 3, 9] + +Before: [2, 3, 2, 3] +4 1 2 3 +After: [2, 3, 2, 1] + +Before: [2, 0, 1, 3] +1 2 0 0 +After: [3, 0, 1, 3] + +Before: [0, 0, 3, 2] +13 0 1 1 +After: [0, 1, 3, 2] + +Before: [2, 3, 2, 0] +4 1 0 2 +After: [2, 3, 1, 0] + +Before: [1, 1, 2, 2] +6 0 2 1 +After: [1, 3, 2, 2] + +Before: [1, 3, 1, 2] +10 2 3 1 +After: [1, 3, 1, 2] + +Before: [2, 2, 0, 3] +15 0 3 2 +After: [2, 2, 0, 3] + +Before: [0, 3, 0, 0] +11 0 0 3 +After: [0, 3, 0, 0] + +Before: [2, 1, 0, 3] +6 0 1 2 +After: [2, 1, 3, 3] + +Before: [3, 2, 1, 2] +2 1 0 2 +After: [3, 2, 1, 2] + +Before: [0, 1, 0, 0] +7 1 0 3 +After: [0, 1, 0, 1] + +Before: [1, 1, 1, 1] +14 1 0 0 +After: [1, 1, 1, 1] + +Before: [0, 2, 2, 3] +11 0 0 1 +After: [0, 0, 2, 3] + +Before: [1, 1, 0, 2] +14 1 0 0 +After: [1, 1, 0, 2] + +Before: [3, 1, 2, 2] +12 3 1 0 +After: [3, 1, 2, 2] + +Before: [3, 3, 1, 2] +8 0 0 3 +After: [3, 3, 1, 9] + +Before: [0, 3, 1, 2] +10 2 3 3 +After: [0, 3, 1, 3] + +Before: [0, 2, 2, 3] +1 0 1 2 +After: [0, 2, 2, 3] + +Before: [2, 3, 3, 1] +8 0 2 3 +After: [2, 3, 3, 6] + +Before: [3, 0, 2, 2] +9 2 3 0 +After: [4, 0, 2, 2] + +Before: [1, 0, 1, 2] +5 1 0 3 +After: [1, 0, 1, 1] + +Before: [0, 3, 2, 2] +3 1 3 3 +After: [0, 3, 2, 1] + +Before: [1, 1, 1, 3] +15 0 3 2 +After: [1, 1, 0, 3] + +Before: [3, 3, 2, 2] +3 1 3 1 +After: [3, 1, 2, 2] + +Before: [1, 0, 2, 0] +5 1 0 1 +After: [1, 1, 2, 0] + +Before: [2, 1, 2, 1] +0 3 2 3 +After: [2, 1, 2, 2] + +Before: [1, 0, 2, 3] +10 0 3 1 +After: [1, 3, 2, 3] + +Before: [1, 1, 2, 3] +14 1 0 1 +After: [1, 1, 2, 3] + +Before: [2, 3, 3, 2] +8 3 2 1 +After: [2, 6, 3, 2] + +Before: [1, 1, 2, 3] +6 0 2 2 +After: [1, 1, 3, 3] + +Before: [0, 0, 2, 1] +12 3 2 0 +After: [3, 0, 2, 1] + +Before: [3, 0, 0, 3] +0 3 3 1 +After: [3, 9, 0, 3] + +Before: [2, 3, 0, 1] +8 3 0 1 +After: [2, 2, 0, 1] + +Before: [2, 1, 3, 3] +15 0 3 1 +After: [2, 0, 3, 3] + +Before: [2, 3, 1, 2] +1 0 2 3 +After: [2, 3, 1, 3] + +Before: [3, 0, 3, 3] +9 2 2 0 +After: [6, 0, 3, 3] + +Before: [1, 1, 1, 1] +14 1 0 2 +After: [1, 1, 1, 1] + +Before: [3, 1, 0, 1] +1 1 0 1 +After: [3, 3, 0, 1] + +Before: [3, 3, 2, 0] +4 1 2 2 +After: [3, 3, 1, 0] + +Before: [0, 0, 1, 0] +13 0 1 3 +After: [0, 0, 1, 1] + +Before: [1, 0, 2, 3] +5 1 0 0 +After: [1, 0, 2, 3] + +Before: [2, 0, 2, 0] +6 2 2 1 +After: [2, 4, 2, 0] + +Before: [2, 3, 3, 3] +0 2 3 0 +After: [9, 3, 3, 3] + +Before: [3, 3, 0, 3] +0 1 3 2 +After: [3, 3, 9, 3] + +Before: [0, 0, 3, 1] +13 0 1 0 +After: [1, 0, 3, 1] + +Before: [2, 2, 2, 1] +12 3 2 0 +After: [3, 2, 2, 1] + +Before: [0, 1, 0, 2] +7 1 0 3 +After: [0, 1, 0, 1] + +Before: [0, 1, 1, 2] +7 1 0 2 +After: [0, 1, 1, 2] + +Before: [3, 3, 3, 0] +8 2 2 0 +After: [9, 3, 3, 0] + +Before: [0, 3, 0, 3] +11 0 0 2 +After: [0, 3, 0, 3] + +Before: [0, 0, 3, 3] +9 2 2 2 +After: [0, 0, 6, 3] + +Before: [3, 3, 3, 2] +8 2 0 0 +After: [9, 3, 3, 2] + +Before: [2, 2, 2, 3] +15 0 3 1 +After: [2, 0, 2, 3] + +Before: [2, 3, 1, 1] +4 1 0 0 +After: [1, 3, 1, 1] + +Before: [3, 2, 1, 3] +0 0 3 3 +After: [3, 2, 1, 9] + +Before: [1, 3, 3, 2] +9 3 3 3 +After: [1, 3, 3, 4] + +Before: [0, 2, 3, 2] +9 2 2 3 +After: [0, 2, 3, 6] + +Before: [1, 2, 2, 2] +9 3 1 0 +After: [4, 2, 2, 2] + +Before: [0, 0, 2, 1] +12 3 2 1 +After: [0, 3, 2, 1] + +Before: [1, 2, 0, 3] +10 0 3 2 +After: [1, 2, 3, 3] + +Before: [0, 3, 3, 3] +9 3 2 1 +After: [0, 6, 3, 3] + +Before: [1, 0, 3, 1] +5 1 0 0 +After: [1, 0, 3, 1] + +Before: [1, 1, 1, 0] +14 1 0 3 +After: [1, 1, 1, 1] + +Before: [0, 0, 2, 1] +13 0 1 2 +After: [0, 0, 1, 1] + +Before: [1, 1, 0, 2] +14 1 0 3 +After: [1, 1, 0, 1] + +Before: [2, 2, 2, 2] +9 2 1 2 +After: [2, 2, 4, 2] + +Before: [1, 1, 2, 1] +14 1 0 0 +After: [1, 1, 2, 1] + +Before: [3, 2, 2, 2] +2 1 0 1 +After: [3, 1, 2, 2] + +Before: [0, 1, 2, 1] +7 1 0 1 +After: [0, 1, 2, 1] + +Before: [0, 0, 3, 2] +13 0 1 2 +After: [0, 0, 1, 2] + +Before: [3, 3, 1, 2] +3 1 3 3 +After: [3, 3, 1, 1] + +Before: [3, 1, 2, 1] +12 3 2 3 +After: [3, 1, 2, 3] + +Before: [1, 0, 0, 0] +5 1 0 0 +After: [1, 0, 0, 0] + +Before: [0, 1, 1, 1] +7 1 0 0 +After: [1, 1, 1, 1] + +Before: [1, 0, 0, 3] +5 1 0 0 +After: [1, 0, 0, 3] + +Before: [2, 3, 2, 0] +4 1 0 0 +After: [1, 3, 2, 0] + +Before: [1, 3, 1, 2] +3 1 3 3 +After: [1, 3, 1, 1] + +Before: [2, 3, 2, 0] +4 1 2 0 +After: [1, 3, 2, 0] + +Before: [1, 1, 2, 2] +10 1 3 0 +After: [3, 1, 2, 2] + +Before: [1, 1, 0, 1] +14 1 0 2 +After: [1, 1, 1, 1] + +Before: [3, 1, 2, 3] +0 0 3 3 +After: [3, 1, 2, 9] + +Before: [1, 1, 2, 1] +12 3 2 0 +After: [3, 1, 2, 1] + +Before: [0, 1, 2, 0] +6 3 2 3 +After: [0, 1, 2, 2] + +Before: [2, 3, 0, 2] +9 3 3 1 +After: [2, 4, 0, 2] + +Before: [0, 1, 1, 2] +7 1 0 0 +After: [1, 1, 1, 2] + +Before: [3, 2, 0, 2] +8 0 0 2 +After: [3, 2, 9, 2] + +Before: [0, 1, 3, 2] +7 1 0 3 +After: [0, 1, 3, 1] + +Before: [1, 1, 0, 2] +10 0 3 0 +After: [3, 1, 0, 2] + +Before: [2, 3, 2, 2] +4 1 0 3 +After: [2, 3, 2, 1] + +Before: [0, 0, 3, 3] +13 0 1 3 +After: [0, 0, 3, 1] + +Before: [0, 0, 0, 3] +13 0 1 3 +After: [0, 0, 0, 1] + +Before: [2, 1, 2, 1] +6 1 2 3 +After: [2, 1, 2, 3] + +Before: [3, 1, 1, 2] +9 3 3 1 +After: [3, 4, 1, 2] + +Before: [1, 1, 1, 2] +10 0 3 1 +After: [1, 3, 1, 2] + +Before: [3, 0, 1, 0] +1 2 0 2 +After: [3, 0, 3, 0] + +Before: [0, 0, 2, 0] +6 3 2 0 +After: [2, 0, 2, 0] + +Before: [2, 2, 0, 0] +1 3 0 1 +After: [2, 2, 0, 0] + +Before: [0, 0, 2, 2] +13 0 1 1 +After: [0, 1, 2, 2] + +Before: [0, 3, 1, 2] +10 2 3 1 +After: [0, 3, 1, 2] + +Before: [3, 0, 2, 1] +12 3 2 2 +After: [3, 0, 3, 1] + +Before: [0, 3, 3, 2] +9 2 2 2 +After: [0, 3, 6, 2] + +Before: [1, 1, 0, 3] +14 1 0 1 +After: [1, 1, 0, 3] + +Before: [1, 3, 0, 2] +3 1 3 1 +After: [1, 1, 0, 2] + +Before: [0, 3, 3, 2] +1 0 1 0 +After: [3, 3, 3, 2] + +Before: [2, 1, 3, 1] +9 0 0 3 +After: [2, 1, 3, 4] + +Before: [1, 1, 2, 0] +14 1 0 0 +After: [1, 1, 2, 0] + +Before: [1, 1, 2, 3] +10 0 3 1 +After: [1, 3, 2, 3] + +Before: [3, 0, 1, 3] +10 2 3 0 +After: [3, 0, 1, 3] + +Before: [1, 2, 2, 3] +0 0 2 0 +After: [2, 2, 2, 3] + +Before: [3, 2, 2, 0] +2 1 0 0 +After: [1, 2, 2, 0] + +Before: [1, 2, 0, 3] +15 0 3 2 +After: [1, 2, 0, 3] + +Before: [0, 2, 1, 2] +1 0 2 3 +After: [0, 2, 1, 1] + +Before: [2, 3, 2, 3] +15 0 3 1 +After: [2, 0, 2, 3] + +Before: [1, 1, 3, 3] +14 1 0 1 +After: [1, 1, 3, 3] + +Before: [2, 2, 2, 1] +6 1 2 3 +After: [2, 2, 2, 4] + +Before: [1, 2, 2, 3] +10 0 3 2 +After: [1, 2, 3, 3] + +Before: [0, 2, 1, 3] +11 0 0 2 +After: [0, 2, 0, 3] + +Before: [1, 1, 2, 0] +14 1 0 2 +After: [1, 1, 1, 0] + +Before: [3, 0, 2, 0] +6 3 2 1 +After: [3, 2, 2, 0] + +Before: [0, 3, 2, 1] +12 3 2 0 +After: [3, 3, 2, 1] + +Before: [1, 0, 3, 0] +5 1 0 3 +After: [1, 0, 3, 1] + +Before: [3, 3, 2, 0] +8 0 1 1 +After: [3, 9, 2, 0] + +Before: [1, 2, 3, 3] +15 0 3 0 +After: [0, 2, 3, 3] + +Before: [3, 3, 3, 3] +9 2 2 1 +After: [3, 6, 3, 3] + +Before: [0, 1, 2, 0] +7 1 0 3 +After: [0, 1, 2, 1] + +Before: [3, 1, 3, 3] +0 3 3 2 +After: [3, 1, 9, 3] + +Before: [2, 3, 1, 2] +3 1 3 2 +After: [2, 3, 1, 2] + +Before: [3, 2, 0, 3] +1 2 0 0 +After: [3, 2, 0, 3] + +Before: [1, 2, 2, 0] +6 1 2 2 +After: [1, 2, 4, 0] + +Before: [2, 3, 3, 2] +3 1 3 3 +After: [2, 3, 3, 1] + +Before: [2, 1, 3, 2] +12 3 1 1 +After: [2, 3, 3, 2] + +Before: [0, 1, 3, 0] +8 2 2 3 +After: [0, 1, 3, 9] + +Before: [2, 0, 1, 2] +1 2 0 0 +After: [3, 0, 1, 2] + +Before: [3, 2, 0, 2] +2 1 0 3 +After: [3, 2, 0, 1] + +Before: [0, 1, 2, 0] +7 1 0 1 +After: [0, 1, 2, 0] + +Before: [1, 0, 3, 1] +12 3 2 0 +After: [3, 0, 3, 1] + +Before: [1, 3, 2, 2] +3 1 3 1 +After: [1, 1, 2, 2] + +Before: [1, 0, 1, 1] +5 1 0 0 +After: [1, 0, 1, 1] + +Before: [0, 1, 0, 2] +7 1 0 0 +After: [1, 1, 0, 2] + +Before: [3, 3, 2, 1] +12 3 2 0 +After: [3, 3, 2, 1] + +Before: [1, 0, 1, 3] +5 1 0 2 +After: [1, 0, 1, 3] + +Before: [0, 1, 3, 3] +7 1 0 3 +After: [0, 1, 3, 1] + +Before: [0, 1, 0, 1] +7 1 0 0 +After: [1, 1, 0, 1] + +Before: [3, 3, 0, 2] +3 1 3 1 +After: [3, 1, 0, 2] + +Before: [1, 2, 2, 1] +12 3 2 1 +After: [1, 3, 2, 1] + +Before: [0, 0, 0, 0] +13 0 1 2 +After: [0, 0, 1, 0] + +Before: [2, 0, 0, 3] +9 0 0 3 +After: [2, 0, 0, 4] + +Before: [3, 2, 2, 1] +0 3 2 2 +After: [3, 2, 2, 1] + +Before: [1, 2, 0, 3] +15 0 3 3 +After: [1, 2, 0, 0] + +Before: [0, 0, 2, 3] +13 0 1 0 +After: [1, 0, 2, 3] + +Before: [2, 3, 3, 3] +0 3 3 0 +After: [9, 3, 3, 3] + +Before: [2, 3, 3, 0] +4 1 0 0 +After: [1, 3, 3, 0] + +Before: [2, 3, 2, 3] +4 1 2 0 +After: [1, 3, 2, 3] + +Before: [0, 0, 2, 1] +13 0 1 1 +After: [0, 1, 2, 1] + +Before: [3, 2, 2, 0] +6 1 2 3 +After: [3, 2, 2, 4] + +Before: [0, 1, 0, 0] +7 1 0 0 +After: [1, 1, 0, 0] + +Before: [0, 3, 1, 2] +11 0 0 0 +After: [0, 3, 1, 2] + +Before: [2, 1, 1, 3] +15 0 3 1 +After: [2, 0, 1, 3] + +Before: [2, 3, 1, 0] +1 3 0 3 +After: [2, 3, 1, 2] + +Before: [1, 1, 2, 1] +6 2 2 2 +After: [1, 1, 4, 1] + +Before: [1, 1, 1, 2] +14 1 0 0 +After: [1, 1, 1, 2] + +Before: [0, 0, 2, 3] +0 2 3 0 +After: [6, 0, 2, 3] + +Before: [0, 3, 3, 3] +0 1 3 2 +After: [0, 3, 9, 3] + +Before: [0, 0, 0, 2] +13 0 1 2 +After: [0, 0, 1, 2] + +Before: [1, 0, 0, 1] +5 1 0 2 +After: [1, 0, 1, 1] + +Before: [2, 3, 2, 3] +15 0 3 2 +After: [2, 3, 0, 3] + +Before: [3, 3, 3, 2] +3 1 3 3 +After: [3, 3, 3, 1] + +Before: [1, 3, 3, 3] +15 0 3 0 +After: [0, 3, 3, 3] + +Before: [0, 0, 3, 0] +13 0 1 0 +After: [1, 0, 3, 0] + +Before: [1, 2, 2, 0] +6 0 2 3 +After: [1, 2, 2, 3] + +Before: [2, 2, 2, 3] +15 0 3 0 +After: [0, 2, 2, 3] + +Before: [1, 0, 1, 3] +5 1 0 3 +After: [1, 0, 1, 1] + +Before: [2, 0, 3, 1] +8 3 0 0 +After: [2, 0, 3, 1] + +Before: [0, 1, 0, 1] +7 1 0 3 +After: [0, 1, 0, 1] + +Before: [0, 1, 1, 3] +7 1 0 3 +After: [0, 1, 1, 1] + +Before: [1, 1, 1, 0] +14 1 0 2 +After: [1, 1, 1, 0] + +Before: [0, 0, 3, 0] +13 0 1 3 +After: [0, 0, 3, 1] + +Before: [0, 2, 3, 1] +12 3 2 1 +After: [0, 3, 3, 1] + +Before: [1, 1, 2, 2] +10 1 3 1 +After: [1, 3, 2, 2] + +Before: [2, 3, 2, 2] +3 1 3 0 +After: [1, 3, 2, 2] + +Before: [3, 2, 0, 3] +2 1 0 3 +After: [3, 2, 0, 1] + +Before: [3, 3, 1, 3] +8 0 0 2 +After: [3, 3, 9, 3] + +Before: [1, 1, 3, 2] +10 0 3 1 +After: [1, 3, 3, 2] + +Before: [0, 1, 2, 3] +7 1 0 0 +After: [1, 1, 2, 3] + +Before: [3, 2, 3, 2] +9 2 2 3 +After: [3, 2, 3, 6] + +Before: [2, 0, 1, 2] +1 1 3 1 +After: [2, 2, 1, 2] + +Before: [1, 0, 2, 2] +10 0 3 0 +After: [3, 0, 2, 2] + +Before: [2, 0, 3, 1] +12 3 2 1 +After: [2, 3, 3, 1] + +Before: [0, 3, 2, 0] +6 0 2 3 +After: [0, 3, 2, 2] + +Before: [1, 2, 2, 3] +15 0 3 1 +After: [1, 0, 2, 3] + +Before: [3, 2, 0, 3] +2 1 0 0 +After: [1, 2, 0, 3] + +Before: [3, 0, 1, 3] +0 3 3 3 +After: [3, 0, 1, 9] + +Before: [1, 0, 3, 3] +5 1 0 3 +After: [1, 0, 3, 1] + +Before: [0, 1, 0, 3] +7 1 0 0 +After: [1, 1, 0, 3] + +Before: [2, 2, 3, 3] +0 1 3 0 +After: [6, 2, 3, 3] + +Before: [2, 2, 1, 0] +1 0 2 1 +After: [2, 3, 1, 0] + +Before: [2, 1, 2, 3] +0 3 3 0 +After: [9, 1, 2, 3] + +Before: [3, 0, 3, 0] +8 2 2 2 +After: [3, 0, 9, 0] + +Before: [1, 3, 2, 3] +0 0 2 1 +After: [1, 2, 2, 3] + +Before: [2, 2, 0, 3] +9 0 1 1 +After: [2, 4, 0, 3] + +Before: [2, 2, 1, 3] +1 2 1 0 +After: [3, 2, 1, 3] + +Before: [3, 2, 2, 2] +9 2 3 1 +After: [3, 4, 2, 2] + +Before: [0, 1, 0, 2] +12 3 1 0 +After: [3, 1, 0, 2] + +Before: [0, 3, 2, 1] +11 0 0 3 +After: [0, 3, 2, 0] + +Before: [3, 2, 1, 1] +2 1 0 2 +After: [3, 2, 1, 1] + +Before: [1, 1, 1, 1] +14 1 0 3 +After: [1, 1, 1, 1] + +Before: [1, 1, 0, 0] +14 1 0 1 +After: [1, 1, 0, 0] + +Before: [1, 0, 1, 3] +15 0 3 1 +After: [1, 0, 1, 3] + +Before: [0, 1, 2, 3] +6 0 1 2 +After: [0, 1, 1, 3] + +Before: [0, 1, 1, 2] +7 1 0 3 +After: [0, 1, 1, 1] + +Before: [3, 0, 2, 2] +6 3 2 1 +After: [3, 4, 2, 2] + +Before: [0, 1, 1, 2] +7 1 0 1 +After: [0, 1, 1, 2] + +Before: [1, 1, 2, 3] +0 2 3 0 +After: [6, 1, 2, 3] + +Before: [1, 1, 3, 1] +14 1 0 0 +After: [1, 1, 3, 1] + +Before: [1, 1, 1, 3] +10 2 3 1 +After: [1, 3, 1, 3] + +Before: [0, 2, 2, 3] +6 1 2 1 +After: [0, 4, 2, 3] + +Before: [0, 2, 1, 1] +11 0 0 0 +After: [0, 2, 1, 1] + +Before: [2, 1, 2, 0] +6 3 2 0 +After: [2, 1, 2, 0] + +Before: [0, 1, 0, 3] +7 1 0 3 +After: [0, 1, 0, 1] + +Before: [0, 1, 2, 1] +7 1 0 0 +After: [1, 1, 2, 1] + +Before: [2, 2, 2, 3] +6 2 2 2 +After: [2, 2, 4, 3] + +Before: [1, 0, 2, 3] +10 0 3 0 +After: [3, 0, 2, 3] + +Before: [1, 2, 2, 0] +1 3 1 2 +After: [1, 2, 2, 0] + +Before: [2, 1, 1, 2] +12 3 1 1 +After: [2, 3, 1, 2] + +Before: [2, 1, 2, 0] +6 0 1 3 +After: [2, 1, 2, 3] + +Before: [3, 2, 0, 0] +2 1 0 1 +After: [3, 1, 0, 0] + +Before: [3, 1, 3, 1] +9 0 2 0 +After: [6, 1, 3, 1] + +Before: [0, 3, 1, 2] +11 0 0 1 +After: [0, 0, 1, 2] + +Before: [3, 1, 3, 1] +9 0 2 1 +After: [3, 6, 3, 1] + +Before: [3, 3, 3, 3] +8 2 0 0 +After: [9, 3, 3, 3] + +Before: [1, 2, 2, 3] +15 0 3 3 +After: [1, 2, 2, 0] + +Before: [1, 2, 3, 3] +15 0 3 1 +After: [1, 0, 3, 3] + +Before: [3, 1, 0, 2] +12 3 1 0 +After: [3, 1, 0, 2] + +Before: [0, 0, 0, 0] +13 0 1 0 +After: [1, 0, 0, 0] + +Before: [0, 1, 1, 2] +12 3 1 1 +After: [0, 3, 1, 2] + +Before: [3, 2, 1, 0] +2 1 0 1 +After: [3, 1, 1, 0] + +Before: [0, 1, 3, 1] +7 1 0 1 +After: [0, 1, 3, 1] + +Before: [2, 1, 0, 3] +15 0 3 3 +After: [2, 1, 0, 0] + +Before: [2, 3, 0, 3] +4 1 0 3 +After: [2, 3, 0, 1] + +Before: [1, 1, 3, 1] +14 1 0 1 +After: [1, 1, 3, 1] + +Before: [2, 1, 2, 2] +12 3 1 3 +After: [2, 1, 2, 3] + +Before: [1, 0, 2, 2] +5 1 0 1 +After: [1, 1, 2, 2] + +Before: [0, 0, 3, 1] +11 0 0 1 +After: [0, 0, 3, 1] + +Before: [3, 2, 0, 0] +2 1 0 0 +After: [1, 2, 0, 0] + +Before: [0, 3, 0, 3] +0 1 3 0 +After: [9, 3, 0, 3] + +Before: [2, 2, 2, 2] +9 3 3 1 +After: [2, 4, 2, 2] + +Before: [1, 3, 0, 2] +3 1 3 2 +After: [1, 3, 1, 2] + +Before: [3, 2, 3, 3] +2 1 0 0 +After: [1, 2, 3, 3] + +Before: [1, 3, 1, 0] +9 0 2 3 +After: [1, 3, 1, 2] + +Before: [3, 1, 0, 2] +1 1 0 3 +After: [3, 1, 0, 3] + +Before: [0, 1, 1, 3] +7 1 0 1 +After: [0, 1, 1, 3] + +Before: [3, 2, 0, 2] +2 1 0 0 +After: [1, 2, 0, 2] + +Before: [0, 0, 0, 2] +13 0 1 1 +After: [0, 1, 0, 2] + +Before: [3, 2, 2, 1] +2 1 0 2 +After: [3, 2, 1, 1] + +Before: [0, 2, 2, 0] +6 2 2 3 +After: [0, 2, 2, 4] + +Before: [3, 3, 1, 1] +8 1 0 1 +After: [3, 9, 1, 1] + +Before: [0, 2, 1, 0] +11 0 0 2 +After: [0, 2, 0, 0] + +Before: [0, 1, 2, 2] +7 1 0 1 +After: [0, 1, 2, 2] + +Before: [1, 1, 0, 0] +14 1 0 0 +After: [1, 1, 0, 0] + +Before: [0, 2, 3, 2] +11 0 0 1 +After: [0, 0, 3, 2] + +Before: [0, 1, 3, 1] +11 0 0 0 +After: [0, 1, 3, 1] + +Before: [1, 0, 0, 2] +5 1 0 0 +After: [1, 0, 0, 2] + +Before: [0, 0, 0, 1] +1 0 3 0 +After: [1, 0, 0, 1] + +Before: [1, 0, 2, 0] +5 1 0 2 +After: [1, 0, 1, 0] + +Before: [3, 2, 0, 2] +2 1 0 2 +After: [3, 2, 1, 2] + +Before: [0, 3, 0, 2] +3 1 3 3 +After: [0, 3, 0, 1] + +Before: [2, 3, 0, 0] +4 1 0 0 +After: [1, 3, 0, 0] + +Before: [1, 1, 0, 1] +14 1 0 1 +After: [1, 1, 0, 1] + +Before: [1, 1, 2, 1] +12 3 2 1 +After: [1, 3, 2, 1] + +Before: [2, 0, 0, 3] +15 0 3 1 +After: [2, 0, 0, 3] + +Before: [3, 2, 3, 1] +8 2 0 1 +After: [3, 9, 3, 1] + +Before: [2, 2, 0, 1] +9 0 1 1 +After: [2, 4, 0, 1] + +Before: [2, 3, 3, 3] +15 0 3 1 +After: [2, 0, 3, 3] + +Before: [2, 0, 2, 3] +9 0 0 1 +After: [2, 4, 2, 3] + +Before: [3, 2, 2, 2] +2 1 0 3 +After: [3, 2, 2, 1] + +Before: [2, 3, 2, 2] +4 1 2 1 +After: [2, 1, 2, 2] + +Before: [1, 2, 3, 3] +1 1 0 1 +After: [1, 3, 3, 3] + +Before: [0, 3, 2, 3] +6 0 2 0 +After: [2, 3, 2, 3] + +Before: [2, 1, 2, 3] +15 0 3 0 +After: [0, 1, 2, 3] + +Before: [2, 1, 2, 0] +9 0 0 3 +After: [2, 1, 2, 4] + +Before: [1, 2, 1, 3] +0 3 3 1 +After: [1, 9, 1, 3] + +Before: [2, 2, 1, 1] +1 2 1 2 +After: [2, 2, 3, 1] + +Before: [0, 3, 2, 1] +1 0 1 0 +After: [3, 3, 2, 1] + +Before: [2, 1, 2, 1] +9 2 0 2 +After: [2, 1, 4, 1] + +Before: [0, 0, 3, 0] +13 0 1 1 +After: [0, 1, 3, 0] + +Before: [1, 1, 2, 3] +6 0 2 3 +After: [1, 1, 2, 3] + +Before: [2, 1, 1, 2] +10 1 3 0 +After: [3, 1, 1, 2] + +Before: [1, 1, 3, 2] +12 3 1 1 +After: [1, 3, 3, 2] + +Before: [2, 3, 3, 1] +8 0 2 1 +After: [2, 6, 3, 1] + +Before: [1, 0, 2, 3] +5 1 0 3 +After: [1, 0, 2, 1] + +Before: [2, 3, 2, 1] +4 1 2 0 +After: [1, 3, 2, 1] + +Before: [2, 2, 0, 2] +9 3 1 2 +After: [2, 2, 4, 2] + +Before: [2, 2, 1, 3] +10 2 3 0 +After: [3, 2, 1, 3] + +Before: [0, 0, 2, 3] +13 0 1 2 +After: [0, 0, 1, 3] + +Before: [2, 1, 3, 1] +12 3 2 3 +After: [2, 1, 3, 3] + +Before: [2, 1, 3, 1] +6 1 2 2 +After: [2, 1, 3, 1] + +Before: [1, 2, 1, 0] +1 1 2 3 +After: [1, 2, 1, 3] + +Before: [3, 1, 2, 2] +0 0 2 0 +After: [6, 1, 2, 2] + +Before: [2, 0, 3, 3] +8 2 2 3 +After: [2, 0, 3, 9] + +Before: [1, 0, 1, 1] +5 1 0 2 +After: [1, 0, 1, 1] + +Before: [3, 3, 0, 2] +3 1 3 2 +After: [3, 3, 1, 2] + +Before: [1, 3, 2, 3] +15 0 3 3 +After: [1, 3, 2, 0] + +Before: [2, 3, 2, 3] +4 1 0 0 +After: [1, 3, 2, 3] + +Before: [2, 0, 1, 3] +15 0 3 3 +After: [2, 0, 1, 0] + +Before: [0, 0, 1, 2] +13 0 1 1 +After: [0, 1, 1, 2] + +Before: [2, 1, 3, 3] +15 0 3 2 +After: [2, 1, 0, 3] + +Before: [1, 1, 0, 3] +14 1 0 0 +After: [1, 1, 0, 3] + +Before: [2, 3, 2, 2] +3 1 3 1 +After: [2, 1, 2, 2] + +Before: [0, 1, 3, 2] +11 0 0 2 +After: [0, 1, 0, 2] + +Before: [2, 3, 3, 2] +4 1 0 3 +After: [2, 3, 3, 1] + +Before: [1, 1, 0, 3] +15 0 3 1 +After: [1, 0, 0, 3] + +Before: [2, 1, 0, 1] +9 0 0 0 +After: [4, 1, 0, 1] + +Before: [1, 3, 2, 2] +4 1 2 0 +After: [1, 3, 2, 2] + +Before: [1, 2, 1, 3] +1 1 0 0 +After: [3, 2, 1, 3] + +Before: [2, 2, 1, 2] +1 2 0 2 +After: [2, 2, 3, 2] + +Before: [0, 1, 3, 2] +7 1 0 0 +After: [1, 1, 3, 2] + +Before: [0, 1, 2, 2] +7 1 0 3 +After: [0, 1, 2, 1] + +Before: [0, 2, 1, 0] +11 0 0 3 +After: [0, 2, 1, 0] + +Before: [1, 1, 2, 1] +14 1 0 2 +After: [1, 1, 1, 1] + +Before: [1, 0, 3, 1] +12 3 2 1 +After: [1, 3, 3, 1] + +Before: [1, 3, 3, 2] +9 3 3 2 +After: [1, 3, 4, 2] + +Before: [1, 0, 1, 3] +10 2 3 3 +After: [1, 0, 1, 3] + +Before: [1, 0, 1, 0] +5 1 0 2 +After: [1, 0, 1, 0] + +Before: [0, 1, 3, 2] +7 1 0 1 +After: [0, 1, 3, 2] + +Before: [1, 1, 1, 2] +14 1 0 2 +After: [1, 1, 1, 2] + +Before: [1, 3, 3, 3] +0 2 3 0 +After: [9, 3, 3, 3] + +Before: [0, 0, 1, 0] +13 0 1 0 +After: [1, 0, 1, 0] + +Before: [3, 1, 2, 2] +9 2 3 1 +After: [3, 4, 2, 2] + +Before: [1, 0, 1, 1] +5 1 0 3 +After: [1, 0, 1, 1] + +Before: [1, 0, 3, 3] +5 1 0 1 +After: [1, 1, 3, 3] + +Before: [0, 1, 2, 1] +7 1 0 3 +After: [0, 1, 2, 1] + +Before: [0, 3, 1, 1] +11 0 0 0 +After: [0, 3, 1, 1] + +Before: [0, 2, 0, 3] +6 2 3 2 +After: [0, 2, 3, 3] + +Before: [2, 1, 3, 2] +8 2 0 3 +After: [2, 1, 3, 6] + +Before: [1, 0, 3, 0] +5 1 0 2 +After: [1, 0, 1, 0] + +Before: [0, 0, 1, 3] +13 0 1 1 +After: [0, 1, 1, 3] + +Before: [1, 1, 1, 2] +10 1 3 3 +After: [1, 1, 1, 3] + +Before: [0, 1, 0, 2] +12 3 1 1 +After: [0, 3, 0, 2] + +Before: [2, 3, 3, 2] +9 0 3 2 +After: [2, 3, 4, 2] + +Before: [0, 2, 1, 0] +1 1 2 1 +After: [0, 3, 1, 0] + +Before: [0, 2, 2, 2] +6 3 2 2 +After: [0, 2, 4, 2] + +Before: [3, 1, 3, 0] +1 1 0 0 +After: [3, 1, 3, 0] + +Before: [1, 0, 1, 1] +5 1 0 1 +After: [1, 1, 1, 1] + +Before: [3, 2, 1, 3] +2 1 0 3 +After: [3, 2, 1, 1] + +Before: [0, 1, 3, 1] +11 0 0 3 +After: [0, 1, 3, 0] + +Before: [3, 1, 0, 2] +10 1 3 3 +After: [3, 1, 0, 3] + +Before: [2, 3, 3, 0] +4 1 0 3 +After: [2, 3, 3, 1] + +Before: [2, 3, 3, 2] +4 1 0 2 +After: [2, 3, 1, 2] + +Before: [3, 2, 0, 0] +2 1 0 3 +After: [3, 2, 0, 1] + +Before: [1, 0, 2, 1] +6 1 2 1 +After: [1, 2, 2, 1] + +Before: [3, 2, 1, 0] +2 1 0 3 +After: [3, 2, 1, 1] + +Before: [2, 2, 3, 0] +9 0 0 1 +After: [2, 4, 3, 0] + +Before: [1, 1, 1, 0] +14 1 0 1 +After: [1, 1, 1, 0] + +Before: [0, 2, 1, 2] +10 2 3 0 +After: [3, 2, 1, 2] + +Before: [1, 1, 1, 3] +15 0 3 0 +After: [0, 1, 1, 3] + +Before: [0, 1, 2, 0] +7 1 0 0 +After: [1, 1, 2, 0] + +Before: [0, 1, 2, 3] +7 1 0 3 +After: [0, 1, 2, 1] + +Before: [1, 0, 3, 1] +12 3 2 2 +After: [1, 0, 3, 1] + +Before: [2, 3, 0, 0] +4 1 0 2 +After: [2, 3, 1, 0] + +Before: [3, 2, 3, 3] +2 1 0 1 +After: [3, 1, 3, 3] + +Before: [0, 0, 1, 3] +13 0 1 2 +After: [0, 0, 1, 3] + +Before: [3, 2, 2, 1] +2 1 0 3 +After: [3, 2, 2, 1] + +Before: [3, 1, 1, 3] +10 1 3 2 +After: [3, 1, 3, 3] + +Before: [0, 0, 0, 1] +13 0 1 3 +After: [0, 0, 0, 1] + +Before: [1, 3, 2, 2] +6 2 2 3 +After: [1, 3, 2, 4] + +Before: [0, 1, 2, 1] +7 1 0 2 +After: [0, 1, 1, 1] + +Before: [2, 0, 1, 1] +9 3 2 2 +After: [2, 0, 2, 1] + +Before: [1, 2, 3, 1] +12 3 2 3 +After: [1, 2, 3, 3] + +Before: [0, 3, 1, 0] +8 1 1 2 +After: [0, 3, 9, 0] + +Before: [1, 0, 2, 3] +5 1 0 2 +After: [1, 0, 1, 3] + +Before: [1, 1, 0, 0] +14 1 0 2 +After: [1, 1, 1, 0] + +Before: [3, 3, 3, 3] +0 0 3 3 +After: [3, 3, 3, 9] + +Before: [0, 1, 3, 0] +7 1 0 3 +After: [0, 1, 3, 1] + +Before: [1, 1, 1, 2] +9 0 2 3 +After: [1, 1, 1, 2] + +Before: [1, 0, 0, 3] +15 0 3 3 +After: [1, 0, 0, 0] + +Before: [2, 3, 3, 3] +9 3 2 0 +After: [6, 3, 3, 3] + +Before: [0, 0, 0, 3] +11 0 0 1 +After: [0, 0, 0, 3] + +Before: [2, 1, 2, 2] +0 1 2 3 +After: [2, 1, 2, 2] + +Before: [0, 0, 1, 1] +13 0 1 1 +After: [0, 1, 1, 1] + +Before: [1, 2, 3, 3] +10 0 3 3 +After: [1, 2, 3, 3] + +Before: [0, 2, 2, 0] +11 0 0 1 +After: [0, 0, 2, 0] + +Before: [2, 3, 3, 0] +8 2 1 1 +After: [2, 9, 3, 0] + +Before: [3, 2, 3, 2] +2 1 0 0 +After: [1, 2, 3, 2] + +Before: [0, 2, 3, 2] +1 0 3 0 +After: [2, 2, 3, 2] + +Before: [0, 1, 3, 3] +10 1 3 2 +After: [0, 1, 3, 3] + +Before: [3, 3, 2, 0] +4 1 2 1 +After: [3, 1, 2, 0] + +Before: [3, 3, 2, 1] +0 1 2 3 +After: [3, 3, 2, 6] + +Before: [1, 3, 1, 2] +3 1 3 0 +After: [1, 3, 1, 2] + +Before: [0, 1, 0, 0] +7 1 0 1 +After: [0, 1, 0, 0] + +Before: [1, 0, 3, 1] +5 1 0 3 +After: [1, 0, 3, 1] + +Before: [3, 3, 2, 3] +4 1 2 0 +After: [1, 3, 2, 3] + +Before: [2, 0, 0, 2] +9 3 0 2 +After: [2, 0, 4, 2] + +Before: [0, 2, 0, 2] +11 0 0 2 +After: [0, 2, 0, 2] + +Before: [3, 2, 3, 3] +2 1 0 2 +After: [3, 2, 1, 3] + +Before: [0, 1, 0, 2] +10 1 3 1 +After: [0, 3, 0, 2] + +Before: [2, 3, 2, 1] +9 2 0 3 +After: [2, 3, 2, 4] + +Before: [0, 0, 2, 3] +11 0 0 0 +After: [0, 0, 2, 3] + +Before: [3, 2, 0, 1] +8 0 0 3 +After: [3, 2, 0, 9] + +Before: [3, 2, 2, 1] +2 1 0 0 +After: [1, 2, 2, 1] + +Before: [3, 1, 3, 1] +12 3 2 1 +After: [3, 3, 3, 1] + +Before: [3, 1, 3, 3] +10 1 3 0 +After: [3, 1, 3, 3] + +Before: [1, 1, 3, 3] +14 1 0 3 +After: [1, 1, 3, 1] + +Before: [1, 1, 0, 1] +14 1 0 3 +After: [1, 1, 0, 1] + +Before: [2, 1, 1, 3] +15 0 3 2 +After: [2, 1, 0, 3] + +Before: [0, 0, 0, 1] +11 0 0 3 +After: [0, 0, 0, 0] + +Before: [0, 1, 1, 2] +10 1 3 3 +After: [0, 1, 1, 3] + +Before: [1, 0, 0, 3] +6 2 3 0 +After: [3, 0, 0, 3] + +Before: [2, 3, 0, 2] +4 1 0 2 +After: [2, 3, 1, 2] + +Before: [2, 3, 0, 0] +4 1 0 1 +After: [2, 1, 0, 0] + +Before: [3, 3, 3, 2] +3 1 3 0 +After: [1, 3, 3, 2] + +Before: [0, 0, 0, 0] +13 0 1 1 +After: [0, 1, 0, 0] + +Before: [2, 1, 2, 3] +15 0 3 2 +After: [2, 1, 0, 3] + +Before: [0, 0, 0, 1] +13 0 1 1 +After: [0, 1, 0, 1] + +Before: [1, 2, 3, 2] +9 1 3 0 +After: [4, 2, 3, 2] + +Before: [1, 3, 0, 3] +15 0 3 3 +After: [1, 3, 0, 0] + +Before: [0, 2, 2, 0] +11 0 0 2 +After: [0, 2, 0, 0] + +Before: [1, 1, 2, 3] +0 1 2 3 +After: [1, 1, 2, 2] + +Before: [2, 3, 2, 3] +15 0 3 0 +After: [0, 3, 2, 3] + +Before: [1, 0, 0, 0] +5 1 0 2 +After: [1, 0, 1, 0] + +Before: [1, 3, 2, 3] +4 1 2 1 +After: [1, 1, 2, 3] + +Before: [0, 1, 1, 3] +6 0 3 0 +After: [3, 1, 1, 3] + +Before: [0, 1, 0, 2] +7 1 0 1 +After: [0, 1, 0, 2] + +Before: [2, 0, 2, 1] +6 0 2 3 +After: [2, 0, 2, 4] + +Before: [0, 0, 1, 0] +13 0 1 2 +After: [0, 0, 1, 0] + +Before: [0, 3, 1, 2] +3 1 3 1 +After: [0, 1, 1, 2] + +Before: [3, 2, 2, 2] +2 1 0 2 +After: [3, 2, 1, 2] + +Before: [1, 2, 2, 3] +10 0 3 0 +After: [3, 2, 2, 3] + +Before: [1, 2, 2, 0] +9 1 1 1 +After: [1, 4, 2, 0] + +Before: [1, 1, 2, 1] +14 1 0 1 +After: [1, 1, 2, 1] + +Before: [1, 3, 2, 1] +4 1 2 2 +After: [1, 3, 1, 1] + +Before: [1, 1, 1, 3] +15 0 3 1 +After: [1, 0, 1, 3] + +Before: [3, 2, 0, 3] +2 1 0 1 +After: [3, 1, 0, 3] + +Before: [1, 1, 3, 2] +14 1 0 3 +After: [1, 1, 3, 1] + +Before: [1, 1, 0, 3] +15 0 3 2 +After: [1, 1, 0, 3] + +Before: [2, 2, 0, 2] +9 1 0 2 +After: [2, 2, 4, 2] + +Before: [2, 0, 2, 3] +15 0 3 3 +After: [2, 0, 2, 0] + +Before: [2, 0, 1, 2] +1 1 0 0 +After: [2, 0, 1, 2] + +Before: [1, 1, 1, 3] +14 1 0 1 +After: [1, 1, 1, 3] + +Before: [0, 3, 1, 0] +11 0 0 0 +After: [0, 3, 1, 0] + +Before: [1, 3, 2, 3] +4 1 2 3 +After: [1, 3, 2, 1] + +Before: [2, 0, 2, 3] +15 0 3 1 +After: [2, 0, 2, 3] + +Before: [0, 1, 1, 0] +11 0 0 2 +After: [0, 1, 0, 0] + +Before: [3, 2, 2, 2] +8 3 0 2 +After: [3, 2, 6, 2] + +Before: [3, 2, 1, 3] +10 2 3 2 +After: [3, 2, 3, 3] + +Before: [1, 1, 0, 2] +14 1 0 2 +After: [1, 1, 1, 2] + +Before: [1, 3, 2, 3] +15 0 3 1 +After: [1, 0, 2, 3] + +Before: [3, 3, 3, 3] +9 3 2 3 +After: [3, 3, 3, 6] + +Before: [2, 3, 0, 3] +0 1 3 3 +After: [2, 3, 0, 9] + +Before: [3, 0, 1, 2] +1 1 0 0 +After: [3, 0, 1, 2] + +Before: [1, 1, 1, 3] +14 1 0 3 +After: [1, 1, 1, 1] + +Before: [0, 3, 1, 1] +11 0 0 3 +After: [0, 3, 1, 0] + +Before: [0, 0, 1, 1] +13 0 1 2 +After: [0, 0, 1, 1] + +Before: [0, 2, 0, 1] +1 0 1 3 +After: [0, 2, 0, 2] + +Before: [2, 1, 1, 2] +12 3 1 0 +After: [3, 1, 1, 2] + +Before: [1, 3, 2, 0] +4 1 2 2 +After: [1, 3, 1, 0] + +Before: [0, 0, 3, 2] +13 0 1 3 +After: [0, 0, 3, 1] + +Before: [2, 2, 2, 3] +0 3 3 0 +After: [9, 2, 2, 3] + +Before: [1, 2, 1, 3] +10 0 3 0 +After: [3, 2, 1, 3] + +Before: [1, 1, 1, 3] +14 1 0 2 +After: [1, 1, 1, 3] + +Before: [0, 3, 0, 2] +3 1 3 1 +After: [0, 1, 0, 2] + +Before: [0, 0, 1, 2] +13 0 1 2 +After: [0, 0, 1, 2] + +Before: [3, 2, 3, 0] +2 1 0 1 +After: [3, 1, 3, 0] + +Before: [0, 0, 2, 3] +0 3 2 1 +After: [0, 6, 2, 3] + +Before: [0, 2, 1, 0] +1 2 1 1 +After: [0, 3, 1, 0] + +Before: [3, 3, 2, 2] +4 1 2 0 +After: [1, 3, 2, 2] + +Before: [1, 1, 0, 0] +14 1 0 3 +After: [1, 1, 0, 1] + +Before: [2, 1, 2, 1] +6 2 2 2 +After: [2, 1, 4, 1] + +Before: [3, 2, 0, 3] +2 1 0 2 +After: [3, 2, 1, 3] + +Before: [0, 2, 1, 3] +11 0 0 0 +After: [0, 2, 1, 3] + +Before: [0, 0, 0, 3] +13 0 1 0 +After: [1, 0, 0, 3] + +Before: [3, 1, 1, 2] +10 1 3 0 +After: [3, 1, 1, 2] + +Before: [3, 2, 0, 1] +2 1 0 3 +After: [3, 2, 0, 1] + +Before: [1, 0, 0, 2] +10 0 3 0 +After: [3, 0, 0, 2] + +Before: [2, 3, 2, 2] +9 2 3 1 +After: [2, 4, 2, 2] + +Before: [0, 0, 2, 1] +13 0 1 0 +After: [1, 0, 2, 1] + +Before: [0, 3, 2, 3] +11 0 0 1 +After: [0, 0, 2, 3] + +Before: [1, 1, 0, 1] +14 1 0 0 +After: [1, 1, 0, 1] + +Before: [1, 2, 1, 2] +10 0 3 0 +After: [3, 2, 1, 2] + +Before: [1, 0, 1, 0] +5 1 0 1 +After: [1, 1, 1, 0] + +Before: [1, 3, 3, 1] +9 2 2 3 +After: [1, 3, 3, 6] + +Before: [1, 2, 0, 2] +1 0 1 0 +After: [3, 2, 0, 2] + +Before: [3, 1, 0, 0] +1 1 0 1 +After: [3, 3, 0, 0] + +Before: [3, 0, 3, 0] +8 2 0 3 +After: [3, 0, 3, 9] + +Before: [0, 0, 1, 2] +11 0 0 1 +After: [0, 0, 1, 2] + +Before: [1, 0, 1, 2] +10 0 3 1 +After: [1, 3, 1, 2] + +Before: [0, 0, 0, 1] +1 0 3 1 +After: [0, 1, 0, 1] + +Before: [1, 1, 2, 2] +14 1 0 0 +After: [1, 1, 2, 2] + +Before: [1, 1, 3, 2] +14 1 0 2 +After: [1, 1, 1, 2] + +Before: [2, 1, 2, 1] +1 1 0 2 +After: [2, 1, 3, 1] + +Before: [0, 0, 0, 3] +13 0 1 1 +After: [0, 1, 0, 3] + +Before: [0, 0, 0, 2] +11 0 0 2 +After: [0, 0, 0, 2] + +Before: [3, 2, 3, 0] +2 1 0 2 +After: [3, 2, 1, 0] + +Before: [1, 1, 0, 3] +14 1 0 3 +After: [1, 1, 0, 1] + +Before: [3, 2, 1, 2] +2 1 0 0 +After: [1, 2, 1, 2] + +Before: [2, 3, 2, 2] +4 1 0 0 +After: [1, 3, 2, 2] + +Before: [0, 1, 3, 1] +7 1 0 0 +After: [1, 1, 3, 1] + +Before: [1, 2, 3, 1] +12 3 2 1 +After: [1, 3, 3, 1] + +Before: [1, 0, 0, 1] +5 1 0 3 +After: [1, 0, 0, 1] + +Before: [2, 3, 1, 2] +4 1 0 2 +After: [2, 3, 1, 2] + +Before: [0, 0, 1, 1] +11 0 0 0 +After: [0, 0, 1, 1] + +Before: [2, 1, 2, 2] +6 0 2 1 +After: [2, 4, 2, 2] + +Before: [0, 3, 2, 2] +9 2 3 1 +After: [0, 4, 2, 2] + +Before: [3, 2, 2, 3] +2 1 0 3 +After: [3, 2, 2, 1] + +Before: [3, 1, 1, 3] +10 2 3 0 +After: [3, 1, 1, 3] + +Before: [2, 1, 3, 2] +10 1 3 3 +After: [2, 1, 3, 3] + +Before: [3, 3, 1, 2] +3 1 3 2 +After: [3, 3, 1, 2] + +Before: [0, 2, 3, 1] +11 0 0 1 +After: [0, 0, 3, 1] + +Before: [0, 0, 0, 2] +11 0 0 3 +After: [0, 0, 0, 0] + +Before: [1, 3, 2, 2] +3 1 3 3 +After: [1, 3, 2, 1] + +Before: [0, 1, 0, 1] +7 1 0 1 +After: [0, 1, 0, 1] + +Before: [2, 1, 0, 2] +8 1 0 3 +After: [2, 1, 0, 2] + +Before: [2, 2, 0, 3] +0 3 3 3 +After: [2, 2, 0, 9] + +Before: [1, 2, 0, 2] +8 0 3 1 +After: [1, 2, 0, 2] + +Before: [0, 0, 3, 3] +13 0 1 2 +After: [0, 0, 1, 3] + +Before: [3, 3, 3, 2] +3 1 3 2 +After: [3, 3, 1, 2] + +Before: [3, 2, 0, 1] +2 1 0 2 +After: [3, 2, 1, 1] + +Before: [3, 2, 3, 2] +2 1 0 1 +After: [3, 1, 3, 2] + +Before: [0, 1, 3, 0] +7 1 0 0 +After: [1, 1, 3, 0] + +Before: [2, 0, 3, 3] +15 0 3 1 +After: [2, 0, 3, 3] + +Before: [2, 1, 2, 3] +15 0 3 1 +After: [2, 0, 2, 3] + +Before: [1, 1, 3, 1] +14 1 0 2 +After: [1, 1, 1, 1] + +Before: [1, 1, 3, 0] +14 1 0 2 +After: [1, 1, 1, 0] + +Before: [1, 0, 0, 3] +5 1 0 2 +After: [1, 0, 1, 3] + +Before: [0, 1, 0, 1] +7 1 0 2 +After: [0, 1, 1, 1] + +Before: [0, 3, 3, 3] +8 3 1 0 +After: [9, 3, 3, 3] + +Before: [1, 0, 3, 3] +15 0 3 2 +After: [1, 0, 0, 3] + +Before: [1, 0, 3, 3] +5 1 0 0 +After: [1, 0, 3, 3] + +Before: [1, 3, 0, 2] +3 1 3 0 +After: [1, 3, 0, 2] + +Before: [0, 1, 1, 1] +7 1 0 3 +After: [0, 1, 1, 1] + +Before: [0, 0, 3, 2] +11 0 0 0 +After: [0, 0, 3, 2] + +Before: [1, 1, 3, 3] +14 1 0 2 +After: [1, 1, 1, 3] + +Before: [1, 1, 1, 2] +12 3 1 2 +After: [1, 1, 3, 2] + +Before: [2, 3, 1, 2] +3 1 3 0 +After: [1, 3, 1, 2] + +Before: [1, 0, 0, 2] +5 1 0 2 +After: [1, 0, 1, 2] + +Before: [0, 3, 2, 3] +0 1 2 1 +After: [0, 6, 2, 3] + +Before: [2, 3, 0, 2] +3 1 3 1 +After: [2, 1, 0, 2] + +Before: [0, 0, 0, 1] +13 0 1 0 +After: [1, 0, 0, 1] + +Before: [2, 3, 1, 2] +4 1 0 3 +After: [2, 3, 1, 1] + +Before: [2, 3, 2, 2] +3 1 3 3 +After: [2, 3, 2, 1] + +Before: [3, 2, 3, 0] +2 1 0 0 +After: [1, 2, 3, 0] + +Before: [2, 3, 2, 0] +6 2 2 3 +After: [2, 3, 2, 4] + +Before: [2, 1, 1, 0] +1 3 0 2 +After: [2, 1, 2, 0] + +Before: [2, 2, 3, 3] +9 3 2 2 +After: [2, 2, 6, 3] + +Before: [1, 0, 0, 2] +5 1 0 1 +After: [1, 1, 0, 2] + +Before: [1, 1, 0, 2] +10 1 3 3 +After: [1, 1, 0, 3] + +Before: [0, 1, 3, 2] +7 1 0 2 +After: [0, 1, 1, 2] + +Before: [2, 1, 0, 2] +12 3 1 3 +After: [2, 1, 0, 3] + +Before: [1, 3, 2, 3] +15 0 3 0 +After: [0, 3, 2, 3] + +Before: [0, 2, 3, 3] +0 2 3 0 +After: [9, 2, 3, 3] + +Before: [2, 1, 2, 1] +6 0 1 2 +After: [2, 1, 3, 1] + +Before: [1, 0, 3, 2] +5 1 0 3 +After: [1, 0, 3, 1] + +Before: [1, 2, 2, 3] +15 0 3 0 +After: [0, 2, 2, 3] + +Before: [2, 2, 2, 3] +6 2 2 0 +After: [4, 2, 2, 3] + +Before: [0, 1, 3, 3] +8 2 2 2 +After: [0, 1, 9, 3] + +Before: [2, 0, 3, 1] +12 3 2 0 +After: [3, 0, 3, 1] + +Before: [0, 3, 2, 0] +4 1 2 2 +After: [0, 3, 1, 0] + +Before: [2, 3, 3, 3] +4 1 0 3 +After: [2, 3, 3, 1] + +Before: [2, 1, 3, 2] +8 1 0 0 +After: [2, 1, 3, 2] + +Before: [3, 2, 1, 1] +2 1 0 3 +After: [3, 2, 1, 1] + +Before: [0, 1, 1, 0] +7 1 0 2 +After: [0, 1, 1, 0] + +Before: [2, 0, 2, 3] +6 1 3 1 +After: [2, 3, 2, 3] + +Before: [1, 0, 1, 3] +5 1 0 0 +After: [1, 0, 1, 3] + +Before: [1, 3, 2, 3] +4 1 2 2 +After: [1, 3, 1, 3] + +Before: [0, 1, 0, 3] +7 1 0 2 +After: [0, 1, 1, 3] + +Before: [2, 3, 0, 2] +3 1 3 3 +After: [2, 3, 0, 1] + +Before: [3, 2, 3, 1] +2 1 0 1 +After: [3, 1, 3, 1] + +Before: [1, 1, 2, 2] +14 1 0 1 +After: [1, 1, 2, 2] + +Before: [2, 3, 2, 2] +3 1 3 2 +After: [2, 3, 1, 2] + +Before: [1, 1, 2, 2] +14 1 0 3 +After: [1, 1, 2, 1] + +Before: [3, 3, 2, 2] +3 1 3 0 +After: [1, 3, 2, 2] + +Before: [1, 0, 3, 1] +5 1 0 1 +After: [1, 1, 3, 1] + +Before: [1, 0, 1, 2] +5 1 0 0 +After: [1, 0, 1, 2] + +Before: [3, 1, 0, 2] +10 1 3 1 +After: [3, 3, 0, 2] + +Before: [1, 0, 3, 2] +10 0 3 1 +After: [1, 3, 3, 2] + +Before: [3, 2, 0, 2] +2 1 0 1 +After: [3, 1, 0, 2] + +Before: [0, 3, 2, 1] +4 1 2 2 +After: [0, 3, 1, 1] + +Before: [2, 1, 2, 1] +6 2 2 3 +After: [2, 1, 2, 4] + +Before: [1, 0, 0, 1] +5 1 0 1 +After: [1, 1, 0, 1] + +Before: [0, 0, 3, 1] +13 0 1 1 +After: [0, 1, 3, 1] + +Before: [0, 0, 0, 1] +13 0 1 2 +After: [0, 0, 1, 1] + +Before: [0, 2, 2, 3] +8 3 1 2 +After: [0, 2, 6, 3] + +Before: [1, 0, 3, 1] +5 1 0 2 +After: [1, 0, 1, 1] + +Before: [3, 3, 1, 0] +8 0 0 2 +After: [3, 3, 9, 0] + +Before: [0, 0, 2, 0] +13 0 1 1 +After: [0, 1, 2, 0] + +Before: [2, 3, 1, 0] +4 1 0 1 +After: [2, 1, 1, 0] + +Before: [2, 2, 2, 1] +12 3 2 2 +After: [2, 2, 3, 1] + +Before: [0, 0, 2, 0] +13 0 1 0 +After: [1, 0, 2, 0] + +Before: [1, 2, 3, 1] +12 3 2 0 +After: [3, 2, 3, 1] + +Before: [2, 1, 1, 1] +8 3 0 3 +After: [2, 1, 1, 2] + +Before: [1, 0, 0, 0] +5 1 0 3 +After: [1, 0, 0, 1] + +Before: [1, 0, 0, 3] +15 0 3 2 +After: [1, 0, 0, 3] + +Before: [0, 1, 2, 3] +6 2 2 2 +After: [0, 1, 4, 3] + +Before: [0, 2, 3, 3] +11 0 0 1 +After: [0, 0, 3, 3] + +Before: [0, 0, 1, 3] +13 0 1 0 +After: [1, 0, 1, 3] + +Before: [0, 1, 2, 2] +7 1 0 2 +After: [0, 1, 1, 2] + +Before: [1, 2, 1, 1] +1 2 1 1 +After: [1, 3, 1, 1] + +Before: [3, 1, 2, 1] +12 3 2 1 +After: [3, 3, 2, 1] + +Before: [1, 1, 2, 3] +14 1 0 3 +After: [1, 1, 2, 1] + +Before: [0, 1, 2, 3] +7 1 0 2 +After: [0, 1, 1, 3] + +Before: [2, 3, 3, 3] +4 1 0 2 +After: [2, 3, 1, 3] + +Before: [1, 0, 2, 3] +15 0 3 1 +After: [1, 0, 2, 3] + +Before: [0, 0, 1, 1] +11 0 0 1 +After: [0, 0, 1, 1] + +Before: [1, 3, 1, 3] +0 3 3 3 +After: [1, 3, 1, 9] + +Before: [0, 0, 3, 2] +13 0 1 0 +After: [1, 0, 3, 2] + +Before: [1, 0, 2, 3] +0 2 3 0 +After: [6, 0, 2, 3] + +Before: [0, 1, 1, 3] +11 0 0 2 +After: [0, 1, 0, 3] + +Before: [0, 0, 2, 2] +13 0 1 0 +After: [1, 0, 2, 2] + +Before: [2, 3, 3, 2] +3 1 3 1 +After: [2, 1, 3, 2] + +Before: [3, 1, 1, 2] +12 3 1 2 +After: [3, 1, 3, 2] + +Before: [0, 2, 3, 3] +0 1 3 1 +After: [0, 6, 3, 3] + +Before: [3, 2, 1, 3] +2 1 0 1 +After: [3, 1, 1, 3] + +Before: [0, 1, 2, 1] +6 1 2 0 +After: [3, 1, 2, 1] + +Before: [3, 2, 1, 1] +2 1 0 1 +After: [3, 1, 1, 1] + +Before: [1, 0, 1, 0] +5 1 0 3 +After: [1, 0, 1, 1] + +Before: [3, 2, 0, 2] +9 3 1 0 +After: [4, 2, 0, 2] + +Before: [3, 0, 3, 1] +1 1 2 3 +After: [3, 0, 3, 3] + +Before: [2, 3, 2, 3] +4 1 2 2 +After: [2, 3, 1, 3] + +Before: [3, 2, 2, 3] +2 1 0 2 +After: [3, 2, 1, 3] + +Before: [0, 3, 0, 1] +1 2 1 1 +After: [0, 3, 0, 1] + +Before: [1, 2, 0, 2] +1 1 0 2 +After: [1, 2, 3, 2] + +Before: [0, 3, 2, 3] +4 1 2 2 +After: [0, 3, 1, 3] + +Before: [3, 2, 3, 1] +2 1 0 3 +After: [3, 2, 3, 1] + +Before: [3, 0, 2, 2] +1 1 0 1 +After: [3, 3, 2, 2] + +Before: [0, 2, 1, 2] +1 1 2 0 +After: [3, 2, 1, 2] + +Before: [0, 3, 2, 3] +4 1 2 1 +After: [0, 1, 2, 3] + +Before: [1, 3, 2, 1] +8 1 1 1 +After: [1, 9, 2, 1] + +Before: [2, 3, 1, 1] +4 1 0 3 +After: [2, 3, 1, 1] + +Before: [0, 3, 3, 2] +3 1 3 3 +After: [0, 3, 3, 1] + +Before: [0, 2, 1, 2] +9 3 1 1 +After: [0, 4, 1, 2] + +Before: [0, 1, 1, 1] +7 1 0 2 +After: [0, 1, 1, 1] + +Before: [0, 3, 1, 2] +3 1 3 2 +After: [0, 3, 1, 2] + +Before: [3, 2, 1, 0] +2 1 0 0 +After: [1, 2, 1, 0] + +Before: [3, 2, 3, 3] +2 1 0 3 +After: [3, 2, 3, 1] + +Before: [2, 0, 2, 1] +12 3 2 3 +After: [2, 0, 2, 3] + +Before: [1, 1, 3, 1] +12 3 2 3 +After: [1, 1, 3, 3] + +Before: [2, 0, 3, 3] +1 1 2 0 +After: [3, 0, 3, 3] + +Before: [0, 3, 3, 2] +8 3 1 2 +After: [0, 3, 6, 2] + +Before: [0, 1, 3, 1] +12 3 2 0 +After: [3, 1, 3, 1] + +Before: [0, 0, 1, 2] +13 0 1 0 +After: [1, 0, 1, 2] + +Before: [1, 2, 3, 3] +8 2 2 2 +After: [1, 2, 9, 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2 3 +12 2 0 1 +12 3 2 0 +0 1 0 2 +6 2 1 2 +11 0 2 1 +0 1 1 1 +9 1 3 3 +7 3 3 0 +12 1 1 1 +0 3 0 3 +6 3 2 3 +0 2 0 2 +6 2 0 2 +5 2 3 3 +0 3 1 3 +0 3 3 3 +9 3 0 0 +7 0 1 3 +0 0 0 0 +6 0 3 0 +12 2 1 1 +12 3 3 2 +1 1 0 1 +0 1 3 1 +0 1 2 1 +9 1 3 3 +7 3 2 1 +12 1 2 0 +12 0 2 3 +0 1 0 2 +6 2 2 2 +15 3 2 0 +0 0 1 0 +9 0 1 1 +7 1 1 2 +0 1 0 0 +6 0 1 0 +12 3 2 1 +6 0 1 1 +0 1 3 1 +0 1 1 1 +9 2 1 2 +12 2 0 0 +0 2 0 1 +6 1 3 1 +0 1 0 3 +6 3 3 3 +2 0 1 0 +0 0 1 0 +9 0 2 2 +12 3 2 0 +12 0 2 3 +12 2 3 1 +10 1 3 0 +0 0 3 0 +9 0 2 2 +7 2 3 1 +12 1 2 0 +12 2 0 3 +12 3 2 2 +0 0 2 2 +0 2 2 2 +0 2 1 2 +9 1 2 1 +7 1 3 0 \ No newline at end of file From bd1c43dbabd41c922e3181c9219416351966149d Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 21 Dec 2018 09:13:59 +0100 Subject: [PATCH 51/56] day 16: implement opcode finder --- day16.spec.js | 135 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 116 insertions(+), 19 deletions(-) diff --git a/day16.spec.js b/day16.spec.js index 375b489..82a67ab 100644 --- a/day16.spec.js +++ b/day16.spec.js @@ -6,39 +6,39 @@ const { readFileSync } = require('fs') const input = readFileSync('./day16.txt', 'utf-8') const addr = (A, B, C, reg) => { - reg[C] = reg[A] + reg[B] + reg[C] = (reg[A] || 0) + (reg[B] || 0) return reg } const addi = (A, B, C, reg) => { - reg[C] = reg[A] + B + reg[C] = (reg[A] || 0) + B return reg } const mulr = (A, B, C, reg) => { - reg[C] = reg[A] * reg[B] + reg[C] = (reg[A] || 0) * (reg[B] || 0) return reg } const muli = (A, B, C, reg) => { - reg[C] = reg[A] * B + reg[C] = (reg[A] || 0) * B return reg } const banr = (A, B, C, reg) => { - reg[C] = reg[A] & reg[B] + reg[C] = (reg[A] || 0) & (reg[B] || 0) return reg } const bani = (A, B, C, reg) => { - reg[C] = reg[A] & B + reg[C] = (reg[A] || 0) & B return reg } const borr = (A, B, C, reg) => { - reg[C] = reg[A] | reg[B] + reg[C] = (reg[A] || 0) | (reg[B] || 0) return reg } const bori = (A, B, C, reg) => { - reg[C] = reg[A] | B + reg[C] = (reg[A] || 0) | B return reg } const setr = (A, B, C, reg) => { - reg[C] = reg[A] + reg[C] = (reg[A] || 0) return reg } const seti = (A, B, C, reg) => { @@ -46,27 +46,27 @@ const seti = (A, B, C, reg) => { return reg } const gtir = (A, B, C, reg) => { - reg[C] = A > reg[B] ? 1 : 0 + reg[C] = A > (reg[B] || 0) ? 1 : 0 return reg } const gtri = (A, B, C, reg) => { - reg[C] = reg[A] > B ? 1 : 0 + reg[C] = (reg[A] || 0) > B ? 1 : 0 return reg } const gtrr = (A, B, C, reg) => { - reg[C] = reg[A] > reg[B] ? 1 : 0 + reg[C] = (reg[A] || 0) > (reg[B] || 0) ? 1 : 0 return reg } const eqir = (A, B, C, reg) => { - reg[C] = A === reg[B] ? 1 : 0 + reg[C] = A === (reg[B] || 0) ? 1 : 0 return reg } const eqri = (A, B, C, reg) => { - reg[C] = reg[A] === B ? 1 : 0 + reg[C] = (reg[A] || 0) === B ? 1 : 0 return reg } const eqrr = (A, B, C, reg) => { - reg[C] = reg[A] === reg[B] ? 1 : 0 + reg[C] = (reg[A] || 0) === (reg[B] || 0) ? 1 : 0 return reg } @@ -223,12 +223,91 @@ describe('findMatchingOpcodes', () => { }) }) +const findOpcodeNumbers = input => { + // Count how often they are matched + const opcodeMatches = input + .split('\n\n') + .filter(s => /^Before:/.test(s)) + .map(s => { + const [before, opWithInput, after] = s.split('\n') + const op = JSON.parse(`[${opWithInput.replace(/ /g, ',')}]`) + const [opNumber, ...values] = op + return [ + opNumber, + findMatchingOpcodes( + JSON.parse(before.replace(/Before: /, '')), + values, + JSON.parse(after.replace(/After: /, '')) + ) + ] + }) + const opStats = opcodeMatches + .reduce((opStats, [opNumber, matches]) => { + if (!opStats[opNumber]) { + opStats[opNumber] = {} + } + matches.forEach(match => { + if (!opStats[opNumber][match]) { + opStats[opNumber][match] = 1 + } else { + opStats[opNumber][match]++ + } + }) + return opStats + }, {}) + return flattenOpStats(opStats) +} + +// Figure out which number is which op by exclusion +const flattenOpStats = (opStats, opNumbers = {}) => { + // we are done if all are of length 0 + if (Object.keys(opStats).filter(key => Object.keys(opStats[key]).length === 0).length === Object.keys(opStats).length) { + return opNumbers + } + // Find the opStats which only have one candidate left + const onlyOneMatch = Object.keys(opStats) + .filter(key => Object.keys(opStats[key]).length === 1) + .reduce((opNumbers, opCode) => { + opNumbers[opCode] = Object.keys(opStats[opCode])[0] + return opNumbers + }, {}) + // remove the known ops from the opStats + Object.keys(opStats).forEach(key => { + Object.keys(onlyOneMatch).forEach(knownOp => { + delete opStats[key][onlyOneMatch[knownOp]] + }) + }) + return flattenOpStats(opStats, { + ...opNumbers, + ...onlyOneMatch + }) +} + +describe('findOpcodeNumbers', () => { + it('should find the ops for the numbers', () => { + expect(findOpcodeNumbers(input.split('\n\n\n')[0])).toEqual({ + '0': 'muli', + '1': 'borr', + '2': 'gtri', + '3': 'eqri', + '4': 'gtrr', + '5': 'eqir', + '6': 'addi', + '7': 'setr', + '8': 'mulr', + '9': 'addr', + '10': 'bori', + '11': 'bani', + '12': 'seti', + '13': 'eqrr', + '14': 'banr', + '15': 'gtir' + }) + }) +}) + describe('Chronal Classification', () => { it('should solve the puzzle', () => { - expect(input - .split('\n\n') - .filter(s => /^Before:/.test(s)) - ).toHaveLength(807) expect(input .split('\n\n') .filter(s => /^Before:/.test(s)) @@ -243,4 +322,22 @@ describe('Chronal Classification', () => { ).length >= 3 })).toHaveLength(563) }) + it('should match the opcodes', () => { + // FIXME: Implement exclusion + + const [samples, program] = input.split('\n\n\n') + + const numberedOps = findOpcodeNumbers(samples) + + const register = [0] + program + .split('\n') + .filter(s => s.length) + .forEach(opWithInput => { + const op = JSON.parse(`[${opWithInput.replace(/ /g, ',')}]`) + const [opNumber, ...values] = op + opcodes[numberedOps[opNumber]](...values, register) + }) + expect(register[0]).toEqual(629) + }) }) From 1b809d87e3167a119c66b445cad92abd919e289f Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Fri, 21 Dec 2018 09:21:29 +0100 Subject: [PATCH 52/56] day 16: clean up --- day16.js | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++ day16.spec.js | 170 ++++++------------------------------------------- 2 files changed, 193 insertions(+), 150 deletions(-) create mode 100644 day16.js diff --git a/day16.js b/day16.js new file mode 100644 index 0000000..70e2ecb --- /dev/null +++ b/day16.js @@ -0,0 +1,173 @@ +'use strict' + +const addr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) + (reg[B] || 0) + return reg +} +const addi = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) + B + return reg +} +const mulr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) * (reg[B] || 0) + return reg +} +const muli = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) * B + return reg +} +const banr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) & (reg[B] || 0) + return reg +} +const bani = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) & B + return reg +} +const borr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) | (reg[B] || 0) + return reg +} +const bori = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) | B + return reg +} +const setr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) + return reg +} +const seti = (A, B, C, reg) => { + reg[C] = A + return reg +} +const gtir = (A, B, C, reg) => { + reg[C] = A > (reg[B] || 0) ? 1 : 0 + return reg +} +const gtri = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) > B ? 1 : 0 + return reg +} +const gtrr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) > (reg[B] || 0) ? 1 : 0 + return reg +} +const eqir = (A, B, C, reg) => { + reg[C] = A === (reg[B] || 0) ? 1 : 0 + return reg +} +const eqri = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) === B ? 1 : 0 + return reg +} +const eqrr = (A, B, C, reg) => { + reg[C] = (reg[A] || 0) === (reg[B] || 0) ? 1 : 0 + return reg +} + +const opcodes = { + 'addr': addr, + 'addi': addi, + 'mulr': mulr, + 'muli': muli, + 'banr': banr, + 'bani': bani, + 'borr': borr, + 'bori': bori, + 'setr': setr, + 'seti': seti, + 'gtir': gtir, + 'gtri': gtri, + 'gtrr': gtrr, + 'eqir': eqir, + 'eqri': eqri, + 'eqrr': eqrr +} + +const equals = (a, b) => a.length === b.length && a.reduce((equal, v, k) => equal ? v === b[k] : equal, true) + +const findMatchingOpcodes = (before, [A, B, C], after) => Object.keys(opcodes).filter(opcode => equals(opcodes[opcode](A, B, C, [...before]), after)).sort((a, b) => a > b ? 1 : -1) + +const findOpcodeNumbers = input => { + // Count how often they are matched + const opcodeMatches = input + .split('\n\n') + .filter(s => /^Before:/.test(s)) + .map(s => { + const [before, opWithInput, after] = s.split('\n') + const op = JSON.parse(`[${opWithInput.replace(/ /g, ',')}]`) + const [opNumber, ...values] = op + return [ + opNumber, + findMatchingOpcodes( + JSON.parse(before.replace(/Before: /, '')), + values, + JSON.parse(after.replace(/After: /, '')) + ) + ] + }) + const opStats = opcodeMatches + .reduce((opStats, [opNumber, matches]) => { + if (!opStats[opNumber]) { + opStats[opNumber] = {} + } + matches.forEach(match => { + if (!opStats[opNumber][match]) { + opStats[opNumber][match] = 1 + } else { + opStats[opNumber][match]++ + } + }) + return opStats + }, {}) + return flattenOpStats(opStats) +} + +// Figure out which number is which op by exclusion +const flattenOpStats = (opStats, opNumbers = {}) => { + // we are done if all are of length 0 + if (Object.keys(opStats).filter(key => Object.keys(opStats[key]).length === 0).length === Object.keys(opStats).length) { + return opNumbers + } + // Find the opStats which only have one candidate left + const onlyOneMatch = Object.keys(opStats) + .filter(key => Object.keys(opStats[key]).length === 1) + .reduce((opNumbers, opCode) => { + opNumbers[opCode] = Object.keys(opStats[opCode])[0] + return opNumbers + }, {}) + // remove the known ops from the opStats + Object.keys(opStats).forEach(key => { + Object.keys(onlyOneMatch).forEach(knownOp => { + delete opStats[key][onlyOneMatch[knownOp]] + }) + }) + return flattenOpStats(opStats, { + ...opNumbers, + ...onlyOneMatch + }) +} + +module.exports = { + addr, + addi, + mulr, + muli, + banr, + bani, + borr, + bori, + setr, + seti, + gtir, + gtri, + gtrr, + eqir, + eqri, + eqrr, + opcodes, + findMatchingOpcodes, + flattenOpStats, + findOpcodeNumbers, + equals +} diff --git a/day16.spec.js b/day16.spec.js index 82a67ab..30245dc 100644 --- a/day16.spec.js +++ b/day16.spec.js @@ -2,74 +2,29 @@ /* global describe, it, test, expect */ +const { addr, + addi, + mulr, + muli, + banr, + bani, + borr, + bori, + setr, + seti, + gtir, + gtri, + gtrr, + eqir, + eqri, + eqrr, + opcodes, + findMatchingOpcodes, + findOpcodeNumbers, + equals } = require('./day16') const { readFileSync } = require('fs') const input = readFileSync('./day16.txt', 'utf-8') -const addr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) + (reg[B] || 0) - return reg -} -const addi = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) + B - return reg -} -const mulr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) * (reg[B] || 0) - return reg -} -const muli = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) * B - return reg -} -const banr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) & (reg[B] || 0) - return reg -} -const bani = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) & B - return reg -} -const borr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) | (reg[B] || 0) - return reg -} -const bori = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) | B - return reg -} -const setr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) - return reg -} -const seti = (A, B, C, reg) => { - reg[C] = A - return reg -} -const gtir = (A, B, C, reg) => { - reg[C] = A > (reg[B] || 0) ? 1 : 0 - return reg -} -const gtri = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) > B ? 1 : 0 - return reg -} -const gtrr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) > (reg[B] || 0) ? 1 : 0 - return reg -} -const eqir = (A, B, C, reg) => { - reg[C] = A === (reg[B] || 0) ? 1 : 0 - return reg -} -const eqri = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) === B ? 1 : 0 - return reg -} -const eqrr = (A, B, C, reg) => { - reg[C] = (reg[A] || 0) === (reg[B] || 0) ? 1 : 0 - return reg -} - describe('opcodes', () => { describe('Addition', () => { describe('addr (add register)', () => { @@ -177,29 +132,6 @@ describe('opcodes', () => { }) }) -const opcodes = { - 'addr': addr, - 'addi': addi, - 'mulr': mulr, - 'muli': muli, - 'banr': banr, - 'bani': bani, - 'borr': borr, - 'bori': bori, - 'setr': setr, - 'seti': seti, - 'gtir': gtir, - 'gtri': gtri, - 'gtrr': gtrr, - 'eqir': eqir, - 'eqri': eqri, - 'eqrr': eqrr -} - -const equals = (a, b) => a.length === b.length && a.reduce((equal, v, k) => equal ? v === b[k] : equal, true) - -const findMatchingOpcodes = (before, [A, B, C], after) => Object.keys(opcodes).filter(opcode => equals(opcodes[opcode](A, B, C, [...before]), after)).sort((a, b) => a > b ? 1 : -1) - describe('equals', () => { it('should compare registers', () => { expect(equals([], [])).toEqual(true) @@ -223,66 +155,6 @@ describe('findMatchingOpcodes', () => { }) }) -const findOpcodeNumbers = input => { - // Count how often they are matched - const opcodeMatches = input - .split('\n\n') - .filter(s => /^Before:/.test(s)) - .map(s => { - const [before, opWithInput, after] = s.split('\n') - const op = JSON.parse(`[${opWithInput.replace(/ /g, ',')}]`) - const [opNumber, ...values] = op - return [ - opNumber, - findMatchingOpcodes( - JSON.parse(before.replace(/Before: /, '')), - values, - JSON.parse(after.replace(/After: /, '')) - ) - ] - }) - const opStats = opcodeMatches - .reduce((opStats, [opNumber, matches]) => { - if (!opStats[opNumber]) { - opStats[opNumber] = {} - } - matches.forEach(match => { - if (!opStats[opNumber][match]) { - opStats[opNumber][match] = 1 - } else { - opStats[opNumber][match]++ - } - }) - return opStats - }, {}) - return flattenOpStats(opStats) -} - -// Figure out which number is which op by exclusion -const flattenOpStats = (opStats, opNumbers = {}) => { - // we are done if all are of length 0 - if (Object.keys(opStats).filter(key => Object.keys(opStats[key]).length === 0).length === Object.keys(opStats).length) { - return opNumbers - } - // Find the opStats which only have one candidate left - const onlyOneMatch = Object.keys(opStats) - .filter(key => Object.keys(opStats[key]).length === 1) - .reduce((opNumbers, opCode) => { - opNumbers[opCode] = Object.keys(opStats[opCode])[0] - return opNumbers - }, {}) - // remove the known ops from the opStats - Object.keys(opStats).forEach(key => { - Object.keys(onlyOneMatch).forEach(knownOp => { - delete opStats[key][onlyOneMatch[knownOp]] - }) - }) - return flattenOpStats(opStats, { - ...opNumbers, - ...onlyOneMatch - }) -} - describe('findOpcodeNumbers', () => { it('should find the ops for the numbers', () => { expect(findOpcodeNumbers(input.split('\n\n\n')[0])).toEqual({ @@ -323,8 +195,6 @@ describe('Chronal Classification', () => { })).toHaveLength(563) }) it('should match the opcodes', () => { - // FIXME: Implement exclusion - const [samples, program] = input.split('\n\n\n') const numberedOps = findOpcodeNumbers(samples) From be6e7b408e8c85e36e781343966735000a669141 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sat, 22 Dec 2018 13:28:57 +0100 Subject: [PATCH 53/56] day 22 part 1 --- day22.spec.js | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 day22.spec.js diff --git a/day22.spec.js b/day22.spec.js new file mode 100644 index 0000000..5f2c968 --- /dev/null +++ b/day22.spec.js @@ -0,0 +1,109 @@ +'use strict' + +/* global describe, it, test, expect */ + +/** + * A region's erosion level is its geologic index plus the cave system's depth, all modulo 20183. + */ +const erosionLevel = (depth, geoIndex) => { + return (geoIndex + depth) % 20183 +} + +/** + * If the erosion level modulo 3 is 0, the region's type is rocky. + * If the erosion level modulo 3 is 1, the region's type is wet. + * If the erosion level modulo 3 is 2, the region's type is narrow. + */ +const type = erosionLevel => erosionLevel % 3 + +/** + * The geologic index can be determined using the first rule that applies + */ +const geoIndex = (depth, [x, y], [targetX, targetY], map) => { + // The region at 0,0 (the mouth of the cave) has a geologic index of 0. + if (x === 0 && y === 0) return 0 + // The region at the coordinates of the target has a geologic index of 0. + if (x === targetX && y === targetY) return 0 + // If the region's Y coordinate is 0, the geologic index is its X coordinate times 16807. + if (y === 0) return x * 16807 + // If the region's X coordinate is 0, the geologic index is its Y coordinate times 48271. + if (x === 0) return y * 48271 + // Otherwise, the region's geologic index is the result of multiplying the erosion levels of the regions at X-1,Y and X,Y-1. + const x1y = map[y][x - 1][0] + const xy1 = map[y - 1][x][0] + return erosionLevel(depth, x1y) * erosionLevel(depth, xy1) +} + +const scan = (depth, [x, y], [targetX, targetY], map) => { + const g = geoIndex(depth, [x, y], [targetX, targetY], map) + const e = erosionLevel(depth, g) + return [ + g, + e, + type(e) + ] +} + +const scanCave = (depth, [targetX, targetY], distance = 0, map) => { + // we are done if distance is > target + if (distance > targetY && distance > targetY) return map + if (!map) { + map = [] + for (let y = 0; y <= targetY; y++) { + map[y] = [] + } + } + // Scan all x coordinates of the current distance + for (let x = 0; x <= targetX; x++) { + map[distance][x] = scan(depth, [x, distance], [targetX, targetY], map) + } + // Scan all y coordinates of the current distance + for (let y = 0; y <= targetY; y++) { + map[y][distance] = scan(depth, [distance, y], [targetX, targetY], map) + } + // console.log(distance, map) + // Go in one step further + return scanCave(depth, [targetX, targetY], distance + 1, map) +} + +/** + * For the the rectangle that has a top-left corner of region 0,0 and a bottom-right corner of the region containing the target, add up the risk level of each individual region: 0 for rocky regions, 1 for wet regions, and 2 for narrow regions. + */ +const totalRisk = (map, [targetX, targetY]) => { + let risk = 0 + for (let y = 0; y <= targetY; y++) { + for (let x = 0; x <= targetX; x++) { + const [, e] = map[y][x] + risk += type(e) + } + } + return risk +} + +describe('Mode Maze', () => { + describe('should solve the example', () => { + const target = [10, 10] + it('should scan the cave', () => { + const map = scanCave(510, target) + // At 0,0, the geologic index is 0. The erosion level is (0 + 510) % 20183 = 510. The type is 510 % 3 = 0, rocky. + expect(map[0][0]).toEqual([0, 510, 0]) + // At 1,0, because the Y coordinate is 0, the geologic index is 1 * 16807 = 16807. The erosion level is (16807 + 510) % 20183 = 17317. The type is 17317 % 3 = 1, wet. + expect(map[0][1]).toEqual([16807, 17317, 1]) + // At 0,1, because the X coordinate is 0, the geologic index is 1 * 48271 = 48271. The erosion level is (48271 + 510) % 20183 = 8415. The type is 8415 % 3 = 0, rocky. + expect(map[1][0]).toEqual([48271, 8415, 0]) + // At 1,1, neither coordinate is 0 and it is not the coordinate of the target, so the geologic index is the erosion level of 0,1 (8415) times the erosion level of 1,0 (17317), 8415 * 17317 = 145722555. The erosion level is (145722555 + 510) % 20183 = 1805. The type is 1805 % 3 = 2, narrow. + expect(map[1][1]).toEqual([145722555, 1805, 2]) + // At 10,10, because they are the target's coordinates, the geologic index is 0. The erosion level is (0 + 510) % 20183 = 510. The type is 510 % 3 = 0, rocky. + expect(map[10][10]).toEqual([0, 510, 0]) + }) + it('should determine the risk', () => { + // In the cave system above, because the mouth is at 0,0 and the target is at 10,10, adding up the risk level of all regions with an X coordinate from 0 to 10 and a Y coordinate from 0 to 10, this total is 114. + expect(totalRisk(scanCave(510, target), target)).toEqual(114) + }) + }) + + it('should solve the puzzle', () => { + const target = [10, 715] + expect(totalRisk(scanCave(3339, target), target)).toEqual(7915) + }) +}) From d7f907fdc5a59f0259a6ae1dbeb288fff5dc9e0e Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 23 Dec 2018 16:21:30 +0100 Subject: [PATCH 54/56] day 2, part 2 attempts. --- day22.part2.2.js | 123 +++++++++++++++++++++++++++++++++++++++++++++++ day22.part2.js | 57 ++++++++++++++++++++++ 2 files changed, 180 insertions(+) create mode 100644 day22.part2.2.js create mode 100644 day22.part2.js diff --git a/day22.part2.2.js b/day22.part2.2.js new file mode 100644 index 0000000..88da9b8 --- /dev/null +++ b/day22.part2.2.js @@ -0,0 +1,123 @@ +'use strict' + +const distance = ([x1, y1], [x2, y2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + +const go = (map, targetX, targetY, x, y, steps = []) => { + // The regions with negative X or Y are solid rock and cannot be traversed. + if (x < 0) return false + if (y < 0) return false + // We have reached the target + if (x === targetX && y === targetY) { + return steps + } + // Have we been there? + const [prevX, prevY] = steps[steps.length - 1] + if (x === prevX && y === prevY) return false + // Are we closer to the target? + const preDist = distance([prevX, prevY], [targetX, targetY]) + const dist = distance([x, y], [targetX, targetY]) + if (dist > preDist) return false + // Go a step further + const nextSteps = [] + // down + if (map[y + 1] && map[y + 1] && map[y + 1][x].reachable) { + nextSteps.push([x, y + 1]) + } + // up + if (map[y - 1] && map[y - 1][x] && map[y - 1][x].reachable) { + nextSteps.push([x, y - 1]) + } + // left + if (map[y] && map[y][x - 1] && map[y][x - 1].reachable) { + nextSteps.push([x - 1, y]) + } + // up + if (map[y] && map[y][x + 1] && map[y][x + 1].reachable) { + nextSteps.push([x + 1, y]) + } + /* + nextSteps.sort((s1, s2) => { + const s1len = s1 ? s1.length : Number.MAX_SAFE_INTEGER + const s2len = s2 ? s2.length : Number.MAX_SAFE_INTEGER + return s1len - s2len + }) + */ + // This is the best route + return nextSteps +} + +const findBestRoute = (targetX, targetY) => { + const map = [] + const maxRadius = distance([0, 0], [targetX, targetY]) + // Find connected tiles + for (let radius = 1; radius <= maxRadius; radius++) { + for (let y = targetY - radius; y < targetY + radius; y++) { + if (y < 0) continue + if (!map[y]) { + map[y] = [] + } + for (let x = targetX - radius; x < targetX + radius; x++) { + if (x < 0) continue + if (map[y][x] && map[y][x].reachable) continue // Already measured + // Can the target be reached from this coordinate? + if ( + (x === targetX && y + 1 === targetY) ||// down + (x === targetX && y - 1 === targetY) ||// up + (x - 1 === targetX && y === targetY) ||// left + (x + 1 === targetX && y === targetY) // right + ) { + map[y][x] = { + reachable: true, + radius, + next: [targetX, targetY] + } + // Can a step towards the target be reached + } else if (map[y + 1] && map[y + 1][x] && map[y + 1][x].reachable) { + // down + map[y][x] = { + reachable: true, + radius, + next: [x, y + 1] + } + } else if (map[y - 1] && map[y - 1][x] && map[y - 1][x].reachable) { + // up + map[y][x] = { + reachable: true, + radius, + next: [x, y - 1] + } + } else if (map[y] && map[y][x + 1] && map[y][x + 1].reachable) { + // right + map[y][x] = { + reachable: true, + radius, + next: [x + 1, y] + } + } else if (map[y] && map[y][x - 1] && map[y][x - 1].reachable) { + // left + map[y][x] = { + reachable: true, + radius, + next: [x - 1, y] + } + } else { + map[y][x] = { + reachable: false + } + } + } + } + } + map[0][0] = 'E' + map[targetY][targetX] = 'T' + + const routes = [ + go(map, targetX, targetY, 1, 0, [[0, 0]]), + go(map, targetX, targetY, 0, 1, [[0, 0]]) + ] + console.log(routes) + + console.log(map.reduce((map, row) => map + row.map(c => c.reachable ? String.fromCharCode(65 + c.radius).toLowerCase() : '.').join('') + '\n', '')) +} + +findBestRoute(10, 10) diff --git a/day22.part2.js b/day22.part2.js new file mode 100644 index 0000000..7b9ed31 --- /dev/null +++ b/day22.part2.js @@ -0,0 +1,57 @@ +'use strict' + +const distance = ([x1, y1], [x2, y2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + +const go = (targetX, targetY, x, y, steps = []) => { + // The regions with negative X or Y are solid rock and cannot be traversed. + if (x < 0) return false + if (y < 0) return false + // We have reached the target + if (x === targetX && y === targetY) { + return steps + } + // Have we been there? + const [prevX, prevY] = steps[steps.length - 1] + if (x === prevX && y === prevY) return false + // Are we closer to the target? + const preDist = distance([prevX, prevY], [targetX, targetY]) + const dist = distance([x, y], [targetX, targetY]) + if (dist > preDist) return false + // Go a step further + const nextSteps = [ + go(targetX, targetY, x, y - 1, [...steps, [x, y]]), + go(targetX, targetY, x, y + 1, [...steps, [x, y]]), + go(targetX, targetY, x - 1, y, [...steps, [x, y]]), + go(targetX, targetY, x + 1, y, [...steps, [x, y]]) + ] + nextSteps.sort((s1, s2) => { + const s1len = s1 ? s1.length : Number.MAX_SAFE_INTEGER + const s2len = s2 ? s2.length : Number.MAX_SAFE_INTEGER + return s1len - s2len + }) + // This is the best route + return nextSteps[0] +} + +const findBestRoute = (targetX, targetY) => { + const routes = [ + go(targetX, targetY, 1, 0, [[0, 0]]), + // go(targetX, targetY, 0, 1, [[0, 0]]) + ] + const map = [] + for (let y = 0; y <= targetY; y++) { + map[y] = [] + for (let x = 0; x <= targetX; x++) { + map[y][x] = '.' + } + } + map[targetY][targetX] = 'T' + for (const i in routes) { + for (const j in routes[i]) { + const [x, y] = routes[i][j] + map[y][x] = String.fromCharCode(65 + parseInt(i, 10)).toLowerCase() + } + } + console.log(map.reduce((map, row) => map + row.join('') + '\n', '')) +} +findBestRoute(10, 5) \ No newline at end of file From 7f0c1b5c314d0586520b8ca8dc8b7fdb60eaa112 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 23 Dec 2018 17:31:31 +0100 Subject: [PATCH 55/56] day 23, part 1 --- day23.spec.js | 61 +++ day23.txt | 1000 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1061 insertions(+) create mode 100644 day23.spec.js create mode 100644 day23.txt diff --git a/day23.spec.js b/day23.spec.js new file mode 100644 index 0000000..40eee36 --- /dev/null +++ b/day23.spec.js @@ -0,0 +1,61 @@ +'use strict' + +/* global describe, it, expect */ + +const { readFileSync } = require('fs') +const input = readFileSync('./day23.txt', 'utf-8') + +const distance = ([x1, y1, z1], [x2, y2, z2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + Math.abs(z1 - z2) + +const examples = '' + + 'pos=<1,0,0>, r=1\n' + + 'pos=<4,0,0>, r=3\n' + + 'pos=<0,2,0>, r=1\n' + + 'pos=<0,0,0>, r=4\n' + + 'pos=<0,5,0>, r=3\n' + + 'pos=<0,0,3>, r=1\n' + + 'pos=<1,1,1>, r=1\n' + + 'pos=<1,1,2>, r=1\n' + + 'pos=<1,3,1>, r=1' + +const numberOfNanobotsInRange = input => { + const bots = input + .split('\n') + .map(b => b.match(/pos=<(?-?[0-9]+),(?-?[0-9]+),(?-?[0-9]+)>, r=(?-?[0-9]+)/).groups) + .map(({ x, y, z, radius }) => [ + parseInt(x, 10), + parseInt(y, 10), + parseInt(z, 10), + parseInt(radius, 10) + ]) + const network = bots + .map(bot => ({ + bot, + peers: bots.filter(peer => distance(bot, peer) <= bot[3]) + })) + network.sort((b1, b2) => b2.bot[3] - b1.bot[3]) + return network[0].peers.length +} + +describe('distance', () => { + it('should calculate the distance', () => { + expect(distance([0, 0, 0], [0, 0, 0])).toEqual(0) + expect(distance([1, 0, 0], [0, 0, 0])).toEqual(1) + expect(distance([4, 0, 0], [0, 0, 0])).toEqual(4) + expect(distance([0, 2, 0], [0, 0, 0])).toEqual(2) + expect(distance([0, 5, 0], [0, 0, 0])).toEqual(5) + expect(distance([0, 0, 3], [0, 0, 0])).toEqual(3) + expect(distance([1, 1, 1], [0, 0, 0])).toEqual(3) + expect(distance([1, 1, 2], [0, 0, 0])).toEqual(4) + expect(distance([1, 3, 1], [0, 0, 0])).toEqual(5) + }) +}) + +describe('Experimental Emergency Teleportation', () => { + it('should solve the example', () => { + expect(numberOfNanobotsInRange(examples)).toEqual(7) + }) + it('should solve the puzzle', () => { + expect(numberOfNanobotsInRange(input)).toEqual(584) + }) +}) diff --git a/day23.txt b/day23.txt new file mode 100644 index 0000000..bd6a896 --- /dev/null +++ b/day23.txt @@ -0,0 +1,1000 @@ +pos=<29738062,-8402937,74541440>, r=74405151 +pos=<-22960738,-5053682,36302193>, r=85515204 +pos=<-10508034,10971624,20246844>, r=50774364 +pos=<-4670501,29145193,64930109>, r=89879649 +pos=<-39071611,16592767,46970276>, r=93768879 +pos=<63050011,17169307,53101295>, r=61836378 +pos=<19230077,48430355,4672540>, r=65947720 +pos=<-28814436,-9030124,28212095>, r=87255169 +pos=<23863375,-41227796,41269360>, r=79832399 +pos=<-17589524,8661296,42519945>, r=72646735 +pos=<-25137762,9642021,26408978>, r=63103361 +pos=<-25399043,28389619,17984881>, r=77223780 +pos=<68228906,65303974,28395208>, r=90443456 +pos=<90169844,4424805,34913017>, r=79238659 +pos=<9154088,-8453856,65807012>, r=86305338 +pos=<2329951,6446486,38208102>, r=50630197 +pos=<26447027,-12239963,65978540>, r=72970028 +pos=<1731083,50987804,34179523>, r=74570280 +pos=<15475555,1299035,64383585>, r=68807523 +pos=<72467275,-38193636,28217286>, r=97458668 +pos=<11547993,49229584,30014909>, r=58830626 +pos=<12690783,42556598,57486576>, r=78486255 +pos=<18295466,-26258728,-17715949>, r=97163853 +pos=<18377338,3237343,-11252955>, r=61122916 +pos=<29480109,-8201143,56214339>, r=56134004 +pos=<14573827,7004789,27151064>, r=75204853 +pos=<-39683380,13706559,28855545>, r=76030884 +pos=<20396833,-4291481,46210787>, r=51303984 +pos=<22565091,-15501210,-33055831>, r=97476784 +pos=<87392912,11737803,27591673>, r=61826925 +pos=<-805974,-7415265,-450980>, r=80156930 +pos=<26734631,2275520,62163392>, r=54352016 +pos=<2699274,20756499,5148343>, r=54328982 +pos=<16811314,-14784346,35103410>, r=54275208 +pos=<13719787,10794729,65498854>, r=62182932 +pos=<2417230,1633854,11555196>, r=55878778 +pos=<50173570,-25324563,28210220>, r=62288387 +pos=<-51561564,6391935,30253860>, r=96622430 +pos=<18708909,75379064,42171935>, r=89975948 +pos=<1983415,40166060,24076296>, r=55526439 +pos=<29774268,-68247182,16991750>, r=92965985 +pos=<18076069,5344557,86480401>, r=84258339 +pos=<23905694,42679905,40803402>, r=50711453 +pos=<11142056,-38117194,43487248>, r=91661122 +pos=<-14329238,19564517,22858400>, r=52455354 +pos=<-55753408,11439780,24089877>, r=91708393 +pos=<35680905,-31318922,42477969>, r=68058180 +pos=<-10531822,12577135,18355513>, r=51083901 +pos=<61144628,-4546943,46141010>, r=70412866 +pos=<-2442343,4432599,-17622945>, r=87117444 +pos=<-17729220,7568398,32960127>, r=64319620 +pos=<10825250,20077037,62213402>, r=62599185 +pos=<-147409014,364249,41787306>, r=64128597 +pos=<-35605461,9311740,41839561>, r=89332222 +pos=<-16541195,-27560607,27683813>, r=92984185 +pos=<-27525150,11862733,26301729>, r=63162729 +pos=<-37337302,-1497889,22830294>, r=87489561 +pos=<40481835,39417387,50477726>, r=58892628 +pos=<-35279376,17080999,33312974>, r=76807232 +pos=<16594886,12482744,86267921>, r=78389060 +pos=<-40020190,12239800,30914121>, r=79893025 +pos=<-14120177,11124415,48852951>, r=73047320 +pos=<-15284633,6918771,30325851>, r=59890309 +pos=<-21599829,1734002,3894955>, r=87455518 +pos=<1330070,-23938241,32185280>, r=75992092 +pos=<-4351677,7394630,32114752>, r=50270837 +pos=<-48948305,12772277,23219556>, r=84441267 +pos=<-17529899,10084675,26668578>, r=55312331 +pos=<-57634718,11954268,29374838>, r=96253806 +pos=<4999280,34843408,75413100>, r=96391092 +pos=<-51055072,11003961,28976438>, r=90226498 +pos=<113769434,10999405,31797500>, r=93147570 +pos=<13501584,55602099,53439307>, r=86673660 +pos=<21122691,60171000,48892679>, r=79074882 +pos=<5861788,-30653702,52383281>, r=98374429 +pos=<-22148183,7299778,63049248>, r=99096169 +pos=<-26352741,6930082,39051078>, r=79672398 +pos=<27307805,-40017802,29112851>, r=63021438 +pos=<21775720,12590037,35819771>, r=69003117 +pos=<11014008,12593872,26778251>, r=83549109 +pos=<19311117,-34402698,29024260>, r=65314495 +pos=<14606848,10756633,34096555>, r=64366619 +pos=<85490457,30409182,39476390>, r=83891581 +pos=<-15405720,-538879,55081312>, r=92224515 +pos=<27144763,18476128,79463369>, r=61928638 +pos=<102219402,4591356,39355607>, r=95563714 +pos=<-17251436,3087436,26449470>, r=61812022 +pos=<52209584,5542723,65216781>, r=70463678 +pos=<11945717,41728522,66387584>, r=87304422 +pos=<53781589,50728145,30285764>, r=63310866 +pos=<1312240,-7556242,11543183>, r=66185474 +pos=<28433066,11277518,39104201>, r=61047112 +pos=<21260131,-2094427,-8570766>, r=60889821 +pos=<-8193391,-31433830,16352241>, r=94759851 +pos=<-32647082,-6554875,29761875>, r=90162653 +pos=<29553795,-33432768,34390155>, r=59467711 +pos=<110523478,8321556,37698575>, r=98480570 +pos=<-436105,8644584,-10130421>, r=73406605 +pos=<1432694,-20588681,5404640>, r=85236017 +pos=<-7128925,36977902,36092362>, r=71333222 +pos=<94986527,-2724608,19744843>, r=86832489 +pos=<-12372079,44673872,35457331>, r=83637479 +pos=<39803231,31214001,59295319>, r=58828080 +pos=<6488327,-20402262,37490575>, r=72603158 +pos=<4700434,17841622,60209731>, r=64484997 +pos=<14016889,34162300,76678159>, r=87957409 +pos=<-7833523,20763961,59014144>, r=78745505 +pos=<10361207,-18568271,-6689388>, r=86381100 +pos=<-58289899,18999118,20600273>, r=98108760 +pos=<18551544,47743868,55374327>, r=75700534 +pos=<11822529,20572237,-4870315>, r=55040112 +pos=<-30688941,-7706089,35473524>, r=95067147 +pos=<2273179,-25775672,28165208>, r=72866284 +pos=<-31368181,6956723,33216378>, r=78827244 +pos=<42473027,1506734,27386337>, r=84626591 +pos=<-51355852,12935953,35433781>, r=95052274 +pos=<23508862,-1264387,88275355>, r=87229410 +pos=<36994270,-39518956,48490087>, r=83583449 +pos=<4217797,12624564,60492553>, r=64848712 +pos=<-3716684,7684048,69483645>, r=86714901 +pos=<27239747,-25373166,41966832>, r=61298912 +pos=<-17352083,12777092,39100147>, r=64873652 +pos=<22300993,9569346,67714797>, r=57043248 +pos=<78858676,-30042183,20382686>, r=97384392 +pos=<-15321696,11887578,29734593>, r=54367574 +pos=<5871869,1964407,38748405>, r=52110768 +pos=<22240789,11907266,98282639>, r=85333100 +pos=<-26922802,2647049,31999216>, r=77473511 +pos=<-40268461,24674227,27883958>, r=83960732 +pos=<41497437,3980039,28517414>, r=73616538 +pos=<-28087512,8787212,30660344>, r=71159224 +pos=<64193123,-42218423,28601978>, r=93593766 +pos=<70445043,11126715,71042260>, r=88941053 +pos=<3419430,-25035610,19627462>, r=73473593 +pos=<-21664220,11795529,28308497>, r=59375791 +pos=<9560614,-9405816,29770204>, r=50813942 +pos=<23249213,10094926,30179453>, r=59970334 +pos=<10502023,-7193598,-12449074>, r=80625530 +pos=<12539743,43944032,67234690>, r=89773592 +pos=<29526601,-18801893,63747727>, r=74221537 +pos=<42334456,-18689860,54077727>, r=73682080 +pos=<-47975327,6802988,36544806>, r=98915705 +pos=<16920535,2895819,35257351>, r=73559198 +pos=<19553684,-7620956,77238455>, r=86504242 +pos=<-7660908,-28243641,31932740>, r=89035946 +pos=<-10964466,11949610,43238514>, r=63451964 +pos=<78662802,-2521400,33245697>, r=73010324 +pos=<-33430122,4382598,47742002>, r=97988191 +pos=<-8460341,7313198,40039718>, r=62385386 +pos=<-20599239,12844461,45862081>, r=74815379 +pos=<-27592338,7733840,26809639>, r=67866750 +pos=<16518443,32103384,75413578>, r=82132364 +pos=<-34690857,7319622,42850741>, r=91420638 +pos=<-14924443,-6236079,56831767>, r=99190812 +pos=<7743997,-12261460,35964397>, r=61680569 +pos=<-3269361,8376588,70424794>, r=86516197 +pos=<29298279,-49728427,55130248>, r=96759316 +pos=<-176442590,11786363,30527104>, r=80635646 +pos=<21328983,-30426389,63076806>, r=93372768 +pos=<43943676,7353188,70138060>, r=65308776 +pos=<3738495,1998963,60269431>, r=75730495 +pos=<29196616,-1087768,58954793>, r=52044635 +pos=<17129758,3639658,28278179>, r=92408752 +pos=<26929307,-18558005,45163490>, r=57990725 +pos=<30151639,-11329431,53150067>, r=55526374 +pos=<-38902090,5860293,32148663>, r=86388996 +pos=<16645875,-20653185,29929465>, r=55135289 +pos=<63727952,-9432946,27035651>, r=58777103 +pos=<-27056576,10119288,33988615>, r=72124418 +pos=<-23042250,12102128,28308822>, r=60447464 +pos=<19525095,-6290194,-4307359>, r=62557364 +pos=<-16631198,6496442,33309580>, r=64643098 +pos=<15519504,-9148366,13599638>, r=51513988 +pos=<19966443,-52040168,34365510>, r=87637797 +pos=<21461973,36596811,-15720311>, r=72275142 +pos=<67920922,3377610,75429810>, r=98553159 +pos=<-34746289,11212933,5245616>, r=89772594 +pos=<102636498,6047721,27093017>, r=82261892 +pos=<25513943,-12858287,43633430>, r=52176302 +pos=<23812069,16709716,34606482>, r=75977986 +pos=<-16432902,-9331088,43423408>, r=90385982 +pos=<-41316316,9581819,26239920>, r=79172932 +pos=<58979793,4694184,57681853>, r=70547510 +pos=<-26810173,3429119,46755904>, r=91335473 +pos=<-4077214,32449882,40780746>, r=68441811 +pos=<23778533,6517866,60450993>, r=51353497 +pos=<-47294093,13240510,28802018>, r=84054121 +pos=<-7484464,-2087273,34467150>, r=65237719 +pos=<2667973,-21176139,19152582>, r=70840676 +pos=<-26974518,-3093529,39762802>, r=91029513 +pos=<20396487,24697476,27737639>, r=71750893 +pos=<-3848042,32691162,19367222>, r=58591948 +pos=<85891932,-4215362,41342119>, r=90029449 +pos=<15807927,-41949900,28968599>, r=76309325 +pos=<113630387,11419953,26479043>, r=87269739 +pos=<8443047,-24368315,42711683>, r=79835683 +pos=<8915992,-12507183,26852899>, r=51643154 +pos=<16975747,33345088,90685983>, r=98189322 +pos=<16542064,-8209041,49132029>, r=61997664 +pos=<26083682,-15530228,60849709>, r=71494897 +pos=<87475019,996212,46593984>, r=91652848 +pos=<-20738303,19702726,63116653>, r=94691537 +pos=<2897529,-6359614,52320317>, r=76980936 +pos=<-18249278,12071197,21407598>, r=56255155 +pos=<-47251332,3138642,19288659>, r=96308694 +pos=<-8950092,10081318,9699185>, r=60654442 +pos=<-27063814,13366909,28571014>, r=63466463 +pos=<89935442,1300570,52002172>, r=99217078 +pos=<38787323,-21656515,59674946>, r=78698894 +pos=<10154601,-21222927,40673739>, r=72940713 +pos=<7516797,-50328274,23247629>, r=91048770 +pos=<51320586,1272920,43325237>, r=51953713 +pos=<-24555404,48385801,33712974>, r=97788065 +pos=<945100,-7130705,70882265>, r=98266489 +pos=<-47524884,10985043,31033794>, r=88772150 +pos=<38343303,5871639,62009086>, r=53060860 +pos=<-12401926,-13626232,47351405>, r=94578089 +pos=<6622238,-3900515,74101866>, r=92578705 +pos=<15285724,-16667255,33817520>, r=56397992 +pos=<12461568,-41050077,34098784>, r=83886222 +pos=<2013366,-1910188,54554314>, r=75649974 +pos=<11528468,9601165,32009051>, r=55625834 +pos=<28739474,12818007,34089598>, r=58434506 +pos=<-4183584,-4565352,2569266>, r=77664363 +pos=<55301478,11390578,65554450>, r=68045908 +pos=<67207407,-39652380,27192936>, r=92632785 +pos=<-6151880,4975865,2492676>, r=70168171 +pos=<12723367,6414409,54226905>, r=56288043 +pos=<-9954438,-10176260,29474486>, r=70803704 +pos=<14621488,58729283,26762976>, r=62005265 +pos=<5154791,-21407123,57422197>, r=94873045 +pos=<-2515107,9375853,65253993>, r=79591768 +pos=<-32145355,5580884,31367662>, r=79130655 +pos=<1638446,33442201,-7956396>, r=81180134 +pos=<2459983,2284350,49915281>, r=66369490 +pos=<-30135578,10302710,33035796>, r=74067193 +pos=<20099288,-8138588,73226794>, r=82464690 +pos=<23360043,29993021,71781551>, r=69548615 +pos=<3852732,53905747,32392331>, r=73579197 +pos=<-6494003,7914722,32516461>, r=52294256 +pos=<22147674,-29109860,47915081>, r=76075909 +pos=<44439867,9411218,34862032>, r=92766250 +pos=<24448917,-25881065,48162608>, r=70793527 +pos=<-15821978,2560903,52371346>, r=86830980 +pos=<17776820,11244932,30411914>, r=93430084 +pos=<-47629510,2074458,32801724>, r=99555290 +pos=<-29488921,12082254,5507452>, r=83383978 +pos=<23440018,-14415109,58129422>, r=70303036 +pos=<-31072900,20970812,29895215>, r=73072782 +pos=<79802670,7952073,23258634>, r=57458276 +pos=<15401157,-33469777,-9036894>, r=98590224 +pos=<28810403,-17861688,43167981>, r=53417816 +pos=<20811356,-39483791,58503295>, r=98374251 +pos=<28221690,-1438865,96016652>, r=90432712 +pos=<119596703,10580581,22653528>, r=95228788 +pos=<-72730949,-42592807,76297763>, r=58554616 +pos=<20727045,-12858578,-18525997>, r=82142279 +pos=<-14412194,7587369,27384277>, r=55407616 +pos=<-9964547,9616068,38140594>, r=59687756 +pos=<25375994,9019775,27915989>, r=66012329 +pos=<28339038,-21557983,-33484109>, r=98187729 +pos=<-40769634,20508493,169309535>, r=67016836 +pos=<23628886,-16348012,50943501>, r=64861184 +pos=<9114449,-29973441,10270868>, r=82072775 +pos=<-7341902,-4228160,17788695>, r=65266459 +pos=<-52876189,10973985,21724958>, r=91662014 +pos=<39250388,-10633908,46876634>, r=55340976 +pos=<5362891,-11707001,29395538>, r=56938225 +pos=<16782411,3836315,56211880>, r=56791669 +pos=<-1005838,-10248589,42632155>, r=75085122 +pos=<9132538,41220293,12801480>, r=60706276 +pos=<19331875,7297386,87299984>, r=81869634 +pos=<18351893,12089066,-55203877>, r=96247674 +pos=<-8333838,9637838,-13567327>, r=83747969 +pos=<-29279887,26590651,48673749>, r=95678467 +pos=<-6717692,-1606927,46837198>, r=76360346 +pos=<-35069367,17585108,32904555>, r=76692891 +pos=<24368096,-36835571,27407687>, r=61073676 +pos=<22271859,7668127,67658350>, r=58916893 +pos=<-51176183,12193963,21662524>, r=88804527 +pos=<-5401420,8111500,61853397>, r=80342071 +pos=<11569682,-10862433,34020643>, r=54512000 +pos=<11532886,41331045,-2196135>, r=73414318 +pos=<50453094,-7821138,73706059>, r=90560440 +pos=<2801398,8042305,53733048>, r=64087930 +pos=<6100293,-16825825,45041795>, r=76965848 +pos=<4777433,13245007,50585776>, r=53762031 +pos=<11966532,-16948551,29057550>, r=55238320 +pos=<2740743,-11930627,-1920318>, r=82595406 +pos=<7124995,-21828590,34816683>, r=70718805 +pos=<-22072553,21016630,23610751>, r=60898479 +pos=<3730420,58525438,834>, r=96214368 +pos=<46208809,641732,46356600>, r=50503718 +pos=<73003963,-6190044,59192219>, r=96966464 +pos=<-17520959,6524252,11096001>, r=71385562 +pos=<52908012,-5761464,-9349637>, r=76885293 +pos=<-20960903,-22794760,32501874>, r=97456108 +pos=<-9572905,13186383,34756722>, r=52341900 +pos=<-12387541,-23101055,32067270>, r=88754428 +pos=<-2439569,23334639,47902418>, r=64810554 +pos=<11842582,13550410,65139016>, r=60944767 +pos=<13711179,13823255,-12999207>, r=56949456 +pos=<26539356,-9904319,53247425>, r=57810921 +pos=<92191379,13657405,15881307>, r=71518896 +pos=<20813173,-25032292,32850464>, r=58268117 +pos=<-4956158,7110063,57880104>, r=76924782 +pos=<4981650,-25445833,47264132>, r=88926831 +pos=<-19671549,-1585241,31019213>, r=73474753 +pos=<59852155,-13194337,39474317>, r=71100876 +pos=<-17652441,33320159,35465280>, r=77571728 +pos=<33345917,75107674,33365691>, r=70334780 +pos=<-48743238,17578941,31574209>, r=89030319 +pos=<10282655,-26965407,51172159>, r=89053485 +pos=<21954018,7187972,39581084>, r=57015827 +pos=<-23238614,898385,49605801>, r=93144569 +pos=<-9179858,10656369,56450068>, r=76172185 +pos=<17086228,-14869599,35897667>, r=54879916 +pos=<27652268,-14576525,59169855>, r=67292687 +pos=<-7378413,7108015,28440327>, r=49909284 +pos=<-41951272,22450314,14122371>, r=91699248 +pos=<103596123,22942240,17181840>, r=88158023 +pos=<-5905000,-5098163,28163335>, r=60365061 +pos=<-3907705,33261125,8839130>, r=69749699 +pos=<-12344510,48356942,31908426>, r=83743943 +pos=<-39658225,13745640,33102216>, r=80213412 +pos=<12120514,9378667,75669985>, r=75369625 +pos=<9049029,-7480799,10267695>, r=59648838 +pos=<-1843093,-4593640,62121530>, r=89757073 +pos=<-4358583,-1858282,26778479>, r=54194093 +pos=<44291889,53661285,30396325>, r=56864899 +pos=<-19222852,-3849254,49754571>, r=94025367 +pos=<-41349172,13605847,14347653>, r=84880499 +pos=<-42960016,9332673,27951693>, r=82777627 +pos=<165873,2739273,67604132>, r=85897524 +pos=<-34800717,13377451,39478213>, r=82100106 +pos=<26585874,4323405,12379968>, r=84267724 +pos=<71237878,38625036,35938725>, r=74317120 +pos=<5046360,-6716189,-10419711>, r=83574197 +pos=<95406040,-16262613,26968138>, r=97216943 +pos=<192469870,35319513,52856887>, r=62060345 +pos=<-10599746,4646804,26610730>, r=53762270 +pos=<22348769,-5354606,70316624>, r=74521134 +pos=<-11712956,4491527,41457575>, r=69877528 +pos=<-16831697,10425945,28722026>, r=56326305 +pos=<-66579532,-87098754,26421991>, r=57936349 +pos=<3544584,44216145,40211275>, r=72016765 +pos=<-24590209,29483685,33266571>, r=78474634 +pos=<8417817,-36265776,35335028>, r=84381571 +pos=<-16267989,-7777548,37254473>, r=82498526 +pos=<-15981717,-5932835,29963897>, r=73077019 +pos=<45815464,-1202308,80372044>, r=85969993 +pos=<-15542063,-9113057,45813905>, r=91667653 +pos=<28083608,-19939602,61346516>, r=74401102 +pos=<89409975,11138907,41159334>, r=78010657 +pos=<-20636047,-5311580,38332853>, r=85479134 +pos=<-52362487,10672597,29082000>, r=91970428 +pos=<16883513,-4361387,48765267>, r=57441680 +pos=<-6450027,6340974,47843580>, r=69151257 +pos=<27357718,9881719,33518096>, r=58070561 +pos=<-47139706,19222497,30301227>, r=87797280 +pos=<-6786873,13331198,49618847>, r=64273056 +pos=<67536272,-9579017,37513776>, r=73209122 +pos=<15908718,526809,88261261>, r=93024517 +pos=<-30547546,25159719,16127538>, r=80999694 +pos=<-36620401,-5946726,33735150>, r=97500897 +pos=<55460062,39611259,33754977>, r=57341746 +pos=<-15985845,5437662,20535304>, r=61497696 +pos=<116230533,3379554,26176629>, r=97607777 +pos=<22715517,40525604,56345236>, r=65289255 +pos=<9964047,69553387,6627955>, r=94381393 +pos=<20594457,3933974,33758380>, r=85170031 +pos=<-1748849,3923235,10184729>, r=59126195 +pos=<-36261306,26485161,30469046>, r=84349381 +pos=<12383352,5421323,54960890>, r=58355235 +pos=<18348748,9889862,26566111>, r=87707176 +pos=<32410724,6688307,16450427>, r=88005178 +pos=<28815284,-7317814,31618302>, r=62559369 +pos=<12582199,-5514776,4690821>, r=59726435 +pos=<17278787,-16426641,42184246>, r=62530852 +pos=<-46698733,7836196,26877871>, r=86939114 +pos=<-27400616,4212808,14365187>, r=80307265 +pos=<-8409613,8876256,20618355>, r=50400173 +pos=<-37691214,-183753,11528562>, r=97831049 +pos=<42464145,5496158,-8026492>, r=53861304 +pos=<77637746,12158327,27665732>, r=51725327 +pos=<-33546878,9326602,36205395>, r=81624335 +pos=<4214842,-26472575,42412315>, r=85868693 +pos=<-13791054,-9913540,2775033>, r=92414211 +pos=<-24319960,11998349,26538872>, r=60059125 +pos=<-43058821,17097444,31042737>, r=82332859 +pos=<-16955846,3557996,10217878>, r=74664622 +pos=<117551210,21045692,21032662>, r=96365730 +pos=<23950005,-66674738,28337324>, r=92260729 +pos=<-1907868,55935382,396333>, r=98866895 +pos=<3131375,-34126218,33564000>, r=85757357 +pos=<-55363043,11106782,28480750>, r=93936002 +pos=<-52035623,13621718,31969914>, r=91582396 +pos=<15288696,11773949,-5797096>, r=50219316 +pos=<17870763,-6812128,-6567851>, r=66993871 +pos=<19619298,6749519,57870929>, r=52701005 +pos=<-27923946,-4329213,6038209>, r=97699645 +pos=<-35933734,12772554,32466529>, r=76826405 +pos=<-2904314,23333387,34875446>, r=52246994 +pos=<15322189,-57861908,30427444>, r=94165720 +pos=<1572742,11598864,69096373>, r=77123297 +pos=<-3799811,-3841917,48704008>, r=77544832 +pos=<25698289,21273271,20682480>, r=80393748 +pos=<-913729,10570236,58759759>, r=70301768 +pos=<-15534032,12607209,27763771>, r=51889116 +pos=<92768954,-41775867,128486407>, r=87537844 +pos=<22712876,59204986,40579869>, r=68205817 +pos=<38928606,9722684,68017515>, r=55803474 +pos=<13075122,31057163,49800224>, r=58916243 +pos=<16679186,10576323,37160009>, r=80146505 +pos=<-23268116,14012400,13625859>, r=67115158 +pos=<21336437,53258451,28236970>, r=51292841 +pos=<13358596,4602279,50887418>, r=54125185 +pos=<1546294,-11399671,27207832>, r=58259944 +pos=<71031037,-36762599,31433333>, r=97807071 +pos=<7209774,-17857452,35425149>, r=67271365 +pos=<87327977,30168165,34255135>, r=80266990 +pos=<16493041,59063523,41969461>, r=75673824 +pos=<-5407498,-10585300,48414926>, r=85606502 +pos=<7803860,48762560,57329681>, r=89422219 +pos=<42049894,48120461,61831190>, r=80516914 +pos=<-12948391,-11575,4084216>, r=80360511 +pos=<-24109286,-1508373,47084613>, r=93900925 +pos=<68969490,8609415,42260846>, r=61201011 +pos=<27325847,83811,73846109>, r=67634986 +pos=<-33527871,7581206,38872517>, r=86017979 +pos=<79561639,3693765,47709651>, r=82157666 +pos=<4942382,-30499869,35994459>, r=82750460 +pos=<-3648878,3081663,33920007>, r=55685864 +pos=<19567629,3804547,26774187>, r=74409565 +pos=<6250603,11519441,22690676>, r=92644953 +pos=<14455407,38151135,68831881>, r=83661561 +pos=<29944677,-50663589,28822789>, r=70740480 +pos=<25767333,-21719185,40587658>, r=57738061 +pos=<25433791,-9148823,61015813>, r=65929620 +pos=<21313362,-22295576,51774652>, r=73955388 +pos=<21960054,55195195,30671041>, r=55040045 +pos=<3195368,29111402,64418923>, r=81468827 +pos=<20820106,-10922570,46709949>, r=58010958 +pos=<104837735,13762596,29413661>, r=79068853 +pos=<51930822,-153532643,-6352113>, r=61643156 +pos=<-34066522,-1440608,26739157>, r=83444818 +pos=<101219014,10326334,30794156>, r=80266881 +pos=<-14287301,8728589,62127033>, r=88884294 +pos=<18709921,-25001485,69191078>, r=96681240 +pos=<-559392,19237928,40615360>, r=51546542 +pos=<19141269,-51439387,41616718>, r=95113421 +pos=<-10865962,9257797,38498543>, r=61305296 +pos=<33297734,-2037841,99456266>, r=93372126 +pos=<23485594,-50217336,31948740>, r=79879058 +pos=<33161394,13823230,39728354>, r=58787196 +pos=<95342347,19226907,26794153>, r=69878795 +pos=<-2071796,33729611,17053802>, r=60167644 +pos=<-40705344,11586435,49356883>, r=99674541 +pos=<3955968,-60784,3122351>, r=64467138 +pos=<51488857,180237,9671288>, r=50503497 +pos=<63551154,9734438,45234842>, r=57631622 +pos=<14114550,-48558968,26503898>, r=82146836 +pos=<-11338740,2593487,48680608>, r=78624541 +pos=<2385370,-10110155,52008657>, r=80932030 +pos=<-29302664,27878569,32647379>, r=80962542 +pos=<17071671,-4925869,60190724>, r=69243437 +pos=<6588551,28746153,85695086>, r=98986594 +pos=<43143505,-38049957,29649859>, r=69423497 +pos=<23748117,-68345078,28883762>, r=94679239 +pos=<-15258672,12833856,31348634>, r=54972011 +pos=<23429532,8422448,28155958>, r=98357259 +pos=<-21612815,24904191,45400376>, r=83051826 +pos=<68959571,43297893,28911604>, r=69684441 +pos=<69835106,-18848939,41873967>, r=89138510 +pos=<-21442459,13846825,22993056>, r=56087516 +pos=<81179798,4903650,32678475>, r=67534916 +pos=<12697900,3242853,-10671033>, r=66214926 +pos=<-42884015,16161893,30063862>, r=80243664 +pos=<12262283,-33589850,37306315>, r=79832528 +pos=<-3597199,-24553773,36662413>, r=86011967 +pos=<102148377,13578132,44356232>, r=91506566 +pos=<3094730,-9463750,20412582>, r=57441102 +pos=<-23608897,-24950920,29002456>, r=98760862 +pos=<95074972,33040056,32592885>, r=89223273 +pos=<4063853,-12174087,22382020>, r=57212882 +pos=<71949746,12501194,9654938>, r=58659854 +pos=<-29698766,-3856990,30363593>, r=85117867 +pos=<-1821033,17454005,55418774>, r=65827674 +pos=<-34137793,-6728303,30057839>, r=92122672 +pos=<10809673,11677772,61665571>, r=60376661 +pos=<38478393,-157435755,58471342>, r=68448753 +pos=<95085022,12590836,21897645>, r=69462906 +pos=<20831387,13238698,28558145>, r=98540498 +pos=<19585960,8101046,21602072>, r=72916963 +pos=<42816409,-15670289,56546800>, r=73613719 +pos=<-20422230,3526174,-3981957>, r=92362655 +pos=<-7309806,-10273341,52989917>, r=91771646 +pos=<55656163,13517103,-1468145>, r=52473505 +pos=<33380618,-12664256,-38395497>, r=93306552 +pos=<61983778,5052179,69707427>, r=85219088 +pos=<-23720574,-12661119,20913862>, r=86952534 +pos=<38717666,-4395306,54034386>, r=55727475 +pos=<8376437,34540720,74264073>, r=91562207 +pos=<-9561899,4046295,54707382>, r=81421641 +pos=<-3894047,13126203,-1601701>, r=63854258 +pos=<34273585,-36574546,43966631>, r=73394799 +pos=<15709364,23243714,74064823>, r=72733076 +pos=<56622323,24323594,26686756>, r=93598271 +pos=<-16887339,-31901565,26605128>, r=96593042 +pos=<-52958434,10828580,20612130>, r=93002582 +pos=<16329853,-40500933,36042879>, r=81412555 +pos=<34677548,-5767776,27800617>, r=79019440 +pos=<62675759,-225486,34444333>, r=55925724 +pos=<-21413501,12892709,14275701>, r=65729809 +pos=<102743995,-6643501,148883302>, r=66267806 +pos=<28283909,-7260504,91755669>, r=91930867 +pos=<3201618,-24211236,51780344>, r=93988556 +pos=<8425919,141745,69621015>, r=82251953 +pos=<29284732,-26509334,52474725>, r=70898010 +pos=<8534261,6737058,56816230>, r=62743520 +pos=<-11565217,-6449140,31535631>, r=70748642 +pos=<27143988,-47239244,55894663>, r=97188566 +pos=<-883004,7928909,38364001>, r=52516610 +pos=<29841740,-38424499,51748345>, r=81529673 +pos=<37129489,-45887411,43576543>, r=85174104 +pos=<3764161,11828774,51488989>, r=57094708 +pos=<-32501972,13255837,31536666>, r=71981333 +pos=<21635561,-42731958,52595321>, r=94890263 +pos=<-12899926,-14363700,28153387>, r=76615628 +pos=<7155770,6616552,26323398>, r=78242834 +pos=<-50387155,11830948,30876154>, r=90630959 +pos=<-334882,2113262,39634875>, r=59055155 +pos=<-6764769,-41777108,26891455>, r=96632003 +pos=<30102144,13089199,47396095>, r=58860647 +pos=<101844798,11424942,32205257>, r=81205312 +pos=<90660439,5840460,16463973>, r=77222246 +pos=<26646520,13747507,71997464>, r=52801951 +pos=<79303783,11517152,47137080>, r=73503879 +pos=<-36798267,17280106,28151846>, r=73364148 +pos=<5631145,12520099,27145434>, r=68664243 +pos=<29229009,-20970207,52296129>, r=65236140 +pos=<14629617,-11456828,31881455>, r=49907613 +pos=<-39204081,8348633,15112592>, r=87227553 +pos=<-1023693,70048,15881065>, r=56557489 +pos=<-17665563,-1382682,43855665>, r=84102561 +pos=<12220464,10399187,71145013>, r=69724244 +pos=<10492682,5529348,29167915>, r=78286683 +pos=<58093793,-31679941,48023334>, r=96377278 +pos=<-8790960,-19227545,28034719>, r=77251832 +pos=<27175494,-67523816,37473983>, r=99020857 +pos=<19108441,-23601386,43897489>, r=69588978 +pos=<-16430705,3415060,36386812>, r=70600973 +pos=<44257098,-52779640,31792951>, r=87409756 +pos=<17696313,17954898,32271842>, r=82333994 +pos=<29527551,-25424008,199706760>, r=85271845 +pos=<29352401,-3103801,37151397>, r=85137611 +pos=<-14187378,9160964,61902774>, r=88127857 +pos=<25011641,13298221,93146063>, r=76034726 +pos=<82175218,28404862,32110342>, r=71205786 +pos=<48621855,-4332600,-8741691>, r=70562378 +pos=<-19878867,759796,45832214>, r=86149820 +pos=<17496027,-9960360,38139258>, r=51802125 +pos=<-9917368,-13036903,28205770>, r=72358568 +pos=<550381,-15550604,32038859>, r=68238083 +pos=<56716223,8570939,47298429>, r=54023758 +pos=<539506,9612037,39182322>, r=50229325 +pos=<-5184373,2940068,39869874>, r=63312827 +pos=<-21098602,11856148,38323329>, r=68764368 +pos=<-19121060,49337322,24041916>, r=85836932 +pos=<86356620,8189700,52875106>, r=89622112 +pos=<3450556,-19642286,32421537>, r=69811847 +pos=<-44406358,10975584,20886558>, r=84029238 +pos=<13064538,25505218,76726203>, r=80300784 +pos=<-9485723,-5363434,-538481>, r=86872382 +pos=<8837450,7471361,28412784>, r=87811497 +pos=<-12494797,13385605,40779708>, r=61087468 +pos=<24575015,1467791,23621924>, r=89314160 +pos=<29723758,-61008348,27764240>, r=80247361 +pos=<-26576101,12012570,30838668>, r=66600814 +pos=<-36059340,-49908372,112074400>, r=80309315 +pos=<73876660,-19296510,23702658>, r=78336964 +pos=<1251054,13636908,60417623>, r=66728230 +pos=<-2032813,-6197635,35830888>, r=65260020 +pos=<4622298,-5607910,46831280>, r=69015518 +pos=<30289124,11055723,33568863>, r=77212433 +pos=<102943938,9423178,36435380>, r=88536206 +pos=<-21671637,40224972,14939658>, r=88377043 +pos=<-34304532,-10197092,29750024>, r=95450243 +pos=<-29026594,4242483,21230262>, r=75038537 +pos=<92913810,-6160337,19422912>, r=88517601 +pos=<-35002664,6598678,29069085>, r=78671586 +pos=<14953534,-13347108,6392786>, r=63485505 +pos=<-16159215,32329276,16538340>, r=73370172 +pos=<5487735,34780248,35865784>, r=56292313 +pos=<-27731145,-2913607,30823334>, r=82666669 +pos=<-36944644,28964257,41392266>, r=98435027 +pos=<-460322,632838,-2281940>, r=73594121 +pos=<102706355,9371948,35620680>, r=87535410 +pos=<60410412,10583154,7494237>, r=51199187 +pos=<-523622,-1176830,16846380>, r=56338874 +pos=<15461244,8535190,26266005>, r=85676396 +pos=<13630466,-24286282,28015816>, r=59870222 +pos=<25846090,10768466,33229247>, r=69195760 +pos=<-20640449,2479801,49996901>, r=89356080 +pos=<17450167,3890290,76535935>, r=76394173 +pos=<66300710,9216804,35919185>, r=51583298 +pos=<-14901390,-29002182,34188536>, r=99290753 +pos=<93812056,7646185,42109596>, r=86855545 +pos=<-68975985,-95879969,26897421>, r=51901665 +pos=<-108219772,-18337847,74384363>, r=69722482 +pos=<24625958,-25536038,54920241>, r=77028926 +pos=<-1697059,6074283,49270674>, r=66091992 +pos=<56966211,-20790451,50710630>, r=87047349 +pos=<41384455,8860097,82215857>, r=73320413 +pos=<44005496,37047905,78059268>, r=87628185 +pos=<59570288,-3539773,34300483>, r=55990579 +pos=<-20820070,13184997,26179759>, r=55013366 +pos=<-25056292,29186977,48906720>, r=94284132 +pos=<54872838,-496203,39092492>, r=53041600 +pos=<20357655,-26376235,46637294>, r=73854391 +pos=<10257218,-34192248,51841573>, r=96975117 +pos=<8928672,10057652,77408473>, r=79620739 +pos=<24802277,12871282,70179818>, r=53704788 +pos=<15511366,-10330776,44110421>, r=60128524 +pos=<-31610565,7493310,-1012866>, r=96614764 +pos=<30120456,1413501,78346775>, r=68011359 +pos=<-18803745,13161727,47405641>, r=74246427 +pos=<46768307,-6782021,79479382>, r=91609747 +pos=<-8054256,-3361715,17935737>, r=64964920 +pos=<15672153,65526412,42109030>, r=83097128 +pos=<-18751641,1724840,33315864>, r=71541180 +pos=<25309012,8101940,105855997>, r=93643562 +pos=<-18032697,-4078054,55365753>, r=98675227 +pos=<-28374194,11322738,27150246>, r=65400473 +pos=<-27000512,13175925,32623881>, r=67647113 +pos=<84910164,21413724,28106385>, r=62945688 +pos=<-24436284,50668201,28976207>, r=95214561 +pos=<-27192913,5738427,31062404>, r=73715839 +pos=<-32342192,6259633,36367968>, r=83649068 +pos=<-2800795,12659005,46368627>, r=57709064 +pos=<43727370,13093524,7029090>, r=65266551 +pos=<21959828,-34975362,38418434>, r=72632708 +pos=<-27822565,5522903,27623156>, r=71121448 +pos=<12488338,57846109,-116824794>, r=60931024 +pos=<28406723,-8906434,19943859>, r=54228120 +pos=<28594577,-10650562,20794076>, r=75012169 +pos=<67738973,-6202744,33710296>, r=66232051 +pos=<21356964,40639654,43503553>, r=53920081 +pos=<-18731837,9878259,38965342>, r=69017677 +pos=<17860132,-11941755,82499369>, r=97779574 +pos=<19738430,3663403,61907761>, r=59704649 +pos=<-25139848,-18893923,28175880>, r=93408265 +pos=<27233260,3172888,29843474>, r=53112527 +pos=<28751632,-10139152,91423533>, r=94009676 +pos=<-40802673,7607684,37116431>, r=91510363 +pos=<4637380,-13314231,30802954>, r=60678327 +pos=<-13434940,7612798,26320071>, r=53340817 +pos=<15835048,13947735,67488915>, r=58904658 +pos=<44167338,-61674397,31287029>, r=95708819 +pos=<-54286258,4044379,27037527>, r=98477920 +pos=<-25957377,1232949,48933241>, r=94856190 +pos=<-189514,-17318621,33152432>, r=71859103 +pos=<-9655986,31363419,34119538>, r=66272805 +pos=<-49776178,8281116,29411001>, r=92104613 +pos=<-7177074,-5640118,46423112>, r=80438834 +pos=<3510285,25498684,38254165>, r=51376697 +pos=<6646094,-17751553,32489529>, r=64793504 +pos=<27955429,1134843,96689807>, r=88798116 +pos=<3992613,-48097706,28357223>, r=93660873 +pos=<-12050511,10823464,64034296>, r=86459874 +pos=<50277497,3230571,56815276>, r=62442292 +pos=<12589480,-23716724,17448374>, r=65163729 +pos=<28016242,56170941,42861629>, r=62150173 +pos=<9529216,13189304,58533713>, r=57013845 +pos=<-18422958,11074495,-14750510>, r=93584053 +pos=<-10600939,-58796144,-66329826>, r=54261138 +pos=<-22694216,32557119,21168332>, r=75503066 +pos=<19625911,-19108347,39264104>, r=59945109 +pos=<16202987,11250084,32077098>, r=88723629 +pos=<-22342148,9241889,28713168>, r=63011968 +pos=<61734000,172436242,42502479>, r=99037503 +pos=<39284930,6773688,67419386>, r=58510700 +pos=<-21887843,-15094740,30479344>, r=88660561 +pos=<56724870,10935977,68199609>, r=72568619 +pos=<-26404285,-14541981,28854597>, r=90999386 +pos=<20768111,10218293,70286170>, r=60498288 +pos=<58173315,2108380,11295762>, r=53635386 +pos=<-78552,7096342,40115240>, r=54296137 +pos=<28235577,-66695013,33756620>, r=93414609 +pos=<81686840,21707212,3225998>, r=78969541 +pos=<26863987,344047,84376135>, r=78366835 +pos=<-5517054,4825495,45511921>, r=67402274 +pos=<-20682589,27919440,53889691>, r=93625744 +pos=<734693,5440282,74429609>, r=89453311 +pos=<-17309761,27340253,32225003>, r=68008901 +pos=<-14250226,11797198,47799351>, r=71451114 +pos=<12768641,26654220,85289406>, r=90308840 +pos=<-13205273,276918,41558161>, r=75685079 +pos=<60500188,-28401037,40851650>, r=88333603 +pos=<-8289678,9770275,-11436454>, r=81440504 +pos=<13380717,-30843525,34881749>, r=73543075 +pos=<100285450,11856205,32236095>, r=79245398 +pos=<-18369816,8371642,59515189>, r=90711881 +pos=<-8993099,11196433,17434204>, r=51847107 +pos=<-8472140,30687913,17283411>, r=63296693 +pos=<10070079,-5532158,41904006>, r=58564615 +pos=<30152238,-34736667,62322922>, r=88105925 +pos=<18862920,-11216360,59569626>, r=73121611 +pos=<-15288695,4236072,32285755>, r=64536897 +pos=<79679008,-13626614,47163711>, r=99049367 +pos=<-45125751,16797856,33608036>, r=86665564 +pos=<-28384434,-4024397,40387959>, r=93995348 +pos=<64119136,-23622170,27729966>, r=74051325 +pos=<48176736,55106923,28486174>, r=60285194 +pos=<47651707,-8119244,54074187>, r=68425469 +pos=<24903903,13192484,70653120>, r=53755255 +pos=<-86952912,12376067,-58333464>, r=67342941 +pos=<6647009,37618486,12664747>, r=59726813 +pos=<3551568,-11821306,40106790>, r=69575060 +pos=<-13475580,-14318417,27569392>, r=76561939 +pos=<-24497801,18870951,21956038>, r=62832719 +pos=<-12563761,-4267429,35136046>, r=73165781 +pos=<-24427671,-53242259,110960953>, r=86038341 +pos=<824490,-36876833,38284810>, r=95535704 +pos=<-1004417,35636937,56618660>, r=84393875 +pos=<18062415,13376218,-39907345>, r=79953354 +pos=<-49203049,11679891,13720478>, r=95287361 +pos=<-7733727,7578601,74238686>, r=95592356 +pos=<-17439544,27113341,20722658>, r=65250232 +pos=<33039644,-4847662,57478481>, r=53945887 +pos=<29427406,-30924449,45762296>, r=68457873 +pos=<-12686328,7017178,20893403>, r=56260528 +pos=<9125673,-3186155,38208176>, r=53467175 +pos=<21842960,67827633,58652495>, r=95771121 +pos=<7154304,12717355,78903206>, r=80230255 +pos=<29733958,-28278934,51797890>, r=71541625 +pos=<-13858935,11825841,26792849>, r=50024459 +pos=<26445294,-59211075,37936792>, r=91901087 +pos=<5942203,-3472983,33717401>, r=52446834 +pos=<18483251,12989494,28640627>, r=81763392 +pos=<21888315,-11343550,1538081>, r=59402044 +pos=<11359277,-4309835,60418638>, r=74567719 +pos=<22525648,608983,91143641>, r=89207653 +pos=<-15090842,4866511,33166956>, r=64589806 +pos=<59263400,-28200244,32561833>, r=78605514 +pos=<-13098027,-5359987,33806031>, r=73462567 +pos=<5709556,-5332902,18250092>, r=52858287 +pos=<1383383,-21484444,32149196>, r=73449094 +pos=<-1045009,-20326214,54949021>, r=97519035 +pos=<-7846975,13115990,13601453>, r=52614503 +pos=<11646782,-1075897,44410356>, r=55037987 +pos=<59392883,-30193673,28815229>, r=76981925 +pos=<-10199686,-8529346,50285680>, r=90213228 +pos=<-4918177,10530650,44179824>, r=59765996 +pos=<-23517234,3275398,34356158>, r=75796520 +pos=<-27530283,16253691,52135123>, r=87052958 +pos=<-16105672,7694173,30819387>, r=60429553 +pos=<96261991,38709495,27457071>, r=90944078 +pos=<15238145,490231,59090146>, r=64560285 +pos=<-15717086,32397491,29847416>, r=69095894 +pos=<66350332,5794652,63265998>, r=82401745 +pos=<24230298,-5739253,59358636>, r=62066311 +pos=<71137681,-6232105,37552808>, r=73502654 +pos=<60252092,-21158828,27312643>, r=67303669 +pos=<89450373,5129969,32354472>, r=75254945 +pos=<11419136,-9902298,47977788>, r=67659501 +pos=<8456731,-6037322,38997643>, r=57776869 +pos=<16758142,16716052,105655709>, r=96747615 +pos=<9054314,-20926162,28446813>, r=61517177 +pos=<-22663784,12575343,20884561>, r=60688722 +pos=<17785904,-23553090,42088918>, r=69054648 +pos=<-5380784,-3592985,34168528>, r=64340815 +pos=<16157218,-20319112,44064423>, r=69424858 +pos=<70136264,59829961,34261494>, r=92743317 +pos=<8097022,-26946996,10796174>, r=79538443 +pos=<18570689,-17660165,6754462>, r=63819891 +pos=<-3799503,6300062,15739861>, r=53244248 +pos=<20760940,-10495510,55808536>, r=66741629 +pos=<28580951,-31332138,36934098>, r=60883889 +pos=<19616454,71589971,43358184>, r=86465554 +pos=<-16674304,6120045,61176618>, r=92929803 +pos=<-5622134,-11945037,6842041>, r=82210126 +pos=<29059073,-35035331,38080118>, r=65255442 +pos=<-42398257,11935350,22955012>, r=78992601 +pos=<-34548859,-5656855,28778669>, r=90182908 +pos=<71924129,10831793,50074154>, r=69746745 +pos=<29727472,-5412484,-27117619>, r=74287449 +pos=<25373192,-10528943,30728123>, r=84294617 +pos=<29623657,-8705920,62474507>, r=62755291 +pos=<-32475549,10248082,23869066>, r=69843058 +pos=<-3790020,4801453,76111669>, r=96298899 +pos=<18697719,-3960049,70429722>, r=76890568 +pos=<25490602,-44371393,33031777>, r=73111098 +pos=<98663002,32483573,16834902>, r=93113193 +pos=<-13845078,6762151,37056807>, r=65338264 +pos=<-37899300,11693919,41744624>, r=89148571 +pos=<-5319923,6063640,29790359>, r=50245491 +pos=<10494277,40833236,36819800>, r=58292652 +pos=<2468228,28625428,39110969>, r=56402122 +pos=<37234879,-47847219,38456569>, r=82118808 +pos=<49959051,12600554,55522210>, r=51460876 +pos=<45237033,68761342,33679289>, r=76193070 +pos=<16605927,-38270102,31218228>, r=74081052 +pos=<22821206,6305347,28985313>, r=98715235 +pos=<16973044,-15475317,60530031>, r=80230885 +pos=<-5782634,27442361,46855862>, r=71214698 +pos=<99801135,8274434,28731152>, r=78837887 +pos=<204639,-28240856,49788639>, r=99023625 +pos=<20841850,65861970,31908686>, r=68062650 +pos=<52939784,31652133,37331538>, r=50439102 +pos=<24779701,5194077,27553987>, r=54736602 +pos=<18868985,-30678537,33051107>, r=66059296 +pos=<-6081185,12015562,43482684>, r=58746834 +pos=<14531546,5643232,73024697>, r=74048681 +pos=<-7572423,22708647,28740911>, r=50155911 +pos=<-27967799,13320775,-5111605>, r=91243365 +pos=<-38484134,30268626,21148632>, r=89024155 +pos=<-26381515,37135562,37577363>, r=92228324 +pos=<78611905,10328930,44590861>, r=71453875 +pos=<-14783973,863487,43664432>, r=78783583 +pos=<-6764597,53303021,26780410>, r=77982020 +pos=<-23820824,-2484108,42254060>, r=89757540 +pos=<87647811,13512303,21839172>, r=61162504 +pos=<4189469,-1135887,38360893>, r=56505964 +pos=<-18678445,7984155,65240603>, r=97133671 +pos=<-1620989,6765659,65332381>, r=81386238 +pos=<6341188,-160156205,28646223>, r=60775494 +pos=<3390529,852650,38970686>, r=55926088 +pos=<-19444684,6907535,29025426>, r=62761114 +pos=<28135247,4248278,29433397>, r=54353178 +pos=<-16288577,11253508,36630574>, r=62864286 +pos=<18221971,-15960633,17986356>, r=51237038 +pos=<2482176,-14135742,43395534>, r=76247622 +pos=<-8883867,7491880,53792379>, r=76382899 +pos=<57001958,-5195246,46180388>, r=66957626 +pos=<9335262,37376441,58805122>, r=77980224 +pos=<-2729811,5884156,47561459>, r=65605999 +pos=<-10657433,43401005,47083713>, r=92275991 +pos=<-26726351,12714540,22357731>, r=63138955 +pos=<12922941,-288085,41508225>, r=50071884 +pos=<-25287382,10703575,33549535>, r=69332085 +pos=<-19216841,5533182,28010027>, r=62892220 +pos=<22952421,62419373,49819446>, r=80420284 +pos=<-2986834,-32032338,31286083>, r=87503885 +pos=<25396247,11635963,43622206>, r=73336596 +pos=<-21286648,-3665795,41035377>, r=87186594 +pos=<74503834,64003352,30127468>, r=97150120 +pos=<13235321,33324454,10767257>, r=50741846 +pos=<41958843,-34243000,41390996>, r=76172903 +pos=<-27439737,-8436492,37891721>, r=94966542 +pos=<108022987,-277518,31680182>, r=98560909 +pos=<-11173136,58132284,31836510>, r=92275845 +pos=<87966789,31782519,8694018>, r=89856854 +pos=<22831020,11014665,-50062748>, r=87701978 +pos=<-40099260,-1453200,32884885>, r=95635887 +pos=<14405606,77155602,10257365>, r=93912680 +pos=<41406613,18584566,33663401>, r=90385407 +pos=<15355805,-14599297,67046044>, r=87488057 +pos=<-38355811,13997471,984742>, r=94858431 +pos=<-21360852,4186125,42355260>, r=80728685 +pos=<-43306097,26572551,29212559>, r=90225054 +pos=<-10137766,-30354732,29446223>, r=91137302 +pos=<-33123061,12284705,56377022>, r=98413895 +pos=<-19401454,-13088909,43923463>, r=97612344 +pos=<21667349,79445411,29100896>, r=78013073 +pos=<-17721096,21981733,27708807>, r=58545566 +pos=<34903744,9598442,45405939>, r=87790383 +pos=<-14156072,4722669,32382520>, r=63014718 +pos=<23258590,18071736,26976070>, r=98193824 +pos=<40313693,6415468,14733357>, r=76537534 +pos=<19870973,4898992,-9742830>, r=56457586 +pos=<10106366,-45922243,31757497>, r=88772091 +pos=<-12686766,8232116,26770231>, r=52423694 +pos=<15506584,-56327076,30707218>, r=92726236 +pos=<30028758,-20674021,39256231>, r=51100009 +pos=<-12807240,2692256,28358336>, r=59671835 +pos=<-1452089,-42396785,33341188>, r=98388602 +pos=<-23746528,30653695,53800824>, r=99334886 +pos=<35774875,86565963,28598099>, r=79454298 +pos=<11201468,-2130621,77843849>, r=89971695 +pos=<20869084,10422484,-12493489>, r=52686583 +pos=<16239869,-27532462,22832955>, r=59944295 +pos=<93172162,7855780,55271468>, r=99167889 +pos=<10989541,-27831156,54839378>, r=92879538 +pos=<47287951,6399858,82338350>, r=81806793 +pos=<-24597194,9511174,31507098>, r=67791635 +pos=<-43679882,13828858,29542046>, r=80591595 +pos=<-31514995,18208501,26215278>, r=67072901 +pos=<27407196,37921500,59588022>, r=61236571 +pos=<56063927,35450652,-9307850>, r=79623918 +pos=<25913051,-21445747,15722040>, r=51295318 +pos=<-15778883,42665817,2679804>, r=97184901 +pos=<68949061,8226050,37264251>, r=56567439 +pos=<-23171365,10751887,30611753>, r=64230071 +pos=<-18747102,-5873304,38188142>, r=84007318 +pos=<-24462606,11540567,56255101>, r=90375806 +pos=<68514647,-6069823,-15054401>, r=98505060 +pos=<3192089,3019967,71335482>, r=86322481 +pos=<44095981,-11195717,8931803>, r=55226057 +pos=<52448998,68071230,28122098>, r=77158131 +pos=<30294677,67428020,32332152>, r=60599397 +pos=<24083461,32888705,89741835>, r=89680971 +pos=<-17773323,11481049,60068052>, r=87558867 +pos=<39935021,7913477,31642760>, r=67245245 +pos=<-3300858,8776285,7492495>, r=58516757 +pos=<-14315625,-96322658,85983342>, r=99494585 +pos=<22254281,-26461818,45744120>, r=71150174 +pos=<-61358216,-58749686,60161910>, r=69050750 +pos=<22090112,-7820203,52421600>, r=59350248 +pos=<58732656,1177220,45454634>, r=61590110 +pos=<15189595,19083627,30494757>, r=97459148 +pos=<-22020987,9306159,26208628>, r=60122133 +pos=<99531259,1257760,40121709>, r=96975252 +pos=<-14292378,21644543,31820551>, r=58891362 +pos=<25243539,11900227,68208888>, r=52263642 +pos=<14153781,2892486,28415858>, r=50713626 +pos=<25057928,9225511,10541536>, r=81947319 +pos=<-40230505,13388223,14784164>, r=83542815 +pos=<11491416,-10338153,64944348>, r=84989984 +pos=<7534653,13868822,16434605>, r=96030044 +pos=<11857762,5793483,56031416>, r=59578713 +pos=<-29252261,1183357,42990375>, r=92257830 +pos=<10837139,12189459,76330635>, r=74502589 +pos=<-45659033,7686995,31186694>, r=90357402 +pos=<-33516730,7781166,23461960>, r=73758307 +pos=<-35585052,13275563,32891133>, r=76399681 +pos=<-23372699,926879,28995706>, r=72640041 +pos=<-32231790,18337433,40763606>, r=82466675 +pos=<-15265782,5266013,41109834>, r=72308117 +pos=<-46382743,18323706,33251690>, r=89092329 +pos=<-22379842,-10412564,35806994>, r=89797939 +pos=<-19936040,12741481,43055343>, r=71448490 +pos=<11932900,51958453,34625766>, r=65785169 +pos=<26353587,38869911,70362101>, r=74012548 +pos=<-17196709,13510796,27182479>, r=52067007 +pos=<13619188,1770180,60598047>, r=66407353 +pos=<29477489,-17701344,46254428>, r=55676855 +pos=<-18214394,13887273,37769180>, r=63294832 +pos=<96247985,-840858,37122590>, r=92791676 +pos=<104378984,-3860257,27401723>, r=94221008 +pos=<-12750604,33328676,59249163>, r=96462311 +pos=<-27548633,3323009,27039114>, r=72463360 +pos=<6316861,-37065268,26667447>, r=78614382 +pos=<28674261,62339579,64981979>, r=89781167 +pos=<4932259,-5944468,64362668>, r=86573398 +pos=<39249222,35336659,23456427>, r=72736271 +pos=<-14950021,-6234086,26271712>, r=68654483 +pos=<-9267831,2951756,20436720>, r=57364144 +pos=<24941035,21083777,70245491>, r=57522135 +pos=<-38812670,8627678,27885411>, r=79268953 +pos=<-26841604,39133964,34164171>, r=91273585 +pos=<-17613557,12740678,10459987>, r=65897553 +pos=<6268617,16523092,-3867668>, r=55542674 +pos=<-54248642,14031731,37025573>, r=98441214 +pos=<56351252,-10970499,27405199>, r=53306985 +pos=<11938348,52732334,26530970>, r=58458982 +pos=<21337614,-35689152,35918406>, r=71468466 +pos=<28310464,-1226463,32722334>, r=74934463 +pos=<-3688261,8908072,2468012>, r=63797066 +pos=<51121391,-5084690,39879675>, r=54666096 +pos=<12309644,13080824,94539130>, r=90347280 +pos=<70653803,4400816,29467174>, r=54300686 +pos=<23902415,30798087,63241278>, r=61270832 +pos=<-64781127,-59566983,54861638>, r=79270568 +pos=<-341755,9760829,74034130>, r=85813586 +pos=<101277832,8342009,28645321>, r=80161214 +pos=<22881378,13982152,28637105>, r=77603934 +pos=<44328344,-33613868,29754561>, r=66276819 +pos=<23012608,25560419,26460868>, r=66605665 +pos=<-24559796,23789273,33310448>, r=72793390 +pos=<16018237,482335,3465915>, r=51518157 +pos=<9806107,11883293,82020797>, r=81529936 +pos=<-9323050,45616012,44876369>, r=90949421 +pos=<-13827996,6230699,29762965>, r=58558797 +pos=<-11446904,3787862,42801482>, r=71659087 +pos=<22452948,1523049,29584506>, r=64533437 +pos=<51601643,12094487,-34247619>, r=82620937 +pos=<36103444,6291059,42309239>, r=93048472 +pos=<52314783,-1748637,62353855>, r=74997412 +pos=<11718817,33195710,86059732>, r=98670584 +pos=<-3053752,-30934783,8529293>, r=96943959 +pos=<18874881,-55507738,12970781>, r=95146824 +pos=<88238757,11282988,8652582>, r=77169349 +pos=<25337637,-25158614,72035396>, r=93054939 +pos=<14972306,-55337212,22115543>, r=89734228 +pos=<24970857,-29087647,50064790>, r=75380094 +pos=<-8734657,10055433,33014043>, r=52891916 +pos=<28004430,10872930,13400204>, r=95002516 +pos=<-33722911,13525800,39850272>, r=81245988 +pos=<9947672,-1996744,7097540>, r=56436240 +pos=<-44206028,8175853,41925243>, r=99154120 +pos=<-8153901,10611238,6383312>, r=62644043 +pos=<81995595,6452490,26911585>, r=61035037 +pos=<-509024,-2378390,45269939>, r=69355948 +pos=<-26678361,5594642,56471730>, r=98753986 +pos=<23035486,2675214,29980069>, r=64302508 +pos=<26097875,24286824,77172712>, r=66495533 +pos=<-7217220,-10965047,34823666>, r=74204581 +pos=<16286094,11426774,-7533078>, r=51305008 +pos=<-36233162,12083692,29982230>, r=75330291 \ No newline at end of file From 550d4d7e9dfbcf80487c9bd256b2de072b11c041 Mon Sep 17 00:00:00 2001 From: Markus Tacker Date: Sun, 23 Dec 2018 20:14:52 +0100 Subject: [PATCH 56/56] day 23, part 1 --- day23.spec.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/day23.spec.js b/day23.spec.js index 40eee36..366ce56 100644 --- a/day23.spec.js +++ b/day23.spec.js @@ -2,7 +2,7 @@ /* global describe, it, expect */ -const { readFileSync } = require('fs') +const {readFileSync} = require('fs') const input = readFileSync('./day23.txt', 'utf-8') const distance = ([x1, y1, z1], [x2, y2, z2]) => Math.abs(x1 - x2) + Math.abs(y1 - y2) + Math.abs(z1 - z2) @@ -18,16 +18,18 @@ const examples = '' + 'pos=<1,1,2>, r=1\n' + 'pos=<1,3,1>, r=1' +const parseInput = input => input + .split('\n') + .map(b => b.match(/pos=<(?-?[0-9]+),(?-?[0-9]+),(?-?[0-9]+)>, r=(?-?[0-9]+)/).groups) + .map(({x, y, z, radius}) => [ + parseInt(x, 10), + parseInt(y, 10), + parseInt(z, 10), + parseInt(radius, 10) + ]) + const numberOfNanobotsInRange = input => { - const bots = input - .split('\n') - .map(b => b.match(/pos=<(?-?[0-9]+),(?-?[0-9]+),(?-?[0-9]+)>, r=(?-?[0-9]+)/).groups) - .map(({ x, y, z, radius }) => [ - parseInt(x, 10), - parseInt(y, 10), - parseInt(z, 10), - parseInt(radius, 10) - ]) + const bots = parseInput(input) const network = bots .map(bot => ({ bot,