@hebcal/rest-api 4.5.1 → 4.5.2
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/bundle.js +202 -186
- package/dist/bundle.min.js +2 -2
- package/dist/fullcalendar.js +1 -1
- package/dist/fullcalendar.min.js +1 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +15 -15
package/dist/bundle.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v4.5.
|
|
1
|
+
/*! @hebcal/rest-api v4.5.2 */
|
|
2
2
|
var hebcal__rest_api = (function (exports, core, leyning, triennial) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
|
|
7
7
|
var check = function (it) {
|
|
8
|
-
return it && it.Math
|
|
8
|
+
return it && it.Math === Math && it;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
@@ -34,7 +34,7 @@ var fails$g = fails$h;
|
|
|
34
34
|
// Detect IE8's incomplete defineProperty implementation
|
|
35
35
|
var descriptors = !fails$g(function () {
|
|
36
36
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
37
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
37
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
var fails$f = fails$h;
|
|
@@ -113,7 +113,7 @@ var indexedObject = fails$e(function () {
|
|
|
113
113
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
114
114
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
115
115
|
}) ? function (it) {
|
|
116
|
-
return classof$6(it)
|
|
116
|
+
return classof$6(it) === 'String' ? split$3(it, '') : $Object$4(it);
|
|
117
117
|
} : $Object$4;
|
|
118
118
|
|
|
119
119
|
// we can't use just `it == null` since of `document.all` special case
|
|
@@ -221,7 +221,6 @@ if (!version && userAgent) {
|
|
|
221
221
|
var engineV8Version = version;
|
|
222
222
|
|
|
223
223
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
224
|
-
|
|
225
224
|
var V8_VERSION = engineV8Version;
|
|
226
225
|
var fails$d = fails$h;
|
|
227
226
|
var global$e = global$h;
|
|
@@ -230,7 +229,7 @@ var $String$5 = global$e.String;
|
|
|
230
229
|
|
|
231
230
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
232
231
|
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
233
|
-
var symbol = Symbol();
|
|
232
|
+
var symbol = Symbol('symbol detection');
|
|
234
233
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
235
234
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
236
235
|
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
@@ -241,7 +240,6 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(func
|
|
|
241
240
|
});
|
|
242
241
|
|
|
243
242
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
244
|
-
|
|
245
243
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
246
244
|
|
|
247
245
|
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
@@ -339,10 +337,10 @@ var store$2 = sharedStore;
|
|
|
339
337
|
(shared$4.exports = function (key, value) {
|
|
340
338
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
341
339
|
})('versions', []).push({
|
|
342
|
-
version: '3.
|
|
340
|
+
version: '3.32.1',
|
|
343
341
|
mode: 'global',
|
|
344
342
|
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
345
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
343
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE',
|
|
346
344
|
source: 'https://github.com/zloirock/core-js'
|
|
347
345
|
});
|
|
348
346
|
|
|
@@ -455,7 +453,7 @@ var ie8DomDefine = !DESCRIPTORS$c && !fails$c(function () {
|
|
|
455
453
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
456
454
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
457
455
|
get: function () { return 7; }
|
|
458
|
-
}).a
|
|
456
|
+
}).a !== 7;
|
|
459
457
|
});
|
|
460
458
|
|
|
461
459
|
var DESCRIPTORS$b = descriptors;
|
|
@@ -493,7 +491,7 @@ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$b(function () {
|
|
|
493
491
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
494
492
|
value: 42,
|
|
495
493
|
writable: false
|
|
496
|
-
}).prototype
|
|
494
|
+
}).prototype !== 42;
|
|
497
495
|
});
|
|
498
496
|
|
|
499
497
|
var isObject$4 = isObject$8;
|
|
@@ -838,10 +836,10 @@ var createMethod$1 = function (IS_INCLUDES) {
|
|
|
838
836
|
var value;
|
|
839
837
|
// Array#includes uses SameValueZero equality algorithm
|
|
840
838
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
841
|
-
if (IS_INCLUDES && el
|
|
839
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
842
840
|
value = O[index++];
|
|
843
841
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
844
|
-
if (value
|
|
842
|
+
if (value !== value) return true;
|
|
845
843
|
// Array#indexOf ignores holes, Array#includes - not
|
|
846
844
|
} else for (;length > index; index++) {
|
|
847
845
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -946,8 +944,8 @@ var replacement = /#|\.prototype\./;
|
|
|
946
944
|
|
|
947
945
|
var isForced$1 = function (feature, detection) {
|
|
948
946
|
var value = data[normalize(feature)];
|
|
949
|
-
return value
|
|
950
|
-
: value
|
|
947
|
+
return value === POLYFILL ? true
|
|
948
|
+
: value === NATIVE ? false
|
|
951
949
|
: isCallable$7(detection) ? fails$9(detection)
|
|
952
950
|
: !!detection;
|
|
953
951
|
};
|
|
@@ -1035,7 +1033,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag');
|
|
|
1035
1033
|
var $Object$1 = Object;
|
|
1036
1034
|
|
|
1037
1035
|
// ES3 wrong here
|
|
1038
|
-
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }())
|
|
1036
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
|
|
1039
1037
|
|
|
1040
1038
|
// fallback for IE11 Script Access Denied error
|
|
1041
1039
|
var tryGet = function (it, key) {
|
|
@@ -1053,7 +1051,7 @@ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
|
1053
1051
|
// builtinTag case
|
|
1054
1052
|
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1055
1053
|
// ES3 arguments fallback
|
|
1056
|
-
: (result = classofRaw$1(O))
|
|
1054
|
+
: (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1057
1055
|
};
|
|
1058
1056
|
|
|
1059
1057
|
var classof$4 = classof$5;
|
|
@@ -1092,7 +1090,7 @@ var $RegExp$2 = global$6.RegExp;
|
|
|
1092
1090
|
var UNSUPPORTED_Y$1 = fails$8(function () {
|
|
1093
1091
|
var re = $RegExp$2('a', 'y');
|
|
1094
1092
|
re.lastIndex = 2;
|
|
1095
|
-
return re.exec('abcd')
|
|
1093
|
+
return re.exec('abcd') !== null;
|
|
1096
1094
|
});
|
|
1097
1095
|
|
|
1098
1096
|
// UC Browser bug
|
|
@@ -1105,7 +1103,7 @@ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
|
1105
1103
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1106
1104
|
var re = $RegExp$2('^r', 'gy');
|
|
1107
1105
|
re.lastIndex = 2;
|
|
1108
|
-
return re.exec('str')
|
|
1106
|
+
return re.exec('str') !== null;
|
|
1109
1107
|
});
|
|
1110
1108
|
|
|
1111
1109
|
var regexpStickyHelpers = {
|
|
@@ -1152,7 +1150,6 @@ var getBuiltIn$1 = getBuiltIn$4;
|
|
|
1152
1150
|
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
1153
1151
|
|
|
1154
1152
|
/* global ActiveXObject -- old IE, WSH */
|
|
1155
|
-
|
|
1156
1153
|
var anObject$6 = anObject$b;
|
|
1157
1154
|
var definePropertiesModule = objectDefineProperties;
|
|
1158
1155
|
var enumBugKeys = enumBugKeys$3;
|
|
@@ -1438,7 +1435,7 @@ var ArrayPrototype$1 = Array.prototype;
|
|
|
1438
1435
|
|
|
1439
1436
|
// Array.prototype[@@unscopables]
|
|
1440
1437
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1441
|
-
if (ArrayPrototype$1[UNSCOPABLES]
|
|
1438
|
+
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
1442
1439
|
defineProperty$4(ArrayPrototype$1, UNSCOPABLES, {
|
|
1443
1440
|
configurable: true,
|
|
1444
1441
|
value: create$2(null)
|
|
@@ -1579,7 +1576,6 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1579
1576
|
};
|
|
1580
1577
|
|
|
1581
1578
|
/* eslint-disable no-proto -- safe */
|
|
1582
|
-
|
|
1583
1579
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1584
1580
|
var anObject$5 = anObject$b;
|
|
1585
1581
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
@@ -1651,7 +1647,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1651
1647
|
|| IterablePrototype['@@iterator']
|
|
1652
1648
|
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1653
1649
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1654
|
-
var anyNativeIterator = NAME
|
|
1650
|
+
var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1655
1651
|
var CurrentIteratorPrototype, methods, KEY;
|
|
1656
1652
|
|
|
1657
1653
|
// fix native
|
|
@@ -1671,7 +1667,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1671
1667
|
}
|
|
1672
1668
|
|
|
1673
1669
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1674
|
-
if (PROPER_FUNCTION_NAME$1 && DEFAULT
|
|
1670
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1675
1671
|
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1676
1672
|
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1677
1673
|
} else {
|
|
@@ -1750,9 +1746,10 @@ var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kin
|
|
|
1750
1746
|
state.target = undefined;
|
|
1751
1747
|
return createIterResultObject$1(undefined, true);
|
|
1752
1748
|
}
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1749
|
+
switch (kind) {
|
|
1750
|
+
case 'keys': return createIterResultObject$1(index, false);
|
|
1751
|
+
case 'values': return createIterResultObject$1(target[index], false);
|
|
1752
|
+
} return createIterResultObject$1([index, target[index]], false);
|
|
1756
1753
|
}, 'values');
|
|
1757
1754
|
|
|
1758
1755
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
@@ -1887,20 +1884,25 @@ var ITERATOR$3 = wellKnownSymbol$5('iterator');
|
|
|
1887
1884
|
var urlConstructorDetection = !fails$3(function () {
|
|
1888
1885
|
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
1889
1886
|
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
|
1890
|
-
var
|
|
1887
|
+
var params = url.searchParams;
|
|
1888
|
+
var params2 = new URLSearchParams('a=1&a=2&b=3');
|
|
1891
1889
|
var result = '';
|
|
1892
1890
|
url.pathname = 'c%20d';
|
|
1893
|
-
|
|
1894
|
-
|
|
1891
|
+
params.forEach(function (value, key) {
|
|
1892
|
+
params['delete']('b');
|
|
1895
1893
|
result += key + value;
|
|
1896
1894
|
});
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1895
|
+
params2['delete']('a', 2);
|
|
1896
|
+
// `undefined` case is a Chromium 117 bug
|
|
1897
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=14222
|
|
1898
|
+
params2['delete']('b', undefined);
|
|
1899
|
+
return (IS_PURE && (!url.toJSON || !params2.has('a', 1) || params2.has('a', 2) || !params2.has('a', undefined) || params2.has('b')))
|
|
1900
|
+
|| (!params.size && (IS_PURE || !DESCRIPTORS$3))
|
|
1901
|
+
|| !params.sort
|
|
1900
1902
|
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
|
1901
|
-
||
|
|
1903
|
+
|| params.get('c') !== '3'
|
|
1902
1904
|
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
|
1903
|
-
|| !
|
|
1905
|
+
|| !params[ITERATOR$3]
|
|
1904
1906
|
// throws in Edge
|
|
1905
1907
|
|| new URL('https://a@b').username !== 'a'
|
|
1906
1908
|
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
|
@@ -1989,11 +1991,11 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
1989
1991
|
var A = {};
|
|
1990
1992
|
var B = {};
|
|
1991
1993
|
// eslint-disable-next-line es/no-symbol -- safe
|
|
1992
|
-
var symbol = Symbol();
|
|
1994
|
+
var symbol = Symbol('assign detection');
|
|
1993
1995
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1994
1996
|
A[symbol] = 7;
|
|
1995
1997
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1996
|
-
return $assign({}, A)[symbol]
|
|
1998
|
+
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1997
1999
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1998
2000
|
var T = toObject$1(target);
|
|
1999
2001
|
var argumentsLength = arguments.length;
|
|
@@ -2209,7 +2211,8 @@ var arraySliceSimple = function (O, start, end) {
|
|
|
2209
2211
|
var k = toAbsoluteIndex(start, length);
|
|
2210
2212
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
2211
2213
|
var result = $Array(max(fin - k, 0));
|
|
2212
|
-
|
|
2214
|
+
var n = 0;
|
|
2215
|
+
for (; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
2213
2216
|
result.length = n;
|
|
2214
2217
|
return result;
|
|
2215
2218
|
};
|
|
@@ -2258,7 +2261,7 @@ var ucs2decode = function (string) {
|
|
|
2258
2261
|
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
2259
2262
|
// It's a high surrogate, and there is a next character.
|
|
2260
2263
|
var extra = charCodeAt(string, counter++);
|
|
2261
|
-
if ((extra & 0xFC00)
|
|
2264
|
+
if ((extra & 0xFC00) === 0xDC00) { // Low surrogate.
|
|
2262
2265
|
push$2(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
2263
2266
|
} else {
|
|
2264
2267
|
// It's an unmatched surrogate; only append this code unit, in case the
|
|
@@ -2357,7 +2360,7 @@ var encode = function (input) {
|
|
|
2357
2360
|
if (currentValue < n && ++delta > maxInt) {
|
|
2358
2361
|
throw $RangeError(OVERFLOW_ERROR);
|
|
2359
2362
|
}
|
|
2360
|
-
if (currentValue
|
|
2363
|
+
if (currentValue === n) {
|
|
2361
2364
|
// Represent delta as a generalized variable-length integer.
|
|
2362
2365
|
var q = delta;
|
|
2363
2366
|
var k = base;
|
|
@@ -2372,7 +2375,7 @@ var encode = function (input) {
|
|
|
2372
2375
|
}
|
|
2373
2376
|
|
|
2374
2377
|
push$2(output, fromCharCode(digitToBasic(q)));
|
|
2375
|
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount
|
|
2378
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
|
|
2376
2379
|
delta = 0;
|
|
2377
2380
|
handledCPCount++;
|
|
2378
2381
|
}
|
|
@@ -2660,7 +2663,7 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
|
2660
2663
|
anInstance$1(this, URLSearchParamsPrototype);
|
|
2661
2664
|
var init = arguments.length > 0 ? arguments[0] : undefined;
|
|
2662
2665
|
var state = setInternalState$1(this, new URLSearchParamsState(init));
|
|
2663
|
-
if (!DESCRIPTORS$1) this.
|
|
2666
|
+
if (!DESCRIPTORS$1) this.size = state.entries.length;
|
|
2664
2667
|
};
|
|
2665
2668
|
|
|
2666
2669
|
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
@@ -2669,32 +2672,37 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2669
2672
|
// `URLSearchParams.prototype.append` method
|
|
2670
2673
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
2671
2674
|
append: function append(name, value) {
|
|
2672
|
-
validateArgumentsLength$1(arguments.length, 2);
|
|
2673
2675
|
var state = getInternalParamsState(this);
|
|
2676
|
+
validateArgumentsLength$1(arguments.length, 2);
|
|
2674
2677
|
push$1(state.entries, { key: $toString$2(name), value: $toString$2(value) });
|
|
2675
2678
|
if (!DESCRIPTORS$1) this.length++;
|
|
2676
2679
|
state.updateURL();
|
|
2677
2680
|
},
|
|
2678
2681
|
// `URLSearchParams.prototype.delete` method
|
|
2679
2682
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
2680
|
-
'delete': function (name) {
|
|
2681
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2683
|
+
'delete': function (name /* , value */) {
|
|
2682
2684
|
var state = getInternalParamsState(this);
|
|
2685
|
+
var length = validateArgumentsLength$1(arguments.length, 1);
|
|
2683
2686
|
var entries = state.entries;
|
|
2684
2687
|
var key = $toString$2(name);
|
|
2688
|
+
var $value = length < 2 ? undefined : arguments[1];
|
|
2689
|
+
var value = $value === undefined ? $value : $toString$2($value);
|
|
2685
2690
|
var index = 0;
|
|
2686
2691
|
while (index < entries.length) {
|
|
2687
|
-
|
|
2688
|
-
|
|
2692
|
+
var entry = entries[index];
|
|
2693
|
+
if (entry.key === key && (value === undefined || entry.value === value)) {
|
|
2694
|
+
splice(entries, index, 1);
|
|
2695
|
+
if (value !== undefined) break;
|
|
2696
|
+
} else index++;
|
|
2689
2697
|
}
|
|
2690
|
-
if (!DESCRIPTORS$1) this.
|
|
2698
|
+
if (!DESCRIPTORS$1) this.size = entries.length;
|
|
2691
2699
|
state.updateURL();
|
|
2692
2700
|
},
|
|
2693
2701
|
// `URLSearchParams.prototype.get` method
|
|
2694
2702
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
2695
2703
|
get: function get(name) {
|
|
2696
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2697
2704
|
var entries = getInternalParamsState(this).entries;
|
|
2705
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2698
2706
|
var key = $toString$2(name);
|
|
2699
2707
|
var index = 0;
|
|
2700
2708
|
for (; index < entries.length; index++) {
|
|
@@ -2705,8 +2713,8 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2705
2713
|
// `URLSearchParams.prototype.getAll` method
|
|
2706
2714
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
2707
2715
|
getAll: function getAll(name) {
|
|
2708
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2709
2716
|
var entries = getInternalParamsState(this).entries;
|
|
2717
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2710
2718
|
var key = $toString$2(name);
|
|
2711
2719
|
var result = [];
|
|
2712
2720
|
var index = 0;
|
|
@@ -2717,21 +2725,24 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2717
2725
|
},
|
|
2718
2726
|
// `URLSearchParams.prototype.has` method
|
|
2719
2727
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
2720
|
-
has: function has(name) {
|
|
2721
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2728
|
+
has: function has(name /* , value */) {
|
|
2722
2729
|
var entries = getInternalParamsState(this).entries;
|
|
2730
|
+
var length = validateArgumentsLength$1(arguments.length, 1);
|
|
2723
2731
|
var key = $toString$2(name);
|
|
2732
|
+
var $value = length < 2 ? undefined : arguments[1];
|
|
2733
|
+
var value = $value === undefined ? $value : $toString$2($value);
|
|
2724
2734
|
var index = 0;
|
|
2725
2735
|
while (index < entries.length) {
|
|
2726
|
-
|
|
2736
|
+
var entry = entries[index++];
|
|
2737
|
+
if (entry.key === key && (value === undefined || entry.value === value)) return true;
|
|
2727
2738
|
}
|
|
2728
2739
|
return false;
|
|
2729
2740
|
},
|
|
2730
2741
|
// `URLSearchParams.prototype.set` method
|
|
2731
2742
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
2732
2743
|
set: function set(name, value) {
|
|
2733
|
-
validateArgumentsLength$1(arguments.length, 1);
|
|
2734
2744
|
var state = getInternalParamsState(this);
|
|
2745
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2735
2746
|
var entries = state.entries;
|
|
2736
2747
|
var found = false;
|
|
2737
2748
|
var key = $toString$2(name);
|
|
@@ -2749,7 +2760,7 @@ defineBuiltIns(URLSearchParamsPrototype, {
|
|
|
2749
2760
|
}
|
|
2750
2761
|
}
|
|
2751
2762
|
if (!found) push$1(entries, { key: key, value: val });
|
|
2752
|
-
if (!DESCRIPTORS$1) this.
|
|
2763
|
+
if (!DESCRIPTORS$1) this.size = entries.length;
|
|
2753
2764
|
state.updateURL();
|
|
2754
2765
|
},
|
|
2755
2766
|
// `URLSearchParams.prototype.sort` method
|
|
@@ -2933,7 +2944,7 @@ var EOF;
|
|
|
2933
2944
|
var parseIPv4 = function (input) {
|
|
2934
2945
|
var parts = split(input, '.');
|
|
2935
2946
|
var partsLength, numbers, index, part, radix, number, ipv4;
|
|
2936
|
-
if (parts.length && parts[parts.length - 1]
|
|
2947
|
+
if (parts.length && parts[parts.length - 1] === '') {
|
|
2937
2948
|
parts.length--;
|
|
2938
2949
|
}
|
|
2939
2950
|
partsLength = parts.length;
|
|
@@ -2941,23 +2952,23 @@ var parseIPv4 = function (input) {
|
|
|
2941
2952
|
numbers = [];
|
|
2942
2953
|
for (index = 0; index < partsLength; index++) {
|
|
2943
2954
|
part = parts[index];
|
|
2944
|
-
if (part
|
|
2955
|
+
if (part === '') return input;
|
|
2945
2956
|
radix = 10;
|
|
2946
|
-
if (part.length > 1 && charAt(part, 0)
|
|
2957
|
+
if (part.length > 1 && charAt(part, 0) === '0') {
|
|
2947
2958
|
radix = exec(HEX_START, part) ? 16 : 8;
|
|
2948
|
-
part = stringSlice$1(part, radix
|
|
2959
|
+
part = stringSlice$1(part, radix === 8 ? 1 : 2);
|
|
2949
2960
|
}
|
|
2950
2961
|
if (part === '') {
|
|
2951
2962
|
number = 0;
|
|
2952
2963
|
} else {
|
|
2953
|
-
if (!exec(radix
|
|
2964
|
+
if (!exec(radix === 10 ? DEC : radix === 8 ? OCT : HEX, part)) return input;
|
|
2954
2965
|
number = parseInt(part, radix);
|
|
2955
2966
|
}
|
|
2956
2967
|
push(numbers, number);
|
|
2957
2968
|
}
|
|
2958
2969
|
for (index = 0; index < partsLength; index++) {
|
|
2959
2970
|
number = numbers[index];
|
|
2960
|
-
if (index
|
|
2971
|
+
if (index === partsLength - 1) {
|
|
2961
2972
|
if (number >= pow(256, 5 - partsLength)) return null;
|
|
2962
2973
|
} else if (number > 255) return null;
|
|
2963
2974
|
}
|
|
@@ -2981,15 +2992,15 @@ var parseIPv6 = function (input) {
|
|
|
2981
2992
|
return charAt(input, pointer);
|
|
2982
2993
|
};
|
|
2983
2994
|
|
|
2984
|
-
if (chr()
|
|
2985
|
-
if (charAt(input, 1)
|
|
2995
|
+
if (chr() === ':') {
|
|
2996
|
+
if (charAt(input, 1) !== ':') return;
|
|
2986
2997
|
pointer += 2;
|
|
2987
2998
|
pieceIndex++;
|
|
2988
2999
|
compress = pieceIndex;
|
|
2989
3000
|
}
|
|
2990
3001
|
while (chr()) {
|
|
2991
|
-
if (pieceIndex
|
|
2992
|
-
if (chr()
|
|
3002
|
+
if (pieceIndex === 8) return;
|
|
3003
|
+
if (chr() === ':') {
|
|
2993
3004
|
if (compress !== null) return;
|
|
2994
3005
|
pointer++;
|
|
2995
3006
|
pieceIndex++;
|
|
@@ -3002,33 +3013,33 @@ var parseIPv6 = function (input) {
|
|
|
3002
3013
|
pointer++;
|
|
3003
3014
|
length++;
|
|
3004
3015
|
}
|
|
3005
|
-
if (chr()
|
|
3006
|
-
if (length
|
|
3016
|
+
if (chr() === '.') {
|
|
3017
|
+
if (length === 0) return;
|
|
3007
3018
|
pointer -= length;
|
|
3008
3019
|
if (pieceIndex > 6) return;
|
|
3009
3020
|
numbersSeen = 0;
|
|
3010
3021
|
while (chr()) {
|
|
3011
3022
|
ipv4Piece = null;
|
|
3012
3023
|
if (numbersSeen > 0) {
|
|
3013
|
-
if (chr()
|
|
3024
|
+
if (chr() === '.' && numbersSeen < 4) pointer++;
|
|
3014
3025
|
else return;
|
|
3015
3026
|
}
|
|
3016
3027
|
if (!exec(DIGIT, chr())) return;
|
|
3017
3028
|
while (exec(DIGIT, chr())) {
|
|
3018
3029
|
number = parseInt(chr(), 10);
|
|
3019
3030
|
if (ipv4Piece === null) ipv4Piece = number;
|
|
3020
|
-
else if (ipv4Piece
|
|
3031
|
+
else if (ipv4Piece === 0) return;
|
|
3021
3032
|
else ipv4Piece = ipv4Piece * 10 + number;
|
|
3022
3033
|
if (ipv4Piece > 255) return;
|
|
3023
3034
|
pointer++;
|
|
3024
3035
|
}
|
|
3025
3036
|
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
|
3026
3037
|
numbersSeen++;
|
|
3027
|
-
if (numbersSeen
|
|
3038
|
+
if (numbersSeen === 2 || numbersSeen === 4) pieceIndex++;
|
|
3028
3039
|
}
|
|
3029
|
-
if (numbersSeen
|
|
3040
|
+
if (numbersSeen !== 4) return;
|
|
3030
3041
|
break;
|
|
3031
|
-
} else if (chr()
|
|
3042
|
+
} else if (chr() === ':') {
|
|
3032
3043
|
pointer++;
|
|
3033
3044
|
if (!chr()) return;
|
|
3034
3045
|
} else if (chr()) return;
|
|
@@ -3037,12 +3048,12 @@ var parseIPv6 = function (input) {
|
|
|
3037
3048
|
if (compress !== null) {
|
|
3038
3049
|
swaps = pieceIndex - compress;
|
|
3039
3050
|
pieceIndex = 7;
|
|
3040
|
-
while (pieceIndex
|
|
3051
|
+
while (pieceIndex !== 0 && swaps > 0) {
|
|
3041
3052
|
swap = address[pieceIndex];
|
|
3042
3053
|
address[pieceIndex--] = address[compress + swaps - 1];
|
|
3043
3054
|
address[compress + --swaps] = swap;
|
|
3044
3055
|
}
|
|
3045
|
-
} else if (pieceIndex
|
|
3056
|
+
} else if (pieceIndex !== 8) return;
|
|
3046
3057
|
return address;
|
|
3047
3058
|
};
|
|
3048
3059
|
|
|
@@ -3130,15 +3141,15 @@ var specialSchemes = {
|
|
|
3130
3141
|
// https://url.spec.whatwg.org/#windows-drive-letter
|
|
3131
3142
|
var isWindowsDriveLetter = function (string, normalized) {
|
|
3132
3143
|
var second;
|
|
3133
|
-
return string.length
|
|
3134
|
-
&& ((second = charAt(string, 1))
|
|
3144
|
+
return string.length === 2 && exec(ALPHA, charAt(string, 0))
|
|
3145
|
+
&& ((second = charAt(string, 1)) === ':' || (!normalized && second === '|'));
|
|
3135
3146
|
};
|
|
3136
3147
|
|
|
3137
3148
|
// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
|
|
3138
3149
|
var startsWithWindowsDriveLetter = function (string) {
|
|
3139
3150
|
var third;
|
|
3140
3151
|
return string.length > 1 && isWindowsDriveLetter(stringSlice$1(string, 0, 2)) && (
|
|
3141
|
-
string.length
|
|
3152
|
+
string.length === 2 ||
|
|
3142
3153
|
((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
|
|
3143
3154
|
);
|
|
3144
3155
|
};
|
|
@@ -3242,27 +3253,27 @@ URLState.prototype = {
|
|
|
3242
3253
|
break;
|
|
3243
3254
|
|
|
3244
3255
|
case SCHEME:
|
|
3245
|
-
if (chr && (exec(ALPHANUMERIC, chr) || chr
|
|
3256
|
+
if (chr && (exec(ALPHANUMERIC, chr) || chr === '+' || chr === '-' || chr === '.')) {
|
|
3246
3257
|
buffer += toLowerCase(chr);
|
|
3247
|
-
} else if (chr
|
|
3258
|
+
} else if (chr === ':') {
|
|
3248
3259
|
if (stateOverride && (
|
|
3249
|
-
(url.isSpecial()
|
|
3250
|
-
(buffer
|
|
3251
|
-
(url.scheme
|
|
3260
|
+
(url.isSpecial() !== hasOwn$1(specialSchemes, buffer)) ||
|
|
3261
|
+
(buffer === 'file' && (url.includesCredentials() || url.port !== null)) ||
|
|
3262
|
+
(url.scheme === 'file' && !url.host)
|
|
3252
3263
|
)) return;
|
|
3253
3264
|
url.scheme = buffer;
|
|
3254
3265
|
if (stateOverride) {
|
|
3255
|
-
if (url.isSpecial() && specialSchemes[url.scheme]
|
|
3266
|
+
if (url.isSpecial() && specialSchemes[url.scheme] === url.port) url.port = null;
|
|
3256
3267
|
return;
|
|
3257
3268
|
}
|
|
3258
3269
|
buffer = '';
|
|
3259
|
-
if (url.scheme
|
|
3270
|
+
if (url.scheme === 'file') {
|
|
3260
3271
|
state = FILE;
|
|
3261
|
-
} else if (url.isSpecial() && base && base.scheme
|
|
3272
|
+
} else if (url.isSpecial() && base && base.scheme === url.scheme) {
|
|
3262
3273
|
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
|
3263
3274
|
} else if (url.isSpecial()) {
|
|
3264
3275
|
state = SPECIAL_AUTHORITY_SLASHES;
|
|
3265
|
-
} else if (codePoints[pointer + 1]
|
|
3276
|
+
} else if (codePoints[pointer + 1] === '/') {
|
|
3266
3277
|
state = PATH_OR_AUTHORITY;
|
|
3267
3278
|
pointer++;
|
|
3268
3279
|
} else {
|
|
@@ -3279,8 +3290,8 @@ URLState.prototype = {
|
|
|
3279
3290
|
break;
|
|
3280
3291
|
|
|
3281
3292
|
case NO_SCHEME:
|
|
3282
|
-
if (!base || (base.cannotBeABaseURL && chr
|
|
3283
|
-
if (base.cannotBeABaseURL && chr
|
|
3293
|
+
if (!base || (base.cannotBeABaseURL && chr !== '#')) return INVALID_SCHEME;
|
|
3294
|
+
if (base.cannotBeABaseURL && chr === '#') {
|
|
3284
3295
|
url.scheme = base.scheme;
|
|
3285
3296
|
url.path = arraySlice(base.path);
|
|
3286
3297
|
url.query = base.query;
|
|
@@ -3289,11 +3300,11 @@ URLState.prototype = {
|
|
|
3289
3300
|
state = FRAGMENT;
|
|
3290
3301
|
break;
|
|
3291
3302
|
}
|
|
3292
|
-
state = base.scheme
|
|
3303
|
+
state = base.scheme === 'file' ? FILE : RELATIVE;
|
|
3293
3304
|
continue;
|
|
3294
3305
|
|
|
3295
3306
|
case SPECIAL_RELATIVE_OR_AUTHORITY:
|
|
3296
|
-
if (chr
|
|
3307
|
+
if (chr === '/' && codePoints[pointer + 1] === '/') {
|
|
3297
3308
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3298
3309
|
pointer++;
|
|
3299
3310
|
} else {
|
|
@@ -3302,7 +3313,7 @@ URLState.prototype = {
|
|
|
3302
3313
|
} break;
|
|
3303
3314
|
|
|
3304
3315
|
case PATH_OR_AUTHORITY:
|
|
3305
|
-
if (chr
|
|
3316
|
+
if (chr === '/') {
|
|
3306
3317
|
state = AUTHORITY;
|
|
3307
3318
|
break;
|
|
3308
3319
|
} else {
|
|
@@ -3312,16 +3323,16 @@ URLState.prototype = {
|
|
|
3312
3323
|
|
|
3313
3324
|
case RELATIVE:
|
|
3314
3325
|
url.scheme = base.scheme;
|
|
3315
|
-
if (chr
|
|
3326
|
+
if (chr === EOF) {
|
|
3316
3327
|
url.username = base.username;
|
|
3317
3328
|
url.password = base.password;
|
|
3318
3329
|
url.host = base.host;
|
|
3319
3330
|
url.port = base.port;
|
|
3320
3331
|
url.path = arraySlice(base.path);
|
|
3321
3332
|
url.query = base.query;
|
|
3322
|
-
} else if (chr
|
|
3333
|
+
} else if (chr === '/' || (chr === '\\' && url.isSpecial())) {
|
|
3323
3334
|
state = RELATIVE_SLASH;
|
|
3324
|
-
} else if (chr
|
|
3335
|
+
} else if (chr === '?') {
|
|
3325
3336
|
url.username = base.username;
|
|
3326
3337
|
url.password = base.password;
|
|
3327
3338
|
url.host = base.host;
|
|
@@ -3329,7 +3340,7 @@ URLState.prototype = {
|
|
|
3329
3340
|
url.path = arraySlice(base.path);
|
|
3330
3341
|
url.query = '';
|
|
3331
3342
|
state = QUERY;
|
|
3332
|
-
} else if (chr
|
|
3343
|
+
} else if (chr === '#') {
|
|
3333
3344
|
url.username = base.username;
|
|
3334
3345
|
url.password = base.password;
|
|
3335
3346
|
url.host = base.host;
|
|
@@ -3350,9 +3361,9 @@ URLState.prototype = {
|
|
|
3350
3361
|
} break;
|
|
3351
3362
|
|
|
3352
3363
|
case RELATIVE_SLASH:
|
|
3353
|
-
if (url.isSpecial() && (chr
|
|
3364
|
+
if (url.isSpecial() && (chr === '/' || chr === '\\')) {
|
|
3354
3365
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3355
|
-
} else if (chr
|
|
3366
|
+
} else if (chr === '/') {
|
|
3356
3367
|
state = AUTHORITY;
|
|
3357
3368
|
} else {
|
|
3358
3369
|
url.username = base.username;
|
|
@@ -3365,24 +3376,24 @@ URLState.prototype = {
|
|
|
3365
3376
|
|
|
3366
3377
|
case SPECIAL_AUTHORITY_SLASHES:
|
|
3367
3378
|
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3368
|
-
if (chr
|
|
3379
|
+
if (chr !== '/' || charAt(buffer, pointer + 1) !== '/') continue;
|
|
3369
3380
|
pointer++;
|
|
3370
3381
|
break;
|
|
3371
3382
|
|
|
3372
3383
|
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
|
|
3373
|
-
if (chr
|
|
3384
|
+
if (chr !== '/' && chr !== '\\') {
|
|
3374
3385
|
state = AUTHORITY;
|
|
3375
3386
|
continue;
|
|
3376
3387
|
} break;
|
|
3377
3388
|
|
|
3378
3389
|
case AUTHORITY:
|
|
3379
|
-
if (chr
|
|
3390
|
+
if (chr === '@') {
|
|
3380
3391
|
if (seenAt) buffer = '%40' + buffer;
|
|
3381
3392
|
seenAt = true;
|
|
3382
3393
|
bufferCodePoints = arrayFrom(buffer);
|
|
3383
3394
|
for (var i = 0; i < bufferCodePoints.length; i++) {
|
|
3384
3395
|
var codePoint = bufferCodePoints[i];
|
|
3385
|
-
if (codePoint
|
|
3396
|
+
if (codePoint === ':' && !seenPasswordToken) {
|
|
3386
3397
|
seenPasswordToken = true;
|
|
3387
3398
|
continue;
|
|
3388
3399
|
}
|
|
@@ -3392,10 +3403,10 @@ URLState.prototype = {
|
|
|
3392
3403
|
}
|
|
3393
3404
|
buffer = '';
|
|
3394
3405
|
} else if (
|
|
3395
|
-
chr
|
|
3396
|
-
(chr
|
|
3406
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3407
|
+
(chr === '\\' && url.isSpecial())
|
|
3397
3408
|
) {
|
|
3398
|
-
if (seenAt && buffer
|
|
3409
|
+
if (seenAt && buffer === '') return INVALID_AUTHORITY;
|
|
3399
3410
|
pointer -= arrayFrom(buffer).length + 1;
|
|
3400
3411
|
buffer = '';
|
|
3401
3412
|
state = HOST;
|
|
@@ -3404,22 +3415,22 @@ URLState.prototype = {
|
|
|
3404
3415
|
|
|
3405
3416
|
case HOST:
|
|
3406
3417
|
case HOSTNAME:
|
|
3407
|
-
if (stateOverride && url.scheme
|
|
3418
|
+
if (stateOverride && url.scheme === 'file') {
|
|
3408
3419
|
state = FILE_HOST;
|
|
3409
3420
|
continue;
|
|
3410
|
-
} else if (chr
|
|
3411
|
-
if (buffer
|
|
3421
|
+
} else if (chr === ':' && !seenBracket) {
|
|
3422
|
+
if (buffer === '') return INVALID_HOST;
|
|
3412
3423
|
failure = url.parseHost(buffer);
|
|
3413
3424
|
if (failure) return failure;
|
|
3414
3425
|
buffer = '';
|
|
3415
3426
|
state = PORT;
|
|
3416
|
-
if (stateOverride
|
|
3427
|
+
if (stateOverride === HOSTNAME) return;
|
|
3417
3428
|
} else if (
|
|
3418
|
-
chr
|
|
3419
|
-
(chr
|
|
3429
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3430
|
+
(chr === '\\' && url.isSpecial())
|
|
3420
3431
|
) {
|
|
3421
|
-
if (url.isSpecial() && buffer
|
|
3422
|
-
if (stateOverride && buffer
|
|
3432
|
+
if (url.isSpecial() && buffer === '') return INVALID_HOST;
|
|
3433
|
+
if (stateOverride && buffer === '' && (url.includesCredentials() || url.port !== null)) return;
|
|
3423
3434
|
failure = url.parseHost(buffer);
|
|
3424
3435
|
if (failure) return failure;
|
|
3425
3436
|
buffer = '';
|
|
@@ -3427,8 +3438,8 @@ URLState.prototype = {
|
|
|
3427
3438
|
if (stateOverride) return;
|
|
3428
3439
|
continue;
|
|
3429
3440
|
} else {
|
|
3430
|
-
if (chr
|
|
3431
|
-
else if (chr
|
|
3441
|
+
if (chr === '[') seenBracket = true;
|
|
3442
|
+
else if (chr === ']') seenBracket = false;
|
|
3432
3443
|
buffer += chr;
|
|
3433
3444
|
} break;
|
|
3434
3445
|
|
|
@@ -3436,11 +3447,11 @@ URLState.prototype = {
|
|
|
3436
3447
|
if (exec(DIGIT, chr)) {
|
|
3437
3448
|
buffer += chr;
|
|
3438
3449
|
} else if (
|
|
3439
|
-
chr
|
|
3440
|
-
(chr
|
|
3450
|
+
chr === EOF || chr === '/' || chr === '?' || chr === '#' ||
|
|
3451
|
+
(chr === '\\' && url.isSpecial()) ||
|
|
3441
3452
|
stateOverride
|
|
3442
3453
|
) {
|
|
3443
|
-
if (buffer
|
|
3454
|
+
if (buffer !== '') {
|
|
3444
3455
|
var port = parseInt(buffer, 10);
|
|
3445
3456
|
if (port > 0xFFFF) return INVALID_PORT;
|
|
3446
3457
|
url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
|
|
@@ -3454,31 +3465,35 @@ URLState.prototype = {
|
|
|
3454
3465
|
|
|
3455
3466
|
case FILE:
|
|
3456
3467
|
url.scheme = 'file';
|
|
3457
|
-
if (chr
|
|
3458
|
-
else if (base && base.scheme
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
url.path = arraySlice(base.path);
|
|
3462
|
-
url.query = base.query;
|
|
3463
|
-
} else if (chr == '?') {
|
|
3464
|
-
url.host = base.host;
|
|
3465
|
-
url.path = arraySlice(base.path);
|
|
3466
|
-
url.query = '';
|
|
3467
|
-
state = QUERY;
|
|
3468
|
-
} else if (chr == '#') {
|
|
3469
|
-
url.host = base.host;
|
|
3470
|
-
url.path = arraySlice(base.path);
|
|
3471
|
-
url.query = base.query;
|
|
3472
|
-
url.fragment = '';
|
|
3473
|
-
state = FRAGMENT;
|
|
3474
|
-
} else {
|
|
3475
|
-
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3468
|
+
if (chr === '/' || chr === '\\') state = FILE_SLASH;
|
|
3469
|
+
else if (base && base.scheme === 'file') {
|
|
3470
|
+
switch (chr) {
|
|
3471
|
+
case EOF:
|
|
3476
3472
|
url.host = base.host;
|
|
3477
3473
|
url.path = arraySlice(base.path);
|
|
3478
|
-
url.
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3474
|
+
url.query = base.query;
|
|
3475
|
+
break;
|
|
3476
|
+
case '?':
|
|
3477
|
+
url.host = base.host;
|
|
3478
|
+
url.path = arraySlice(base.path);
|
|
3479
|
+
url.query = '';
|
|
3480
|
+
state = QUERY;
|
|
3481
|
+
break;
|
|
3482
|
+
case '#':
|
|
3483
|
+
url.host = base.host;
|
|
3484
|
+
url.path = arraySlice(base.path);
|
|
3485
|
+
url.query = base.query;
|
|
3486
|
+
url.fragment = '';
|
|
3487
|
+
state = FRAGMENT;
|
|
3488
|
+
break;
|
|
3489
|
+
default:
|
|
3490
|
+
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3491
|
+
url.host = base.host;
|
|
3492
|
+
url.path = arraySlice(base.path);
|
|
3493
|
+
url.shortenPath();
|
|
3494
|
+
}
|
|
3495
|
+
state = PATH;
|
|
3496
|
+
continue;
|
|
3482
3497
|
}
|
|
3483
3498
|
} else {
|
|
3484
3499
|
state = PATH;
|
|
@@ -3486,11 +3501,11 @@ URLState.prototype = {
|
|
|
3486
3501
|
} break;
|
|
3487
3502
|
|
|
3488
3503
|
case FILE_SLASH:
|
|
3489
|
-
if (chr
|
|
3504
|
+
if (chr === '/' || chr === '\\') {
|
|
3490
3505
|
state = FILE_HOST;
|
|
3491
3506
|
break;
|
|
3492
3507
|
}
|
|
3493
|
-
if (base && base.scheme
|
|
3508
|
+
if (base && base.scheme === 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3494
3509
|
if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
|
|
3495
3510
|
else url.host = base.host;
|
|
3496
3511
|
}
|
|
@@ -3498,17 +3513,17 @@ URLState.prototype = {
|
|
|
3498
3513
|
continue;
|
|
3499
3514
|
|
|
3500
3515
|
case FILE_HOST:
|
|
3501
|
-
if (chr
|
|
3516
|
+
if (chr === EOF || chr === '/' || chr === '\\' || chr === '?' || chr === '#') {
|
|
3502
3517
|
if (!stateOverride && isWindowsDriveLetter(buffer)) {
|
|
3503
3518
|
state = PATH;
|
|
3504
|
-
} else if (buffer
|
|
3519
|
+
} else if (buffer === '') {
|
|
3505
3520
|
url.host = '';
|
|
3506
3521
|
if (stateOverride) return;
|
|
3507
3522
|
state = PATH_START;
|
|
3508
3523
|
} else {
|
|
3509
3524
|
failure = url.parseHost(buffer);
|
|
3510
3525
|
if (failure) return failure;
|
|
3511
|
-
if (url.host
|
|
3526
|
+
if (url.host === 'localhost') url.host = '';
|
|
3512
3527
|
if (stateOverride) return;
|
|
3513
3528
|
buffer = '';
|
|
3514
3529
|
state = PATH_START;
|
|
@@ -3519,50 +3534,50 @@ URLState.prototype = {
|
|
|
3519
3534
|
case PATH_START:
|
|
3520
3535
|
if (url.isSpecial()) {
|
|
3521
3536
|
state = PATH;
|
|
3522
|
-
if (chr
|
|
3523
|
-
} else if (!stateOverride && chr
|
|
3537
|
+
if (chr !== '/' && chr !== '\\') continue;
|
|
3538
|
+
} else if (!stateOverride && chr === '?') {
|
|
3524
3539
|
url.query = '';
|
|
3525
3540
|
state = QUERY;
|
|
3526
|
-
} else if (!stateOverride && chr
|
|
3541
|
+
} else if (!stateOverride && chr === '#') {
|
|
3527
3542
|
url.fragment = '';
|
|
3528
3543
|
state = FRAGMENT;
|
|
3529
|
-
} else if (chr
|
|
3544
|
+
} else if (chr !== EOF) {
|
|
3530
3545
|
state = PATH;
|
|
3531
|
-
if (chr
|
|
3546
|
+
if (chr !== '/') continue;
|
|
3532
3547
|
} break;
|
|
3533
3548
|
|
|
3534
3549
|
case PATH:
|
|
3535
3550
|
if (
|
|
3536
|
-
chr
|
|
3537
|
-
(chr
|
|
3538
|
-
(!stateOverride && (chr
|
|
3551
|
+
chr === EOF || chr === '/' ||
|
|
3552
|
+
(chr === '\\' && url.isSpecial()) ||
|
|
3553
|
+
(!stateOverride && (chr === '?' || chr === '#'))
|
|
3539
3554
|
) {
|
|
3540
3555
|
if (isDoubleDot(buffer)) {
|
|
3541
3556
|
url.shortenPath();
|
|
3542
|
-
if (chr
|
|
3557
|
+
if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
|
|
3543
3558
|
push(url.path, '');
|
|
3544
3559
|
}
|
|
3545
3560
|
} else if (isSingleDot(buffer)) {
|
|
3546
|
-
if (chr
|
|
3561
|
+
if (chr !== '/' && !(chr === '\\' && url.isSpecial())) {
|
|
3547
3562
|
push(url.path, '');
|
|
3548
3563
|
}
|
|
3549
3564
|
} else {
|
|
3550
|
-
if (url.scheme
|
|
3565
|
+
if (url.scheme === 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
|
3551
3566
|
if (url.host) url.host = '';
|
|
3552
3567
|
buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
|
|
3553
3568
|
}
|
|
3554
3569
|
push(url.path, buffer);
|
|
3555
3570
|
}
|
|
3556
3571
|
buffer = '';
|
|
3557
|
-
if (url.scheme
|
|
3572
|
+
if (url.scheme === 'file' && (chr === EOF || chr === '?' || chr === '#')) {
|
|
3558
3573
|
while (url.path.length > 1 && url.path[0] === '') {
|
|
3559
3574
|
shift(url.path);
|
|
3560
3575
|
}
|
|
3561
3576
|
}
|
|
3562
|
-
if (chr
|
|
3577
|
+
if (chr === '?') {
|
|
3563
3578
|
url.query = '';
|
|
3564
3579
|
state = QUERY;
|
|
3565
|
-
} else if (chr
|
|
3580
|
+
} else if (chr === '#') {
|
|
3566
3581
|
url.fragment = '';
|
|
3567
3582
|
state = FRAGMENT;
|
|
3568
3583
|
}
|
|
@@ -3571,28 +3586,28 @@ URLState.prototype = {
|
|
|
3571
3586
|
} break;
|
|
3572
3587
|
|
|
3573
3588
|
case CANNOT_BE_A_BASE_URL_PATH:
|
|
3574
|
-
if (chr
|
|
3589
|
+
if (chr === '?') {
|
|
3575
3590
|
url.query = '';
|
|
3576
3591
|
state = QUERY;
|
|
3577
|
-
} else if (chr
|
|
3592
|
+
} else if (chr === '#') {
|
|
3578
3593
|
url.fragment = '';
|
|
3579
3594
|
state = FRAGMENT;
|
|
3580
|
-
} else if (chr
|
|
3595
|
+
} else if (chr !== EOF) {
|
|
3581
3596
|
url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3582
3597
|
} break;
|
|
3583
3598
|
|
|
3584
3599
|
case QUERY:
|
|
3585
|
-
if (!stateOverride && chr
|
|
3600
|
+
if (!stateOverride && chr === '#') {
|
|
3586
3601
|
url.fragment = '';
|
|
3587
3602
|
state = FRAGMENT;
|
|
3588
|
-
} else if (chr
|
|
3589
|
-
if (chr
|
|
3590
|
-
else if (chr
|
|
3603
|
+
} else if (chr !== EOF) {
|
|
3604
|
+
if (chr === "'" && url.isSpecial()) url.query += '%27';
|
|
3605
|
+
else if (chr === '#') url.query += '%23';
|
|
3591
3606
|
else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3592
3607
|
} break;
|
|
3593
3608
|
|
|
3594
3609
|
case FRAGMENT:
|
|
3595
|
-
if (chr
|
|
3610
|
+
if (chr !== EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
|
|
3596
3611
|
break;
|
|
3597
3612
|
}
|
|
3598
3613
|
|
|
@@ -3602,8 +3617,8 @@ URLState.prototype = {
|
|
|
3602
3617
|
// https://url.spec.whatwg.org/#host-parsing
|
|
3603
3618
|
parseHost: function (input) {
|
|
3604
3619
|
var result, codePoints, index;
|
|
3605
|
-
if (charAt(input, 0)
|
|
3606
|
-
if (charAt(input, input.length - 1)
|
|
3620
|
+
if (charAt(input, 0) === '[') {
|
|
3621
|
+
if (charAt(input, input.length - 1) !== ']') return INVALID_HOST;
|
|
3607
3622
|
result = parseIPv6(stringSlice$1(input, 1, -1));
|
|
3608
3623
|
if (!result) return INVALID_HOST;
|
|
3609
3624
|
this.host = result;
|
|
@@ -3626,11 +3641,11 @@ URLState.prototype = {
|
|
|
3626
3641
|
},
|
|
3627
3642
|
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
|
|
3628
3643
|
cannotHaveUsernamePasswordPort: function () {
|
|
3629
|
-
return !this.host || this.cannotBeABaseURL || this.scheme
|
|
3644
|
+
return !this.host || this.cannotBeABaseURL || this.scheme === 'file';
|
|
3630
3645
|
},
|
|
3631
3646
|
// https://url.spec.whatwg.org/#include-credentials
|
|
3632
3647
|
includesCredentials: function () {
|
|
3633
|
-
return this.username
|
|
3648
|
+
return this.username !== '' || this.password !== '';
|
|
3634
3649
|
},
|
|
3635
3650
|
// https://url.spec.whatwg.org/#is-special
|
|
3636
3651
|
isSpecial: function () {
|
|
@@ -3640,7 +3655,7 @@ URLState.prototype = {
|
|
|
3640
3655
|
shortenPath: function () {
|
|
3641
3656
|
var path = this.path;
|
|
3642
3657
|
var pathSize = path.length;
|
|
3643
|
-
if (pathSize && (this.scheme
|
|
3658
|
+
if (pathSize && (this.scheme !== 'file' || pathSize !== 1 || !isWindowsDriveLetter(path[0], true))) {
|
|
3644
3659
|
path.length--;
|
|
3645
3660
|
}
|
|
3646
3661
|
},
|
|
@@ -3663,7 +3678,7 @@ URLState.prototype = {
|
|
|
3663
3678
|
}
|
|
3664
3679
|
output += serializeHost(host);
|
|
3665
3680
|
if (port !== null) output += ':' + port;
|
|
3666
|
-
} else if (scheme
|
|
3681
|
+
} else if (scheme === 'file') output += '//';
|
|
3667
3682
|
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3668
3683
|
if (query !== null) output += '?' + query;
|
|
3669
3684
|
if (fragment !== null) output += '#' + fragment;
|
|
@@ -3679,12 +3694,12 @@ URLState.prototype = {
|
|
|
3679
3694
|
getOrigin: function () {
|
|
3680
3695
|
var scheme = this.scheme;
|
|
3681
3696
|
var port = this.port;
|
|
3682
|
-
if (scheme
|
|
3697
|
+
if (scheme === 'blob') try {
|
|
3683
3698
|
return new URLConstructor(scheme.path[0]).origin;
|
|
3684
3699
|
} catch (error) {
|
|
3685
3700
|
return 'null';
|
|
3686
3701
|
}
|
|
3687
|
-
if (scheme
|
|
3702
|
+
if (scheme === 'file' || !this.isSpecial()) return 'null';
|
|
3688
3703
|
return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
|
|
3689
3704
|
},
|
|
3690
3705
|
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
@@ -3747,7 +3762,7 @@ URLState.prototype = {
|
|
|
3747
3762
|
setPort: function (port) {
|
|
3748
3763
|
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3749
3764
|
port = $toString$1(port);
|
|
3750
|
-
if (port
|
|
3765
|
+
if (port === '') this.port = null;
|
|
3751
3766
|
else this.parse(port, PORT);
|
|
3752
3767
|
},
|
|
3753
3768
|
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
@@ -3767,10 +3782,10 @@ URLState.prototype = {
|
|
|
3767
3782
|
},
|
|
3768
3783
|
setSearch: function (search) {
|
|
3769
3784
|
search = $toString$1(search);
|
|
3770
|
-
if (search
|
|
3785
|
+
if (search === '') {
|
|
3771
3786
|
this.query = null;
|
|
3772
3787
|
} else {
|
|
3773
|
-
if (
|
|
3788
|
+
if (charAt(search, 0) === '?') search = stringSlice$1(search, 1);
|
|
3774
3789
|
this.query = '';
|
|
3775
3790
|
this.parse(search, QUERY);
|
|
3776
3791
|
}
|
|
@@ -3787,11 +3802,11 @@ URLState.prototype = {
|
|
|
3787
3802
|
},
|
|
3788
3803
|
setHash: function (hash) {
|
|
3789
3804
|
hash = $toString$1(hash);
|
|
3790
|
-
if (hash
|
|
3805
|
+
if (hash === '') {
|
|
3791
3806
|
this.fragment = null;
|
|
3792
3807
|
return;
|
|
3793
3808
|
}
|
|
3794
|
-
if (
|
|
3809
|
+
if (charAt(hash, 0) === '#') hash = stringSlice$1(hash, 1);
|
|
3795
3810
|
this.fragment = '';
|
|
3796
3811
|
this.parse(hash, FRAGMENT);
|
|
3797
3812
|
},
|
|
@@ -3915,7 +3930,7 @@ var MATCH$1 = wellKnownSymbol$1('match');
|
|
|
3915
3930
|
// https://tc39.es/ecma262/#sec-isregexp
|
|
3916
3931
|
var isRegexp = function (it) {
|
|
3917
3932
|
var isRegExp;
|
|
3918
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it)
|
|
3933
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
|
|
3919
3934
|
};
|
|
3920
3935
|
|
|
3921
3936
|
var isRegExp = isRegexp;
|
|
@@ -4003,9 +4018,9 @@ var TO_STRING = 'toString';
|
|
|
4003
4018
|
var RegExpPrototype = RegExp.prototype;
|
|
4004
4019
|
var nativeToString = RegExpPrototype[TO_STRING];
|
|
4005
4020
|
|
|
4006
|
-
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' })
|
|
4021
|
+
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
|
|
4007
4022
|
// FF44- RegExp#toString has a wrong name
|
|
4008
|
-
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name
|
|
4023
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
|
|
4009
4024
|
|
|
4010
4025
|
// `RegExp.prototype.toString` method
|
|
4011
4026
|
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
@@ -4207,7 +4222,8 @@ function getCalendarTitle(events, options) {
|
|
|
4207
4222
|
*/
|
|
4208
4223
|
function getHolidayDescription(ev) {
|
|
4209
4224
|
let firstSentence = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4210
|
-
const
|
|
4225
|
+
const str0 = holidayDescription[ev.getDesc()] || holidayDescription[ev.basename()] || '';
|
|
4226
|
+
const str = str0.normalize();
|
|
4211
4227
|
if (firstSentence && str) {
|
|
4212
4228
|
const dot = str.indexOf('.');
|
|
4213
4229
|
if (dot != -1) {
|
|
@@ -4568,8 +4584,8 @@ function eventToClassicApiObject(ev, options) {
|
|
|
4568
4584
|
};
|
|
4569
4585
|
}
|
|
4570
4586
|
const memo = ev.memo || holidayDescription[ev.basename()];
|
|
4571
|
-
if (memo) {
|
|
4572
|
-
result.memo = memo;
|
|
4587
|
+
if (typeof memo === 'string' && memo.length !== 0) {
|
|
4588
|
+
result.memo = memo.normalize();
|
|
4573
4589
|
} else if (typeof ev.linkedEvent !== 'undefined') {
|
|
4574
4590
|
result.memo = ev.linkedEvent.render(options.locale);
|
|
4575
4591
|
}
|