diff --git a/package-lock.json b/package-lock.json index 7bacb73..50cbb80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "electron-store": "^8.0.1", "electron-updater": "^4.6.5", "electron-window-state": "^5.0.3", + "get-pixels": "^3.3.3", "get-port-sync": "^1.0.1", "is-online": "^9.0.1", "lsb-release": "^0.1.0", @@ -27,7 +28,7 @@ "puppeteer-in-electron": "^3.0.5", "vue-router": "^3.5.3", "vuex": "^3.6.2", - "whatsapp-web-electron.js": "^1.16.5-1" + "whatsapp-web-electron.js": "^1.16.6-1" }, "bin": { "walc": "main.js" @@ -1884,9 +1885,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.7.tgz", - "integrity": "sha512-8XC0l0PwCbdg2Uc8zIIf6djNX3lYiz9GqQlC1LJ9WQvTYvcfP8IA9K2IKRnPm5tAX6X/+orF+WwKZ0doGcgJlg==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -2923,7 +2924,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "devOptional": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -3188,7 +3188,6 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "optional": true, "dependencies": { "safer-buffer": "~2.1.0" } @@ -3225,7 +3224,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true, "engines": { "node": ">=0.8" } @@ -3342,7 +3340,6 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "optional": true, "engines": { "node": "*" } @@ -3350,8 +3347,7 @@ "node_modules/aws4": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "optional": true + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "node_modules/axios": { "version": "0.21.4", @@ -3484,7 +3480,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, "dependencies": { "tweetnacl": "^0.14.3" } @@ -3616,6 +3611,18 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "dev": true, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/bonjour-service": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.11.tgz", @@ -4151,8 +4158,7 @@ "node_modules/caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "node_modules/chalk": { "version": "4.1.2", @@ -4765,9 +4771,9 @@ "dev": true }, "node_modules/core-js-compat": { - "version": "3.22.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.1.tgz", - "integrity": "sha512-CWbNqTluLMvZg1cjsQUbGiCM91dobSHKfDIyCoxuqxthdjGuUlaMbCsSehP3CBiVvG0C7P6UIrC1v0hgFE75jw==", + "version": "3.22.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.2.tgz", + "integrity": "sha512-Fns9lU06ZJ07pdfmPMu7OnkIKGPKDzXKIiuGlSvHHapwqMUF2QnnsWwtueFZtSyZEilP0o6iUeHQwpn7LxtLUw==", "dev": true, "dependencies": { "browserslist": "^4.20.2", @@ -5136,11 +5142,18 @@ "node": ">=8.0.0" } }, + "node_modules/cwise-compiler": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", + "integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=", + "dependencies": { + "uniq": "^1.0.0" + } + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, "dependencies": { "assert-plus": "^1.0.0" }, @@ -5148,6 +5161,11 @@ "node": ">=0.10" } }, + "node_modules/data-uri-to-buffer": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz", + "integrity": "sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo=" + }, "node_modules/dbus-next": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/dbus-next/-/dbus-next-0.10.2.tgz", @@ -5361,9 +5379,9 @@ "dev": true }, "node_modules/devtools-protocol": { - "version": "0.0.969999", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.969999.tgz", - "integrity": "sha512-6GfzuDWU0OFAuOvBokXpXPLxjOJ5DZ157Ue3sGQQM3LgAamb8m0R0ruSfN0DDu+XG5XJgT50i6zZ/0o8RglreQ==" + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==" }, "node_modules/diffie-hellman": { "version": "5.0.3", @@ -5688,7 +5706,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, "dependencies": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -5701,12 +5718,12 @@ "dev": true }, "node_modules/ejs": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", - "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", "dev": true, "dependencies": { - "jake": "^10.6.1" + "jake": "^10.8.5" }, "bin": { "ejs": "bin/cli.js" @@ -5716,9 +5733,9 @@ } }, "node_modules/electron": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-17.4.0.tgz", - "integrity": "sha512-eMuCOZMB9qsY63qzxEkyyqM09qs6mrbPBBDJJZgd8pnPWftE4zKmFp3B1vdHzjQ+1c1r/siigxbWTrpDNNri0A==", + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-17.4.1.tgz", + "integrity": "sha512-0qX+DbiNXlVSUxXq4lWVTis8QYqC4Q7R/Xkk3YZQbHMXZ90bWilypC3gBZAcN4MQD4AYUIebphBOpRPxlXY3nQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -6222,9 +6239,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.114", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.114.tgz", - "integrity": "sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==", + "version": "1.4.118", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz", + "integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==", "dev": true }, "node_modules/electron-updater": { @@ -6650,6 +6667,18 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "node_modules/express/node_modules/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "dev": true, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -6676,8 +6705,7 @@ "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "node_modules/extract-zip": { "version": "1.7.0", @@ -6710,14 +6738,12 @@ "dev": true }, "node_modules/extsprintf": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", - "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", - "dev": true, + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", "engines": [ "node >=0.6.0" - ], - "optional": true + ] }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -6743,8 +6769,7 @@ "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "devOptional": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.12", @@ -6983,7 +7008,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true, "engines": { "node": "*" } @@ -7150,6 +7174,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-pixels": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/get-pixels/-/get-pixels-3.3.3.tgz", + "integrity": "sha512-5kyGBn90i9tSMUVHTqkgCHsoWoR+/lGbl4yC83Gefyr0HLIhgSWEx/2F/3YgsZ7UpYNuM6pDhDK7zebrUJ5nXg==", + "dependencies": { + "data-uri-to-buffer": "0.0.3", + "jpeg-js": "^0.4.1", + "mime-types": "^2.0.1", + "ndarray": "^1.0.13", + "ndarray-pack": "^1.1.1", + "node-bitmap": "0.0.1", + "omggif": "^1.0.5", + "parse-data-uri": "^0.2.0", + "pngjs": "^3.3.3", + "request": "^2.44.0", + "through": "^2.3.4" + } + }, "node_modules/get-port": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-2.1.0.tgz", @@ -7185,7 +7227,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, "dependencies": { "assert-plus": "^1.0.0" } @@ -7377,7 +7418,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "optional": true, "engines": { "node": ">=4" } @@ -7387,7 +7427,6 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "deprecated": "this library is no longer supported", - "optional": true, "dependencies": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -7745,9 +7784,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.5.tgz", - "integrity": "sha512-ORErEaxkjyrhifofwCuQttHPUSestLtiPDwV0qQOFB0ww6695H953wIGRnkakw1K+GAP+t8/RPbfDB75RFL4Fg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "dev": true, "dependencies": { "@types/http-proxy": "^1.17.8", @@ -7784,7 +7823,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "optional": true, "dependencies": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -8080,6 +8118,11 @@ "node": ">= 0.10" } }, + "node_modules/iota-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", + "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" + }, "node_modules/ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -8124,8 +8167,7 @@ "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "node_modules/is-ci": { "version": "3.0.1", @@ -8486,8 +8528,7 @@ "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "devOptional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "node_modules/is-unicode-supported": { "version": "0.1.0", @@ -8554,8 +8595,7 @@ "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "node_modules/jake": { "version": "10.8.5", @@ -8604,6 +8644,11 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jpeg-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz", + "integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8629,8 +8674,7 @@ "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "node_modules/jsesc": { "version": "2.5.2", @@ -8664,14 +8708,12 @@ "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "optional": true + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "node_modules/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==", - "devOptional": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/json-schema-typed": { "version": "7.0.3", @@ -8681,8 +8723,7 @@ "node_modules/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=", - "optional": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "node_modules/json5": { "version": "2.2.1", @@ -8708,7 +8749,6 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "optional": true, "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -8722,17 +8762,7 @@ "node_modules/jsprim/node_modules/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=", - "optional": true - }, - "node_modules/jsprim/node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "engines": [ - "node >=0.6.0" - ], - "optional": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "node_modules/jsprim/node_modules/verror": { "version": "1.10.0", @@ -8741,7 +8771,6 @@ "engines": [ "node >=0.6.0" ], - "optional": true, "dependencies": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -9640,6 +9669,24 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/ndarray": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", + "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", + "dependencies": { + "iota-array": "^1.0.0", + "is-buffer": "^1.0.2" + } + }, + "node_modules/ndarray-pack": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", + "integrity": "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=", + "dependencies": { + "cwise-compiler": "^1.1.2", + "ndarray": "^1.0.13" + } + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -9691,6 +9738,14 @@ "semver": "^7.3.5" } }, + "node_modules/node-bitmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", + "integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=", + "engines": { + "node": ">=v0.6.5" + } + }, "node_modules/node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -9787,18 +9842,18 @@ } }, "node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, "dependencies": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", + "gauge": "^4.0.3", "set-blocking": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, "node_modules/node-gyp/node_modules/readable-stream": { @@ -9984,7 +10039,6 @@ "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "optional": true, "engines": { "node": "*" } @@ -10030,6 +10084,11 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "dev": true }, + "node_modules/omggif": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" + }, "node_modules/on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -10347,6 +10406,14 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/parse-data-uri": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/parse-data-uri/-/parse-data-uri-0.2.0.tgz", + "integrity": "sha1-vwTYUd1ch7CrI45dAazklLYEtMk=", + "dependencies": { + "data-uri-to-buffer": "0.0.3" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -10468,8 +10535,7 @@ "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "optional": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "node_modules/picocolors": { "version": "1.0.0", @@ -10604,6 +10670,14 @@ "node": ">=4.0" } }, + "node_modules/pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -11323,8 +11397,7 @@ "node_modules/psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "optional": true + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "node_modules/public-encrypt": { "version": "4.0.3", @@ -11389,13 +11462,13 @@ } }, "node_modules/puppeteer-core": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.5.2.tgz", - "integrity": "sha512-uxHOWCHt9mGUCLu8qtbEy3UqHlBRMzGCyPmAeoq2KrtmPOC0ZJPRZrDLWJMG3E/gwuHinDtZnBbnFfRfk/PABg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.6.0.tgz", + "integrity": "sha512-n692xT9uOTxbFKcCRkfOT2Go5LL0YBCHrSpBdbNsjLhcxO5yuhj2/4jgAIK9bT1blY17Pb4I35eBSuDzJ54ERw==", "dependencies": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.969999", + "devtools-protocol": "0.0.981744", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.0", "pkg-dir": "4.2.0", @@ -11481,15 +11554,11 @@ } }, "node_modules/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", - "dev": true, + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "engines": { "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" } }, "node_modules/querystring": { @@ -11824,7 +11893,6 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "optional": true, "dependencies": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -11855,7 +11923,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -11865,21 +11932,11 @@ "node": ">= 0.12" } }, - "node_modules/request/node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "optional": true, - "engines": { - "node": ">=0.6" - } - }, "node_modules/request/node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "optional": true, "bin": { "uuid": "bin/uuid" } @@ -12086,8 +12143,7 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/sanitize-filename": { "version": "1.6.3", @@ -12689,7 +12745,6 @@ "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "optional": true, "dependencies": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -13264,7 +13319,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "optional": true, "dependencies": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -13277,7 +13331,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true, "engines": { "node": ">=6" } @@ -13297,9 +13350,9 @@ } }, "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "node_modules/tty-browserify": { @@ -13322,7 +13375,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, "dependencies": { "safe-buffer": "^5.0.1" }, @@ -13333,8 +13385,7 @@ "node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "node_modules/type-fest": { "version": "1.4.0", @@ -13424,6 +13475,11 @@ "node": ">=4" } }, + "node_modules/uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, "node_modules/unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -14391,9 +14447,9 @@ } }, "node_modules/whatsapp-web-electron.js": { - "version": "1.16.5-1", - "resolved": "https://registry.npmjs.org/whatsapp-web-electron.js/-/whatsapp-web-electron.js-1.16.5-1.tgz", - "integrity": "sha512-K0lM6V7O05TCWNOtARFjZmTMtn3JN6HQvLOoeXV/P5FrMoSXhurdVMXz6ekwMSgPuuqaJBVKvVRpuI60H5jsJw==", + "version": "1.16.6-1", + "resolved": "https://registry.npmjs.org/whatsapp-web-electron.js/-/whatsapp-web-electron.js-1.16.6-1.tgz", + "integrity": "sha512-wRHGSVBz0jtZViDg82ctVF8HOGbSwJ8gwpaACeyyrtsmBP8pjFHDJP7Nxbnws4JFyYhX2pCIgXoFSOXb53xriw==", "dependencies": { "@pedroslopez/moduleraid": "^5.0.2", "fluent-ffmpeg": "^2.1.2", @@ -15938,9 +15994,9 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.7.tgz", - "integrity": "sha512-8XC0l0PwCbdg2Uc8zIIf6djNX3lYiz9GqQlC1LJ9WQvTYvcfP8IA9K2IKRnPm5tAX6X/+orF+WwKZ0doGcgJlg==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", @@ -16876,7 +16932,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "devOptional": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -17083,7 +17138,6 @@ "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "optional": true, "requires": { "safer-buffer": "~2.1.0" } @@ -17138,8 +17192,7 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "optional": true + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "astral-regex": { "version": "2.0.0", @@ -17205,14 +17258,12 @@ "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=", - "optional": true + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "optional": true + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" }, "axios": { "version": "0.21.4", @@ -17310,7 +17361,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, "requires": { "tweetnacl": "^0.14.3" } @@ -17425,6 +17475,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "dev": true } } }, @@ -17856,8 +17912,7 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "optional": true + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { "version": "4.1.2", @@ -18347,9 +18402,9 @@ "dev": true }, "core-js-compat": { - "version": "3.22.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.1.tgz", - "integrity": "sha512-CWbNqTluLMvZg1cjsQUbGiCM91dobSHKfDIyCoxuqxthdjGuUlaMbCsSehP3CBiVvG0C7P6UIrC1v0hgFE75jw==", + "version": "3.22.2", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.2.tgz", + "integrity": "sha512-Fns9lU06ZJ07pdfmPMu7OnkIKGPKDzXKIiuGlSvHHapwqMUF2QnnsWwtueFZtSyZEilP0o6iUeHQwpn7LxtLUw==", "dev": true, "requires": { "browserslist": "^4.20.2", @@ -18638,15 +18693,27 @@ "css-tree": "^1.1.2" } }, + "cwise-compiler": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", + "integrity": "sha1-9NZnQQ6FDToxOn0tt7HlBbsDTMU=", + "requires": { + "uniq": "^1.0.0" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "optional": true, "requires": { "assert-plus": "^1.0.0" } }, + "data-uri-to-buffer": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-0.0.3.tgz", + "integrity": "sha1-GK6XmmoMqZSwYlhTkW0mYruuCxo=" + }, "dbus-next": { "version": "0.10.2", "resolved": "https://registry.npmjs.org/dbus-next/-/dbus-next-0.10.2.tgz", @@ -18812,9 +18879,9 @@ "dev": true }, "devtools-protocol": { - "version": "0.0.969999", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.969999.tgz", - "integrity": "sha512-6GfzuDWU0OFAuOvBokXpXPLxjOJ5DZ157Ue3sGQQM3LgAamb8m0R0ruSfN0DDu+XG5XJgT50i6zZ/0o8RglreQ==" + "version": "0.0.981744", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.981744.tgz", + "integrity": "sha512-0cuGS8+jhR67Fy7qG3i3Pc7Aw494sb9yG9QgpG97SFVWwolgYjlhJg7n+UaHxOQT30d1TYu/EYe9k01ivLErIg==" }, "diffie-hellman": { "version": "5.0.3", @@ -19068,7 +19135,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -19081,18 +19147,18 @@ "dev": true }, "ejs": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz", - "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", + "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", "dev": true, "requires": { - "jake": "^10.6.1" + "jake": "^10.8.5" } }, "electron": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/electron/-/electron-17.4.0.tgz", - "integrity": "sha512-eMuCOZMB9qsY63qzxEkyyqM09qs6mrbPBBDJJZgd8pnPWftE4zKmFp3B1vdHzjQ+1c1r/siigxbWTrpDNNri0A==", + "version": "17.4.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-17.4.1.tgz", + "integrity": "sha512-0qX+DbiNXlVSUxXq4lWVTis8QYqC4Q7R/Xkk3YZQbHMXZ90bWilypC3gBZAcN4MQD4AYUIebphBOpRPxlXY3nQ==", "dev": true, "requires": { "@electron/get": "^1.13.0", @@ -19468,9 +19534,9 @@ } }, "electron-to-chromium": { - "version": "1.4.114", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.114.tgz", - "integrity": "sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA==", + "version": "1.4.118", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz", + "integrity": "sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==", "dev": true }, "electron-updater": { @@ -19823,6 +19889,12 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", + "dev": true } } }, @@ -19846,8 +19918,7 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extract-zip": { "version": "1.7.0", @@ -19879,11 +19950,9 @@ } }, "extsprintf": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", - "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", - "dev": true, - "optional": true + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { "version": "3.1.3", @@ -19906,8 +19975,7 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "devOptional": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fastest-levenshtein": { "version": "1.0.12", @@ -20092,8 +20160,7 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "optional": true + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { "version": "4.0.0", @@ -20216,6 +20283,24 @@ "has-symbols": "^1.0.1" } }, + "get-pixels": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/get-pixels/-/get-pixels-3.3.3.tgz", + "integrity": "sha512-5kyGBn90i9tSMUVHTqkgCHsoWoR+/lGbl4yC83Gefyr0HLIhgSWEx/2F/3YgsZ7UpYNuM6pDhDK7zebrUJ5nXg==", + "requires": { + "data-uri-to-buffer": "0.0.3", + "jpeg-js": "^0.4.1", + "mime-types": "^2.0.1", + "ndarray": "^1.0.13", + "ndarray-pack": "^1.1.1", + "node-bitmap": "0.0.1", + "omggif": "^1.0.5", + "parse-data-uri": "^0.2.0", + "pngjs": "^3.3.3", + "request": "^2.44.0", + "through": "^2.3.4" + } + }, "get-port": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-2.1.0.tgz", @@ -20245,7 +20330,6 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "optional": true, "requires": { "assert-plus": "^1.0.0" } @@ -20399,14 +20483,12 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "optional": true + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "optional": true, "requires": { "ajv": "^6.12.3", "har-schema": "^2.0.0" @@ -20689,9 +20771,9 @@ } }, "http-proxy-middleware": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.5.tgz", - "integrity": "sha512-ORErEaxkjyrhifofwCuQttHPUSestLtiPDwV0qQOFB0ww6695H953wIGRnkakw1K+GAP+t8/RPbfDB75RFL4Fg==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz", + "integrity": "sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==", "dev": true, "requires": { "@types/http-proxy": "^1.17.8", @@ -20713,7 +20795,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "optional": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -20927,6 +21008,11 @@ "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, + "iota-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/iota-array/-/iota-array-1.0.0.tgz", + "integrity": "sha1-ge9X/l0FgUzVjCSDYyqZwwoOgIc=" + }, "ip": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", @@ -20962,8 +21048,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-ci": { "version": "3.0.1", @@ -21206,8 +21291,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "devOptional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "is-unicode-supported": { "version": "0.1.0", @@ -21256,8 +21340,7 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "optional": true + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "jake": { "version": "10.8.5", @@ -21293,6 +21376,11 @@ } } }, + "jpeg-js": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz", + "integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -21315,8 +21403,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsesc": { "version": "2.5.2", @@ -21344,14 +21431,12 @@ "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "optional": true + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" }, "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==", - "devOptional": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-schema-typed": { "version": "7.0.3", @@ -21361,8 +21446,7 @@ "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=", - "optional": true + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, "json5": { "version": "2.2.1", @@ -21382,7 +21466,6 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "optional": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -21393,20 +21476,12 @@ "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=", - "optional": true - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "optional": true + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "optional": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -22112,6 +22187,24 @@ "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true }, + "ndarray": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/ndarray/-/ndarray-1.0.19.tgz", + "integrity": "sha512-B4JHA4vdyZU30ELBw3g7/p9bZupyew5a7tX1Y/gGeF2hafrPaQZhgrGQfsvgfYbgdFZjYwuEcnaobeM/WMW+HQ==", + "requires": { + "iota-array": "^1.0.0", + "is-buffer": "^1.0.2" + } + }, + "ndarray-pack": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ndarray-pack/-/ndarray-pack-1.2.1.tgz", + "integrity": "sha1-jK6+qqJNXs9w/4YCBjeXfajuWFo=", + "requires": { + "cwise-compiler": "^1.1.2", + "ndarray": "^1.0.13" + } + }, "negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -22157,6 +22250,11 @@ "semver": "^7.3.5" } }, + "node-bitmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/node-bitmap/-/node-bitmap-0.0.1.tgz", + "integrity": "sha1-GA6scAPgxwdhjvMTaPYvhLKmkJE=" + }, "node-fetch": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", @@ -22216,14 +22314,14 @@ } }, "npmlog": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.1.tgz", - "integrity": "sha512-BTHDvY6nrRHuRfyjt1MAufLxYdVXZfd099H4+i1f0lPywNQyI4foeNXJRObB/uy+TYqUW0vAD9gbdSOXPst7Eg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, "requires": { "are-we-there-yet": "^3.0.0", "console-control-strings": "^1.1.0", - "gauge": "^4.0.0", + "gauge": "^4.0.3", "set-blocking": "^2.0.0" } }, @@ -22389,8 +22487,7 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "optional": true + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-assign": { "version": "4.1.1", @@ -22421,6 +22518,11 @@ "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==", "dev": true }, + "omggif": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/omggif/-/omggif-1.0.10.tgz", + "integrity": "sha512-LMJTtvgc/nugXj0Vcrrs68Mn2D1r0zf630VNtqtpI1FEO7e+O9FP4gqs9AcnBaSEeoHIPm28u6qgPR0oyEpGSw==" + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -22655,6 +22757,14 @@ "safe-buffer": "^5.1.1" } }, + "parse-data-uri": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/parse-data-uri/-/parse-data-uri-0.2.0.tgz", + "integrity": "sha1-vwTYUd1ch7CrI45dAazklLYEtMk=", + "requires": { + "data-uri-to-buffer": "0.0.3" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -22752,8 +22862,7 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "optional": true + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "picocolors": { "version": "1.0.0", @@ -22853,6 +22962,11 @@ } } }, + "pngjs": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz", + "integrity": "sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==" + }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -23316,8 +23430,7 @@ "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "optional": true + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" }, "public-encrypt": { "version": "4.0.3", @@ -23375,13 +23488,13 @@ } }, "puppeteer-core": { - "version": "13.5.2", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.5.2.tgz", - "integrity": "sha512-uxHOWCHt9mGUCLu8qtbEy3UqHlBRMzGCyPmAeoq2KrtmPOC0ZJPRZrDLWJMG3E/gwuHinDtZnBbnFfRfk/PABg==", + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-13.6.0.tgz", + "integrity": "sha512-n692xT9uOTxbFKcCRkfOT2Go5LL0YBCHrSpBdbNsjLhcxO5yuhj2/4jgAIK9bT1blY17Pb4I35eBSuDzJ54ERw==", "requires": { "cross-fetch": "3.1.5", "debug": "4.3.4", - "devtools-protocol": "0.0.969999", + "devtools-protocol": "0.0.981744", "extract-zip": "2.0.1", "https-proxy-agent": "5.0.0", "pkg-dir": "4.2.0", @@ -23445,10 +23558,9 @@ } }, "qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==", - "dev": true + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" }, "querystring": { "version": "0.2.0", @@ -23711,7 +23823,6 @@ "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "optional": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -23739,24 +23850,16 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "optional": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "optional": true - }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "optional": true + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" } } }, @@ -23896,8 +23999,7 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "devOptional": true + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sanitize-filename": { "version": "1.6.3", @@ -24371,7 +24473,6 @@ "version": "1.17.0", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "optional": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -24805,7 +24906,6 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "optional": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -24814,8 +24914,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" } } }, @@ -24834,9 +24933,9 @@ } }, "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", + "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, "tty-browserify": { @@ -24856,7 +24955,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "optional": true, "requires": { "safe-buffer": "^5.0.1" } @@ -24864,8 +24962,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "type-fest": { "version": "1.4.0", @@ -24934,6 +25031,11 @@ "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", "dev": true }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" + }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -25697,9 +25799,9 @@ "dev": true }, "whatsapp-web-electron.js": { - "version": "1.16.5-1", - "resolved": "https://registry.npmjs.org/whatsapp-web-electron.js/-/whatsapp-web-electron.js-1.16.5-1.tgz", - "integrity": "sha512-K0lM6V7O05TCWNOtARFjZmTMtn3JN6HQvLOoeXV/P5FrMoSXhurdVMXz6ekwMSgPuuqaJBVKvVRpuI60H5jsJw==", + "version": "1.16.6-1", + "resolved": "https://registry.npmjs.org/whatsapp-web-electron.js/-/whatsapp-web-electron.js-1.16.6-1.tgz", + "integrity": "sha512-wRHGSVBz0jtZViDg82ctVF8HOGbSwJ8gwpaACeyyrtsmBP8pjFHDJP7Nxbnws4JFyYhX2pCIgXoFSOXb53xriw==", "requires": { "@pedroslopez/moduleraid": "^5.0.2", "fluent-ffmpeg": "^2.1.2", diff --git a/package.json b/package.json index 9de7244..291f1b5 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "src/main.js", "scripts": { "start": "electron .", - "clean": "rm -rf dist", - "dist": "npm run prod && npm run clean && npm run rebuild-deps && npm run build", + "clean": "rm -rf dist && rm -rf public/js/*", + "dist": "npm run clean && npm run prod && npm run rebuild-deps && npm run build", "build": "electron-builder", "rebuild-deps": "electron-rebuild", "dev": "npm run development", @@ -88,6 +88,7 @@ "electron-store": "^8.0.1", "electron-updater": "^4.6.5", "electron-window-state": "^5.0.3", + "get-pixels": "^3.3.3", "get-port-sync": "^1.0.1", "is-online": "^9.0.1", "lsb-release": "^0.1.0", @@ -96,6 +97,6 @@ "puppeteer-in-electron": "^3.0.5", "vue-router": "^3.5.3", "vuex": "^3.6.2", - "whatsapp-web-electron.js": "^1.16.5-1" + "whatsapp-web-electron.js": "^1.16.6-1" } } diff --git a/src/Main/InstanceManager.js b/src/Main/InstanceManager.js index 47198c3..0d2307a 100644 --- a/src/Main/InstanceManager.js +++ b/src/Main/InstanceManager.js @@ -72,6 +72,7 @@ module.exports = class InstanceManager { 'archiveAllChats', 'markAllChatsAsRead', 'integrateToDesktop', + 'chatNotification', ].forEach((func) => { ipcMain.handle(`instance.main.${func}`, (event, id, ...args) => { this.instances[id].main[func](...args); diff --git a/src/Main/MainWindow.js b/src/Main/MainWindow.js index d232d3f..83e0254 100644 --- a/src/Main/MainWindow.js +++ b/src/Main/MainWindow.js @@ -2,12 +2,14 @@ const path = require('path'); const fs = require('fs'); const homedir = require('os').homedir(); const createDesktopShortcut = require('create-desktop-shortcuts'); -const { app, dialog, BrowserWindow, Notification } = require("electron"); +const { app, dialog, BrowserWindow, Notification, nativeImage } = require("electron"); const windowStateKeeper = require("electron-window-state"); const settings = require('./settings'); const pie = require("puppeteer-in-electron"); const puppeteer = require("puppeteer-core"); const { Client } = require('whatsapp-web-electron.js'); +const { Notify } = require('./Notify'); +const getPixels = require("get-pixels"); // const getPortSync = require('get-port-sync'); const ICON_PATH = path.join(__dirname, '../icons/logo360x360.png'); @@ -219,6 +221,63 @@ module.exports = class MainWindow extends BrowserWindow { }); } + async getImageData(dataUrl) { + const iconImage = nativeImage.createFromDataURL(dataUrl); + const { width, height } = iconImage.getSize(); + + return new Promise((resolve) => { + getPixels(iconImage.toPNG(), 'image/png', (err, pixels) => { + const imageData = []; + if(err) { + console.log("Bad image path", err) + resolve(null); + return; + } + for (let y = 0; y < pixels.shape[1]; y++) { + for (let x = 0; x < pixels.shape[0]; x++) { + [0, 1, 2, 3].forEach((i) => { + imageData.push(pixels.get(x, y, i)); + }); + } + } + + resolve({ + width, + height, + hasAlpha: true, + data: imageData, + }); + }); + }); + } + + async chatNotification(options) { + const { title, body, icon, tag } = options; + const desktopEntry = path.join(homedir, '.local/share/applications/WALC.desktop'); + const notif = new Notify({ + summary: title, + body, + timeout: 5000, + appName: 'WALC', + hints: { + desktopEntry, + imageData: await this.getImageData(icon), + }, + }); + + notif.addAction('Mark as read', async() => { + console.log('marked as read'); + (await this.whatsapp.getChatById(tag)).sendSeen(); + }); + + notif.addInlineReply('Reply', async (reply) => { + console.log('replied', reply); + (await this.whatsapp.getChatById(tag)).sendMessage(reply); + }); + + notif.show(); + } + async initWhatsapp() { this.loadURL('about:blank', { userAgent }).then(async () => { const pieBrowser = await pie.connect(app, puppeteer); @@ -227,11 +286,14 @@ module.exports = class MainWindow extends BrowserWindow { this.whatsapp = new Client(pieBrowser, this); this.whatsappReady = false; - this.whatsapp.on('ready', () => { + this.whatsapp.on('ready', async () => { console.log('Whatsapp client ready'); this.whatsappReady = true; this.webContents.send('ready', this._id); this.emit('ready'); + + const chats = await this.whatsapp.getChats(); + console.log(chats[0].id._serialized); }); this.whatsapp.on("change_battery", (batteryInfo) => { diff --git a/src/Main/Notify.js b/src/Main/Notify.js new file mode 100644 index 0000000..5aaebc6 --- /dev/null +++ b/src/Main/Notify.js @@ -0,0 +1,349 @@ +const EventEmitter = require('events'); +const { sessionBus: SessionBus, Variant } = require('dbus-next'); + +let externalSessionBus; +let selfSessionBus; +let Notifications; +let getInterfaceStat = false; +let supportsInlineReply; +const notificationCounter = []; + +const Config = { + autoDisconnectSessionBus: true, +}; + +const notifierEmitter = new EventEmitter(); + +const disconnectSessionBus = function disconnectSessionBus() { + if (!selfSessionBus) { + return; + } + // Save it for delayed disconnection. + const sessionBus = selfSessionBus; + selfSessionBus = undefined; + // dbus-next bug + // disconnecting the dbus connection immediately will throw an error, so let's delay the disconnection just in case. + setTimeout(() => { + sessionBus.disconnect(); + }, 100); +}; + +const actionInvoked = function actionInvoked(id, actionKey) { + notifierEmitter.emit(`ActionInvoked:${id}`, actionKey); +}; + +const notificationClosed = function notificationClosed(id, reason) { + notifierEmitter.emit(`NotificationClosed:${id}`, reason); +}; + +const notificationReplied = function notificationReplied(id, reply) { + notifierEmitter.emit(`NotificationReplied:${id}`, reply); +}; + +const bindNotifications = function bindNotifications(notificationInterface) { + // Since the NotificationClosed event will fire when any notification is closed + // using ID to trigger the event here allows us to use once() elsewhere without binding too many events. + notificationInterface.on('ActionInvoked', actionInvoked); + notificationInterface.on('NotificationClosed', notificationClosed); + Notify.supportsInlineReply().then((supported) => { + if(supported) { + notificationInterface.on('NotificationReplied', notificationReplied); + } + }); + Notifications = notificationInterface; + return Notifications; +}; + +const unsetNotifications = function unsetNotifications() { + if (!Notifications) { + return; + } + Notifications.off('ActionInvoked', actionInvoked); + Notifications.off('NotificationClosed', notificationClosed); + Notifications.off('NotificationReplied', notificationReplied); + Notifications = undefined; +}; + +const getSessionBus = function getSessionBus() { + if (externalSessionBus) { + return externalSessionBus; + } + if (!selfSessionBus) { + selfSessionBus = SessionBus(); + } + return selfSessionBus; +}; + +const setSessionBus = function setSessionBus(sessionBus) { + unsetNotifications(); + disconnectSessionBus(); + externalSessionBus = sessionBus; + Config.autoDisconnectSessionBus = Config.autoDisconnectSessionBus && !sessionBus; +}; + +const getInterface = function getInterface() { + if (Notifications) { + return Promise.resolve(Notifications); + } + if (getInterfaceStat) { + return new Promise((resolve, reject) => { + notifierEmitter.once('getInterface', resolve); + notifierEmitter.once('getInterfaceError', reject); + }); + } + getInterfaceStat = true; + return new Promise((reslove, reject) => { + getSessionBus().getProxyObject('org.freedesktop.Notifications', '/org/freedesktop/Notifications') + .then((obj) => { + const i = bindNotifications(obj.getInterface('org.freedesktop.Notifications')); + notifierEmitter.emit('getInterface', i); + reslove(i); + }) + .catch((err) => { + if (Config.autoDisconnectSessionBus) { + disconnectSessionBus(); + } + notifierEmitter.emit('getInterfaceError', err); + reject(err); + }) + .finally(() => { + getInterfaceStat = false; + }); + }); +}; + +const setInterface = function setInterface(notificationInterface) { + unsetNotifications(); + disconnectSessionBus(); + if (notificationInterface) { + bindNotifications(notificationInterface); + } else { + // Get a new one to continue processing old events. + getInterface(); + } +}; + +const genIdentifier = function* genIdentifier() { + let IX = 0; + while (true) { + IX = IX >= 25 ? 0 : IX + 1; + const ide = String.fromCharCode(64 + IX); + yield ide; + } +}; +const identifier = genIdentifier(); + +notifierEmitter.on('push', () => { + notificationCounter.push(true); +}); + +notifierEmitter.on('pop', () => { + notificationCounter.pop(); + if (Config.autoDisconnectSessionBus && selfSessionBus && notificationCounter.length === 0) { + unsetNotifications(); + disconnectSessionBus(); + } +}); + +const actionInvokedSymbol = Symbol('actionInvoked'); + +class Notify extends EventEmitter { + #id = 0; + + #status = 0; + + #actionCallbacks = new Map(); + + #config = {}; + + [actionInvokedSymbol](actionKey) { + const callback = this.#actionCallbacks.get(actionKey); + if (callback) { + callback(); + } + } + + static supportsInlineReply() { + return new Promise((resolve, reject) => { + if(typeof supportsInlineReply !== 'undefined') { + return resolve(supportsInlineReply); + } + getInterface() + .then((i) => { + i.GetCapabilities() + .then((capabilities) => { + supportsInlineReply = capabilities.includes('inline-reply'); + resolve(supportsInlineReply); + }) + .catch(reject); + }) + .catch(reject); + }); + } + + get id() { + return this.#id; + } + + get status() { + return this.#status; + } + + constructor(config) { + super(); + this.#config = { + appName: config.appName || '', + replacesId: config.replacesId || 0, + appIcon: config.appIcon || '', + summary: config.summary || '', + body: config.body || '', + actions: [], + hints: {}, + timeout: config.timeout || 0, + }; + const hints = config.hints || {}; + if (typeof hints.actionIcons === 'boolean') { + this.#config.hints['action-icons'] = new Variant('b', hints.actionIcons); + } + if (typeof hints.category === 'string') { + // eslint-disable-next-line dot-notation + this.#config.hints['category'] = new Variant('s', hints.category); + } + if (typeof hints.desktopEntry === 'string') { + this.#config.hints['desktop-entry'] = new Variant('s', hints.desktopEntry); + } + if (typeof hints.imagePath === 'string') { + this.#config.hints['image-path'] = new Variant('s', hints.imagePath); + } + if (typeof hints.imageData === 'object' && hints.imageData) { + const channel = (hints.imageData.hasAlpha ? 4 : 3); + this.#config.hints['image-data'] = new Variant('(iiibiiay)', [ + hints.imageData.width, + hints.imageData.height, + hints.imageData.width * channel, + hints.imageData.hasAlpha, + 8, + channel, + hints.imageData.data, + ]); + } + if (typeof hints.resident === 'boolean') { + // eslint-disable-next-line dot-notation + this.#config.hints['resident'] = new Variant('b', hints.resident); + } + if (typeof hints.soundFile === 'string') { + this.#config.hints['sound-file'] = new Variant('s', hints.soundFile); + } + if (typeof hints.soundName === 'string') { + this.#config.hints['sound-name'] = new Variant('s', hints.soundName); + } + if (typeof hints.suppressSound === 'boolean') { + this.#config.hints['suppress-sound'] = new Variant('b', hints.suppressSound); + } + if (typeof hints.transient === 'boolean') { + // eslint-disable-next-line dot-notation + this.#config.hints['transient'] = new Variant('b', hints.transient); + } + if (typeof hints.x === 'number') { + // eslint-disable-next-line dot-notation + this.#config.hints['x'] = new Variant('i', hints.x); + } + if (typeof hints.y === 'number') { + // eslint-disable-next-line dot-notation + this.#config.hints['y'] = new Variant('i', hints.y); + } + if (typeof hints.urgency === 'number') { + // eslint-disable-next-line dot-notation + this.#config.hints['urgency'] = new Variant('y', hints.urgency); + } + } + + addAction(actionText, callback) { + const actionKey = `__action_key__::${identifier.next().value}`; + this.#config.actions.push(actionKey, actionText); + this.#actionCallbacks.set(actionKey, callback); + return this; + } + + addInlineReply(actionText, callback) { + const actionKey = 'inline-reply'; + this.#config.actions.push(actionKey, actionText); + this.#actionCallbacks.set(actionKey, callback); + return this; + } + + close() { + if (this.#id !== 0) { + return getInterface().CloseNotification(this.#id); + } + return Promise.resolve(); + } + + removeAction(actionText) { + const x = this.#config.actions.indexOf(actionText); + if (x !== -1) { + this.#config.actions.splice(x - 1, 2); + } + return this; + } + + show() { + const params = [ + this.#config.appName, + this.#config.replacesId, + this.#config.appIcon, + this.#config.summary, + this.#config.body, + this.#config.actions, + this.#config.hints, + this.#config.timeout, + ]; + return new Promise((resolve, reject) => { + getInterface() + .then((i) => { + i.Notify(...params) + .then((id) => { + const invoked = this[actionInvokedSymbol].bind(this); + const replied = (reply) => { + const callback = this.#actionCallbacks.get('inline-reply'); + if (callback) { + callback(reply); + } + }; + + notifierEmitter.on(`ActionInvoked:${id}`, invoked); + notifierEmitter.on(`NotificationReplied:${id}`, replied); + + notifierEmitter.once(`NotificationClosed:${id}`, (reason) => { + this.#status = 2; + notifierEmitter.off(`ActionInvoked:${id}`, invoked); + notifierEmitter.off(`NotificationReplied:${id}`, replied); + notifierEmitter.emit('pop'); + const result = { + id, + reason, + }; + this.emit('close', result); + resolve(result); + }); + this.#id = id; + this.#status = 1; + notifierEmitter.emit('push'); + this.emit('show', id); + }) + .catch(reject); + }) + .catch(reject); + }); + } +} + +module.exports = { + Notify, + Config, + disconnectSessionBus, + getInterface, + setInterface, + getSessionBus, + setSessionBus, +}; diff --git a/src/Main/settings.js b/src/Main/settings.js index d78d275..37c51bb 100644 --- a/src/Main/settings.js +++ b/src/Main/settings.js @@ -49,6 +49,13 @@ const schema = { type: 'checkbox', depends: 'enabled', }, + legacyType: { + default: false, + name: 'Use old notification method', + description: 'Enable this if you have problem with the new notification', + type: 'checkbox', + depends: 'enabled', + }, }, trayIcon: { enabled: { diff --git a/src/Renderer/CustomNotification.js b/src/Renderer/CustomNotification.js new file mode 100644 index 0000000..b841968 --- /dev/null +++ b/src/Renderer/CustomNotification.js @@ -0,0 +1,64 @@ +const { ipcRenderer } = require('electron'); +const Settings = require('./Settings'); + +class LegacyNotification extends Notification { + constructor(title, options) { + if(Settings.get('notification.enabled.value')) { + const { tag, renotify, ...filteredOptions } = options; + console.log('notify', options); + + super(title, filteredOptions); + this.addEventListener('click', function () { + ipcRenderer.send('focusWindow'); + }); + } + } +} + +class ServerNotification { + constructor(title, options) { + console.log('notify', options); + this.serverNotif(title, options); + } + + async serverNotif(title, options) { + try { + await window.Store?.Contact?.find(options.tag); + const blob = await fetch(options.icon).then((r) => r.blob()); + + const reader = new FileReader(); + reader.onload = (event) => { + const serverNotif = { + ...options, + title, + icon: event.target.result, + }; + ipcRenderer.invoke('instance.main.chatNotification', 'walc', serverNotif); + }; + reader.readAsDataURL(blob); + } catch(err) { + console.log('Server notification error', err) + } + } + + static permission = 'granted'; + static maxActions = 3; + + static requestPermission(callback) { + return new Promise((resolve, reject) => { + if(typeof callback === 'function') { + callback('granted'); + } + resolve('granted'); + }); + } + + close() { + // TODO: close server notification early + } +} + +module.exports = { + LegacyNotification, + ServerNotification, +} \ No newline at end of file diff --git a/src/Renderer/Instance.js b/src/Renderer/Instance.js index 98a61e2..8e493fc 100644 --- a/src/Renderer/Instance.js +++ b/src/Renderer/Instance.js @@ -1,4 +1,5 @@ const { ipcRenderer } = require('electron'); +const { LegacyNotification, ServerNotification } = require('./CustomNotification'); const Settings = require('./Settings'); class Instance { @@ -20,16 +21,16 @@ class Instance { initNotification() { // override Notification API so it can show the window on click window.oldNotification = Notification; - window.Notification = function (title, options) { - if(Settings.get('notification.enabled.value')) { - const n = new window.oldNotification(title, options); - n.addEventListener('click', function () { - ipcRenderer.send('focusWindow'); - }); - return n; - } - }; - Object.assign(window.Notification, window.oldNotification); + Settings.onDidChange('notification.legacyType', this.setNotification); + this.setNotification(); + } + + setNotification() { + if(Settings.get('notification.legacyType.value')) { + window.Notification = LegacyNotification; + } else { + window.Notification = ServerNotification; + } } installAppIcon(icon) { diff --git a/src/Renderer/Settings.js b/src/Renderer/Settings.js index 57132d3..254e255 100644 --- a/src/Renderer/Settings.js +++ b/src/Renderer/Settings.js @@ -1,12 +1,24 @@ const { ipcRenderer } = require('electron'); +const EventEmitter = require('events'); + +const settingsEmitter = new EventEmitter(); class Settings { + constructor() { + ipcRenderer.on('settingsChange', (event, key, value) => { + settingsEmitter.emit(key, value); + }); + } get(key = null) { return ipcRenderer.sendSync('getSettings', key); } set(values = {}) { return ipcRenderer.sendSync('setSettings', values); } + onDidChange(key, handler) { + settingsEmitter.addListener(key, handler); + ipcRenderer.send('watchSettings', key); + } } module.exports = new Settings(); \ No newline at end of file diff --git a/src/main.js b/src/main.js index 1f071f1..52f7d25 100644 --- a/src/main.js +++ b/src/main.js @@ -143,6 +143,12 @@ ipcMain.on('setSettings', (event, values) => { event.returnValue = true; }); +ipcMain.on('watchSettings', (event, key) => { + settings.onDidChange(key, (value) => { + event.sender.send('settingsChange', key, value); + }); +}) + ipcMain.handle('getIcon', () => { return nativeImage.createFromPath(ICON_PATH).toDataURL(); });