pui9-components 3.0.6 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pui9-components.common.js +1741 -1
- package/package-lock.json +170 -185
- package/package.json +2 -1
|
@@ -6439,6 +6439,15 @@ module.exports = function (iterator, kind, value) {
|
|
|
6439
6439
|
};
|
|
6440
6440
|
|
|
6441
6441
|
|
|
6442
|
+
/***/ }),
|
|
6443
|
+
|
|
6444
|
+
/***/ "2b3d":
|
|
6445
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6446
|
+
|
|
6447
|
+
// TODO: Remove this module from `core-js@4` since it's replaced to module below
|
|
6448
|
+
__webpack_require__("4002");
|
|
6449
|
+
|
|
6450
|
+
|
|
6442
6451
|
/***/ }),
|
|
6443
6452
|
|
|
6444
6453
|
/***/ "2ba4":
|
|
@@ -25632,6 +25641,1056 @@ module.exports = {};
|
|
|
25632
25641
|
|
|
25633
25642
|
/* (ignored) */
|
|
25634
25643
|
|
|
25644
|
+
/***/ }),
|
|
25645
|
+
|
|
25646
|
+
/***/ "4002":
|
|
25647
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
25648
|
+
|
|
25649
|
+
"use strict";
|
|
25650
|
+
|
|
25651
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
25652
|
+
__webpack_require__("3ca3");
|
|
25653
|
+
var $ = __webpack_require__("23e7");
|
|
25654
|
+
var DESCRIPTORS = __webpack_require__("83ab");
|
|
25655
|
+
var USE_NATIVE_URL = __webpack_require__("f354");
|
|
25656
|
+
var global = __webpack_require__("da84");
|
|
25657
|
+
var bind = __webpack_require__("0366");
|
|
25658
|
+
var uncurryThis = __webpack_require__("e330");
|
|
25659
|
+
var defineBuiltIn = __webpack_require__("cb2d");
|
|
25660
|
+
var defineBuiltInAccessor = __webpack_require__("edd0");
|
|
25661
|
+
var anInstance = __webpack_require__("19aa");
|
|
25662
|
+
var hasOwn = __webpack_require__("1a2d");
|
|
25663
|
+
var assign = __webpack_require__("60da");
|
|
25664
|
+
var arrayFrom = __webpack_require__("4df4");
|
|
25665
|
+
var arraySlice = __webpack_require__("4dae");
|
|
25666
|
+
var codeAt = __webpack_require__("6547").codeAt;
|
|
25667
|
+
var toASCII = __webpack_require__("5fb2");
|
|
25668
|
+
var $toString = __webpack_require__("577e");
|
|
25669
|
+
var setToStringTag = __webpack_require__("d44e");
|
|
25670
|
+
var validateArgumentsLength = __webpack_require__("d6d6");
|
|
25671
|
+
var URLSearchParamsModule = __webpack_require__("5352");
|
|
25672
|
+
var InternalStateModule = __webpack_require__("69f3");
|
|
25673
|
+
|
|
25674
|
+
var setInternalState = InternalStateModule.set;
|
|
25675
|
+
var getInternalURLState = InternalStateModule.getterFor('URL');
|
|
25676
|
+
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
|
|
25677
|
+
var getInternalSearchParamsState = URLSearchParamsModule.getState;
|
|
25678
|
+
|
|
25679
|
+
var NativeURL = global.URL;
|
|
25680
|
+
var TypeError = global.TypeError;
|
|
25681
|
+
var parseInt = global.parseInt;
|
|
25682
|
+
var floor = Math.floor;
|
|
25683
|
+
var pow = Math.pow;
|
|
25684
|
+
var charAt = uncurryThis(''.charAt);
|
|
25685
|
+
var exec = uncurryThis(/./.exec);
|
|
25686
|
+
var join = uncurryThis([].join);
|
|
25687
|
+
var numberToString = uncurryThis(1.0.toString);
|
|
25688
|
+
var pop = uncurryThis([].pop);
|
|
25689
|
+
var push = uncurryThis([].push);
|
|
25690
|
+
var replace = uncurryThis(''.replace);
|
|
25691
|
+
var shift = uncurryThis([].shift);
|
|
25692
|
+
var split = uncurryThis(''.split);
|
|
25693
|
+
var stringSlice = uncurryThis(''.slice);
|
|
25694
|
+
var toLowerCase = uncurryThis(''.toLowerCase);
|
|
25695
|
+
var unshift = uncurryThis([].unshift);
|
|
25696
|
+
|
|
25697
|
+
var INVALID_AUTHORITY = 'Invalid authority';
|
|
25698
|
+
var INVALID_SCHEME = 'Invalid scheme';
|
|
25699
|
+
var INVALID_HOST = 'Invalid host';
|
|
25700
|
+
var INVALID_PORT = 'Invalid port';
|
|
25701
|
+
|
|
25702
|
+
var ALPHA = /[a-z]/i;
|
|
25703
|
+
// eslint-disable-next-line regexp/no-obscure-range -- safe
|
|
25704
|
+
var ALPHANUMERIC = /[\d+-.a-z]/i;
|
|
25705
|
+
var DIGIT = /\d/;
|
|
25706
|
+
var HEX_START = /^0x/i;
|
|
25707
|
+
var OCT = /^[0-7]+$/;
|
|
25708
|
+
var DEC = /^\d+$/;
|
|
25709
|
+
var HEX = /^[\da-f]+$/i;
|
|
25710
|
+
/* eslint-disable regexp/no-control-character -- safe */
|
|
25711
|
+
var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
|
|
25712
|
+
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
|
|
25713
|
+
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g;
|
|
25714
|
+
var TAB_AND_NEW_LINE = /[\t\n\r]/g;
|
|
25715
|
+
/* eslint-enable regexp/no-control-character -- safe */
|
|
25716
|
+
var EOF;
|
|
25717
|
+
|
|
25718
|
+
// https://url.spec.whatwg.org/#ipv4-number-parser
|
|
25719
|
+
var parseIPv4 = function (input) {
|
|
25720
|
+
var parts = split(input, '.');
|
|
25721
|
+
var partsLength, numbers, index, part, radix, number, ipv4;
|
|
25722
|
+
if (parts.length && parts[parts.length - 1] == '') {
|
|
25723
|
+
parts.length--;
|
|
25724
|
+
}
|
|
25725
|
+
partsLength = parts.length;
|
|
25726
|
+
if (partsLength > 4) return input;
|
|
25727
|
+
numbers = [];
|
|
25728
|
+
for (index = 0; index < partsLength; index++) {
|
|
25729
|
+
part = parts[index];
|
|
25730
|
+
if (part == '') return input;
|
|
25731
|
+
radix = 10;
|
|
25732
|
+
if (part.length > 1 && charAt(part, 0) == '0') {
|
|
25733
|
+
radix = exec(HEX_START, part) ? 16 : 8;
|
|
25734
|
+
part = stringSlice(part, radix == 8 ? 1 : 2);
|
|
25735
|
+
}
|
|
25736
|
+
if (part === '') {
|
|
25737
|
+
number = 0;
|
|
25738
|
+
} else {
|
|
25739
|
+
if (!exec(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;
|
|
25740
|
+
number = parseInt(part, radix);
|
|
25741
|
+
}
|
|
25742
|
+
push(numbers, number);
|
|
25743
|
+
}
|
|
25744
|
+
for (index = 0; index < partsLength; index++) {
|
|
25745
|
+
number = numbers[index];
|
|
25746
|
+
if (index == partsLength - 1) {
|
|
25747
|
+
if (number >= pow(256, 5 - partsLength)) return null;
|
|
25748
|
+
} else if (number > 255) return null;
|
|
25749
|
+
}
|
|
25750
|
+
ipv4 = pop(numbers);
|
|
25751
|
+
for (index = 0; index < numbers.length; index++) {
|
|
25752
|
+
ipv4 += numbers[index] * pow(256, 3 - index);
|
|
25753
|
+
}
|
|
25754
|
+
return ipv4;
|
|
25755
|
+
};
|
|
25756
|
+
|
|
25757
|
+
// https://url.spec.whatwg.org/#concept-ipv6-parser
|
|
25758
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
25759
|
+
var parseIPv6 = function (input) {
|
|
25760
|
+
var address = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
25761
|
+
var pieceIndex = 0;
|
|
25762
|
+
var compress = null;
|
|
25763
|
+
var pointer = 0;
|
|
25764
|
+
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
|
|
25765
|
+
|
|
25766
|
+
var chr = function () {
|
|
25767
|
+
return charAt(input, pointer);
|
|
25768
|
+
};
|
|
25769
|
+
|
|
25770
|
+
if (chr() == ':') {
|
|
25771
|
+
if (charAt(input, 1) != ':') return;
|
|
25772
|
+
pointer += 2;
|
|
25773
|
+
pieceIndex++;
|
|
25774
|
+
compress = pieceIndex;
|
|
25775
|
+
}
|
|
25776
|
+
while (chr()) {
|
|
25777
|
+
if (pieceIndex == 8) return;
|
|
25778
|
+
if (chr() == ':') {
|
|
25779
|
+
if (compress !== null) return;
|
|
25780
|
+
pointer++;
|
|
25781
|
+
pieceIndex++;
|
|
25782
|
+
compress = pieceIndex;
|
|
25783
|
+
continue;
|
|
25784
|
+
}
|
|
25785
|
+
value = length = 0;
|
|
25786
|
+
while (length < 4 && exec(HEX, chr())) {
|
|
25787
|
+
value = value * 16 + parseInt(chr(), 16);
|
|
25788
|
+
pointer++;
|
|
25789
|
+
length++;
|
|
25790
|
+
}
|
|
25791
|
+
if (chr() == '.') {
|
|
25792
|
+
if (length == 0) return;
|
|
25793
|
+
pointer -= length;
|
|
25794
|
+
if (pieceIndex > 6) return;
|
|
25795
|
+
numbersSeen = 0;
|
|
25796
|
+
while (chr()) {
|
|
25797
|
+
ipv4Piece = null;
|
|
25798
|
+
if (numbersSeen > 0) {
|
|
25799
|
+
if (chr() == '.' && numbersSeen < 4) pointer++;
|
|
25800
|
+
else return;
|
|
25801
|
+
}
|
|
25802
|
+
if (!exec(DIGIT, chr())) return;
|
|
25803
|
+
while (exec(DIGIT, chr())) {
|
|
25804
|
+
number = parseInt(chr(), 10);
|
|
25805
|
+
if (ipv4Piece === null) ipv4Piece = number;
|
|
25806
|
+
else if (ipv4Piece == 0) return;
|
|
25807
|
+
else ipv4Piece = ipv4Piece * 10 + number;
|
|
25808
|
+
if (ipv4Piece > 255) return;
|
|
25809
|
+
pointer++;
|
|
25810
|
+
}
|
|
25811
|
+
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
|
25812
|
+
numbersSeen++;
|
|
25813
|
+
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
|
|
25814
|
+
}
|
|
25815
|
+
if (numbersSeen != 4) return;
|
|
25816
|
+
break;
|
|
25817
|
+
} else if (chr() == ':') {
|
|
25818
|
+
pointer++;
|
|
25819
|
+
if (!chr()) return;
|
|
25820
|
+
} else if (chr()) return;
|
|
25821
|
+
address[pieceIndex++] = value;
|
|
25822
|
+
}
|
|
25823
|
+
if (compress !== null) {
|
|
25824
|
+
swaps = pieceIndex - compress;
|
|
25825
|
+
pieceIndex = 7;
|
|
25826
|
+
while (pieceIndex != 0 && swaps > 0) {
|
|
25827
|
+
swap = address[pieceIndex];
|
|
25828
|
+
address[pieceIndex--] = address[compress + swaps - 1];
|
|
25829
|
+
address[compress + --swaps] = swap;
|
|
25830
|
+
}
|
|
25831
|
+
} else if (pieceIndex != 8) return;
|
|
25832
|
+
return address;
|
|
25833
|
+
};
|
|
25834
|
+
|
|
25835
|
+
var findLongestZeroSequence = function (ipv6) {
|
|
25836
|
+
var maxIndex = null;
|
|
25837
|
+
var maxLength = 1;
|
|
25838
|
+
var currStart = null;
|
|
25839
|
+
var currLength = 0;
|
|
25840
|
+
var index = 0;
|
|
25841
|
+
for (; index < 8; index++) {
|
|
25842
|
+
if (ipv6[index] !== 0) {
|
|
25843
|
+
if (currLength > maxLength) {
|
|
25844
|
+
maxIndex = currStart;
|
|
25845
|
+
maxLength = currLength;
|
|
25846
|
+
}
|
|
25847
|
+
currStart = null;
|
|
25848
|
+
currLength = 0;
|
|
25849
|
+
} else {
|
|
25850
|
+
if (currStart === null) currStart = index;
|
|
25851
|
+
++currLength;
|
|
25852
|
+
}
|
|
25853
|
+
}
|
|
25854
|
+
if (currLength > maxLength) {
|
|
25855
|
+
maxIndex = currStart;
|
|
25856
|
+
maxLength = currLength;
|
|
25857
|
+
}
|
|
25858
|
+
return maxIndex;
|
|
25859
|
+
};
|
|
25860
|
+
|
|
25861
|
+
// https://url.spec.whatwg.org/#host-serializing
|
|
25862
|
+
var serializeHost = function (host) {
|
|
25863
|
+
var result, index, compress, ignore0;
|
|
25864
|
+
// ipv4
|
|
25865
|
+
if (typeof host == 'number') {
|
|
25866
|
+
result = [];
|
|
25867
|
+
for (index = 0; index < 4; index++) {
|
|
25868
|
+
unshift(result, host % 256);
|
|
25869
|
+
host = floor(host / 256);
|
|
25870
|
+
} return join(result, '.');
|
|
25871
|
+
// ipv6
|
|
25872
|
+
} else if (typeof host == 'object') {
|
|
25873
|
+
result = '';
|
|
25874
|
+
compress = findLongestZeroSequence(host);
|
|
25875
|
+
for (index = 0; index < 8; index++) {
|
|
25876
|
+
if (ignore0 && host[index] === 0) continue;
|
|
25877
|
+
if (ignore0) ignore0 = false;
|
|
25878
|
+
if (compress === index) {
|
|
25879
|
+
result += index ? ':' : '::';
|
|
25880
|
+
ignore0 = true;
|
|
25881
|
+
} else {
|
|
25882
|
+
result += numberToString(host[index], 16);
|
|
25883
|
+
if (index < 7) result += ':';
|
|
25884
|
+
}
|
|
25885
|
+
}
|
|
25886
|
+
return '[' + result + ']';
|
|
25887
|
+
} return host;
|
|
25888
|
+
};
|
|
25889
|
+
|
|
25890
|
+
var C0ControlPercentEncodeSet = {};
|
|
25891
|
+
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
|
|
25892
|
+
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
|
|
25893
|
+
});
|
|
25894
|
+
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
|
|
25895
|
+
'#': 1, '?': 1, '{': 1, '}': 1
|
|
25896
|
+
});
|
|
25897
|
+
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
|
|
25898
|
+
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
|
|
25899
|
+
});
|
|
25900
|
+
|
|
25901
|
+
var percentEncode = function (chr, set) {
|
|
25902
|
+
var code = codeAt(chr, 0);
|
|
25903
|
+
return code > 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : encodeURIComponent(chr);
|
|
25904
|
+
};
|
|
25905
|
+
|
|
25906
|
+
// https://url.spec.whatwg.org/#special-scheme
|
|
25907
|
+
var specialSchemes = {
|
|
25908
|
+
ftp: 21,
|
|
25909
|
+
file: null,
|
|
25910
|
+
http: 80,
|
|
25911
|
+
https: 443,
|
|
25912
|
+
ws: 80,
|
|
25913
|
+
wss: 443
|
|
25914
|
+
};
|
|
25915
|
+
|
|
25916
|
+
// https://url.spec.whatwg.org/#windows-drive-letter
|
|
25917
|
+
var isWindowsDriveLetter = function (string, normalized) {
|
|
25918
|
+
var second;
|
|
25919
|
+
return string.length == 2 && exec(ALPHA, charAt(string, 0))
|
|
25920
|
+
&& ((second = charAt(string, 1)) == ':' || (!normalized && second == '|'));
|
|
25921
|
+
};
|
|
25922
|
+
|
|
25923
|
+
// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
|
|
25924
|
+
var startsWithWindowsDriveLetter = function (string) {
|
|
25925
|
+
var third;
|
|
25926
|
+
return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && (
|
|
25927
|
+
string.length == 2 ||
|
|
25928
|
+
((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
|
|
25929
|
+
);
|
|
25930
|
+
};
|
|
25931
|
+
|
|
25932
|
+
// https://url.spec.whatwg.org/#single-dot-path-segment
|
|
25933
|
+
var isSingleDot = function (segment) {
|
|
25934
|
+
return segment === '.' || toLowerCase(segment) === '%2e';
|
|
25935
|
+
};
|
|
25936
|
+
|
|
25937
|
+
// https://url.spec.whatwg.org/#double-dot-path-segment
|
|
25938
|
+
var isDoubleDot = function (segment) {
|
|
25939
|
+
segment = toLowerCase(segment);
|
|
25940
|
+
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
|
|
25941
|
+
};
|
|
25942
|
+
|
|
25943
|
+
// States:
|
|
25944
|
+
var SCHEME_START = {};
|
|
25945
|
+
var SCHEME = {};
|
|
25946
|
+
var NO_SCHEME = {};
|
|
25947
|
+
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
|
|
25948
|
+
var PATH_OR_AUTHORITY = {};
|
|
25949
|
+
var RELATIVE = {};
|
|
25950
|
+
var RELATIVE_SLASH = {};
|
|
25951
|
+
var SPECIAL_AUTHORITY_SLASHES = {};
|
|
25952
|
+
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
|
|
25953
|
+
var AUTHORITY = {};
|
|
25954
|
+
var HOST = {};
|
|
25955
|
+
var HOSTNAME = {};
|
|
25956
|
+
var PORT = {};
|
|
25957
|
+
var FILE = {};
|
|
25958
|
+
var FILE_SLASH = {};
|
|
25959
|
+
var FILE_HOST = {};
|
|
25960
|
+
var PATH_START = {};
|
|
25961
|
+
var PATH = {};
|
|
25962
|
+
var CANNOT_BE_A_BASE_URL_PATH = {};
|
|
25963
|
+
var QUERY = {};
|
|
25964
|
+
var FRAGMENT = {};
|
|
25965
|
+
|
|
25966
|
+
var URLState = function (url, isBase, base) {
|
|
25967
|
+
var urlString = $toString(url);
|
|
25968
|
+
var baseState, failure, searchParams;
|
|
25969
|
+
if (isBase) {
|
|
25970
|
+
failure = this.parse(urlString);
|
|
25971
|
+
if (failure) throw TypeError(failure);
|
|
25972
|
+
this.searchParams = null;
|
|
25973
|
+
} else {
|
|
25974
|
+
if (base !== undefined) baseState = new URLState(base, true);
|
|
25975
|
+
failure = this.parse(urlString, null, baseState);
|
|
25976
|
+
if (failure) throw TypeError(failure);
|
|
25977
|
+
searchParams = getInternalSearchParamsState(new URLSearchParams());
|
|
25978
|
+
searchParams.bindURL(this);
|
|
25979
|
+
this.searchParams = searchParams;
|
|
25980
|
+
}
|
|
25981
|
+
};
|
|
25982
|
+
|
|
25983
|
+
URLState.prototype = {
|
|
25984
|
+
type: 'URL',
|
|
25985
|
+
// https://url.spec.whatwg.org/#url-parsing
|
|
25986
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
25987
|
+
parse: function (input, stateOverride, base) {
|
|
25988
|
+
var url = this;
|
|
25989
|
+
var state = stateOverride || SCHEME_START;
|
|
25990
|
+
var pointer = 0;
|
|
25991
|
+
var buffer = '';
|
|
25992
|
+
var seenAt = false;
|
|
25993
|
+
var seenBracket = false;
|
|
25994
|
+
var seenPasswordToken = false;
|
|
25995
|
+
var codePoints, chr, bufferCodePoints, failure;
|
|
25996
|
+
|
|
25997
|
+
input = $toString(input);
|
|
25998
|
+
|
|
25999
|
+
if (!stateOverride) {
|
|
26000
|
+
url.scheme = '';
|
|
26001
|
+
url.username = '';
|
|
26002
|
+
url.password = '';
|
|
26003
|
+
url.host = null;
|
|
26004
|
+
url.port = null;
|
|
26005
|
+
url.path = [];
|
|
26006
|
+
url.query = null;
|
|
26007
|
+
url.fragment = null;
|
|
26008
|
+
url.cannotBeABaseURL = false;
|
|
26009
|
+
input = replace(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
|
|
26010
|
+
}
|
|
26011
|
+
|
|
26012
|
+
input = replace(input, TAB_AND_NEW_LINE, '');
|
|
26013
|
+
|
|
26014
|
+
codePoints = arrayFrom(input);
|
|
26015
|
+
|
|
26016
|
+
while (pointer <= codePoints.length) {
|
|
26017
|
+
chr = codePoints[pointer];
|
|
26018
|
+
switch (state) {
|
|
26019
|
+
case SCHEME_START:
|
|
26020
|
+
if (chr && exec(ALPHA, chr)) {
|
|
26021
|
+
buffer += toLowerCase(chr);
|
|
26022
|
+
state = SCHEME;
|
|
26023
|
+
} else if (!stateOverride) {
|
|
26024
|
+
state = NO_SCHEME;
|
|
26025
|
+
continue;
|
|
26026
|
+
} else return INVALID_SCHEME;
|
|
26027
|
+
break;
|
|
26028
|
+
|
|
26029
|
+
case SCHEME:
|
|
26030
|
+
if (chr && (exec(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {
|
|
26031
|
+
buffer += toLowerCase(chr);
|
|
26032
|
+
} else if (chr == ':') {
|
|
26033
|
+
if (stateOverride && (
|
|
26034
|
+
(url.isSpecial() != hasOwn(specialSchemes, buffer)) ||
|
|
26035
|
+
(buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||
|
|
26036
|
+
(url.scheme == 'file' && !url.host)
|
|
26037
|
+
)) return;
|
|
26038
|
+
url.scheme = buffer;
|
|
26039
|
+
if (stateOverride) {
|
|
26040
|
+
if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;
|
|
26041
|
+
return;
|
|
26042
|
+
}
|
|
26043
|
+
buffer = '';
|
|
26044
|
+
if (url.scheme == 'file') {
|
|
26045
|
+
state = FILE;
|
|
26046
|
+
} else if (url.isSpecial() && base && base.scheme == url.scheme) {
|
|
26047
|
+
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
|
26048
|
+
} else if (url.isSpecial()) {
|
|
26049
|
+
state = SPECIAL_AUTHORITY_SLASHES;
|
|
26050
|
+
} else if (codePoints[pointer + 1] == '/') {
|
|
26051
|
+
state = PATH_OR_AUTHORITY;
|
|
26052
|
+
pointer++;
|
|
26053
|
+
} else {
|
|
26054
|
+
url.cannotBeABaseURL = true;
|
|
26055
|
+
push(url.path, '');
|
|
26056
|
+
state = CANNOT_BE_A_BASE_URL_PATH;
|
|
26057
|
+
}
|
|
26058
|
+
} else if (!stateOverride) {
|
|
26059
|
+
buffer = '';
|
|
26060
|
+
state = NO_SCHEME;
|
|
26061
|
+
pointer = 0;
|
|
26062
|
+
continue;
|
|
26063
|
+
} else return INVALID_SCHEME;
|
|
26064
|
+
break;
|
|
26065
|
+
|
|
26066
|
+
case NO_SCHEME:
|
|
26067
|
+
if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;
|
|
26068
|
+
if (base.cannotBeABaseURL && chr == '#') {
|
|
26069
|
+
url.scheme = base.scheme;
|
|
26070
|
+
url.path = arraySlice(base.path);
|
|
26071
|
+
url.query = base.query;
|
|
26072
|
+
url.fragment = '';
|
|
26073
|
+
url.cannotBeABaseURL = true;
|
|
26074
|
+
state = FRAGMENT;
|
|
26075
|
+
break;
|
|
26076
|
+
}
|
|
26077
|
+
state = base.scheme == 'file' ? FILE : RELATIVE;
|
|
26078
|
+
continue;
|
|
26079
|
+
|
|
26080
|
+
case SPECIAL_RELATIVE_OR_AUTHORITY:
|
|
26081
|
+
if (chr == '/' && codePoints[pointer + 1] == '/') {
|
|
26082
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
26083
|
+
pointer++;
|
|
26084
|
+
} else {
|
|
26085
|
+
state = RELATIVE;
|
|
26086
|
+
continue;
|
|
26087
|
+
} break;
|
|
26088
|
+
|
|
26089
|
+
case PATH_OR_AUTHORITY:
|
|
26090
|
+
if (chr == '/') {
|
|
26091
|
+
state = AUTHORITY;
|
|
26092
|
+
break;
|
|
26093
|
+
} else {
|
|
26094
|
+
state = PATH;
|
|
26095
|
+
continue;
|
|
26096
|
+
}
|
|
26097
|
+
|
|
26098
|
+
case RELATIVE:
|
|
26099
|
+
url.scheme = base.scheme;
|
|
26100
|
+
if (chr == EOF) {
|
|
26101
|
+
url.username = base.username;
|
|
26102
|
+
url.password = base.password;
|
|
26103
|
+
url.host = base.host;
|
|
26104
|
+
url.port = base.port;
|
|
26105
|
+
url.path = arraySlice(base.path);
|
|
26106
|
+
url.query = base.query;
|
|
26107
|
+
} else if (chr == '/' || (chr == '\\' && url.isSpecial())) {
|
|
26108
|
+
state = RELATIVE_SLASH;
|
|
26109
|
+
} else if (chr == '?') {
|
|
26110
|
+
url.username = base.username;
|
|
26111
|
+
url.password = base.password;
|
|
26112
|
+
url.host = base.host;
|
|
26113
|
+
url.port = base.port;
|
|
26114
|
+
url.path = arraySlice(base.path);
|
|
26115
|
+
url.query = '';
|
|
26116
|
+
state = QUERY;
|
|
26117
|
+
} else if (chr == '#') {
|
|
26118
|
+
url.username = base.username;
|
|
26119
|
+
url.password = base.password;
|
|
26120
|
+
url.host = base.host;
|
|
26121
|
+
url.port = base.port;
|
|
26122
|
+
url.path = arraySlice(base.path);
|
|
26123
|
+
url.query = base.query;
|
|
26124
|
+
url.fragment = '';
|
|
26125
|
+
state = FRAGMENT;
|
|
26126
|
+
} else {
|
|
26127
|
+
url.username = base.username;
|
|
26128
|
+
url.password = base.password;
|
|
26129
|
+
url.host = base.host;
|
|
26130
|
+
url.port = base.port;
|
|
26131
|
+
url.path = arraySlice(base.path);
|
|
26132
|
+
url.path.length--;
|
|
26133
|
+
state = PATH;
|
|
26134
|
+
continue;
|
|
26135
|
+
} break;
|
|
26136
|
+
|
|
26137
|
+
case RELATIVE_SLASH:
|
|
26138
|
+
if (url.isSpecial() && (chr == '/' || chr == '\\')) {
|
|
26139
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
26140
|
+
} else if (chr == '/') {
|
|
26141
|
+
state = AUTHORITY;
|
|
26142
|
+
} else {
|
|
26143
|
+
url.username = base.username;
|
|
26144
|
+
url.password = base.password;
|
|
26145
|
+
url.host = base.host;
|
|
26146
|
+
url.port = base.port;
|
|
26147
|
+
state = PATH;
|
|
26148
|
+
continue;
|
|
26149
|
+
} break;
|
|
26150
|
+
|
|
26151
|
+
case SPECIAL_AUTHORITY_SLASHES:
|
|
26152
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
26153
|
+
if (chr != '/' || charAt(buffer, pointer + 1) != '/') continue;
|
|
26154
|
+
pointer++;
|
|
26155
|
+
break;
|
|
26156
|
+
|
|
26157
|
+
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
|
|
26158
|
+
if (chr != '/' && chr != '\\') {
|
|
26159
|
+
state = AUTHORITY;
|
|
26160
|
+
continue;
|
|
26161
|
+
} break;
|
|
26162
|
+
|
|
26163
|
+
case AUTHORITY:
|
|
26164
|
+
if (chr == '@') {
|
|
26165
|
+
if (seenAt) buffer = '%40' + buffer;
|
|
26166
|
+
seenAt = true;
|
|
26167
|
+
bufferCodePoints = arrayFrom(buffer);
|
|
26168
|
+
for (var i = 0; i < bufferCodePoints.length; i++) {
|
|
26169
|
+
var codePoint = bufferCodePoints[i];
|
|
26170
|
+
if (codePoint == ':' && !seenPasswordToken) {
|
|
26171
|
+
seenPasswordToken = true;
|
|
26172
|
+
continue;
|
|
26173
|
+
}
|
|
26174
|
+
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
|
|
26175
|
+
if (seenPasswordToken) url.password += encodedCodePoints;
|
|
26176
|
+
else url.username += encodedCodePoints;
|
|
26177
|
+
}
|
|
26178
|
+
buffer = '';
|
|
26179
|
+
} else if (
|
|
26180
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
26181
|
+
(chr == '\\' && url.isSpecial())
|
|
26182
|
+
) {
|
|
26183
|
+
if (seenAt && buffer == '') return INVALID_AUTHORITY;
|
|
26184
|
+
pointer -= arrayFrom(buffer).length + 1;
|
|
26185
|
+
buffer = '';
|
|
26186
|
+
state = HOST;
|
|
26187
|
+
} else buffer += chr;
|
|
26188
|
+
break;
|
|
26189
|
+
|
|
26190
|
+
case HOST:
|
|
26191
|
+
case HOSTNAME:
|
|
26192
|
+
if (stateOverride && url.scheme == 'file') {
|
|
26193
|
+
state = FILE_HOST;
|
|
26194
|
+
continue;
|
|
26195
|
+
} else if (chr == ':' && !seenBracket) {
|
|
26196
|
+
if (buffer == '') return INVALID_HOST;
|
|
26197
|
+
failure = url.parseHost(buffer);
|
|
26198
|
+
if (failure) return failure;
|
|
26199
|
+
buffer = '';
|
|
26200
|
+
state = PORT;
|
|
26201
|
+
if (stateOverride == HOSTNAME) return;
|
|
26202
|
+
} else if (
|
|
26203
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
26204
|
+
(chr == '\\' && url.isSpecial())
|
|
26205
|
+
) {
|
|
26206
|
+
if (url.isSpecial() && buffer == '') return INVALID_HOST;
|
|
26207
|
+
if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;
|
|
26208
|
+
failure = url.parseHost(buffer);
|
|
26209
|
+
if (failure) return failure;
|
|
26210
|
+
buffer = '';
|
|
26211
|
+
state = PATH_START;
|
|
26212
|
+
if (stateOverride) return;
|
|
26213
|
+
continue;
|
|
26214
|
+
} else {
|
|
26215
|
+
if (chr == '[') seenBracket = true;
|
|
26216
|
+
else if (chr == ']') seenBracket = false;
|
|
26217
|
+
buffer += chr;
|
|
26218
|
+
} break;
|
|
26219
|
+
|
|
26220
|
+
case PORT:
|
|
26221
|
+
if (exec(DIGIT, chr)) {
|
|
26222
|
+
buffer += chr;
|
|
26223
|
+
} else if (
|
|
26224
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
26225
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
26226
|
+
stateOverride
|
|
26227
|
+
) {
|
|
26228
|
+
if (buffer != '') {
|
|
26229
|
+
var port = parseInt(buffer, 10);
|
|
26230
|
+
if (port > 0xFFFF) return INVALID_PORT;
|
|
26231
|
+
url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
|
|
26232
|
+
buffer = '';
|
|
26233
|
+
}
|
|
26234
|
+
if (stateOverride) return;
|
|
26235
|
+
state = PATH_START;
|
|
26236
|
+
continue;
|
|
26237
|
+
} else return INVALID_PORT;
|
|
26238
|
+
break;
|
|
26239
|
+
|
|
26240
|
+
case FILE:
|
|
26241
|
+
url.scheme = 'file';
|
|
26242
|
+
if (chr == '/' || chr == '\\') state = FILE_SLASH;
|
|
26243
|
+
else if (base && base.scheme == 'file') {
|
|
26244
|
+
if (chr == EOF) {
|
|
26245
|
+
url.host = base.host;
|
|
26246
|
+
url.path = arraySlice(base.path);
|
|
26247
|
+
url.query = base.query;
|
|
26248
|
+
} else if (chr == '?') {
|
|
26249
|
+
url.host = base.host;
|
|
26250
|
+
url.path = arraySlice(base.path);
|
|
26251
|
+
url.query = '';
|
|
26252
|
+
state = QUERY;
|
|
26253
|
+
} else if (chr == '#') {
|
|
26254
|
+
url.host = base.host;
|
|
26255
|
+
url.path = arraySlice(base.path);
|
|
26256
|
+
url.query = base.query;
|
|
26257
|
+
url.fragment = '';
|
|
26258
|
+
state = FRAGMENT;
|
|
26259
|
+
} else {
|
|
26260
|
+
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
26261
|
+
url.host = base.host;
|
|
26262
|
+
url.path = arraySlice(base.path);
|
|
26263
|
+
url.shortenPath();
|
|
26264
|
+
}
|
|
26265
|
+
state = PATH;
|
|
26266
|
+
continue;
|
|
26267
|
+
}
|
|
26268
|
+
} else {
|
|
26269
|
+
state = PATH;
|
|
26270
|
+
continue;
|
|
26271
|
+
} break;
|
|
26272
|
+
|
|
26273
|
+
case FILE_SLASH:
|
|
26274
|
+
if (chr == '/' || chr == '\\') {
|
|
26275
|
+
state = FILE_HOST;
|
|
26276
|
+
break;
|
|
26277
|
+
}
|
|
26278
|
+
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
26279
|
+
if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
|
|
26280
|
+
else url.host = base.host;
|
|
26281
|
+
}
|
|
26282
|
+
state = PATH;
|
|
26283
|
+
continue;
|
|
26284
|
+
|
|
26285
|
+
case FILE_HOST:
|
|
26286
|
+
if (chr == EOF || chr == '/' || chr == '\\' || chr == '?' || chr == '#') {
|
|
26287
|
+
if (!stateOverride && isWindowsDriveLetter(buffer)) {
|
|
26288
|
+
state = PATH;
|
|
26289
|
+
} else if (buffer == '') {
|
|
26290
|
+
url.host = '';
|
|
26291
|
+
if (stateOverride) return;
|
|
26292
|
+
state = PATH_START;
|
|
26293
|
+
} else {
|
|
26294
|
+
failure = url.parseHost(buffer);
|
|
26295
|
+
if (failure) return failure;
|
|
26296
|
+
if (url.host == 'localhost') url.host = '';
|
|
26297
|
+
if (stateOverride) return;
|
|
26298
|
+
buffer = '';
|
|
26299
|
+
state = PATH_START;
|
|
26300
|
+
} continue;
|
|
26301
|
+
} else buffer += chr;
|
|
26302
|
+
break;
|
|
26303
|
+
|
|
26304
|
+
case PATH_START:
|
|
26305
|
+
if (url.isSpecial()) {
|
|
26306
|
+
state = PATH;
|
|
26307
|
+
if (chr != '/' && chr != '\\') continue;
|
|
26308
|
+
} else if (!stateOverride && chr == '?') {
|
|
26309
|
+
url.query = '';
|
|
26310
|
+
state = QUERY;
|
|
26311
|
+
} else if (!stateOverride && chr == '#') {
|
|
26312
|
+
url.fragment = '';
|
|
26313
|
+
state = FRAGMENT;
|
|
26314
|
+
} else if (chr != EOF) {
|
|
26315
|
+
state = PATH;
|
|
26316
|
+
if (chr != '/') continue;
|
|
26317
|
+
} break;
|
|
26318
|
+
|
|
26319
|
+
case PATH:
|
|
26320
|
+
if (
|
|
26321
|
+
chr == EOF || chr == '/' ||
|
|
26322
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
26323
|
+
(!stateOverride && (chr == '?' || chr == '#'))
|
|
26324
|
+
) {
|
|
26325
|
+
if (isDoubleDot(buffer)) {
|
|
26326
|
+
url.shortenPath();
|
|
26327
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
26328
|
+
push(url.path, '');
|
|
26329
|
+
}
|
|
26330
|
+
} else if (isSingleDot(buffer)) {
|
|
26331
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
26332
|
+
push(url.path, '');
|
|
26333
|
+
}
|
|
26334
|
+
} else {
|
|
26335
|
+
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
|
26336
|
+
if (url.host) url.host = '';
|
|
26337
|
+
buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
|
|
26338
|
+
}
|
|
26339
|
+
push(url.path, buffer);
|
|
26340
|
+
}
|
|
26341
|
+
buffer = '';
|
|
26342
|
+
if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {
|
|
26343
|
+
while (url.path.length > 1 && url.path[0] === '') {
|
|
26344
|
+
shift(url.path);
|
|
26345
|
+
}
|
|
26346
|
+
}
|
|
26347
|
+
if (chr == '?') {
|
|
26348
|
+
url.query = '';
|
|
26349
|
+
state = QUERY;
|
|
26350
|
+
} else if (chr == '#') {
|
|
26351
|
+
url.fragment = '';
|
|
26352
|
+
state = FRAGMENT;
|
|
26353
|
+
}
|
|
26354
|
+
} else {
|
|
26355
|
+
buffer += percentEncode(chr, pathPercentEncodeSet);
|
|
26356
|
+
} break;
|
|
26357
|
+
|
|
26358
|
+
case CANNOT_BE_A_BASE_URL_PATH:
|
|
26359
|
+
if (chr == '?') {
|
|
26360
|
+
url.query = '';
|
|
26361
|
+
state = QUERY;
|
|
26362
|
+
} else if (chr == '#') {
|
|
26363
|
+
url.fragment = '';
|
|
26364
|
+
state = FRAGMENT;
|
|
26365
|
+
} else if (chr != EOF) {
|
|
26366
|
+
url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
26367
|
+
} break;
|
|
26368
|
+
|
|
26369
|
+
case QUERY:
|
|
26370
|
+
if (!stateOverride && chr == '#') {
|
|
26371
|
+
url.fragment = '';
|
|
26372
|
+
state = FRAGMENT;
|
|
26373
|
+
} else if (chr != EOF) {
|
|
26374
|
+
if (chr == "'" && url.isSpecial()) url.query += '%27';
|
|
26375
|
+
else if (chr == '#') url.query += '%23';
|
|
26376
|
+
else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
26377
|
+
} break;
|
|
26378
|
+
|
|
26379
|
+
case FRAGMENT:
|
|
26380
|
+
if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
|
|
26381
|
+
break;
|
|
26382
|
+
}
|
|
26383
|
+
|
|
26384
|
+
pointer++;
|
|
26385
|
+
}
|
|
26386
|
+
},
|
|
26387
|
+
// https://url.spec.whatwg.org/#host-parsing
|
|
26388
|
+
parseHost: function (input) {
|
|
26389
|
+
var result, codePoints, index;
|
|
26390
|
+
if (charAt(input, 0) == '[') {
|
|
26391
|
+
if (charAt(input, input.length - 1) != ']') return INVALID_HOST;
|
|
26392
|
+
result = parseIPv6(stringSlice(input, 1, -1));
|
|
26393
|
+
if (!result) return INVALID_HOST;
|
|
26394
|
+
this.host = result;
|
|
26395
|
+
// opaque host
|
|
26396
|
+
} else if (!this.isSpecial()) {
|
|
26397
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;
|
|
26398
|
+
result = '';
|
|
26399
|
+
codePoints = arrayFrom(input);
|
|
26400
|
+
for (index = 0; index < codePoints.length; index++) {
|
|
26401
|
+
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
|
|
26402
|
+
}
|
|
26403
|
+
this.host = result;
|
|
26404
|
+
} else {
|
|
26405
|
+
input = toASCII(input);
|
|
26406
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;
|
|
26407
|
+
result = parseIPv4(input);
|
|
26408
|
+
if (result === null) return INVALID_HOST;
|
|
26409
|
+
this.host = result;
|
|
26410
|
+
}
|
|
26411
|
+
},
|
|
26412
|
+
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
|
|
26413
|
+
cannotHaveUsernamePasswordPort: function () {
|
|
26414
|
+
return !this.host || this.cannotBeABaseURL || this.scheme == 'file';
|
|
26415
|
+
},
|
|
26416
|
+
// https://url.spec.whatwg.org/#include-credentials
|
|
26417
|
+
includesCredentials: function () {
|
|
26418
|
+
return this.username != '' || this.password != '';
|
|
26419
|
+
},
|
|
26420
|
+
// https://url.spec.whatwg.org/#is-special
|
|
26421
|
+
isSpecial: function () {
|
|
26422
|
+
return hasOwn(specialSchemes, this.scheme);
|
|
26423
|
+
},
|
|
26424
|
+
// https://url.spec.whatwg.org/#shorten-a-urls-path
|
|
26425
|
+
shortenPath: function () {
|
|
26426
|
+
var path = this.path;
|
|
26427
|
+
var pathSize = path.length;
|
|
26428
|
+
if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
|
|
26429
|
+
path.length--;
|
|
26430
|
+
}
|
|
26431
|
+
},
|
|
26432
|
+
// https://url.spec.whatwg.org/#concept-url-serializer
|
|
26433
|
+
serialize: function () {
|
|
26434
|
+
var url = this;
|
|
26435
|
+
var scheme = url.scheme;
|
|
26436
|
+
var username = url.username;
|
|
26437
|
+
var password = url.password;
|
|
26438
|
+
var host = url.host;
|
|
26439
|
+
var port = url.port;
|
|
26440
|
+
var path = url.path;
|
|
26441
|
+
var query = url.query;
|
|
26442
|
+
var fragment = url.fragment;
|
|
26443
|
+
var output = scheme + ':';
|
|
26444
|
+
if (host !== null) {
|
|
26445
|
+
output += '//';
|
|
26446
|
+
if (url.includesCredentials()) {
|
|
26447
|
+
output += username + (password ? ':' + password : '') + '@';
|
|
26448
|
+
}
|
|
26449
|
+
output += serializeHost(host);
|
|
26450
|
+
if (port !== null) output += ':' + port;
|
|
26451
|
+
} else if (scheme == 'file') output += '//';
|
|
26452
|
+
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
26453
|
+
if (query !== null) output += '?' + query;
|
|
26454
|
+
if (fragment !== null) output += '#' + fragment;
|
|
26455
|
+
return output;
|
|
26456
|
+
},
|
|
26457
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
26458
|
+
setHref: function (href) {
|
|
26459
|
+
var failure = this.parse(href);
|
|
26460
|
+
if (failure) throw TypeError(failure);
|
|
26461
|
+
this.searchParams.update();
|
|
26462
|
+
},
|
|
26463
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
26464
|
+
getOrigin: function () {
|
|
26465
|
+
var scheme = this.scheme;
|
|
26466
|
+
var port = this.port;
|
|
26467
|
+
if (scheme == 'blob') try {
|
|
26468
|
+
return new URLConstructor(scheme.path[0]).origin;
|
|
26469
|
+
} catch (error) {
|
|
26470
|
+
return 'null';
|
|
26471
|
+
}
|
|
26472
|
+
if (scheme == 'file' || !this.isSpecial()) return 'null';
|
|
26473
|
+
return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
|
|
26474
|
+
},
|
|
26475
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
26476
|
+
getProtocol: function () {
|
|
26477
|
+
return this.scheme + ':';
|
|
26478
|
+
},
|
|
26479
|
+
setProtocol: function (protocol) {
|
|
26480
|
+
this.parse($toString(protocol) + ':', SCHEME_START);
|
|
26481
|
+
},
|
|
26482
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
26483
|
+
getUsername: function () {
|
|
26484
|
+
return this.username;
|
|
26485
|
+
},
|
|
26486
|
+
setUsername: function (username) {
|
|
26487
|
+
var codePoints = arrayFrom($toString(username));
|
|
26488
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
26489
|
+
this.username = '';
|
|
26490
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
26491
|
+
this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
26492
|
+
}
|
|
26493
|
+
},
|
|
26494
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
26495
|
+
getPassword: function () {
|
|
26496
|
+
return this.password;
|
|
26497
|
+
},
|
|
26498
|
+
setPassword: function (password) {
|
|
26499
|
+
var codePoints = arrayFrom($toString(password));
|
|
26500
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
26501
|
+
this.password = '';
|
|
26502
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
26503
|
+
this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
26504
|
+
}
|
|
26505
|
+
},
|
|
26506
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
26507
|
+
getHost: function () {
|
|
26508
|
+
var host = this.host;
|
|
26509
|
+
var port = this.port;
|
|
26510
|
+
return host === null ? ''
|
|
26511
|
+
: port === null ? serializeHost(host)
|
|
26512
|
+
: serializeHost(host) + ':' + port;
|
|
26513
|
+
},
|
|
26514
|
+
setHost: function (host) {
|
|
26515
|
+
if (this.cannotBeABaseURL) return;
|
|
26516
|
+
this.parse(host, HOST);
|
|
26517
|
+
},
|
|
26518
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
26519
|
+
getHostname: function () {
|
|
26520
|
+
var host = this.host;
|
|
26521
|
+
return host === null ? '' : serializeHost(host);
|
|
26522
|
+
},
|
|
26523
|
+
setHostname: function (hostname) {
|
|
26524
|
+
if (this.cannotBeABaseURL) return;
|
|
26525
|
+
this.parse(hostname, HOSTNAME);
|
|
26526
|
+
},
|
|
26527
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
26528
|
+
getPort: function () {
|
|
26529
|
+
var port = this.port;
|
|
26530
|
+
return port === null ? '' : $toString(port);
|
|
26531
|
+
},
|
|
26532
|
+
setPort: function (port) {
|
|
26533
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
26534
|
+
port = $toString(port);
|
|
26535
|
+
if (port == '') this.port = null;
|
|
26536
|
+
else this.parse(port, PORT);
|
|
26537
|
+
},
|
|
26538
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
26539
|
+
getPathname: function () {
|
|
26540
|
+
var path = this.path;
|
|
26541
|
+
return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
26542
|
+
},
|
|
26543
|
+
setPathname: function (pathname) {
|
|
26544
|
+
if (this.cannotBeABaseURL) return;
|
|
26545
|
+
this.path = [];
|
|
26546
|
+
this.parse(pathname, PATH_START);
|
|
26547
|
+
},
|
|
26548
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
26549
|
+
getSearch: function () {
|
|
26550
|
+
var query = this.query;
|
|
26551
|
+
return query ? '?' + query : '';
|
|
26552
|
+
},
|
|
26553
|
+
setSearch: function (search) {
|
|
26554
|
+
search = $toString(search);
|
|
26555
|
+
if (search == '') {
|
|
26556
|
+
this.query = null;
|
|
26557
|
+
} else {
|
|
26558
|
+
if ('?' == charAt(search, 0)) search = stringSlice(search, 1);
|
|
26559
|
+
this.query = '';
|
|
26560
|
+
this.parse(search, QUERY);
|
|
26561
|
+
}
|
|
26562
|
+
this.searchParams.update();
|
|
26563
|
+
},
|
|
26564
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
26565
|
+
getSearchParams: function () {
|
|
26566
|
+
return this.searchParams.facade;
|
|
26567
|
+
},
|
|
26568
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
26569
|
+
getHash: function () {
|
|
26570
|
+
var fragment = this.fragment;
|
|
26571
|
+
return fragment ? '#' + fragment : '';
|
|
26572
|
+
},
|
|
26573
|
+
setHash: function (hash) {
|
|
26574
|
+
hash = $toString(hash);
|
|
26575
|
+
if (hash == '') {
|
|
26576
|
+
this.fragment = null;
|
|
26577
|
+
return;
|
|
26578
|
+
}
|
|
26579
|
+
if ('#' == charAt(hash, 0)) hash = stringSlice(hash, 1);
|
|
26580
|
+
this.fragment = '';
|
|
26581
|
+
this.parse(hash, FRAGMENT);
|
|
26582
|
+
},
|
|
26583
|
+
update: function () {
|
|
26584
|
+
this.query = this.searchParams.serialize() || null;
|
|
26585
|
+
}
|
|
26586
|
+
};
|
|
26587
|
+
|
|
26588
|
+
// `URL` constructor
|
|
26589
|
+
// https://url.spec.whatwg.org/#url-class
|
|
26590
|
+
var URLConstructor = function URL(url /* , base */) {
|
|
26591
|
+
var that = anInstance(this, URLPrototype);
|
|
26592
|
+
var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;
|
|
26593
|
+
var state = setInternalState(that, new URLState(url, false, base));
|
|
26594
|
+
if (!DESCRIPTORS) {
|
|
26595
|
+
that.href = state.serialize();
|
|
26596
|
+
that.origin = state.getOrigin();
|
|
26597
|
+
that.protocol = state.getProtocol();
|
|
26598
|
+
that.username = state.getUsername();
|
|
26599
|
+
that.password = state.getPassword();
|
|
26600
|
+
that.host = state.getHost();
|
|
26601
|
+
that.hostname = state.getHostname();
|
|
26602
|
+
that.port = state.getPort();
|
|
26603
|
+
that.pathname = state.getPathname();
|
|
26604
|
+
that.search = state.getSearch();
|
|
26605
|
+
that.searchParams = state.getSearchParams();
|
|
26606
|
+
that.hash = state.getHash();
|
|
26607
|
+
}
|
|
26608
|
+
};
|
|
26609
|
+
|
|
26610
|
+
var URLPrototype = URLConstructor.prototype;
|
|
26611
|
+
|
|
26612
|
+
var accessorDescriptor = function (getter, setter) {
|
|
26613
|
+
return {
|
|
26614
|
+
get: function () {
|
|
26615
|
+
return getInternalURLState(this)[getter]();
|
|
26616
|
+
},
|
|
26617
|
+
set: setter && function (value) {
|
|
26618
|
+
return getInternalURLState(this)[setter](value);
|
|
26619
|
+
},
|
|
26620
|
+
configurable: true,
|
|
26621
|
+
enumerable: true
|
|
26622
|
+
};
|
|
26623
|
+
};
|
|
26624
|
+
|
|
26625
|
+
if (DESCRIPTORS) {
|
|
26626
|
+
// `URL.prototype.href` accessors pair
|
|
26627
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
26628
|
+
defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));
|
|
26629
|
+
// `URL.prototype.origin` getter
|
|
26630
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
26631
|
+
defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));
|
|
26632
|
+
// `URL.prototype.protocol` accessors pair
|
|
26633
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
26634
|
+
defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));
|
|
26635
|
+
// `URL.prototype.username` accessors pair
|
|
26636
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
26637
|
+
defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));
|
|
26638
|
+
// `URL.prototype.password` accessors pair
|
|
26639
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
26640
|
+
defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));
|
|
26641
|
+
// `URL.prototype.host` accessors pair
|
|
26642
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
26643
|
+
defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));
|
|
26644
|
+
// `URL.prototype.hostname` accessors pair
|
|
26645
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
26646
|
+
defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));
|
|
26647
|
+
// `URL.prototype.port` accessors pair
|
|
26648
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
26649
|
+
defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));
|
|
26650
|
+
// `URL.prototype.pathname` accessors pair
|
|
26651
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
26652
|
+
defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));
|
|
26653
|
+
// `URL.prototype.search` accessors pair
|
|
26654
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
26655
|
+
defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));
|
|
26656
|
+
// `URL.prototype.searchParams` getter
|
|
26657
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
26658
|
+
defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));
|
|
26659
|
+
// `URL.prototype.hash` accessors pair
|
|
26660
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
26661
|
+
defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));
|
|
26662
|
+
}
|
|
26663
|
+
|
|
26664
|
+
// `URL.prototype.toJSON` method
|
|
26665
|
+
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
26666
|
+
defineBuiltIn(URLPrototype, 'toJSON', function toJSON() {
|
|
26667
|
+
return getInternalURLState(this).serialize();
|
|
26668
|
+
}, { enumerable: true });
|
|
26669
|
+
|
|
26670
|
+
// `URL.prototype.toString` method
|
|
26671
|
+
// https://url.spec.whatwg.org/#URL-stringification-behavior
|
|
26672
|
+
defineBuiltIn(URLPrototype, 'toString', function toString() {
|
|
26673
|
+
return getInternalURLState(this).serialize();
|
|
26674
|
+
}, { enumerable: true });
|
|
26675
|
+
|
|
26676
|
+
if (NativeURL) {
|
|
26677
|
+
var nativeCreateObjectURL = NativeURL.createObjectURL;
|
|
26678
|
+
var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
|
|
26679
|
+
// `URL.createObjectURL` method
|
|
26680
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
|
|
26681
|
+
if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));
|
|
26682
|
+
// `URL.revokeObjectURL` method
|
|
26683
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
26684
|
+
if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));
|
|
26685
|
+
}
|
|
26686
|
+
|
|
26687
|
+
setToStringTag(URLConstructor, 'URL');
|
|
26688
|
+
|
|
26689
|
+
$({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
|
|
26690
|
+
URL: URLConstructor
|
|
26691
|
+
});
|
|
26692
|
+
|
|
26693
|
+
|
|
25635
26694
|
/***/ }),
|
|
25636
26695
|
|
|
25637
26696
|
/***/ "4069":
|
|
@@ -29183,6 +30242,406 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
29183
30242
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
29184
30243
|
|
|
29185
30244
|
|
|
30245
|
+
/***/ }),
|
|
30246
|
+
|
|
30247
|
+
/***/ "5352":
|
|
30248
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
30249
|
+
|
|
30250
|
+
"use strict";
|
|
30251
|
+
|
|
30252
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
30253
|
+
__webpack_require__("e260");
|
|
30254
|
+
var $ = __webpack_require__("23e7");
|
|
30255
|
+
var global = __webpack_require__("da84");
|
|
30256
|
+
var call = __webpack_require__("c65b");
|
|
30257
|
+
var uncurryThis = __webpack_require__("e330");
|
|
30258
|
+
var DESCRIPTORS = __webpack_require__("83ab");
|
|
30259
|
+
var USE_NATIVE_URL = __webpack_require__("f354");
|
|
30260
|
+
var defineBuiltIn = __webpack_require__("cb2d");
|
|
30261
|
+
var defineBuiltIns = __webpack_require__("6964");
|
|
30262
|
+
var setToStringTag = __webpack_require__("d44e");
|
|
30263
|
+
var createIteratorConstructor = __webpack_require__("dcc3");
|
|
30264
|
+
var InternalStateModule = __webpack_require__("69f3");
|
|
30265
|
+
var anInstance = __webpack_require__("19aa");
|
|
30266
|
+
var isCallable = __webpack_require__("1626");
|
|
30267
|
+
var hasOwn = __webpack_require__("1a2d");
|
|
30268
|
+
var bind = __webpack_require__("0366");
|
|
30269
|
+
var classof = __webpack_require__("f5df");
|
|
30270
|
+
var anObject = __webpack_require__("825a");
|
|
30271
|
+
var isObject = __webpack_require__("861d");
|
|
30272
|
+
var $toString = __webpack_require__("577e");
|
|
30273
|
+
var create = __webpack_require__("7c73");
|
|
30274
|
+
var createPropertyDescriptor = __webpack_require__("5c6c");
|
|
30275
|
+
var getIterator = __webpack_require__("9a1f");
|
|
30276
|
+
var getIteratorMethod = __webpack_require__("35a1");
|
|
30277
|
+
var validateArgumentsLength = __webpack_require__("d6d6");
|
|
30278
|
+
var wellKnownSymbol = __webpack_require__("b622");
|
|
30279
|
+
var arraySort = __webpack_require__("addb");
|
|
30280
|
+
|
|
30281
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
30282
|
+
var URL_SEARCH_PARAMS = 'URLSearchParams';
|
|
30283
|
+
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
|
|
30284
|
+
var setInternalState = InternalStateModule.set;
|
|
30285
|
+
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
|
|
30286
|
+
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
|
|
30287
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
30288
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
30289
|
+
|
|
30290
|
+
// Avoid NodeJS experimental warning
|
|
30291
|
+
var safeGetBuiltIn = function (name) {
|
|
30292
|
+
if (!DESCRIPTORS) return global[name];
|
|
30293
|
+
var descriptor = getOwnPropertyDescriptor(global, name);
|
|
30294
|
+
return descriptor && descriptor.value;
|
|
30295
|
+
};
|
|
30296
|
+
|
|
30297
|
+
var nativeFetch = safeGetBuiltIn('fetch');
|
|
30298
|
+
var NativeRequest = safeGetBuiltIn('Request');
|
|
30299
|
+
var Headers = safeGetBuiltIn('Headers');
|
|
30300
|
+
var RequestPrototype = NativeRequest && NativeRequest.prototype;
|
|
30301
|
+
var HeadersPrototype = Headers && Headers.prototype;
|
|
30302
|
+
var RegExp = global.RegExp;
|
|
30303
|
+
var TypeError = global.TypeError;
|
|
30304
|
+
var decodeURIComponent = global.decodeURIComponent;
|
|
30305
|
+
var encodeURIComponent = global.encodeURIComponent;
|
|
30306
|
+
var charAt = uncurryThis(''.charAt);
|
|
30307
|
+
var join = uncurryThis([].join);
|
|
30308
|
+
var push = uncurryThis([].push);
|
|
30309
|
+
var replace = uncurryThis(''.replace);
|
|
30310
|
+
var shift = uncurryThis([].shift);
|
|
30311
|
+
var splice = uncurryThis([].splice);
|
|
30312
|
+
var split = uncurryThis(''.split);
|
|
30313
|
+
var stringSlice = uncurryThis(''.slice);
|
|
30314
|
+
|
|
30315
|
+
var plus = /\+/g;
|
|
30316
|
+
var sequences = Array(4);
|
|
30317
|
+
|
|
30318
|
+
var percentSequence = function (bytes) {
|
|
30319
|
+
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
|
|
30320
|
+
};
|
|
30321
|
+
|
|
30322
|
+
var percentDecode = function (sequence) {
|
|
30323
|
+
try {
|
|
30324
|
+
return decodeURIComponent(sequence);
|
|
30325
|
+
} catch (error) {
|
|
30326
|
+
return sequence;
|
|
30327
|
+
}
|
|
30328
|
+
};
|
|
30329
|
+
|
|
30330
|
+
var deserialize = function (it) {
|
|
30331
|
+
var result = replace(it, plus, ' ');
|
|
30332
|
+
var bytes = 4;
|
|
30333
|
+
try {
|
|
30334
|
+
return decodeURIComponent(result);
|
|
30335
|
+
} catch (error) {
|
|
30336
|
+
while (bytes) {
|
|
30337
|
+
result = replace(result, percentSequence(bytes--), percentDecode);
|
|
30338
|
+
}
|
|
30339
|
+
return result;
|
|
30340
|
+
}
|
|
30341
|
+
};
|
|
30342
|
+
|
|
30343
|
+
var find = /[!'()~]|%20/g;
|
|
30344
|
+
|
|
30345
|
+
var replacements = {
|
|
30346
|
+
'!': '%21',
|
|
30347
|
+
"'": '%27',
|
|
30348
|
+
'(': '%28',
|
|
30349
|
+
')': '%29',
|
|
30350
|
+
'~': '%7E',
|
|
30351
|
+
'%20': '+'
|
|
30352
|
+
};
|
|
30353
|
+
|
|
30354
|
+
var replacer = function (match) {
|
|
30355
|
+
return replacements[match];
|
|
30356
|
+
};
|
|
30357
|
+
|
|
30358
|
+
var serialize = function (it) {
|
|
30359
|
+
return replace(encodeURIComponent(it), find, replacer);
|
|
30360
|
+
};
|
|
30361
|
+
|
|
30362
|
+
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
|
|
30363
|
+
setInternalState(this, {
|
|
30364
|
+
type: URL_SEARCH_PARAMS_ITERATOR,
|
|
30365
|
+
iterator: getIterator(getInternalParamsState(params).entries),
|
|
30366
|
+
kind: kind
|
|
30367
|
+
});
|
|
30368
|
+
}, 'Iterator', function next() {
|
|
30369
|
+
var state = getInternalIteratorState(this);
|
|
30370
|
+
var kind = state.kind;
|
|
30371
|
+
var step = state.iterator.next();
|
|
30372
|
+
var entry = step.value;
|
|
30373
|
+
if (!step.done) {
|
|
30374
|
+
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
|
30375
|
+
} return step;
|
|
30376
|
+
}, true);
|
|
30377
|
+
|
|
30378
|
+
var URLSearchParamsState = function (init) {
|
|
30379
|
+
this.entries = [];
|
|
30380
|
+
this.url = null;
|
|
30381
|
+
|
|
30382
|
+
if (init !== undefined) {
|
|
30383
|
+
if (isObject(init)) this.parseObject(init);
|
|
30384
|
+
else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));
|
|
30385
|
+
}
|
|
30386
|
+
};
|
|
30387
|
+
|
|
30388
|
+
URLSearchParamsState.prototype = {
|
|
30389
|
+
type: URL_SEARCH_PARAMS,
|
|
30390
|
+
bindURL: function (url) {
|
|
30391
|
+
this.url = url;
|
|
30392
|
+
this.update();
|
|
30393
|
+
},
|
|
30394
|
+
parseObject: function (object) {
|
|
30395
|
+
var iteratorMethod = getIteratorMethod(object);
|
|
30396
|
+
var iterator, next, step, entryIterator, entryNext, first, second;
|
|
30397
|
+
|
|
30398
|
+
if (iteratorMethod) {
|
|
30399
|
+
iterator = getIterator(object, iteratorMethod);
|
|
30400
|
+
next = iterator.next;
|
|
30401
|
+
while (!(step = call(next, iterator)).done) {
|
|
30402
|
+
entryIterator = getIterator(anObject(step.value));
|
|
30403
|
+
entryNext = entryIterator.next;
|
|
30404
|
+
if (
|
|
30405
|
+
(first = call(entryNext, entryIterator)).done ||
|
|
30406
|
+
(second = call(entryNext, entryIterator)).done ||
|
|
30407
|
+
!call(entryNext, entryIterator).done
|
|
30408
|
+
) throw TypeError('Expected sequence with length 2');
|
|
30409
|
+
push(this.entries, { key: $toString(first.value), value: $toString(second.value) });
|
|
30410
|
+
}
|
|
30411
|
+
} else for (var key in object) if (hasOwn(object, key)) {
|
|
30412
|
+
push(this.entries, { key: key, value: $toString(object[key]) });
|
|
30413
|
+
}
|
|
30414
|
+
},
|
|
30415
|
+
parseQuery: function (query) {
|
|
30416
|
+
if (query) {
|
|
30417
|
+
var attributes = split(query, '&');
|
|
30418
|
+
var index = 0;
|
|
30419
|
+
var attribute, entry;
|
|
30420
|
+
while (index < attributes.length) {
|
|
30421
|
+
attribute = attributes[index++];
|
|
30422
|
+
if (attribute.length) {
|
|
30423
|
+
entry = split(attribute, '=');
|
|
30424
|
+
push(this.entries, {
|
|
30425
|
+
key: deserialize(shift(entry)),
|
|
30426
|
+
value: deserialize(join(entry, '='))
|
|
30427
|
+
});
|
|
30428
|
+
}
|
|
30429
|
+
}
|
|
30430
|
+
}
|
|
30431
|
+
},
|
|
30432
|
+
serialize: function () {
|
|
30433
|
+
var entries = this.entries;
|
|
30434
|
+
var result = [];
|
|
30435
|
+
var index = 0;
|
|
30436
|
+
var entry;
|
|
30437
|
+
while (index < entries.length) {
|
|
30438
|
+
entry = entries[index++];
|
|
30439
|
+
push(result, serialize(entry.key) + '=' + serialize(entry.value));
|
|
30440
|
+
} return join(result, '&');
|
|
30441
|
+
},
|
|
30442
|
+
update: function () {
|
|
30443
|
+
this.entries.length = 0;
|
|
30444
|
+
this.parseQuery(this.url.query);
|
|
30445
|
+
},
|
|
30446
|
+
updateURL: function () {
|
|
30447
|
+
if (this.url) this.url.update();
|
|
30448
|
+
}
|
|
30449
|
+
};
|
|
30450
|
+
|
|
30451
|
+
// `URLSearchParams` constructor
|
|
30452
|
+
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
30453
|
+
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
30454
|
+
anInstance(this, URLSearchParamsPrototype);
|
|
30455
|
+
var init = arguments.length > 0 ? arguments[0] : undefined;
|
|
30456
|
+
setInternalState(this, new URLSearchParamsState(init));
|
|
30457
|
+
};
|
|
30458
|
+
|
|
30459
|
+
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
30460
|
+
|
|
30461
|
+
defineBuiltIns(URLSearchParamsPrototype, {
|
|
30462
|
+
// `URLSearchParams.prototype.append` method
|
|
30463
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
30464
|
+
append: function append(name, value) {
|
|
30465
|
+
validateArgumentsLength(arguments.length, 2);
|
|
30466
|
+
var state = getInternalParamsState(this);
|
|
30467
|
+
push(state.entries, { key: $toString(name), value: $toString(value) });
|
|
30468
|
+
state.updateURL();
|
|
30469
|
+
},
|
|
30470
|
+
// `URLSearchParams.prototype.delete` method
|
|
30471
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
30472
|
+
'delete': function (name) {
|
|
30473
|
+
validateArgumentsLength(arguments.length, 1);
|
|
30474
|
+
var state = getInternalParamsState(this);
|
|
30475
|
+
var entries = state.entries;
|
|
30476
|
+
var key = $toString(name);
|
|
30477
|
+
var index = 0;
|
|
30478
|
+
while (index < entries.length) {
|
|
30479
|
+
if (entries[index].key === key) splice(entries, index, 1);
|
|
30480
|
+
else index++;
|
|
30481
|
+
}
|
|
30482
|
+
state.updateURL();
|
|
30483
|
+
},
|
|
30484
|
+
// `URLSearchParams.prototype.get` method
|
|
30485
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
30486
|
+
get: function get(name) {
|
|
30487
|
+
validateArgumentsLength(arguments.length, 1);
|
|
30488
|
+
var entries = getInternalParamsState(this).entries;
|
|
30489
|
+
var key = $toString(name);
|
|
30490
|
+
var index = 0;
|
|
30491
|
+
for (; index < entries.length; index++) {
|
|
30492
|
+
if (entries[index].key === key) return entries[index].value;
|
|
30493
|
+
}
|
|
30494
|
+
return null;
|
|
30495
|
+
},
|
|
30496
|
+
// `URLSearchParams.prototype.getAll` method
|
|
30497
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
30498
|
+
getAll: function getAll(name) {
|
|
30499
|
+
validateArgumentsLength(arguments.length, 1);
|
|
30500
|
+
var entries = getInternalParamsState(this).entries;
|
|
30501
|
+
var key = $toString(name);
|
|
30502
|
+
var result = [];
|
|
30503
|
+
var index = 0;
|
|
30504
|
+
for (; index < entries.length; index++) {
|
|
30505
|
+
if (entries[index].key === key) push(result, entries[index].value);
|
|
30506
|
+
}
|
|
30507
|
+
return result;
|
|
30508
|
+
},
|
|
30509
|
+
// `URLSearchParams.prototype.has` method
|
|
30510
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
30511
|
+
has: function has(name) {
|
|
30512
|
+
validateArgumentsLength(arguments.length, 1);
|
|
30513
|
+
var entries = getInternalParamsState(this).entries;
|
|
30514
|
+
var key = $toString(name);
|
|
30515
|
+
var index = 0;
|
|
30516
|
+
while (index < entries.length) {
|
|
30517
|
+
if (entries[index++].key === key) return true;
|
|
30518
|
+
}
|
|
30519
|
+
return false;
|
|
30520
|
+
},
|
|
30521
|
+
// `URLSearchParams.prototype.set` method
|
|
30522
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
30523
|
+
set: function set(name, value) {
|
|
30524
|
+
validateArgumentsLength(arguments.length, 1);
|
|
30525
|
+
var state = getInternalParamsState(this);
|
|
30526
|
+
var entries = state.entries;
|
|
30527
|
+
var found = false;
|
|
30528
|
+
var key = $toString(name);
|
|
30529
|
+
var val = $toString(value);
|
|
30530
|
+
var index = 0;
|
|
30531
|
+
var entry;
|
|
30532
|
+
for (; index < entries.length; index++) {
|
|
30533
|
+
entry = entries[index];
|
|
30534
|
+
if (entry.key === key) {
|
|
30535
|
+
if (found) splice(entries, index--, 1);
|
|
30536
|
+
else {
|
|
30537
|
+
found = true;
|
|
30538
|
+
entry.value = val;
|
|
30539
|
+
}
|
|
30540
|
+
}
|
|
30541
|
+
}
|
|
30542
|
+
if (!found) push(entries, { key: key, value: val });
|
|
30543
|
+
state.updateURL();
|
|
30544
|
+
},
|
|
30545
|
+
// `URLSearchParams.prototype.sort` method
|
|
30546
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
30547
|
+
sort: function sort() {
|
|
30548
|
+
var state = getInternalParamsState(this);
|
|
30549
|
+
arraySort(state.entries, function (a, b) {
|
|
30550
|
+
return a.key > b.key ? 1 : -1;
|
|
30551
|
+
});
|
|
30552
|
+
state.updateURL();
|
|
30553
|
+
},
|
|
30554
|
+
// `URLSearchParams.prototype.forEach` method
|
|
30555
|
+
forEach: function forEach(callback /* , thisArg */) {
|
|
30556
|
+
var entries = getInternalParamsState(this).entries;
|
|
30557
|
+
var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);
|
|
30558
|
+
var index = 0;
|
|
30559
|
+
var entry;
|
|
30560
|
+
while (index < entries.length) {
|
|
30561
|
+
entry = entries[index++];
|
|
30562
|
+
boundFunction(entry.value, entry.key, this);
|
|
30563
|
+
}
|
|
30564
|
+
},
|
|
30565
|
+
// `URLSearchParams.prototype.keys` method
|
|
30566
|
+
keys: function keys() {
|
|
30567
|
+
return new URLSearchParamsIterator(this, 'keys');
|
|
30568
|
+
},
|
|
30569
|
+
// `URLSearchParams.prototype.values` method
|
|
30570
|
+
values: function values() {
|
|
30571
|
+
return new URLSearchParamsIterator(this, 'values');
|
|
30572
|
+
},
|
|
30573
|
+
// `URLSearchParams.prototype.entries` method
|
|
30574
|
+
entries: function entries() {
|
|
30575
|
+
return new URLSearchParamsIterator(this, 'entries');
|
|
30576
|
+
}
|
|
30577
|
+
}, { enumerable: true });
|
|
30578
|
+
|
|
30579
|
+
// `URLSearchParams.prototype[@@iterator]` method
|
|
30580
|
+
defineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });
|
|
30581
|
+
|
|
30582
|
+
// `URLSearchParams.prototype.toString` method
|
|
30583
|
+
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
30584
|
+
defineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {
|
|
30585
|
+
return getInternalParamsState(this).serialize();
|
|
30586
|
+
}, { enumerable: true });
|
|
30587
|
+
|
|
30588
|
+
setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
|
|
30589
|
+
|
|
30590
|
+
$({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {
|
|
30591
|
+
URLSearchParams: URLSearchParamsConstructor
|
|
30592
|
+
});
|
|
30593
|
+
|
|
30594
|
+
// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
|
|
30595
|
+
if (!USE_NATIVE_URL && isCallable(Headers)) {
|
|
30596
|
+
var headersHas = uncurryThis(HeadersPrototype.has);
|
|
30597
|
+
var headersSet = uncurryThis(HeadersPrototype.set);
|
|
30598
|
+
|
|
30599
|
+
var wrapRequestOptions = function (init) {
|
|
30600
|
+
if (isObject(init)) {
|
|
30601
|
+
var body = init.body;
|
|
30602
|
+
var headers;
|
|
30603
|
+
if (classof(body) === URL_SEARCH_PARAMS) {
|
|
30604
|
+
headers = init.headers ? new Headers(init.headers) : new Headers();
|
|
30605
|
+
if (!headersHas(headers, 'content-type')) {
|
|
30606
|
+
headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
30607
|
+
}
|
|
30608
|
+
return create(init, {
|
|
30609
|
+
body: createPropertyDescriptor(0, $toString(body)),
|
|
30610
|
+
headers: createPropertyDescriptor(0, headers)
|
|
30611
|
+
});
|
|
30612
|
+
}
|
|
30613
|
+
} return init;
|
|
30614
|
+
};
|
|
30615
|
+
|
|
30616
|
+
if (isCallable(nativeFetch)) {
|
|
30617
|
+
$({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
|
|
30618
|
+
fetch: function fetch(input /* , init */) {
|
|
30619
|
+
return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
30620
|
+
}
|
|
30621
|
+
});
|
|
30622
|
+
}
|
|
30623
|
+
|
|
30624
|
+
if (isCallable(NativeRequest)) {
|
|
30625
|
+
var RequestConstructor = function Request(input /* , init */) {
|
|
30626
|
+
anInstance(this, RequestPrototype);
|
|
30627
|
+
return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
30628
|
+
};
|
|
30629
|
+
|
|
30630
|
+
RequestPrototype.constructor = RequestConstructor;
|
|
30631
|
+
RequestConstructor.prototype = RequestPrototype;
|
|
30632
|
+
|
|
30633
|
+
$({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
|
|
30634
|
+
Request: RequestConstructor
|
|
30635
|
+
});
|
|
30636
|
+
}
|
|
30637
|
+
}
|
|
30638
|
+
|
|
30639
|
+
module.exports = {
|
|
30640
|
+
URLSearchParams: URLSearchParamsConstructor,
|
|
30641
|
+
getState: getInternalParamsState
|
|
30642
|
+
};
|
|
30643
|
+
|
|
30644
|
+
|
|
29186
30645
|
/***/ }),
|
|
29187
30646
|
|
|
29188
30647
|
/***/ "547a":
|
|
@@ -41749,6 +43208,195 @@ module.exports = FORCED_PROMISE_CONSTRUCTOR || !checkCorrectnessOfIteration(func
|
|
|
41749
43208
|
});
|
|
41750
43209
|
|
|
41751
43210
|
|
|
43211
|
+
/***/ }),
|
|
43212
|
+
|
|
43213
|
+
/***/ "5fb2":
|
|
43214
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
43215
|
+
|
|
43216
|
+
"use strict";
|
|
43217
|
+
|
|
43218
|
+
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
|
|
43219
|
+
var uncurryThis = __webpack_require__("e330");
|
|
43220
|
+
|
|
43221
|
+
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
|
|
43222
|
+
var base = 36;
|
|
43223
|
+
var tMin = 1;
|
|
43224
|
+
var tMax = 26;
|
|
43225
|
+
var skew = 38;
|
|
43226
|
+
var damp = 700;
|
|
43227
|
+
var initialBias = 72;
|
|
43228
|
+
var initialN = 128; // 0x80
|
|
43229
|
+
var delimiter = '-'; // '\x2D'
|
|
43230
|
+
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
|
|
43231
|
+
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
43232
|
+
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
|
|
43233
|
+
var baseMinusTMin = base - tMin;
|
|
43234
|
+
|
|
43235
|
+
var $RangeError = RangeError;
|
|
43236
|
+
var exec = uncurryThis(regexSeparators.exec);
|
|
43237
|
+
var floor = Math.floor;
|
|
43238
|
+
var fromCharCode = String.fromCharCode;
|
|
43239
|
+
var charCodeAt = uncurryThis(''.charCodeAt);
|
|
43240
|
+
var join = uncurryThis([].join);
|
|
43241
|
+
var push = uncurryThis([].push);
|
|
43242
|
+
var replace = uncurryThis(''.replace);
|
|
43243
|
+
var split = uncurryThis(''.split);
|
|
43244
|
+
var toLowerCase = uncurryThis(''.toLowerCase);
|
|
43245
|
+
|
|
43246
|
+
/**
|
|
43247
|
+
* Creates an array containing the numeric code points of each Unicode
|
|
43248
|
+
* character in the string. While JavaScript uses UCS-2 internally,
|
|
43249
|
+
* this function will convert a pair of surrogate halves (each of which
|
|
43250
|
+
* UCS-2 exposes as separate characters) into a single code point,
|
|
43251
|
+
* matching UTF-16.
|
|
43252
|
+
*/
|
|
43253
|
+
var ucs2decode = function (string) {
|
|
43254
|
+
var output = [];
|
|
43255
|
+
var counter = 0;
|
|
43256
|
+
var length = string.length;
|
|
43257
|
+
while (counter < length) {
|
|
43258
|
+
var value = charCodeAt(string, counter++);
|
|
43259
|
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
43260
|
+
// It's a high surrogate, and there is a next character.
|
|
43261
|
+
var extra = charCodeAt(string, counter++);
|
|
43262
|
+
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
|
|
43263
|
+
push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
43264
|
+
} else {
|
|
43265
|
+
// It's an unmatched surrogate; only append this code unit, in case the
|
|
43266
|
+
// next code unit is the high surrogate of a surrogate pair.
|
|
43267
|
+
push(output, value);
|
|
43268
|
+
counter--;
|
|
43269
|
+
}
|
|
43270
|
+
} else {
|
|
43271
|
+
push(output, value);
|
|
43272
|
+
}
|
|
43273
|
+
}
|
|
43274
|
+
return output;
|
|
43275
|
+
};
|
|
43276
|
+
|
|
43277
|
+
/**
|
|
43278
|
+
* Converts a digit/integer into a basic code point.
|
|
43279
|
+
*/
|
|
43280
|
+
var digitToBasic = function (digit) {
|
|
43281
|
+
// 0..25 map to ASCII a..z or A..Z
|
|
43282
|
+
// 26..35 map to ASCII 0..9
|
|
43283
|
+
return digit + 22 + 75 * (digit < 26);
|
|
43284
|
+
};
|
|
43285
|
+
|
|
43286
|
+
/**
|
|
43287
|
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
|
43288
|
+
* https://tools.ietf.org/html/rfc3492#section-3.4
|
|
43289
|
+
*/
|
|
43290
|
+
var adapt = function (delta, numPoints, firstTime) {
|
|
43291
|
+
var k = 0;
|
|
43292
|
+
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
|
43293
|
+
delta += floor(delta / numPoints);
|
|
43294
|
+
while (delta > baseMinusTMin * tMax >> 1) {
|
|
43295
|
+
delta = floor(delta / baseMinusTMin);
|
|
43296
|
+
k += base;
|
|
43297
|
+
}
|
|
43298
|
+
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
43299
|
+
};
|
|
43300
|
+
|
|
43301
|
+
/**
|
|
43302
|
+
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
|
43303
|
+
* Punycode string of ASCII-only symbols.
|
|
43304
|
+
*/
|
|
43305
|
+
var encode = function (input) {
|
|
43306
|
+
var output = [];
|
|
43307
|
+
|
|
43308
|
+
// Convert the input in UCS-2 to an array of Unicode code points.
|
|
43309
|
+
input = ucs2decode(input);
|
|
43310
|
+
|
|
43311
|
+
// Cache the length.
|
|
43312
|
+
var inputLength = input.length;
|
|
43313
|
+
|
|
43314
|
+
// Initialize the state.
|
|
43315
|
+
var n = initialN;
|
|
43316
|
+
var delta = 0;
|
|
43317
|
+
var bias = initialBias;
|
|
43318
|
+
var i, currentValue;
|
|
43319
|
+
|
|
43320
|
+
// Handle the basic code points.
|
|
43321
|
+
for (i = 0; i < input.length; i++) {
|
|
43322
|
+
currentValue = input[i];
|
|
43323
|
+
if (currentValue < 0x80) {
|
|
43324
|
+
push(output, fromCharCode(currentValue));
|
|
43325
|
+
}
|
|
43326
|
+
}
|
|
43327
|
+
|
|
43328
|
+
var basicLength = output.length; // number of basic code points.
|
|
43329
|
+
var handledCPCount = basicLength; // number of code points that have been handled;
|
|
43330
|
+
|
|
43331
|
+
// Finish the basic string with a delimiter unless it's empty.
|
|
43332
|
+
if (basicLength) {
|
|
43333
|
+
push(output, delimiter);
|
|
43334
|
+
}
|
|
43335
|
+
|
|
43336
|
+
// Main encoding loop:
|
|
43337
|
+
while (handledCPCount < inputLength) {
|
|
43338
|
+
// All non-basic code points < n have been handled already. Find the next larger one:
|
|
43339
|
+
var m = maxInt;
|
|
43340
|
+
for (i = 0; i < input.length; i++) {
|
|
43341
|
+
currentValue = input[i];
|
|
43342
|
+
if (currentValue >= n && currentValue < m) {
|
|
43343
|
+
m = currentValue;
|
|
43344
|
+
}
|
|
43345
|
+
}
|
|
43346
|
+
|
|
43347
|
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
|
|
43348
|
+
var handledCPCountPlusOne = handledCPCount + 1;
|
|
43349
|
+
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
|
43350
|
+
throw $RangeError(OVERFLOW_ERROR);
|
|
43351
|
+
}
|
|
43352
|
+
|
|
43353
|
+
delta += (m - n) * handledCPCountPlusOne;
|
|
43354
|
+
n = m;
|
|
43355
|
+
|
|
43356
|
+
for (i = 0; i < input.length; i++) {
|
|
43357
|
+
currentValue = input[i];
|
|
43358
|
+
if (currentValue < n && ++delta > maxInt) {
|
|
43359
|
+
throw $RangeError(OVERFLOW_ERROR);
|
|
43360
|
+
}
|
|
43361
|
+
if (currentValue == n) {
|
|
43362
|
+
// Represent delta as a generalized variable-length integer.
|
|
43363
|
+
var q = delta;
|
|
43364
|
+
var k = base;
|
|
43365
|
+
while (true) {
|
|
43366
|
+
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
43367
|
+
if (q < t) break;
|
|
43368
|
+
var qMinusT = q - t;
|
|
43369
|
+
var baseMinusT = base - t;
|
|
43370
|
+
push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
|
|
43371
|
+
q = floor(qMinusT / baseMinusT);
|
|
43372
|
+
k += base;
|
|
43373
|
+
}
|
|
43374
|
+
|
|
43375
|
+
push(output, fromCharCode(digitToBasic(q)));
|
|
43376
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
43377
|
+
delta = 0;
|
|
43378
|
+
handledCPCount++;
|
|
43379
|
+
}
|
|
43380
|
+
}
|
|
43381
|
+
|
|
43382
|
+
delta++;
|
|
43383
|
+
n++;
|
|
43384
|
+
}
|
|
43385
|
+
return join(output, '');
|
|
43386
|
+
};
|
|
43387
|
+
|
|
43388
|
+
module.exports = function (input) {
|
|
43389
|
+
var encoded = [];
|
|
43390
|
+
var labels = split(replace(toLowerCase(input), regexSeparators, '\u002E'), '.');
|
|
43391
|
+
var i, label;
|
|
43392
|
+
for (i = 0; i < labels.length; i++) {
|
|
43393
|
+
label = labels[i];
|
|
43394
|
+
push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label);
|
|
43395
|
+
}
|
|
43396
|
+
return join(encoded, '.');
|
|
43397
|
+
};
|
|
43398
|
+
|
|
43399
|
+
|
|
41752
43400
|
/***/ }),
|
|
41753
43401
|
|
|
41754
43402
|
/***/ "5fbd":
|
|
@@ -50770,6 +52418,15 @@ module.exports = isForced;
|
|
|
50770
52418
|
})));
|
|
50771
52419
|
|
|
50772
52420
|
|
|
52421
|
+
/***/ }),
|
|
52422
|
+
|
|
52423
|
+
/***/ "9861":
|
|
52424
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
52425
|
+
|
|
52426
|
+
// TODO: Remove this module from `core-js@4` since it's replaced to module below
|
|
52427
|
+
__webpack_require__("5352");
|
|
52428
|
+
|
|
52429
|
+
|
|
50773
52430
|
/***/ }),
|
|
50774
52431
|
|
|
50775
52432
|
/***/ "99af":
|
|
@@ -63458,6 +65115,25 @@ Object.defineProperty(exports, "isDocument", { enumerable: true, get: function (
|
|
|
63458
65115
|
Object.defineProperty(exports, "hasChildren", { enumerable: true, get: function () { return domhandler_1.hasChildren; } });
|
|
63459
65116
|
|
|
63460
65117
|
|
|
65118
|
+
/***/ }),
|
|
65119
|
+
|
|
65120
|
+
/***/ "bf19":
|
|
65121
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
65122
|
+
|
|
65123
|
+
"use strict";
|
|
65124
|
+
|
|
65125
|
+
var $ = __webpack_require__("23e7");
|
|
65126
|
+
var call = __webpack_require__("c65b");
|
|
65127
|
+
|
|
65128
|
+
// `URL.prototype.toJSON` method
|
|
65129
|
+
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
65130
|
+
$({ target: 'URL', proto: true, enumerable: true }, {
|
|
65131
|
+
toJSON: function toJSON() {
|
|
65132
|
+
return call(URL.prototype.toString, this);
|
|
65133
|
+
}
|
|
65134
|
+
});
|
|
65135
|
+
|
|
65136
|
+
|
|
63461
65137
|
/***/ }),
|
|
63462
65138
|
|
|
63463
65139
|
/***/ "c04e":
|
|
@@ -76359,6 +78035,47 @@ exports.default = DomHandler;
|
|
|
76359
78035
|
})));
|
|
76360
78036
|
|
|
76361
78037
|
|
|
78038
|
+
/***/ }),
|
|
78039
|
+
|
|
78040
|
+
/***/ "f354":
|
|
78041
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
78042
|
+
|
|
78043
|
+
var fails = __webpack_require__("d039");
|
|
78044
|
+
var wellKnownSymbol = __webpack_require__("b622");
|
|
78045
|
+
var IS_PURE = __webpack_require__("c430");
|
|
78046
|
+
|
|
78047
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
78048
|
+
|
|
78049
|
+
module.exports = !fails(function () {
|
|
78050
|
+
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
78051
|
+
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
|
78052
|
+
var searchParams = url.searchParams;
|
|
78053
|
+
var result = '';
|
|
78054
|
+
url.pathname = 'c%20d';
|
|
78055
|
+
searchParams.forEach(function (value, key) {
|
|
78056
|
+
searchParams['delete']('b');
|
|
78057
|
+
result += key + value;
|
|
78058
|
+
});
|
|
78059
|
+
return (IS_PURE && !url.toJSON)
|
|
78060
|
+
|| !searchParams.sort
|
|
78061
|
+
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
|
78062
|
+
|| searchParams.get('c') !== '3'
|
|
78063
|
+
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
|
78064
|
+
|| !searchParams[ITERATOR]
|
|
78065
|
+
// throws in Edge
|
|
78066
|
+
|| new URL('https://a@b').username !== 'a'
|
|
78067
|
+
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
|
78068
|
+
// not punycoded in Edge
|
|
78069
|
+
|| new URL('http://тест').host !== 'xn--e1aybc'
|
|
78070
|
+
// not escaped in Chrome 62-
|
|
78071
|
+
|| new URL('http://a#б').hash !== '#%D0%B1'
|
|
78072
|
+
// fails in Chrome 66-
|
|
78073
|
+
|| result !== 'a1c3'
|
|
78074
|
+
// throws in Safari
|
|
78075
|
+
|| new URL('http://x', undefined).host !== 'x';
|
|
78076
|
+
});
|
|
78077
|
+
|
|
78078
|
+
|
|
76362
78079
|
/***/ }),
|
|
76363
78080
|
|
|
76364
78081
|
/***/ "f36a":
|
|
@@ -89942,6 +91659,15 @@ var web_dom_exception_stack = __webpack_require__("b7ef");
|
|
|
89942
91659
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-exception.to-string-tag.js
|
|
89943
91660
|
var web_dom_exception_to_string_tag = __webpack_require__("8bd4");
|
|
89944
91661
|
|
|
91662
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
|
|
91663
|
+
var web_url = __webpack_require__("2b3d");
|
|
91664
|
+
|
|
91665
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.to-json.js
|
|
91666
|
+
var web_url_to_json = __webpack_require__("bf19");
|
|
91667
|
+
|
|
91668
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
|
|
91669
|
+
var web_url_search_params = __webpack_require__("9861");
|
|
91670
|
+
|
|
89945
91671
|
// CONCATENATED MODULE: ./src/utils.js
|
|
89946
91672
|
|
|
89947
91673
|
|
|
@@ -89957,6 +91683,12 @@ var web_dom_exception_to_string_tag = __webpack_require__("8bd4");
|
|
|
89957
91683
|
|
|
89958
91684
|
|
|
89959
91685
|
|
|
91686
|
+
|
|
91687
|
+
|
|
91688
|
+
|
|
91689
|
+
|
|
91690
|
+
|
|
91691
|
+
|
|
89960
91692
|
|
|
89961
91693
|
|
|
89962
91694
|
|
|
@@ -90057,7 +91789,7 @@ var web_dom_exception_to_string_tag = __webpack_require__("8bd4");
|
|
|
90057
91789
|
getFilenameFromHeaders: function getFilenameFromHeaders(headers) {
|
|
90058
91790
|
var disposition = headers['content-disposition'];
|
|
90059
91791
|
if (disposition && disposition.indexOf('attachment') !== -1) {
|
|
90060
|
-
var filenameRegex = /filename
|
|
91792
|
+
var filenameRegex = /filename\*?=(?:UTF-8'')?["']?([^"';\n]*)["']?/i;
|
|
90061
91793
|
var matches = filenameRegex.exec(disposition);
|
|
90062
91794
|
if (matches != null && matches[1]) {
|
|
90063
91795
|
return matches[1].replace(/['"]/g, '');
|
|
@@ -90065,6 +91797,14 @@ var web_dom_exception_to_string_tag = __webpack_require__("8bd4");
|
|
|
90065
91797
|
}
|
|
90066
91798
|
return null;
|
|
90067
91799
|
},
|
|
91800
|
+
getFileFromBlob: function getFileFromBlob(blobData, fileName) {
|
|
91801
|
+
var url = window.URL.createObjectURL(blobData);
|
|
91802
|
+
var link = document.createElement("a");
|
|
91803
|
+
link.download = fileName;
|
|
91804
|
+
link.href = url;
|
|
91805
|
+
link.click();
|
|
91806
|
+
window.URL.revokeObjectURL(url);
|
|
91807
|
+
},
|
|
90068
91808
|
compressImageFile: function compressImageFile(file, fileReaderEvent, maxResolution, quality, compressImageFileCallback) {
|
|
90069
91809
|
var MAX_RESOLUTION = maxResolution || 1200;
|
|
90070
91810
|
var QUALITY = quality === 'low' ? 0.1 : quality === 'medium' ? 0.5 : 1;
|