notebook 7.4.2__py3-none-any.whl → 7.5.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +1 -1
- notebook/static/131.2d7644b406b0d9c7c44a.js +1421 -0
- notebook/static/131.2d7644b406b0d9c7c44a.js.map +1 -0
- notebook/static/{132.db5d3c22f078a7818fd1.js → 132.691a95a70c9fe7c1cc8f.js} +3 -3
- notebook/static/{132.db5d3c22f078a7818fd1.js.map → 132.691a95a70c9fe7c1cc8f.js.map} +1 -1
- notebook/static/{1650.3a6b263c6a1d9657528d.js → 1650.b2bf74f5a7cda92e3c47.js} +4 -4
- notebook/static/{1650.3a6b263c6a1d9657528d.js.map → 1650.b2bf74f5a7cda92e3c47.js.map} +1 -1
- notebook/static/{1684.fd08e2bcbbfdab7f4613.js → 1684.84aef14d83b41275e33f.js} +5 -5
- notebook/static/{1684.fd08e2bcbbfdab7f4613.js.map → 1684.84aef14d83b41275e33f.js.map} +1 -1
- notebook/static/{1715.fd1bcb796c0a9a9fa28d.js → 1715.31ca8e6a27554059ae6d.js} +4 -4
- notebook/static/{1715.fd1bcb796c0a9a9fa28d.js.map → 1715.31ca8e6a27554059ae6d.js.map} +1 -1
- notebook/static/{2228.5897a4ab53c9c224da5d.js → 2228.e21c6943709bcbca9f11.js} +2 -2
- notebook/static/{2228.5897a4ab53c9c224da5d.js.map → 2228.e21c6943709bcbca9f11.js.map} +1 -1
- notebook/static/{7328.eee17040775379f2ebf7.js → 2634.57bfa6d5c5ae1e42dd9f.js} +2 -2
- notebook/static/{7328.eee17040775379f2ebf7.js.map → 2634.57bfa6d5c5ae1e42dd9f.js.map} +1 -1
- notebook/static/{2913.bb0dfcafeee2f97377fc.js → 2913.274b19d8f201991f4a69.js} +3 -3
- notebook/static/{2913.bb0dfcafeee2f97377fc.js.map → 2913.274b19d8f201991f4a69.js.map} +1 -1
- notebook/static/{3146.255a8679aedb1427878a.js → 3146.696d2e174781e130c374.js} +3 -3
- notebook/static/{3146.255a8679aedb1427878a.js.map → 3146.696d2e174781e130c374.js.map} +1 -1
- notebook/static/{3197.679087d3d6e90032272a.js → 3197.8a84a7c958622566cb33.js} +37 -36
- notebook/static/3197.8a84a7c958622566cb33.js.map +1 -0
- notebook/static/{3619.2e4bf80097f9890aef49.js → 3619.94f58ca9f340882ec9c0.js} +2 -2
- notebook/static/{3619.2e4bf80097f9890aef49.js.map → 3619.94f58ca9f340882ec9c0.js.map} +1 -1
- notebook/static/{3768.ed31c6101d464610b011.js → 3768.3e9bd8411c9d7a4f6852.js} +19 -19
- notebook/static/{7302.c66e4aebda9a8718f63a.js.map → 3768.3e9bd8411c9d7a4f6852.js.map} +1 -1
- notebook/static/{4324.fa653693694bd924557b.js → 4324.45d34a932e3f27ce8b2a.js} +308 -308
- notebook/static/4324.45d34a932e3f27ce8b2a.js.map +1 -0
- notebook/static/{4382.55f6fbec80dc2cbc38c6.js → 4382.dc6ea85d32495ccfe078.js} +3 -3
- notebook/static/{4382.55f6fbec80dc2cbc38c6.js.map → 4382.dc6ea85d32495ccfe078.js.map} +1 -1
- notebook/static/{4406.c435ee1d9e07c37b46e4.js → 4406.ef5d96031cc78e1fd755.js} +4 -4
- notebook/static/{4406.c435ee1d9e07c37b46e4.js.map → 4406.ef5d96031cc78e1fd755.js.map} +1 -1
- notebook/static/{4645.621dcf760b2636ab6a32.js → 4645.a07af6b2ee3dae0c8672.js} +5 -5
- notebook/static/{4645.621dcf760b2636ab6a32.js.map → 4645.a07af6b2ee3dae0c8672.js.map} +1 -1
- notebook/static/{4837.d93fa1362a1755054b7e.js → 4837.22eaa3eee463019de513.js} +3 -3
- notebook/static/{4837.d93fa1362a1755054b7e.js.map → 4837.22eaa3eee463019de513.js.map} +1 -1
- notebook/static/{4926.07f857be253dfe2d9b64.js → 4926.21f2bcadbb0c72c87992.js} +4 -4
- notebook/static/{4926.07f857be253dfe2d9b64.js.map → 4926.21f2bcadbb0c72c87992.js.map} +1 -1
- notebook/static/{5135.68030d482ad6e7d2705f.js → 5135.b04715b9a20abf2d857f.js} +11 -11
- notebook/static/{5135.68030d482ad6e7d2705f.js.map → 5135.b04715b9a20abf2d857f.js.map} +1 -1
- notebook/static/{5573.110f5ccc7780d0607efe.js → 5573.062d8043aaaea888131c.js} +17 -17
- notebook/static/{5573.110f5ccc7780d0607efe.js.map → 5573.062d8043aaaea888131c.js.map} +1 -1
- notebook/static/{5601.0846bb0c153a39d95381.js → 5601.df72883a74cbec5a4187.js} +5 -5
- notebook/static/{5601.0846bb0c153a39d95381.js.map → 5601.df72883a74cbec5a4187.js.map} +1 -1
- notebook/static/{9442.e301e4179b7c69c125d7.js → 6080.56aefff013f4272b815c.js} +2 -2
- notebook/static/{9442.e301e4179b7c69c125d7.js.map → 6080.56aefff013f4272b815c.js.map} +1 -1
- notebook/static/{131.729c28b8323daf822cbe.js → 6236.ea8288f99f42bcff0039.js} +1050 -1583
- notebook/static/6236.ea8288f99f42bcff0039.js.map +1 -0
- notebook/static/{6345.4acc733484bbafac321b.js → 6345.dcba68ca03484d6fe94c.js} +5 -5
- notebook/static/{6345.4acc733484bbafac321b.js.map → 6345.dcba68ca03484d6fe94c.js.map} +1 -1
- notebook/static/{7302.c66e4aebda9a8718f63a.js → 7302.71fdd01bf0458ccfabb0.js} +19 -19
- notebook/static/{3768.ed31c6101d464610b011.js.map → 7302.71fdd01bf0458ccfabb0.js.map} +1 -1
- notebook/static/{7906.238c7960444b3299bc27.js → 7906.4ca9aa5889ff47b2d092.js} +3 -3
- notebook/static/{7906.238c7960444b3299bc27.js.map → 7906.4ca9aa5889ff47b2d092.js.map} +1 -1
- notebook/static/{7995.228c3c90da185c130d89.js → 7995.45be6443b704da1daafc.js} +3 -3
- notebook/static/{7995.228c3c90da185c130d89.js.map → 7995.45be6443b704da1daafc.js.map} +1 -1
- notebook/static/{8579.175d3ae6dffdbf0145eb.js → 8579.943b51e580fe5ba6ec85.js} +13 -13
- notebook/static/{8579.175d3ae6dffdbf0145eb.js.map → 8579.943b51e580fe5ba6ec85.js.map} +1 -1
- notebook/static/{8781.8d9955710c04c689f0cd.js → 8781.30d203631c8d44cac089.js} +60 -60
- notebook/static/{8781.8d9955710c04c689f0cd.js.map → 8781.30d203631c8d44cac089.js.map} +1 -1
- notebook/static/{8845.ac1c5acb78cea4acee08.js → 8845.639ebc34b4688cf4bf1c.js} +7 -7
- notebook/static/{8845.ac1c5acb78cea4acee08.js.map → 8845.639ebc34b4688cf4bf1c.js.map} +1 -1
- notebook/static/{8875.16a8a1fab0136d70a5f8.js → 8875.d30b4bdb849b1c6e8e48.js} +4 -4
- notebook/static/{8875.16a8a1fab0136d70a5f8.js.map → 8875.d30b4bdb849b1c6e8e48.js.map} +1 -1
- notebook/static/{9068.7c89844254ee24f35eee.js → 9068.035c74d3ac5947308e33.js} +3 -3
- notebook/static/{9068.7c89844254ee24f35eee.js.map → 9068.035c74d3ac5947308e33.js.map} +1 -1
- notebook/static/{9380.0b5d548d01ddba3e4378.js → 9380.50c0ce4765c95fdad134.js} +5 -5
- notebook/static/{9380.0b5d548d01ddba3e4378.js.map → 9380.50c0ce4765c95fdad134.js.map} +1 -1
- notebook/static/main.1d8650f7e0beb0a70c21.js +1180 -0
- notebook/static/main.1d8650f7e0beb0a70c21.js.map +1 -0
- notebook/static/{notebook_core.7213b2fe0eabee62279d.js → notebook_core.3a39fd35e3d3188d26bc.js} +875 -6570
- notebook/static/{notebook_core.7213b2fe0eabee62279d.js.map → notebook_core.3a39fd35e3d3188d26bc.js.map} +1 -1
- notebook/static/third-party-licenses.json +104 -104
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
- notebook-7.5.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.062ba75f2f2f3a8e26d3.js +1 -0
- notebook-7.4.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.327ec9d7a9413375ec45.js → notebook-7.5.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.86d80b23f10dccd9fb98.js +1 -1
- notebook-7.4.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js → notebook-7.5.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.dab87fbc078083780f2b.js +1 -1
- notebook-7.5.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/981.d00f62cb382e25262fa3.js +1 -0
- notebook-7.5.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.2ef44fd0409252b4639d.js +1 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.4.2.dist-info → notebook-7.5.0a0.dist-info}/METADATA +3 -3
- {notebook-7.4.2.dist-info → notebook-7.5.0a0.dist-info}/RECORD +117 -117
- notebook/static/131.729c28b8323daf822cbe.js.map +0 -1
- notebook/static/3197.679087d3d6e90032272a.js.map +0 -1
- notebook/static/4324.fa653693694bd924557b.js.map +0 -1
- notebook/static/5448.a9016133a2b9389ac102.js +0 -951
- notebook/static/5448.a9016133a2b9389ac102.js.map +0 -1
- notebook/static/main.4c52c91f103071190cb1.js +0 -1180
- notebook/static/main.4c52c91f103071190cb1.js.map +0 -1
- notebook-7.4.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/199.f16f9d1ce907d41fa0e1.js +0 -1
- notebook-7.4.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.4abd86605f9970bf2af0.js +0 -1
- notebook-7.4.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.a7f6d6f20e99b7f1c604.js +0 -1
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.4.2.data → notebook-7.5.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.4.2.dist-info → notebook-7.5.0a0.dist-info}/WHEEL +0 -0
- {notebook-7.4.2.dist-info → notebook-7.5.0a0.dist-info}/entry_points.txt +0 -0
- {notebook-7.4.2.dist-info → notebook-7.5.0a0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,951 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([[5448],{
|
|
3
|
-
|
|
4
|
-
/***/ 66471:
|
|
5
|
-
/***/ ((module) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// do not edit .js files directly - edit src/index.jst
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
module.exports = function equal(a, b) {
|
|
14
|
-
if (a === b) return true;
|
|
15
|
-
|
|
16
|
-
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
17
|
-
if (a.constructor !== b.constructor) return false;
|
|
18
|
-
|
|
19
|
-
var length, i, keys;
|
|
20
|
-
if (Array.isArray(a)) {
|
|
21
|
-
length = a.length;
|
|
22
|
-
if (length != b.length) return false;
|
|
23
|
-
for (i = length; i-- !== 0;)
|
|
24
|
-
if (!equal(a[i], b[i])) return false;
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
31
|
-
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
32
|
-
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
33
|
-
|
|
34
|
-
keys = Object.keys(a);
|
|
35
|
-
length = keys.length;
|
|
36
|
-
if (length !== Object.keys(b).length) return false;
|
|
37
|
-
|
|
38
|
-
for (i = length; i-- !== 0;)
|
|
39
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
40
|
-
|
|
41
|
-
for (i = length; i-- !== 0;) {
|
|
42
|
-
var key = keys[i];
|
|
43
|
-
|
|
44
|
-
if (!equal(a[key], b[key])) return false;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// true if both NaN, false otherwise
|
|
51
|
-
return a!==a && b!==b;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
/***/ }),
|
|
56
|
-
|
|
57
|
-
/***/ 83745:
|
|
58
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const { normalizeIPv6, normalizeIPv4, removeDotSegments, recomposeAuthority, normalizeComponentEncoding } = __webpack_require__(18607)
|
|
63
|
-
const SCHEMES = __webpack_require__(76042)
|
|
64
|
-
|
|
65
|
-
function normalize (uri, options) {
|
|
66
|
-
if (typeof uri === 'string') {
|
|
67
|
-
uri = serialize(parse(uri, options), options)
|
|
68
|
-
} else if (typeof uri === 'object') {
|
|
69
|
-
uri = parse(serialize(uri, options), options)
|
|
70
|
-
}
|
|
71
|
-
return uri
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function resolve (baseURI, relativeURI, options) {
|
|
75
|
-
const schemelessOptions = Object.assign({ scheme: 'null' }, options)
|
|
76
|
-
const resolved = resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true)
|
|
77
|
-
return serialize(resolved, { ...schemelessOptions, skipEscape: true })
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function resolveComponents (base, relative, options, skipNormalization) {
|
|
81
|
-
const target = {}
|
|
82
|
-
if (!skipNormalization) {
|
|
83
|
-
base = parse(serialize(base, options), options) // normalize base components
|
|
84
|
-
relative = parse(serialize(relative, options), options) // normalize relative components
|
|
85
|
-
}
|
|
86
|
-
options = options || {}
|
|
87
|
-
|
|
88
|
-
if (!options.tolerant && relative.scheme) {
|
|
89
|
-
target.scheme = relative.scheme
|
|
90
|
-
// target.authority = relative.authority;
|
|
91
|
-
target.userinfo = relative.userinfo
|
|
92
|
-
target.host = relative.host
|
|
93
|
-
target.port = relative.port
|
|
94
|
-
target.path = removeDotSegments(relative.path || '')
|
|
95
|
-
target.query = relative.query
|
|
96
|
-
} else {
|
|
97
|
-
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
|
98
|
-
// target.authority = relative.authority;
|
|
99
|
-
target.userinfo = relative.userinfo
|
|
100
|
-
target.host = relative.host
|
|
101
|
-
target.port = relative.port
|
|
102
|
-
target.path = removeDotSegments(relative.path || '')
|
|
103
|
-
target.query = relative.query
|
|
104
|
-
} else {
|
|
105
|
-
if (!relative.path) {
|
|
106
|
-
target.path = base.path
|
|
107
|
-
if (relative.query !== undefined) {
|
|
108
|
-
target.query = relative.query
|
|
109
|
-
} else {
|
|
110
|
-
target.query = base.query
|
|
111
|
-
}
|
|
112
|
-
} else {
|
|
113
|
-
if (relative.path.charAt(0) === '/') {
|
|
114
|
-
target.path = removeDotSegments(relative.path)
|
|
115
|
-
} else {
|
|
116
|
-
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
|
117
|
-
target.path = '/' + relative.path
|
|
118
|
-
} else if (!base.path) {
|
|
119
|
-
target.path = relative.path
|
|
120
|
-
} else {
|
|
121
|
-
target.path = base.path.slice(0, base.path.lastIndexOf('/') + 1) + relative.path
|
|
122
|
-
}
|
|
123
|
-
target.path = removeDotSegments(target.path)
|
|
124
|
-
}
|
|
125
|
-
target.query = relative.query
|
|
126
|
-
}
|
|
127
|
-
// target.authority = base.authority;
|
|
128
|
-
target.userinfo = base.userinfo
|
|
129
|
-
target.host = base.host
|
|
130
|
-
target.port = base.port
|
|
131
|
-
}
|
|
132
|
-
target.scheme = base.scheme
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
target.fragment = relative.fragment
|
|
136
|
-
|
|
137
|
-
return target
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function equal (uriA, uriB, options) {
|
|
141
|
-
if (typeof uriA === 'string') {
|
|
142
|
-
uriA = unescape(uriA)
|
|
143
|
-
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true })
|
|
144
|
-
} else if (typeof uriA === 'object') {
|
|
145
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true })
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (typeof uriB === 'string') {
|
|
149
|
-
uriB = unescape(uriB)
|
|
150
|
-
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true })
|
|
151
|
-
} else if (typeof uriB === 'object') {
|
|
152
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true })
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return uriA.toLowerCase() === uriB.toLowerCase()
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function serialize (cmpts, opts) {
|
|
159
|
-
const components = {
|
|
160
|
-
host: cmpts.host,
|
|
161
|
-
scheme: cmpts.scheme,
|
|
162
|
-
userinfo: cmpts.userinfo,
|
|
163
|
-
port: cmpts.port,
|
|
164
|
-
path: cmpts.path,
|
|
165
|
-
query: cmpts.query,
|
|
166
|
-
nid: cmpts.nid,
|
|
167
|
-
nss: cmpts.nss,
|
|
168
|
-
uuid: cmpts.uuid,
|
|
169
|
-
fragment: cmpts.fragment,
|
|
170
|
-
reference: cmpts.reference,
|
|
171
|
-
resourceName: cmpts.resourceName,
|
|
172
|
-
secure: cmpts.secure,
|
|
173
|
-
error: ''
|
|
174
|
-
}
|
|
175
|
-
const options = Object.assign({}, opts)
|
|
176
|
-
const uriTokens = []
|
|
177
|
-
|
|
178
|
-
// find scheme handler
|
|
179
|
-
const schemeHandler = SCHEMES[(options.scheme || components.scheme || '').toLowerCase()]
|
|
180
|
-
|
|
181
|
-
// perform scheme specific serialization
|
|
182
|
-
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options)
|
|
183
|
-
|
|
184
|
-
if (components.path !== undefined) {
|
|
185
|
-
if (!options.skipEscape) {
|
|
186
|
-
components.path = escape(components.path)
|
|
187
|
-
|
|
188
|
-
if (components.scheme !== undefined) {
|
|
189
|
-
components.path = components.path.split('%3A').join(':')
|
|
190
|
-
}
|
|
191
|
-
} else {
|
|
192
|
-
components.path = unescape(components.path)
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (options.reference !== 'suffix' && components.scheme) {
|
|
197
|
-
uriTokens.push(components.scheme, ':')
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
const authority = recomposeAuthority(components)
|
|
201
|
-
if (authority !== undefined) {
|
|
202
|
-
if (options.reference !== 'suffix') {
|
|
203
|
-
uriTokens.push('//')
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
uriTokens.push(authority)
|
|
207
|
-
|
|
208
|
-
if (components.path && components.path.charAt(0) !== '/') {
|
|
209
|
-
uriTokens.push('/')
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
if (components.path !== undefined) {
|
|
213
|
-
let s = components.path
|
|
214
|
-
|
|
215
|
-
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
|
216
|
-
s = removeDotSegments(s)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (authority === undefined) {
|
|
220
|
-
s = s.replace(/^\/\//u, '/%2F') // don't allow the path to start with "//"
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
uriTokens.push(s)
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (components.query !== undefined) {
|
|
227
|
-
uriTokens.push('?', components.query)
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (components.fragment !== undefined) {
|
|
231
|
-
uriTokens.push('#', components.fragment)
|
|
232
|
-
}
|
|
233
|
-
return uriTokens.join('')
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
const hexLookUp = Array.from({ length: 127 }, (_v, k) => /[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(k)))
|
|
237
|
-
|
|
238
|
-
function nonSimpleDomain (value) {
|
|
239
|
-
let code = 0
|
|
240
|
-
for (let i = 0, len = value.length; i < len; ++i) {
|
|
241
|
-
code = value.charCodeAt(i)
|
|
242
|
-
if (code > 126 || hexLookUp[code]) {
|
|
243
|
-
return true
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return false
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u
|
|
250
|
-
|
|
251
|
-
function parse (uri, opts) {
|
|
252
|
-
const options = Object.assign({}, opts)
|
|
253
|
-
const parsed = {
|
|
254
|
-
scheme: undefined,
|
|
255
|
-
userinfo: undefined,
|
|
256
|
-
host: '',
|
|
257
|
-
port: undefined,
|
|
258
|
-
path: '',
|
|
259
|
-
query: undefined,
|
|
260
|
-
fragment: undefined
|
|
261
|
-
}
|
|
262
|
-
const gotEncoding = uri.indexOf('%') !== -1
|
|
263
|
-
let isIP = false
|
|
264
|
-
if (options.reference === 'suffix') uri = (options.scheme ? options.scheme + ':' : '') + '//' + uri
|
|
265
|
-
|
|
266
|
-
const matches = uri.match(URI_PARSE)
|
|
267
|
-
|
|
268
|
-
if (matches) {
|
|
269
|
-
// store each component
|
|
270
|
-
parsed.scheme = matches[1]
|
|
271
|
-
parsed.userinfo = matches[3]
|
|
272
|
-
parsed.host = matches[4]
|
|
273
|
-
parsed.port = parseInt(matches[5], 10)
|
|
274
|
-
parsed.path = matches[6] || ''
|
|
275
|
-
parsed.query = matches[7]
|
|
276
|
-
parsed.fragment = matches[8]
|
|
277
|
-
|
|
278
|
-
// fix port number
|
|
279
|
-
if (isNaN(parsed.port)) {
|
|
280
|
-
parsed.port = matches[5]
|
|
281
|
-
}
|
|
282
|
-
if (parsed.host) {
|
|
283
|
-
const ipv4result = normalizeIPv4(parsed.host)
|
|
284
|
-
if (ipv4result.isIPV4 === false) {
|
|
285
|
-
const ipv6result = normalizeIPv6(ipv4result.host)
|
|
286
|
-
parsed.host = ipv6result.host.toLowerCase()
|
|
287
|
-
isIP = ipv6result.isIPV6
|
|
288
|
-
} else {
|
|
289
|
-
parsed.host = ipv4result.host
|
|
290
|
-
isIP = true
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
if (parsed.scheme === undefined && parsed.userinfo === undefined && parsed.host === undefined && parsed.port === undefined && parsed.query === undefined && !parsed.path) {
|
|
294
|
-
parsed.reference = 'same-document'
|
|
295
|
-
} else if (parsed.scheme === undefined) {
|
|
296
|
-
parsed.reference = 'relative'
|
|
297
|
-
} else if (parsed.fragment === undefined) {
|
|
298
|
-
parsed.reference = 'absolute'
|
|
299
|
-
} else {
|
|
300
|
-
parsed.reference = 'uri'
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
// check for reference errors
|
|
304
|
-
if (options.reference && options.reference !== 'suffix' && options.reference !== parsed.reference) {
|
|
305
|
-
parsed.error = parsed.error || 'URI is not a ' + options.reference + ' reference.'
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// find scheme handler
|
|
309
|
-
const schemeHandler = SCHEMES[(options.scheme || parsed.scheme || '').toLowerCase()]
|
|
310
|
-
|
|
311
|
-
// check if scheme can't handle IRIs
|
|
312
|
-
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
|
313
|
-
// if host component is a domain name
|
|
314
|
-
if (parsed.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost)) && isIP === false && nonSimpleDomain(parsed.host)) {
|
|
315
|
-
// convert Unicode IDN -> ASCII IDN
|
|
316
|
-
try {
|
|
317
|
-
parsed.host = URL.domainToASCII(parsed.host.toLowerCase())
|
|
318
|
-
} catch (e) {
|
|
319
|
-
parsed.error = parsed.error || "Host's domain name can not be converted to ASCII: " + e
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
// convert IRI -> URI
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
if (!schemeHandler || (schemeHandler && !schemeHandler.skipNormalize)) {
|
|
326
|
-
if (gotEncoding && parsed.scheme !== undefined) {
|
|
327
|
-
parsed.scheme = unescape(parsed.scheme)
|
|
328
|
-
}
|
|
329
|
-
if (gotEncoding && parsed.host !== undefined) {
|
|
330
|
-
parsed.host = unescape(parsed.host)
|
|
331
|
-
}
|
|
332
|
-
if (parsed.path) {
|
|
333
|
-
parsed.path = escape(unescape(parsed.path))
|
|
334
|
-
}
|
|
335
|
-
if (parsed.fragment) {
|
|
336
|
-
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// perform scheme specific parsing
|
|
341
|
-
if (schemeHandler && schemeHandler.parse) {
|
|
342
|
-
schemeHandler.parse(parsed, options)
|
|
343
|
-
}
|
|
344
|
-
} else {
|
|
345
|
-
parsed.error = parsed.error || 'URI can not be parsed.'
|
|
346
|
-
}
|
|
347
|
-
return parsed
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
const fastUri = {
|
|
351
|
-
SCHEMES,
|
|
352
|
-
normalize,
|
|
353
|
-
resolve,
|
|
354
|
-
resolveComponents,
|
|
355
|
-
equal,
|
|
356
|
-
serialize,
|
|
357
|
-
parse
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
module.exports = fastUri
|
|
361
|
-
module.exports["default"] = fastUri
|
|
362
|
-
module.exports.fastUri = fastUri
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
/***/ }),
|
|
366
|
-
|
|
367
|
-
/***/ 76042:
|
|
368
|
-
/***/ ((module) => {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
const UUID_REG = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu
|
|
373
|
-
const URN_REG = /([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu
|
|
374
|
-
|
|
375
|
-
function isSecure (wsComponents) {
|
|
376
|
-
return typeof wsComponents.secure === 'boolean' ? wsComponents.secure : String(wsComponents.scheme).toLowerCase() === 'wss'
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
function httpParse (components) {
|
|
380
|
-
if (!components.host) {
|
|
381
|
-
components.error = components.error || 'HTTP URIs must have a host.'
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
return components
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
function httpSerialize (components) {
|
|
388
|
-
const secure = String(components.scheme).toLowerCase() === 'https'
|
|
389
|
-
|
|
390
|
-
// normalize the default port
|
|
391
|
-
if (components.port === (secure ? 443 : 80) || components.port === '') {
|
|
392
|
-
components.port = undefined
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
// normalize the empty path
|
|
396
|
-
if (!components.path) {
|
|
397
|
-
components.path = '/'
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
// NOTE: We do not parse query strings for HTTP URIs
|
|
401
|
-
// as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
|
402
|
-
// and not the HTTP spec.
|
|
403
|
-
|
|
404
|
-
return components
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
function wsParse (wsComponents) {
|
|
408
|
-
// indicate if the secure flag is set
|
|
409
|
-
wsComponents.secure = isSecure(wsComponents)
|
|
410
|
-
|
|
411
|
-
// construct resouce name
|
|
412
|
-
wsComponents.resourceName = (wsComponents.path || '/') + (wsComponents.query ? '?' + wsComponents.query : '')
|
|
413
|
-
wsComponents.path = undefined
|
|
414
|
-
wsComponents.query = undefined
|
|
415
|
-
|
|
416
|
-
return wsComponents
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function wsSerialize (wsComponents) {
|
|
420
|
-
// normalize the default port
|
|
421
|
-
if (wsComponents.port === (isSecure(wsComponents) ? 443 : 80) || wsComponents.port === '') {
|
|
422
|
-
wsComponents.port = undefined
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
// ensure scheme matches secure flag
|
|
426
|
-
if (typeof wsComponents.secure === 'boolean') {
|
|
427
|
-
wsComponents.scheme = (wsComponents.secure ? 'wss' : 'ws')
|
|
428
|
-
wsComponents.secure = undefined
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
// reconstruct path from resource name
|
|
432
|
-
if (wsComponents.resourceName) {
|
|
433
|
-
const [path, query] = wsComponents.resourceName.split('?')
|
|
434
|
-
wsComponents.path = (path && path !== '/' ? path : undefined)
|
|
435
|
-
wsComponents.query = query
|
|
436
|
-
wsComponents.resourceName = undefined
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
// forbid fragment component
|
|
440
|
-
wsComponents.fragment = undefined
|
|
441
|
-
|
|
442
|
-
return wsComponents
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
function urnParse (urnComponents, options) {
|
|
446
|
-
if (!urnComponents.path) {
|
|
447
|
-
urnComponents.error = 'URN can not be parsed'
|
|
448
|
-
return urnComponents
|
|
449
|
-
}
|
|
450
|
-
const matches = urnComponents.path.match(URN_REG)
|
|
451
|
-
if (matches) {
|
|
452
|
-
const scheme = options.scheme || urnComponents.scheme || 'urn'
|
|
453
|
-
urnComponents.nid = matches[1].toLowerCase()
|
|
454
|
-
urnComponents.nss = matches[2]
|
|
455
|
-
const urnScheme = `${scheme}:${options.nid || urnComponents.nid}`
|
|
456
|
-
const schemeHandler = SCHEMES[urnScheme]
|
|
457
|
-
urnComponents.path = undefined
|
|
458
|
-
|
|
459
|
-
if (schemeHandler) {
|
|
460
|
-
urnComponents = schemeHandler.parse(urnComponents, options)
|
|
461
|
-
}
|
|
462
|
-
} else {
|
|
463
|
-
urnComponents.error = urnComponents.error || 'URN can not be parsed.'
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
return urnComponents
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
function urnSerialize (urnComponents, options) {
|
|
470
|
-
const scheme = options.scheme || urnComponents.scheme || 'urn'
|
|
471
|
-
const nid = urnComponents.nid.toLowerCase()
|
|
472
|
-
const urnScheme = `${scheme}:${options.nid || nid}`
|
|
473
|
-
const schemeHandler = SCHEMES[urnScheme]
|
|
474
|
-
|
|
475
|
-
if (schemeHandler) {
|
|
476
|
-
urnComponents = schemeHandler.serialize(urnComponents, options)
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
const uriComponents = urnComponents
|
|
480
|
-
const nss = urnComponents.nss
|
|
481
|
-
uriComponents.path = `${nid || options.nid}:${nss}`
|
|
482
|
-
|
|
483
|
-
options.skipEscape = true
|
|
484
|
-
return uriComponents
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
function urnuuidParse (urnComponents, options) {
|
|
488
|
-
const uuidComponents = urnComponents
|
|
489
|
-
uuidComponents.uuid = uuidComponents.nss
|
|
490
|
-
uuidComponents.nss = undefined
|
|
491
|
-
|
|
492
|
-
if (!options.tolerant && (!uuidComponents.uuid || !UUID_REG.test(uuidComponents.uuid))) {
|
|
493
|
-
uuidComponents.error = uuidComponents.error || 'UUID is not valid.'
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
return uuidComponents
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
function urnuuidSerialize (uuidComponents) {
|
|
500
|
-
const urnComponents = uuidComponents
|
|
501
|
-
// normalize UUID
|
|
502
|
-
urnComponents.nss = (uuidComponents.uuid || '').toLowerCase()
|
|
503
|
-
return urnComponents
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
const http = {
|
|
507
|
-
scheme: 'http',
|
|
508
|
-
domainHost: true,
|
|
509
|
-
parse: httpParse,
|
|
510
|
-
serialize: httpSerialize
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
const https = {
|
|
514
|
-
scheme: 'https',
|
|
515
|
-
domainHost: http.domainHost,
|
|
516
|
-
parse: httpParse,
|
|
517
|
-
serialize: httpSerialize
|
|
518
|
-
}
|
|
519
|
-
|
|
520
|
-
const ws = {
|
|
521
|
-
scheme: 'ws',
|
|
522
|
-
domainHost: true,
|
|
523
|
-
parse: wsParse,
|
|
524
|
-
serialize: wsSerialize
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
const wss = {
|
|
528
|
-
scheme: 'wss',
|
|
529
|
-
domainHost: ws.domainHost,
|
|
530
|
-
parse: ws.parse,
|
|
531
|
-
serialize: ws.serialize
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
const urn = {
|
|
535
|
-
scheme: 'urn',
|
|
536
|
-
parse: urnParse,
|
|
537
|
-
serialize: urnSerialize,
|
|
538
|
-
skipNormalize: true
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
const urnuuid = {
|
|
542
|
-
scheme: 'urn:uuid',
|
|
543
|
-
parse: urnuuidParse,
|
|
544
|
-
serialize: urnuuidSerialize,
|
|
545
|
-
skipNormalize: true
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
const SCHEMES = {
|
|
549
|
-
http,
|
|
550
|
-
https,
|
|
551
|
-
ws,
|
|
552
|
-
wss,
|
|
553
|
-
urn,
|
|
554
|
-
'urn:uuid': urnuuid
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
module.exports = SCHEMES
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
/***/ }),
|
|
561
|
-
|
|
562
|
-
/***/ 63085:
|
|
563
|
-
/***/ ((module) => {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
const HEX = {
|
|
568
|
-
0: 0,
|
|
569
|
-
1: 1,
|
|
570
|
-
2: 2,
|
|
571
|
-
3: 3,
|
|
572
|
-
4: 4,
|
|
573
|
-
5: 5,
|
|
574
|
-
6: 6,
|
|
575
|
-
7: 7,
|
|
576
|
-
8: 8,
|
|
577
|
-
9: 9,
|
|
578
|
-
a: 10,
|
|
579
|
-
A: 10,
|
|
580
|
-
b: 11,
|
|
581
|
-
B: 11,
|
|
582
|
-
c: 12,
|
|
583
|
-
C: 12,
|
|
584
|
-
d: 13,
|
|
585
|
-
D: 13,
|
|
586
|
-
e: 14,
|
|
587
|
-
E: 14,
|
|
588
|
-
f: 15,
|
|
589
|
-
F: 15
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
module.exports = {
|
|
593
|
-
HEX
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
/***/ }),
|
|
598
|
-
|
|
599
|
-
/***/ 18607:
|
|
600
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const { HEX } = __webpack_require__(63085)
|
|
605
|
-
|
|
606
|
-
const IPV4_REG = /^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u
|
|
607
|
-
|
|
608
|
-
function normalizeIPv4 (host) {
|
|
609
|
-
if (findToken(host, '.') < 3) { return { host, isIPV4: false } }
|
|
610
|
-
const matches = host.match(IPV4_REG) || []
|
|
611
|
-
const [address] = matches
|
|
612
|
-
if (address) {
|
|
613
|
-
return { host: stripLeadingZeros(address, '.'), isIPV4: true }
|
|
614
|
-
} else {
|
|
615
|
-
return { host, isIPV4: false }
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
/**
|
|
620
|
-
* @param {string[]} input
|
|
621
|
-
* @param {boolean} [keepZero=false]
|
|
622
|
-
* @returns {string|undefined}
|
|
623
|
-
*/
|
|
624
|
-
function stringArrayToHexStripped (input, keepZero = false) {
|
|
625
|
-
let acc = ''
|
|
626
|
-
let strip = true
|
|
627
|
-
for (const c of input) {
|
|
628
|
-
if (HEX[c] === undefined) return undefined
|
|
629
|
-
if (c !== '0' && strip === true) strip = false
|
|
630
|
-
if (!strip) acc += c
|
|
631
|
-
}
|
|
632
|
-
if (keepZero && acc.length === 0) acc = '0'
|
|
633
|
-
return acc
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
function getIPV6 (input) {
|
|
637
|
-
let tokenCount = 0
|
|
638
|
-
const output = { error: false, address: '', zone: '' }
|
|
639
|
-
const address = []
|
|
640
|
-
const buffer = []
|
|
641
|
-
let isZone = false
|
|
642
|
-
let endipv6Encountered = false
|
|
643
|
-
let endIpv6 = false
|
|
644
|
-
|
|
645
|
-
function consume () {
|
|
646
|
-
if (buffer.length) {
|
|
647
|
-
if (isZone === false) {
|
|
648
|
-
const hex = stringArrayToHexStripped(buffer)
|
|
649
|
-
if (hex !== undefined) {
|
|
650
|
-
address.push(hex)
|
|
651
|
-
} else {
|
|
652
|
-
output.error = true
|
|
653
|
-
return false
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
buffer.length = 0
|
|
657
|
-
}
|
|
658
|
-
return true
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
for (let i = 0; i < input.length; i++) {
|
|
662
|
-
const cursor = input[i]
|
|
663
|
-
if (cursor === '[' || cursor === ']') { continue }
|
|
664
|
-
if (cursor === ':') {
|
|
665
|
-
if (endipv6Encountered === true) {
|
|
666
|
-
endIpv6 = true
|
|
667
|
-
}
|
|
668
|
-
if (!consume()) { break }
|
|
669
|
-
tokenCount++
|
|
670
|
-
address.push(':')
|
|
671
|
-
if (tokenCount > 7) {
|
|
672
|
-
// not valid
|
|
673
|
-
output.error = true
|
|
674
|
-
break
|
|
675
|
-
}
|
|
676
|
-
if (i - 1 >= 0 && input[i - 1] === ':') {
|
|
677
|
-
endipv6Encountered = true
|
|
678
|
-
}
|
|
679
|
-
continue
|
|
680
|
-
} else if (cursor === '%') {
|
|
681
|
-
if (!consume()) { break }
|
|
682
|
-
// switch to zone detection
|
|
683
|
-
isZone = true
|
|
684
|
-
} else {
|
|
685
|
-
buffer.push(cursor)
|
|
686
|
-
continue
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
if (buffer.length) {
|
|
690
|
-
if (isZone) {
|
|
691
|
-
output.zone = buffer.join('')
|
|
692
|
-
} else if (endIpv6) {
|
|
693
|
-
address.push(buffer.join(''))
|
|
694
|
-
} else {
|
|
695
|
-
address.push(stringArrayToHexStripped(buffer))
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
output.address = address.join('')
|
|
699
|
-
return output
|
|
700
|
-
}
|
|
701
|
-
|
|
702
|
-
function normalizeIPv6 (host) {
|
|
703
|
-
if (findToken(host, ':') < 2) { return { host, isIPV6: false } }
|
|
704
|
-
const ipv6 = getIPV6(host)
|
|
705
|
-
|
|
706
|
-
if (!ipv6.error) {
|
|
707
|
-
let newHost = ipv6.address
|
|
708
|
-
let escapedHost = ipv6.address
|
|
709
|
-
if (ipv6.zone) {
|
|
710
|
-
newHost += '%' + ipv6.zone
|
|
711
|
-
escapedHost += '%25' + ipv6.zone
|
|
712
|
-
}
|
|
713
|
-
return { host: newHost, escapedHost, isIPV6: true }
|
|
714
|
-
} else {
|
|
715
|
-
return { host, isIPV6: false }
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
function stripLeadingZeros (str, token) {
|
|
720
|
-
let out = ''
|
|
721
|
-
let skip = true
|
|
722
|
-
const l = str.length
|
|
723
|
-
for (let i = 0; i < l; i++) {
|
|
724
|
-
const c = str[i]
|
|
725
|
-
if (c === '0' && skip) {
|
|
726
|
-
if ((i + 1 <= l && str[i + 1] === token) || i + 1 === l) {
|
|
727
|
-
out += c
|
|
728
|
-
skip = false
|
|
729
|
-
}
|
|
730
|
-
} else {
|
|
731
|
-
if (c === token) {
|
|
732
|
-
skip = true
|
|
733
|
-
} else {
|
|
734
|
-
skip = false
|
|
735
|
-
}
|
|
736
|
-
out += c
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
return out
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
function findToken (str, token) {
|
|
743
|
-
let ind = 0
|
|
744
|
-
for (let i = 0; i < str.length; i++) {
|
|
745
|
-
if (str[i] === token) ind++
|
|
746
|
-
}
|
|
747
|
-
return ind
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
const RDS1 = /^\.\.?\//u
|
|
751
|
-
const RDS2 = /^\/\.(?:\/|$)/u
|
|
752
|
-
const RDS3 = /^\/\.\.(?:\/|$)/u
|
|
753
|
-
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/u
|
|
754
|
-
|
|
755
|
-
function removeDotSegments (input) {
|
|
756
|
-
const output = []
|
|
757
|
-
|
|
758
|
-
while (input.length) {
|
|
759
|
-
if (input.match(RDS1)) {
|
|
760
|
-
input = input.replace(RDS1, '')
|
|
761
|
-
} else if (input.match(RDS2)) {
|
|
762
|
-
input = input.replace(RDS2, '/')
|
|
763
|
-
} else if (input.match(RDS3)) {
|
|
764
|
-
input = input.replace(RDS3, '/')
|
|
765
|
-
output.pop()
|
|
766
|
-
} else if (input === '.' || input === '..') {
|
|
767
|
-
input = ''
|
|
768
|
-
} else {
|
|
769
|
-
const im = input.match(RDS5)
|
|
770
|
-
if (im) {
|
|
771
|
-
const s = im[0]
|
|
772
|
-
input = input.slice(s.length)
|
|
773
|
-
output.push(s)
|
|
774
|
-
} else {
|
|
775
|
-
throw new Error('Unexpected dot segment condition')
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
return output.join('')
|
|
780
|
-
}
|
|
781
|
-
|
|
782
|
-
function normalizeComponentEncoding (components, esc) {
|
|
783
|
-
const func = esc !== true ? escape : unescape
|
|
784
|
-
if (components.scheme !== undefined) {
|
|
785
|
-
components.scheme = func(components.scheme)
|
|
786
|
-
}
|
|
787
|
-
if (components.userinfo !== undefined) {
|
|
788
|
-
components.userinfo = func(components.userinfo)
|
|
789
|
-
}
|
|
790
|
-
if (components.host !== undefined) {
|
|
791
|
-
components.host = func(components.host)
|
|
792
|
-
}
|
|
793
|
-
if (components.path !== undefined) {
|
|
794
|
-
components.path = func(components.path)
|
|
795
|
-
}
|
|
796
|
-
if (components.query !== undefined) {
|
|
797
|
-
components.query = func(components.query)
|
|
798
|
-
}
|
|
799
|
-
if (components.fragment !== undefined) {
|
|
800
|
-
components.fragment = func(components.fragment)
|
|
801
|
-
}
|
|
802
|
-
return components
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
function recomposeAuthority (components) {
|
|
806
|
-
const uriTokens = []
|
|
807
|
-
|
|
808
|
-
if (components.userinfo !== undefined) {
|
|
809
|
-
uriTokens.push(components.userinfo)
|
|
810
|
-
uriTokens.push('@')
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
if (components.host !== undefined) {
|
|
814
|
-
let host = unescape(components.host)
|
|
815
|
-
const ipV4res = normalizeIPv4(host)
|
|
816
|
-
|
|
817
|
-
if (ipV4res.isIPV4) {
|
|
818
|
-
host = ipV4res.host
|
|
819
|
-
} else {
|
|
820
|
-
const ipV6res = normalizeIPv6(ipV4res.host)
|
|
821
|
-
if (ipV6res.isIPV6 === true) {
|
|
822
|
-
host = `[${ipV6res.escapedHost}]`
|
|
823
|
-
} else {
|
|
824
|
-
host = components.host
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
uriTokens.push(host)
|
|
828
|
-
}
|
|
829
|
-
|
|
830
|
-
if (typeof components.port === 'number' || typeof components.port === 'string') {
|
|
831
|
-
uriTokens.push(':')
|
|
832
|
-
uriTokens.push(String(components.port))
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
return uriTokens.length ? uriTokens.join('') : undefined
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
module.exports = {
|
|
839
|
-
recomposeAuthority,
|
|
840
|
-
normalizeComponentEncoding,
|
|
841
|
-
removeDotSegments,
|
|
842
|
-
normalizeIPv4,
|
|
843
|
-
normalizeIPv6,
|
|
844
|
-
stringArrayToHexStripped
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
/***/ }),
|
|
849
|
-
|
|
850
|
-
/***/ 25127:
|
|
851
|
-
/***/ ((module) => {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
var traverse = module.exports = function (schema, opts, cb) {
|
|
856
|
-
// Legacy support for v0.3.1 and earlier.
|
|
857
|
-
if (typeof opts == 'function') {
|
|
858
|
-
cb = opts;
|
|
859
|
-
opts = {};
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
cb = opts.cb || cb;
|
|
863
|
-
var pre = (typeof cb == 'function') ? cb : cb.pre || function() {};
|
|
864
|
-
var post = cb.post || function() {};
|
|
865
|
-
|
|
866
|
-
_traverse(opts, pre, post, schema, '', schema);
|
|
867
|
-
};
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
traverse.keywords = {
|
|
871
|
-
additionalItems: true,
|
|
872
|
-
items: true,
|
|
873
|
-
contains: true,
|
|
874
|
-
additionalProperties: true,
|
|
875
|
-
propertyNames: true,
|
|
876
|
-
not: true,
|
|
877
|
-
if: true,
|
|
878
|
-
then: true,
|
|
879
|
-
else: true
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
traverse.arrayKeywords = {
|
|
883
|
-
items: true,
|
|
884
|
-
allOf: true,
|
|
885
|
-
anyOf: true,
|
|
886
|
-
oneOf: true
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
traverse.propsKeywords = {
|
|
890
|
-
$defs: true,
|
|
891
|
-
definitions: true,
|
|
892
|
-
properties: true,
|
|
893
|
-
patternProperties: true,
|
|
894
|
-
dependencies: true
|
|
895
|
-
};
|
|
896
|
-
|
|
897
|
-
traverse.skipKeywords = {
|
|
898
|
-
default: true,
|
|
899
|
-
enum: true,
|
|
900
|
-
const: true,
|
|
901
|
-
required: true,
|
|
902
|
-
maximum: true,
|
|
903
|
-
minimum: true,
|
|
904
|
-
exclusiveMaximum: true,
|
|
905
|
-
exclusiveMinimum: true,
|
|
906
|
-
multipleOf: true,
|
|
907
|
-
maxLength: true,
|
|
908
|
-
minLength: true,
|
|
909
|
-
pattern: true,
|
|
910
|
-
format: true,
|
|
911
|
-
maxItems: true,
|
|
912
|
-
minItems: true,
|
|
913
|
-
uniqueItems: true,
|
|
914
|
-
maxProperties: true,
|
|
915
|
-
minProperties: true
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
function _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {
|
|
920
|
-
if (schema && typeof schema == 'object' && !Array.isArray(schema)) {
|
|
921
|
-
pre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
922
|
-
for (var key in schema) {
|
|
923
|
-
var sch = schema[key];
|
|
924
|
-
if (Array.isArray(sch)) {
|
|
925
|
-
if (key in traverse.arrayKeywords) {
|
|
926
|
-
for (var i=0; i<sch.length; i++)
|
|
927
|
-
_traverse(opts, pre, post, sch[i], jsonPtr + '/' + key + '/' + i, rootSchema, jsonPtr, key, schema, i);
|
|
928
|
-
}
|
|
929
|
-
} else if (key in traverse.propsKeywords) {
|
|
930
|
-
if (sch && typeof sch == 'object') {
|
|
931
|
-
for (var prop in sch)
|
|
932
|
-
_traverse(opts, pre, post, sch[prop], jsonPtr + '/' + key + '/' + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);
|
|
933
|
-
}
|
|
934
|
-
} else if (key in traverse.keywords || (opts.allKeys && !(key in traverse.skipKeywords))) {
|
|
935
|
-
_traverse(opts, pre, post, sch, jsonPtr + '/' + key, rootSchema, jsonPtr, key, schema);
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
post(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
function escapeJsonPtr(str) {
|
|
944
|
-
return str.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
/***/ })
|
|
949
|
-
|
|
950
|
-
}]);
|
|
951
|
-
//# sourceMappingURL=5448.a9016133a2b9389ac102.js.map?v=a9016133a2b9389ac102
|