mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-24 22:39:26 +01:00
Updated to v1.3.5
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Speedtest Tracker
|
||||
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
|
||||
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [speedtest-cli](https://github.com/sivel/speedtest-cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Speedtest Tracker
|
||||
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
[](https://hub.docker.com/r/henrywhitaker3/speedtest-tracker) [](https://github.com/henrywhitaker3/Speedtest-Tracker/commits) [](https://github.com/henrywhitaker3/Speedtest-Tracker/issues)  [](https://github.com/henrywhitaker3/Speedtest-Tracker/blob/master/LICENSE)
|
||||
|
||||
This program runs a speedtest check every hour and graphs the results. The back-end is written in [Laravel](https://laravel.com/) and the front-end uses [React](https://reactjs.org/). It uses the [speedtest-cli](https://github.com/sivel/speedtest-cli) package to get the data and uses [Chart.js](https://www.chartjs.org/) to plot the results.
|
||||
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
{
|
||||
"1.3.5": [
|
||||
{
|
||||
"description": "Updated laravel CORS",
|
||||
"link": "https://github.com/henrywhitaker3/Speedtest-Tracker/pull/40"
|
||||
},
|
||||
{
|
||||
"description": "Updated react toastify",
|
||||
"link": "https://github.com/henrywhitaker3/Speedtest-Tracker/pull/43"
|
||||
},
|
||||
{
|
||||
"description": "Updated react router",
|
||||
"link": "https://github.com/henrywhitaker3/Speedtest-Tracker/pull/42"
|
||||
}
|
||||
],
|
||||
"1.3.4": [
|
||||
{
|
||||
"description": "Updated laravel framework",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^1.0",
|
||||
"fruitcake/laravel-cors": "^2.0",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"laravel/framework": "^7.0",
|
||||
"laravel/slack-notification-channel": "^2.0",
|
||||
|
||||
108
conf/site/composer.lock
generated
108
conf/site/composer.lock
generated
@@ -4,40 +4,40 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7de35f5352b6b3050eb2e7cdf6fd1fec",
|
||||
"content-hash": "472c18a1ee3528d9640587ef30fd2c12",
|
||||
"packages": [
|
||||
{
|
||||
"name": "asm89/stack-cors",
|
||||
"version": "1.3.0",
|
||||
"version": "2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/asm89/stack-cors.git",
|
||||
"reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08"
|
||||
"reference": "1913589c6de3cc09de5a9bdb4f46fbd550246b40"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/asm89/stack-cors/zipball/b9c31def6a83f84b4d4a40d35996d375755f0e08",
|
||||
"reference": "b9c31def6a83f84b4d4a40d35996d375755f0e08",
|
||||
"url": "https://api.github.com/repos/asm89/stack-cors/zipball/1913589c6de3cc09de5a9bdb4f46fbd550246b40",
|
||||
"reference": "1913589c6de3cc09de5a9bdb4f46fbd550246b40",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.9",
|
||||
"php": "^7.0",
|
||||
"symfony/http-foundation": "~2.7|~3.0|~4.0|~5.0",
|
||||
"symfony/http-kernel": "~2.7|~3.0|~4.0|~5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.0 || ^4.8.10",
|
||||
"squizlabs/php_codesniffer": "^2.3"
|
||||
"phpunit/phpunit": "^6|^7|^8|^9",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2-dev"
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Asm89\\Stack\\": "src/Asm89/Stack/"
|
||||
"Asm89\\Stack\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
@@ -56,7 +56,7 @@
|
||||
"cors",
|
||||
"stack"
|
||||
],
|
||||
"time": "2019-12-24T22:41:47+00:00"
|
||||
"time": "2020-04-20T10:11:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brick/math",
|
||||
@@ -434,29 +434,31 @@
|
||||
},
|
||||
{
|
||||
"name": "fruitcake/laravel-cors",
|
||||
"version": "v1.0.6",
|
||||
"version": "v2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fruitcake/laravel-cors.git",
|
||||
"reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6"
|
||||
"reference": "8cc9f7e5f1b9b280ae2378b3624e6b5603e63e8c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/1d127dbec313e2e227d65e0c483765d8d7559bf6",
|
||||
"reference": "1d127dbec313e2e227d65e0c483765d8d7559bf6",
|
||||
"url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/8cc9f7e5f1b9b280ae2378b3624e6b5603e63e8c",
|
||||
"reference": "8cc9f7e5f1b9b280ae2378b3624e6b5603e63e8c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"asm89/stack-cors": "^1.3",
|
||||
"illuminate/contracts": "^5.5|^6.0|^7.0|^8.0",
|
||||
"illuminate/support": "^5.5|^6.0|^7.0|^8.0",
|
||||
"php": ">=7",
|
||||
"symfony/http-foundation": "^3.3|^4.0|^5.0",
|
||||
"symfony/http-kernel": "^3.3|^4.0|^5.0"
|
||||
"asm89/stack-cors": "^2",
|
||||
"illuminate/contracts": "^5.6|^6.0|^7.0|^8.0",
|
||||
"illuminate/support": "^5.6|^6.0|^7.0|^8.0",
|
||||
"php": ">=7.1",
|
||||
"symfony/http-foundation": "^4.0|^5.0",
|
||||
"symfony/http-kernel": "^4.0|^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"laravel/framework": "^5.5|^6.0|^7.0|^8.0",
|
||||
"orchestra/dusk-updater": "^1.2",
|
||||
"orchestra/testbench": "^3.5|^4.0|^5.0|^6.0",
|
||||
"orchestra/testbench-dusk": "^5.1",
|
||||
"phpro/grumphp": "^0.16|^0.17",
|
||||
"phpunit/phpunit": "^6.0|^7.0|^8.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
@@ -464,7 +466,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
"dev-master": "2.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
@@ -498,7 +500,7 @@
|
||||
"crossdomain",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2020-04-28T08:47:37+00:00"
|
||||
"time": "2020-05-11T09:29:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
@@ -2747,16 +2749,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14"
|
||||
"reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1aab00e39cebaef4d8652497f46c15c1b7e45294",
|
||||
"reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2768,7 +2770,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.16-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2801,7 +2803,7 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"time": "2020-05-08T16:50:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-iconv",
|
||||
@@ -2864,16 +2866,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf"
|
||||
"reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
|
||||
"reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ab0af41deab94ec8dceb3d1fb408bdd038eba4dc",
|
||||
"reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2887,7 +2889,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.16-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2922,20 +2924,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-03-09T19:04:49+00:00"
|
||||
"time": "2020-05-08T16:50:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac"
|
||||
"reference": "a54881ec0ab3b2005c406aed0023c062879031e7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7",
|
||||
"reference": "a54881ec0ab3b2005c406aed0023c062879031e7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2947,7 +2949,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.16-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -2981,7 +2983,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-03-09T19:04:49+00:00"
|
||||
"time": "2020-05-08T16:50:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php56",
|
||||
@@ -3041,16 +3043,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747"
|
||||
"reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"reference": "37b0976c78b94856543260ce09b460a7bc852747",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/42fda6d7380e5c940d7f68341ccae89d5ab9963b",
|
||||
"reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3059,7 +3061,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.16-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -3092,20 +3094,20 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"time": "2020-05-08T17:28:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"version": "v1.15.0",
|
||||
"version": "v1.16.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php73.git",
|
||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7"
|
||||
"reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
||||
"reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/7e95fe59d12169fcf4041487e4bf34fca37ee0ed",
|
||||
"reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3114,7 +3116,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.15-dev"
|
||||
"dev-master": "1.16-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -3150,7 +3152,7 @@
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-02-27T09:26:54+00:00"
|
||||
"time": "2020-05-02T14:56:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-util",
|
||||
|
||||
@@ -7,7 +7,7 @@ return [
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'version' => '1.3.4',
|
||||
'version' => '1.3.5',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
BIN
conf/site/node_modules/.cache/babel-loader/0d9d0684e789a02bbea0b1e8ea9fadd0.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/0d9d0684e789a02bbea0b1e8ea9fadd0.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/1da48ba30203a315cb5e3a97e8224112.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/1da48ba30203a315cb5e3a97e8224112.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/325d40463fb6744ddc3c94eef2280017.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/325d40463fb6744ddc3c94eef2280017.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/3799dfe8c0f0dc50a7634eaf6286e3fa.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/3799dfe8c0f0dc50a7634eaf6286e3fa.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/4e4a488c441b89be078829e87f3d1d98.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/4e4a488c441b89be078829e87f3d1d98.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/4ea02a33d95c367cee66dbe9193fd65b.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/4ea02a33d95c367cee66dbe9193fd65b.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/5a42b18634b6a213f621f4fcd93ad402.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/5a42b18634b6a213f621f4fcd93ad402.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/6b207dc18da4dc362f8def839ef826f0.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/6b207dc18da4dc362f8def839ef826f0.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/7e49d28617d803793e3653c54e3023df.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/7e49d28617d803793e3653c54e3023df.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/843983882c525f489c4dd7f2b3d37e54.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/843983882c525f489c4dd7f2b3d37e54.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/9c9042b24e3d38524f7d2502d0e7f6ad.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/9c9042b24e3d38524f7d2502d0e7f6ad.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/ae4b341aeb9fcf82b3c7e42f3d9f1ba5.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/ae4b341aeb9fcf82b3c7e42f3d9f1ba5.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/b25d4b12b2b1d7b58246ccd9abb663a1.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/b25d4b12b2b1d7b58246ccd9abb663a1.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/bfef6371bf9be24979951c5c7319b66d.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/bfef6371bf9be24979951c5c7319b66d.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/def96ae91c3b673de398087a2c3d8754.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/def96ae91c3b673de398087a2c3d8754.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/f38bcbd1ec0a43c94f52f07d603d2a73.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/f38bcbd1ec0a43c94f52f07d603d2a73.json.gz
generated
vendored
Normal file
Binary file not shown.
BIN
conf/site/node_modules/.cache/babel-loader/f853ad5d4f2397d598a6dbb79f267f43.json.gz
generated
vendored
Normal file
BIN
conf/site/node_modules/.cache/babel-loader/f853ad5d4f2397d598a6dbb79f267f43.json.gz
generated
vendored
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
2
conf/site/node_modules/.cache/terser-webpack-plugin/index-v5/34/bd/df961dd3e1d2d41f8cce9309f9fb83df7c33eeb38a190b5cff8b479a1331
generated
vendored
Normal file
2
conf/site/node_modules/.cache/terser-webpack-plugin/index-v5/34/bd/df961dd3e1d2d41f8cce9309f9fb83df7c33eeb38a190b5cff8b479a1331
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
|
||||
c6d1cdd6c9cfafd36b00ec2198768defa48719f6 {"key":"{\"terser\":\"4.6.10\",\"terser-webpack-plugin\":\"2.3.5\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.m?js(\\\\?.*)?$\", \"i\"),\"chunkFilter\":() => true,\"warningsFilter\":() => true,\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"compress\":{\"warnings\":false},\"output\":{\"comments\":false}}},\"nodeVersion\":\"v10.19.0\",\"filename\":\"\\u002Fjs\\u002Fapp.js\",\"contentHash\":\"7291f3e69253d5a5d03a\"}","integrity":"sha512-ThPeRLVLX2/1ssP2u/X5/TSJ0zpVdIw8MYSeccNDa0yNzHd+YWwfEAMu8lmHTNqIHvnQRGV1YGnSJZT/K5g14g==","time":1589280608489,"size":2360500}
|
||||
97
conf/site/node_modules/react-router-dom/cjs/react-router-dom.js
generated
vendored
97
conf/site/node_modules/react-router-dom/cjs/react-router-dom.js
generated
vendored
@@ -196,6 +196,8 @@ var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
|
||||
} else {
|
||||
props.ref = innerRef;
|
||||
}
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
|
||||
|
||||
return React.createElement("a", props);
|
||||
});
|
||||
@@ -291,11 +293,12 @@ var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
exact = _ref.exact,
|
||||
isActiveProp = _ref.isActive,
|
||||
locationProp = _ref.location,
|
||||
sensitive = _ref.sensitive,
|
||||
strict = _ref.strict,
|
||||
styleProp = _ref.style,
|
||||
to = _ref.to,
|
||||
innerRef = _ref.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "strict", "style", "to", "innerRef"]);
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
|
||||
|
||||
return React.createElement(reactRouter.__RouterContext.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <NavLink> outside a <Router>") : void 0;
|
||||
@@ -307,6 +310,7 @@ var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
var match = escapedPath ? reactRouter.matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact: exact,
|
||||
sensitive: sensitive,
|
||||
strict: strict
|
||||
}) : null;
|
||||
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
|
||||
@@ -342,18 +346,95 @@ var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.object
|
||||
});
|
||||
}
|
||||
|
||||
Object.keys(reactRouter).forEach(function (k) {
|
||||
if (k !== 'default') Object.defineProperty(exports, k, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter[k];
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'MemoryRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.MemoryRouter;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Prompt', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Prompt;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Redirect', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Redirect;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Route', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Route;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Router', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Router;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'StaticRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.StaticRouter;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'Switch', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.Switch;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'generatePath', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.generatePath;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'matchPath', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.matchPath;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useHistory', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useHistory;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useLocation', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useLocation;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useParams', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useParams;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'useRouteMatch', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.useRouteMatch;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'withRouter', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return reactRouter.withRouter;
|
||||
}
|
||||
});
|
||||
exports.BrowserRouter = BrowserRouter;
|
||||
exports.HashRouter = HashRouter;
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.js.map
generated
vendored
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.min.js
generated
vendored
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.min.js
generated
vendored
File diff suppressed because one or more lines are too long
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.min.js.map
generated
vendored
2
conf/site/node_modules/react-router-dom/cjs/react-router-dom.min.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
conf/site/node_modules/react-router-dom/es/BrowserRouter.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/BrowserRouter.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("BrowserRouter");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/HashRouter.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/HashRouter.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("HashRouter");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Link.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Link.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Link");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/MemoryRouter.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/MemoryRouter.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("MemoryRouter");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/NavLink.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/NavLink.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("NavLink");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Prompt.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Prompt.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Prompt");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Redirect.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Redirect.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Redirect");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Route.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Route.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Route");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Router.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Router.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Router");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/StaticRouter.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/StaticRouter.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("StaticRouter");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/Switch.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/Switch.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Switch");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/generatePath.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/generatePath.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("generatePath");
|
||||
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/matchPath.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/matchPath.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("matchPath");
|
||||
|
||||
|
||||
3
conf/site/node_modules/react-router-dom/es/warnAboutDeprecatedESMImport.js
generated
vendored
3
conf/site/node_modules/react-router-dom/es/warnAboutDeprecatedESMImport.js
generated
vendored
@@ -1,5 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
/* eslint-disable prefer-arrow-callback, no-empty */
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/es/withRouter.js
generated
vendored
2
conf/site/node_modules/react-router-dom/es/withRouter.js
generated
vendored
@@ -1,5 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("withRouter");
|
||||
|
||||
|
||||
9
conf/site/node_modules/react-router-dom/esm/react-router-dom.js
generated
vendored
9
conf/site/node_modules/react-router-dom/esm/react-router-dom.js
generated
vendored
@@ -1,5 +1,5 @@
|
||||
import { Router, __RouterContext, matchPath } from 'react-router';
|
||||
export * from 'react-router';
|
||||
export { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';
|
||||
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
|
||||
import React from 'react';
|
||||
import { createBrowserHistory, createHashHistory, createLocation } from 'history';
|
||||
@@ -157,6 +157,8 @@ var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
|
||||
} else {
|
||||
props.ref = innerRef;
|
||||
}
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
|
||||
|
||||
return React.createElement("a", props);
|
||||
});
|
||||
@@ -252,11 +254,12 @@ var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
exact = _ref.exact,
|
||||
isActiveProp = _ref.isActive,
|
||||
locationProp = _ref.location,
|
||||
sensitive = _ref.sensitive,
|
||||
strict = _ref.strict,
|
||||
styleProp = _ref.style,
|
||||
to = _ref.to,
|
||||
innerRef = _ref.innerRef,
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "strict", "style", "to", "innerRef"]);
|
||||
rest = _objectWithoutPropertiesLoose(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
|
||||
|
||||
return React.createElement(__RouterContext.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <NavLink> outside a <Router>") : invariant(false) : void 0;
|
||||
@@ -268,6 +271,7 @@ var NavLink = forwardRef$1(function (_ref, forwardedRef) {
|
||||
var match = escapedPath ? matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact: exact,
|
||||
sensitive: sensitive,
|
||||
strict: strict
|
||||
}) : null;
|
||||
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
|
||||
@@ -303,6 +307,7 @@ if (process.env.NODE_ENV !== "production") {
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.object
|
||||
});
|
||||
|
||||
2
conf/site/node_modules/react-router-dom/esm/react-router-dom.js.map
generated
vendored
2
conf/site/node_modules/react-router-dom/esm/react-router-dom.js.map
generated
vendored
File diff suppressed because one or more lines are too long
6
conf/site/node_modules/react-router-dom/modules/Link.js
generated
vendored
6
conf/site/node_modules/react-router-dom/modules/Link.js
generated
vendored
@@ -2,7 +2,10 @@ import React from "react";
|
||||
import { __RouterContext as RouterContext } from "react-router";
|
||||
import PropTypes from "prop-types";
|
||||
import invariant from "tiny-invariant";
|
||||
import { resolveToLocation, normalizeToLocation } from "./utils/locationUtils";
|
||||
import {
|
||||
resolveToLocation,
|
||||
normalizeToLocation
|
||||
} from "./utils/locationUtils.js";
|
||||
|
||||
// React 15 compat
|
||||
const forwardRefShim = C => C;
|
||||
@@ -56,6 +59,7 @@ const LinkAnchor = forwardRef(
|
||||
props.ref = innerRef;
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
||||
return <a {...props} />;
|
||||
}
|
||||
);
|
||||
|
||||
10
conf/site/node_modules/react-router-dom/modules/NavLink.js
generated
vendored
10
conf/site/node_modules/react-router-dom/modules/NavLink.js
generated
vendored
@@ -2,8 +2,11 @@ import React from "react";
|
||||
import { __RouterContext as RouterContext, matchPath } from "react-router";
|
||||
import PropTypes from "prop-types";
|
||||
import invariant from "tiny-invariant";
|
||||
import Link from "./Link";
|
||||
import { resolveToLocation, normalizeToLocation } from "./utils/locationUtils";
|
||||
import Link from "./Link.js";
|
||||
import {
|
||||
resolveToLocation,
|
||||
normalizeToLocation
|
||||
} from "./utils/locationUtils.js";
|
||||
|
||||
// React 15 compat
|
||||
const forwardRefShim = C => C;
|
||||
@@ -29,6 +32,7 @@ const NavLink = forwardRef(
|
||||
exact,
|
||||
isActive: isActiveProp,
|
||||
location: locationProp,
|
||||
sensitive,
|
||||
strict,
|
||||
style: styleProp,
|
||||
to,
|
||||
@@ -56,6 +60,7 @@ const NavLink = forwardRef(
|
||||
? matchPath(currentLocation.pathname, {
|
||||
path: escapedPath,
|
||||
exact,
|
||||
sensitive,
|
||||
strict
|
||||
})
|
||||
: null;
|
||||
@@ -111,6 +116,7 @@ if (__DEV__) {
|
||||
exact: PropTypes.bool,
|
||||
isActive: PropTypes.func,
|
||||
location: PropTypes.object,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool,
|
||||
style: PropTypes.object
|
||||
};
|
||||
|
||||
25
conf/site/node_modules/react-router-dom/modules/index.js
generated
vendored
25
conf/site/node_modules/react-router-dom/modules/index.js
generated
vendored
@@ -1,6 +1,21 @@
|
||||
export * from "react-router";
|
||||
export {
|
||||
MemoryRouter,
|
||||
Prompt,
|
||||
Redirect,
|
||||
Route,
|
||||
Router,
|
||||
StaticRouter,
|
||||
Switch,
|
||||
generatePath,
|
||||
matchPath,
|
||||
withRouter,
|
||||
useHistory,
|
||||
useLocation,
|
||||
useParams,
|
||||
useRouteMatch
|
||||
} from "react-router";
|
||||
|
||||
export { default as BrowserRouter } from "./BrowserRouter";
|
||||
export { default as HashRouter } from "./HashRouter";
|
||||
export { default as Link } from "./Link";
|
||||
export { default as NavLink } from "./NavLink";
|
||||
export { default as BrowserRouter } from "./BrowserRouter.js";
|
||||
export { default as HashRouter } from "./HashRouter.js";
|
||||
export { default as Link } from "./Link.js";
|
||||
export { default as NavLink } from "./NavLink.js";
|
||||
|
||||
54
conf/site/node_modules/react-router-dom/node_modules/isarray/README.md
generated
vendored
Normal file
54
conf/site/node_modules/react-router-dom/node_modules/isarray/README.md
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
# isarray
|
||||
|
||||
`Array#isArray` for older browsers.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var isArray = require('isarray');
|
||||
|
||||
console.log(isArray([])); // => true
|
||||
console.log(isArray({})); // => false
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
With [npm](http://npmjs.org) do
|
||||
|
||||
```bash
|
||||
$ npm install isarray
|
||||
```
|
||||
|
||||
Then bundle for the browser with
|
||||
[browserify](https://github.com/substack/browserify).
|
||||
|
||||
With [component](http://component.io) do
|
||||
|
||||
```bash
|
||||
$ component install juliangruber/isarray
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
(MIT)
|
||||
|
||||
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
209
conf/site/node_modules/react-router-dom/node_modules/isarray/build/build.js
generated
vendored
Normal file
209
conf/site/node_modules/react-router-dom/node_modules/isarray/build/build.js
generated
vendored
Normal file
@@ -0,0 +1,209 @@
|
||||
|
||||
/**
|
||||
* Require the given path.
|
||||
*
|
||||
* @param {String} path
|
||||
* @return {Object} exports
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function require(path, parent, orig) {
|
||||
var resolved = require.resolve(path);
|
||||
|
||||
// lookup failed
|
||||
if (null == resolved) {
|
||||
orig = orig || path;
|
||||
parent = parent || 'root';
|
||||
var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
|
||||
err.path = orig;
|
||||
err.parent = parent;
|
||||
err.require = true;
|
||||
throw err;
|
||||
}
|
||||
|
||||
var module = require.modules[resolved];
|
||||
|
||||
// perform real require()
|
||||
// by invoking the module's
|
||||
// registered function
|
||||
if (!module.exports) {
|
||||
module.exports = {};
|
||||
module.client = module.component = true;
|
||||
module.call(this, module.exports, require.relative(resolved), module);
|
||||
}
|
||||
|
||||
return module.exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registered modules.
|
||||
*/
|
||||
|
||||
require.modules = {};
|
||||
|
||||
/**
|
||||
* Registered aliases.
|
||||
*/
|
||||
|
||||
require.aliases = {};
|
||||
|
||||
/**
|
||||
* Resolve `path`.
|
||||
*
|
||||
* Lookup:
|
||||
*
|
||||
* - PATH/index.js
|
||||
* - PATH.js
|
||||
* - PATH
|
||||
*
|
||||
* @param {String} path
|
||||
* @return {String} path or null
|
||||
* @api private
|
||||
*/
|
||||
|
||||
require.resolve = function(path) {
|
||||
if (path.charAt(0) === '/') path = path.slice(1);
|
||||
var index = path + '/index.js';
|
||||
|
||||
var paths = [
|
||||
path,
|
||||
path + '.js',
|
||||
path + '.json',
|
||||
path + '/index.js',
|
||||
path + '/index.json'
|
||||
];
|
||||
|
||||
for (var i = 0; i < paths.length; i++) {
|
||||
var path = paths[i];
|
||||
if (require.modules.hasOwnProperty(path)) return path;
|
||||
}
|
||||
|
||||
if (require.aliases.hasOwnProperty(index)) {
|
||||
return require.aliases[index];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Normalize `path` relative to the current path.
|
||||
*
|
||||
* @param {String} curr
|
||||
* @param {String} path
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
require.normalize = function(curr, path) {
|
||||
var segs = [];
|
||||
|
||||
if ('.' != path.charAt(0)) return path;
|
||||
|
||||
curr = curr.split('/');
|
||||
path = path.split('/');
|
||||
|
||||
for (var i = 0; i < path.length; ++i) {
|
||||
if ('..' == path[i]) {
|
||||
curr.pop();
|
||||
} else if ('.' != path[i] && '' != path[i]) {
|
||||
segs.push(path[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return curr.concat(segs).join('/');
|
||||
};
|
||||
|
||||
/**
|
||||
* Register module at `path` with callback `definition`.
|
||||
*
|
||||
* @param {String} path
|
||||
* @param {Function} definition
|
||||
* @api private
|
||||
*/
|
||||
|
||||
require.register = function(path, definition) {
|
||||
require.modules[path] = definition;
|
||||
};
|
||||
|
||||
/**
|
||||
* Alias a module definition.
|
||||
*
|
||||
* @param {String} from
|
||||
* @param {String} to
|
||||
* @api private
|
||||
*/
|
||||
|
||||
require.alias = function(from, to) {
|
||||
if (!require.modules.hasOwnProperty(from)) {
|
||||
throw new Error('Failed to alias "' + from + '", it does not exist');
|
||||
}
|
||||
require.aliases[to] = from;
|
||||
};
|
||||
|
||||
/**
|
||||
* Return a require function relative to the `parent` path.
|
||||
*
|
||||
* @param {String} parent
|
||||
* @return {Function}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
require.relative = function(parent) {
|
||||
var p = require.normalize(parent, '..');
|
||||
|
||||
/**
|
||||
* lastIndexOf helper.
|
||||
*/
|
||||
|
||||
function lastIndexOf(arr, obj) {
|
||||
var i = arr.length;
|
||||
while (i--) {
|
||||
if (arr[i] === obj) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* The relative require() itself.
|
||||
*/
|
||||
|
||||
function localRequire(path) {
|
||||
var resolved = localRequire.resolve(path);
|
||||
return require(resolved, parent, path);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve relative to the parent.
|
||||
*/
|
||||
|
||||
localRequire.resolve = function(path) {
|
||||
var c = path.charAt(0);
|
||||
if ('/' == c) return path.slice(1);
|
||||
if ('.' == c) return require.normalize(p, path);
|
||||
|
||||
// resolve deps by returning
|
||||
// the dep in the nearest "deps"
|
||||
// directory
|
||||
var segs = parent.split('/');
|
||||
var i = lastIndexOf(segs, 'deps') + 1;
|
||||
if (!i) i = 0;
|
||||
path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
|
||||
return path;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if module is defined at `path`.
|
||||
*/
|
||||
|
||||
localRequire.exists = function(path) {
|
||||
return require.modules.hasOwnProperty(localRequire.resolve(path));
|
||||
};
|
||||
|
||||
return localRequire;
|
||||
};
|
||||
require.register("isarray/index.js", function(exports, require, module){
|
||||
module.exports = Array.isArray || function (arr) {
|
||||
return Object.prototype.toString.call(arr) == '[object Array]';
|
||||
};
|
||||
|
||||
});
|
||||
require.alias("isarray/index.js", "isarray/index.js");
|
||||
|
||||
19
conf/site/node_modules/react-router-dom/node_modules/isarray/component.json
generated
vendored
Normal file
19
conf/site/node_modules/react-router-dom/node_modules/isarray/component.json
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name" : "isarray",
|
||||
"description" : "Array#isArray for older browsers",
|
||||
"version" : "0.0.1",
|
||||
"repository" : "juliangruber/isarray",
|
||||
"homepage": "https://github.com/juliangruber/isarray",
|
||||
"main" : "index.js",
|
||||
"scripts" : [
|
||||
"index.js"
|
||||
],
|
||||
"dependencies" : {},
|
||||
"keywords": ["browser","isarray","array"],
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/isarray/index.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/isarray/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = Array.isArray || function (arr) {
|
||||
return Object.prototype.toString.call(arr) == '[object Array]';
|
||||
};
|
||||
60
conf/site/node_modules/react-router-dom/node_modules/isarray/package.json
generated
vendored
Normal file
60
conf/site/node_modules/react-router-dom/node_modules/isarray/package.json
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"isarray@0.0.1",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_from": "isarray@0.0.1",
|
||||
"_id": "isarray@0.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
|
||||
"_location": "/react-router-dom/isarray",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "isarray@0.0.1",
|
||||
"name": "isarray",
|
||||
"escapedName": "isarray",
|
||||
"rawSpec": "0.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/react-router-dom/path-to-regexp"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"_spec": "0.0.1",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "Julian Gruber",
|
||||
"email": "mail@juliangruber.com",
|
||||
"url": "http://juliangruber.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/juliangruber/isarray/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Array#isArray for older browsers",
|
||||
"devDependencies": {
|
||||
"tap": "*"
|
||||
},
|
||||
"homepage": "https://github.com/juliangruber/isarray",
|
||||
"keywords": [
|
||||
"browser",
|
||||
"isarray",
|
||||
"array"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "isarray",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/juliangruber/isarray.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "0.0.1"
|
||||
}
|
||||
21
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/LICENSE
generated
vendored
Normal file
21
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2019-present StringEpsilon <StringEpsilon@gmail.com>
|
||||
|
||||
Copyright (c) 2017-2019 James Kyle <me@thejameskyle.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
124
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/README.md
generated
vendored
Normal file
124
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/README.md
generated
vendored
Normal file
@@ -0,0 +1,124 @@
|
||||
# mini-create-react-context
|
||||
|
||||
<p align="center">
|
||||
<a href="https://packagephobia.now.sh/result?p=mini-create-react-context">
|
||||
<img alt="npm install size" src="https://packagephobia.now.sh/badge?p=mini-create-react-context">
|
||||
</a>
|
||||
<a href="https://bundlephobia.com/result?p=mini-create-react-context@latest">
|
||||
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/min/mini-create-react-context/latest.svg?style=flat-square">
|
||||
</a>
|
||||
<a href="https://www.npmjs.com/package/mini-create-react-context">
|
||||
<img alt="npm" src="https://img.shields.io/npm/v/mini-create-react-context.svg?style=flat-square">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
> (A smaller) Polyfill for the [React context API](https://github.com/reactjs/rfcs/pull/2)
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install mini-create-react-context
|
||||
```
|
||||
|
||||
You'll need to also have `react` and `prop-types` installed.
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
const Context = createReactContext(defaultValue);
|
||||
/*
|
||||
<Context.Provider value={providedValue}>
|
||||
{children}
|
||||
</Context.Provider>
|
||||
|
||||
...
|
||||
|
||||
<Context.Consumer>
|
||||
{value => children}
|
||||
</Context.Consumer>
|
||||
*/
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
// @flow
|
||||
import React, { type Node } from 'react';
|
||||
import createReactContext, { type Context } from 'mini-create-react-context';
|
||||
|
||||
type Theme = 'light' | 'dark';
|
||||
// Pass a default theme to ensure type correctness
|
||||
const ThemeContext: Context<Theme> = createReactContext('light');
|
||||
|
||||
class ThemeToggler extends React.Component<
|
||||
{ children: Node },
|
||||
{ theme: Theme }
|
||||
> {
|
||||
state = { theme: 'light' };
|
||||
render() {
|
||||
return (
|
||||
// Pass the current context value to the Provider's `value` prop.
|
||||
// Changes are detected using strict comparison (Object.is)
|
||||
<ThemeContext.Provider value={this.state.theme}>
|
||||
<button
|
||||
onClick={() => {
|
||||
this.setState(state => ({
|
||||
theme: state.theme === 'light' ? 'dark' : 'light'
|
||||
}));
|
||||
}}
|
||||
>
|
||||
Toggle theme
|
||||
</button>
|
||||
{this.props.children}
|
||||
</ThemeContext.Provider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Title extends React.Component<{ children: Node }> {
|
||||
render() {
|
||||
return (
|
||||
// The Consumer uses a render prop API. Avoids conflicts in the
|
||||
// props namespace.
|
||||
<ThemeContext.Consumer>
|
||||
{theme => (
|
||||
<h1 style={{ color: theme === 'light' ? '#000' : '#fff' }}>
|
||||
{this.props.children}
|
||||
</h1>
|
||||
)}
|
||||
</ThemeContext.Consumer>
|
||||
);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Compatibility
|
||||
|
||||
This package only "ponyfills" the `React.createContext` API, not other unrelated React 16+ APIs. If you are using a version of React <16, keep in mind that you can only use features available in that version.
|
||||
|
||||
For example, you cannot pass children types aren't valid pre React 16:
|
||||
|
||||
```js
|
||||
<Context.Provider>
|
||||
<div/>
|
||||
<div/>
|
||||
</Context.Provider>
|
||||
```
|
||||
|
||||
It will throw `A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object.` because `<Context.Provider>` can only receive a single child element. To fix the error just wrap everyting in a single `<div>`:
|
||||
|
||||
```js
|
||||
<Context.Provider>
|
||||
<div>
|
||||
<div/>
|
||||
<div/>
|
||||
</div>
|
||||
</Context.Provider>
|
||||
```
|
||||
|
||||
## Size difference to the original:
|
||||
| | original | **mini**
|
||||
|------------|----------|-----
|
||||
|install size| [**50 kB**](https://packagephobia.now.sh/result?p=create-react-context) | [140 kB](https://packagephobia.now.sh/result?p=mini-create-react-context)
|
||||
|minified | [3.3 kB](https://bundlephobia.com/result?p=create-react-context) | [**2.3kB**](https://bundlephobia.com/result?p=mini-create-react-context)
|
||||
|minzip | 1.3 kB | **1.0kB**
|
||||
167
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/cjs/index.js
generated
vendored
Normal file
167
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
'use strict';function _interopDefault(e){return(e&&(typeof e==='object')&&'default'in e)?e['default']:e}var React=require('react'),React__default=_interopDefault(React),_inheritsLoose=_interopDefault(require('@babel/runtime/helpers/inheritsLoose')),PropTypes=_interopDefault(require('prop-types')),warning=_interopDefault(require('tiny-warning'));var MAX_SIGNED_31_BIT_INT = 1073741823;
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
||||
|
||||
function getUniqueId() {
|
||||
var key = '__global_unique_id__';
|
||||
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
||||
}
|
||||
|
||||
function objectIs(x, y) {
|
||||
if (x === y) {
|
||||
return x !== 0 || 1 / x === 1 / y;
|
||||
} else {
|
||||
return x !== x && y !== y;
|
||||
}
|
||||
}
|
||||
|
||||
function createEventEmitter(value) {
|
||||
var handlers = [];
|
||||
return {
|
||||
on: function on(handler) {
|
||||
handlers.push(handler);
|
||||
},
|
||||
off: function off(handler) {
|
||||
handlers = handlers.filter(function (h) {
|
||||
return h !== handler;
|
||||
});
|
||||
},
|
||||
get: function get() {
|
||||
return value;
|
||||
},
|
||||
set: function set(newValue, changedBits) {
|
||||
value = newValue;
|
||||
handlers.forEach(function (handler) {
|
||||
return handler(value, changedBits);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function onlyChild(children) {
|
||||
return Array.isArray(children) ? children[0] : children;
|
||||
}
|
||||
|
||||
function createReactContext(defaultValue, calculateChangedBits) {
|
||||
var _Provider$childContex, _Consumer$contextType;
|
||||
|
||||
var contextProp = '__create-react-context-' + getUniqueId() + '__';
|
||||
|
||||
var Provider = /*#__PURE__*/function (_Component) {
|
||||
_inheritsLoose(Provider, _Component);
|
||||
|
||||
function Provider() {
|
||||
var _this;
|
||||
|
||||
_this = _Component.apply(this, arguments) || this;
|
||||
_this.emitter = createEventEmitter(_this.props.value);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = Provider.prototype;
|
||||
|
||||
_proto.getChildContext = function getChildContext() {
|
||||
var _ref;
|
||||
|
||||
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
||||
};
|
||||
|
||||
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||||
if (this.props.value !== nextProps.value) {
|
||||
var oldValue = this.props.value;
|
||||
var newValue = nextProps.value;
|
||||
var changedBits;
|
||||
|
||||
if (objectIs(oldValue, newValue)) {
|
||||
changedBits = 0;
|
||||
} else {
|
||||
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits);
|
||||
}
|
||||
|
||||
changedBits |= 0;
|
||||
|
||||
if (changedBits !== 0) {
|
||||
this.emitter.set(nextProps.value, changedBits);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return this.props.children;
|
||||
};
|
||||
|
||||
return Provider;
|
||||
}(React.Component);
|
||||
|
||||
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
||||
|
||||
var Consumer = /*#__PURE__*/function (_Component2) {
|
||||
_inheritsLoose(Consumer, _Component2);
|
||||
|
||||
function Consumer() {
|
||||
var _this2;
|
||||
|
||||
_this2 = _Component2.apply(this, arguments) || this;
|
||||
_this2.state = {
|
||||
value: _this2.getValue()
|
||||
};
|
||||
|
||||
_this2.onUpdate = function (newValue, changedBits) {
|
||||
var observedBits = _this2.observedBits | 0;
|
||||
|
||||
if ((observedBits & changedBits) !== 0) {
|
||||
_this2.setState({
|
||||
value: _this2.getValue()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return _this2;
|
||||
}
|
||||
|
||||
var _proto2 = Consumer.prototype;
|
||||
|
||||
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||||
var observedBits = nextProps.observedBits;
|
||||
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
||||
};
|
||||
|
||||
_proto2.componentDidMount = function componentDidMount() {
|
||||
if (this.context[contextProp]) {
|
||||
this.context[contextProp].on(this.onUpdate);
|
||||
}
|
||||
|
||||
var observedBits = this.props.observedBits;
|
||||
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
||||
};
|
||||
|
||||
_proto2.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.context[contextProp]) {
|
||||
this.context[contextProp].off(this.onUpdate);
|
||||
}
|
||||
};
|
||||
|
||||
_proto2.getValue = function getValue() {
|
||||
if (this.context[contextProp]) {
|
||||
return this.context[contextProp].get();
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
};
|
||||
|
||||
_proto2.render = function render() {
|
||||
return onlyChild(this.props.children)(this.state.value);
|
||||
};
|
||||
|
||||
return Consumer;
|
||||
}(React.Component);
|
||||
|
||||
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
||||
return {
|
||||
Provider: Provider,
|
||||
Consumer: Consumer
|
||||
};
|
||||
}var index = React__default.createContext || createReactContext;module.exports=index;
|
||||
1
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/cjs/index.min.js
generated
vendored
Normal file
1
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/cjs/index.min.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=require("react"),n=t(e),r=t(require("@babel/runtime/helpers/inheritsLoose")),o=t(require("prop-types")),i=t(require("tiny-warning")),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function s(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var a=n.createContext||function(t,n){var a,c,l,p="__create-react-context-"+(u[l="__global_unique_id__"]=(u[l]||0)+1)+"__",f=function(t){function e(){var e;return(e=t.apply(this,arguments)||this).emitter=s(e.props.value),e}r(e,t);var o=e.prototype;return o.getChildContext=function(){var t;return(t={})[p]=this.emitter,t},o.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e,r=this.props.value,o=t.value;((u=r)===(s=o)?0!==u||1/u==1/s:u!=u&&s!=s)?e=0:(e="function"==typeof n?n(r,o):1073741823,"production"!==process.env.NODE_ENV&&i((1073741823&e)===e,"calculateChangedBits: Expected the return value to be a 31-bit integer. Instead received: "+e),0!==(e|=0)&&this.emitter.set(t.value,e))}var u,s},o.render=function(){return this.props.children},e}(e.Component);f.childContextTypes=((a={})[p]=o.object.isRequired,a);var v=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}r(n,e);var o=n.prototype;return o.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},o.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},o.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},o.getValue=function(){return this.context[p]?this.context[p].get():t},o.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return v.contextTypes=((c={})[p]=o.object,c),{Provider:f,Consumer:v}};module.exports=a;
|
||||
176
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/esm/index.js
generated
vendored
Normal file
176
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,176 @@
|
||||
import React, { Component } from 'react';
|
||||
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
|
||||
import PropTypes from 'prop-types';
|
||||
import warning from 'tiny-warning';
|
||||
|
||||
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
||||
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
|
||||
|
||||
function getUniqueId() {
|
||||
var key = '__global_unique_id__';
|
||||
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
||||
}
|
||||
|
||||
function objectIs(x, y) {
|
||||
if (x === y) {
|
||||
return x !== 0 || 1 / x === 1 / y;
|
||||
} else {
|
||||
return x !== x && y !== y;
|
||||
}
|
||||
}
|
||||
|
||||
function createEventEmitter(value) {
|
||||
var handlers = [];
|
||||
return {
|
||||
on: function on(handler) {
|
||||
handlers.push(handler);
|
||||
},
|
||||
off: function off(handler) {
|
||||
handlers = handlers.filter(function (h) {
|
||||
return h !== handler;
|
||||
});
|
||||
},
|
||||
get: function get() {
|
||||
return value;
|
||||
},
|
||||
set: function set(newValue, changedBits) {
|
||||
value = newValue;
|
||||
handlers.forEach(function (handler) {
|
||||
return handler(value, changedBits);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function onlyChild(children) {
|
||||
return Array.isArray(children) ? children[0] : children;
|
||||
}
|
||||
|
||||
function createReactContext(defaultValue, calculateChangedBits) {
|
||||
var _Provider$childContex, _Consumer$contextType;
|
||||
|
||||
var contextProp = '__create-react-context-' + getUniqueId() + '__';
|
||||
|
||||
var Provider = /*#__PURE__*/function (_Component) {
|
||||
_inheritsLoose(Provider, _Component);
|
||||
|
||||
function Provider() {
|
||||
var _this;
|
||||
|
||||
_this = _Component.apply(this, arguments) || this;
|
||||
_this.emitter = createEventEmitter(_this.props.value);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = Provider.prototype;
|
||||
|
||||
_proto.getChildContext = function getChildContext() {
|
||||
var _ref;
|
||||
|
||||
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
||||
};
|
||||
|
||||
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||||
if (this.props.value !== nextProps.value) {
|
||||
var oldValue = this.props.value;
|
||||
var newValue = nextProps.value;
|
||||
var changedBits;
|
||||
|
||||
if (objectIs(oldValue, newValue)) {
|
||||
changedBits = 0;
|
||||
} else {
|
||||
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
warning((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: ' + changedBits);
|
||||
}
|
||||
|
||||
changedBits |= 0;
|
||||
|
||||
if (changedBits !== 0) {
|
||||
this.emitter.set(nextProps.value, changedBits);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return this.props.children;
|
||||
};
|
||||
|
||||
return Provider;
|
||||
}(Component);
|
||||
|
||||
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
||||
|
||||
var Consumer = /*#__PURE__*/function (_Component2) {
|
||||
_inheritsLoose(Consumer, _Component2);
|
||||
|
||||
function Consumer() {
|
||||
var _this2;
|
||||
|
||||
_this2 = _Component2.apply(this, arguments) || this;
|
||||
_this2.state = {
|
||||
value: _this2.getValue()
|
||||
};
|
||||
|
||||
_this2.onUpdate = function (newValue, changedBits) {
|
||||
var observedBits = _this2.observedBits | 0;
|
||||
|
||||
if ((observedBits & changedBits) !== 0) {
|
||||
_this2.setState({
|
||||
value: _this2.getValue()
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return _this2;
|
||||
}
|
||||
|
||||
var _proto2 = Consumer.prototype;
|
||||
|
||||
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
||||
var observedBits = nextProps.observedBits;
|
||||
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
||||
};
|
||||
|
||||
_proto2.componentDidMount = function componentDidMount() {
|
||||
if (this.context[contextProp]) {
|
||||
this.context[contextProp].on(this.onUpdate);
|
||||
}
|
||||
|
||||
var observedBits = this.props.observedBits;
|
||||
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
||||
};
|
||||
|
||||
_proto2.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.context[contextProp]) {
|
||||
this.context[contextProp].off(this.onUpdate);
|
||||
}
|
||||
};
|
||||
|
||||
_proto2.getValue = function getValue() {
|
||||
if (this.context[contextProp]) {
|
||||
return this.context[contextProp].get();
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
};
|
||||
|
||||
_proto2.render = function render() {
|
||||
return onlyChild(this.props.children)(this.state.value);
|
||||
};
|
||||
|
||||
return Consumer;
|
||||
}(Component);
|
||||
|
||||
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
||||
return {
|
||||
Provider: Provider,
|
||||
Consumer: Consumer
|
||||
};
|
||||
}
|
||||
|
||||
var index = React.createContext || createReactContext;
|
||||
|
||||
export default index;
|
||||
24
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/index.d.ts
generated
vendored
Normal file
24
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import * as React from 'react';
|
||||
|
||||
export default function createReactContext<T>(
|
||||
defaultValue: T,
|
||||
calculateChangedBits?: (prev: T, next: T) => number
|
||||
): Context<T>;
|
||||
|
||||
type RenderFn<T> = (value: T) => React.ReactNode;
|
||||
|
||||
export type Context<T> = {
|
||||
Provider: React.ComponentClass<ProviderProps<T>>;
|
||||
Consumer: React.ComponentClass<ConsumerProps<T>>;
|
||||
};
|
||||
|
||||
export type ProviderProps<T> = {
|
||||
value: T;
|
||||
children?: React.ReactNode;
|
||||
observedBits?: any,
|
||||
};
|
||||
|
||||
export type ConsumerProps<T> = {
|
||||
children: RenderFn<T> | [RenderFn<T>];
|
||||
observedBits?: number;
|
||||
};
|
||||
101
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/package.json
generated
vendored
Normal file
101
conf/site/node_modules/react-router-dom/node_modules/mini-create-react-context/package.json
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"mini-create-react-context@0.4.0",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_from": "mini-create-react-context@0.4.0",
|
||||
"_id": "mini-create-react-context@0.4.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==",
|
||||
"_location": "/react-router-dom/mini-create-react-context",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "mini-create-react-context@0.4.0",
|
||||
"name": "mini-create-react-context",
|
||||
"escapedName": "mini-create-react-context",
|
||||
"rawSpec": "0.4.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.4.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/react-router-dom/react-router"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz",
|
||||
"_spec": "0.4.0",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"author": {
|
||||
"name": "StringEpsilon"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/StringEpsilon/mini-create-react-context/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"tiny-warning": "^1.0.3"
|
||||
},
|
||||
"description": "Smaller Polyfill for the proposed React context API",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.8.6",
|
||||
"@babel/plugin-proposal-class-properties": "^7.8.3",
|
||||
"@babel/preset-env": "^7.8.6",
|
||||
"@babel/preset-react": "^7.8.3",
|
||||
"@babel/preset-typescript": "^7.8.3",
|
||||
"@types/enzyme": "^3.10.5",
|
||||
"@types/jest": "^25.1.3",
|
||||
"@types/react": "^16.8.23",
|
||||
"@wessberg/rollup-plugin-ts": "^1.2.19",
|
||||
"babel-jest": "^25.1.0",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.2",
|
||||
"enzyme-to-json": "^3.3.5",
|
||||
"jest": "^25.1.0",
|
||||
"prop-types": "^15.6.0",
|
||||
"raf": "^3.4.1",
|
||||
"react": "^16.2.0",
|
||||
"react-dom": "^16.2.0",
|
||||
"rollup": "^1.17.0",
|
||||
"rollup-plugin-commonjs": "^10.0.1",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-terser": "^5.2.0",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"files": [
|
||||
"dist/**"
|
||||
],
|
||||
"homepage": "https://github.com/StringEpsilon/mini-create-react-context#readme",
|
||||
"jest": {
|
||||
"snapshotSerializers": [
|
||||
"enzyme-to-json/serializer"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"react",
|
||||
"context",
|
||||
"contextTypes",
|
||||
"polyfill",
|
||||
"ponyfill"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/cjs/index.js",
|
||||
"module": "dist/esm/index.js",
|
||||
"name": "mini-create-react-context",
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.0.0",
|
||||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/StringEpsilon/mini-create-react-context.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c rollup.config.js",
|
||||
"prepublish": "npm run build",
|
||||
"test": "jest"
|
||||
},
|
||||
"types": "dist/index.d.ts",
|
||||
"version": "0.4.0"
|
||||
}
|
||||
158
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/History.md
generated
vendored
Normal file
158
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/History.md
generated
vendored
Normal file
@@ -0,0 +1,158 @@
|
||||
1.7.0 / 2016-11-08
|
||||
==================
|
||||
|
||||
* Allow a `delimiter` option to be passed in with `tokensToRegExp` which will be used for "non-ending" token match situations
|
||||
|
||||
1.6.0 / 2016-10-03
|
||||
==================
|
||||
|
||||
* Populate `RegExp.keys` when using the `tokensToRegExp` method (making it consistent with the main export)
|
||||
* Allow a `delimiter` option to be passed in with `parse`
|
||||
* Updated TypeScript definition with `Keys` and `Options` updated
|
||||
|
||||
1.5.3 / 2016-06-15
|
||||
==================
|
||||
|
||||
* Add `\\` to the ignore character group to avoid backtracking on mismatched parens
|
||||
|
||||
1.5.2 / 2016-06-15
|
||||
==================
|
||||
|
||||
* Escape `\\` in string segments of regexp
|
||||
|
||||
1.5.1 / 2016-06-08
|
||||
==================
|
||||
|
||||
* Add `index.d.ts` to NPM package
|
||||
|
||||
1.5.0 / 2016-05-20
|
||||
==================
|
||||
|
||||
* Handle partial token segments (better)
|
||||
* Allow compile to handle asterisk token segments
|
||||
|
||||
1.4.0 / 2016-05-18
|
||||
==================
|
||||
|
||||
* Handle RegExp unions in path matching groups
|
||||
|
||||
1.3.0 / 2016-05-08
|
||||
==================
|
||||
|
||||
* Clarify README language and named parameter token support
|
||||
* Support advanced Closure Compiler with type annotations
|
||||
* Add pretty paths options to compiled function output
|
||||
* Add TypeScript definition to project
|
||||
* Improved prefix handling with non-complete segment parameters (E.g. `/:foo?-bar`)
|
||||
|
||||
1.2.1 / 2015-08-17
|
||||
==================
|
||||
|
||||
* Encode values before validation with path compilation function
|
||||
* More examples of using compilation in README
|
||||
|
||||
1.2.0 / 2015-05-20
|
||||
==================
|
||||
|
||||
* Add support for matching an asterisk (`*`) as an unnamed match everything group (`(.*)`)
|
||||
|
||||
1.1.1 / 2015-05-11
|
||||
==================
|
||||
|
||||
* Expose methods for working with path tokens
|
||||
|
||||
1.1.0 / 2015-05-09
|
||||
==================
|
||||
|
||||
* Expose the parser implementation to consumers
|
||||
* Implement a compiler function to generate valid strings
|
||||
* Huge refactor of tests to be more DRY and cover new parse and compile functions
|
||||
* Use chai in tests
|
||||
* Add .editorconfig
|
||||
|
||||
1.0.3 / 2015-01-17
|
||||
==================
|
||||
|
||||
* Optimised function runtime
|
||||
* Added `files` to `package.json`
|
||||
|
||||
1.0.2 / 2014-12-17
|
||||
==================
|
||||
|
||||
* Use `Array.isArray` shim
|
||||
* Remove ES5 incompatible code
|
||||
* Fixed repository path
|
||||
* Added new readme badges
|
||||
|
||||
1.0.1 / 2014-08-27
|
||||
==================
|
||||
|
||||
* Ensure installation works correctly on 0.8
|
||||
|
||||
1.0.0 / 2014-08-17
|
||||
==================
|
||||
|
||||
* No more API changes
|
||||
|
||||
0.2.5 / 2014-08-07
|
||||
==================
|
||||
|
||||
* Allow keys parameter to be omitted
|
||||
|
||||
0.2.4 / 2014-08-02
|
||||
==================
|
||||
|
||||
* Code coverage badge
|
||||
* Updated readme
|
||||
* Attach keys to the generated regexp
|
||||
|
||||
0.2.3 / 2014-07-09
|
||||
==================
|
||||
|
||||
* Add MIT license
|
||||
|
||||
0.2.2 / 2014-07-06
|
||||
==================
|
||||
|
||||
* A passed in trailing slash in non-strict mode will become optional
|
||||
* In non-end mode, the optional trailing slash will only match at the end
|
||||
|
||||
0.2.1 / 2014-06-11
|
||||
==================
|
||||
|
||||
* Fixed a major capturing group regexp regression
|
||||
|
||||
0.2.0 / 2014-06-09
|
||||
==================
|
||||
|
||||
* Improved support for arrays
|
||||
* Improved support for regexps
|
||||
* Better support for non-ending strict mode matches with a trailing slash
|
||||
* Travis CI support
|
||||
* Block using regexp special characters in the path
|
||||
* Removed support for the asterisk to match all
|
||||
* New support for parameter suffixes - `*`, `+` and `?`
|
||||
* Updated readme
|
||||
* Provide delimiter information with keys array
|
||||
|
||||
0.1.2 / 2014-03-10
|
||||
==================
|
||||
|
||||
* Move testing dependencies to `devDependencies`
|
||||
|
||||
0.1.1 / 2014-03-10
|
||||
==================
|
||||
|
||||
* Match entire substring with `options.end`
|
||||
* Properly handle ending and non-ending matches
|
||||
|
||||
0.1.0 / 2014-03-06
|
||||
==================
|
||||
|
||||
* Add `options.end`
|
||||
|
||||
0.0.2 / 2013-02-10
|
||||
==================
|
||||
|
||||
* Update to match current express
|
||||
* Add .license property to component.json
|
||||
21
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/LICENSE
generated
vendored
Normal file
21
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
257
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/Readme.md
generated
vendored
Normal file
257
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/Readme.md
generated
vendored
Normal file
@@ -0,0 +1,257 @@
|
||||
# Path-to-RegExp
|
||||
|
||||
> Turn an Express-style path string such as `/user/:name` into a regular expression.
|
||||
|
||||
[![NPM version][npm-image]][npm-url]
|
||||
[![Build status][travis-image]][travis-url]
|
||||
[![Test coverage][coveralls-image]][coveralls-url]
|
||||
[![Dependency Status][david-image]][david-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
npm install path-to-regexp --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
var pathToRegexp = require('path-to-regexp')
|
||||
|
||||
// pathToRegexp(path, keys, options)
|
||||
// pathToRegexp.parse(path)
|
||||
// pathToRegexp.compile(path)
|
||||
```
|
||||
|
||||
- **path** An Express-style string, an array of strings, or a regular expression.
|
||||
- **keys** An array to be populated with the keys found in the path.
|
||||
- **options**
|
||||
- **sensitive** When `true` the route will be case sensitive. (default: `false`)
|
||||
- **strict** When `false` the trailing slash is optional. (default: `false`)
|
||||
- **end** When `false` the path will match at the beginning. (default: `true`)
|
||||
- **delimiter** Set the default delimiter for repeat parameters. (default: `'/'`)
|
||||
|
||||
```javascript
|
||||
var keys = []
|
||||
var re = pathToRegexp('/foo/:bar', keys)
|
||||
// re = /^\/foo\/([^\/]+?)\/?$/i
|
||||
// keys = [{ name: 'bar', prefix: '/', delimiter: '/', optional: false, repeat: false, pattern: '[^\\/]+?' }]
|
||||
```
|
||||
|
||||
**Please note:** The `RegExp` returned by `path-to-regexp` is intended for use with pathnames or hostnames. It can not handle the query strings or fragments of a URL.
|
||||
|
||||
### Parameters
|
||||
|
||||
The path string can be used to define parameters and populate the keys.
|
||||
|
||||
#### Named Parameters
|
||||
|
||||
Named parameters are defined by prefixing a colon to the parameter name (`:foo`). By default, the parameter will match until the following path segment.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo/:bar', keys)
|
||||
// keys = [{ name: 'foo', prefix: '/', ... }, { name: 'bar', prefix: '/', ... }]
|
||||
|
||||
re.exec('/test/route')
|
||||
//=> ['/test/route', 'test', 'route']
|
||||
```
|
||||
|
||||
**Please note:** Named parameters must be made up of "word characters" (`[A-Za-z0-9_]`).
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/(apple-)?icon-:res(\\d+).png', keys)
|
||||
// keys = [{ name: 0, prefix: '/', ... }, { name: 'res', prefix: '', ... }]
|
||||
|
||||
re.exec('/icon-76.png')
|
||||
//=> ['/icon-76.png', undefined, '76']
|
||||
```
|
||||
|
||||
#### Modified Parameters
|
||||
|
||||
##### Optional
|
||||
|
||||
Parameters can be suffixed with a question mark (`?`) to make the parameter optional. This will also make the prefix optional.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo/:bar?', keys)
|
||||
// keys = [{ name: 'foo', ... }, { name: 'bar', delimiter: '/', optional: true, repeat: false }]
|
||||
|
||||
re.exec('/test')
|
||||
//=> ['/test', 'test', undefined]
|
||||
|
||||
re.exec('/test/route')
|
||||
//=> ['/test', 'test', 'route']
|
||||
```
|
||||
|
||||
##### Zero or more
|
||||
|
||||
Parameters can be suffixed with an asterisk (`*`) to denote a zero or more parameter matches. The prefix is taken into account for each match.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo*', keys)
|
||||
// keys = [{ name: 'foo', delimiter: '/', optional: true, repeat: true }]
|
||||
|
||||
re.exec('/')
|
||||
//=> ['/', undefined]
|
||||
|
||||
re.exec('/bar/baz')
|
||||
//=> ['/bar/baz', 'bar/baz']
|
||||
```
|
||||
|
||||
##### One or more
|
||||
|
||||
Parameters can be suffixed with a plus sign (`+`) to denote a one or more parameter matches. The prefix is taken into account for each match.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo+', keys)
|
||||
// keys = [{ name: 'foo', delimiter: '/', optional: false, repeat: true }]
|
||||
|
||||
re.exec('/')
|
||||
//=> null
|
||||
|
||||
re.exec('/bar/baz')
|
||||
//=> ['/bar/baz', 'bar/baz']
|
||||
```
|
||||
|
||||
#### Custom Match Parameters
|
||||
|
||||
All parameters can be provided a custom regexp, which overrides the default (`[^\/]+`).
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo(\\d+)', keys)
|
||||
// keys = [{ name: 'foo', ... }]
|
||||
|
||||
re.exec('/123')
|
||||
//=> ['/123', '123']
|
||||
|
||||
re.exec('/abc')
|
||||
//=> null
|
||||
```
|
||||
|
||||
**Please note:** Backslashes need to be escaped with another backslash in strings.
|
||||
|
||||
#### Unnamed Parameters
|
||||
|
||||
It is possible to write an unnamed parameter that only consists of a matching group. It works the same as a named parameter, except it will be numerically indexed.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/:foo/(.*)', keys)
|
||||
// keys = [{ name: 'foo', ... }, { name: 0, ... }]
|
||||
|
||||
re.exec('/test/route')
|
||||
//=> ['/test/route', 'test', 'route']
|
||||
```
|
||||
|
||||
#### Asterisk
|
||||
|
||||
An asterisk can be used for matching everything. It is equivalent to an unnamed matching group of `(.*)`.
|
||||
|
||||
```js
|
||||
var re = pathToRegexp('/foo/*', keys)
|
||||
// keys = [{ name: '0', ... }]
|
||||
|
||||
re.exec('/foo/bar/baz')
|
||||
//=> ['/foo/bar/baz', 'bar/baz']
|
||||
```
|
||||
|
||||
### Parse
|
||||
|
||||
The parse function is exposed via `pathToRegexp.parse`. This will return an array of strings and keys.
|
||||
|
||||
```js
|
||||
var tokens = pathToRegexp.parse('/route/:foo/(.*)')
|
||||
|
||||
console.log(tokens[0])
|
||||
//=> "/route"
|
||||
|
||||
console.log(tokens[1])
|
||||
//=> { name: 'foo', prefix: '/', delimiter: '/', optional: false, repeat: false, pattern: '[^\\/]+?' }
|
||||
|
||||
console.log(tokens[2])
|
||||
//=> { name: 0, prefix: '/', delimiter: '/', optional: false, repeat: false, pattern: '.*' }
|
||||
```
|
||||
|
||||
**Note:** This method only works with Express-style strings.
|
||||
|
||||
### Compile ("Reverse" Path-To-RegExp)
|
||||
|
||||
Path-To-RegExp exposes a compile function for transforming an Express-style path into a valid path.
|
||||
|
||||
```js
|
||||
var toPath = pathToRegexp.compile('/user/:id')
|
||||
|
||||
toPath({ id: 123 }) //=> "/user/123"
|
||||
toPath({ id: 'café' }) //=> "/user/caf%C3%A9"
|
||||
toPath({ id: '/' }) //=> "/user/%2F"
|
||||
|
||||
toPath({ id: ':' }) //=> "/user/%3A"
|
||||
toPath({ id: ':' }, { pretty: true }) //=> "/user/:"
|
||||
|
||||
var toPathRepeated = pathToRegexp.compile('/:segment+')
|
||||
|
||||
toPathRepeated({ segment: 'foo' }) //=> "/foo"
|
||||
toPathRepeated({ segment: ['a', 'b', 'c'] }) //=> "/a/b/c"
|
||||
|
||||
var toPathRegexp = pathToRegexp.compile('/user/:id(\\d+)')
|
||||
|
||||
toPathRegexp({ id: 123 }) //=> "/user/123"
|
||||
toPathRegexp({ id: '123' }) //=> "/user/123"
|
||||
toPathRegexp({ id: 'abc' }) //=> Throws `TypeError`.
|
||||
```
|
||||
|
||||
**Note:** The generated function will throw on invalid input. It will do all necessary checks to ensure the generated path is valid. This method only works with strings.
|
||||
|
||||
### Working with Tokens
|
||||
|
||||
Path-To-RegExp exposes the two functions used internally that accept an array of tokens.
|
||||
|
||||
* `pathToRegexp.tokensToRegExp(tokens, options)` Transform an array of tokens into a matching regular expression.
|
||||
* `pathToRegexp.tokensToFunction(tokens)` Transform an array of tokens into a path generator function.
|
||||
|
||||
#### Token Information
|
||||
|
||||
* `name` The name of the token (`string` for named or `number` for index)
|
||||
* `prefix` The prefix character for the segment (`/` or `.`)
|
||||
* `delimiter` The delimiter for the segment (same as prefix or `/`)
|
||||
* `optional` Indicates the token is optional (`boolean`)
|
||||
* `repeat` Indicates the token is repeated (`boolean`)
|
||||
* `partial` Indicates this token is a partial path segment (`boolean`)
|
||||
* `pattern` The RegExp used to match this token (`string`)
|
||||
* `asterisk` Indicates the token is an `*` match (`boolean`)
|
||||
|
||||
## Compatibility with Express <= 4.x
|
||||
|
||||
Path-To-RegExp breaks compatibility with Express <= `4.x`:
|
||||
|
||||
* No longer a direct conversion to a RegExp with sugar on top - it's a path matcher with named and unnamed matching groups
|
||||
* It's unlikely you previously abused this feature, it's rare and you could always use a RegExp instead
|
||||
* All matching RegExp special characters can be used in a matching group. E.g. `/:user(.*)`
|
||||
* Other RegExp features are not support - no nested matching groups, non-capturing groups or look aheads
|
||||
* Parameters have suffixes that augment meaning - `*`, `+` and `?`. E.g. `/:user*`
|
||||
|
||||
## TypeScript
|
||||
|
||||
Includes a [`.d.ts`](index.d.ts) file for TypeScript users.
|
||||
|
||||
## Live Demo
|
||||
|
||||
You can see a live demo of this library in use at [express-route-tester](http://forbeslindesay.github.com/express-route-tester/).
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/path-to-regexp.svg?style=flat
|
||||
[npm-url]: https://npmjs.org/package/path-to-regexp
|
||||
[travis-image]: https://img.shields.io/travis/pillarjs/path-to-regexp.svg?style=flat
|
||||
[travis-url]: https://travis-ci.org/pillarjs/path-to-regexp
|
||||
[coveralls-image]: https://img.shields.io/coveralls/pillarjs/path-to-regexp.svg?style=flat
|
||||
[coveralls-url]: https://coveralls.io/r/pillarjs/path-to-regexp?branch=master
|
||||
[david-image]: http://img.shields.io/david/pillarjs/path-to-regexp.svg?style=flat
|
||||
[david-url]: https://david-dm.org/pillarjs/path-to-regexp
|
||||
[license-image]: http://img.shields.io/npm/l/path-to-regexp.svg?style=flat
|
||||
[license-url]: LICENSE.md
|
||||
[downloads-image]: http://img.shields.io/npm/dm/path-to-regexp.svg?style=flat
|
||||
[downloads-url]: https://npmjs.org/package/path-to-regexp
|
||||
84
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/index.d.ts
generated
vendored
Normal file
84
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
declare function pathToRegexp (path: pathToRegexp.Path, options?: pathToRegexp.RegExpOptions & pathToRegexp.ParseOptions): pathToRegexp.PathRegExp;
|
||||
declare function pathToRegexp (path: pathToRegexp.Path, keys?: pathToRegexp.Key[], options?: pathToRegexp.RegExpOptions & pathToRegexp.ParseOptions): pathToRegexp.PathRegExp;
|
||||
|
||||
declare namespace pathToRegexp {
|
||||
export interface PathRegExp extends RegExp {
|
||||
// An array to be populated with the keys found in the path.
|
||||
keys: Key[];
|
||||
}
|
||||
|
||||
export interface RegExpOptions {
|
||||
/**
|
||||
* When `true` the route will be case sensitive. (default: `false`)
|
||||
*/
|
||||
sensitive?: boolean;
|
||||
/**
|
||||
* When `false` the trailing slash is optional. (default: `false`)
|
||||
*/
|
||||
strict?: boolean;
|
||||
/**
|
||||
* When `false` the path will match at the beginning. (default: `true`)
|
||||
*/
|
||||
end?: boolean;
|
||||
/**
|
||||
* Sets the final character for non-ending optimistic matches. (default: `/`)
|
||||
*/
|
||||
delimiter?: string;
|
||||
}
|
||||
|
||||
export interface ParseOptions {
|
||||
/**
|
||||
* Set the default delimiter for repeat parameters. (default: `'/'`)
|
||||
*/
|
||||
delimiter?: string;
|
||||
}
|
||||
|
||||
export interface TokensToFunctionOptions {
|
||||
/**
|
||||
* When `true` the regexp will be case sensitive. (default: `false`)
|
||||
*/
|
||||
sensitive?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse an Express-style path into an array of tokens.
|
||||
*/
|
||||
export function parse (path: string, options?: ParseOptions): Token[];
|
||||
|
||||
/**
|
||||
* Transforming an Express-style path into a valid path.
|
||||
*/
|
||||
export function compile (path: string, options?: ParseOptions & TokensToFunctionOptions): PathFunction;
|
||||
|
||||
/**
|
||||
* Transform an array of tokens into a path generator function.
|
||||
*/
|
||||
export function tokensToFunction (tokens: Token[], options?: TokensToFunctionOptions): PathFunction;
|
||||
|
||||
/**
|
||||
* Transform an array of tokens into a matching regular expression.
|
||||
*/
|
||||
export function tokensToRegExp (tokens: Token[], options?: RegExpOptions): PathRegExp;
|
||||
export function tokensToRegExp (tokens: Token[], keys?: Key[], options?: RegExpOptions): PathRegExp;
|
||||
|
||||
export interface Key {
|
||||
name: string | number;
|
||||
prefix: string;
|
||||
delimiter: string;
|
||||
optional: boolean;
|
||||
repeat: boolean;
|
||||
pattern: string;
|
||||
partial: boolean;
|
||||
asterisk: boolean;
|
||||
}
|
||||
|
||||
interface PathFunctionOptions {
|
||||
pretty?: boolean;
|
||||
}
|
||||
|
||||
export type Token = string | Key;
|
||||
export type Path = string | RegExp | Array<string | RegExp>;
|
||||
export type PathFunction = (data?: Object, options?: PathFunctionOptions) => string;
|
||||
}
|
||||
|
||||
export = pathToRegexp;
|
||||
426
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/index.js
generated
vendored
Normal file
426
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/index.js
generated
vendored
Normal file
@@ -0,0 +1,426 @@
|
||||
var isarray = require('isarray')
|
||||
|
||||
/**
|
||||
* Expose `pathToRegexp`.
|
||||
*/
|
||||
module.exports = pathToRegexp
|
||||
module.exports.parse = parse
|
||||
module.exports.compile = compile
|
||||
module.exports.tokensToFunction = tokensToFunction
|
||||
module.exports.tokensToRegExp = tokensToRegExp
|
||||
|
||||
/**
|
||||
* The main path matching regexp utility.
|
||||
*
|
||||
* @type {RegExp}
|
||||
*/
|
||||
var PATH_REGEXP = new RegExp([
|
||||
// Match escaped characters that would otherwise appear in future matches.
|
||||
// This allows the user to escape special characters that won't transform.
|
||||
'(\\\\.)',
|
||||
// Match Express-style parameters and un-named parameters with a prefix
|
||||
// and optional suffixes. Matches appear as:
|
||||
//
|
||||
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
|
||||
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
|
||||
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
|
||||
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
|
||||
].join('|'), 'g')
|
||||
|
||||
/**
|
||||
* Parse a string for the raw tokens.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {Object=} options
|
||||
* @return {!Array}
|
||||
*/
|
||||
function parse (str, options) {
|
||||
var tokens = []
|
||||
var key = 0
|
||||
var index = 0
|
||||
var path = ''
|
||||
var defaultDelimiter = options && options.delimiter || '/'
|
||||
var res
|
||||
|
||||
while ((res = PATH_REGEXP.exec(str)) != null) {
|
||||
var m = res[0]
|
||||
var escaped = res[1]
|
||||
var offset = res.index
|
||||
path += str.slice(index, offset)
|
||||
index = offset + m.length
|
||||
|
||||
// Ignore already escaped sequences.
|
||||
if (escaped) {
|
||||
path += escaped[1]
|
||||
continue
|
||||
}
|
||||
|
||||
var next = str[index]
|
||||
var prefix = res[2]
|
||||
var name = res[3]
|
||||
var capture = res[4]
|
||||
var group = res[5]
|
||||
var modifier = res[6]
|
||||
var asterisk = res[7]
|
||||
|
||||
// Push the current path onto the tokens.
|
||||
if (path) {
|
||||
tokens.push(path)
|
||||
path = ''
|
||||
}
|
||||
|
||||
var partial = prefix != null && next != null && next !== prefix
|
||||
var repeat = modifier === '+' || modifier === '*'
|
||||
var optional = modifier === '?' || modifier === '*'
|
||||
var delimiter = res[2] || defaultDelimiter
|
||||
var pattern = capture || group
|
||||
|
||||
tokens.push({
|
||||
name: name || key++,
|
||||
prefix: prefix || '',
|
||||
delimiter: delimiter,
|
||||
optional: optional,
|
||||
repeat: repeat,
|
||||
partial: partial,
|
||||
asterisk: !!asterisk,
|
||||
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
|
||||
})
|
||||
}
|
||||
|
||||
// Match any characters still remaining.
|
||||
if (index < str.length) {
|
||||
path += str.substr(index)
|
||||
}
|
||||
|
||||
// If the path exists, push it onto the end.
|
||||
if (path) {
|
||||
tokens.push(path)
|
||||
}
|
||||
|
||||
return tokens
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile a string to a template function for the path.
|
||||
*
|
||||
* @param {string} str
|
||||
* @param {Object=} options
|
||||
* @return {!function(Object=, Object=)}
|
||||
*/
|
||||
function compile (str, options) {
|
||||
return tokensToFunction(parse(str, options), options)
|
||||
}
|
||||
|
||||
/**
|
||||
* Prettier encoding of URI path segments.
|
||||
*
|
||||
* @param {string}
|
||||
* @return {string}
|
||||
*/
|
||||
function encodeURIComponentPretty (str) {
|
||||
return encodeURI(str).replace(/[\/?#]/g, function (c) {
|
||||
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
|
||||
*
|
||||
* @param {string}
|
||||
* @return {string}
|
||||
*/
|
||||
function encodeAsterisk (str) {
|
||||
return encodeURI(str).replace(/[?#]/g, function (c) {
|
||||
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose a method for transforming tokens into the path function.
|
||||
*/
|
||||
function tokensToFunction (tokens, options) {
|
||||
// Compile all the tokens into regexps.
|
||||
var matches = new Array(tokens.length)
|
||||
|
||||
// Compile all the patterns before compilation.
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
if (typeof tokens[i] === 'object') {
|
||||
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
|
||||
}
|
||||
}
|
||||
|
||||
return function (obj, opts) {
|
||||
var path = ''
|
||||
var data = obj || {}
|
||||
var options = opts || {}
|
||||
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
|
||||
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i]
|
||||
|
||||
if (typeof token === 'string') {
|
||||
path += token
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
var value = data[token.name]
|
||||
var segment
|
||||
|
||||
if (value == null) {
|
||||
if (token.optional) {
|
||||
// Prepend partial segment prefixes.
|
||||
if (token.partial) {
|
||||
path += token.prefix
|
||||
}
|
||||
|
||||
continue
|
||||
} else {
|
||||
throw new TypeError('Expected "' + token.name + '" to be defined')
|
||||
}
|
||||
}
|
||||
|
||||
if (isarray(value)) {
|
||||
if (!token.repeat) {
|
||||
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
|
||||
}
|
||||
|
||||
if (value.length === 0) {
|
||||
if (token.optional) {
|
||||
continue
|
||||
} else {
|
||||
throw new TypeError('Expected "' + token.name + '" to not be empty')
|
||||
}
|
||||
}
|
||||
|
||||
for (var j = 0; j < value.length; j++) {
|
||||
segment = encode(value[j])
|
||||
|
||||
if (!matches[i].test(segment)) {
|
||||
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
|
||||
}
|
||||
|
||||
path += (j === 0 ? token.prefix : token.delimiter) + segment
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
|
||||
|
||||
if (!matches[i].test(segment)) {
|
||||
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
|
||||
}
|
||||
|
||||
path += token.prefix + segment
|
||||
}
|
||||
|
||||
return path
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape a regular expression string.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {string}
|
||||
*/
|
||||
function escapeString (str) {
|
||||
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
|
||||
}
|
||||
|
||||
/**
|
||||
* Escape the capturing group by escaping special characters and meaning.
|
||||
*
|
||||
* @param {string} group
|
||||
* @return {string}
|
||||
*/
|
||||
function escapeGroup (group) {
|
||||
return group.replace(/([=!:$\/()])/g, '\\$1')
|
||||
}
|
||||
|
||||
/**
|
||||
* Attach the keys as a property of the regexp.
|
||||
*
|
||||
* @param {!RegExp} re
|
||||
* @param {Array} keys
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function attachKeys (re, keys) {
|
||||
re.keys = keys
|
||||
return re
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the flags for a regexp from the options.
|
||||
*
|
||||
* @param {Object} options
|
||||
* @return {string}
|
||||
*/
|
||||
function flags (options) {
|
||||
return options && options.sensitive ? '' : 'i'
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull out keys from a regexp.
|
||||
*
|
||||
* @param {!RegExp} path
|
||||
* @param {!Array} keys
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function regexpToRegexp (path, keys) {
|
||||
// Use a negative lookahead to match only capturing groups.
|
||||
var groups = path.source.match(/\((?!\?)/g)
|
||||
|
||||
if (groups) {
|
||||
for (var i = 0; i < groups.length; i++) {
|
||||
keys.push({
|
||||
name: i,
|
||||
prefix: null,
|
||||
delimiter: null,
|
||||
optional: false,
|
||||
repeat: false,
|
||||
partial: false,
|
||||
asterisk: false,
|
||||
pattern: null
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return attachKeys(path, keys)
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform an array into a regexp.
|
||||
*
|
||||
* @param {!Array} path
|
||||
* @param {Array} keys
|
||||
* @param {!Object} options
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function arrayToRegexp (path, keys, options) {
|
||||
var parts = []
|
||||
|
||||
for (var i = 0; i < path.length; i++) {
|
||||
parts.push(pathToRegexp(path[i], keys, options).source)
|
||||
}
|
||||
|
||||
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
|
||||
|
||||
return attachKeys(regexp, keys)
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a path regexp from string input.
|
||||
*
|
||||
* @param {string} path
|
||||
* @param {!Array} keys
|
||||
* @param {!Object} options
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function stringToRegexp (path, keys, options) {
|
||||
return tokensToRegExp(parse(path, options), keys, options)
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose a function for taking tokens and returning a RegExp.
|
||||
*
|
||||
* @param {!Array} tokens
|
||||
* @param {(Array|Object)=} keys
|
||||
* @param {Object=} options
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function tokensToRegExp (tokens, keys, options) {
|
||||
if (!isarray(keys)) {
|
||||
options = /** @type {!Object} */ (keys || options)
|
||||
keys = []
|
||||
}
|
||||
|
||||
options = options || {}
|
||||
|
||||
var strict = options.strict
|
||||
var end = options.end !== false
|
||||
var route = ''
|
||||
|
||||
// Iterate over the tokens and create our regexp string.
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i]
|
||||
|
||||
if (typeof token === 'string') {
|
||||
route += escapeString(token)
|
||||
} else {
|
||||
var prefix = escapeString(token.prefix)
|
||||
var capture = '(?:' + token.pattern + ')'
|
||||
|
||||
keys.push(token)
|
||||
|
||||
if (token.repeat) {
|
||||
capture += '(?:' + prefix + capture + ')*'
|
||||
}
|
||||
|
||||
if (token.optional) {
|
||||
if (!token.partial) {
|
||||
capture = '(?:' + prefix + '(' + capture + '))?'
|
||||
} else {
|
||||
capture = prefix + '(' + capture + ')?'
|
||||
}
|
||||
} else {
|
||||
capture = prefix + '(' + capture + ')'
|
||||
}
|
||||
|
||||
route += capture
|
||||
}
|
||||
}
|
||||
|
||||
var delimiter = escapeString(options.delimiter || '/')
|
||||
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
|
||||
|
||||
// In non-strict mode we allow a slash at the end of match. If the path to
|
||||
// match already ends with a slash, we remove it for consistency. The slash
|
||||
// is valid at the end of a path match, not in the middle. This is important
|
||||
// in non-ending mode, where "/test/" shouldn't match "/test//route".
|
||||
if (!strict) {
|
||||
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
|
||||
}
|
||||
|
||||
if (end) {
|
||||
route += '$'
|
||||
} else {
|
||||
// In non-ending mode, we need the capturing groups to match as much as
|
||||
// possible by using a positive lookahead to the end or next path segment.
|
||||
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
|
||||
}
|
||||
|
||||
return attachKeys(new RegExp('^' + route, flags(options)), keys)
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize the given path string, returning a regular expression.
|
||||
*
|
||||
* An empty array can be passed in for the keys, which will hold the
|
||||
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
|
||||
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
|
||||
*
|
||||
* @param {(string|RegExp|Array)} path
|
||||
* @param {(Array|Object)=} keys
|
||||
* @param {Object=} options
|
||||
* @return {!RegExp}
|
||||
*/
|
||||
function pathToRegexp (path, keys, options) {
|
||||
if (!isarray(keys)) {
|
||||
options = /** @type {!Object} */ (keys || options)
|
||||
keys = []
|
||||
}
|
||||
|
||||
options = options || {}
|
||||
|
||||
if (path instanceof RegExp) {
|
||||
return regexpToRegexp(path, /** @type {!Array} */ (keys))
|
||||
}
|
||||
|
||||
if (isarray(path)) {
|
||||
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
|
||||
}
|
||||
|
||||
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
|
||||
}
|
||||
79
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/package.json
generated
vendored
Normal file
79
conf/site/node_modules/react-router-dom/node_modules/path-to-regexp/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"path-to-regexp@1.8.0",
|
||||
"/home/henry/Documents/git/Speedtest-tracker-docker/conf/site"
|
||||
]
|
||||
],
|
||||
"_from": "path-to-regexp@1.8.0",
|
||||
"_id": "path-to-regexp@1.8.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
|
||||
"_location": "/react-router-dom/path-to-regexp",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "path-to-regexp@1.8.0",
|
||||
"name": "path-to-regexp",
|
||||
"escapedName": "path-to-regexp",
|
||||
"rawSpec": "1.8.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.8.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/react-router-dom/react-router"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
|
||||
"_spec": "1.8.0",
|
||||
"_where": "/home/henry/Documents/git/Speedtest-tracker-docker/conf/site",
|
||||
"bugs": {
|
||||
"url": "https://github.com/pillarjs/path-to-regexp/issues"
|
||||
},
|
||||
"component": {
|
||||
"scripts": {
|
||||
"path-to-regexp": "index.js"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": "0.0.1"
|
||||
},
|
||||
"description": "Express style path to RegExp utility",
|
||||
"devDependencies": {
|
||||
"chai": "^2.3.0",
|
||||
"istanbul": "~0.3.0",
|
||||
"mocha": "~2.2.4",
|
||||
"standard": "~3.7.3",
|
||||
"ts-node": "^0.5.5",
|
||||
"typescript": "^1.8.7",
|
||||
"typings": "^1.0.4"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"LICENSE"
|
||||
],
|
||||
"homepage": "https://github.com/pillarjs/path-to-regexp#readme",
|
||||
"keywords": [
|
||||
"express",
|
||||
"regexp",
|
||||
"route",
|
||||
"routing"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "path-to-regexp",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/pillarjs/path-to-regexp.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"prepublish": "typings install",
|
||||
"test": "npm run lint && npm run test-cov",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --require ts-node/register -R spec test.ts",
|
||||
"test-spec": "mocha --require ts-node/register -R spec --bail test.ts"
|
||||
},
|
||||
"typings": "index.d.ts",
|
||||
"version": "1.8.0"
|
||||
}
|
||||
21
conf/site/node_modules/react-router-dom/node_modules/react-router/LICENSE
generated
vendored
Normal file
21
conf/site/node_modules/react-router-dom/node_modules/react-router/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) React Training 2016-2018
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/MemoryRouter.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/MemoryRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("MemoryRouter");
|
||||
module.exports = require("./index.js").MemoryRouter;
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Prompt.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Prompt.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Prompt");
|
||||
module.exports = require("./index.js").Prompt;
|
||||
39
conf/site/node_modules/react-router-dom/node_modules/react-router/README.md
generated
vendored
Normal file
39
conf/site/node_modules/react-router-dom/node_modules/react-router/README.md
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
# react-router
|
||||
|
||||
Declarative routing for [React](https://facebook.github.io/react).
|
||||
|
||||
## Installation
|
||||
|
||||
Using [npm](https://www.npmjs.com/):
|
||||
|
||||
$ npm install --save react-router
|
||||
|
||||
**Note:** This package provides the core routing functionality for React Router, but you might not want to install it directly. If you are writing an application that will run in the browser, you should instead install `react-router-dom`. Similarly, if you are writing a React Native application, you should instead install `react-router-native`. Both of those will install `react-router` as a dependency.
|
||||
|
||||
Then with a module bundler like [webpack](https://webpack.github.io/), use as you would anything else:
|
||||
|
||||
```js
|
||||
// using ES6 modules
|
||||
import { Router, Route, Switch } from "react-router";
|
||||
|
||||
// using CommonJS modules
|
||||
var Router = require("react-router").Router;
|
||||
var Route = require("react-router").Route;
|
||||
var Switch = require("react-router").Switch;
|
||||
```
|
||||
|
||||
The UMD build is also available on [unpkg](https://unpkg.com):
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/react-router/umd/react-router.min.js"></script>
|
||||
```
|
||||
|
||||
You can find the library on `window.ReactRouter`.
|
||||
|
||||
## Issues
|
||||
|
||||
If you find a bug, please file an issue on [our issue tracker on GitHub](https://github.com/ReactTraining/react-router/issues).
|
||||
|
||||
## Credits
|
||||
|
||||
React Router is built and maintained by [React Training](https://reacttraining.com).
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Redirect.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Redirect.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Redirect");
|
||||
module.exports = require("./index.js").Redirect;
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Route.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Route.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Route");
|
||||
module.exports = require("./index.js").Route;
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Router.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Router.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Router");
|
||||
module.exports = require("./index.js").Router;
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/StaticRouter.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/StaticRouter.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("StaticRouter");
|
||||
module.exports = require("./index.js").StaticRouter;
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Switch.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/Switch.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("Switch");
|
||||
module.exports = require("./index.js").Switch;
|
||||
825
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.js
generated
vendored
Normal file
825
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.js
generated
vendored
Normal file
@@ -0,0 +1,825 @@
|
||||
'use strict';
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var React = _interopDefault(require('react'));
|
||||
var PropTypes = _interopDefault(require('prop-types'));
|
||||
var history = require('history');
|
||||
var warning = _interopDefault(require('tiny-warning'));
|
||||
var createContext = _interopDefault(require('mini-create-react-context'));
|
||||
var invariant = _interopDefault(require('tiny-invariant'));
|
||||
var pathToRegexp = _interopDefault(require('path-to-regexp'));
|
||||
var reactIs = require('react-is');
|
||||
var hoistStatics = _interopDefault(require('hoist-non-react-statics'));
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
}
|
||||
|
||||
function _inheritsLoose(subClass, superClass) {
|
||||
subClass.prototype = Object.create(superClass.prototype);
|
||||
subClass.prototype.constructor = subClass;
|
||||
subClass.__proto__ = superClass;
|
||||
}
|
||||
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
|
||||
for (i = 0; i < sourceKeys.length; i++) {
|
||||
key = sourceKeys[i];
|
||||
if (excluded.indexOf(key) >= 0) continue;
|
||||
target[key] = source[key];
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
// TODO: Replace with React.createContext once we can assume React 16+
|
||||
|
||||
var createNamedContext = function createNamedContext(name) {
|
||||
var context = createContext();
|
||||
context.displayName = name;
|
||||
return context;
|
||||
};
|
||||
|
||||
var historyContext =
|
||||
/*#__PURE__*/
|
||||
createNamedContext("Router-History");
|
||||
|
||||
// TODO: Replace with React.createContext once we can assume React 16+
|
||||
|
||||
var createNamedContext$1 = function createNamedContext(name) {
|
||||
var context = createContext();
|
||||
context.displayName = name;
|
||||
return context;
|
||||
};
|
||||
|
||||
var context =
|
||||
/*#__PURE__*/
|
||||
createNamedContext$1("Router");
|
||||
|
||||
/**
|
||||
* The public API for putting history on context.
|
||||
*/
|
||||
|
||||
var Router =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Router, _React$Component);
|
||||
|
||||
Router.computeRootMatch = function computeRootMatch(pathname) {
|
||||
return {
|
||||
path: "/",
|
||||
url: "/",
|
||||
params: {},
|
||||
isExact: pathname === "/"
|
||||
};
|
||||
};
|
||||
|
||||
function Router(props) {
|
||||
var _this;
|
||||
|
||||
_this = _React$Component.call(this, props) || this;
|
||||
_this.state = {
|
||||
location: props.history.location
|
||||
}; // This is a bit of a hack. We have to start listening for location
|
||||
// changes here in the constructor in case there are any <Redirect>s
|
||||
// on the initial render. If there are, they will replace/push when
|
||||
// they mount and since cDM fires in children before parents, we may
|
||||
// get a new location before the <Router> is mounted.
|
||||
|
||||
_this._isMounted = false;
|
||||
_this._pendingLocation = null;
|
||||
|
||||
if (!props.staticContext) {
|
||||
_this.unlisten = props.history.listen(function (location) {
|
||||
if (_this._isMounted) {
|
||||
_this.setState({
|
||||
location: location
|
||||
});
|
||||
} else {
|
||||
_this._pendingLocation = location;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = Router.prototype;
|
||||
|
||||
_proto.componentDidMount = function componentDidMount() {
|
||||
this._isMounted = true;
|
||||
|
||||
if (this._pendingLocation) {
|
||||
this.setState({
|
||||
location: this._pendingLocation
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.unlisten) this.unlisten();
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return React.createElement(context.Provider, {
|
||||
value: {
|
||||
history: this.props.history,
|
||||
location: this.state.location,
|
||||
match: Router.computeRootMatch(this.state.location.pathname),
|
||||
staticContext: this.props.staticContext
|
||||
}
|
||||
}, React.createElement(historyContext.Provider, {
|
||||
children: this.props.children || null,
|
||||
value: this.props.history
|
||||
}));
|
||||
};
|
||||
|
||||
return Router;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
Router.propTypes = {
|
||||
children: PropTypes.node,
|
||||
history: PropTypes.object.isRequired,
|
||||
staticContext: PropTypes.object
|
||||
};
|
||||
|
||||
Router.prototype.componentDidUpdate = function (prevProps) {
|
||||
warning(prevProps.history === this.props.history, "You cannot change <Router history>") ;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that stores location in memory.
|
||||
*/
|
||||
|
||||
var MemoryRouter =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(MemoryRouter, _React$Component);
|
||||
|
||||
function MemoryRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = history.createMemoryHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = MemoryRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return React.createElement(Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return MemoryRouter;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
MemoryRouter.propTypes = {
|
||||
initialEntries: PropTypes.array,
|
||||
initialIndex: PropTypes.number,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
MemoryRouter.prototype.componentDidMount = function () {
|
||||
warning(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.") ;
|
||||
};
|
||||
}
|
||||
|
||||
var Lifecycle =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Lifecycle, _React$Component);
|
||||
|
||||
function Lifecycle() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Lifecycle.prototype;
|
||||
|
||||
_proto.componentDidMount = function componentDidMount() {
|
||||
if (this.props.onMount) this.props.onMount.call(this, this);
|
||||
};
|
||||
|
||||
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||||
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
||||
};
|
||||
|
||||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return null;
|
||||
};
|
||||
|
||||
return Lifecycle;
|
||||
}(React.Component);
|
||||
|
||||
/**
|
||||
* The public API for prompting the user before navigating away from a screen.
|
||||
*/
|
||||
|
||||
function Prompt(_ref) {
|
||||
var message = _ref.message,
|
||||
_ref$when = _ref.when,
|
||||
when = _ref$when === void 0 ? true : _ref$when;
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <Prompt> outside a <Router>") : void 0;
|
||||
if (!when || context.staticContext) return null;
|
||||
var method = context.history.block;
|
||||
return React.createElement(Lifecycle, {
|
||||
onMount: function onMount(self) {
|
||||
self.release = method(message);
|
||||
},
|
||||
onUpdate: function onUpdate(self, prevProps) {
|
||||
if (prevProps.message !== message) {
|
||||
self.release();
|
||||
self.release = method(message);
|
||||
}
|
||||
},
|
||||
onUnmount: function onUnmount(self) {
|
||||
self.release();
|
||||
},
|
||||
message: message
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
|
||||
Prompt.propTypes = {
|
||||
when: PropTypes.bool,
|
||||
message: messageType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var cache = {};
|
||||
var cacheLimit = 10000;
|
||||
var cacheCount = 0;
|
||||
|
||||
function compilePath(path) {
|
||||
if (cache[path]) return cache[path];
|
||||
var generator = pathToRegexp.compile(path);
|
||||
|
||||
if (cacheCount < cacheLimit) {
|
||||
cache[path] = generator;
|
||||
cacheCount++;
|
||||
}
|
||||
|
||||
return generator;
|
||||
}
|
||||
/**
|
||||
* Public API for generating a URL pathname from a path and parameters.
|
||||
*/
|
||||
|
||||
|
||||
function generatePath(path, params) {
|
||||
if (path === void 0) {
|
||||
path = "/";
|
||||
}
|
||||
|
||||
if (params === void 0) {
|
||||
params = {};
|
||||
}
|
||||
|
||||
return path === "/" ? path : compilePath(path)(params, {
|
||||
pretty: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for navigating programmatically with a component.
|
||||
*/
|
||||
|
||||
function Redirect(_ref) {
|
||||
var computedMatch = _ref.computedMatch,
|
||||
to = _ref.to,
|
||||
_ref$push = _ref.push,
|
||||
push = _ref$push === void 0 ? false : _ref$push;
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <Redirect> outside a <Router>") : void 0;
|
||||
var history$1 = context.history,
|
||||
staticContext = context.staticContext;
|
||||
var method = push ? history$1.push : history$1.replace;
|
||||
var location = history.createLocation(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : _extends({}, to, {
|
||||
pathname: generatePath(to.pathname, computedMatch.params)
|
||||
}) : to); // When rendering in a static context,
|
||||
// set the new location immediately.
|
||||
|
||||
if (staticContext) {
|
||||
method(location);
|
||||
return null;
|
||||
}
|
||||
|
||||
return React.createElement(Lifecycle, {
|
||||
onMount: function onMount() {
|
||||
method(location);
|
||||
},
|
||||
onUpdate: function onUpdate(self, prevProps) {
|
||||
var prevLocation = history.createLocation(prevProps.to);
|
||||
|
||||
if (!history.locationsAreEqual(prevLocation, _extends({}, location, {
|
||||
key: prevLocation.key
|
||||
}))) {
|
||||
method(location);
|
||||
}
|
||||
},
|
||||
to: to
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
Redirect.propTypes = {
|
||||
push: PropTypes.bool,
|
||||
from: PropTypes.string,
|
||||
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var cache$1 = {};
|
||||
var cacheLimit$1 = 10000;
|
||||
var cacheCount$1 = 0;
|
||||
|
||||
function compilePath$1(path, options) {
|
||||
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
||||
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
||||
if (pathCache[path]) return pathCache[path];
|
||||
var keys = [];
|
||||
var regexp = pathToRegexp(path, keys, options);
|
||||
var result = {
|
||||
regexp: regexp,
|
||||
keys: keys
|
||||
};
|
||||
|
||||
if (cacheCount$1 < cacheLimit$1) {
|
||||
pathCache[path] = result;
|
||||
cacheCount$1++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Public API for matching a URL pathname to a path.
|
||||
*/
|
||||
|
||||
|
||||
function matchPath(pathname, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (typeof options === "string" || Array.isArray(options)) {
|
||||
options = {
|
||||
path: options
|
||||
};
|
||||
}
|
||||
|
||||
var _options = options,
|
||||
path = _options.path,
|
||||
_options$exact = _options.exact,
|
||||
exact = _options$exact === void 0 ? false : _options$exact,
|
||||
_options$strict = _options.strict,
|
||||
strict = _options$strict === void 0 ? false : _options$strict,
|
||||
_options$sensitive = _options.sensitive,
|
||||
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
||||
var paths = [].concat(path);
|
||||
return paths.reduce(function (matched, path) {
|
||||
if (!path && path !== "") return null;
|
||||
if (matched) return matched;
|
||||
|
||||
var _compilePath = compilePath$1(path, {
|
||||
end: exact,
|
||||
strict: strict,
|
||||
sensitive: sensitive
|
||||
}),
|
||||
regexp = _compilePath.regexp,
|
||||
keys = _compilePath.keys;
|
||||
|
||||
var match = regexp.exec(pathname);
|
||||
if (!match) return null;
|
||||
var url = match[0],
|
||||
values = match.slice(1);
|
||||
var isExact = pathname === url;
|
||||
if (exact && !isExact) return null;
|
||||
return {
|
||||
path: path,
|
||||
// the path used to match
|
||||
url: path === "/" && url === "" ? "/" : url,
|
||||
// the matched portion of the URL
|
||||
isExact: isExact,
|
||||
// whether or not we matched exactly
|
||||
params: keys.reduce(function (memo, key, index) {
|
||||
memo[key.name] = values[index];
|
||||
return memo;
|
||||
}, {})
|
||||
};
|
||||
}, null);
|
||||
}
|
||||
|
||||
function isEmptyChildren(children) {
|
||||
return React.Children.count(children) === 0;
|
||||
}
|
||||
|
||||
function evalChildrenDev(children, props, path) {
|
||||
var value = children(props);
|
||||
warning(value !== undefined, "You returned `undefined` from the `children` function of " + ("<Route" + (path ? " path=\"" + path + "\"" : "") + ">, but you ") + "should have returned a React element or `null`") ;
|
||||
return value || null;
|
||||
}
|
||||
/**
|
||||
* The public API for matching a single path and rendering.
|
||||
*/
|
||||
|
||||
|
||||
var Route =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Route, _React$Component);
|
||||
|
||||
function Route() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Route.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this = this;
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context$1) {
|
||||
!context$1 ? invariant(false, "You should not use <Route> outside a <Router>") : void 0;
|
||||
var location = _this.props.location || context$1.location;
|
||||
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
||||
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
||||
|
||||
var props = _extends({}, context$1, {
|
||||
location: location,
|
||||
match: match
|
||||
});
|
||||
|
||||
var _this$props = _this.props,
|
||||
children = _this$props.children,
|
||||
component = _this$props.component,
|
||||
render = _this$props.render; // Preact uses an empty array as children by
|
||||
// default, so use null if that's the case.
|
||||
|
||||
if (Array.isArray(children) && children.length === 0) {
|
||||
children = null;
|
||||
}
|
||||
|
||||
return React.createElement(context.Provider, {
|
||||
value: props
|
||||
}, props.match ? children ? typeof children === "function" ? evalChildrenDev(children, props, _this.props.path) : children : component ? React.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? evalChildrenDev(children, props, _this.props.path) : null);
|
||||
});
|
||||
};
|
||||
|
||||
return Route;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
Route.propTypes = {
|
||||
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
||||
component: function component(props, propName) {
|
||||
if (props[propName] && !reactIs.isValidElementType(props[propName])) {
|
||||
return new Error("Invalid prop 'component' supplied to 'Route': the prop is not a valid React component");
|
||||
}
|
||||
},
|
||||
exact: PropTypes.bool,
|
||||
location: PropTypes.object,
|
||||
path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
||||
render: PropTypes.func,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool
|
||||
};
|
||||
|
||||
Route.prototype.componentDidMount = function () {
|
||||
warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), "You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored") ;
|
||||
warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), "You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored") ;
|
||||
warning(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored") ;
|
||||
};
|
||||
|
||||
Route.prototype.componentDidUpdate = function (prevProps) {
|
||||
warning(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') ;
|
||||
warning(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') ;
|
||||
};
|
||||
}
|
||||
|
||||
function addLeadingSlash(path) {
|
||||
return path.charAt(0) === "/" ? path : "/" + path;
|
||||
}
|
||||
|
||||
function addBasename(basename, location) {
|
||||
if (!basename) return location;
|
||||
return _extends({}, location, {
|
||||
pathname: addLeadingSlash(basename) + location.pathname
|
||||
});
|
||||
}
|
||||
|
||||
function stripBasename(basename, location) {
|
||||
if (!basename) return location;
|
||||
var base = addLeadingSlash(basename);
|
||||
if (location.pathname.indexOf(base) !== 0) return location;
|
||||
return _extends({}, location, {
|
||||
pathname: location.pathname.substr(base.length)
|
||||
});
|
||||
}
|
||||
|
||||
function createURL(location) {
|
||||
return typeof location === "string" ? location : history.createPath(location);
|
||||
}
|
||||
|
||||
function staticHandler(methodName) {
|
||||
return function () {
|
||||
invariant(false, "You cannot %s with <StaticRouter>", methodName) ;
|
||||
};
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
/**
|
||||
* The public top-level API for a "static" <Router>, so-called because it
|
||||
* can't actually change the current location. Instead, it just records
|
||||
* location changes in a context object. Useful mainly in testing and
|
||||
* server-rendering scenarios.
|
||||
*/
|
||||
|
||||
|
||||
var StaticRouter =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(StaticRouter, _React$Component);
|
||||
|
||||
function StaticRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
|
||||
_this.handlePush = function (location) {
|
||||
return _this.navigateTo(location, "PUSH");
|
||||
};
|
||||
|
||||
_this.handleReplace = function (location) {
|
||||
return _this.navigateTo(location, "REPLACE");
|
||||
};
|
||||
|
||||
_this.handleListen = function () {
|
||||
return noop;
|
||||
};
|
||||
|
||||
_this.handleBlock = function () {
|
||||
return noop;
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = StaticRouter.prototype;
|
||||
|
||||
_proto.navigateTo = function navigateTo(location, action) {
|
||||
var _this$props = this.props,
|
||||
_this$props$basename = _this$props.basename,
|
||||
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
|
||||
_this$props$context = _this$props.context,
|
||||
context = _this$props$context === void 0 ? {} : _this$props$context;
|
||||
context.action = action;
|
||||
context.location = addBasename(basename, history.createLocation(location));
|
||||
context.url = createURL(context.location);
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this$props2 = this.props,
|
||||
_this$props2$basename = _this$props2.basename,
|
||||
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
|
||||
_this$props2$context = _this$props2.context,
|
||||
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
||||
_this$props2$location = _this$props2.location,
|
||||
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
||||
rest = _objectWithoutPropertiesLoose(_this$props2, ["basename", "context", "location"]);
|
||||
|
||||
var history$1 = {
|
||||
createHref: function createHref(path) {
|
||||
return addLeadingSlash(basename + createURL(path));
|
||||
},
|
||||
action: "POP",
|
||||
location: stripBasename(basename, history.createLocation(location)),
|
||||
push: this.handlePush,
|
||||
replace: this.handleReplace,
|
||||
go: staticHandler("go"),
|
||||
goBack: staticHandler("goBack"),
|
||||
goForward: staticHandler("goForward"),
|
||||
listen: this.handleListen,
|
||||
block: this.handleBlock
|
||||
};
|
||||
return React.createElement(Router, _extends({}, rest, {
|
||||
history: history$1,
|
||||
staticContext: context
|
||||
}));
|
||||
};
|
||||
|
||||
return StaticRouter;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
StaticRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
context: PropTypes.object,
|
||||
location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
|
||||
};
|
||||
|
||||
StaticRouter.prototype.componentDidMount = function () {
|
||||
warning(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.") ;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for rendering the first <Route> that matches.
|
||||
*/
|
||||
|
||||
var Switch =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Switch, _React$Component);
|
||||
|
||||
function Switch() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Switch.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this = this;
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <Switch> outside a <Router>") : void 0;
|
||||
var location = _this.props.location || context.location;
|
||||
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
|
||||
// here because toArray adds keys to all child elements and we do not want
|
||||
// to trigger an unmount/remount for two <Route>s that render the same
|
||||
// component at different URLs.
|
||||
|
||||
React.Children.forEach(_this.props.children, function (child) {
|
||||
if (match == null && React.isValidElement(child)) {
|
||||
element = child;
|
||||
var path = child.props.path || child.props.from;
|
||||
match = path ? matchPath(location.pathname, _extends({}, child.props, {
|
||||
path: path
|
||||
})) : context.match;
|
||||
}
|
||||
});
|
||||
return match ? React.cloneElement(element, {
|
||||
location: location,
|
||||
computedMatch: match
|
||||
}) : null;
|
||||
});
|
||||
};
|
||||
|
||||
return Switch;
|
||||
}(React.Component);
|
||||
|
||||
{
|
||||
Switch.propTypes = {
|
||||
children: PropTypes.node,
|
||||
location: PropTypes.object
|
||||
};
|
||||
|
||||
Switch.prototype.componentDidUpdate = function (prevProps) {
|
||||
warning(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') ;
|
||||
warning(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') ;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A public higher-order component to access the imperative API
|
||||
*/
|
||||
|
||||
function withRouter(Component) {
|
||||
var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
|
||||
|
||||
var C = function C(props) {
|
||||
var wrappedComponentRef = props.wrappedComponentRef,
|
||||
remainingProps = _objectWithoutPropertiesLoose(props, ["wrappedComponentRef"]);
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? invariant(false, "You should not use <" + displayName + " /> outside a <Router>") : void 0;
|
||||
return React.createElement(Component, _extends({}, remainingProps, context, {
|
||||
ref: wrappedComponentRef
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
C.displayName = displayName;
|
||||
C.WrappedComponent = Component;
|
||||
|
||||
{
|
||||
C.propTypes = {
|
||||
wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])
|
||||
};
|
||||
}
|
||||
|
||||
return hoistStatics(C, Component);
|
||||
}
|
||||
|
||||
var useContext = React.useContext;
|
||||
function useHistory() {
|
||||
{
|
||||
!(typeof useContext === "function") ? invariant(false, "You must use React >= 16.8 in order to use useHistory()") : void 0;
|
||||
}
|
||||
|
||||
return useContext(historyContext);
|
||||
}
|
||||
function useLocation() {
|
||||
{
|
||||
!(typeof useContext === "function") ? invariant(false, "You must use React >= 16.8 in order to use useLocation()") : void 0;
|
||||
}
|
||||
|
||||
return useContext(context).location;
|
||||
}
|
||||
function useParams() {
|
||||
{
|
||||
!(typeof useContext === "function") ? invariant(false, "You must use React >= 16.8 in order to use useParams()") : void 0;
|
||||
}
|
||||
|
||||
var match = useContext(context).match;
|
||||
return match ? match.params : {};
|
||||
}
|
||||
function useRouteMatch(path) {
|
||||
{
|
||||
!(typeof useContext === "function") ? invariant(false, "You must use React >= 16.8 in order to use useRouteMatch()") : void 0;
|
||||
}
|
||||
|
||||
var location = useLocation();
|
||||
var match = useContext(context).match;
|
||||
return path ? matchPath(location.pathname, path) : match;
|
||||
}
|
||||
|
||||
{
|
||||
if (typeof window !== "undefined") {
|
||||
var global = window;
|
||||
var key = "__react_router_build__";
|
||||
var buildNames = {
|
||||
cjs: "CommonJS",
|
||||
esm: "ES modules",
|
||||
umd: "UMD"
|
||||
};
|
||||
|
||||
if (global[key] && global[key] !== "cjs") {
|
||||
var initialBuildName = buildNames[global[key]];
|
||||
var secondaryBuildName = buildNames["cjs"]; // TODO: Add link to article that explains in detail how to avoid
|
||||
// loading 2 different builds.
|
||||
|
||||
throw new Error("You are loading the " + secondaryBuildName + " build of React Router " + ("on a page that is already running the " + initialBuildName + " ") + "build, so things won't work right.");
|
||||
}
|
||||
|
||||
global[key] = "cjs";
|
||||
}
|
||||
}
|
||||
|
||||
exports.MemoryRouter = MemoryRouter;
|
||||
exports.Prompt = Prompt;
|
||||
exports.Redirect = Redirect;
|
||||
exports.Route = Route;
|
||||
exports.Router = Router;
|
||||
exports.StaticRouter = StaticRouter;
|
||||
exports.Switch = Switch;
|
||||
exports.__HistoryContext = historyContext;
|
||||
exports.__RouterContext = context;
|
||||
exports.generatePath = generatePath;
|
||||
exports.matchPath = matchPath;
|
||||
exports.useHistory = useHistory;
|
||||
exports.useLocation = useLocation;
|
||||
exports.useParams = useParams;
|
||||
exports.useRouteMatch = useRouteMatch;
|
||||
exports.withRouter = withRouter;
|
||||
//# sourceMappingURL=react-router.js.map
|
||||
1
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.js.map
generated
vendored
Normal file
1
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.min.js
generated
vendored
Normal file
2
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.min.js.map
generated
vendored
Normal file
1
conf/site/node_modules/react-router-dom/node_modules/react-router/cjs/react-router.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/MemoryRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("MemoryRouter");
|
||||
|
||||
import { MemoryRouter } from "../esm/react-router.js";
|
||||
export default MemoryRouter;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Prompt.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Prompt.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Prompt");
|
||||
|
||||
import { Prompt } from "../esm/react-router.js";
|
||||
export default Prompt;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Redirect.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Redirect.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Redirect");
|
||||
|
||||
import { Redirect } from "../esm/react-router.js";
|
||||
export default Redirect;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Route.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Route.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Route");
|
||||
|
||||
import { Route } from "../esm/react-router.js";
|
||||
export default Route;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Router.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Router.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Router");
|
||||
|
||||
import { Router } from "../esm/react-router.js";
|
||||
export default Router;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/StaticRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("StaticRouter");
|
||||
|
||||
import { StaticRouter } from "../esm/react-router.js";
|
||||
export default StaticRouter;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Switch.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/Switch.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("Switch");
|
||||
|
||||
import { Switch } from "../esm/react-router.js";
|
||||
export default Switch;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/generatePath.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/generatePath.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("generatePath");
|
||||
|
||||
import { generatePath } from "../esm/react-router.js";
|
||||
export default generatePath;
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/matchPath.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/matchPath.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("matchPath");
|
||||
|
||||
import { matchPath } from "../esm/react-router.js";
|
||||
export default matchPath;
|
||||
34
conf/site/node_modules/react-router-dom/node_modules/react-router/es/warnAboutDeprecatedESMImport.js
generated
vendored
Normal file
34
conf/site/node_modules/react-router-dom/node_modules/react-router/es/warnAboutDeprecatedESMImport.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* eslint-disable prefer-arrow-callback, no-empty */
|
||||
var printWarning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
printWarning = function(format, subs) {
|
||||
var index = 0;
|
||||
var message =
|
||||
"Warning: " +
|
||||
(subs.length > 0
|
||||
? format.replace(/%s/g, function() {
|
||||
return subs[index++];
|
||||
})
|
||||
: format);
|
||||
|
||||
if (typeof console !== "undefined") {
|
||||
console.error(message);
|
||||
}
|
||||
|
||||
try {
|
||||
// --- Welcome to debugging React Router ---
|
||||
// This error was thrown as a convenience so that you can use the
|
||||
// stack trace to find the callsite that triggered this warning.
|
||||
throw new Error(message);
|
||||
} catch (e) {}
|
||||
};
|
||||
}
|
||||
|
||||
export default function(member) {
|
||||
printWarning(
|
||||
'Please use `import { %s } from "react-router"` instead of `import %s from "react-router/es/%s"`. ' +
|
||||
"Support for the latter will be removed in the next major release.",
|
||||
[member, member]
|
||||
);
|
||||
}
|
||||
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/withRouter.js
generated
vendored
Normal file
5
conf/site/node_modules/react-router-dom/node_modules/react-router/es/withRouter.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import warnAboutDeprecatedESMImport from "./warnAboutDeprecatedESMImport.js";
|
||||
warnAboutDeprecatedESMImport("withRouter");
|
||||
|
||||
import { withRouter } from "../esm/react-router.js";
|
||||
export default withRouter;
|
||||
770
conf/site/node_modules/react-router-dom/node_modules/react-router/esm/react-router.js
generated
vendored
Normal file
770
conf/site/node_modules/react-router-dom/node_modules/react-router/esm/react-router.js
generated
vendored
Normal file
@@ -0,0 +1,770 @@
|
||||
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { createMemoryHistory, createLocation, locationsAreEqual, createPath } from 'history';
|
||||
import warning from 'tiny-warning';
|
||||
import createContext from 'mini-create-react-context';
|
||||
import invariant from 'tiny-invariant';
|
||||
import _extends from '@babel/runtime/helpers/esm/extends';
|
||||
import pathToRegexp from 'path-to-regexp';
|
||||
import { isValidElementType } from 'react-is';
|
||||
import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';
|
||||
import hoistStatics from 'hoist-non-react-statics';
|
||||
|
||||
// TODO: Replace with React.createContext once we can assume React 16+
|
||||
|
||||
var createNamedContext = function createNamedContext(name) {
|
||||
var context = createContext();
|
||||
context.displayName = name;
|
||||
return context;
|
||||
};
|
||||
|
||||
var historyContext =
|
||||
/*#__PURE__*/
|
||||
createNamedContext("Router-History");
|
||||
|
||||
// TODO: Replace with React.createContext once we can assume React 16+
|
||||
|
||||
var createNamedContext$1 = function createNamedContext(name) {
|
||||
var context = createContext();
|
||||
context.displayName = name;
|
||||
return context;
|
||||
};
|
||||
|
||||
var context =
|
||||
/*#__PURE__*/
|
||||
createNamedContext$1("Router");
|
||||
|
||||
/**
|
||||
* The public API for putting history on context.
|
||||
*/
|
||||
|
||||
var Router =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Router, _React$Component);
|
||||
|
||||
Router.computeRootMatch = function computeRootMatch(pathname) {
|
||||
return {
|
||||
path: "/",
|
||||
url: "/",
|
||||
params: {},
|
||||
isExact: pathname === "/"
|
||||
};
|
||||
};
|
||||
|
||||
function Router(props) {
|
||||
var _this;
|
||||
|
||||
_this = _React$Component.call(this, props) || this;
|
||||
_this.state = {
|
||||
location: props.history.location
|
||||
}; // This is a bit of a hack. We have to start listening for location
|
||||
// changes here in the constructor in case there are any <Redirect>s
|
||||
// on the initial render. If there are, they will replace/push when
|
||||
// they mount and since cDM fires in children before parents, we may
|
||||
// get a new location before the <Router> is mounted.
|
||||
|
||||
_this._isMounted = false;
|
||||
_this._pendingLocation = null;
|
||||
|
||||
if (!props.staticContext) {
|
||||
_this.unlisten = props.history.listen(function (location) {
|
||||
if (_this._isMounted) {
|
||||
_this.setState({
|
||||
location: location
|
||||
});
|
||||
} else {
|
||||
_this._pendingLocation = location;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = Router.prototype;
|
||||
|
||||
_proto.componentDidMount = function componentDidMount() {
|
||||
this._isMounted = true;
|
||||
|
||||
if (this._pendingLocation) {
|
||||
this.setState({
|
||||
location: this._pendingLocation
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.unlisten) this.unlisten();
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return React.createElement(context.Provider, {
|
||||
value: {
|
||||
history: this.props.history,
|
||||
location: this.state.location,
|
||||
match: Router.computeRootMatch(this.state.location.pathname),
|
||||
staticContext: this.props.staticContext
|
||||
}
|
||||
}, React.createElement(historyContext.Provider, {
|
||||
children: this.props.children || null,
|
||||
value: this.props.history
|
||||
}));
|
||||
};
|
||||
|
||||
return Router;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
Router.propTypes = {
|
||||
children: PropTypes.node,
|
||||
history: PropTypes.object.isRequired,
|
||||
staticContext: PropTypes.object
|
||||
};
|
||||
|
||||
Router.prototype.componentDidUpdate = function (prevProps) {
|
||||
process.env.NODE_ENV !== "production" ? warning(prevProps.history === this.props.history, "You cannot change <Router history>") : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that stores location in memory.
|
||||
*/
|
||||
|
||||
var MemoryRouter =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(MemoryRouter, _React$Component);
|
||||
|
||||
function MemoryRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
_this.history = createMemoryHistory(_this.props);
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = MemoryRouter.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
return React.createElement(Router, {
|
||||
history: this.history,
|
||||
children: this.props.children
|
||||
});
|
||||
};
|
||||
|
||||
return MemoryRouter;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
MemoryRouter.propTypes = {
|
||||
initialEntries: PropTypes.array,
|
||||
initialIndex: PropTypes.number,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
MemoryRouter.prototype.componentDidMount = function () {
|
||||
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<MemoryRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { MemoryRouter as Router }`.") : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
var Lifecycle =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Lifecycle, _React$Component);
|
||||
|
||||
function Lifecycle() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Lifecycle.prototype;
|
||||
|
||||
_proto.componentDidMount = function componentDidMount() {
|
||||
if (this.props.onMount) this.props.onMount.call(this, this);
|
||||
};
|
||||
|
||||
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
||||
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
||||
};
|
||||
|
||||
_proto.componentWillUnmount = function componentWillUnmount() {
|
||||
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
return null;
|
||||
};
|
||||
|
||||
return Lifecycle;
|
||||
}(React.Component);
|
||||
|
||||
/**
|
||||
* The public API for prompting the user before navigating away from a screen.
|
||||
*/
|
||||
|
||||
function Prompt(_ref) {
|
||||
var message = _ref.message,
|
||||
_ref$when = _ref.when,
|
||||
when = _ref$when === void 0 ? true : _ref$when;
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Prompt> outside a <Router>") : invariant(false) : void 0;
|
||||
if (!when || context.staticContext) return null;
|
||||
var method = context.history.block;
|
||||
return React.createElement(Lifecycle, {
|
||||
onMount: function onMount(self) {
|
||||
self.release = method(message);
|
||||
},
|
||||
onUpdate: function onUpdate(self, prevProps) {
|
||||
if (prevProps.message !== message) {
|
||||
self.release();
|
||||
self.release = method(message);
|
||||
}
|
||||
},
|
||||
onUnmount: function onUnmount(self) {
|
||||
self.release();
|
||||
},
|
||||
message: message
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
var messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
|
||||
Prompt.propTypes = {
|
||||
when: PropTypes.bool,
|
||||
message: messageType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var cache = {};
|
||||
var cacheLimit = 10000;
|
||||
var cacheCount = 0;
|
||||
|
||||
function compilePath(path) {
|
||||
if (cache[path]) return cache[path];
|
||||
var generator = pathToRegexp.compile(path);
|
||||
|
||||
if (cacheCount < cacheLimit) {
|
||||
cache[path] = generator;
|
||||
cacheCount++;
|
||||
}
|
||||
|
||||
return generator;
|
||||
}
|
||||
/**
|
||||
* Public API for generating a URL pathname from a path and parameters.
|
||||
*/
|
||||
|
||||
|
||||
function generatePath(path, params) {
|
||||
if (path === void 0) {
|
||||
path = "/";
|
||||
}
|
||||
|
||||
if (params === void 0) {
|
||||
params = {};
|
||||
}
|
||||
|
||||
return path === "/" ? path : compilePath(path)(params, {
|
||||
pretty: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for navigating programmatically with a component.
|
||||
*/
|
||||
|
||||
function Redirect(_ref) {
|
||||
var computedMatch = _ref.computedMatch,
|
||||
to = _ref.to,
|
||||
_ref$push = _ref.push,
|
||||
push = _ref$push === void 0 ? false : _ref$push;
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Redirect> outside a <Router>") : invariant(false) : void 0;
|
||||
var history = context.history,
|
||||
staticContext = context.staticContext;
|
||||
var method = push ? history.push : history.replace;
|
||||
var location = createLocation(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : _extends({}, to, {
|
||||
pathname: generatePath(to.pathname, computedMatch.params)
|
||||
}) : to); // When rendering in a static context,
|
||||
// set the new location immediately.
|
||||
|
||||
if (staticContext) {
|
||||
method(location);
|
||||
return null;
|
||||
}
|
||||
|
||||
return React.createElement(Lifecycle, {
|
||||
onMount: function onMount() {
|
||||
method(location);
|
||||
},
|
||||
onUpdate: function onUpdate(self, prevProps) {
|
||||
var prevLocation = createLocation(prevProps.to);
|
||||
|
||||
if (!locationsAreEqual(prevLocation, _extends({}, location, {
|
||||
key: prevLocation.key
|
||||
}))) {
|
||||
method(location);
|
||||
}
|
||||
},
|
||||
to: to
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
Redirect.propTypes = {
|
||||
push: PropTypes.bool,
|
||||
from: PropTypes.string,
|
||||
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired
|
||||
};
|
||||
}
|
||||
|
||||
var cache$1 = {};
|
||||
var cacheLimit$1 = 10000;
|
||||
var cacheCount$1 = 0;
|
||||
|
||||
function compilePath$1(path, options) {
|
||||
var cacheKey = "" + options.end + options.strict + options.sensitive;
|
||||
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
|
||||
if (pathCache[path]) return pathCache[path];
|
||||
var keys = [];
|
||||
var regexp = pathToRegexp(path, keys, options);
|
||||
var result = {
|
||||
regexp: regexp,
|
||||
keys: keys
|
||||
};
|
||||
|
||||
if (cacheCount$1 < cacheLimit$1) {
|
||||
pathCache[path] = result;
|
||||
cacheCount$1++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/**
|
||||
* Public API for matching a URL pathname to a path.
|
||||
*/
|
||||
|
||||
|
||||
function matchPath(pathname, options) {
|
||||
if (options === void 0) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (typeof options === "string" || Array.isArray(options)) {
|
||||
options = {
|
||||
path: options
|
||||
};
|
||||
}
|
||||
|
||||
var _options = options,
|
||||
path = _options.path,
|
||||
_options$exact = _options.exact,
|
||||
exact = _options$exact === void 0 ? false : _options$exact,
|
||||
_options$strict = _options.strict,
|
||||
strict = _options$strict === void 0 ? false : _options$strict,
|
||||
_options$sensitive = _options.sensitive,
|
||||
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
||||
var paths = [].concat(path);
|
||||
return paths.reduce(function (matched, path) {
|
||||
if (!path && path !== "") return null;
|
||||
if (matched) return matched;
|
||||
|
||||
var _compilePath = compilePath$1(path, {
|
||||
end: exact,
|
||||
strict: strict,
|
||||
sensitive: sensitive
|
||||
}),
|
||||
regexp = _compilePath.regexp,
|
||||
keys = _compilePath.keys;
|
||||
|
||||
var match = regexp.exec(pathname);
|
||||
if (!match) return null;
|
||||
var url = match[0],
|
||||
values = match.slice(1);
|
||||
var isExact = pathname === url;
|
||||
if (exact && !isExact) return null;
|
||||
return {
|
||||
path: path,
|
||||
// the path used to match
|
||||
url: path === "/" && url === "" ? "/" : url,
|
||||
// the matched portion of the URL
|
||||
isExact: isExact,
|
||||
// whether or not we matched exactly
|
||||
params: keys.reduce(function (memo, key, index) {
|
||||
memo[key.name] = values[index];
|
||||
return memo;
|
||||
}, {})
|
||||
};
|
||||
}, null);
|
||||
}
|
||||
|
||||
function isEmptyChildren(children) {
|
||||
return React.Children.count(children) === 0;
|
||||
}
|
||||
|
||||
function evalChildrenDev(children, props, path) {
|
||||
var value = children(props);
|
||||
process.env.NODE_ENV !== "production" ? warning(value !== undefined, "You returned `undefined` from the `children` function of " + ("<Route" + (path ? " path=\"" + path + "\"" : "") + ">, but you ") + "should have returned a React element or `null`") : void 0;
|
||||
return value || null;
|
||||
}
|
||||
/**
|
||||
* The public API for matching a single path and rendering.
|
||||
*/
|
||||
|
||||
|
||||
var Route =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Route, _React$Component);
|
||||
|
||||
function Route() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Route.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this = this;
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context$1) {
|
||||
!context$1 ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Route> outside a <Router>") : invariant(false) : void 0;
|
||||
var location = _this.props.location || context$1.location;
|
||||
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
|
||||
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
||||
|
||||
var props = _extends({}, context$1, {
|
||||
location: location,
|
||||
match: match
|
||||
});
|
||||
|
||||
var _this$props = _this.props,
|
||||
children = _this$props.children,
|
||||
component = _this$props.component,
|
||||
render = _this$props.render; // Preact uses an empty array as children by
|
||||
// default, so use null if that's the case.
|
||||
|
||||
if (Array.isArray(children) && children.length === 0) {
|
||||
children = null;
|
||||
}
|
||||
|
||||
return React.createElement(context.Provider, {
|
||||
value: props
|
||||
}, props.match ? children ? typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : children : component ? React.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? process.env.NODE_ENV !== "production" ? evalChildrenDev(children, props, _this.props.path) : children(props) : null);
|
||||
});
|
||||
};
|
||||
|
||||
return Route;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
Route.propTypes = {
|
||||
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
||||
component: function component(props, propName) {
|
||||
if (props[propName] && !isValidElementType(props[propName])) {
|
||||
return new Error("Invalid prop 'component' supplied to 'Route': the prop is not a valid React component");
|
||||
}
|
||||
},
|
||||
exact: PropTypes.bool,
|
||||
location: PropTypes.object,
|
||||
path: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
||||
render: PropTypes.func,
|
||||
sensitive: PropTypes.bool,
|
||||
strict: PropTypes.bool
|
||||
};
|
||||
|
||||
Route.prototype.componentDidMount = function () {
|
||||
process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.component), "You should not use <Route component> and <Route children> in the same route; <Route component> will be ignored") : void 0;
|
||||
process.env.NODE_ENV !== "production" ? warning(!(this.props.children && !isEmptyChildren(this.props.children) && this.props.render), "You should not use <Route render> and <Route children> in the same route; <Route render> will be ignored") : void 0;
|
||||
process.env.NODE_ENV !== "production" ? warning(!(this.props.component && this.props.render), "You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored") : void 0;
|
||||
};
|
||||
|
||||
Route.prototype.componentDidUpdate = function (prevProps) {
|
||||
process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
|
||||
process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
function addLeadingSlash(path) {
|
||||
return path.charAt(0) === "/" ? path : "/" + path;
|
||||
}
|
||||
|
||||
function addBasename(basename, location) {
|
||||
if (!basename) return location;
|
||||
return _extends({}, location, {
|
||||
pathname: addLeadingSlash(basename) + location.pathname
|
||||
});
|
||||
}
|
||||
|
||||
function stripBasename(basename, location) {
|
||||
if (!basename) return location;
|
||||
var base = addLeadingSlash(basename);
|
||||
if (location.pathname.indexOf(base) !== 0) return location;
|
||||
return _extends({}, location, {
|
||||
pathname: location.pathname.substr(base.length)
|
||||
});
|
||||
}
|
||||
|
||||
function createURL(location) {
|
||||
return typeof location === "string" ? location : createPath(location);
|
||||
}
|
||||
|
||||
function staticHandler(methodName) {
|
||||
return function () {
|
||||
process.env.NODE_ENV !== "production" ? invariant(false, "You cannot %s with <StaticRouter>", methodName) : invariant(false) ;
|
||||
};
|
||||
}
|
||||
|
||||
function noop() {}
|
||||
/**
|
||||
* The public top-level API for a "static" <Router>, so-called because it
|
||||
* can't actually change the current location. Instead, it just records
|
||||
* location changes in a context object. Useful mainly in testing and
|
||||
* server-rendering scenarios.
|
||||
*/
|
||||
|
||||
|
||||
var StaticRouter =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(StaticRouter, _React$Component);
|
||||
|
||||
function StaticRouter() {
|
||||
var _this;
|
||||
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
||||
|
||||
_this.handlePush = function (location) {
|
||||
return _this.navigateTo(location, "PUSH");
|
||||
};
|
||||
|
||||
_this.handleReplace = function (location) {
|
||||
return _this.navigateTo(location, "REPLACE");
|
||||
};
|
||||
|
||||
_this.handleListen = function () {
|
||||
return noop;
|
||||
};
|
||||
|
||||
_this.handleBlock = function () {
|
||||
return noop;
|
||||
};
|
||||
|
||||
return _this;
|
||||
}
|
||||
|
||||
var _proto = StaticRouter.prototype;
|
||||
|
||||
_proto.navigateTo = function navigateTo(location, action) {
|
||||
var _this$props = this.props,
|
||||
_this$props$basename = _this$props.basename,
|
||||
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
|
||||
_this$props$context = _this$props.context,
|
||||
context = _this$props$context === void 0 ? {} : _this$props$context;
|
||||
context.action = action;
|
||||
context.location = addBasename(basename, createLocation(location));
|
||||
context.url = createURL(context.location);
|
||||
};
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this$props2 = this.props,
|
||||
_this$props2$basename = _this$props2.basename,
|
||||
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
|
||||
_this$props2$context = _this$props2.context,
|
||||
context = _this$props2$context === void 0 ? {} : _this$props2$context,
|
||||
_this$props2$location = _this$props2.location,
|
||||
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
|
||||
rest = _objectWithoutPropertiesLoose(_this$props2, ["basename", "context", "location"]);
|
||||
|
||||
var history = {
|
||||
createHref: function createHref(path) {
|
||||
return addLeadingSlash(basename + createURL(path));
|
||||
},
|
||||
action: "POP",
|
||||
location: stripBasename(basename, createLocation(location)),
|
||||
push: this.handlePush,
|
||||
replace: this.handleReplace,
|
||||
go: staticHandler("go"),
|
||||
goBack: staticHandler("goBack"),
|
||||
goForward: staticHandler("goForward"),
|
||||
listen: this.handleListen,
|
||||
block: this.handleBlock
|
||||
};
|
||||
return React.createElement(Router, _extends({}, rest, {
|
||||
history: history,
|
||||
staticContext: context
|
||||
}));
|
||||
};
|
||||
|
||||
return StaticRouter;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
StaticRouter.propTypes = {
|
||||
basename: PropTypes.string,
|
||||
context: PropTypes.object,
|
||||
location: PropTypes.oneOfType([PropTypes.string, PropTypes.object])
|
||||
};
|
||||
|
||||
StaticRouter.prototype.componentDidMount = function () {
|
||||
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<StaticRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { StaticRouter as Router }`.") : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* The public API for rendering the first <Route> that matches.
|
||||
*/
|
||||
|
||||
var Switch =
|
||||
/*#__PURE__*/
|
||||
function (_React$Component) {
|
||||
_inheritsLoose(Switch, _React$Component);
|
||||
|
||||
function Switch() {
|
||||
return _React$Component.apply(this, arguments) || this;
|
||||
}
|
||||
|
||||
var _proto = Switch.prototype;
|
||||
|
||||
_proto.render = function render() {
|
||||
var _this = this;
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Switch> outside a <Router>") : invariant(false) : void 0;
|
||||
var location = _this.props.location || context.location;
|
||||
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
|
||||
// here because toArray adds keys to all child elements and we do not want
|
||||
// to trigger an unmount/remount for two <Route>s that render the same
|
||||
// component at different URLs.
|
||||
|
||||
React.Children.forEach(_this.props.children, function (child) {
|
||||
if (match == null && React.isValidElement(child)) {
|
||||
element = child;
|
||||
var path = child.props.path || child.props.from;
|
||||
match = path ? matchPath(location.pathname, _extends({}, child.props, {
|
||||
path: path
|
||||
})) : context.match;
|
||||
}
|
||||
});
|
||||
return match ? React.cloneElement(element, {
|
||||
location: location,
|
||||
computedMatch: match
|
||||
}) : null;
|
||||
});
|
||||
};
|
||||
|
||||
return Switch;
|
||||
}(React.Component);
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
Switch.propTypes = {
|
||||
children: PropTypes.node,
|
||||
location: PropTypes.object
|
||||
};
|
||||
|
||||
Switch.prototype.componentDidUpdate = function (prevProps) {
|
||||
process.env.NODE_ENV !== "production" ? warning(!(this.props.location && !prevProps.location), '<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.') : void 0;
|
||||
process.env.NODE_ENV !== "production" ? warning(!(!this.props.location && prevProps.location), '<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.') : void 0;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A public higher-order component to access the imperative API
|
||||
*/
|
||||
|
||||
function withRouter(Component) {
|
||||
var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
|
||||
|
||||
var C = function C(props) {
|
||||
var wrappedComponentRef = props.wrappedComponentRef,
|
||||
remainingProps = _objectWithoutPropertiesLoose(props, ["wrappedComponentRef"]);
|
||||
|
||||
return React.createElement(context.Consumer, null, function (context) {
|
||||
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <" + displayName + " /> outside a <Router>") : invariant(false) : void 0;
|
||||
return React.createElement(Component, _extends({}, remainingProps, context, {
|
||||
ref: wrappedComponentRef
|
||||
}));
|
||||
});
|
||||
};
|
||||
|
||||
C.displayName = displayName;
|
||||
C.WrappedComponent = Component;
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
C.propTypes = {
|
||||
wrappedComponentRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.object])
|
||||
};
|
||||
}
|
||||
|
||||
return hoistStatics(C, Component);
|
||||
}
|
||||
|
||||
var useContext = React.useContext;
|
||||
function useHistory() {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
!(typeof useContext === "function") ? process.env.NODE_ENV !== "production" ? invariant(false, "You must use React >= 16.8 in order to use useHistory()") : invariant(false) : void 0;
|
||||
}
|
||||
|
||||
return useContext(historyContext);
|
||||
}
|
||||
function useLocation() {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
!(typeof useContext === "function") ? process.env.NODE_ENV !== "production" ? invariant(false, "You must use React >= 16.8 in order to use useLocation()") : invariant(false) : void 0;
|
||||
}
|
||||
|
||||
return useContext(context).location;
|
||||
}
|
||||
function useParams() {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
!(typeof useContext === "function") ? process.env.NODE_ENV !== "production" ? invariant(false, "You must use React >= 16.8 in order to use useParams()") : invariant(false) : void 0;
|
||||
}
|
||||
|
||||
var match = useContext(context).match;
|
||||
return match ? match.params : {};
|
||||
}
|
||||
function useRouteMatch(path) {
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
!(typeof useContext === "function") ? process.env.NODE_ENV !== "production" ? invariant(false, "You must use React >= 16.8 in order to use useRouteMatch()") : invariant(false) : void 0;
|
||||
}
|
||||
|
||||
var location = useLocation();
|
||||
var match = useContext(context).match;
|
||||
return path ? matchPath(location.pathname, path) : match;
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
if (typeof window !== "undefined") {
|
||||
var global = window;
|
||||
var key = "__react_router_build__";
|
||||
var buildNames = {
|
||||
cjs: "CommonJS",
|
||||
esm: "ES modules",
|
||||
umd: "UMD"
|
||||
};
|
||||
|
||||
if (global[key] && global[key] !== "esm") {
|
||||
var initialBuildName = buildNames[global[key]];
|
||||
var secondaryBuildName = buildNames["esm"]; // TODO: Add link to article that explains in detail how to avoid
|
||||
// loading 2 different builds.
|
||||
|
||||
throw new Error("You are loading the " + secondaryBuildName + " build of React Router " + ("on a page that is already running the " + initialBuildName + " ") + "build, so things won't work right.");
|
||||
}
|
||||
|
||||
global[key] = "esm";
|
||||
}
|
||||
}
|
||||
|
||||
export { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, historyContext as __HistoryContext, context as __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter };
|
||||
//# sourceMappingURL=react-router.js.map
|
||||
1
conf/site/node_modules/react-router-dom/node_modules/react-router/esm/react-router.js.map
generated
vendored
Normal file
1
conf/site/node_modules/react-router-dom/node_modules/react-router/esm/react-router.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
conf/site/node_modules/react-router-dom/node_modules/react-router/generatePath.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/generatePath.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("generatePath");
|
||||
module.exports = require("./index.js").generatePath;
|
||||
7
conf/site/node_modules/react-router-dom/node_modules/react-router/index.js
generated
vendored
Normal file
7
conf/site/node_modules/react-router-dom/node_modules/react-router/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
if (process.env.NODE_ENV === "production") {
|
||||
module.exports = require("./cjs/react-router.min.js");
|
||||
} else {
|
||||
module.exports = require("./cjs/react-router.js");
|
||||
}
|
||||
3
conf/site/node_modules/react-router-dom/node_modules/react-router/matchPath.js
generated
vendored
Normal file
3
conf/site/node_modules/react-router-dom/node_modules/react-router/matchPath.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
require("./warnAboutDeprecatedCJSRequire")("matchPath");
|
||||
module.exports = require("./index.js").matchPath;
|
||||
4
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/HistoryContext.js
generated
vendored
Normal file
4
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/HistoryContext.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import createNamedContext from "./createNameContext";
|
||||
|
||||
const historyContext = /*#__PURE__*/ createNamedContext("Router-History");
|
||||
export default historyContext;
|
||||
21
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/Lifecycle.js
generated
vendored
Normal file
21
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/Lifecycle.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from "react";
|
||||
|
||||
class Lifecycle extends React.Component {
|
||||
componentDidMount() {
|
||||
if (this.props.onMount) this.props.onMount.call(this, this);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
|
||||
}
|
||||
|
||||
render() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export default Lifecycle;
|
||||
37
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/MemoryRouter.js
generated
vendored
Normal file
37
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/MemoryRouter.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import { createMemoryHistory as createHistory } from "history";
|
||||
import warning from "tiny-warning";
|
||||
|
||||
import Router from "./Router.js";
|
||||
|
||||
/**
|
||||
* The public API for a <Router> that stores location in memory.
|
||||
*/
|
||||
class MemoryRouter extends React.Component {
|
||||
history = createHistory(this.props);
|
||||
|
||||
render() {
|
||||
return <Router history={this.history} children={this.props.children} />;
|
||||
}
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
MemoryRouter.propTypes = {
|
||||
initialEntries: PropTypes.array,
|
||||
initialIndex: PropTypes.number,
|
||||
getUserConfirmation: PropTypes.func,
|
||||
keyLength: PropTypes.number,
|
||||
children: PropTypes.node
|
||||
};
|
||||
|
||||
MemoryRouter.prototype.componentDidMount = function() {
|
||||
warning(
|
||||
!this.props.history,
|
||||
"<MemoryRouter> ignores the history prop. To use a custom history, " +
|
||||
"use `import { Router }` instead of `import { MemoryRouter as Router }`."
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default MemoryRouter;
|
||||
52
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/Prompt.js
generated
vendored
Normal file
52
conf/site/node_modules/react-router-dom/node_modules/react-router/modules/Prompt.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
import React from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import invariant from "tiny-invariant";
|
||||
|
||||
import Lifecycle from "./Lifecycle.js";
|
||||
import RouterContext from "./RouterContext.js";
|
||||
|
||||
/**
|
||||
* The public API for prompting the user before navigating away from a screen.
|
||||
*/
|
||||
function Prompt({ message, when = true }) {
|
||||
return (
|
||||
<RouterContext.Consumer>
|
||||
{context => {
|
||||
invariant(context, "You should not use <Prompt> outside a <Router>");
|
||||
|
||||
if (!when || context.staticContext) return null;
|
||||
|
||||
const method = context.history.block;
|
||||
|
||||
return (
|
||||
<Lifecycle
|
||||
onMount={self => {
|
||||
self.release = method(message);
|
||||
}}
|
||||
onUpdate={(self, prevProps) => {
|
||||
if (prevProps.message !== message) {
|
||||
self.release();
|
||||
self.release = method(message);
|
||||
}
|
||||
}}
|
||||
onUnmount={self => {
|
||||
self.release();
|
||||
}}
|
||||
message={message}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</RouterContext.Consumer>
|
||||
);
|
||||
}
|
||||
|
||||
if (__DEV__) {
|
||||
const messageType = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
|
||||
|
||||
Prompt.propTypes = {
|
||||
when: PropTypes.bool,
|
||||
message: messageType.isRequired
|
||||
};
|
||||
}
|
||||
|
||||
export default Prompt;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user