From c30714863b0f5e5fdfa0acbb4c4c5d57c2952c8e Mon Sep 17 00:00:00 2001 From: Craig Kendall Date: Mon, 21 Jun 2021 16:16:16 -0600 Subject: [PATCH] Reproduce Issue 25484 nextjs https://github.com/vercel/next.js/issues/25484 --- deep.thought.js | 7 + jsconfig.json | 18 + next.config.js | 42 ++ package-lock.json | 1643 ++++++++++++++++--------------------------- package.json | 2 +- pages/api/hello.js | 17 +- pages/index.js | 52 +- src/scripts/util.js | 1081 ++++++++++++++++++++++++++++ 8 files changed, 1814 insertions(+), 1048 deletions(-) create mode 100644 deep.thought.js create mode 100644 jsconfig.json create mode 100644 next.config.js create mode 100644 src/scripts/util.js diff --git a/deep.thought.js b/deep.thought.js new file mode 100644 index 0000000..7d56f11 --- /dev/null +++ b/deep.thought.js @@ -0,0 +1,7 @@ +import { guid } from "@/scripts/util"; + +self.onmessage = ({ data: { question } }) => { + self.postMessage({ + answer: guid(), + }); +}; \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..6162202 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/src/*": ["src/*"], + "@/components/*": ["src/components/*"], + "@/functions/*": ["src/components/functions/*"], + "@/services/*": ["src/components/services/*"], + "@/workers/*": ["src/components/workers/*"], + "@/context/*": ["src/context/*"], + "@/data/*": ["src/data/*"], + "@/scripts/*": ["src/scripts/*"], + "@/store/*": ["store/*"], + "@/__mocks__/*": ["__mocks__/*"], + "@/pages/*": ["pages/*"] + } + } +} \ No newline at end of file diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..52888ef --- /dev/null +++ b/next.config.js @@ -0,0 +1,42 @@ +const nextConfig = { + serverRuntimeConfig: { + // Will only be available on the server side + mySecret: 'secret', + secondSecret: process.env.SECOND_SECRET, // Pass through env variables + }, + publicRuntimeConfig: { + // Will be available on both server and client + staticFolder: '/static', + butthead: true + }, + webpack: (config, options) => { + config.optimization.splitChunks = { + chunks: (chunk) => !/^(polyfills|main|pages\/_app)$/.test(chunk.name), + minSize: 20000, + minRemainingSize: 0, + minChunks: 1, + maxAsyncRequests: 30, + maxInitialRequests: 25, + enforceSizeThreshold: 50000, + cacheGroups: { + defaultVendors: false, + default: false, + framework: { + chunks: 'all', + name: 'framework', + test: /(?= 2.1.2 < 3" + "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "ieee754": { @@ -1206,22 +877,31 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, + "image-size": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz", + "integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==", + "requires": { + "queue": "6.0.2" + } + }, "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "optional": true + "is-arguments": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", + "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", + "requires": { + "call-bind": "^1.0.0" + } }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "optional": true + "is-bigint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" }, "is-binary-path": { "version": "2.1.0", @@ -1231,19 +911,33 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", + "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-callable": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" + }, + "is-date-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==" + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, - "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=", - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } + "is-generator-function": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", + "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==" }, "is-glob": { "version": "4.0.1", @@ -1253,31 +947,92 @@ "is-extglob": "^2.1.1" } }, + "is-nan": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", + "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, + "is-number-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" + }, + "is-regex": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", + "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", + "requires": { + "call-bind": "^1.0.2", + "has-symbols": "^1.0.2" + } + }, + "is-string": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" + }, + "is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "requires": { + "has-symbols": "^1.0.2" + } + }, + "is-typed-array": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.5.tgz", + "integrity": "sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug==", + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.0-next.2", + "foreach": "^2.0.5", + "has-symbols": "^1.0.1" + } + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "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" - } - }, "jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "version": "27.0.0-next.5", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.0-next.5.tgz", + "integrity": "sha512-mk0umAQ5lT+CaOJ+Qp01N6kz48sJG2kr2n1rX0koqKf6FIygQV0qLOdN9SCYID4IVeSigDOcPeGLozdMLYfb5g==", "requires": { + "@types/node": "*", "merge-stream": "^2.0.0", - "supports-color": "^6.1.0" + "supports-color": "^8.0.0" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + } } }, "js-tokens": { @@ -1293,15 +1048,6 @@ "minimist": "^1.2.0" } }, - "line-column": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/line-column/-/line-column-1.0.2.tgz", - "integrity": "sha1-0lryk2tvSEkXKzEuR5LR2Ye8NKI=", - "requires": { - "isarray": "^1.0.0", - "isobject": "^2.0.0" - } - }, "loader-utils": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", @@ -1321,9 +1067,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.sortby": { "version": "4.7.0", @@ -1338,14 +1084,6 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "requires": { - "yallist": "^4.0.0" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -1379,18 +1117,12 @@ }, "dependencies": { "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "optional": true - }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -1406,27 +1138,15 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "optional": true - }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "optional": true + "version": "3.1.23", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", + "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==" }, "native-url": { "version": "0.3.4", @@ -1437,73 +1157,62 @@ } }, "next": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/next/-/next-10.0.6.tgz", - "integrity": "sha512-uM5Yv4Ha9iL6Lbg7Ez36GyJ0YTdRLzXLA9b1REH3rX2Wytw0Ls5qPuFGk4BHSQpQhYx6Z61iA2qPkGl33W4iBg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/next/-/next-11.0.0.tgz", + "integrity": "sha512-1OA0ccCTwVtdLats/1v7ReiBVx+Akya0UVhHo9IBr8ZkpDI3/SGNcaruJBp5agy8ROF97VDKkZamoUXxRB9NUA==", "requires": { - "@ampproject/toolbox-optimizer": "2.7.1-alpha.0", "@babel/runtime": "7.12.5", - "@hapi/accept": "5.0.1", - "@next/env": "10.0.6", - "@next/polyfill-module": "10.0.6", - "@next/react-dev-overlay": "10.0.6", - "@next/react-refresh-utils": "10.0.6", - "@opentelemetry/api": "0.14.0", + "@hapi/accept": "5.0.2", + "@next/env": "11.0.0", + "@next/polyfill-module": "11.0.0", + "@next/react-dev-overlay": "11.0.0", + "@next/react-refresh-utils": "11.0.0", + "assert": "2.0.0", "ast-types": "0.13.2", - "browserslist": "4.16.1", + "browserify-zlib": "0.2.0", + "browserslist": "4.16.6", "buffer": "5.6.0", - "caniuse-lite": "^1.0.30001179", + "caniuse-lite": "^1.0.30001228", "chalk": "2.4.2", "chokidar": "3.5.1", + "constants-browserify": "1.0.0", "crypto-browserify": "3.12.0", - "cssnano-simple": "1.2.2", + "cssnano-simple": "2.0.0", + "domain-browser": "4.19.0", + "encoding": "0.1.13", "etag": "1.8.1", "find-cache-dir": "3.3.1", - "jest-worker": "24.9.0", + "get-orientation": "1.1.2", + "https-browserify": "1.0.0", + "image-size": "1.0.0", + "jest-worker": "27.0.0-next.5", "native-url": "0.3.4", "node-fetch": "2.6.1", "node-html-parser": "1.4.9", "node-libs-browser": "^2.2.1", + "os-browserify": "0.3.0", "p-limit": "3.1.0", "path-browserify": "1.0.1", "pnp-webpack-plugin": "1.6.4", - "postcss": "8.1.7", + "postcss": "8.2.13", "process": "0.11.10", "prop-types": "15.7.2", + "querystring-es3": "0.2.1", "raw-body": "2.4.1", - "react-is": "16.13.1", + "react-is": "17.0.2", "react-refresh": "0.8.3", - "sharp": "0.26.3", "stream-browserify": "3.0.0", + "stream-http": "3.1.1", + "string_decoder": "1.3.0", "styled-jsx": "3.3.2", + "timers-browserify": "2.0.12", + "tty-browserify": "0.0.1", "use-subscription": "1.5.1", + "util": "0.12.3", "vm-browserify": "1.1.2", - "watchpack": "2.0.0-beta.13" - } - }, - "node-abi": { - "version": "2.19.3", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.19.3.tgz", - "integrity": "sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg==", - "optional": true, - "requires": { - "semver": "^5.4.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "optional": true - } + "watchpack": "2.1.1" } }, - "node-addon-api": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz", - "integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==", - "optional": true - }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -1547,6 +1256,25 @@ "vm-browserify": "^1.0.1" }, "dependencies": { + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "requires": { + "inherits": "2.0.1" + } + } + } + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -1557,6 +1285,16 @@ "isarray": "^1.0.0" } }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" + }, + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" + }, "path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", @@ -1581,6 +1319,11 @@ "util-deprecate": "~1.0.1" }, "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1604,60 +1347,84 @@ "inherits": "~2.0.1", "readable-stream": "^2.0.2" } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + } + } } } }, "node-releases": { - "version": "1.1.70", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.70.tgz", - "integrity": "sha512-Slf2s69+2/uAD79pVVQo8uSiC34+g8GWY8UH2Qtqv34ZfhYrxpYpfzs9Js9d6O0mbDmALuxaTlplnBTnSELcrw==" - }, - "noop-logger": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=", - "optional": true - }, - "normalize-html-whitespace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-html-whitespace/-/normalize-html-whitespace-1.0.0.tgz", - "integrity": "sha512-9ui7CGtOOlehQu0t/OhhlmDyc71mKVlv+4vF+me4iZLPrNtRL2xoquEdfZxasC/bdQi/Hr3iTrpyRKIG+ocabA==" + "version": "1.1.73", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz", + "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==" }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "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", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "optional": true - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "optional": true, + "object-inspect": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" + }, + "object-is": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", + "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", "requires": { - "wrappy": "1" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" } }, "os-browserify": { @@ -1724,9 +1491,9 @@ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -1736,9 +1503,9 @@ } }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, "pkg-dir": { "version": "4.2.0", @@ -1762,69 +1529,19 @@ } }, "postcss": { - "version": "8.1.7", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.1.7.tgz", - "integrity": "sha512-llCQW1Pz4MOPwbZLmOddGM9eIJ8Bh7SZ2Oj5sxZva77uVaotYDsYTch1WBTNu7fUY0fpWp0fdt7uW40D4sRiiQ==", + "version": "8.2.13", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.13.tgz", + "integrity": "sha512-FCE5xLH+hjbzRdpbRb1IMCvPv9yZx2QnDarBEYSN0N0HYk+TcXsEhwdFcFb+SRWOKzKGErhIEbBK2ogyLdTtfQ==", "requires": { - "colorette": "^1.2.1", - "line-column": "^1.0.2", - "nanoid": "^3.1.16", + "colorette": "^1.2.2", + "nanoid": "^3.1.22", "source-map": "^0.6.1" - } - }, - "postcss-safe-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", - "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", - "requires": { - "postcss": "^7.0.26" }, "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - } - } - }, - "prebuild-install": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.0.0.tgz", - "integrity": "sha512-h2ZJ1PXHKWZpp1caLw0oX9sagVpL2YTk+ZwInQbQ3QqNd4J03O6MpFNmMTJlkfgPENWqe5kP0WjQLqz5OjLfsw==", - "optional": true, - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.7.0", - "noop-logger": "^0.1.1", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0", - "which-pm-runs": "^1.0.0" - }, - "dependencies": { - "simple-get": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", - "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", - "optional": true, - "requires": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -1846,6 +1563,13 @@ "loose-envify": "^1.4.0", "object-assign": "^4.1.1", "react-is": "^16.8.1" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } } }, "public-encrypt": { @@ -1862,37 +1586,35 @@ }, "dependencies": { "bn.js": { - "version": "4.11.9", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", - "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==" + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" } } }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "optional": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.1.tgz", + "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==" }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, + "queue": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", + "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", + "requires": { + "inherits": "~2.0.3" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -1919,18 +1641,16 @@ "http-errors": "1.7.3", "iconv-lite": "0.4.24", "unpipe": "1.0.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "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" + } + } } }, "react": { @@ -1953,9 +1673,9 @@ } }, "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "react-refresh": { "version": "0.8.3", @@ -2005,9 +1725,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "scheduler": { - "version": "0.20.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.1.tgz", - "integrity": "sha512-LKTe+2xNJBNxu/QhHvDR14wUXHRQbVY5ZOYpOGWRzhydZUqrLb2JBvLPY7cAqFmqrWuDED0Mjk7013SZiOz6Bw==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1" @@ -2018,12 +1738,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "optional": true - }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -2043,101 +1757,17 @@ "safe-buffer": "^5.0.1" } }, - "sharp": { - "version": "0.26.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.26.3.tgz", - "integrity": "sha512-NdEJ9S6AMr8Px0zgtFo1TJjMK/ROMU92MkDtYn2BBrDjIx3YfH9TUyGdzPC+I/L619GeYQc690Vbaxc5FPCCWg==", - "optional": true, - "requires": { - "array-flatten": "^3.0.0", - "color": "^3.1.3", - "detect-libc": "^1.0.3", - "node-addon-api": "^3.0.2", - "npmlog": "^4.1.2", - "prebuild-install": "^6.0.0", - "semver": "^7.3.2", - "simple-get": "^4.0.0", - "tar-fs": "^2.1.1", - "tunnel-agent": "^0.6.0" - }, - "dependencies": { - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "optional": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, "shell-quote": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==" }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "optional": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "optional": true - }, - "simple-get": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.0.tgz", - "integrity": "sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ==", - "optional": true, - "requires": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - }, - "dependencies": { - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "optional": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "optional": true - } - } - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "optional": true, - "requires": { - "is-arrayish": "^0.3.1" - } - }, "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.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "whatwg-url": "^7.0.0" } }, "stacktrace-parser": { @@ -2163,44 +1793,22 @@ } }, "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", + "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", "requires": { "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "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" - } - }, - "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==" - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } - } + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "stream-parser": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", + "integrity": "sha1-FhhUhpRCACGhGC/wrxkRwSl2F3M=", + "requires": { + "debug": "2" } }, "string-hash": { @@ -2208,32 +1816,22 @@ "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=" }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "optional": true, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "optional": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" } }, "string_decoder": { @@ -2252,12 +1850,6 @@ "ansi-regex": "^5.0.0" } }, - "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=", - "optional": true - }, "styled-jsx": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-3.3.2.tgz", @@ -2291,55 +1883,13 @@ "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==" }, "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "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" } }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "optional": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "optional": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "terser": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", - "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", - "requires": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" - } - } - }, "timers-browserify": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", @@ -2385,24 +1935,26 @@ "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==" }, "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "tunnel-agent": { - "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" - } + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==" }, "type-fest": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==" }, + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -2421,6 +1973,11 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" } } }, @@ -2433,18 +1990,16 @@ } }, "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.3.tgz", + "integrity": "sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog==", "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "safe-buffer": "^5.1.2", + "which-typed-array": "^1.1.2" } }, "util-deprecate": { @@ -2458,9 +2013,9 @@ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==" }, "watchpack": { - "version": "2.0.0-beta.13", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.0.0-beta.13.tgz", - "integrity": "sha512-ZEFq2mx/k5qgQwgi6NOm+2ImICb8ngAkA/rZ6oyXZ7SgPn3pncf+nfhYTCrs3lmHwOxnPtGLTOuFLfpSMh1VMA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.1.tgz", + "integrity": "sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==", "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -2481,37 +2036,37 @@ "webidl-conversions": "^4.0.2" } }, - "which-pm-runs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", - "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=", - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "optional": true, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "requires": { - "string-width": "^1.0.2 || 2" + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" } }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "optional": true + "which-typed-array": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz", + "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==", + "requires": { + "available-typed-arrays": "^1.0.2", + "call-bind": "^1.0.0", + "es-abstract": "^1.18.0-next.1", + "foreach": "^2.0.5", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.1", + "is-typed-array": "^1.1.3" + } }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 6d3bfb0..faa2a0d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "start": "next start" }, "dependencies": { - "next": "10.0.6", + "next": "^11.0.0", "react": "17.0.1", "react-dom": "17.0.1" } diff --git a/pages/api/hello.js b/pages/api/hello.js index 9987aff..4f3a3f7 100644 --- a/pages/api/hello.js +++ b/pages/api/hello.js @@ -1,5 +1,18 @@ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction -export default (req, res) => { - res.status(200).json({ name: 'John Doe' }) + +const getName = () => { + let random = Math.floor(Math.random() * 2); // returns a random integer from 0 to 1 + + if (random === 0) { + return { name: 'Random0 Doe' }; + } + if (random === 1) { + return { name: 'Random1 Doe' }; + } + } + +export default { + getName +} \ No newline at end of file diff --git a/pages/index.js b/pages/index.js index 5787b11..b460139 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,7 +1,37 @@ import Head from 'next/head' import styles from '../styles/Home.module.css' +import Hello from "./api/hello"; +import getConfig, { setConfig } from 'next/config'; +import { publicRuntimeConfig } from "../next.config" -export default function Home() { +const { serverRuntimeConfig } = getConfig() +var newPublicRuntimeConfig = { + // Will be available on both server and client + staticFolder: '/static', + setViaSetConfig: true +} + +import { + useEffect, +} from "react"; + + +export default function Home(props) { + useEffect(() => { + const worker = new Worker(new URL('/deep.thought.js', import.meta.url)); + worker.postMessage({ + question: + 'The Answer to the Ultimate Question of Life, The Universe, and Everything.', + }); + worker.onmessage = ({ data: { answer } }) => { + console.log(answer); + }; + }, []); + if(typeof window !== undefined){ + setConfig(newPublicRuntimeConfig); + console.log(publicRuntimeConfig) + } + console.log(props.json) return (
@@ -63,3 +93,23 @@ export default function Home() {
) } + +export async function getStaticProps(context) { + const json = await Hello.getName(context.req, context.res); + return { + props: { + revalidate: 0, + json: json + }, // will be passed to the page component as props + } +} + +// export async function getStaticProps(context) { +// const response = await Hello; +// console.log(response); +// return { +// props: { +// revalidate: 5, +// }, // will be passed to the page component as props +// } +// } \ No newline at end of file diff --git a/src/scripts/util.js b/src/scripts/util.js new file mode 100644 index 0000000..56566a5 --- /dev/null +++ b/src/scripts/util.js @@ -0,0 +1,1081 @@ +import { useRouter } from "next/router"; +import { + useEffect, + useRef +} from "react"; + +// Constants +// import appRoutes from "/src/scripts/constant-types/appRoutes"; +// import { keys } from "/src/scripts/constant-types/pageContent"; + +export const addDays = (date, days) => { + const currentDate = new Date(Number(date)); + const copy = new Date(currentDate); + copy.setDate(currentDate.getDate() + days); + + return copy; +}; + +/* + * TODO: we should think remove this function. + * padStart method form String.prototype does the trick. + */ +export const addZerosToStoreNumber = number => { + const numberLength = number.toString().length; + + const addZeros = 4 - numberLength; + + if (addZeros !== 0) { + for (let i = 0; i < addZeros; i++) { + number = "0" + number; + } + } + return number; +}; + +export const formatName = name => { + if (name) { + return name.toLowerCase().replace(/ /g, "_"); + } else { + return ""; + } +}; + +export const getUrlWithoutQuery = url => { + const result = /(\/?[^?]*?)\?.*/.exec(url); + + return (result && result[1]) || url; +}; + +export const capitalizeEachWord = string => { + const wordArray = string.trim().split(" "); + const capitalizedWordArray = wordArray.map(w => { + return `${w[0].toUpperCase()}${w.substring(1)}`; + }); + + return capitalizedWordArray.join(" "); +}; + +/** + * Formats phone numbers to expressions like (123) - 456 7890 + * or +1 (123) 456 7890 + * + * @param {*} phoneNumber + * @returns + */ +export const formatPhoneNumber = phoneNumber => { + const cleaned = ("" + phoneNumber).replace(/\D/g, ""); + const match = cleaned.match(/^(1|)?(\d{3})(\d{3})(\d{4})$/); + + if (match) { + const intlCode = match[1] ? "+1 " : ""; + return [ + intlCode, + "(", + match[2], + ") ", + match[3], + "-", + match[4], + ].join(""); + } + + return null; +}; + +export const formatUnitSizeDisplay = (dimension, size) => { + const dimensions = dimension.toUpperCase().split("X"); + return `${dimensions[0]} x ${dimensions[1]} ${size}`; +}; + +const weekday = [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", +]; + +export const getAge = dateString => { + const today = new Date(); + const birthDate = new Date(dateString); + let age = today.getFullYear() - birthDate.getFullYear(); + const m = today.getMonth() - birthDate.getMonth(); + if (m < 0 || (m === 0 && today.getDate() < birthDate.getDate())) { + age--; + } + return age; +}; + +export const getWeekDay = date => weekday[date.getDay()]; + +export const emailRegex = RegExp( + /^[\w._-]+[+]?[\w._-]+@[\w.-]+\.[a-zA-Z]{2,6}$/ +); + +export const guid = () => { + return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, c => { + const r = (Math.random() * 16) | 0, + v = c == "x" ? r : (r & 0x3) | 0x8; + + return v.toString(16); + }); +}; + +export const isValidUrl = string => { + try { + new URL(string); + } catch (_) { + return false; + } + return true; +}; + +export const setUrlToEnvironment = url => { + const host = process.env.PHX_URL_HOSTNAME; + const extraSpaceDomain = "https://www.extraspace.com"; + + if (url) { + if (url.indexOf(extraSpaceDomain >= 0)) { + url = url.replace(extraSpaceDomain, host); + } + + url = url.replace(/ /g, "_"); + } + + return url; +}; + +export const setBestPricedUnits = ( + locations, + bestPricedUnits, + setBestPricedUnits +) => { + const sizes = { + large: "large", + medium: "medium", + small: "small", + }; + + const findBestPricedUnit = array => { + let cheapestUnit = null; + array.forEach(i => { + if (i.unit.rates.web !== 0 && i.unit.dimensions.display !== "") { + if ( + cheapestUnit === null || + i.unit.rates.web < cheapestUnit.unit.rates.web + ) { + cheapestUnit = i; + } + } + }); + return cheapestUnit; + }; + + const bestPricesSmallArr = []; + const bestPricesMediumArr = []; + const bestPricesLargeArr = []; + + if (locations && locations.length > 0) { + const limit = locations.length >= 10 ? 10 : locations.length; + + for (let index = 0; index < limit; index++) { + locations[index].bestPrice.forEach(unit => { + const unitData = { + index: index + 1, + store: locations[index], + unit, + }; + + switch (unit.dimensions.size.toLowerCase()) { + case sizes.small: + bestPricesSmallArr.push(unitData); + break; + case sizes.medium: + bestPricesMediumArr.push(unitData); + break; + case sizes.large: + bestPricesLargeArr.push(unitData); + break; + } + }); + } + + const bestPricedSmallUnit = findBestPricedUnit(bestPricesSmallArr); + const bestPricedMediumUnit = findBestPricedUnit(bestPricesMediumArr); + const bestPricedLargeUnit = findBestPricedUnit(bestPricesLargeArr); + + if ( + [ + bestPricedSmallUnit, + bestPricedMediumUnit, + bestPricedLargeUnit, + ].every( + unit => { + return unit === null; + } + ) + ) { + setBestPricedUnits({ + ...bestPricedUnits, + hasUnits: false, + }); + } else { + setBestPricedUnits({ + ...bestPricedUnits, + hasUnits: true, + large: + bestPricedLargeUnit && bestPricedLargeUnit.store + ? bestPricedLargeUnit + : undefined, + medium: + bestPricedMediumUnit && bestPricedMediumUnit.store + ? bestPricedMediumUnit + : undefined, + small: + bestPricedSmallUnit && bestPricedSmallUnit.store + ? bestPricedSmallUnit + : undefined, + }); + } + } else { + setBestPricedUnits({ + ...bestPricedUnits, + hasUnits: false, + }); + } +}; + +export const shouldShowPromoAsterisk = entity => { + if ( + entity.promotion && + entity.promotion.toString().toLowerCase() !== "flash sale" + ) { + return true; + } + return false; +}; + +export const usePreviousStateValue = value => { + const ref = useRef(); + useEffect(() => { + ref.current = value; + }); + return ref.current; +}; + +const formatHours = hours => { + return hours !== undefined + ? hours.toLowerCase().replace(/\s/g, "") + : "Call for hours"; +}; + +export const getHoursOfOperationInfo = ( + hoursOfOperationLabels, + hours +) => { + const weekDaySchedules = [ + hours.monday, + hours.tuesday, + hours.wednesday, + hours.thursday, + hours.friday, + ]; + + const weekDaysHaveSameSchedule = weekDaySchedules.every( + x => x === hours.monday + ); + + const weekdays = `${hoursOfOperationLabels.weekdaysLabel} ${formatHours( + hours.monday + )}`; + + const monday = `${hoursOfOperationLabels.mondayLabel} ${formatHours( + hours.monday + )}`; + + const tuesday = `${hoursOfOperationLabels.tuesdayLabel} ${formatHours( + hours.tuesday + )}`; + + const wednesday = `${hoursOfOperationLabels.wednesdayLabel} ${formatHours( + hours.wednesday + )}`; + + const thursday = `${hoursOfOperationLabels.thursdayLabel} ${formatHours( + hours.thursday + )}`; + + const friday = `${hoursOfOperationLabels.fridayLabel} ${formatHours( + hours.friday + )}`; + + const saturday = `${hoursOfOperationLabels.saturdayLabel} ${formatHours( + hours.saturday + )}`; + + const sunday = `${hoursOfOperationLabels.sundayLabel} ${formatHours( + hours.sunday + )}`; + + const officeHoursOfOperationInfo = { + friday, + monday, + saturday, + sunday, + thursday, + tuesday, + wednesday, + weekDaysHaveSameSchedule, + weekdays, + }; + + return officeHoursOfOperationInfo; +}; + +export const hoursOfOperationLabelInfo = hoursOfOperationLabels => { + const { + storageOfficeHoursText, + } = hoursOfOperationLabels; + + const { + storageGateHoursText, + } = hoursOfOperationLabels; + + const { + currentCustomerLabel, + } = hoursOfOperationLabels; + + const { + hoursOfOperationText, + } = hoursOfOperationLabels; + + const { + newCustomerLabel, + } = hoursOfOperationLabels; + + const { + customerServiceHoursText, + } = hoursOfOperationLabels; + + const hoursOfOperationLabelInfo = { + currentCustomerLabel, + customerServiceHoursText, + hoursOfOperationText, + newCustomerLabel, + storageGateHoursText, + storageOfficeHoursText, + }; + + return hoursOfOperationLabelInfo; +}; + +export const getGateHoursOfOperation = ( + gateHoursOfOperationJSON, + allDaysLabel +) => { + return `${allDaysLabel} ${formatHours(gateHoursOfOperationJSON.monday)}`; +}; + +export const getWeekdayOfficeHoursOfOperation = ( + officeHoursOfOperationJSON, + weekDaysLabel +) => { + return `${weekDaysLabel} ${formatHours(officeHoursOfOperationJSON.monday)}`; +}; + +export const getHoursOfOperationJSON = (hoursOfOperation, type) => { + const hoursOfOperationJSON = hoursOfOperation.find( + x => x.type.toLowerCase() === type + ); + + hoursOfOperationJSON.monday = formatHours( + hoursOfOperationJSON.monday + ); + + hoursOfOperationJSON.tuesday = formatHours( + hoursOfOperationJSON.tuesday + ); + + hoursOfOperationJSON.wednesday = formatHours( + hoursOfOperationJSON.wednesday + ); + + hoursOfOperationJSON.thursday = formatHours( + hoursOfOperationJSON.thursday + ); + + hoursOfOperationJSON.friday = formatHours( + hoursOfOperationJSON.friday + ); + + hoursOfOperationJSON.saturday = formatHours( + hoursOfOperationJSON.saturday + ); + + hoursOfOperationJSON.sunday = formatHours( + hoursOfOperationJSON.sunday + ); + + return hoursOfOperationJSON; +}; + +export const getSaturdayOfficeHoursOfOperation = ( + officeHoursOfOperationJSON, + saturdayLabel +) => { + return `${saturdayLabel} ${formatHours(officeHoursOfOperationJSON.saturday)}`; +}; + +export const getSundayOfficeHoursOfOperation = ( + officeHoursOfOperationJSON, + sundayLabel +) => { + return `${sundayLabel} ${formatHours(officeHoursOfOperationJSON.sunday)}`; +}; + +export const getFacilityPhotosForCarouselModal = siteNumber => { + const images = []; + + images.push({ + key: 0, + src: `${process.env.PHX_CDN_LINK}600x450-${siteNumber}.jpg`, + }); + + for (let i = 1; i <= 6; i++) { + images.push({ + key: i, + src: `${process.env.PHX_CDN_LINK}600x450-${siteNumber}_${i}.jpg`, + }); + } + + return images; +}; + +export const getHoursOfOperationLabels = content => { + const { + hoursOfOperation: { + fields: { + allDaysLabel, + currentCustomerLabel, + customerServiceHoursText, + fridayLabel, + hoursOfOperationText, + mondayLabel, + newCustomerLabel, + saturdayLabel, + storageGateHoursText, + storageOfficeHoursText, + sundayLabel, + thursdayLabel, + tuesdayLabel, + weekdaysLabel, + wednesdayLabel, + } = {}, + } = {}, + } = content; + + const hoursOfOperationLabels = { + allDaysLabel, + currentCustomerLabel, + customerServiceHoursText, + fridayLabel, + hoursOfOperationText, + mondayLabel, + newCustomerLabel, + saturdayLabel, + storageGateHoursText, + storageOfficeHoursText, + sundayLabel, + thursdayLabel, + tuesdayLabel, + wednesdayLabel, + weekdaysLabel, + }; + + return hoursOfOperationLabels; +}; + +export const getMonthYearFromDate = date => { + const monthNames = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ]; + + const convertedDate = new Date(date); + + const month = monthNames[convertedDate.getMonth()]; + const year = convertedDate.getFullYear(); + + return `${month} ${year}`; +}; + +/** + * Groups by key an array of values. + * + * @param {*} key Key to group by. + * @param {*} values Array of values to be grouped. + * @returns Grouped values by specified key. + */ +export const groupBy = (key, values) => { + return values.reduce((acc, curr) => { + const keyValue = curr[key]; + acc[keyValue] = [...(acc[keyValue] || []), curr]; + + return acc; + }, {}); +}; + +export const findLowestRateCallback = (accumulator, currentValue) => + Math.min( + accumulator.rate ? accumulator.rate : accumulator, + currentValue.rate + ); + +export const filterStoresByRateAndDistanceCallback = store => + store.rate && store.distance <= process.env.PHX_DISTANCE_FILTER; + +export const generateDynamicPageTitle = (lowestRate, titleTag) => { + let dynamicPageTitle; + + if (lowestRate) { + titleTag.includes("#LowestPrice#") + ? (dynamicPageTitle = titleTag.replace("#LowestPrice#", `$${lowestRate}`)) + : (dynamicPageTitle = titleTag); + } + + if (!lowestRate) { + titleTag.includes("#LowestPrice#") + ? (dynamicPageTitle = titleTag.replace("#LowestPrice#", "")) + : (dynamicPageTitle = titleTag); + } + + return dynamicPageTitle; +}; + +export const replaceDynamicTextFromContentString = ( + textToReplace, + completeContentText, + newValue +) => { + return completeContentText.includes(textToReplace) + ? completeContentText.replace(textToReplace, newValue) + : completeContentText; +}; + +export const convertSecondsToMinutesFormat = seconds => { + try { + return new Date(seconds * 1000).toISOString().substr(14, 5); + } catch { + return "00:00"; + } +}; + +export const calculateSitemapContentfulLimit = numberOfCities => { + return Math.ceil(numberOfCities * 0.25); +}; + +export const calculateSitemapContentfulSkip = (page = 0, limit) => { + return page * limit; +}; +export const formatNegativeCurrencyAmount = negativeAmount => { + return `-$${negativeAmount.toFixed(2).replace("-", "")}`; +}; + +export const getOrdinalDay = day => { + let sufix = null; + if (day > 3 && day < 21) { + sufix = "th"; + } else { + switch (day % 10) { + case 1: + sufix = "st"; + break; + case 2: + sufix = "nd"; + break; + case 3: + sufix = "rd"; + break; + default: + sufix = "th"; + break; + } + } + + return `${day}${sufix}`; +}; + +export const redirectOnBackButton = url => { + const router = useRouter(); + router.beforePopState(() => { + window.location.href = url; + }); +}; + +const bigObject = [ + { + "_id": "60d0dacc0eecfb8660307997", + "index": 0, + "guid": "51bcfb30-e609-4068-8574-6b3f3bf8666a", + "isActive": false, + "balance": "$1,658.74", + "picture": "http://placehold.it/32x32", + "age": 31, + "eyeColor": "brown", + "name": "Flores Hoffman", + "gender": "male", + "company": "RUBADUB", + "email": "floreshoffman@rubadub.com", + "phone": "+1 (850) 423-3090", + "address": "409 Brightwater Court, National, Maryland, 2467", + "about": "Commodo Lorem exercitation velit occaecat elit sunt nulla magna elit cupidatat non occaecat fugiat incididunt. Lorem eiusmod velit laboris laborum elit aliquip labore aliqua officia nulla tempor Lorem. Ex consequat pariatur in ullamco ut aute duis officia. Dolor reprehenderit culpa aute nisi dolore quis ullamco aliquip minim. Reprehenderit elit esse cillum ad enim fugiat eiusmod quis tempor cillum culpa est occaecat laborum. Sit nostrud fugiat est cillum occaecat ad exercitation voluptate in ad cillum ipsum dolor Lorem.\r\n", + "registered": "2015-06-14T05:58:16 +06:00", + "latitude": 74.759999, + "longitude": -162.328499, + "tags": [ + "cupidatat", + "sint", + "excepteur", + "velit", + "nisi", + "non", + "ut" + ], + "friends": [ + { + "id": 0, + "name": "Alba Padilla" + }, + { + "id": 1, + "name": "Mccarty Harrison" + }, + { + "id": 2, + "name": "Mccarthy Holcomb" + } + ], + "greeting": "Hello, Flores Hoffman! You have 2 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0dacc2570e344ad1bcefe", + "index": 1, + "guid": "6c892df6-3b18-4405-92ee-b92a99b32dc2", + "isActive": true, + "balance": "$1,742.62", + "picture": "http://placehold.it/32x32", + "age": 21, + "eyeColor": "green", + "name": "Blackburn Lynn", + "gender": "male", + "company": "PYRAMIA", + "email": "blackburnlynn@pyramia.com", + "phone": "+1 (850) 558-3264", + "address": "120 Colby Court, Veyo, New Mexico, 1900", + "about": "Irure minim ipsum sint deserunt laborum laboris. Laborum laborum anim aute sunt nostrud elit in. Dolor tempor ea aliqua officia labore anim laboris minim amet consectetur nisi. Qui labore aute do eiusmod elit aute excepteur ea quis proident ad ea laborum cupidatat.\r\n", + "registered": "2014-10-10T09:33:22 +06:00", + "latitude": 59.085953, + "longitude": 40.570506, + "tags": [ + "incididunt", + "voluptate", + "magna", + "eiusmod", + "deserunt", + "labore", + "ut" + ], + "friends": [ + { + "id": 0, + "name": "Kimberley Trujillo" + }, + { + "id": 1, + "name": "Louisa Stein" + }, + { + "id": 2, + "name": "Lois Allen" + } + ], + "greeting": "Hello, Blackburn Lynn! You have 4 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0dacca55cb862e20b3588", + "index": 2, + "guid": "28c7bf22-09ba-4a8a-9a1f-e8c503297db8", + "isActive": true, + "balance": "$3,417.38", + "picture": "http://placehold.it/32x32", + "age": 24, + "eyeColor": "blue", + "name": "Stuart Estrada", + "gender": "male", + "company": "OPTYK", + "email": "stuartestrada@optyk.com", + "phone": "+1 (821) 537-3596", + "address": "169 Halleck Street, Cliff, Louisiana, 2791", + "about": "Irure magna cupidatat consequat nostrud elit. Fugiat sint ea aute ipsum amet enim et veniam reprehenderit incididunt reprehenderit ex. Ad nisi aute nisi laborum ipsum excepteur duis occaecat incididunt sunt. Excepteur anim nostrud id velit aliquip qui elit adipisicing nostrud anim excepteur sint voluptate dolore. Sint non commodo id in magna tempor.\r\n", + "registered": "2014-05-14T01:20:01 +06:00", + "latitude": 1.112202, + "longitude": -2.466004, + "tags": [ + "do", + "fugiat", + "exercitation", + "anim", + "eiusmod", + "labore", + "qui" + ], + "friends": [ + { + "id": 0, + "name": "Francis Suarez" + }, + { + "id": 1, + "name": "Atkinson Floyd" + }, + { + "id": 2, + "name": "Sofia Sherman" + } + ], + "greeting": "Hello, Stuart Estrada! You have 1 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0daccdb9d71e188088bd8", + "index": 3, + "guid": "e2fd462f-179d-4968-b83c-a14073c2ec3c", + "isActive": true, + "balance": "$3,326.79", + "picture": "http://placehold.it/32x32", + "age": 26, + "eyeColor": "brown", + "name": "Dorsey Graves", + "gender": "male", + "company": "MOREGANIC", + "email": "dorseygraves@moreganic.com", + "phone": "+1 (916) 584-2477", + "address": "968 Brevoort Place, Gila, Mississippi, 2440", + "about": "Elit amet nostrud exercitation irure labore do dolore cupidatat aliqua aliquip aliqua. Est Lorem veniam quis sunt irure magna commodo commodo esse elit ut labore elit. Aliqua sunt commodo deserunt aliquip do consectetur minim veniam sit enim velit incididunt enim duis. Eu est laborum aliquip cillum magna excepteur voluptate enim cupidatat. Commodo consectetur ad occaecat ad. Voluptate laborum ea elit mollit dolore excepteur reprehenderit amet deserunt ullamco. Mollit voluptate sint exercitation exercitation fugiat elit aliquip id.\r\n", + "registered": "2015-04-26T06:57:05 +06:00", + "latitude": -33.471931, + "longitude": 100.897696, + "tags": [ + "sit", + "est", + "magna", + "ipsum", + "quis", + "eu", + "est" + ], + "friends": [ + { + "id": 0, + "name": "Mitzi Sykes" + }, + { + "id": 1, + "name": "Terry Soto" + }, + { + "id": 2, + "name": "Leticia Blankenship" + } + ], + "greeting": "Hello, Dorsey Graves! You have 10 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "60d0daccc606f3cda020964d", + "index": 4, + "guid": "e829d875-127f-4ad4-bd12-6ead1ffef3de", + "isActive": true, + "balance": "$2,923.01", + "picture": "http://placehold.it/32x32", + "age": 26, + "eyeColor": "green", + "name": "Day Crane", + "gender": "male", + "company": "EARBANG", + "email": "daycrane@earbang.com", + "phone": "+1 (892) 503-3707", + "address": "218 Harkness Avenue, Thermal, Nebraska, 3623", + "about": "Et nulla pariatur qui ut reprehenderit eu nostrud aliquip tempor enim sint et irure non. Qui aliqua eu minim in. Voluptate velit commodo nostrud elit aliqua. Eu anim ex nostrud sunt proident id Lorem excepteur duis voluptate.\r\n", + "registered": "2019-08-28T12:02:31 +06:00", + "latitude": 83.866814, + "longitude": -135.757107, + "tags": [ + "reprehenderit", + "laborum", + "adipisicing", + "anim", + "amet", + "anim", + "laboris" + ], + "friends": [ + { + "id": 0, + "name": "Adele Armstrong" + }, + { + "id": 1, + "name": "Cervantes Mclean" + }, + { + "id": 2, + "name": "Mack Gonzalez" + } + ], + "greeting": "Hello, Day Crane! You have 2 unread messages.", + "favoriteFruit": "apple" + }, + + { + "_id": "60d0dacc0eecfb8660307997", + "index": 0, + "guid": "51bcfb30-e609-4068-8574-6b3f3bf8666a", + "isActive": false, + "balance": "$1,658.74", + "picture": "http://placehold.it/32x32", + "age": 31, + "eyeColor": "brown", + "name": "Flores Hoffman", + "gender": "male", + "company": "RUBADUB", + "email": "floreshoffman@rubadub.com", + "phone": "+1 (850) 423-3090", + "address": "409 Brightwater Court, National, Maryland, 2467", + "about": "Commodo Lorem exercitation velit occaecat elit sunt nulla magna elit cupidatat non occaecat fugiat incididunt. Lorem eiusmod velit laboris laborum elit aliquip labore aliqua officia nulla tempor Lorem. Ex consequat pariatur in ullamco ut aute duis officia. Dolor reprehenderit culpa aute nisi dolore quis ullamco aliquip minim. Reprehenderit elit esse cillum ad enim fugiat eiusmod quis tempor cillum culpa est occaecat laborum. Sit nostrud fugiat est cillum occaecat ad exercitation voluptate in ad cillum ipsum dolor Lorem.\r\n", + "registered": "2015-06-14T05:58:16 +06:00", + "latitude": 74.759999, + "longitude": -162.328499, + "tags": [ + "cupidatat", + "sint", + "excepteur", + "velit", + "nisi", + "non", + "ut" + ], + "friends": [ + { + "id": 0, + "name": "Alba Padilla" + }, + { + "id": 1, + "name": "Mccarty Harrison" + }, + { + "id": 2, + "name": "Mccarthy Holcomb" + } + ], + "greeting": "Hello, Flores Hoffman! You have 2 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0dacc2570e344ad1bcefe", + "index": 1, + "guid": "6c892df6-3b18-4405-92ee-b92a99b32dc2", + "isActive": true, + "balance": "$1,742.62", + "picture": "http://placehold.it/32x32", + "age": 21, + "eyeColor": "green", + "name": "Blackburn Lynn", + "gender": "male", + "company": "PYRAMIA", + "email": "blackburnlynn@pyramia.com", + "phone": "+1 (850) 558-3264", + "address": "120 Colby Court, Veyo, New Mexico, 1900", + "about": "Irure minim ipsum sint deserunt laborum laboris. Laborum laborum anim aute sunt nostrud elit in. Dolor tempor ea aliqua officia labore anim laboris minim amet consectetur nisi. Qui labore aute do eiusmod elit aute excepteur ea quis proident ad ea laborum cupidatat.\r\n", + "registered": "2014-10-10T09:33:22 +06:00", + "latitude": 59.085953, + "longitude": 40.570506, + "tags": [ + "incididunt", + "voluptate", + "magna", + "eiusmod", + "deserunt", + "labore", + "ut" + ], + "friends": [ + { + "id": 0, + "name": "Kimberley Trujillo" + }, + { + "id": 1, + "name": "Louisa Stein" + }, + { + "id": 2, + "name": "Lois Allen" + } + ], + "greeting": "Hello, Blackburn Lynn! You have 4 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0dacca55cb862e20b3588", + "index": 2, + "guid": "28c7bf22-09ba-4a8a-9a1f-e8c503297db8", + "isActive": true, + "balance": "$3,417.38", + "picture": "http://placehold.it/32x32", + "age": 24, + "eyeColor": "blue", + "name": "Stuart Estrada", + "gender": "male", + "company": "OPTYK", + "email": "stuartestrada@optyk.com", + "phone": "+1 (821) 537-3596", + "address": "169 Halleck Street, Cliff, Louisiana, 2791", + "about": "Irure magna cupidatat consequat nostrud elit. Fugiat sint ea aute ipsum amet enim et veniam reprehenderit incididunt reprehenderit ex. Ad nisi aute nisi laborum ipsum excepteur duis occaecat incididunt sunt. Excepteur anim nostrud id velit aliquip qui elit adipisicing nostrud anim excepteur sint voluptate dolore. Sint non commodo id in magna tempor.\r\n", + "registered": "2014-05-14T01:20:01 +06:00", + "latitude": 1.112202, + "longitude": -2.466004, + "tags": [ + "do", + "fugiat", + "exercitation", + "anim", + "eiusmod", + "labore", + "qui" + ], + "friends": [ + { + "id": 0, + "name": "Francis Suarez" + }, + { + "id": 1, + "name": "Atkinson Floyd" + }, + { + "id": 2, + "name": "Sofia Sherman" + } + ], + "greeting": "Hello, Stuart Estrada! You have 1 unread messages.", + "favoriteFruit": "strawberry" + }, + { + "_id": "60d0daccdb9d71e188088bd8", + "index": 3, + "guid": "e2fd462f-179d-4968-b83c-a14073c2ec3c", + "isActive": true, + "balance": "$3,326.79", + "picture": "http://placehold.it/32x32", + "age": 26, + "eyeColor": "brown", + "name": "Dorsey Graves", + "gender": "male", + "company": "MOREGANIC", + "email": "dorseygraves@moreganic.com", + "phone": "+1 (916) 584-2477", + "address": "968 Brevoort Place, Gila, Mississippi, 2440", + "about": "Elit amet nostrud exercitation irure labore do dolore cupidatat aliqua aliquip aliqua. Est Lorem veniam quis sunt irure magna commodo commodo esse elit ut labore elit. Aliqua sunt commodo deserunt aliquip do consectetur minim veniam sit enim velit incididunt enim duis. Eu est laborum aliquip cillum magna excepteur voluptate enim cupidatat. Commodo consectetur ad occaecat ad. Voluptate laborum ea elit mollit dolore excepteur reprehenderit amet deserunt ullamco. Mollit voluptate sint exercitation exercitation fugiat elit aliquip id.\r\n", + "registered": "2015-04-26T06:57:05 +06:00", + "latitude": -33.471931, + "longitude": 100.897696, + "tags": [ + "sit", + "est", + "magna", + "ipsum", + "quis", + "eu", + "est" + ], + "friends": [ + { + "id": 0, + "name": "Mitzi Sykes" + }, + { + "id": 1, + "name": "Terry Soto" + }, + { + "id": 2, + "name": "Leticia Blankenship" + } + ], + "greeting": "Hello, Dorsey Graves! You have 10 unread messages.", + "favoriteFruit": "banana" + }, + { + "_id": "60d0daccc606f3cda020964d", + "index": 4, + "guid": "e829d875-127f-4ad4-bd12-6ead1ffef3de", + "isActive": true, + "balance": "$2,923.01", + "picture": "http://placehold.it/32x32", + "age": 26, + "eyeColor": "green", + "name": "Day Crane", + "gender": "male", + "company": "EARBANG", + "email": "daycrane@earbang.com", + "phone": "+1 (892) 503-3707", + "address": "218 Harkness Avenue, Thermal, Nebraska, 3623", + "about": "Et nulla pariatur qui ut reprehenderit eu nostrud aliquip tempor enim sint et irure non. Qui aliqua eu minim in. Voluptate velit commodo nostrud elit aliqua. Eu anim ex nostrud sunt proident id Lorem excepteur duis voluptate.\r\n", + "registered": "2019-08-28T12:02:31 +06:00", + "latitude": 83.866814, + "longitude": -135.757107, + "tags": [ + "reprehenderit", + "laborum", + "adipisicing", + "anim", + "amet", + "anim", + "laboris" + ], + "friends": [ + { + "id": 0, + "name": "Adele Armstrong" + }, + { + "id": 1, + "name": "Cervantes Mclean" + }, + { + "id": 2, + "name": "Mack Gonzalez" + } + ], + "greeting": "Hello, Day Crane! You have 2 unread messages.", + "favoriteFruit": "apple" + } + +]; \ No newline at end of file