Intial Commit
This commit is contained in:
59
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.d.ts
generated
vendored
Normal file
59
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
||||
1389
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.js
generated
vendored
Normal file
1389
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.js
generated
vendored
Normal file
@@ -0,0 +1,1389 @@
|
||||
/** @license URI.js v4.2.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global.URI = global.URI || {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
function merge() {
|
||||
for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
|
||||
sets[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
if (sets.length > 1) {
|
||||
sets[0] = sets[0].slice(0, -1);
|
||||
var xl = sets.length - 1;
|
||||
for (var x = 1; x < xl; ++x) {
|
||||
sets[x] = sets[x].slice(1, -1);
|
||||
}
|
||||
sets[xl] = sets[xl].slice(1);
|
||||
return sets.join('');
|
||||
} else {
|
||||
return sets[0];
|
||||
}
|
||||
}
|
||||
function subexp(str) {
|
||||
return "(?:" + str + ")";
|
||||
}
|
||||
function typeOf(o) {
|
||||
return o === undefined ? "undefined" : o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase();
|
||||
}
|
||||
function toUpperCase(str) {
|
||||
return str.toUpperCase();
|
||||
}
|
||||
function toArray(obj) {
|
||||
return obj !== undefined && obj !== null ? obj instanceof Array ? obj : typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj) : [];
|
||||
}
|
||||
function assign(target, source) {
|
||||
var obj = target;
|
||||
if (source) {
|
||||
for (var key in source) {
|
||||
obj[key] = source[key];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function buildExps(isIRI) {
|
||||
var ALPHA$$ = "[A-Za-z]",
|
||||
CR$ = "[\\x0D]",
|
||||
DIGIT$$ = "[0-9]",
|
||||
DQUOTE$$ = "[\\x22]",
|
||||
HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"),
|
||||
//case-insensitive
|
||||
LF$$ = "[\\x0A]",
|
||||
SP$$ = "[\\x20]",
|
||||
PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)),
|
||||
//expanded
|
||||
GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]",
|
||||
SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",
|
||||
RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$),
|
||||
UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]",
|
||||
//subset, excludes bidi control characters
|
||||
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]",
|
||||
//subset
|
||||
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$),
|
||||
SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"),
|
||||
USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"),
|
||||
DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$),
|
||||
DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$),
|
||||
//relaxed parsing rules
|
||||
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$),
|
||||
H16$ = subexp(HEXDIG$$ + "{1,4}"),
|
||||
LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$),
|
||||
IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$),
|
||||
// 6( h16 ":" ) ls32
|
||||
IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$),
|
||||
// "::" 5( h16 ":" ) ls32
|
||||
IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$),
|
||||
//[ h16 ] "::" 4( h16 ":" ) ls32
|
||||
IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$),
|
||||
//[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
|
||||
IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$),
|
||||
//[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
|
||||
IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$),
|
||||
//[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
|
||||
IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$),
|
||||
//[ *4( h16 ":" ) h16 ] "::" ls32
|
||||
IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$),
|
||||
//[ *5( h16 ":" ) h16 ] "::" h16
|
||||
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"),
|
||||
//[ *6( h16 ":" ) h16 ] "::"
|
||||
IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")),
|
||||
ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"),
|
||||
//RFC 6874
|
||||
IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$),
|
||||
//RFC 6874
|
||||
IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$),
|
||||
//RFC 6874, with relaxed parsing rules
|
||||
IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"),
|
||||
IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"),
|
||||
//RFC 6874
|
||||
REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"),
|
||||
HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$),
|
||||
PORT$ = subexp(DIGIT$$ + "*"),
|
||||
AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"),
|
||||
PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")),
|
||||
SEGMENT$ = subexp(PCHAR$ + "*"),
|
||||
SEGMENT_NZ$ = subexp(PCHAR$ + "+"),
|
||||
SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"),
|
||||
PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"),
|
||||
PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"),
|
||||
//simplified
|
||||
PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$),
|
||||
//simplified
|
||||
PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$),
|
||||
//simplified
|
||||
PATH_EMPTY$ = "(?!" + PCHAR$ + ")",
|
||||
PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
|
||||
QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"),
|
||||
FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"),
|
||||
HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$),
|
||||
URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
|
||||
RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$),
|
||||
RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"),
|
||||
URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$),
|
||||
ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"),
|
||||
GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
|
||||
RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
|
||||
ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$",
|
||||
SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$",
|
||||
AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
||||
return {
|
||||
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
||||
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
||||
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
||||
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
||||
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
||||
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
||||
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
||||
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
|
||||
};
|
||||
}
|
||||
var URI_PROTOCOL = buildExps(false);
|
||||
|
||||
var IRI_PROTOCOL = buildExps(true);
|
||||
|
||||
var slicedToArray = function () {
|
||||
function sliceIterator(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
|
||||
try {
|
||||
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
||||
_arr.push(_s.value);
|
||||
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i["return"]) _i["return"]();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
|
||||
return _arr;
|
||||
}
|
||||
|
||||
return function (arr, i) {
|
||||
if (Array.isArray(arr)) {
|
||||
return arr;
|
||||
} else if (Symbol.iterator in Object(arr)) {
|
||||
return sliceIterator(arr, i);
|
||||
} else {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
}
|
||||
};
|
||||
}();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var toConsumableArray = function (arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
||||
|
||||
return arr2;
|
||||
} else {
|
||||
return Array.from(arr);
|
||||
}
|
||||
};
|
||||
|
||||
/** Highest positive signed 32-bit float value */
|
||||
|
||||
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
|
||||
|
||||
/** Bootstring parameters */
|
||||
var base = 36;
|
||||
var tMin = 1;
|
||||
var tMax = 26;
|
||||
var skew = 38;
|
||||
var damp = 700;
|
||||
var initialBias = 72;
|
||||
var initialN = 128; // 0x80
|
||||
var delimiter = '-'; // '\x2D'
|
||||
|
||||
/** Regular expressions */
|
||||
var regexPunycode = /^xn--/;
|
||||
var regexNonASCII = /[^\0-\x7E]/; // non-ASCII chars
|
||||
var regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
||||
|
||||
/** Error messages */
|
||||
var errors = {
|
||||
'overflow': 'Overflow: input needs wider integers to process',
|
||||
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
||||
'invalid-input': 'Invalid input'
|
||||
};
|
||||
|
||||
/** Convenience shortcuts */
|
||||
var baseMinusTMin = base - tMin;
|
||||
var floor = Math.floor;
|
||||
var stringFromCharCode = String.fromCharCode;
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* A generic error utility function.
|
||||
* @private
|
||||
* @param {String} type The error type.
|
||||
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
||||
*/
|
||||
function error$1(type) {
|
||||
throw new RangeError(errors[type]);
|
||||
}
|
||||
|
||||
/**
|
||||
* A generic `Array#map` utility function.
|
||||
* @private
|
||||
* @param {Array} array The array to iterate over.
|
||||
* @param {Function} callback The function that gets called for every array
|
||||
* item.
|
||||
* @returns {Array} A new array of values returned by the callback function.
|
||||
*/
|
||||
function map(array, fn) {
|
||||
var result = [];
|
||||
var length = array.length;
|
||||
while (length--) {
|
||||
result[length] = fn(array[length]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A simple `Array#map`-like wrapper to work with domain name strings or email
|
||||
* addresses.
|
||||
* @private
|
||||
* @param {String} domain The domain name or email address.
|
||||
* @param {Function} callback The function that gets called for every
|
||||
* character.
|
||||
* @returns {Array} A new string of characters returned by the callback
|
||||
* function.
|
||||
*/
|
||||
function mapDomain(string, fn) {
|
||||
var parts = string.split('@');
|
||||
var result = '';
|
||||
if (parts.length > 1) {
|
||||
// In email addresses, only the domain name should be punycoded. Leave
|
||||
// the local part (i.e. everything up to `@`) intact.
|
||||
result = parts[0] + '@';
|
||||
string = parts[1];
|
||||
}
|
||||
// Avoid `split(regex)` for IE8 compatibility. See #17.
|
||||
string = string.replace(regexSeparators, '\x2E');
|
||||
var labels = string.split('.');
|
||||
var encoded = map(labels, fn).join('.');
|
||||
return result + encoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array containing the numeric code points of each Unicode
|
||||
* character in the string. While JavaScript uses UCS-2 internally,
|
||||
* this function will convert a pair of surrogate halves (each of which
|
||||
* UCS-2 exposes as separate characters) into a single code point,
|
||||
* matching UTF-16.
|
||||
* @see `punycode.ucs2.encode`
|
||||
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
||||
* @memberOf punycode.ucs2
|
||||
* @name decode
|
||||
* @param {String} string The Unicode input string (UCS-2).
|
||||
* @returns {Array} The new array of code points.
|
||||
*/
|
||||
function ucs2decode(string) {
|
||||
var output = [];
|
||||
var counter = 0;
|
||||
var length = string.length;
|
||||
while (counter < length) {
|
||||
var value = string.charCodeAt(counter++);
|
||||
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
||||
// It's a high surrogate, and there is a next character.
|
||||
var extra = string.charCodeAt(counter++);
|
||||
if ((extra & 0xFC00) == 0xDC00) {
|
||||
// Low surrogate.
|
||||
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
||||
} else {
|
||||
// It's an unmatched surrogate; only append this code unit, in case the
|
||||
// next code unit is the high surrogate of a surrogate pair.
|
||||
output.push(value);
|
||||
counter--;
|
||||
}
|
||||
} else {
|
||||
output.push(value);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a string based on an array of numeric code points.
|
||||
* @see `punycode.ucs2.decode`
|
||||
* @memberOf punycode.ucs2
|
||||
* @name encode
|
||||
* @param {Array} codePoints The array of numeric code points.
|
||||
* @returns {String} The new Unicode string (UCS-2).
|
||||
*/
|
||||
var ucs2encode = function ucs2encode(array) {
|
||||
return String.fromCodePoint.apply(String, toConsumableArray(array));
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a basic code point into a digit/integer.
|
||||
* @see `digitToBasic()`
|
||||
* @private
|
||||
* @param {Number} codePoint The basic numeric code point value.
|
||||
* @returns {Number} The numeric value of a basic code point (for use in
|
||||
* representing integers) in the range `0` to `base - 1`, or `base` if
|
||||
* the code point does not represent a value.
|
||||
*/
|
||||
var basicToDigit = function basicToDigit(codePoint) {
|
||||
if (codePoint - 0x30 < 0x0A) {
|
||||
return codePoint - 0x16;
|
||||
}
|
||||
if (codePoint - 0x41 < 0x1A) {
|
||||
return codePoint - 0x41;
|
||||
}
|
||||
if (codePoint - 0x61 < 0x1A) {
|
||||
return codePoint - 0x61;
|
||||
}
|
||||
return base;
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a digit/integer into a basic code point.
|
||||
* @see `basicToDigit()`
|
||||
* @private
|
||||
* @param {Number} digit The numeric value of a basic code point.
|
||||
* @returns {Number} The basic code point whose value (when used for
|
||||
* representing integers) is `digit`, which needs to be in the range
|
||||
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
||||
* used; else, the lowercase form is used. The behavior is undefined
|
||||
* if `flag` is non-zero and `digit` has no uppercase form.
|
||||
*/
|
||||
var digitToBasic = function digitToBasic(digit, flag) {
|
||||
// 0..25 map to ASCII a..z or A..Z
|
||||
// 26..35 map to ASCII 0..9
|
||||
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
||||
};
|
||||
|
||||
/**
|
||||
* Bias adaptation function as per section 3.4 of RFC 3492.
|
||||
* https://tools.ietf.org/html/rfc3492#section-3.4
|
||||
* @private
|
||||
*/
|
||||
var adapt = function adapt(delta, numPoints, firstTime) {
|
||||
var k = 0;
|
||||
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
||||
delta += floor(delta / numPoints);
|
||||
for (; /* no initialization */delta > baseMinusTMin * tMax >> 1; k += base) {
|
||||
delta = floor(delta / baseMinusTMin);
|
||||
}
|
||||
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
||||
* symbols.
|
||||
* @memberOf punycode
|
||||
* @param {String} input The Punycode string of ASCII-only symbols.
|
||||
* @returns {String} The resulting string of Unicode symbols.
|
||||
*/
|
||||
var decode = function decode(input) {
|
||||
// Don't use UCS-2.
|
||||
var output = [];
|
||||
var inputLength = input.length;
|
||||
var i = 0;
|
||||
var n = initialN;
|
||||
var bias = initialBias;
|
||||
|
||||
// Handle the basic code points: let `basic` be the number of input code
|
||||
// points before the last delimiter, or `0` if there is none, then copy
|
||||
// the first basic code points to the output.
|
||||
|
||||
var basic = input.lastIndexOf(delimiter);
|
||||
if (basic < 0) {
|
||||
basic = 0;
|
||||
}
|
||||
|
||||
for (var j = 0; j < basic; ++j) {
|
||||
// if it's not a basic code point
|
||||
if (input.charCodeAt(j) >= 0x80) {
|
||||
error$1('not-basic');
|
||||
}
|
||||
output.push(input.charCodeAt(j));
|
||||
}
|
||||
|
||||
// Main decoding loop: start just after the last delimiter if any basic code
|
||||
// points were copied; start at the beginning otherwise.
|
||||
|
||||
for (var index = basic > 0 ? basic + 1 : 0; index < inputLength;) /* no final expression */{
|
||||
|
||||
// `index` is the index of the next character to be consumed.
|
||||
// Decode a generalized variable-length integer into `delta`,
|
||||
// which gets added to `i`. The overflow checking is easier
|
||||
// if we increase `i` as we go, then subtract off its starting
|
||||
// value at the end to obtain `delta`.
|
||||
var oldi = i;
|
||||
for (var w = 1, k = base;; /* no condition */k += base) {
|
||||
|
||||
if (index >= inputLength) {
|
||||
error$1('invalid-input');
|
||||
}
|
||||
|
||||
var digit = basicToDigit(input.charCodeAt(index++));
|
||||
|
||||
if (digit >= base || digit > floor((maxInt - i) / w)) {
|
||||
error$1('overflow');
|
||||
}
|
||||
|
||||
i += digit * w;
|
||||
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
||||
|
||||
if (digit < t) {
|
||||
break;
|
||||
}
|
||||
|
||||
var baseMinusT = base - t;
|
||||
if (w > floor(maxInt / baseMinusT)) {
|
||||
error$1('overflow');
|
||||
}
|
||||
|
||||
w *= baseMinusT;
|
||||
}
|
||||
|
||||
var out = output.length + 1;
|
||||
bias = adapt(i - oldi, out, oldi == 0);
|
||||
|
||||
// `i` was supposed to wrap around from `out` to `0`,
|
||||
// incrementing `n` each time, so we'll fix that now:
|
||||
if (floor(i / out) > maxInt - n) {
|
||||
error$1('overflow');
|
||||
}
|
||||
|
||||
n += floor(i / out);
|
||||
i %= out;
|
||||
|
||||
// Insert `n` at position `i` of the output.
|
||||
output.splice(i++, 0, n);
|
||||
}
|
||||
|
||||
return String.fromCodePoint.apply(String, output);
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
||||
* Punycode string of ASCII-only symbols.
|
||||
* @memberOf punycode
|
||||
* @param {String} input The string of Unicode symbols.
|
||||
* @returns {String} The resulting Punycode string of ASCII-only symbols.
|
||||
*/
|
||||
var encode = function encode(input) {
|
||||
var output = [];
|
||||
|
||||
// Convert the input in UCS-2 to an array of Unicode code points.
|
||||
input = ucs2decode(input);
|
||||
|
||||
// Cache the length.
|
||||
var inputLength = input.length;
|
||||
|
||||
// Initialize the state.
|
||||
var n = initialN;
|
||||
var delta = 0;
|
||||
var bias = initialBias;
|
||||
|
||||
// Handle the basic code points.
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = input[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var _currentValue2 = _step.value;
|
||||
|
||||
if (_currentValue2 < 0x80) {
|
||||
output.push(stringFromCharCode(_currentValue2));
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var basicLength = output.length;
|
||||
var handledCPCount = basicLength;
|
||||
|
||||
// `handledCPCount` is the number of code points that have been handled;
|
||||
// `basicLength` is the number of basic code points.
|
||||
|
||||
// Finish the basic string with a delimiter unless it's empty.
|
||||
if (basicLength) {
|
||||
output.push(delimiter);
|
||||
}
|
||||
|
||||
// Main encoding loop:
|
||||
while (handledCPCount < inputLength) {
|
||||
|
||||
// All non-basic code points < n have been handled already. Find the next
|
||||
// larger one:
|
||||
var m = maxInt;
|
||||
var _iteratorNormalCompletion2 = true;
|
||||
var _didIteratorError2 = false;
|
||||
var _iteratorError2 = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
||||
var currentValue = _step2.value;
|
||||
|
||||
if (currentValue >= n && currentValue < m) {
|
||||
m = currentValue;
|
||||
}
|
||||
}
|
||||
|
||||
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
||||
// but guard against overflow.
|
||||
} catch (err) {
|
||||
_didIteratorError2 = true;
|
||||
_iteratorError2 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
||||
_iterator2.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError2) {
|
||||
throw _iteratorError2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var handledCPCountPlusOne = handledCPCount + 1;
|
||||
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
||||
error$1('overflow');
|
||||
}
|
||||
|
||||
delta += (m - n) * handledCPCountPlusOne;
|
||||
n = m;
|
||||
|
||||
var _iteratorNormalCompletion3 = true;
|
||||
var _didIteratorError3 = false;
|
||||
var _iteratorError3 = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator3 = input[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
||||
var _currentValue = _step3.value;
|
||||
|
||||
if (_currentValue < n && ++delta > maxInt) {
|
||||
error$1('overflow');
|
||||
}
|
||||
if (_currentValue == n) {
|
||||
// Represent delta as a generalized variable-length integer.
|
||||
var q = delta;
|
||||
for (var k = base;; /* no condition */k += base) {
|
||||
var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
|
||||
if (q < t) {
|
||||
break;
|
||||
}
|
||||
var qMinusT = q - t;
|
||||
var baseMinusT = base - t;
|
||||
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0)));
|
||||
q = floor(qMinusT / baseMinusT);
|
||||
}
|
||||
|
||||
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
||||
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
||||
delta = 0;
|
||||
++handledCPCount;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError3 = true;
|
||||
_iteratorError3 = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion3 && _iterator3.return) {
|
||||
_iterator3.return();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError3) {
|
||||
throw _iteratorError3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++delta;
|
||||
++n;
|
||||
}
|
||||
return output.join('');
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a Punycode string representing a domain name or an email address
|
||||
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
|
||||
* it doesn't matter if you call it on a string that has already been
|
||||
* converted to Unicode.
|
||||
* @memberOf punycode
|
||||
* @param {String} input The Punycoded domain name or email address to
|
||||
* convert to Unicode.
|
||||
* @returns {String} The Unicode representation of the given Punycode
|
||||
* string.
|
||||
*/
|
||||
var toUnicode = function toUnicode(input) {
|
||||
return mapDomain(input, function (string) {
|
||||
return regexPunycode.test(string) ? decode(string.slice(4).toLowerCase()) : string;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Converts a Unicode string representing a domain name or an email address to
|
||||
* Punycode. Only the non-ASCII parts of the domain name will be converted,
|
||||
* i.e. it doesn't matter if you call it with a domain that's already in
|
||||
* ASCII.
|
||||
* @memberOf punycode
|
||||
* @param {String} input The domain name or email address to convert, as a
|
||||
* Unicode string.
|
||||
* @returns {String} The Punycode representation of the given domain name or
|
||||
* email address.
|
||||
*/
|
||||
var toASCII = function toASCII(input) {
|
||||
return mapDomain(input, function (string) {
|
||||
return regexNonASCII.test(string) ? 'xn--' + encode(string) : string;
|
||||
});
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/** Define the public API */
|
||||
var punycode = {
|
||||
/**
|
||||
* A string representing the current Punycode.js version number.
|
||||
* @memberOf punycode
|
||||
* @type String
|
||||
*/
|
||||
'version': '2.1.0',
|
||||
/**
|
||||
* An object of methods to convert from JavaScript's internal character
|
||||
* representation (UCS-2) to Unicode code points, and back.
|
||||
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
||||
* @memberOf punycode
|
||||
* @type Object
|
||||
*/
|
||||
'ucs2': {
|
||||
'decode': ucs2decode,
|
||||
'encode': ucs2encode
|
||||
},
|
||||
'decode': decode,
|
||||
'encode': encode,
|
||||
'toASCII': toASCII,
|
||||
'toUnicode': toUnicode
|
||||
};
|
||||
|
||||
/**
|
||||
* URI.js
|
||||
*
|
||||
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
|
||||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
||||
* @see http://github.com/garycourt/uri-js
|
||||
*/
|
||||
/**
|
||||
* Copyright 2011 Gary Court. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of Gary Court.
|
||||
*/
|
||||
var SCHEMES = {};
|
||||
function pctEncChar(chr) {
|
||||
var c = chr.charCodeAt(0);
|
||||
var e = void 0;
|
||||
if (c < 16) e = "%0" + c.toString(16).toUpperCase();else if (c < 128) e = "%" + c.toString(16).toUpperCase();else if (c < 2048) e = "%" + (c >> 6 | 192).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();else e = "%" + (c >> 12 | 224).toString(16).toUpperCase() + "%" + (c >> 6 & 63 | 128).toString(16).toUpperCase() + "%" + (c & 63 | 128).toString(16).toUpperCase();
|
||||
return e;
|
||||
}
|
||||
function pctDecChars(str) {
|
||||
var newStr = "";
|
||||
var i = 0;
|
||||
var il = str.length;
|
||||
while (i < il) {
|
||||
var c = parseInt(str.substr(i + 1, 2), 16);
|
||||
if (c < 128) {
|
||||
newStr += String.fromCharCode(c);
|
||||
i += 3;
|
||||
} else if (c >= 194 && c < 224) {
|
||||
if (il - i >= 6) {
|
||||
var c2 = parseInt(str.substr(i + 4, 2), 16);
|
||||
newStr += String.fromCharCode((c & 31) << 6 | c2 & 63);
|
||||
} else {
|
||||
newStr += str.substr(i, 6);
|
||||
}
|
||||
i += 6;
|
||||
} else if (c >= 224) {
|
||||
if (il - i >= 9) {
|
||||
var _c = parseInt(str.substr(i + 4, 2), 16);
|
||||
var c3 = parseInt(str.substr(i + 7, 2), 16);
|
||||
newStr += String.fromCharCode((c & 15) << 12 | (_c & 63) << 6 | c3 & 63);
|
||||
} else {
|
||||
newStr += str.substr(i, 9);
|
||||
}
|
||||
i += 9;
|
||||
} else {
|
||||
newStr += str.substr(i, 3);
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
function _normalizeComponentEncoding(components, protocol) {
|
||||
function decodeUnreserved(str) {
|
||||
var decStr = pctDecChars(str);
|
||||
return !decStr.match(protocol.UNRESERVED) ? str : decStr;
|
||||
}
|
||||
if (components.scheme) components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
||||
if (components.userinfo !== undefined) components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.host !== undefined) components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.path !== undefined) components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.query !== undefined) components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.fragment !== undefined) components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
return components;
|
||||
}
|
||||
|
||||
function _stripLeadingZeros(str) {
|
||||
return str.replace(/^0*(.*)/, "$1") || "0";
|
||||
}
|
||||
function _normalizeIPv4(host, protocol) {
|
||||
var matches = host.match(protocol.IPV4ADDRESS) || [];
|
||||
|
||||
var _matches = slicedToArray(matches, 2),
|
||||
address = _matches[1];
|
||||
|
||||
if (address) {
|
||||
return address.split(".").map(_stripLeadingZeros).join(".");
|
||||
} else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
function _normalizeIPv6(host, protocol) {
|
||||
var matches = host.match(protocol.IPV6ADDRESS) || [];
|
||||
|
||||
var _matches2 = slicedToArray(matches, 3),
|
||||
address = _matches2[1],
|
||||
zone = _matches2[2];
|
||||
|
||||
if (address) {
|
||||
var _address$toLowerCase$ = address.toLowerCase().split('::').reverse(),
|
||||
_address$toLowerCase$2 = slicedToArray(_address$toLowerCase$, 2),
|
||||
last = _address$toLowerCase$2[0],
|
||||
first = _address$toLowerCase$2[1];
|
||||
|
||||
var firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
||||
var lastFields = last.split(":").map(_stripLeadingZeros);
|
||||
var isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
||||
var fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
||||
var lastFieldsStart = lastFields.length - fieldCount;
|
||||
var fields = Array(fieldCount);
|
||||
for (var x = 0; x < fieldCount; ++x) {
|
||||
fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
|
||||
}
|
||||
if (isLastFieldIPv4Address) {
|
||||
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
||||
}
|
||||
var allZeroFields = fields.reduce(function (acc, field, index) {
|
||||
if (!field || field === "0") {
|
||||
var lastLongest = acc[acc.length - 1];
|
||||
if (lastLongest && lastLongest.index + lastLongest.length === index) {
|
||||
lastLongest.length++;
|
||||
} else {
|
||||
acc.push({ index: index, length: 1 });
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
var longestZeroFields = allZeroFields.sort(function (a, b) {
|
||||
return b.length - a.length;
|
||||
})[0];
|
||||
var newHost = void 0;
|
||||
if (longestZeroFields && longestZeroFields.length > 1) {
|
||||
var newFirst = fields.slice(0, longestZeroFields.index);
|
||||
var newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
||||
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
||||
} else {
|
||||
newHost = fields.join(":");
|
||||
}
|
||||
if (zone) {
|
||||
newHost += "%" + zone;
|
||||
}
|
||||
return newHost;
|
||||
} else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
var URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
|
||||
var NO_MATCH_IS_UNDEFINED = "".match(/(){0}/)[1] === undefined;
|
||||
function parse(uriString) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
var components = {};
|
||||
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
||||
if (options.reference === "suffix") uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
|
||||
var matches = uriString.match(URI_PARSE);
|
||||
if (matches) {
|
||||
if (NO_MATCH_IS_UNDEFINED) {
|
||||
//store each component
|
||||
components.scheme = matches[1];
|
||||
components.userinfo = matches[3];
|
||||
components.host = matches[4];
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = matches[7];
|
||||
components.fragment = matches[8];
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = matches[5];
|
||||
}
|
||||
} else {
|
||||
//IE FIX for improper RegExp matching
|
||||
//store each component
|
||||
components.scheme = matches[1] || undefined;
|
||||
components.userinfo = uriString.indexOf("@") !== -1 ? matches[3] : undefined;
|
||||
components.host = uriString.indexOf("//") !== -1 ? matches[4] : undefined;
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = uriString.indexOf("?") !== -1 ? matches[7] : undefined;
|
||||
components.fragment = uriString.indexOf("#") !== -1 ? matches[8] : undefined;
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined;
|
||||
}
|
||||
}
|
||||
if (components.host) {
|
||||
//normalize IP hosts
|
||||
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
||||
}
|
||||
//determine reference type
|
||||
if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
|
||||
components.reference = "same-document";
|
||||
} else if (components.scheme === undefined) {
|
||||
components.reference = "relative";
|
||||
} else if (components.fragment === undefined) {
|
||||
components.reference = "absolute";
|
||||
} else {
|
||||
components.reference = "uri";
|
||||
}
|
||||
//check for reference errors
|
||||
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
||||
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
||||
}
|
||||
//find scheme handler
|
||||
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//check if scheme can't handle IRIs
|
||||
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
||||
//if host component is a domain name
|
||||
if (components.host && (options.domainHost || schemeHandler && schemeHandler.domainHost)) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
||||
} catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
}
|
||||
//convert IRI -> URI
|
||||
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
||||
} else {
|
||||
//normalize encodings
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
}
|
||||
//perform scheme specific parsing
|
||||
if (schemeHandler && schemeHandler.parse) {
|
||||
schemeHandler.parse(components, options);
|
||||
}
|
||||
} else {
|
||||
components.error = components.error || "URI can not be parsed.";
|
||||
}
|
||||
return components;
|
||||
}
|
||||
|
||||
function _recomposeAuthority(components, options) {
|
||||
var protocol = options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL;
|
||||
var uriTokens = [];
|
||||
if (components.userinfo !== undefined) {
|
||||
uriTokens.push(components.userinfo);
|
||||
uriTokens.push("@");
|
||||
}
|
||||
if (components.host !== undefined) {
|
||||
//normalize IP hosts, add brackets and escape zone separator for IPv6
|
||||
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, function (_, $1, $2) {
|
||||
return "[" + $1 + ($2 ? "%25" + $2 : "") + "]";
|
||||
}));
|
||||
}
|
||||
if (typeof components.port === "number") {
|
||||
uriTokens.push(":");
|
||||
uriTokens.push(components.port.toString(10));
|
||||
}
|
||||
return uriTokens.length ? uriTokens.join("") : undefined;
|
||||
}
|
||||
|
||||
var RDS1 = /^\.\.?\//;
|
||||
var RDS2 = /^\/\.(\/|$)/;
|
||||
var RDS3 = /^\/\.\.(\/|$)/;
|
||||
var RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
||||
function removeDotSegments(input) {
|
||||
var output = [];
|
||||
while (input.length) {
|
||||
if (input.match(RDS1)) {
|
||||
input = input.replace(RDS1, "");
|
||||
} else if (input.match(RDS2)) {
|
||||
input = input.replace(RDS2, "/");
|
||||
} else if (input.match(RDS3)) {
|
||||
input = input.replace(RDS3, "/");
|
||||
output.pop();
|
||||
} else if (input === "." || input === "..") {
|
||||
input = "";
|
||||
} else {
|
||||
var im = input.match(RDS5);
|
||||
if (im) {
|
||||
var s = im[0];
|
||||
input = input.slice(s.length);
|
||||
output.push(s);
|
||||
} else {
|
||||
throw new Error("Unexpected dot segment condition");
|
||||
}
|
||||
}
|
||||
}
|
||||
return output.join("");
|
||||
}
|
||||
|
||||
function serialize(components) {
|
||||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
||||
|
||||
var protocol = options.iri ? IRI_PROTOCOL : URI_PROTOCOL;
|
||||
var uriTokens = [];
|
||||
//find scheme handler
|
||||
var schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//perform scheme specific serialization
|
||||
if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(components, options);
|
||||
if (components.host) {
|
||||
//if host component is an IPv6 address
|
||||
if (protocol.IPV6ADDRESS.test(components.host)) {}
|
||||
//TODO: normalize IPv6 address as per RFC 5952
|
||||
|
||||
//if host component is a domain name
|
||||
else if (options.domainHost || schemeHandler && schemeHandler.domainHost) {
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
components.host = !options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host);
|
||||
} catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
}
|
||||
}
|
||||
//normalize encoding
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
if (options.reference !== "suffix" && components.scheme) {
|
||||
uriTokens.push(components.scheme);
|
||||
uriTokens.push(":");
|
||||
}
|
||||
var authority = _recomposeAuthority(components, options);
|
||||
if (authority !== undefined) {
|
||||
if (options.reference !== "suffix") {
|
||||
uriTokens.push("//");
|
||||
}
|
||||
uriTokens.push(authority);
|
||||
if (components.path && components.path.charAt(0) !== "/") {
|
||||
uriTokens.push("/");
|
||||
}
|
||||
}
|
||||
if (components.path !== undefined) {
|
||||
var s = components.path;
|
||||
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
||||
s = removeDotSegments(s);
|
||||
}
|
||||
if (authority === undefined) {
|
||||
s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
|
||||
}
|
||||
uriTokens.push(s);
|
||||
}
|
||||
if (components.query !== undefined) {
|
||||
uriTokens.push("?");
|
||||
uriTokens.push(components.query);
|
||||
}
|
||||
if (components.fragment !== undefined) {
|
||||
uriTokens.push("#");
|
||||
uriTokens.push(components.fragment);
|
||||
}
|
||||
return uriTokens.join(""); //merge tokens into a string
|
||||
}
|
||||
|
||||
function resolveComponents(base, relative) {
|
||||
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
||||
var skipNormalization = arguments[3];
|
||||
|
||||
var target = {};
|
||||
if (!skipNormalization) {
|
||||
base = parse(serialize(base, options), options); //normalize base components
|
||||
relative = parse(serialize(relative, options), options); //normalize relative components
|
||||
}
|
||||
options = options || {};
|
||||
if (!options.tolerant && relative.scheme) {
|
||||
target.scheme = relative.scheme;
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
} else {
|
||||
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
} else {
|
||||
if (!relative.path) {
|
||||
target.path = base.path;
|
||||
if (relative.query !== undefined) {
|
||||
target.query = relative.query;
|
||||
} else {
|
||||
target.query = base.query;
|
||||
}
|
||||
} else {
|
||||
if (relative.path.charAt(0) === "/") {
|
||||
target.path = removeDotSegments(relative.path);
|
||||
} else {
|
||||
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
||||
target.path = "/" + relative.path;
|
||||
} else if (!base.path) {
|
||||
target.path = relative.path;
|
||||
} else {
|
||||
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
||||
}
|
||||
target.path = removeDotSegments(target.path);
|
||||
}
|
||||
target.query = relative.query;
|
||||
}
|
||||
//target.authority = base.authority;
|
||||
target.userinfo = base.userinfo;
|
||||
target.host = base.host;
|
||||
target.port = base.port;
|
||||
}
|
||||
target.scheme = base.scheme;
|
||||
}
|
||||
target.fragment = relative.fragment;
|
||||
return target;
|
||||
}
|
||||
|
||||
function resolve(baseURI, relativeURI, options) {
|
||||
var schemelessOptions = assign({ scheme: 'null' }, options);
|
||||
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
||||
}
|
||||
|
||||
function normalize(uri, options) {
|
||||
if (typeof uri === "string") {
|
||||
uri = serialize(parse(uri, options), options);
|
||||
} else if (typeOf(uri) === "object") {
|
||||
uri = parse(serialize(uri, options), options);
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
|
||||
function equal(uriA, uriB, options) {
|
||||
if (typeof uriA === "string") {
|
||||
uriA = serialize(parse(uriA, options), options);
|
||||
} else if (typeOf(uriA) === "object") {
|
||||
uriA = serialize(uriA, options);
|
||||
}
|
||||
if (typeof uriB === "string") {
|
||||
uriB = serialize(parse(uriB, options), options);
|
||||
} else if (typeOf(uriB) === "object") {
|
||||
uriB = serialize(uriB, options);
|
||||
}
|
||||
return uriA === uriB;
|
||||
}
|
||||
|
||||
function escapeComponent(str, options) {
|
||||
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE, pctEncChar);
|
||||
}
|
||||
|
||||
function unescapeComponent(str, options) {
|
||||
return str && str.toString().replace(!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED, pctDecChars);
|
||||
}
|
||||
|
||||
var handler = {
|
||||
scheme: "http",
|
||||
domainHost: true,
|
||||
parse: function parse(components, options) {
|
||||
//report missing host
|
||||
if (!components.host) {
|
||||
components.error = components.error || "HTTP URIs must have a host.";
|
||||
}
|
||||
return components;
|
||||
},
|
||||
serialize: function serialize(components, options) {
|
||||
//normalize the default port
|
||||
if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") {
|
||||
components.port = undefined;
|
||||
}
|
||||
//normalize the empty path
|
||||
if (!components.path) {
|
||||
components.path = "/";
|
||||
}
|
||||
//NOTE: We do not parse query strings for HTTP URIs
|
||||
//as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
||||
//and not the HTTP spec.
|
||||
return components;
|
||||
}
|
||||
};
|
||||
|
||||
var handler$1 = {
|
||||
scheme: "https",
|
||||
domainHost: handler.domainHost,
|
||||
parse: handler.parse,
|
||||
serialize: handler.serialize
|
||||
};
|
||||
|
||||
var O = {};
|
||||
var isIRI = true;
|
||||
//RFC 3986
|
||||
var UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
|
||||
var HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
||||
var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
||||
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
||||
//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
|
||||
//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
|
||||
//const VCHAR$$ = "[\\x21-\\x7E]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
|
||||
//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
|
||||
//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
|
||||
//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
|
||||
var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
||||
var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
||||
var VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
|
||||
var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
||||
var UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
||||
var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
||||
var NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
||||
var NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
||||
var NOT_HFVALUE = NOT_HFNAME;
|
||||
function decodeUnreserved(str) {
|
||||
var decStr = pctDecChars(str);
|
||||
return !decStr.match(UNRESERVED) ? str : decStr;
|
||||
}
|
||||
var handler$2 = {
|
||||
scheme: "mailto",
|
||||
parse: function parse$$1(components, options) {
|
||||
var mailtoComponents = components;
|
||||
var to = mailtoComponents.to = mailtoComponents.path ? mailtoComponents.path.split(",") : [];
|
||||
mailtoComponents.path = undefined;
|
||||
if (mailtoComponents.query) {
|
||||
var unknownHeaders = false;
|
||||
var headers = {};
|
||||
var hfields = mailtoComponents.query.split("&");
|
||||
for (var x = 0, xl = hfields.length; x < xl; ++x) {
|
||||
var hfield = hfields[x].split("=");
|
||||
switch (hfield[0]) {
|
||||
case "to":
|
||||
var toAddrs = hfield[1].split(",");
|
||||
for (var _x = 0, _xl = toAddrs.length; _x < _xl; ++_x) {
|
||||
to.push(toAddrs[_x]);
|
||||
}
|
||||
break;
|
||||
case "subject":
|
||||
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
case "body":
|
||||
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
default:
|
||||
unknownHeaders = true;
|
||||
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (unknownHeaders) mailtoComponents.headers = headers;
|
||||
}
|
||||
mailtoComponents.query = undefined;
|
||||
for (var _x2 = 0, _xl2 = to.length; _x2 < _xl2; ++_x2) {
|
||||
var addr = to[_x2].split("@");
|
||||
addr[0] = unescapeComponent(addr[0]);
|
||||
if (!options.unicodeSupport) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
||||
} catch (e) {
|
||||
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
} else {
|
||||
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
||||
}
|
||||
to[_x2] = addr.join("@");
|
||||
}
|
||||
return mailtoComponents;
|
||||
},
|
||||
serialize: function serialize$$1(mailtoComponents, options) {
|
||||
var components = mailtoComponents;
|
||||
var to = toArray(mailtoComponents.to);
|
||||
if (to) {
|
||||
for (var x = 0, xl = to.length; x < xl; ++x) {
|
||||
var toAddr = String(to[x]);
|
||||
var atIdx = toAddr.lastIndexOf("@");
|
||||
var localPart = toAddr.slice(0, atIdx).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
||||
var domain = toAddr.slice(atIdx + 1);
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
domain = !options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain);
|
||||
} catch (e) {
|
||||
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
to[x] = localPart + "@" + domain;
|
||||
}
|
||||
components.path = to.join(",");
|
||||
}
|
||||
var headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
||||
if (mailtoComponents.subject) headers["subject"] = mailtoComponents.subject;
|
||||
if (mailtoComponents.body) headers["body"] = mailtoComponents.body;
|
||||
var fields = [];
|
||||
for (var name in headers) {
|
||||
if (headers[name] !== O[name]) {
|
||||
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) + "=" + headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
||||
}
|
||||
}
|
||||
if (fields.length) {
|
||||
components.query = fields.join("&");
|
||||
}
|
||||
return components;
|
||||
}
|
||||
};
|
||||
|
||||
var URN_PARSE = /^([^\:]+)\:(.*)/;
|
||||
//RFC 2141
|
||||
var handler$3 = {
|
||||
scheme: "urn",
|
||||
parse: function parse$$1(components, options) {
|
||||
var matches = components.path && components.path.match(URN_PARSE);
|
||||
var urnComponents = components;
|
||||
if (matches) {
|
||||
var scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
var nid = matches[1].toLowerCase();
|
||||
var nss = matches[2];
|
||||
var urnScheme = scheme + ":" + (options.nid || nid);
|
||||
var schemeHandler = SCHEMES[urnScheme];
|
||||
urnComponents.nid = nid;
|
||||
urnComponents.nss = nss;
|
||||
urnComponents.path = undefined;
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.parse(urnComponents, options);
|
||||
}
|
||||
} else {
|
||||
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
||||
}
|
||||
return urnComponents;
|
||||
},
|
||||
serialize: function serialize$$1(urnComponents, options) {
|
||||
var scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
var nid = urnComponents.nid;
|
||||
var urnScheme = scheme + ":" + (options.nid || nid);
|
||||
var schemeHandler = SCHEMES[urnScheme];
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.serialize(urnComponents, options);
|
||||
}
|
||||
var uriComponents = urnComponents;
|
||||
var nss = urnComponents.nss;
|
||||
uriComponents.path = (nid || options.nid) + ":" + nss;
|
||||
return uriComponents;
|
||||
}
|
||||
};
|
||||
|
||||
var UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
||||
//RFC 4122
|
||||
var handler$4 = {
|
||||
scheme: "urn:uuid",
|
||||
parse: function parse(urnComponents, options) {
|
||||
var uuidComponents = urnComponents;
|
||||
uuidComponents.uuid = uuidComponents.nss;
|
||||
uuidComponents.nss = undefined;
|
||||
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
||||
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
||||
}
|
||||
return uuidComponents;
|
||||
},
|
||||
serialize: function serialize(uuidComponents, options) {
|
||||
var urnComponents = uuidComponents;
|
||||
//normalize UUID
|
||||
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
||||
return urnComponents;
|
||||
}
|
||||
};
|
||||
|
||||
SCHEMES[handler.scheme] = handler;
|
||||
SCHEMES[handler$1.scheme] = handler$1;
|
||||
SCHEMES[handler$2.scheme] = handler$2;
|
||||
SCHEMES[handler$3.scheme] = handler$3;
|
||||
SCHEMES[handler$4.scheme] = handler$4;
|
||||
|
||||
exports.SCHEMES = SCHEMES;
|
||||
exports.pctEncChar = pctEncChar;
|
||||
exports.pctDecChars = pctDecChars;
|
||||
exports.parse = parse;
|
||||
exports.removeDotSegments = removeDotSegments;
|
||||
exports.serialize = serialize;
|
||||
exports.resolveComponents = resolveComponents;
|
||||
exports.resolve = resolve;
|
||||
exports.normalize = normalize;
|
||||
exports.equal = equal;
|
||||
exports.escapeComponent = escapeComponent;
|
||||
exports.unescapeComponent = unescapeComponent;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=uri.all.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
59
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.d.ts
generated
vendored
Normal file
59
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
||||
3
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.js
generated
vendored
Normal file
3
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/es5/uri.all.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.d.ts
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./uri";
|
||||
13
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.js
generated
vendored
Normal file
13
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { SCHEMES } from "./uri";
|
||||
import http from "./schemes/http";
|
||||
SCHEMES[http.scheme] = http;
|
||||
import https from "./schemes/https";
|
||||
SCHEMES[https.scheme] = https;
|
||||
import mailto from "./schemes/mailto";
|
||||
SCHEMES[mailto.scheme] = mailto;
|
||||
import urn from "./schemes/urn";
|
||||
SCHEMES[urn.scheme] = urn;
|
||||
import uuid from "./schemes/urn-uuid";
|
||||
SCHEMES[uuid.scheme] = uuid;
|
||||
export * from "./uri";
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAClC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAC;AACpC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;AAE9B,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAEhC,OAAO,GAAG,MAAM,eAAe,CAAC;AAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;AAE1B,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AAE5B,cAAc,OAAO,CAAC"}
|
||||
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.d.ts
generated
vendored
Normal file
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URIRegExps } from "./uri";
|
||||
declare const _default: URIRegExps;
|
||||
export default _default;
|
||||
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.js
generated
vendored
Normal file
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { buildExps } from "./regexps-uri";
|
||||
export default buildExps(true);
|
||||
//# sourceMappingURL=regexps-iri.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-iri.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"regexps-iri.js","sourceRoot":"","sources":["../../src/regexps-iri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"}
|
||||
4
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.d.ts
generated
vendored
Normal file
4
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { URIRegExps } from "./uri";
|
||||
export declare function buildExps(isIRI: boolean): URIRegExps;
|
||||
declare const _default: URIRegExps;
|
||||
export default _default;
|
||||
42
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.js
generated
vendored
Normal file
42
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
import { merge, subexp } from "./util";
|
||||
export function buildExps(isIRI) {
|
||||
const ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$ = merge(DIGIT$$, "[A-Fa-f]"), //case-insensitive
|
||||
LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)), //expanded
|
||||
GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", //subset, excludes bidi control characters
|
||||
IPRIVATE$$ = isIRI ? "[\\uE000-\\uF8FF]" : "[]", //subset
|
||||
UNRESERVED$$ = merge(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), //relaxed parsing rules
|
||||
IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$ + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), // 6( h16 ":" ) ls32
|
||||
IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), // "::" 5( h16 ":" ) ls32
|
||||
IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), //[ h16 ] "::" 4( h16 ":" ) ls32
|
||||
IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), //[ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
|
||||
IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), //[ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
|
||||
IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), //[ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
|
||||
IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), //[ *4( h16 ":" ) h16 ] "::" ls32
|
||||
IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), //[ *5( h16 ":" ) h16 ] "::" h16
|
||||
IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), //[ *6( h16 ":" ) h16 ] "::"
|
||||
IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$ + "|" + PCT_ENCODED$) + "+"), //RFC 6874
|
||||
IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), //RFC 6874
|
||||
IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + ZONEID$), //RFC 6874, with relaxed parsing rules
|
||||
IPVFUTURE$ = subexp("[vV]" + HEXDIG$$ + "+\\." + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), //RFC 6874
|
||||
REG_NAME$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")" + "|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$ + "|" + merge(UNRESERVED$$, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), //simplified
|
||||
PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), //simplified
|
||||
PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), //simplified
|
||||
PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
|
||||
return {
|
||||
NOT_SCHEME: new RegExp(merge("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
|
||||
NOT_USERINFO: new RegExp(merge("[^\\%\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_HOST: new RegExp(merge("[^\\%\\[\\]\\:]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH: new RegExp(merge("[^\\%\\/\\:\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_PATH_NOSCHEME: new RegExp(merge("[^\\%\\/\\@]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
NOT_QUERY: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
|
||||
NOT_FRAGMENT: new RegExp(merge("[^\\%]", UNRESERVED$$, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
|
||||
ESCAPE: new RegExp(merge("[^]", UNRESERVED$$, SUB_DELIMS$$), "g"),
|
||||
UNRESERVED: new RegExp(UNRESERVED$$, "g"),
|
||||
OTHER_CHARS: new RegExp(merge("[^\\%]", UNRESERVED$$, RESERVED$$), "g"),
|
||||
PCT_ENCODED: new RegExp(PCT_ENCODED$, "g"),
|
||||
IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
|
||||
IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$ + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$") //RFC 6874, with relaxed parsing rules
|
||||
};
|
||||
}
|
||||
export default buildExps(false);
|
||||
//# sourceMappingURL=regexps-uri.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/regexps-uri.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"regexps-uri.js","sourceRoot":"","sources":["../../src/regexps-uri.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,oBAAoB,KAAa;IACtC,MACC,OAAO,GAAG,UAAU,EACpB,GAAG,GAAG,SAAS,EACf,OAAO,GAAG,OAAO,EACjB,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,UAAU,CAAC,EAAG,kBAAkB;IAC1D,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,SAAS,EAChB,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,GAAG,QAAQ,GAAG,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,MAAM,CAAC,GAAG,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,EAAG,UAAU;IACvO,YAAY,GAAG,yBAAyB,EACxC,YAAY,GAAG,qCAAqC,EACpD,UAAU,GAAG,KAAK,CAAC,YAAY,EAAE,YAAY,CAAC,EAC9C,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,6EAA6E,CAAC,CAAC,CAAC,IAAI,EAAG,0CAA0C;IACrJ,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,EAA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G,IAAI,MAAM,CAAC,QAAQ,GAAG,YAAY,GAAG,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAE,sCAAsC;KACrL,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"}
|
||||
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.d.ts
generated
vendored
Normal file
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URISchemeHandler } from "../uri";
|
||||
declare const handler: URISchemeHandler;
|
||||
export default handler;
|
||||
27
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.js
generated
vendored
Normal file
27
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
const handler = {
|
||||
scheme: "http",
|
||||
domainHost: true,
|
||||
parse: function (components, options) {
|
||||
//report missing host
|
||||
if (!components.host) {
|
||||
components.error = components.error || "HTTP URIs must have a host.";
|
||||
}
|
||||
return components;
|
||||
},
|
||||
serialize: function (components, options) {
|
||||
//normalize the default port
|
||||
if (components.port === (String(components.scheme).toLowerCase() !== "https" ? 80 : 443) || components.port === "") {
|
||||
components.port = undefined;
|
||||
}
|
||||
//normalize the empty path
|
||||
if (!components.path) {
|
||||
components.path = "/";
|
||||
}
|
||||
//NOTE: We do not parse query strings for HTTP URIs
|
||||
//as WWW Form Url Encoded query strings are part of the HTML4+ spec,
|
||||
//and not the HTTP spec.
|
||||
return components;
|
||||
}
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=http.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/http.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../../src/schemes/http.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,MAAM;IAEf,UAAU,EAAG,IAAI;IAEjB,KAAK,EAAG,UAAU,UAAwB,EAAE,OAAkB;QAC7D,qBAAqB;QACrB,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,6BAA6B,CAAC;SACrE;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;IAED,SAAS,EAAG,UAAU,UAAwB,EAAE,OAAkB;QACjE,4BAA4B;QAC5B,IAAI,UAAU,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,KAAK,EAAE,EAAE;YACnH,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC;SAC5B;QAED,0BAA0B;QAC1B,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;YACrB,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC;SACtB;QAED,mDAAmD;QACnD,oEAAoE;QACpE,wBAAwB;QAExB,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
||||
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.d.ts
generated
vendored
Normal file
3
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { URISchemeHandler } from "../uri";
|
||||
declare const handler: URISchemeHandler;
|
||||
export default handler;
|
||||
9
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.js
generated
vendored
Normal file
9
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import http from "./http";
|
||||
const handler = {
|
||||
scheme: "https",
|
||||
domainHost: http.domainHost,
|
||||
parse: http.parse,
|
||||
serialize: http.serialize
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=https.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/https.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"https.js","sourceRoot":"","sources":["../../../src/schemes/https.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAoB;IAChC,MAAM,EAAG,OAAO;IAChB,UAAU,EAAG,IAAI,CAAC,UAAU;IAC5B,KAAK,EAAG,IAAI,CAAC,KAAK;IAClB,SAAS,EAAG,IAAI,CAAC,SAAS;CAC1B,CAAA;AAED,eAAe,OAAO,CAAC"}
|
||||
12
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
generated
vendored
Normal file
12
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { URISchemeHandler, URIComponents } from "../uri";
|
||||
export interface MailtoHeaders {
|
||||
[hfname: string]: string;
|
||||
}
|
||||
export interface MailtoComponents extends URIComponents {
|
||||
to: Array<string>;
|
||||
headers?: MailtoHeaders;
|
||||
subject?: string;
|
||||
body?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<MailtoComponents>;
|
||||
export default handler;
|
||||
148
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.js
generated
vendored
Normal file
148
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.js
generated
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
import { pctEncChar, pctDecChars, unescapeComponent } from "../uri";
|
||||
import punycode from "punycode";
|
||||
import { merge, subexp, toUpperCase, toArray } from "../util";
|
||||
const O = {};
|
||||
const isIRI = true;
|
||||
//RFC 3986
|
||||
const UNRESERVED$$ = "[A-Za-z0-9\\-\\.\\_\\~" + (isIRI ? "\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF" : "") + "]";
|
||||
const HEXDIG$$ = "[0-9A-Fa-f]"; //case-insensitive
|
||||
const PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$)); //expanded
|
||||
//RFC 5322, except these symbols as per RFC 6068: @ : / ? # [ ] & ; =
|
||||
//const ATEXT$$ = "[A-Za-z0-9\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\_\\`\\{\\|\\}\\~]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QTEXT$$ = "[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]"; //(%d1-8 / %d11-12 / %d14-31 / %d127)
|
||||
//const QTEXT$$ = merge("[\\x21\\x23-\\x5B\\x5D-\\x7E]", OBS_QTEXT$$); //%d33 / %d35-91 / %d93-126 / obs-qtext
|
||||
//const VCHAR$$ = "[\\x21-\\x7E]";
|
||||
//const WSP$$ = "[\\x20\\x09]";
|
||||
//const OBS_QP$ = subexp("\\\\" + merge("[\\x00\\x0D\\x0A]", OBS_QTEXT$$)); //%d0 / CR / LF / obs-qtext
|
||||
//const FWS$ = subexp(subexp(WSP$$ + "*" + "\\x0D\\x0A") + "?" + WSP$$ + "+");
|
||||
//const QUOTED_PAIR$ = subexp(subexp("\\\\" + subexp(VCHAR$$ + "|" + WSP$$)) + "|" + OBS_QP$);
|
||||
//const QUOTED_STRING$ = subexp('\\"' + subexp(FWS$ + "?" + QCONTENT$) + "*" + FWS$ + "?" + '\\"');
|
||||
const ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
|
||||
const QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
|
||||
const VCHAR$$ = merge(QTEXT$$, "[\\\"\\\\]");
|
||||
const DOT_ATOM_TEXT$ = subexp(ATEXT$$ + "+" + subexp("\\." + ATEXT$$ + "+") + "*");
|
||||
const QUOTED_PAIR$ = subexp("\\\\" + VCHAR$$);
|
||||
const QCONTENT$ = subexp(QTEXT$$ + "|" + QUOTED_PAIR$);
|
||||
const QUOTED_STRING$ = subexp('\\"' + QCONTENT$ + "*" + '\\"');
|
||||
//RFC 6068
|
||||
const DTEXT_NO_OBS$$ = "[\\x21-\\x5A\\x5E-\\x7E]"; //%d33-90 / %d94-126
|
||||
const SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
|
||||
const QCHAR$ = subexp(UNRESERVED$$ + "|" + PCT_ENCODED$ + "|" + SOME_DELIMS$$);
|
||||
const DOMAIN$ = subexp(DOT_ATOM_TEXT$ + "|" + "\\[" + DTEXT_NO_OBS$$ + "*" + "\\]");
|
||||
const LOCAL_PART$ = subexp(DOT_ATOM_TEXT$ + "|" + QUOTED_STRING$);
|
||||
const ADDR_SPEC$ = subexp(LOCAL_PART$ + "\\@" + DOMAIN$);
|
||||
const TO$ = subexp(ADDR_SPEC$ + subexp("\\," + ADDR_SPEC$) + "*");
|
||||
const HFNAME$ = subexp(QCHAR$ + "*");
|
||||
const HFVALUE$ = HFNAME$;
|
||||
const HFIELD$ = subexp(HFNAME$ + "\\=" + HFVALUE$);
|
||||
const HFIELDS2$ = subexp(HFIELD$ + subexp("\\&" + HFIELD$) + "*");
|
||||
const HFIELDS$ = subexp("\\?" + HFIELDS2$);
|
||||
const MAILTO_URI = new RegExp("^mailto\\:" + TO$ + "?" + HFIELDS$ + "?$");
|
||||
const UNRESERVED = new RegExp(UNRESERVED$$, "g");
|
||||
const PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
|
||||
const NOT_LOCAL_PART = new RegExp(merge("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
|
||||
const NOT_DOMAIN = new RegExp(merge("[^]", ATEXT$$, "[\\.]", "[\\[]", DTEXT_NO_OBS$$, "[\\]]"), "g");
|
||||
const NOT_HFNAME = new RegExp(merge("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
|
||||
const NOT_HFVALUE = NOT_HFNAME;
|
||||
const TO = new RegExp("^" + TO$ + "$");
|
||||
const HFIELDS = new RegExp("^" + HFIELDS2$ + "$");
|
||||
function decodeUnreserved(str) {
|
||||
const decStr = pctDecChars(str);
|
||||
return (!decStr.match(UNRESERVED) ? str : decStr);
|
||||
}
|
||||
const handler = {
|
||||
scheme: "mailto",
|
||||
parse: function (components, options) {
|
||||
const mailtoComponents = components;
|
||||
const to = mailtoComponents.to = (mailtoComponents.path ? mailtoComponents.path.split(",") : []);
|
||||
mailtoComponents.path = undefined;
|
||||
if (mailtoComponents.query) {
|
||||
let unknownHeaders = false;
|
||||
const headers = {};
|
||||
const hfields = mailtoComponents.query.split("&");
|
||||
for (let x = 0, xl = hfields.length; x < xl; ++x) {
|
||||
const hfield = hfields[x].split("=");
|
||||
switch (hfield[0]) {
|
||||
case "to":
|
||||
const toAddrs = hfield[1].split(",");
|
||||
for (let x = 0, xl = toAddrs.length; x < xl; ++x) {
|
||||
to.push(toAddrs[x]);
|
||||
}
|
||||
break;
|
||||
case "subject":
|
||||
mailtoComponents.subject = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
case "body":
|
||||
mailtoComponents.body = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
default:
|
||||
unknownHeaders = true;
|
||||
headers[unescapeComponent(hfield[0], options)] = unescapeComponent(hfield[1], options);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (unknownHeaders)
|
||||
mailtoComponents.headers = headers;
|
||||
}
|
||||
mailtoComponents.query = undefined;
|
||||
for (let x = 0, xl = to.length; x < xl; ++x) {
|
||||
const addr = to[x].split("@");
|
||||
addr[0] = unescapeComponent(addr[0]);
|
||||
if (!options.unicodeSupport) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
addr[1] = punycode.toASCII(unescapeComponent(addr[1], options).toLowerCase());
|
||||
}
|
||||
catch (e) {
|
||||
mailtoComponents.error = mailtoComponents.error || "Email address's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
}
|
||||
else {
|
||||
addr[1] = unescapeComponent(addr[1], options).toLowerCase();
|
||||
}
|
||||
to[x] = addr.join("@");
|
||||
}
|
||||
return mailtoComponents;
|
||||
},
|
||||
serialize: function (mailtoComponents, options) {
|
||||
const components = mailtoComponents;
|
||||
const to = toArray(mailtoComponents.to);
|
||||
if (to) {
|
||||
for (let x = 0, xl = to.length; x < xl; ++x) {
|
||||
const toAddr = String(to[x]);
|
||||
const atIdx = toAddr.lastIndexOf("@");
|
||||
const localPart = (toAddr.slice(0, atIdx)).replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_LOCAL_PART, pctEncChar);
|
||||
let domain = toAddr.slice(atIdx + 1);
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
domain = (!options.iri ? punycode.toASCII(unescapeComponent(domain, options).toLowerCase()) : punycode.toUnicode(domain));
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Email address's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
to[x] = localPart + "@" + domain;
|
||||
}
|
||||
components.path = to.join(",");
|
||||
}
|
||||
const headers = mailtoComponents.headers = mailtoComponents.headers || {};
|
||||
if (mailtoComponents.subject)
|
||||
headers["subject"] = mailtoComponents.subject;
|
||||
if (mailtoComponents.body)
|
||||
headers["body"] = mailtoComponents.body;
|
||||
const fields = [];
|
||||
for (const name in headers) {
|
||||
if (headers[name] !== O[name]) {
|
||||
fields.push(name.replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFNAME, pctEncChar) +
|
||||
"=" +
|
||||
headers[name].replace(PCT_ENCODED, decodeUnreserved).replace(PCT_ENCODED, toUpperCase).replace(NOT_HFVALUE, pctEncChar));
|
||||
}
|
||||
}
|
||||
if (fields.length) {
|
||||
components.query = fields.join("&");
|
||||
}
|
||||
return components;
|
||||
}
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=mailto.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/mailto.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mailto.js","sourceRoot":"","sources":["../../../src/schemes/mailto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AACpE,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAa9D,MAAM,CAAC,GAAiB,EAAE,CAAC;AAC3B,MAAM,KAAK,GAAG,IAAI,CAAC;AAEnB,UAAU;AACV,MAAM,YAAY,GAAG,wBAAwB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,2EAA2E,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACjJ,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAE,kBAAkB;AACnD,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,GAAG,QAA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,IAAI,CACV,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;oBAC7G,GAAG;oBACH,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,CACvH,CAAC;aACF;SACD;QACD,IAAI,MAAM,CAAC,MAAM,EAAE;YAClB,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACpC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAA;AAED,eAAe,OAAO,CAAC"}
|
||||
7
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
generated
vendored
Normal file
7
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { URISchemeHandler, URIOptions } from "../uri";
|
||||
import { URNComponents } from "./urn";
|
||||
export interface UUIDComponents extends URNComponents {
|
||||
uuid?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<UUIDComponents, URIOptions, URNComponents>;
|
||||
export default handler;
|
||||
23
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
generated
vendored
Normal file
23
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
const UUID = /^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/;
|
||||
const UUID_PARSE = /^[0-9A-Fa-f\-]{36}/;
|
||||
//RFC 4122
|
||||
const handler = {
|
||||
scheme: "urn:uuid",
|
||||
parse: function (urnComponents, options) {
|
||||
const uuidComponents = urnComponents;
|
||||
uuidComponents.uuid = uuidComponents.nss;
|
||||
uuidComponents.nss = undefined;
|
||||
if (!options.tolerant && (!uuidComponents.uuid || !uuidComponents.uuid.match(UUID))) {
|
||||
uuidComponents.error = uuidComponents.error || "UUID is not valid.";
|
||||
}
|
||||
return uuidComponents;
|
||||
},
|
||||
serialize: function (uuidComponents, options) {
|
||||
const urnComponents = uuidComponents;
|
||||
//normalize UUID
|
||||
urnComponents.nss = (uuidComponents.uuid || "").toLowerCase();
|
||||
return urnComponents;
|
||||
},
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=urn-uuid.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn-uuid.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"urn-uuid.js","sourceRoot":"","sources":["../../../src/schemes/urn-uuid.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,0DAA0D,CAAC;AACxE,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,UAAU;AACV,MAAM,OAAO,GAA+D;IAC3E,MAAM,EAAG,UAAU;IAEnB,KAAK,EAAG,UAAU,aAA2B,EAAE,OAAkB;QAChE,MAAM,cAAc,GAAG,aAA+B,CAAC;QACvD,cAAc,CAAC,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC;QACzC,cAAc,CAAC,GAAG,GAAG,SAAS,CAAC;QAE/B,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE;YACpF,cAAc,CAAC,KAAK,GAAG,cAAc,CAAC,KAAK,IAAI,oBAAoB,CAAC;SACpE;QAED,OAAO,cAAc,CAAC;IACvB,CAAC;IAED,SAAS,EAAG,UAAU,cAA6B,EAAE,OAAkB;QACtE,MAAM,aAAa,GAAG,cAA+B,CAAC;QACtD,gBAAgB;QAChB,aAAa,CAAC,GAAG,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAC9D,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
||||
10
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.d.ts
generated
vendored
Normal file
10
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { URISchemeHandler, URIComponents, URIOptions } from "../uri";
|
||||
export interface URNComponents extends URIComponents {
|
||||
nid?: string;
|
||||
nss?: string;
|
||||
}
|
||||
export interface URNOptions extends URIOptions {
|
||||
nid?: string;
|
||||
}
|
||||
declare const handler: URISchemeHandler<URNComponents, URNOptions>;
|
||||
export default handler;
|
||||
49
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.js
generated
vendored
Normal file
49
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.js
generated
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
import { SCHEMES } from "../uri";
|
||||
const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})";
|
||||
const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})";
|
||||
const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]";
|
||||
const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)";
|
||||
const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$");
|
||||
const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$");
|
||||
const URN_PARSE = /^([^\:]+)\:(.*)/;
|
||||
const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g;
|
||||
//RFC 2141
|
||||
const handler = {
|
||||
scheme: "urn",
|
||||
parse: function (components, options) {
|
||||
const matches = components.path && components.path.match(URN_PARSE);
|
||||
let urnComponents = components;
|
||||
if (matches) {
|
||||
const scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
const nid = matches[1].toLowerCase();
|
||||
const nss = matches[2];
|
||||
const urnScheme = `${scheme}:${options.nid || nid}`;
|
||||
const schemeHandler = SCHEMES[urnScheme];
|
||||
urnComponents.nid = nid;
|
||||
urnComponents.nss = nss;
|
||||
urnComponents.path = undefined;
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.parse(urnComponents, options);
|
||||
}
|
||||
}
|
||||
else {
|
||||
urnComponents.error = urnComponents.error || "URN can not be parsed.";
|
||||
}
|
||||
return urnComponents;
|
||||
},
|
||||
serialize: function (urnComponents, options) {
|
||||
const scheme = options.scheme || urnComponents.scheme || "urn";
|
||||
const nid = urnComponents.nid;
|
||||
const urnScheme = `${scheme}:${options.nid || nid}`;
|
||||
const schemeHandler = SCHEMES[urnScheme];
|
||||
if (schemeHandler) {
|
||||
urnComponents = schemeHandler.serialize(urnComponents, options);
|
||||
}
|
||||
const uriComponents = urnComponents;
|
||||
const nss = urnComponents.nss;
|
||||
uriComponents.path = `${nid || options.nid}:${nss}`;
|
||||
return uriComponents;
|
||||
},
|
||||
};
|
||||
export default handler;
|
||||
//# sourceMappingURL=urn.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/schemes/urn.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"urn.js","sourceRoot":"","sources":["../../../src/schemes/urn.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,OAAO,EAAE,MAAM,QAAQ,CAAC;AAW7C,MAAM,IAAI,GAAG,qCAAqC,CAAC;A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Aa,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;aAC7E;SACD;aAAM;YACN,aAAa,CAAC,KAAK,GAAG,aAAa,CAAC,KAAK,IAAI,wBAAwB,CAAC;SACtE;QAED,OAAO,aAAa,CAAC;IACtB,CAAC;IAED,SAAS,EAAG,UAAU,aAA2B,EAAE,OAAkB;QACpE,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,aAAa,CAAC,MAAM,IAAI,KAAK,CAAC;QAC/D,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,MAAM,SAAS,GAAG,GAAG,MAAM,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACpD,MAAM,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,aAAa,EAAE;YAClB,aAAa,GAAG,aAAa,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAkB,CAAC;SACjF;QAED,MAAM,aAAa,GAAG,aAA8B,CAAC;QACrD,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC;QAC9B,aAAa,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QAEpD,OAAO,aAAa,CAAC;IACtB,CAAC;CACD,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
||||
59
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.d.ts
generated
vendored
Normal file
59
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.d.ts
generated
vendored
Normal file
@@ -0,0 +1,59 @@
|
||||
export interface URIComponents {
|
||||
scheme?: string;
|
||||
userinfo?: string;
|
||||
host?: string;
|
||||
port?: number | string;
|
||||
path?: string;
|
||||
query?: string;
|
||||
fragment?: string;
|
||||
reference?: string;
|
||||
error?: string;
|
||||
}
|
||||
export interface URIOptions {
|
||||
scheme?: string;
|
||||
reference?: string;
|
||||
tolerant?: boolean;
|
||||
absolutePath?: boolean;
|
||||
iri?: boolean;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
}
|
||||
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
|
||||
scheme: string;
|
||||
parse(components: ParentComponents, options: Options): Components;
|
||||
serialize(components: Components, options: Options): ParentComponents;
|
||||
unicodeSupport?: boolean;
|
||||
domainHost?: boolean;
|
||||
absolutePath?: boolean;
|
||||
}
|
||||
export interface URIRegExps {
|
||||
NOT_SCHEME: RegExp;
|
||||
NOT_USERINFO: RegExp;
|
||||
NOT_HOST: RegExp;
|
||||
NOT_PATH: RegExp;
|
||||
NOT_PATH_NOSCHEME: RegExp;
|
||||
NOT_QUERY: RegExp;
|
||||
NOT_FRAGMENT: RegExp;
|
||||
ESCAPE: RegExp;
|
||||
UNRESERVED: RegExp;
|
||||
OTHER_CHARS: RegExp;
|
||||
PCT_ENCODED: RegExp;
|
||||
IPV4ADDRESS: RegExp;
|
||||
IPV6ADDRESS: RegExp;
|
||||
}
|
||||
export declare const SCHEMES: {
|
||||
[scheme: string]: URISchemeHandler;
|
||||
};
|
||||
export declare function pctEncChar(chr: string): string;
|
||||
export declare function pctDecChars(str: string): string;
|
||||
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
|
||||
export declare function removeDotSegments(input: string): string;
|
||||
export declare function serialize(components: URIComponents, options?: URIOptions): string;
|
||||
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
|
||||
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: string, options?: URIOptions): string;
|
||||
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
|
||||
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
|
||||
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
|
||||
export declare function escapeComponent(str: string, options?: URIOptions): string;
|
||||
export declare function unescapeComponent(str: string, options?: URIOptions): string;
|
||||
480
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.js
generated
vendored
Normal file
480
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.js
generated
vendored
Normal file
@@ -0,0 +1,480 @@
|
||||
/**
|
||||
* URI.js
|
||||
*
|
||||
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/validating/resolving library for JavaScript.
|
||||
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
||||
* @see http://github.com/garycourt/uri-js
|
||||
*/
|
||||
/**
|
||||
* Copyright 2011 Gary Court. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of Gary Court.
|
||||
*/
|
||||
import URI_PROTOCOL from "./regexps-uri";
|
||||
import IRI_PROTOCOL from "./regexps-iri";
|
||||
import punycode from "punycode";
|
||||
import { toUpperCase, typeOf, assign } from "./util";
|
||||
export const SCHEMES = {};
|
||||
export function pctEncChar(chr) {
|
||||
const c = chr.charCodeAt(0);
|
||||
let e;
|
||||
if (c < 16)
|
||||
e = "%0" + c.toString(16).toUpperCase();
|
||||
else if (c < 128)
|
||||
e = "%" + c.toString(16).toUpperCase();
|
||||
else if (c < 2048)
|
||||
e = "%" + ((c >> 6) | 192).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
|
||||
else
|
||||
e = "%" + ((c >> 12) | 224).toString(16).toUpperCase() + "%" + (((c >> 6) & 63) | 128).toString(16).toUpperCase() + "%" + ((c & 63) | 128).toString(16).toUpperCase();
|
||||
return e;
|
||||
}
|
||||
export function pctDecChars(str) {
|
||||
let newStr = "";
|
||||
let i = 0;
|
||||
const il = str.length;
|
||||
while (i < il) {
|
||||
const c = parseInt(str.substr(i + 1, 2), 16);
|
||||
if (c < 128) {
|
||||
newStr += String.fromCharCode(c);
|
||||
i += 3;
|
||||
}
|
||||
else if (c >= 194 && c < 224) {
|
||||
if ((il - i) >= 6) {
|
||||
const c2 = parseInt(str.substr(i + 4, 2), 16);
|
||||
newStr += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 6);
|
||||
}
|
||||
i += 6;
|
||||
}
|
||||
else if (c >= 224) {
|
||||
if ((il - i) >= 9) {
|
||||
const c2 = parseInt(str.substr(i + 4, 2), 16);
|
||||
const c3 = parseInt(str.substr(i + 7, 2), 16);
|
||||
newStr += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 9);
|
||||
}
|
||||
i += 9;
|
||||
}
|
||||
else {
|
||||
newStr += str.substr(i, 3);
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
function _normalizeComponentEncoding(components, protocol) {
|
||||
function decodeUnreserved(str) {
|
||||
const decStr = pctDecChars(str);
|
||||
return (!decStr.match(protocol.UNRESERVED) ? str : decStr);
|
||||
}
|
||||
if (components.scheme)
|
||||
components.scheme = String(components.scheme).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_SCHEME, "");
|
||||
if (components.userinfo !== undefined)
|
||||
components.userinfo = String(components.userinfo).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_USERINFO, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.host !== undefined)
|
||||
components.host = String(components.host).replace(protocol.PCT_ENCODED, decodeUnreserved).toLowerCase().replace(protocol.NOT_HOST, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.path !== undefined)
|
||||
components.path = String(components.path).replace(protocol.PCT_ENCODED, decodeUnreserved).replace((components.scheme ? protocol.NOT_PATH : protocol.NOT_PATH_NOSCHEME), pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.query !== undefined)
|
||||
components.query = String(components.query).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_QUERY, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
if (components.fragment !== undefined)
|
||||
components.fragment = String(components.fragment).replace(protocol.PCT_ENCODED, decodeUnreserved).replace(protocol.NOT_FRAGMENT, pctEncChar).replace(protocol.PCT_ENCODED, toUpperCase);
|
||||
return components;
|
||||
}
|
||||
;
|
||||
function _stripLeadingZeros(str) {
|
||||
return str.replace(/^0*(.*)/, "$1") || "0";
|
||||
}
|
||||
function _normalizeIPv4(host, protocol) {
|
||||
const matches = host.match(protocol.IPV4ADDRESS) || [];
|
||||
const [, address] = matches;
|
||||
if (address) {
|
||||
return address.split(".").map(_stripLeadingZeros).join(".");
|
||||
}
|
||||
else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
function _normalizeIPv6(host, protocol) {
|
||||
const matches = host.match(protocol.IPV6ADDRESS) || [];
|
||||
const [, address, zone] = matches;
|
||||
if (address) {
|
||||
const [last, first] = address.toLowerCase().split('::').reverse();
|
||||
const firstFields = first ? first.split(":").map(_stripLeadingZeros) : [];
|
||||
const lastFields = last.split(":").map(_stripLeadingZeros);
|
||||
const isLastFieldIPv4Address = protocol.IPV4ADDRESS.test(lastFields[lastFields.length - 1]);
|
||||
const fieldCount = isLastFieldIPv4Address ? 7 : 8;
|
||||
const lastFieldsStart = lastFields.length - fieldCount;
|
||||
const fields = Array(fieldCount);
|
||||
for (let x = 0; x < fieldCount; ++x) {
|
||||
fields[x] = firstFields[x] || lastFields[lastFieldsStart + x] || '';
|
||||
}
|
||||
if (isLastFieldIPv4Address) {
|
||||
fields[fieldCount - 1] = _normalizeIPv4(fields[fieldCount - 1], protocol);
|
||||
}
|
||||
const allZeroFields = fields.reduce((acc, field, index) => {
|
||||
if (!field || field === "0") {
|
||||
const lastLongest = acc[acc.length - 1];
|
||||
if (lastLongest && lastLongest.index + lastLongest.length === index) {
|
||||
lastLongest.length++;
|
||||
}
|
||||
else {
|
||||
acc.push({ index, length: 1 });
|
||||
}
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
const longestZeroFields = allZeroFields.sort((a, b) => b.length - a.length)[0];
|
||||
let newHost;
|
||||
if (longestZeroFields && longestZeroFields.length > 1) {
|
||||
const newFirst = fields.slice(0, longestZeroFields.index);
|
||||
const newLast = fields.slice(longestZeroFields.index + longestZeroFields.length);
|
||||
newHost = newFirst.join(":") + "::" + newLast.join(":");
|
||||
}
|
||||
else {
|
||||
newHost = fields.join(":");
|
||||
}
|
||||
if (zone) {
|
||||
newHost += "%" + zone;
|
||||
}
|
||||
return newHost;
|
||||
}
|
||||
else {
|
||||
return host;
|
||||
}
|
||||
}
|
||||
const URI_PARSE = /^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i;
|
||||
const NO_MATCH_IS_UNDEFINED = ("").match(/(){0}/)[1] === undefined;
|
||||
export function parse(uriString, options = {}) {
|
||||
const components = {};
|
||||
const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
if (options.reference === "suffix")
|
||||
uriString = (options.scheme ? options.scheme + ":" : "") + "//" + uriString;
|
||||
const matches = uriString.match(URI_PARSE);
|
||||
if (matches) {
|
||||
if (NO_MATCH_IS_UNDEFINED) {
|
||||
//store each component
|
||||
components.scheme = matches[1];
|
||||
components.userinfo = matches[3];
|
||||
components.host = matches[4];
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = matches[7];
|
||||
components.fragment = matches[8];
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = matches[5];
|
||||
}
|
||||
}
|
||||
else { //IE FIX for improper RegExp matching
|
||||
//store each component
|
||||
components.scheme = matches[1] || undefined;
|
||||
components.userinfo = (uriString.indexOf("@") !== -1 ? matches[3] : undefined);
|
||||
components.host = (uriString.indexOf("//") !== -1 ? matches[4] : undefined);
|
||||
components.port = parseInt(matches[5], 10);
|
||||
components.path = matches[6] || "";
|
||||
components.query = (uriString.indexOf("?") !== -1 ? matches[7] : undefined);
|
||||
components.fragment = (uriString.indexOf("#") !== -1 ? matches[8] : undefined);
|
||||
//fix port number
|
||||
if (isNaN(components.port)) {
|
||||
components.port = (uriString.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/) ? matches[4] : undefined);
|
||||
}
|
||||
}
|
||||
if (components.host) {
|
||||
//normalize IP hosts
|
||||
components.host = _normalizeIPv6(_normalizeIPv4(components.host, protocol), protocol);
|
||||
}
|
||||
//determine reference type
|
||||
if (components.scheme === undefined && components.userinfo === undefined && components.host === undefined && components.port === undefined && !components.path && components.query === undefined) {
|
||||
components.reference = "same-document";
|
||||
}
|
||||
else if (components.scheme === undefined) {
|
||||
components.reference = "relative";
|
||||
}
|
||||
else if (components.fragment === undefined) {
|
||||
components.reference = "absolute";
|
||||
}
|
||||
else {
|
||||
components.reference = "uri";
|
||||
}
|
||||
//check for reference errors
|
||||
if (options.reference && options.reference !== "suffix" && options.reference !== components.reference) {
|
||||
components.error = components.error || "URI is not a " + options.reference + " reference.";
|
||||
}
|
||||
//find scheme handler
|
||||
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//check if scheme can't handle IRIs
|
||||
if (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport)) {
|
||||
//if host component is a domain name
|
||||
if (components.host && (options.domainHost || (schemeHandler && schemeHandler.domainHost))) {
|
||||
//convert Unicode IDN -> ASCII IDN
|
||||
try {
|
||||
components.host = punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase());
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to ASCII via punycode: " + e;
|
||||
}
|
||||
}
|
||||
//convert IRI -> URI
|
||||
_normalizeComponentEncoding(components, URI_PROTOCOL);
|
||||
}
|
||||
else {
|
||||
//normalize encodings
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
}
|
||||
//perform scheme specific parsing
|
||||
if (schemeHandler && schemeHandler.parse) {
|
||||
schemeHandler.parse(components, options);
|
||||
}
|
||||
}
|
||||
else {
|
||||
components.error = components.error || "URI can not be parsed.";
|
||||
}
|
||||
return components;
|
||||
}
|
||||
;
|
||||
function _recomposeAuthority(components, options) {
|
||||
const protocol = (options.iri !== false ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
const uriTokens = [];
|
||||
if (components.userinfo !== undefined) {
|
||||
uriTokens.push(components.userinfo);
|
||||
uriTokens.push("@");
|
||||
}
|
||||
if (components.host !== undefined) {
|
||||
//normalize IP hosts, add brackets and escape zone separator for IPv6
|
||||
uriTokens.push(_normalizeIPv6(_normalizeIPv4(String(components.host), protocol), protocol).replace(protocol.IPV6ADDRESS, (_, $1, $2) => "[" + $1 + ($2 ? "%25" + $2 : "") + "]"));
|
||||
}
|
||||
if (typeof components.port === "number") {
|
||||
uriTokens.push(":");
|
||||
uriTokens.push(components.port.toString(10));
|
||||
}
|
||||
return uriTokens.length ? uriTokens.join("") : undefined;
|
||||
}
|
||||
;
|
||||
const RDS1 = /^\.\.?\//;
|
||||
const RDS2 = /^\/\.(\/|$)/;
|
||||
const RDS3 = /^\/\.\.(\/|$)/;
|
||||
const RDS4 = /^\.\.?$/;
|
||||
const RDS5 = /^\/?(?:.|\n)*?(?=\/|$)/;
|
||||
export function removeDotSegments(input) {
|
||||
const output = [];
|
||||
while (input.length) {
|
||||
if (input.match(RDS1)) {
|
||||
input = input.replace(RDS1, "");
|
||||
}
|
||||
else if (input.match(RDS2)) {
|
||||
input = input.replace(RDS2, "/");
|
||||
}
|
||||
else if (input.match(RDS3)) {
|
||||
input = input.replace(RDS3, "/");
|
||||
output.pop();
|
||||
}
|
||||
else if (input === "." || input === "..") {
|
||||
input = "";
|
||||
}
|
||||
else {
|
||||
const im = input.match(RDS5);
|
||||
if (im) {
|
||||
const s = im[0];
|
||||
input = input.slice(s.length);
|
||||
output.push(s);
|
||||
}
|
||||
else {
|
||||
throw new Error("Unexpected dot segment condition");
|
||||
}
|
||||
}
|
||||
}
|
||||
return output.join("");
|
||||
}
|
||||
;
|
||||
export function serialize(components, options = {}) {
|
||||
const protocol = (options.iri ? IRI_PROTOCOL : URI_PROTOCOL);
|
||||
const uriTokens = [];
|
||||
//find scheme handler
|
||||
const schemeHandler = SCHEMES[(options.scheme || components.scheme || "").toLowerCase()];
|
||||
//perform scheme specific serialization
|
||||
if (schemeHandler && schemeHandler.serialize)
|
||||
schemeHandler.serialize(components, options);
|
||||
if (components.host) {
|
||||
//if host component is an IPv6 address
|
||||
if (protocol.IPV6ADDRESS.test(components.host)) {
|
||||
//TODO: normalize IPv6 address as per RFC 5952
|
||||
}
|
||||
//if host component is a domain name
|
||||
else if (options.domainHost || (schemeHandler && schemeHandler.domainHost)) {
|
||||
//convert IDN via punycode
|
||||
try {
|
||||
components.host = (!options.iri ? punycode.toASCII(components.host.replace(protocol.PCT_ENCODED, pctDecChars).toLowerCase()) : punycode.toUnicode(components.host));
|
||||
}
|
||||
catch (e) {
|
||||
components.error = components.error || "Host's domain name can not be converted to " + (!options.iri ? "ASCII" : "Unicode") + " via punycode: " + e;
|
||||
}
|
||||
}
|
||||
}
|
||||
//normalize encoding
|
||||
_normalizeComponentEncoding(components, protocol);
|
||||
if (options.reference !== "suffix" && components.scheme) {
|
||||
uriTokens.push(components.scheme);
|
||||
uriTokens.push(":");
|
||||
}
|
||||
const authority = _recomposeAuthority(components, options);
|
||||
if (authority !== undefined) {
|
||||
if (options.reference !== "suffix") {
|
||||
uriTokens.push("//");
|
||||
}
|
||||
uriTokens.push(authority);
|
||||
if (components.path && components.path.charAt(0) !== "/") {
|
||||
uriTokens.push("/");
|
||||
}
|
||||
}
|
||||
if (components.path !== undefined) {
|
||||
let s = components.path;
|
||||
if (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) {
|
||||
s = removeDotSegments(s);
|
||||
}
|
||||
if (authority === undefined) {
|
||||
s = s.replace(/^\/\//, "/%2F"); //don't allow the path to start with "//"
|
||||
}
|
||||
uriTokens.push(s);
|
||||
}
|
||||
if (components.query !== undefined) {
|
||||
uriTokens.push("?");
|
||||
uriTokens.push(components.query);
|
||||
}
|
||||
if (components.fragment !== undefined) {
|
||||
uriTokens.push("#");
|
||||
uriTokens.push(components.fragment);
|
||||
}
|
||||
return uriTokens.join(""); //merge tokens into a string
|
||||
}
|
||||
;
|
||||
export function resolveComponents(base, relative, options = {}, skipNormalization) {
|
||||
const target = {};
|
||||
if (!skipNormalization) {
|
||||
base = parse(serialize(base, options), options); //normalize base components
|
||||
relative = parse(serialize(relative, options), options); //normalize relative components
|
||||
}
|
||||
options = options || {};
|
||||
if (!options.tolerant && relative.scheme) {
|
||||
target.scheme = relative.scheme;
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
if (relative.userinfo !== undefined || relative.host !== undefined || relative.port !== undefined) {
|
||||
//target.authority = relative.authority;
|
||||
target.userinfo = relative.userinfo;
|
||||
target.host = relative.host;
|
||||
target.port = relative.port;
|
||||
target.path = removeDotSegments(relative.path || "");
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
if (!relative.path) {
|
||||
target.path = base.path;
|
||||
if (relative.query !== undefined) {
|
||||
target.query = relative.query;
|
||||
}
|
||||
else {
|
||||
target.query = base.query;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (relative.path.charAt(0) === "/") {
|
||||
target.path = removeDotSegments(relative.path);
|
||||
}
|
||||
else {
|
||||
if ((base.userinfo !== undefined || base.host !== undefined || base.port !== undefined) && !base.path) {
|
||||
target.path = "/" + relative.path;
|
||||
}
|
||||
else if (!base.path) {
|
||||
target.path = relative.path;
|
||||
}
|
||||
else {
|
||||
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative.path;
|
||||
}
|
||||
target.path = removeDotSegments(target.path);
|
||||
}
|
||||
target.query = relative.query;
|
||||
}
|
||||
//target.authority = base.authority;
|
||||
target.userinfo = base.userinfo;
|
||||
target.host = base.host;
|
||||
target.port = base.port;
|
||||
}
|
||||
target.scheme = base.scheme;
|
||||
}
|
||||
target.fragment = relative.fragment;
|
||||
return target;
|
||||
}
|
||||
;
|
||||
export function resolve(baseURI, relativeURI, options) {
|
||||
const schemelessOptions = assign({ scheme: 'null' }, options);
|
||||
return serialize(resolveComponents(parse(baseURI, schemelessOptions), parse(relativeURI, schemelessOptions), schemelessOptions, true), schemelessOptions);
|
||||
}
|
||||
;
|
||||
export function normalize(uri, options) {
|
||||
if (typeof uri === "string") {
|
||||
uri = serialize(parse(uri, options), options);
|
||||
}
|
||||
else if (typeOf(uri) === "object") {
|
||||
uri = parse(serialize(uri, options), options);
|
||||
}
|
||||
return uri;
|
||||
}
|
||||
;
|
||||
export function equal(uriA, uriB, options) {
|
||||
if (typeof uriA === "string") {
|
||||
uriA = serialize(parse(uriA, options), options);
|
||||
}
|
||||
else if (typeOf(uriA) === "object") {
|
||||
uriA = serialize(uriA, options);
|
||||
}
|
||||
if (typeof uriB === "string") {
|
||||
uriB = serialize(parse(uriB, options), options);
|
||||
}
|
||||
else if (typeOf(uriB) === "object") {
|
||||
uriB = serialize(uriB, options);
|
||||
}
|
||||
return uriA === uriB;
|
||||
}
|
||||
;
|
||||
export function escapeComponent(str, options) {
|
||||
return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.ESCAPE : IRI_PROTOCOL.ESCAPE), pctEncChar);
|
||||
}
|
||||
;
|
||||
export function unescapeComponent(str, options) {
|
||||
return str && str.toString().replace((!options || !options.iri ? URI_PROTOCOL.PCT_ENCODED : IRI_PROTOCOL.PCT_ENCODED), pctDecChars);
|
||||
}
|
||||
;
|
||||
//# sourceMappingURL=uri.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/uri.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.d.ts
generated
vendored
Normal file
6
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare function merge(...sets: Array<string>): string;
|
||||
export declare function subexp(str: string): string;
|
||||
export declare function typeOf(o: any): string;
|
||||
export declare function toUpperCase(str: string): string;
|
||||
export declare function toArray(obj: any): Array<any>;
|
||||
export declare function assign(target: object, source: any): any;
|
||||
36
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.js
generated
vendored
Normal file
36
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
export function merge(...sets) {
|
||||
if (sets.length > 1) {
|
||||
sets[0] = sets[0].slice(0, -1);
|
||||
const xl = sets.length - 1;
|
||||
for (let x = 1; x < xl; ++x) {
|
||||
sets[x] = sets[x].slice(1, -1);
|
||||
}
|
||||
sets[xl] = sets[xl].slice(1);
|
||||
return sets.join('');
|
||||
}
|
||||
else {
|
||||
return sets[0];
|
||||
}
|
||||
}
|
||||
export function subexp(str) {
|
||||
return "(?:" + str + ")";
|
||||
}
|
||||
export function typeOf(o) {
|
||||
return o === undefined ? "undefined" : (o === null ? "null" : Object.prototype.toString.call(o).split(" ").pop().split("]").shift().toLowerCase());
|
||||
}
|
||||
export function toUpperCase(str) {
|
||||
return str.toUpperCase();
|
||||
}
|
||||
export function toArray(obj) {
|
||||
return obj !== undefined && obj !== null ? (obj instanceof Array ? obj : (typeof obj.length !== "number" || obj.split || obj.setInterval || obj.call ? [obj] : Array.prototype.slice.call(obj))) : [];
|
||||
}
|
||||
export function assign(target, source) {
|
||||
const obj = target;
|
||||
if (source) {
|
||||
for (const key in source) {
|
||||
obj[key] = source[key];
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
//# sourceMappingURL=util.js.map
|
||||
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.js.map
generated
vendored
Normal file
1
nodered/rootfs/data/node_modules/uri-js/dist/esnext/util.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAAA,MA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