@hebcal/rest-api 3.12.0 → 3.13.0
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 +3146 -531
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +54 -10
- package/dist/index.mjs +54 -10
- package/package.json +12 -20
package/dist/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @hebcal/rest-api v3.
|
|
1
|
+
/*! @hebcal/rest-api v3.13.0 */
|
|
2
2
|
var hebcal__rest_api = (function (exports, core, leyn) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@ var check = function (it) {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
32
|
-
var global$
|
|
32
|
+
var global$C =
|
|
33
33
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
34
34
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
35
35
|
check(typeof window == 'object' && window) ||
|
|
@@ -41,7 +41,7 @@ var global$q =
|
|
|
41
41
|
|
|
42
42
|
var objectGetOwnPropertyDescriptor = {};
|
|
43
43
|
|
|
44
|
-
var fails$
|
|
44
|
+
var fails$g = function (exec) {
|
|
45
45
|
try {
|
|
46
46
|
return !!exec();
|
|
47
47
|
} catch (error) {
|
|
@@ -49,47 +49,47 @@ var fails$a = function (exec) {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
var fails$
|
|
52
|
+
var fails$f = fails$g;
|
|
53
53
|
|
|
54
54
|
// Detect IE8's incomplete defineProperty implementation
|
|
55
|
-
var descriptors = !fails$
|
|
55
|
+
var descriptors = !fails$f(function () {
|
|
56
56
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
57
57
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
var fails$
|
|
60
|
+
var fails$e = fails$g;
|
|
61
61
|
|
|
62
|
-
var functionBindNative = !fails$
|
|
62
|
+
var functionBindNative = !fails$e(function () {
|
|
63
63
|
var test = (function () { /* empty */ }).bind();
|
|
64
64
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
65
65
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
-
var NATIVE_BIND$
|
|
68
|
+
var NATIVE_BIND$2 = functionBindNative;
|
|
69
69
|
|
|
70
|
-
var call$
|
|
70
|
+
var call$b = Function.prototype.call;
|
|
71
71
|
|
|
72
|
-
var functionCall = NATIVE_BIND$
|
|
73
|
-
return call$
|
|
72
|
+
var functionCall = NATIVE_BIND$2 ? call$b.bind(call$b) : function () {
|
|
73
|
+
return call$b.apply(call$b, arguments);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
var objectPropertyIsEnumerable = {};
|
|
77
77
|
|
|
78
78
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
79
79
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
80
|
-
var getOwnPropertyDescriptor$
|
|
80
|
+
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
81
81
|
|
|
82
82
|
// Nashorn ~ JDK8 bug
|
|
83
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
83
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
84
84
|
|
|
85
85
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
86
86
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
87
87
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
88
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
88
|
+
var descriptor = getOwnPropertyDescriptor$2(this, V);
|
|
89
89
|
return !!descriptor && descriptor.enumerable;
|
|
90
90
|
} : $propertyIsEnumerable;
|
|
91
91
|
|
|
92
|
-
var createPropertyDescriptor$
|
|
92
|
+
var createPropertyDescriptor$5 = function (bitmap, value) {
|
|
93
93
|
return {
|
|
94
94
|
enumerable: !(bitmap & 1),
|
|
95
95
|
configurable: !(bitmap & 2),
|
|
@@ -98,102 +98,102 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
|
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
var NATIVE_BIND = functionBindNative;
|
|
101
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
102
102
|
|
|
103
103
|
var FunctionPrototype$1 = Function.prototype;
|
|
104
|
-
var bind = FunctionPrototype$1.bind;
|
|
105
|
-
var call$
|
|
106
|
-
var uncurryThis$
|
|
104
|
+
var bind$4 = FunctionPrototype$1.bind;
|
|
105
|
+
var call$a = FunctionPrototype$1.call;
|
|
106
|
+
var uncurryThis$k = NATIVE_BIND$1 && bind$4.bind(call$a, call$a);
|
|
107
107
|
|
|
108
|
-
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
109
|
-
return fn && uncurryThis$
|
|
108
|
+
var functionUncurryThis = NATIVE_BIND$1 ? function (fn) {
|
|
109
|
+
return fn && uncurryThis$k(fn);
|
|
110
110
|
} : function (fn) {
|
|
111
111
|
return fn && function () {
|
|
112
|
-
return call$
|
|
112
|
+
return call$a.apply(fn, arguments);
|
|
113
113
|
};
|
|
114
114
|
};
|
|
115
115
|
|
|
116
|
-
var uncurryThis$
|
|
116
|
+
var uncurryThis$j = functionUncurryThis;
|
|
117
117
|
|
|
118
|
-
var toString$
|
|
119
|
-
var stringSlice$
|
|
118
|
+
var toString$6 = uncurryThis$j({}.toString);
|
|
119
|
+
var stringSlice$5 = uncurryThis$j(''.slice);
|
|
120
120
|
|
|
121
121
|
var classofRaw$1 = function (it) {
|
|
122
|
-
return stringSlice$
|
|
122
|
+
return stringSlice$5(toString$6(it), 8, -1);
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
-
var global$
|
|
126
|
-
var uncurryThis$
|
|
127
|
-
var fails$
|
|
128
|
-
var classof$
|
|
125
|
+
var global$B = global$C;
|
|
126
|
+
var uncurryThis$i = functionUncurryThis;
|
|
127
|
+
var fails$d = fails$g;
|
|
128
|
+
var classof$6 = classofRaw$1;
|
|
129
129
|
|
|
130
|
-
var Object$
|
|
131
|
-
var split = uncurryThis$
|
|
130
|
+
var Object$5 = global$B.Object;
|
|
131
|
+
var split$3 = uncurryThis$i(''.split);
|
|
132
132
|
|
|
133
133
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
134
|
-
var indexedObject = fails$
|
|
134
|
+
var indexedObject = fails$d(function () {
|
|
135
135
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
136
136
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
137
|
-
return !Object$
|
|
137
|
+
return !Object$5('z').propertyIsEnumerable(0);
|
|
138
138
|
}) ? function (it) {
|
|
139
|
-
return classof$
|
|
140
|
-
} : Object$
|
|
139
|
+
return classof$6(it) == 'String' ? split$3(it, '') : Object$5(it);
|
|
140
|
+
} : Object$5;
|
|
141
141
|
|
|
142
|
-
var global$
|
|
142
|
+
var global$A = global$C;
|
|
143
143
|
|
|
144
|
-
var TypeError$
|
|
144
|
+
var TypeError$e = global$A.TypeError;
|
|
145
145
|
|
|
146
146
|
// `RequireObjectCoercible` abstract operation
|
|
147
147
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
148
|
-
var requireObjectCoercible$
|
|
149
|
-
if (it == undefined) throw TypeError$
|
|
148
|
+
var requireObjectCoercible$4 = function (it) {
|
|
149
|
+
if (it == undefined) throw TypeError$e("Can't call method on " + it);
|
|
150
150
|
return it;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
// toObject with fallback for non-array-like ES3 strings
|
|
154
|
-
var IndexedObject = indexedObject;
|
|
155
|
-
var requireObjectCoercible$
|
|
154
|
+
var IndexedObject$1 = indexedObject;
|
|
155
|
+
var requireObjectCoercible$3 = requireObjectCoercible$4;
|
|
156
156
|
|
|
157
|
-
var toIndexedObject$
|
|
158
|
-
return IndexedObject(requireObjectCoercible$
|
|
157
|
+
var toIndexedObject$5 = function (it) {
|
|
158
|
+
return IndexedObject$1(requireObjectCoercible$3(it));
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
// `IsCallable` abstract operation
|
|
162
162
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
163
|
-
var isCallable$
|
|
163
|
+
var isCallable$g = function (argument) {
|
|
164
164
|
return typeof argument == 'function';
|
|
165
165
|
};
|
|
166
166
|
|
|
167
|
-
var isCallable$
|
|
167
|
+
var isCallable$f = isCallable$g;
|
|
168
168
|
|
|
169
|
-
var isObject$
|
|
170
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
169
|
+
var isObject$7 = function (it) {
|
|
170
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
171
171
|
};
|
|
172
172
|
|
|
173
|
-
var global$
|
|
174
|
-
var isCallable$
|
|
173
|
+
var global$z = global$C;
|
|
174
|
+
var isCallable$e = isCallable$g;
|
|
175
175
|
|
|
176
176
|
var aFunction = function (argument) {
|
|
177
|
-
return isCallable$
|
|
177
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
var getBuiltIn$
|
|
181
|
-
return arguments.length < 2 ? aFunction(global$
|
|
180
|
+
var getBuiltIn$6 = function (namespace, method) {
|
|
181
|
+
return arguments.length < 2 ? aFunction(global$z[namespace]) : global$z[namespace] && global$z[namespace][method];
|
|
182
182
|
};
|
|
183
183
|
|
|
184
|
-
var uncurryThis$
|
|
184
|
+
var uncurryThis$h = functionUncurryThis;
|
|
185
185
|
|
|
186
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
186
|
+
var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
187
187
|
|
|
188
|
-
var getBuiltIn$
|
|
188
|
+
var getBuiltIn$5 = getBuiltIn$6;
|
|
189
189
|
|
|
190
|
-
var engineUserAgent = getBuiltIn$
|
|
190
|
+
var engineUserAgent = getBuiltIn$5('navigator', 'userAgent') || '';
|
|
191
191
|
|
|
192
|
-
var global$
|
|
192
|
+
var global$y = global$C;
|
|
193
193
|
var userAgent = engineUserAgent;
|
|
194
194
|
|
|
195
|
-
var process = global$
|
|
196
|
-
var Deno = global$
|
|
195
|
+
var process = global$y.process;
|
|
196
|
+
var Deno = global$y.Deno;
|
|
197
197
|
var versions = process && process.versions || Deno && Deno.version;
|
|
198
198
|
var v8 = versions && versions.v8;
|
|
199
199
|
var match, version;
|
|
@@ -220,10 +220,10 @@ var engineV8Version = version;
|
|
|
220
220
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
221
221
|
|
|
222
222
|
var V8_VERSION = engineV8Version;
|
|
223
|
-
var fails$
|
|
223
|
+
var fails$c = fails$g;
|
|
224
224
|
|
|
225
225
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
226
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
226
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$c(function () {
|
|
227
227
|
var symbol = Symbol();
|
|
228
228
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
229
229
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -240,91 +240,93 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
240
240
|
&& !Symbol.sham
|
|
241
241
|
&& typeof Symbol.iterator == 'symbol';
|
|
242
242
|
|
|
243
|
-
var global$
|
|
244
|
-
var getBuiltIn$
|
|
245
|
-
var isCallable$
|
|
246
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
243
|
+
var global$x = global$C;
|
|
244
|
+
var getBuiltIn$4 = getBuiltIn$6;
|
|
245
|
+
var isCallable$d = isCallable$g;
|
|
246
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
247
247
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
248
248
|
|
|
249
|
-
var Object$
|
|
249
|
+
var Object$4 = global$x.Object;
|
|
250
250
|
|
|
251
251
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
252
252
|
return typeof it == 'symbol';
|
|
253
253
|
} : function (it) {
|
|
254
|
-
var $Symbol = getBuiltIn$
|
|
255
|
-
return isCallable$
|
|
254
|
+
var $Symbol = getBuiltIn$4('Symbol');
|
|
255
|
+
return isCallable$d($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$4(it));
|
|
256
256
|
};
|
|
257
257
|
|
|
258
|
-
var global$
|
|
258
|
+
var global$w = global$C;
|
|
259
259
|
|
|
260
|
-
var String$
|
|
260
|
+
var String$4 = global$w.String;
|
|
261
261
|
|
|
262
|
-
var tryToString$
|
|
262
|
+
var tryToString$2 = function (argument) {
|
|
263
263
|
try {
|
|
264
|
-
return String$
|
|
264
|
+
return String$4(argument);
|
|
265
265
|
} catch (error) {
|
|
266
266
|
return 'Object';
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
var global$
|
|
271
|
-
var isCallable$
|
|
272
|
-
var tryToString = tryToString$
|
|
270
|
+
var global$v = global$C;
|
|
271
|
+
var isCallable$c = isCallable$g;
|
|
272
|
+
var tryToString$1 = tryToString$2;
|
|
273
273
|
|
|
274
|
-
var TypeError$
|
|
274
|
+
var TypeError$d = global$v.TypeError;
|
|
275
275
|
|
|
276
276
|
// `Assert: IsCallable(argument) is true`
|
|
277
|
-
var aCallable$
|
|
278
|
-
if (isCallable$
|
|
279
|
-
throw TypeError$
|
|
277
|
+
var aCallable$3 = function (argument) {
|
|
278
|
+
if (isCallable$c(argument)) return argument;
|
|
279
|
+
throw TypeError$d(tryToString$1(argument) + ' is not a function');
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
-
var aCallable = aCallable$
|
|
282
|
+
var aCallable$2 = aCallable$3;
|
|
283
283
|
|
|
284
284
|
// `GetMethod` abstract operation
|
|
285
285
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
286
|
-
var getMethod$
|
|
286
|
+
var getMethod$3 = function (V, P) {
|
|
287
287
|
var func = V[P];
|
|
288
|
-
return func == null ? undefined : aCallable(func);
|
|
288
|
+
return func == null ? undefined : aCallable$2(func);
|
|
289
289
|
};
|
|
290
290
|
|
|
291
|
-
var global$
|
|
292
|
-
var call$
|
|
293
|
-
var isCallable$
|
|
294
|
-
var isObject$
|
|
291
|
+
var global$u = global$C;
|
|
292
|
+
var call$9 = functionCall;
|
|
293
|
+
var isCallable$b = isCallable$g;
|
|
294
|
+
var isObject$6 = isObject$7;
|
|
295
295
|
|
|
296
|
-
var TypeError$
|
|
296
|
+
var TypeError$c = global$u.TypeError;
|
|
297
297
|
|
|
298
298
|
// `OrdinaryToPrimitive` abstract operation
|
|
299
299
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
300
300
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
301
301
|
var fn, val;
|
|
302
|
-
if (pref === 'string' && isCallable$
|
|
303
|
-
if (isCallable$
|
|
304
|
-
if (pref !== 'string' && isCallable$
|
|
305
|
-
throw TypeError$
|
|
302
|
+
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
|
|
303
|
+
if (isCallable$b(fn = input.valueOf) && !isObject$6(val = call$9(fn, input))) return val;
|
|
304
|
+
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
|
|
305
|
+
throw TypeError$c("Can't convert object to primitive value");
|
|
306
306
|
};
|
|
307
307
|
|
|
308
308
|
var shared$4 = {exports: {}};
|
|
309
309
|
|
|
310
|
-
var
|
|
310
|
+
var isPure = false;
|
|
311
|
+
|
|
312
|
+
var global$t = global$C;
|
|
311
313
|
|
|
312
314
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
313
|
-
var defineProperty = Object.defineProperty;
|
|
315
|
+
var defineProperty$3 = Object.defineProperty;
|
|
314
316
|
|
|
315
317
|
var setGlobal$3 = function (key, value) {
|
|
316
318
|
try {
|
|
317
|
-
defineProperty(global$
|
|
319
|
+
defineProperty$3(global$t, key, { value: value, configurable: true, writable: true });
|
|
318
320
|
} catch (error) {
|
|
319
|
-
global$
|
|
321
|
+
global$t[key] = value;
|
|
320
322
|
} return value;
|
|
321
323
|
};
|
|
322
324
|
|
|
323
|
-
var global$
|
|
325
|
+
var global$s = global$C;
|
|
324
326
|
var setGlobal$2 = setGlobal$3;
|
|
325
327
|
|
|
326
328
|
var SHARED = '__core-js_shared__';
|
|
327
|
-
var store$3 = global$
|
|
329
|
+
var store$3 = global$s[SHARED] || setGlobal$2(SHARED, {});
|
|
328
330
|
|
|
329
331
|
var sharedStore = store$3;
|
|
330
332
|
|
|
@@ -333,61 +335,61 @@ var store$2 = sharedStore;
|
|
|
333
335
|
(shared$4.exports = function (key, value) {
|
|
334
336
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
335
337
|
})('versions', []).push({
|
|
336
|
-
version: '3.
|
|
338
|
+
version: '3.21.1',
|
|
337
339
|
mode: 'global',
|
|
338
340
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
339
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
341
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
|
|
340
342
|
source: 'https://github.com/zloirock/core-js'
|
|
341
343
|
});
|
|
342
344
|
|
|
343
|
-
var global$
|
|
344
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
345
|
+
var global$r = global$C;
|
|
346
|
+
var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
345
347
|
|
|
346
|
-
var Object$
|
|
348
|
+
var Object$3 = global$r.Object;
|
|
347
349
|
|
|
348
350
|
// `ToObject` abstract operation
|
|
349
351
|
// https://tc39.es/ecma262/#sec-toobject
|
|
350
|
-
var toObject$
|
|
351
|
-
return Object$
|
|
352
|
+
var toObject$4 = function (argument) {
|
|
353
|
+
return Object$3(requireObjectCoercible$2(argument));
|
|
352
354
|
};
|
|
353
355
|
|
|
354
|
-
var uncurryThis$
|
|
355
|
-
var toObject = toObject$
|
|
356
|
+
var uncurryThis$g = functionUncurryThis;
|
|
357
|
+
var toObject$3 = toObject$4;
|
|
356
358
|
|
|
357
|
-
var hasOwnProperty = uncurryThis$
|
|
359
|
+
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
358
360
|
|
|
359
361
|
// `HasOwnProperty` abstract operation
|
|
360
362
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
361
363
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
362
|
-
return hasOwnProperty(toObject(it), key);
|
|
364
|
+
return hasOwnProperty(toObject$3(it), key);
|
|
363
365
|
};
|
|
364
366
|
|
|
365
|
-
var uncurryThis$
|
|
367
|
+
var uncurryThis$f = functionUncurryThis;
|
|
366
368
|
|
|
367
369
|
var id = 0;
|
|
368
370
|
var postfix = Math.random();
|
|
369
|
-
var toString$
|
|
371
|
+
var toString$5 = uncurryThis$f(1.0.toString);
|
|
370
372
|
|
|
371
373
|
var uid$2 = function (key) {
|
|
372
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
374
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
373
375
|
};
|
|
374
376
|
|
|
375
|
-
var global$
|
|
377
|
+
var global$q = global$C;
|
|
376
378
|
var shared$3 = shared$4.exports;
|
|
377
|
-
var hasOwn$
|
|
379
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
378
380
|
var uid$1 = uid$2;
|
|
379
381
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
380
382
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
381
383
|
|
|
382
384
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
383
|
-
var Symbol$1 = global$
|
|
385
|
+
var Symbol$1 = global$q.Symbol;
|
|
384
386
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
385
387
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
386
388
|
|
|
387
|
-
var wellKnownSymbol$
|
|
388
|
-
if (!hasOwn$
|
|
389
|
+
var wellKnownSymbol$e = function (name) {
|
|
390
|
+
if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
389
391
|
var description = 'Symbol.' + name;
|
|
390
|
-
if (NATIVE_SYMBOL && hasOwn$
|
|
392
|
+
if (NATIVE_SYMBOL && hasOwn$a(Symbol$1, name)) {
|
|
391
393
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
392
394
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
393
395
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -397,28 +399,28 @@ var wellKnownSymbol$3 = function (name) {
|
|
|
397
399
|
} return WellKnownSymbolsStore[name];
|
|
398
400
|
};
|
|
399
401
|
|
|
400
|
-
var global$
|
|
401
|
-
var call$
|
|
402
|
-
var isObject$
|
|
402
|
+
var global$p = global$C;
|
|
403
|
+
var call$8 = functionCall;
|
|
404
|
+
var isObject$5 = isObject$7;
|
|
403
405
|
var isSymbol$1 = isSymbol$2;
|
|
404
|
-
var getMethod = getMethod$
|
|
406
|
+
var getMethod$2 = getMethod$3;
|
|
405
407
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
406
|
-
var wellKnownSymbol$
|
|
408
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
407
409
|
|
|
408
|
-
var TypeError$
|
|
409
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
410
|
+
var TypeError$b = global$p.TypeError;
|
|
411
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
410
412
|
|
|
411
413
|
// `ToPrimitive` abstract operation
|
|
412
414
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
413
415
|
var toPrimitive$1 = function (input, pref) {
|
|
414
|
-
if (!isObject$
|
|
415
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
416
|
+
if (!isObject$5(input) || isSymbol$1(input)) return input;
|
|
417
|
+
var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
|
|
416
418
|
var result;
|
|
417
419
|
if (exoticToPrim) {
|
|
418
420
|
if (pref === undefined) pref = 'default';
|
|
419
|
-
result = call$
|
|
420
|
-
if (!isObject$
|
|
421
|
-
throw TypeError$
|
|
421
|
+
result = call$8(exoticToPrim, input, pref);
|
|
422
|
+
if (!isObject$5(result) || isSymbol$1(result)) return result;
|
|
423
|
+
throw TypeError$b("Can't convert object to primitive value");
|
|
422
424
|
}
|
|
423
425
|
if (pref === undefined) pref = 'number';
|
|
424
426
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -429,41 +431,41 @@ var isSymbol = isSymbol$2;
|
|
|
429
431
|
|
|
430
432
|
// `ToPropertyKey` abstract operation
|
|
431
433
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
432
|
-
var toPropertyKey$
|
|
434
|
+
var toPropertyKey$3 = function (argument) {
|
|
433
435
|
var key = toPrimitive(argument, 'string');
|
|
434
436
|
return isSymbol(key) ? key : key + '';
|
|
435
437
|
};
|
|
436
438
|
|
|
437
|
-
var global$
|
|
438
|
-
var isObject$
|
|
439
|
+
var global$o = global$C;
|
|
440
|
+
var isObject$4 = isObject$7;
|
|
439
441
|
|
|
440
|
-
var document$1 = global$
|
|
442
|
+
var document$1 = global$o.document;
|
|
441
443
|
// typeof document.createElement is 'object' in old IE
|
|
442
|
-
var EXISTS$1 = isObject$
|
|
444
|
+
var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
|
|
443
445
|
|
|
444
|
-
var documentCreateElement$
|
|
446
|
+
var documentCreateElement$2 = function (it) {
|
|
445
447
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
446
448
|
};
|
|
447
449
|
|
|
448
|
-
var DESCRIPTORS$
|
|
449
|
-
var fails$
|
|
450
|
-
var createElement = documentCreateElement$
|
|
450
|
+
var DESCRIPTORS$9 = descriptors;
|
|
451
|
+
var fails$b = fails$g;
|
|
452
|
+
var createElement = documentCreateElement$2;
|
|
451
453
|
|
|
452
454
|
// Thanks to IE8 for its funny defineProperty
|
|
453
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
455
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$b(function () {
|
|
454
456
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
455
457
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
456
458
|
get: function () { return 7; }
|
|
457
459
|
}).a != 7;
|
|
458
460
|
});
|
|
459
461
|
|
|
460
|
-
var DESCRIPTORS$
|
|
461
|
-
var call$
|
|
462
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
463
|
-
var createPropertyDescriptor$
|
|
464
|
-
var toIndexedObject$
|
|
465
|
-
var toPropertyKey$
|
|
466
|
-
var hasOwn$
|
|
462
|
+
var DESCRIPTORS$8 = descriptors;
|
|
463
|
+
var call$7 = functionCall;
|
|
464
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
465
|
+
var createPropertyDescriptor$4 = createPropertyDescriptor$5;
|
|
466
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
467
|
+
var toPropertyKey$2 = toPropertyKey$3;
|
|
468
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
467
469
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
468
470
|
|
|
469
471
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -471,23 +473,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
471
473
|
|
|
472
474
|
// `Object.getOwnPropertyDescriptor` method
|
|
473
475
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
474
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
475
|
-
O = toIndexedObject$
|
|
476
|
-
P = toPropertyKey$
|
|
476
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
477
|
+
O = toIndexedObject$4(O);
|
|
478
|
+
P = toPropertyKey$2(P);
|
|
477
479
|
if (IE8_DOM_DEFINE$1) try {
|
|
478
480
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
479
481
|
} catch (error) { /* empty */ }
|
|
480
|
-
if (hasOwn$
|
|
482
|
+
if (hasOwn$9(O, P)) return createPropertyDescriptor$4(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
481
483
|
};
|
|
482
484
|
|
|
483
485
|
var objectDefineProperty = {};
|
|
484
486
|
|
|
485
|
-
var DESCRIPTORS$
|
|
486
|
-
var fails$
|
|
487
|
+
var DESCRIPTORS$7 = descriptors;
|
|
488
|
+
var fails$a = fails$g;
|
|
487
489
|
|
|
488
490
|
// V8 ~ Chrome 36-
|
|
489
491
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
490
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
492
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$a(function () {
|
|
491
493
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
492
494
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
493
495
|
value: 42,
|
|
@@ -495,26 +497,26 @@ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$4(function () {
|
|
|
495
497
|
}).prototype != 42;
|
|
496
498
|
});
|
|
497
499
|
|
|
498
|
-
var global$
|
|
499
|
-
var isObject$
|
|
500
|
+
var global$n = global$C;
|
|
501
|
+
var isObject$3 = isObject$7;
|
|
500
502
|
|
|
501
|
-
var String$
|
|
502
|
-
var TypeError$
|
|
503
|
+
var String$3 = global$n.String;
|
|
504
|
+
var TypeError$a = global$n.TypeError;
|
|
503
505
|
|
|
504
506
|
// `Assert: Type(argument) is Object`
|
|
505
|
-
var anObject$
|
|
506
|
-
if (isObject$
|
|
507
|
-
throw TypeError$
|
|
507
|
+
var anObject$b = function (argument) {
|
|
508
|
+
if (isObject$3(argument)) return argument;
|
|
509
|
+
throw TypeError$a(String$3(argument) + ' is not an object');
|
|
508
510
|
};
|
|
509
511
|
|
|
510
|
-
var global$
|
|
511
|
-
var DESCRIPTORS$
|
|
512
|
+
var global$m = global$C;
|
|
513
|
+
var DESCRIPTORS$6 = descriptors;
|
|
512
514
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
513
515
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
514
|
-
var anObject$
|
|
515
|
-
var toPropertyKey = toPropertyKey$
|
|
516
|
+
var anObject$a = anObject$b;
|
|
517
|
+
var toPropertyKey$1 = toPropertyKey$3;
|
|
516
518
|
|
|
517
|
-
var TypeError$
|
|
519
|
+
var TypeError$9 = global$m.TypeError;
|
|
518
520
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
519
521
|
var $defineProperty = Object.defineProperty;
|
|
520
522
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -525,10 +527,10 @@ var WRITABLE = 'writable';
|
|
|
525
527
|
|
|
526
528
|
// `Object.defineProperty` method
|
|
527
529
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
528
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
529
|
-
anObject$
|
|
530
|
-
P = toPropertyKey(P);
|
|
531
|
-
anObject$
|
|
530
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
531
|
+
anObject$a(O);
|
|
532
|
+
P = toPropertyKey$1(P);
|
|
533
|
+
anObject$a(Attributes);
|
|
532
534
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
533
535
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
534
536
|
if (current && current[WRITABLE]) {
|
|
@@ -541,77 +543,77 @@ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
541
543
|
}
|
|
542
544
|
} return $defineProperty(O, P, Attributes);
|
|
543
545
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
544
|
-
anObject$
|
|
545
|
-
P = toPropertyKey(P);
|
|
546
|
-
anObject$
|
|
546
|
+
anObject$a(O);
|
|
547
|
+
P = toPropertyKey$1(P);
|
|
548
|
+
anObject$a(Attributes);
|
|
547
549
|
if (IE8_DOM_DEFINE) try {
|
|
548
550
|
return $defineProperty(O, P, Attributes);
|
|
549
551
|
} catch (error) { /* empty */ }
|
|
550
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
552
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported');
|
|
551
553
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
552
554
|
return O;
|
|
553
555
|
};
|
|
554
556
|
|
|
555
|
-
var DESCRIPTORS$
|
|
556
|
-
var definePropertyModule$
|
|
557
|
-
var createPropertyDescriptor = createPropertyDescriptor$
|
|
557
|
+
var DESCRIPTORS$5 = descriptors;
|
|
558
|
+
var definePropertyModule$4 = objectDefineProperty;
|
|
559
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$5;
|
|
558
560
|
|
|
559
|
-
var createNonEnumerableProperty$
|
|
560
|
-
return definePropertyModule$
|
|
561
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
562
|
+
return definePropertyModule$4.f(object, key, createPropertyDescriptor$3(1, value));
|
|
561
563
|
} : function (object, key, value) {
|
|
562
564
|
object[key] = value;
|
|
563
565
|
return object;
|
|
564
566
|
};
|
|
565
567
|
|
|
566
|
-
var redefine$
|
|
568
|
+
var redefine$7 = {exports: {}};
|
|
567
569
|
|
|
568
|
-
var uncurryThis$
|
|
569
|
-
var isCallable$
|
|
570
|
+
var uncurryThis$e = functionUncurryThis;
|
|
571
|
+
var isCallable$a = isCallable$g;
|
|
570
572
|
var store$1 = sharedStore;
|
|
571
573
|
|
|
572
|
-
var functionToString = uncurryThis$
|
|
574
|
+
var functionToString = uncurryThis$e(Function.toString);
|
|
573
575
|
|
|
574
576
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
575
|
-
if (!isCallable$
|
|
577
|
+
if (!isCallable$a(store$1.inspectSource)) {
|
|
576
578
|
store$1.inspectSource = function (it) {
|
|
577
579
|
return functionToString(it);
|
|
578
580
|
};
|
|
579
581
|
}
|
|
580
582
|
|
|
581
|
-
var inspectSource$
|
|
583
|
+
var inspectSource$3 = store$1.inspectSource;
|
|
582
584
|
|
|
583
|
-
var global$
|
|
584
|
-
var isCallable$
|
|
585
|
-
var inspectSource$
|
|
585
|
+
var global$l = global$C;
|
|
586
|
+
var isCallable$9 = isCallable$g;
|
|
587
|
+
var inspectSource$2 = inspectSource$3;
|
|
586
588
|
|
|
587
|
-
var WeakMap$1 = global$
|
|
589
|
+
var WeakMap$1 = global$l.WeakMap;
|
|
588
590
|
|
|
589
|
-
var nativeWeakMap = isCallable$
|
|
591
|
+
var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
|
|
590
592
|
|
|
591
593
|
var shared$2 = shared$4.exports;
|
|
592
594
|
var uid = uid$2;
|
|
593
595
|
|
|
594
596
|
var keys = shared$2('keys');
|
|
595
597
|
|
|
596
|
-
var sharedKey$
|
|
598
|
+
var sharedKey$3 = function (key) {
|
|
597
599
|
return keys[key] || (keys[key] = uid(key));
|
|
598
600
|
};
|
|
599
601
|
|
|
600
602
|
var hiddenKeys$4 = {};
|
|
601
603
|
|
|
602
604
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
603
|
-
var global$
|
|
604
|
-
var uncurryThis$
|
|
605
|
-
var isObject = isObject$
|
|
606
|
-
var createNonEnumerableProperty$
|
|
607
|
-
var hasOwn$
|
|
605
|
+
var global$k = global$C;
|
|
606
|
+
var uncurryThis$d = functionUncurryThis;
|
|
607
|
+
var isObject$2 = isObject$7;
|
|
608
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
609
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
608
610
|
var shared$1 = sharedStore;
|
|
609
|
-
var sharedKey$
|
|
611
|
+
var sharedKey$2 = sharedKey$3;
|
|
610
612
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
611
613
|
|
|
612
614
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
613
|
-
var TypeError$
|
|
614
|
-
var WeakMap = global$
|
|
615
|
+
var TypeError$8 = global$k.TypeError;
|
|
616
|
+
var WeakMap = global$k.WeakMap;
|
|
615
617
|
var set, get, has;
|
|
616
618
|
|
|
617
619
|
var enforce = function (it) {
|
|
@@ -621,19 +623,19 @@ var enforce = function (it) {
|
|
|
621
623
|
var getterFor = function (TYPE) {
|
|
622
624
|
return function (it) {
|
|
623
625
|
var state;
|
|
624
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
625
|
-
throw TypeError$
|
|
626
|
+
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
627
|
+
throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');
|
|
626
628
|
} return state;
|
|
627
629
|
};
|
|
628
630
|
};
|
|
629
631
|
|
|
630
632
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
631
633
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
632
|
-
var wmget = uncurryThis$
|
|
633
|
-
var wmhas = uncurryThis$
|
|
634
|
-
var wmset = uncurryThis$
|
|
634
|
+
var wmget = uncurryThis$d(store.get);
|
|
635
|
+
var wmhas = uncurryThis$d(store.has);
|
|
636
|
+
var wmset = uncurryThis$d(store.set);
|
|
635
637
|
set = function (it, metadata) {
|
|
636
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
638
|
+
if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
|
|
637
639
|
metadata.facade = it;
|
|
638
640
|
wmset(store, it, metadata);
|
|
639
641
|
return metadata;
|
|
@@ -645,19 +647,19 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
|
645
647
|
return wmhas(store, it);
|
|
646
648
|
};
|
|
647
649
|
} else {
|
|
648
|
-
var STATE = sharedKey$
|
|
650
|
+
var STATE = sharedKey$2('state');
|
|
649
651
|
hiddenKeys$3[STATE] = true;
|
|
650
652
|
set = function (it, metadata) {
|
|
651
|
-
if (hasOwn$
|
|
653
|
+
if (hasOwn$8(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
|
|
652
654
|
metadata.facade = it;
|
|
653
|
-
createNonEnumerableProperty$
|
|
655
|
+
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
654
656
|
return metadata;
|
|
655
657
|
};
|
|
656
658
|
get = function (it) {
|
|
657
|
-
return hasOwn$
|
|
659
|
+
return hasOwn$8(it, STATE) ? it[STATE] : {};
|
|
658
660
|
};
|
|
659
661
|
has = function (it) {
|
|
660
|
-
return hasOwn$
|
|
662
|
+
return hasOwn$8(it, STATE);
|
|
661
663
|
};
|
|
662
664
|
}
|
|
663
665
|
|
|
@@ -669,17 +671,17 @@ var internalState = {
|
|
|
669
671
|
getterFor: getterFor
|
|
670
672
|
};
|
|
671
673
|
|
|
672
|
-
var DESCRIPTORS$
|
|
673
|
-
var hasOwn$
|
|
674
|
+
var DESCRIPTORS$4 = descriptors;
|
|
675
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
674
676
|
|
|
675
677
|
var FunctionPrototype = Function.prototype;
|
|
676
678
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
677
|
-
var getDescriptor = DESCRIPTORS$
|
|
679
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
678
680
|
|
|
679
|
-
var EXISTS = hasOwn$
|
|
681
|
+
var EXISTS = hasOwn$7(FunctionPrototype, 'name');
|
|
680
682
|
// additional protection from minified / mangled / dropped function names
|
|
681
683
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
682
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
684
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
683
685
|
|
|
684
686
|
var functionName = {
|
|
685
687
|
EXISTS: EXISTS,
|
|
@@ -687,38 +689,38 @@ var functionName = {
|
|
|
687
689
|
CONFIGURABLE: CONFIGURABLE
|
|
688
690
|
};
|
|
689
691
|
|
|
690
|
-
var global$
|
|
691
|
-
var isCallable$
|
|
692
|
-
var hasOwn$
|
|
693
|
-
var createNonEnumerableProperty$
|
|
692
|
+
var global$j = global$C;
|
|
693
|
+
var isCallable$8 = isCallable$g;
|
|
694
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
695
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
694
696
|
var setGlobal$1 = setGlobal$3;
|
|
695
|
-
var inspectSource = inspectSource$
|
|
696
|
-
var InternalStateModule = internalState;
|
|
697
|
-
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
697
|
+
var inspectSource$1 = inspectSource$3;
|
|
698
|
+
var InternalStateModule$4 = internalState;
|
|
699
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
698
700
|
|
|
699
|
-
var getInternalState$
|
|
700
|
-
var enforceInternalState = InternalStateModule.enforce;
|
|
701
|
+
var getInternalState$3 = InternalStateModule$4.get;
|
|
702
|
+
var enforceInternalState = InternalStateModule$4.enforce;
|
|
701
703
|
var TEMPLATE = String(String).split('String');
|
|
702
704
|
|
|
703
|
-
(redefine$
|
|
705
|
+
(redefine$7.exports = function (O, key, value, options) {
|
|
704
706
|
var unsafe = options ? !!options.unsafe : false;
|
|
705
707
|
var simple = options ? !!options.enumerable : false;
|
|
706
708
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
707
709
|
var name = options && options.name !== undefined ? options.name : key;
|
|
708
710
|
var state;
|
|
709
|
-
if (isCallable$
|
|
711
|
+
if (isCallable$8(value)) {
|
|
710
712
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
711
713
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
712
714
|
}
|
|
713
|
-
if (!hasOwn$
|
|
714
|
-
createNonEnumerableProperty$
|
|
715
|
+
if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
716
|
+
createNonEnumerableProperty$3(value, 'name', name);
|
|
715
717
|
}
|
|
716
718
|
state = enforceInternalState(value);
|
|
717
719
|
if (!state.source) {
|
|
718
720
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
719
721
|
}
|
|
720
722
|
}
|
|
721
|
-
if (O === global$
|
|
723
|
+
if (O === global$j) {
|
|
722
724
|
if (simple) O[key] = value;
|
|
723
725
|
else setGlobal$1(key, value);
|
|
724
726
|
return;
|
|
@@ -728,66 +730,66 @@ var TEMPLATE = String(String).split('String');
|
|
|
728
730
|
simple = true;
|
|
729
731
|
}
|
|
730
732
|
if (simple) O[key] = value;
|
|
731
|
-
else createNonEnumerableProperty$
|
|
733
|
+
else createNonEnumerableProperty$3(O, key, value);
|
|
732
734
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
733
735
|
})(Function.prototype, 'toString', function toString() {
|
|
734
|
-
return isCallable$
|
|
736
|
+
return isCallable$8(this) && getInternalState$3(this).source || inspectSource$1(this);
|
|
735
737
|
});
|
|
736
738
|
|
|
737
739
|
var objectGetOwnPropertyNames = {};
|
|
738
740
|
|
|
739
741
|
var ceil = Math.ceil;
|
|
740
|
-
var floor = Math.floor;
|
|
742
|
+
var floor$3 = Math.floor;
|
|
741
743
|
|
|
742
744
|
// `ToIntegerOrInfinity` abstract operation
|
|
743
745
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
744
|
-
var toIntegerOrInfinity$
|
|
746
|
+
var toIntegerOrInfinity$3 = function (argument) {
|
|
745
747
|
var number = +argument;
|
|
746
748
|
// eslint-disable-next-line no-self-compare -- safe
|
|
747
|
-
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
749
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$3 : ceil)(number);
|
|
748
750
|
};
|
|
749
751
|
|
|
750
|
-
var toIntegerOrInfinity$
|
|
752
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
|
|
751
753
|
|
|
752
|
-
var max = Math.max;
|
|
753
|
-
var min$
|
|
754
|
+
var max$1 = Math.max;
|
|
755
|
+
var min$2 = Math.min;
|
|
754
756
|
|
|
755
757
|
// Helper for a popular repeating case of the spec:
|
|
756
758
|
// Let integer be ? ToInteger(index).
|
|
757
759
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
758
|
-
var toAbsoluteIndex$
|
|
759
|
-
var integer = toIntegerOrInfinity$
|
|
760
|
-
return integer < 0 ? max(integer + length, 0) : min$
|
|
760
|
+
var toAbsoluteIndex$2 = function (index, length) {
|
|
761
|
+
var integer = toIntegerOrInfinity$2(index);
|
|
762
|
+
return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
|
|
761
763
|
};
|
|
762
764
|
|
|
763
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$
|
|
765
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
|
|
764
766
|
|
|
765
|
-
var min = Math.min;
|
|
767
|
+
var min$1 = Math.min;
|
|
766
768
|
|
|
767
769
|
// `ToLength` abstract operation
|
|
768
770
|
// https://tc39.es/ecma262/#sec-tolength
|
|
769
|
-
var toLength$
|
|
770
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
771
|
+
var toLength$2 = function (argument) {
|
|
772
|
+
return argument > 0 ? min$1(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
771
773
|
};
|
|
772
774
|
|
|
773
|
-
var toLength = toLength$
|
|
775
|
+
var toLength$1 = toLength$2;
|
|
774
776
|
|
|
775
777
|
// `LengthOfArrayLike` abstract operation
|
|
776
778
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
777
|
-
var lengthOfArrayLike$
|
|
778
|
-
return toLength(obj.length);
|
|
779
|
+
var lengthOfArrayLike$3 = function (obj) {
|
|
780
|
+
return toLength$1(obj.length);
|
|
779
781
|
};
|
|
780
782
|
|
|
781
|
-
var toIndexedObject$
|
|
782
|
-
var toAbsoluteIndex = toAbsoluteIndex$
|
|
783
|
-
var lengthOfArrayLike = lengthOfArrayLike$
|
|
783
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
784
|
+
var toAbsoluteIndex$1 = toAbsoluteIndex$2;
|
|
785
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$3;
|
|
784
786
|
|
|
785
787
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
786
|
-
var createMethod = function (IS_INCLUDES) {
|
|
788
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
|
787
789
|
return function ($this, el, fromIndex) {
|
|
788
|
-
var O = toIndexedObject$
|
|
789
|
-
var length = lengthOfArrayLike(O);
|
|
790
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
790
|
+
var O = toIndexedObject$3($this);
|
|
791
|
+
var length = lengthOfArrayLike$2(O);
|
|
792
|
+
var index = toAbsoluteIndex$1(fromIndex, length);
|
|
791
793
|
var value;
|
|
792
794
|
// Array#includes uses SameValueZero equality algorithm
|
|
793
795
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
@@ -805,29 +807,29 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
805
807
|
var arrayIncludes = {
|
|
806
808
|
// `Array.prototype.includes` method
|
|
807
809
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
808
|
-
includes: createMethod(true),
|
|
810
|
+
includes: createMethod$1(true),
|
|
809
811
|
// `Array.prototype.indexOf` method
|
|
810
812
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
811
|
-
indexOf: createMethod(false)
|
|
813
|
+
indexOf: createMethod$1(false)
|
|
812
814
|
};
|
|
813
815
|
|
|
814
|
-
var uncurryThis$
|
|
815
|
-
var hasOwn$
|
|
816
|
-
var toIndexedObject$
|
|
816
|
+
var uncurryThis$c = functionUncurryThis;
|
|
817
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
818
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
817
819
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
818
820
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
819
821
|
|
|
820
|
-
var push = uncurryThis$
|
|
822
|
+
var push$3 = uncurryThis$c([].push);
|
|
821
823
|
|
|
822
824
|
var objectKeysInternal = function (object, names) {
|
|
823
|
-
var O = toIndexedObject$
|
|
825
|
+
var O = toIndexedObject$2(object);
|
|
824
826
|
var i = 0;
|
|
825
827
|
var result = [];
|
|
826
828
|
var key;
|
|
827
|
-
for (key in O) !hasOwn$
|
|
829
|
+
for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$3(result, key);
|
|
828
830
|
// Don't enum bug & hidden keys
|
|
829
|
-
while (names.length > i) if (hasOwn$
|
|
830
|
-
~indexOf$1(result, key) || push(result, key);
|
|
831
|
+
while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
|
|
832
|
+
~indexOf$1(result, key) || push$3(result, key);
|
|
831
833
|
}
|
|
832
834
|
return result;
|
|
833
835
|
};
|
|
@@ -860,40 +862,40 @@ var objectGetOwnPropertySymbols = {};
|
|
|
860
862
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
861
863
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
862
864
|
|
|
863
|
-
var getBuiltIn$
|
|
864
|
-
var uncurryThis$
|
|
865
|
+
var getBuiltIn$3 = getBuiltIn$6;
|
|
866
|
+
var uncurryThis$b = functionUncurryThis;
|
|
865
867
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
866
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
867
|
-
var anObject$
|
|
868
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
869
|
+
var anObject$9 = anObject$b;
|
|
868
870
|
|
|
869
|
-
var concat = uncurryThis$
|
|
871
|
+
var concat$1 = uncurryThis$b([].concat);
|
|
870
872
|
|
|
871
873
|
// all object keys, includes non-enumerable and symbols
|
|
872
|
-
var ownKeys$1 = getBuiltIn$
|
|
873
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
874
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
875
|
-
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
874
|
+
var ownKeys$1 = getBuiltIn$3('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
875
|
+
var keys = getOwnPropertyNamesModule.f(anObject$9(it));
|
|
876
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
877
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
876
878
|
};
|
|
877
879
|
|
|
878
|
-
var hasOwn = hasOwnProperty_1;
|
|
880
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
879
881
|
var ownKeys = ownKeys$1;
|
|
880
882
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
881
|
-
var definePropertyModule$
|
|
883
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
882
884
|
|
|
883
885
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
884
886
|
var keys = ownKeys(source);
|
|
885
|
-
var defineProperty = definePropertyModule$
|
|
887
|
+
var defineProperty = definePropertyModule$3.f;
|
|
886
888
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
887
889
|
for (var i = 0; i < keys.length; i++) {
|
|
888
890
|
var key = keys[i];
|
|
889
|
-
if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
|
|
891
|
+
if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
|
|
890
892
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
891
893
|
}
|
|
892
894
|
}
|
|
893
895
|
};
|
|
894
896
|
|
|
895
|
-
var fails$
|
|
896
|
-
var isCallable$
|
|
897
|
+
var fails$9 = fails$g;
|
|
898
|
+
var isCallable$7 = isCallable$g;
|
|
897
899
|
|
|
898
900
|
var replacement = /#|\.prototype\./;
|
|
899
901
|
|
|
@@ -901,7 +903,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
901
903
|
var value = data[normalize(feature)];
|
|
902
904
|
return value == POLYFILL ? true
|
|
903
905
|
: value == NATIVE ? false
|
|
904
|
-
: isCallable$
|
|
906
|
+
: isCallable$7(detection) ? fails$9(detection)
|
|
905
907
|
: !!detection;
|
|
906
908
|
};
|
|
907
909
|
|
|
@@ -915,10 +917,10 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
915
917
|
|
|
916
918
|
var isForced_1 = isForced$1;
|
|
917
919
|
|
|
918
|
-
var global$
|
|
919
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
920
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
921
|
-
var redefine = redefine$
|
|
920
|
+
var global$i = global$C;
|
|
921
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
922
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
923
|
+
var redefine$6 = redefine$7.exports;
|
|
922
924
|
var setGlobal = setGlobal$3;
|
|
923
925
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
924
926
|
var isForced = isForced_1;
|
|
@@ -944,16 +946,16 @@ var _export = function (options, source) {
|
|
|
944
946
|
var STATIC = options.stat;
|
|
945
947
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
946
948
|
if (GLOBAL) {
|
|
947
|
-
target = global$
|
|
949
|
+
target = global$i;
|
|
948
950
|
} else if (STATIC) {
|
|
949
|
-
target = global$
|
|
951
|
+
target = global$i[TARGET] || setGlobal(TARGET, {});
|
|
950
952
|
} else {
|
|
951
|
-
target = (global$
|
|
953
|
+
target = (global$i[TARGET] || {}).prototype;
|
|
952
954
|
}
|
|
953
955
|
if (target) for (key in source) {
|
|
954
956
|
sourceProperty = source[key];
|
|
955
957
|
if (options.noTargetGet) {
|
|
956
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
958
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
957
959
|
targetProperty = descriptor && descriptor.value;
|
|
958
960
|
} else targetProperty = target[key];
|
|
959
961
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
@@ -964,30 +966,30 @@ var _export = function (options, source) {
|
|
|
964
966
|
}
|
|
965
967
|
// add a flag to not completely full polyfills
|
|
966
968
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
967
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
969
|
+
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
968
970
|
}
|
|
969
971
|
// extend global
|
|
970
|
-
redefine(target, key, sourceProperty, options);
|
|
972
|
+
redefine$6(target, key, sourceProperty, options);
|
|
971
973
|
}
|
|
972
974
|
};
|
|
973
975
|
|
|
974
|
-
var wellKnownSymbol$
|
|
976
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
975
977
|
|
|
976
|
-
var TO_STRING_TAG$
|
|
978
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
|
|
977
979
|
var test = {};
|
|
978
980
|
|
|
979
|
-
test[TO_STRING_TAG$
|
|
981
|
+
test[TO_STRING_TAG$3] = 'z';
|
|
980
982
|
|
|
981
983
|
var toStringTagSupport = String(test) === '[object z]';
|
|
982
984
|
|
|
983
|
-
var global$
|
|
985
|
+
var global$h = global$C;
|
|
984
986
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
985
|
-
var isCallable = isCallable$
|
|
987
|
+
var isCallable$6 = isCallable$g;
|
|
986
988
|
var classofRaw = classofRaw$1;
|
|
987
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
989
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
988
990
|
|
|
989
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
990
|
-
var Object$
|
|
991
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$b('toStringTag');
|
|
992
|
+
var Object$2 = global$h.Object;
|
|
991
993
|
|
|
992
994
|
// ES3 wrong here
|
|
993
995
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -1000,33 +1002,33 @@ var tryGet = function (it, key) {
|
|
|
1000
1002
|
};
|
|
1001
1003
|
|
|
1002
1004
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1003
|
-
var classof$
|
|
1005
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1004
1006
|
var O, tag, result;
|
|
1005
1007
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1006
1008
|
// @@toStringTag case
|
|
1007
|
-
: typeof (tag = tryGet(O = Object$
|
|
1009
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
1008
1010
|
// builtinTag case
|
|
1009
1011
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1010
1012
|
// ES3 arguments fallback
|
|
1011
|
-
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
1013
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
|
|
1012
1014
|
};
|
|
1013
1015
|
|
|
1014
|
-
var global$
|
|
1015
|
-
var classof = classof$
|
|
1016
|
+
var global$g = global$C;
|
|
1017
|
+
var classof$4 = classof$5;
|
|
1016
1018
|
|
|
1017
|
-
var String$
|
|
1019
|
+
var String$2 = global$g.String;
|
|
1018
1020
|
|
|
1019
|
-
var toString$
|
|
1020
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1021
|
-
return String$
|
|
1021
|
+
var toString$4 = function (argument) {
|
|
1022
|
+
if (classof$4(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1023
|
+
return String$2(argument);
|
|
1022
1024
|
};
|
|
1023
1025
|
|
|
1024
|
-
var anObject$
|
|
1026
|
+
var anObject$8 = anObject$b;
|
|
1025
1027
|
|
|
1026
1028
|
// `RegExp.prototype.flags` getter implementation
|
|
1027
1029
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1028
1030
|
var regexpFlags$1 = function () {
|
|
1029
|
-
var that = anObject$
|
|
1031
|
+
var that = anObject$8(this);
|
|
1030
1032
|
var result = '';
|
|
1031
1033
|
if (that.global) result += 'g';
|
|
1032
1034
|
if (that.ignoreCase) result += 'i';
|
|
@@ -1037,13 +1039,13 @@ var regexpFlags$1 = function () {
|
|
|
1037
1039
|
return result;
|
|
1038
1040
|
};
|
|
1039
1041
|
|
|
1040
|
-
var fails$
|
|
1041
|
-
var global$
|
|
1042
|
+
var fails$8 = fails$g;
|
|
1043
|
+
var global$f = global$C;
|
|
1042
1044
|
|
|
1043
1045
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1044
|
-
var $RegExp$2 = global$
|
|
1046
|
+
var $RegExp$2 = global$f.RegExp;
|
|
1045
1047
|
|
|
1046
|
-
var UNSUPPORTED_Y$1 = fails$
|
|
1048
|
+
var UNSUPPORTED_Y$1 = fails$8(function () {
|
|
1047
1049
|
var re = $RegExp$2('a', 'y');
|
|
1048
1050
|
re.lastIndex = 2;
|
|
1049
1051
|
return re.exec('abcd') != null;
|
|
@@ -1051,11 +1053,11 @@ var UNSUPPORTED_Y$1 = fails$2(function () {
|
|
|
1051
1053
|
|
|
1052
1054
|
// UC Browser bug
|
|
1053
1055
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1054
|
-
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$
|
|
1056
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1055
1057
|
return !$RegExp$2('a', 'y').sticky;
|
|
1056
1058
|
});
|
|
1057
1059
|
|
|
1058
|
-
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$
|
|
1060
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$8(function () {
|
|
1059
1061
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1060
1062
|
var re = $RegExp$2('^r', 'gy');
|
|
1061
1063
|
re.lastIndex = 2;
|
|
@@ -1076,50 +1078,50 @@ var enumBugKeys$1 = enumBugKeys$3;
|
|
|
1076
1078
|
// `Object.keys` method
|
|
1077
1079
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
1078
1080
|
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1079
|
-
var objectKeys$
|
|
1081
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1080
1082
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
1081
1083
|
};
|
|
1082
1084
|
|
|
1083
|
-
var DESCRIPTORS = descriptors;
|
|
1085
|
+
var DESCRIPTORS$3 = descriptors;
|
|
1084
1086
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1085
|
-
var definePropertyModule = objectDefineProperty;
|
|
1086
|
-
var anObject$
|
|
1087
|
-
var toIndexedObject = toIndexedObject$
|
|
1088
|
-
var objectKeys = objectKeys$
|
|
1087
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
1088
|
+
var anObject$7 = anObject$b;
|
|
1089
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1090
|
+
var objectKeys$1 = objectKeys$2;
|
|
1089
1091
|
|
|
1090
1092
|
// `Object.defineProperties` method
|
|
1091
1093
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1092
1094
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1093
|
-
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1094
|
-
anObject$
|
|
1095
|
-
var props = toIndexedObject(Properties);
|
|
1096
|
-
var keys = objectKeys(Properties);
|
|
1095
|
+
objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1096
|
+
anObject$7(O);
|
|
1097
|
+
var props = toIndexedObject$1(Properties);
|
|
1098
|
+
var keys = objectKeys$1(Properties);
|
|
1097
1099
|
var length = keys.length;
|
|
1098
1100
|
var index = 0;
|
|
1099
1101
|
var key;
|
|
1100
|
-
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1102
|
+
while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
|
|
1101
1103
|
return O;
|
|
1102
1104
|
};
|
|
1103
1105
|
|
|
1104
|
-
var getBuiltIn = getBuiltIn$
|
|
1106
|
+
var getBuiltIn$2 = getBuiltIn$6;
|
|
1105
1107
|
|
|
1106
|
-
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1108
|
+
var html$1 = getBuiltIn$2('document', 'documentElement');
|
|
1107
1109
|
|
|
1108
1110
|
/* global ActiveXObject -- old IE, WSH */
|
|
1109
1111
|
|
|
1110
|
-
var anObject = anObject$
|
|
1112
|
+
var anObject$6 = anObject$b;
|
|
1111
1113
|
var definePropertiesModule = objectDefineProperties;
|
|
1112
1114
|
var enumBugKeys = enumBugKeys$3;
|
|
1113
1115
|
var hiddenKeys = hiddenKeys$4;
|
|
1114
1116
|
var html = html$1;
|
|
1115
|
-
var documentCreateElement = documentCreateElement$
|
|
1116
|
-
var sharedKey = sharedKey$
|
|
1117
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1118
|
+
var sharedKey$1 = sharedKey$3;
|
|
1117
1119
|
|
|
1118
1120
|
var GT$1 = '>';
|
|
1119
1121
|
var LT$1 = '<';
|
|
1120
1122
|
var PROTOTYPE = 'prototype';
|
|
1121
1123
|
var SCRIPT = 'script';
|
|
1122
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1124
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1123
1125
|
|
|
1124
1126
|
var EmptyConstructor = function () { /* empty */ };
|
|
1125
1127
|
|
|
@@ -1139,7 +1141,7 @@ var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
|
1139
1141
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1140
1142
|
var NullProtoObjectViaIFrame = function () {
|
|
1141
1143
|
// Thrash, waste and sodomy: IE GC bug
|
|
1142
|
-
var iframe = documentCreateElement('iframe');
|
|
1144
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1143
1145
|
var JS = 'java' + SCRIPT + ':';
|
|
1144
1146
|
var iframeDocument;
|
|
1145
1147
|
iframe.style.display = 'none';
|
|
@@ -1173,40 +1175,40 @@ var NullProtoObject = function () {
|
|
|
1173
1175
|
return NullProtoObject();
|
|
1174
1176
|
};
|
|
1175
1177
|
|
|
1176
|
-
hiddenKeys[IE_PROTO] = true;
|
|
1178
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1177
1179
|
|
|
1178
1180
|
// `Object.create` method
|
|
1179
1181
|
// https://tc39.es/ecma262/#sec-object.create
|
|
1180
1182
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1181
1183
|
var result;
|
|
1182
1184
|
if (O !== null) {
|
|
1183
|
-
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1185
|
+
EmptyConstructor[PROTOTYPE] = anObject$6(O);
|
|
1184
1186
|
result = new EmptyConstructor();
|
|
1185
1187
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1186
1188
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1187
|
-
result[IE_PROTO] = O;
|
|
1189
|
+
result[IE_PROTO$1] = O;
|
|
1188
1190
|
} else result = NullProtoObject();
|
|
1189
1191
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1190
1192
|
};
|
|
1191
1193
|
|
|
1192
|
-
var fails$
|
|
1193
|
-
var global$
|
|
1194
|
+
var fails$7 = fails$g;
|
|
1195
|
+
var global$e = global$C;
|
|
1194
1196
|
|
|
1195
1197
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1196
|
-
var $RegExp$1 = global$
|
|
1198
|
+
var $RegExp$1 = global$e.RegExp;
|
|
1197
1199
|
|
|
1198
|
-
var regexpUnsupportedDotAll = fails$
|
|
1200
|
+
var regexpUnsupportedDotAll = fails$7(function () {
|
|
1199
1201
|
var re = $RegExp$1('.', 's');
|
|
1200
1202
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
1201
1203
|
});
|
|
1202
1204
|
|
|
1203
|
-
var fails = fails$
|
|
1204
|
-
var global$
|
|
1205
|
+
var fails$6 = fails$g;
|
|
1206
|
+
var global$d = global$C;
|
|
1205
1207
|
|
|
1206
1208
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1207
|
-
var $RegExp = global$
|
|
1209
|
+
var $RegExp = global$d.RegExp;
|
|
1208
1210
|
|
|
1209
|
-
var regexpUnsupportedNcg = fails(function () {
|
|
1211
|
+
var regexpUnsupportedNcg = fails$6(function () {
|
|
1210
1212
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1211
1213
|
return re.exec('b').groups.a !== 'b' ||
|
|
1212
1214
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1214,30 +1216,30 @@ var regexpUnsupportedNcg = fails(function () {
|
|
|
1214
1216
|
|
|
1215
1217
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1216
1218
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1217
|
-
var call = functionCall;
|
|
1218
|
-
var uncurryThis = functionUncurryThis;
|
|
1219
|
-
var toString = toString$
|
|
1219
|
+
var call$6 = functionCall;
|
|
1220
|
+
var uncurryThis$a = functionUncurryThis;
|
|
1221
|
+
var toString$3 = toString$4;
|
|
1220
1222
|
var regexpFlags = regexpFlags$1;
|
|
1221
1223
|
var stickyHelpers = regexpStickyHelpers;
|
|
1222
1224
|
var shared = shared$4.exports;
|
|
1223
|
-
var create = objectCreate;
|
|
1224
|
-
var getInternalState = internalState.get;
|
|
1225
|
+
var create$3 = objectCreate;
|
|
1226
|
+
var getInternalState$2 = internalState.get;
|
|
1225
1227
|
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
1226
1228
|
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
1227
1229
|
|
|
1228
1230
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1229
1231
|
var nativeExec = RegExp.prototype.exec;
|
|
1230
1232
|
var patchedExec = nativeExec;
|
|
1231
|
-
var charAt = uncurryThis(''.charAt);
|
|
1232
|
-
var indexOf = uncurryThis(''.indexOf);
|
|
1233
|
-
var replace = uncurryThis(''.replace);
|
|
1234
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1233
|
+
var charAt$4 = uncurryThis$a(''.charAt);
|
|
1234
|
+
var indexOf = uncurryThis$a(''.indexOf);
|
|
1235
|
+
var replace$3 = uncurryThis$a(''.replace);
|
|
1236
|
+
var stringSlice$4 = uncurryThis$a(''.slice);
|
|
1235
1237
|
|
|
1236
1238
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1237
1239
|
var re1 = /a/;
|
|
1238
1240
|
var re2 = /b*/g;
|
|
1239
|
-
call(nativeExec, re1, 'a');
|
|
1240
|
-
call(nativeExec, re2, 'a');
|
|
1241
|
+
call$6(nativeExec, re1, 'a');
|
|
1242
|
+
call$6(nativeExec, re2, 'a');
|
|
1241
1243
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1242
1244
|
})();
|
|
1243
1245
|
|
|
@@ -1251,34 +1253,34 @@ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPP
|
|
|
1251
1253
|
if (PATCH) {
|
|
1252
1254
|
patchedExec = function exec(string) {
|
|
1253
1255
|
var re = this;
|
|
1254
|
-
var state = getInternalState(re);
|
|
1255
|
-
var str = toString(string);
|
|
1256
|
+
var state = getInternalState$2(re);
|
|
1257
|
+
var str = toString$3(string);
|
|
1256
1258
|
var raw = state.raw;
|
|
1257
1259
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
1258
1260
|
|
|
1259
1261
|
if (raw) {
|
|
1260
1262
|
raw.lastIndex = re.lastIndex;
|
|
1261
|
-
result = call(patchedExec, raw, str);
|
|
1263
|
+
result = call$6(patchedExec, raw, str);
|
|
1262
1264
|
re.lastIndex = raw.lastIndex;
|
|
1263
1265
|
return result;
|
|
1264
1266
|
}
|
|
1265
1267
|
|
|
1266
1268
|
var groups = state.groups;
|
|
1267
1269
|
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1268
|
-
var flags = call(regexpFlags, re);
|
|
1270
|
+
var flags = call$6(regexpFlags, re);
|
|
1269
1271
|
var source = re.source;
|
|
1270
1272
|
var charsAdded = 0;
|
|
1271
1273
|
var strCopy = str;
|
|
1272
1274
|
|
|
1273
1275
|
if (sticky) {
|
|
1274
|
-
flags = replace(flags, 'y', '');
|
|
1276
|
+
flags = replace$3(flags, 'y', '');
|
|
1275
1277
|
if (indexOf(flags, 'g') === -1) {
|
|
1276
1278
|
flags += 'g';
|
|
1277
1279
|
}
|
|
1278
1280
|
|
|
1279
|
-
strCopy = stringSlice(str, re.lastIndex);
|
|
1281
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
|
1280
1282
|
// Support anchored sticky behavior.
|
|
1281
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1283
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$4(str, re.lastIndex - 1) !== '\n')) {
|
|
1282
1284
|
source = '(?: ' + source + ')';
|
|
1283
1285
|
strCopy = ' ' + strCopy;
|
|
1284
1286
|
charsAdded++;
|
|
@@ -1293,12 +1295,12 @@ if (PATCH) {
|
|
|
1293
1295
|
}
|
|
1294
1296
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1295
1297
|
|
|
1296
|
-
match = call(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1298
|
+
match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1297
1299
|
|
|
1298
1300
|
if (sticky) {
|
|
1299
1301
|
if (match) {
|
|
1300
|
-
match.input = stringSlice(match.input, charsAdded);
|
|
1301
|
-
match[0] = stringSlice(match[0], charsAdded);
|
|
1302
|
+
match.input = stringSlice$4(match.input, charsAdded);
|
|
1303
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
|
1302
1304
|
match.index = re.lastIndex;
|
|
1303
1305
|
re.lastIndex += match[0].length;
|
|
1304
1306
|
} else re.lastIndex = 0;
|
|
@@ -1308,7 +1310,7 @@ if (PATCH) {
|
|
|
1308
1310
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1309
1311
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1310
1312
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1311
|
-
call(nativeReplace, match[0], reCopy, function () {
|
|
1313
|
+
call$6(nativeReplace, match[0], reCopy, function () {
|
|
1312
1314
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1313
1315
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
1314
1316
|
}
|
|
@@ -1316,7 +1318,7 @@ if (PATCH) {
|
|
|
1316
1318
|
}
|
|
1317
1319
|
|
|
1318
1320
|
if (match && groups) {
|
|
1319
|
-
match.groups = object = create(null);
|
|
1321
|
+
match.groups = object = create$3(null);
|
|
1320
1322
|
for (i = 0; i < groups.length; i++) {
|
|
1321
1323
|
group = groups[i];
|
|
1322
1324
|
object[group[0]] = match[group[1]];
|
|
@@ -1329,207 +1331,2776 @@ if (PATCH) {
|
|
|
1329
1331
|
|
|
1330
1332
|
var regexpExec = patchedExec;
|
|
1331
1333
|
|
|
1332
|
-
var
|
|
1333
|
-
var exec = regexpExec;
|
|
1334
|
+
var $$4 = _export;
|
|
1335
|
+
var exec$3 = regexpExec;
|
|
1334
1336
|
|
|
1335
1337
|
// `RegExp.prototype.exec` method
|
|
1336
1338
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1337
|
-
|
|
1338
|
-
exec: exec
|
|
1339
|
+
$$4({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
|
|
1340
|
+
exec: exec$3
|
|
1339
1341
|
});
|
|
1340
1342
|
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1343
|
+
// iterable DOM collections
|
|
1344
|
+
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1345
|
+
var domIterables = {
|
|
1346
|
+
CSSRuleList: 0,
|
|
1347
|
+
CSSStyleDeclaration: 0,
|
|
1348
|
+
CSSValueList: 0,
|
|
1349
|
+
ClientRectList: 0,
|
|
1350
|
+
DOMRectList: 0,
|
|
1351
|
+
DOMStringList: 0,
|
|
1352
|
+
DOMTokenList: 1,
|
|
1353
|
+
DataTransferItemList: 0,
|
|
1354
|
+
FileList: 0,
|
|
1355
|
+
HTMLAllCollection: 0,
|
|
1356
|
+
HTMLCollection: 0,
|
|
1357
|
+
HTMLFormElement: 0,
|
|
1358
|
+
HTMLSelectElement: 0,
|
|
1359
|
+
MediaList: 0,
|
|
1360
|
+
MimeTypeArray: 0,
|
|
1361
|
+
NamedNodeMap: 0,
|
|
1362
|
+
NodeList: 1,
|
|
1363
|
+
PaintRequestList: 0,
|
|
1364
|
+
Plugin: 0,
|
|
1365
|
+
PluginArray: 0,
|
|
1366
|
+
SVGLengthList: 0,
|
|
1367
|
+
SVGNumberList: 0,
|
|
1368
|
+
SVGPathSegList: 0,
|
|
1369
|
+
SVGPointList: 0,
|
|
1370
|
+
SVGStringList: 0,
|
|
1371
|
+
SVGTransformList: 0,
|
|
1372
|
+
SourceBufferList: 0,
|
|
1373
|
+
StyleSheetList: 0,
|
|
1374
|
+
TextTrackCueList: 0,
|
|
1375
|
+
TextTrackList: 0,
|
|
1376
|
+
TouchList: 0
|
|
1377
|
+
};
|
|
1351
1378
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
}
|
|
1355
|
-
/**
|
|
1356
|
-
* @param {HebrewCalendar.Options} options
|
|
1357
|
-
* @return {string}
|
|
1358
|
-
*/
|
|
1379
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
1380
|
+
var documentCreateElement = documentCreateElement$2;
|
|
1359
1381
|
|
|
1360
|
-
|
|
1361
|
-
|
|
1382
|
+
var classList = documentCreateElement('span').classList;
|
|
1383
|
+
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
1362
1384
|
|
|
1363
|
-
|
|
1364
|
-
fileName += 'h';
|
|
1365
|
-
}
|
|
1385
|
+
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1366
1386
|
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1387
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1388
|
+
var create$2 = objectCreate;
|
|
1389
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1370
1390
|
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
fileName += '_' + makeAnchor(name).replace(/[-]/g, '_');
|
|
1374
|
-
}
|
|
1391
|
+
var UNSCOPABLES = wellKnownSymbol$a('unscopables');
|
|
1392
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1375
1393
|
|
|
1376
|
-
|
|
1394
|
+
// Array.prototype[@@unscopables]
|
|
1395
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1396
|
+
if (ArrayPrototype$1[UNSCOPABLES] == undefined) {
|
|
1397
|
+
definePropertyModule$1.f(ArrayPrototype$1, UNSCOPABLES, {
|
|
1398
|
+
configurable: true,
|
|
1399
|
+
value: create$2(null)
|
|
1400
|
+
});
|
|
1377
1401
|
}
|
|
1378
|
-
/**
|
|
1379
|
-
* @param {number} number
|
|
1380
|
-
* @return {string}
|
|
1381
|
-
*/
|
|
1382
1402
|
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1403
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1404
|
+
var addToUnscopables$1 = function (key) {
|
|
1405
|
+
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1406
|
+
};
|
|
1387
1407
|
|
|
1388
|
-
|
|
1389
|
-
}
|
|
1390
|
-
/**
|
|
1391
|
-
* @param {number} number
|
|
1392
|
-
* @return {string}
|
|
1393
|
-
*/
|
|
1408
|
+
var iterators = {};
|
|
1394
1409
|
|
|
1395
|
-
|
|
1396
|
-
if (number < 0) {
|
|
1397
|
-
return '-00' + pad4(-number);
|
|
1398
|
-
} else if (number < 10) {
|
|
1399
|
-
return '000' + number;
|
|
1400
|
-
} else if (number < 100) {
|
|
1401
|
-
return '00' + number;
|
|
1402
|
-
} else if (number < 1000) {
|
|
1403
|
-
return '0' + number;
|
|
1404
|
-
}
|
|
1410
|
+
var fails$5 = fails$g;
|
|
1405
1411
|
|
|
1406
|
-
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
* @param {Date} date
|
|
1413
|
-
* @return {string}
|
|
1414
|
-
*/
|
|
1412
|
+
var correctPrototypeGetter = !fails$5(function () {
|
|
1413
|
+
function F() { /* empty */ }
|
|
1414
|
+
F.prototype.constructor = null;
|
|
1415
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1416
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1417
|
+
});
|
|
1415
1418
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
* @return {string}
|
|
1423
|
-
*/
|
|
1419
|
+
var global$c = global$C;
|
|
1420
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1421
|
+
var isCallable$5 = isCallable$g;
|
|
1422
|
+
var toObject$2 = toObject$4;
|
|
1423
|
+
var sharedKey = sharedKey$3;
|
|
1424
|
+
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1424
1425
|
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1426
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1427
|
+
var Object$1 = global$c.Object;
|
|
1428
|
+
var ObjectPrototype = Object$1.prototype;
|
|
1429
|
+
|
|
1430
|
+
// `Object.getPrototypeOf` method
|
|
1431
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1432
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
|
|
1433
|
+
var object = toObject$2(O);
|
|
1434
|
+
if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
|
|
1435
|
+
var constructor = object.constructor;
|
|
1436
|
+
if (isCallable$5(constructor) && object instanceof constructor) {
|
|
1437
|
+
return constructor.prototype;
|
|
1438
|
+
} return object instanceof Object$1 ? ObjectPrototype : null;
|
|
1439
|
+
};
|
|
1436
1440
|
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
+
var fails$4 = fails$g;
|
|
1442
|
+
var isCallable$4 = isCallable$g;
|
|
1443
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1444
|
+
var redefine$5 = redefine$7.exports;
|
|
1445
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1446
|
+
|
|
1447
|
+
var ITERATOR$6 = wellKnownSymbol$9('iterator');
|
|
1448
|
+
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1449
|
+
|
|
1450
|
+
// `%IteratorPrototype%` object
|
|
1451
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1452
|
+
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1453
|
+
|
|
1454
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1455
|
+
if ([].keys) {
|
|
1456
|
+
arrayIterator = [].keys();
|
|
1457
|
+
// Safari 8 has buggy iterators w/o `next`
|
|
1458
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1459
|
+
else {
|
|
1460
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1461
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1462
|
+
}
|
|
1441
1463
|
}
|
|
1442
|
-
/**
|
|
1443
|
-
* Returns a category and subcategory name
|
|
1444
|
-
* @param {Event} ev
|
|
1445
|
-
* @return {string[]}
|
|
1446
|
-
*/
|
|
1447
1464
|
|
|
1448
|
-
function
|
|
1449
|
-
|
|
1465
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$4(function () {
|
|
1466
|
+
var test = {};
|
|
1467
|
+
// FF44- legacy iterators case
|
|
1468
|
+
return IteratorPrototype$2[ITERATOR$6].call(test) !== test;
|
|
1469
|
+
});
|
|
1450
1470
|
|
|
1451
|
-
|
|
1452
|
-
return ['zmanim', 'fast'];
|
|
1453
|
-
}
|
|
1471
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1454
1472
|
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1473
|
+
// `%IteratorPrototype%[@@iterator]()` method
|
|
1474
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1475
|
+
if (!isCallable$4(IteratorPrototype$2[ITERATOR$6])) {
|
|
1476
|
+
redefine$5(IteratorPrototype$2, ITERATOR$6, function () {
|
|
1477
|
+
return this;
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1458
1480
|
|
|
1459
|
-
|
|
1460
|
-
|
|
1481
|
+
var iteratorsCore = {
|
|
1482
|
+
IteratorPrototype: IteratorPrototype$2,
|
|
1483
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1484
|
+
};
|
|
1461
1485
|
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1486
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1487
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1488
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1465
1489
|
|
|
1466
|
-
|
|
1467
|
-
return ['dafyomi'];
|
|
1490
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
|
|
1468
1491
|
|
|
1469
|
-
|
|
1470
|
-
|
|
1492
|
+
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1493
|
+
if (target && !STATIC) target = target.prototype;
|
|
1494
|
+
if (target && !hasOwn$2(target, TO_STRING_TAG$1)) {
|
|
1495
|
+
defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1496
|
+
}
|
|
1497
|
+
};
|
|
1471
1498
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1499
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1500
|
+
var create$1 = objectCreate;
|
|
1501
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$5;
|
|
1502
|
+
var setToStringTag$3 = setToStringTag$4;
|
|
1503
|
+
var Iterators$4 = iterators;
|
|
1474
1504
|
|
|
1475
|
-
|
|
1476
|
-
return ['holiday', 'fast'];
|
|
1505
|
+
var returnThis$1 = function () { return this; };
|
|
1477
1506
|
|
|
1478
|
-
|
|
1479
|
-
|
|
1507
|
+
var createIteratorConstructor$2 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1508
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1509
|
+
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor$2(+!ENUMERABLE_NEXT, next) });
|
|
1510
|
+
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1511
|
+
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1512
|
+
return IteratorConstructor;
|
|
1513
|
+
};
|
|
1480
1514
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1515
|
+
var global$b = global$C;
|
|
1516
|
+
var isCallable$3 = isCallable$g;
|
|
1483
1517
|
|
|
1484
|
-
|
|
1485
|
-
|
|
1518
|
+
var String$1 = global$b.String;
|
|
1519
|
+
var TypeError$7 = global$b.TypeError;
|
|
1486
1520
|
|
|
1487
|
-
|
|
1488
|
-
|
|
1521
|
+
var aPossiblePrototype$1 = function (argument) {
|
|
1522
|
+
if (typeof argument == 'object' || isCallable$3(argument)) return argument;
|
|
1523
|
+
throw TypeError$7("Can't set " + String$1(argument) + ' as a prototype');
|
|
1524
|
+
};
|
|
1489
1525
|
|
|
1490
|
-
|
|
1491
|
-
return ['user'];
|
|
1526
|
+
/* eslint-disable no-proto -- safe */
|
|
1492
1527
|
|
|
1493
|
-
|
|
1494
|
-
|
|
1528
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1529
|
+
var anObject$5 = anObject$b;
|
|
1530
|
+
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1531
|
+
|
|
1532
|
+
// `Object.setPrototypeOf` method
|
|
1533
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1534
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1535
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1536
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1537
|
+
var CORRECT_SETTER = false;
|
|
1538
|
+
var test = {};
|
|
1539
|
+
var setter;
|
|
1540
|
+
try {
|
|
1541
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1542
|
+
setter = uncurryThis$9(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1543
|
+
setter(test, []);
|
|
1544
|
+
CORRECT_SETTER = test instanceof Array;
|
|
1545
|
+
} catch (error) { /* empty */ }
|
|
1546
|
+
return function setPrototypeOf(O, proto) {
|
|
1547
|
+
anObject$5(O);
|
|
1548
|
+
aPossiblePrototype(proto);
|
|
1549
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1550
|
+
else O.__proto__ = proto;
|
|
1551
|
+
return O;
|
|
1552
|
+
};
|
|
1553
|
+
}() : undefined);
|
|
1554
|
+
|
|
1555
|
+
var $$3 = _export;
|
|
1556
|
+
var call$5 = functionCall;
|
|
1557
|
+
var FunctionName = functionName;
|
|
1558
|
+
var isCallable$2 = isCallable$g;
|
|
1559
|
+
var createIteratorConstructor$1 = createIteratorConstructor$2;
|
|
1560
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
1561
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
1562
|
+
var setToStringTag$2 = setToStringTag$4;
|
|
1563
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
|
|
1564
|
+
var redefine$4 = redefine$7.exports;
|
|
1565
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1566
|
+
var Iterators$3 = iterators;
|
|
1567
|
+
var IteratorsCore = iteratorsCore;
|
|
1568
|
+
|
|
1569
|
+
var PROPER_FUNCTION_NAME$1 = FunctionName.PROPER;
|
|
1570
|
+
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1571
|
+
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1572
|
+
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1573
|
+
var ITERATOR$5 = wellKnownSymbol$7('iterator');
|
|
1574
|
+
var KEYS = 'keys';
|
|
1575
|
+
var VALUES = 'values';
|
|
1576
|
+
var ENTRIES = 'entries';
|
|
1577
|
+
|
|
1578
|
+
var returnThis = function () { return this; };
|
|
1579
|
+
|
|
1580
|
+
var defineIterator$2 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1581
|
+
createIteratorConstructor$1(IteratorConstructor, NAME, next);
|
|
1582
|
+
|
|
1583
|
+
var getIterationMethod = function (KIND) {
|
|
1584
|
+
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1585
|
+
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1586
|
+
switch (KIND) {
|
|
1587
|
+
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1588
|
+
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1589
|
+
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1590
|
+
} return function () { return new IteratorConstructor(this); };
|
|
1591
|
+
};
|
|
1495
1592
|
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1593
|
+
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1594
|
+
var INCORRECT_VALUES_NAME = false;
|
|
1595
|
+
var IterablePrototype = Iterable.prototype;
|
|
1596
|
+
var nativeIterator = IterablePrototype[ITERATOR$5]
|
|
1597
|
+
|| IterablePrototype['@@iterator']
|
|
1598
|
+
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1599
|
+
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1600
|
+
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1601
|
+
var CurrentIteratorPrototype, methods, KEY;
|
|
1602
|
+
|
|
1603
|
+
// fix native
|
|
1604
|
+
if (anyNativeIterator) {
|
|
1605
|
+
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1606
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1607
|
+
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1608
|
+
if (setPrototypeOf) {
|
|
1609
|
+
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1610
|
+
} else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$5])) {
|
|
1611
|
+
redefine$4(CurrentIteratorPrototype, ITERATOR$5, returnThis);
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
// Set @@toStringTag to native iterators
|
|
1615
|
+
setToStringTag$2(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1616
|
+
}
|
|
1499
1617
|
}
|
|
1500
1618
|
|
|
1501
|
-
|
|
1502
|
-
|
|
1619
|
+
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1620
|
+
if (PROPER_FUNCTION_NAME$1 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1621
|
+
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1622
|
+
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1623
|
+
} else {
|
|
1624
|
+
INCORRECT_VALUES_NAME = true;
|
|
1625
|
+
defaultIterator = function values() { return call$5(nativeIterator, this); };
|
|
1626
|
+
}
|
|
1503
1627
|
}
|
|
1504
1628
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1629
|
+
// export additional methods
|
|
1630
|
+
if (DEFAULT) {
|
|
1631
|
+
methods = {
|
|
1632
|
+
values: getIterationMethod(VALUES),
|
|
1633
|
+
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1634
|
+
entries: getIterationMethod(ENTRIES)
|
|
1635
|
+
};
|
|
1636
|
+
if (FORCED) for (KEY in methods) {
|
|
1637
|
+
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1638
|
+
redefine$4(IterablePrototype, KEY, methods[KEY]);
|
|
1639
|
+
}
|
|
1640
|
+
} else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1641
|
+
}
|
|
1508
1642
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1643
|
+
// define iterator
|
|
1644
|
+
if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
|
|
1645
|
+
redefine$4(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
|
|
1646
|
+
}
|
|
1647
|
+
Iterators$3[NAME] = defaultIterator;
|
|
1511
1648
|
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
case 'Pesach Sheni':
|
|
1515
|
-
case 'Erev Purim':
|
|
1516
|
-
case 'Purim Katan':
|
|
1517
|
-
case 'Shushan Purim':
|
|
1518
|
-
case 'Tu B\'Av':
|
|
1519
|
-
case 'Tu BiShvat':
|
|
1520
|
-
case 'Rosh Hashana LaBehemot':
|
|
1521
|
-
return ['holiday', 'minor'];
|
|
1649
|
+
return methods;
|
|
1650
|
+
};
|
|
1522
1651
|
|
|
1523
|
-
|
|
1524
|
-
|
|
1652
|
+
var toIndexedObject = toIndexedObject$5;
|
|
1653
|
+
var addToUnscopables = addToUnscopables$1;
|
|
1654
|
+
var Iterators$2 = iterators;
|
|
1655
|
+
var InternalStateModule$3 = internalState;
|
|
1656
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1657
|
+
var defineIterator$1 = defineIterator$2;
|
|
1658
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1525
1659
|
|
|
1526
|
-
|
|
1527
|
-
|
|
1660
|
+
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1661
|
+
var setInternalState$3 = InternalStateModule$3.set;
|
|
1662
|
+
var getInternalState$1 = InternalStateModule$3.getterFor(ARRAY_ITERATOR);
|
|
1663
|
+
|
|
1664
|
+
// `Array.prototype.entries` method
|
|
1665
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1666
|
+
// `Array.prototype.keys` method
|
|
1667
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1668
|
+
// `Array.prototype.values` method
|
|
1669
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1670
|
+
// `Array.prototype[@@iterator]` method
|
|
1671
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1672
|
+
// `CreateArrayIterator` internal method
|
|
1673
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1674
|
+
var es_array_iterator = defineIterator$1(Array, 'Array', function (iterated, kind) {
|
|
1675
|
+
setInternalState$3(this, {
|
|
1676
|
+
type: ARRAY_ITERATOR,
|
|
1677
|
+
target: toIndexedObject(iterated), // target
|
|
1678
|
+
index: 0, // next index
|
|
1679
|
+
kind: kind // kind
|
|
1680
|
+
});
|
|
1681
|
+
// `%ArrayIteratorPrototype%.next` method
|
|
1682
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1683
|
+
}, function () {
|
|
1684
|
+
var state = getInternalState$1(this);
|
|
1685
|
+
var target = state.target;
|
|
1686
|
+
var kind = state.kind;
|
|
1687
|
+
var index = state.index++;
|
|
1688
|
+
if (!target || index >= target.length) {
|
|
1689
|
+
state.target = undefined;
|
|
1690
|
+
return { value: undefined, done: true };
|
|
1691
|
+
}
|
|
1692
|
+
if (kind == 'keys') return { value: index, done: false };
|
|
1693
|
+
if (kind == 'values') return { value: target[index], done: false };
|
|
1694
|
+
return { value: [index, target[index]], done: false };
|
|
1695
|
+
}, 'values');
|
|
1696
|
+
|
|
1697
|
+
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1698
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1699
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1700
|
+
var values = Iterators$2.Arguments = Iterators$2.Array;
|
|
1701
|
+
|
|
1702
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1703
|
+
addToUnscopables('keys');
|
|
1704
|
+
addToUnscopables('values');
|
|
1705
|
+
addToUnscopables('entries');
|
|
1706
|
+
|
|
1707
|
+
// V8 ~ Chrome 45- bug
|
|
1708
|
+
if (DESCRIPTORS$2 && values.name !== 'values') try {
|
|
1709
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
1710
|
+
} catch (error) { /* empty */ }
|
|
1711
|
+
|
|
1712
|
+
var global$a = global$C;
|
|
1713
|
+
var DOMIterables = domIterables;
|
|
1714
|
+
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1715
|
+
var ArrayIteratorMethods = es_array_iterator;
|
|
1716
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
1717
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1718
|
+
|
|
1719
|
+
var ITERATOR$4 = wellKnownSymbol$6('iterator');
|
|
1720
|
+
var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
|
|
1721
|
+
var ArrayValues = ArrayIteratorMethods.values;
|
|
1722
|
+
|
|
1723
|
+
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1724
|
+
if (CollectionPrototype) {
|
|
1725
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1726
|
+
if (CollectionPrototype[ITERATOR$4] !== ArrayValues) try {
|
|
1727
|
+
createNonEnumerableProperty(CollectionPrototype, ITERATOR$4, ArrayValues);
|
|
1728
|
+
} catch (error) {
|
|
1729
|
+
CollectionPrototype[ITERATOR$4] = ArrayValues;
|
|
1730
|
+
}
|
|
1731
|
+
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1732
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1733
|
+
}
|
|
1734
|
+
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1735
|
+
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1736
|
+
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
1737
|
+
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
1738
|
+
} catch (error) {
|
|
1739
|
+
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1528
1742
|
}
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1745
|
+
for (var COLLECTION_NAME in DOMIterables) {
|
|
1746
|
+
handlePrototype(global$a[COLLECTION_NAME] && global$a[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1529
1747
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1748
|
+
|
|
1749
|
+
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1750
|
+
|
|
1751
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1752
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$3;
|
|
1753
|
+
var toString$2 = toString$4;
|
|
1754
|
+
var requireObjectCoercible$1 = requireObjectCoercible$4;
|
|
1755
|
+
|
|
1756
|
+
var charAt$3 = uncurryThis$8(''.charAt);
|
|
1757
|
+
var charCodeAt$1 = uncurryThis$8(''.charCodeAt);
|
|
1758
|
+
var stringSlice$3 = uncurryThis$8(''.slice);
|
|
1759
|
+
|
|
1760
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
1761
|
+
return function ($this, pos) {
|
|
1762
|
+
var S = toString$2(requireObjectCoercible$1($this));
|
|
1763
|
+
var position = toIntegerOrInfinity(pos);
|
|
1764
|
+
var size = S.length;
|
|
1765
|
+
var first, second;
|
|
1766
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1767
|
+
first = charCodeAt$1(S, position);
|
|
1768
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1769
|
+
|| (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1770
|
+
? CONVERT_TO_STRING
|
|
1771
|
+
? charAt$3(S, position)
|
|
1772
|
+
: first
|
|
1773
|
+
: CONVERT_TO_STRING
|
|
1774
|
+
? stringSlice$3(S, position, position + 2)
|
|
1775
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
|
|
1779
|
+
var stringMultibyte = {
|
|
1780
|
+
// `String.prototype.codePointAt` method
|
|
1781
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
1782
|
+
codeAt: createMethod(false),
|
|
1783
|
+
// `String.prototype.at` method
|
|
1784
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
1785
|
+
charAt: createMethod(true)
|
|
1786
|
+
};
|
|
1787
|
+
|
|
1788
|
+
var charAt$2 = stringMultibyte.charAt;
|
|
1789
|
+
var toString$1 = toString$4;
|
|
1790
|
+
var InternalStateModule$2 = internalState;
|
|
1791
|
+
var defineIterator = defineIterator$2;
|
|
1792
|
+
|
|
1793
|
+
var STRING_ITERATOR = 'String Iterator';
|
|
1794
|
+
var setInternalState$2 = InternalStateModule$2.set;
|
|
1795
|
+
var getInternalState = InternalStateModule$2.getterFor(STRING_ITERATOR);
|
|
1796
|
+
|
|
1797
|
+
// `String.prototype[@@iterator]` method
|
|
1798
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
1799
|
+
defineIterator(String, 'String', function (iterated) {
|
|
1800
|
+
setInternalState$2(this, {
|
|
1801
|
+
type: STRING_ITERATOR,
|
|
1802
|
+
string: toString$1(iterated),
|
|
1803
|
+
index: 0
|
|
1804
|
+
});
|
|
1805
|
+
// `%StringIteratorPrototype%.next` method
|
|
1806
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
1807
|
+
}, function next() {
|
|
1808
|
+
var state = getInternalState(this);
|
|
1809
|
+
var string = state.string;
|
|
1810
|
+
var index = state.index;
|
|
1811
|
+
var point;
|
|
1812
|
+
if (index >= string.length) return { value: undefined, done: true };
|
|
1813
|
+
point = charAt$2(string, index);
|
|
1814
|
+
state.index += point.length;
|
|
1815
|
+
return { value: point, done: false };
|
|
1816
|
+
});
|
|
1817
|
+
|
|
1818
|
+
var fails$3 = fails$g;
|
|
1819
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
1820
|
+
var IS_PURE = isPure;
|
|
1821
|
+
|
|
1822
|
+
var ITERATOR$3 = wellKnownSymbol$5('iterator');
|
|
1823
|
+
|
|
1824
|
+
var nativeUrl = !fails$3(function () {
|
|
1825
|
+
// eslint-disable-next-line unicorn/relative-url-style -- required for testing
|
|
1826
|
+
var url = new URL('b?a=1&b=2&c=3', 'http://a');
|
|
1827
|
+
var searchParams = url.searchParams;
|
|
1828
|
+
var result = '';
|
|
1829
|
+
url.pathname = 'c%20d';
|
|
1830
|
+
searchParams.forEach(function (value, key) {
|
|
1831
|
+
searchParams['delete']('b');
|
|
1832
|
+
result += key + value;
|
|
1833
|
+
});
|
|
1834
|
+
return (IS_PURE && !url.toJSON)
|
|
1835
|
+
|| !searchParams.sort
|
|
1836
|
+
|| url.href !== 'http://a/c%20d?a=1&c=3'
|
|
1837
|
+
|| searchParams.get('c') !== '3'
|
|
1838
|
+
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|
|
1839
|
+
|| !searchParams[ITERATOR$3]
|
|
1840
|
+
// throws in Edge
|
|
1841
|
+
|| new URL('https://a@b').username !== 'a'
|
|
1842
|
+
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
|
|
1843
|
+
// not punycoded in Edge
|
|
1844
|
+
|| new URL('http://тест').host !== 'xn--e1aybc'
|
|
1845
|
+
// not escaped in Chrome 62-
|
|
1846
|
+
|| new URL('http://a#б').hash !== '#%D0%B1'
|
|
1847
|
+
// fails in Chrome 66-
|
|
1848
|
+
|| result !== 'a1c3'
|
|
1849
|
+
// throws in Safari
|
|
1850
|
+
|| new URL('http://x', undefined).host !== 'x';
|
|
1851
|
+
});
|
|
1852
|
+
|
|
1853
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1854
|
+
var aCallable$1 = aCallable$3;
|
|
1855
|
+
var NATIVE_BIND = functionBindNative;
|
|
1856
|
+
|
|
1857
|
+
var bind$3 = uncurryThis$7(uncurryThis$7.bind);
|
|
1858
|
+
|
|
1859
|
+
// optional / simple context binding
|
|
1860
|
+
var functionBindContext = function (fn, that) {
|
|
1861
|
+
aCallable$1(fn);
|
|
1862
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$3(fn, that) : function (/* ...args */) {
|
|
1863
|
+
return fn.apply(that, arguments);
|
|
1864
|
+
};
|
|
1865
|
+
};
|
|
1866
|
+
|
|
1867
|
+
var global$9 = global$C;
|
|
1868
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1869
|
+
|
|
1870
|
+
var TypeError$6 = global$9.TypeError;
|
|
1871
|
+
|
|
1872
|
+
var anInstance$2 = function (it, Prototype) {
|
|
1873
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1874
|
+
throw TypeError$6('Incorrect invocation');
|
|
1875
|
+
};
|
|
1876
|
+
|
|
1877
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1878
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1879
|
+
var call$4 = functionCall;
|
|
1880
|
+
var fails$2 = fails$g;
|
|
1881
|
+
var objectKeys = objectKeys$2;
|
|
1882
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1883
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1884
|
+
var toObject$1 = toObject$4;
|
|
1885
|
+
var IndexedObject = indexedObject;
|
|
1886
|
+
|
|
1887
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1888
|
+
var $assign = Object.assign;
|
|
1889
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1890
|
+
var defineProperty = Object.defineProperty;
|
|
1891
|
+
var concat = uncurryThis$6([].concat);
|
|
1892
|
+
|
|
1893
|
+
// `Object.assign` method
|
|
1894
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1895
|
+
var objectAssign = !$assign || fails$2(function () {
|
|
1896
|
+
// should have correct order of operations (Edge bug)
|
|
1897
|
+
if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1898
|
+
enumerable: true,
|
|
1899
|
+
get: function () {
|
|
1900
|
+
defineProperty(this, 'b', {
|
|
1901
|
+
value: 3,
|
|
1902
|
+
enumerable: false
|
|
1903
|
+
});
|
|
1904
|
+
}
|
|
1905
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1906
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1907
|
+
var A = {};
|
|
1908
|
+
var B = {};
|
|
1909
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1910
|
+
var symbol = Symbol();
|
|
1911
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1912
|
+
A[symbol] = 7;
|
|
1913
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1914
|
+
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
1915
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1916
|
+
var T = toObject$1(target);
|
|
1917
|
+
var argumentsLength = arguments.length;
|
|
1918
|
+
var index = 1;
|
|
1919
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1920
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1921
|
+
while (argumentsLength > index) {
|
|
1922
|
+
var S = IndexedObject(arguments[index++]);
|
|
1923
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1924
|
+
var length = keys.length;
|
|
1925
|
+
var j = 0;
|
|
1926
|
+
var key;
|
|
1927
|
+
while (length > j) {
|
|
1928
|
+
key = keys[j++];
|
|
1929
|
+
if (!DESCRIPTORS$1 || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1930
|
+
}
|
|
1931
|
+
} return T;
|
|
1932
|
+
} : $assign;
|
|
1933
|
+
|
|
1934
|
+
var call$3 = functionCall;
|
|
1935
|
+
var anObject$4 = anObject$b;
|
|
1936
|
+
var getMethod$1 = getMethod$3;
|
|
1937
|
+
|
|
1938
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1939
|
+
var innerResult, innerError;
|
|
1940
|
+
anObject$4(iterator);
|
|
1941
|
+
try {
|
|
1942
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1943
|
+
if (!innerResult) {
|
|
1944
|
+
if (kind === 'throw') throw value;
|
|
1945
|
+
return value;
|
|
1946
|
+
}
|
|
1947
|
+
innerResult = call$3(innerResult, iterator);
|
|
1948
|
+
} catch (error) {
|
|
1949
|
+
innerError = true;
|
|
1950
|
+
innerResult = error;
|
|
1951
|
+
}
|
|
1952
|
+
if (kind === 'throw') throw value;
|
|
1953
|
+
if (innerError) throw innerResult;
|
|
1954
|
+
anObject$4(innerResult);
|
|
1955
|
+
return value;
|
|
1956
|
+
};
|
|
1957
|
+
|
|
1958
|
+
var anObject$3 = anObject$b;
|
|
1959
|
+
var iteratorClose = iteratorClose$1;
|
|
1960
|
+
|
|
1961
|
+
// call something on iterator step with safe closing on error
|
|
1962
|
+
var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
|
|
1963
|
+
try {
|
|
1964
|
+
return ENTRIES ? fn(anObject$3(value)[0], value[1]) : fn(value);
|
|
1965
|
+
} catch (error) {
|
|
1966
|
+
iteratorClose(iterator, 'throw', error);
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
1971
|
+
var Iterators$1 = iterators;
|
|
1972
|
+
|
|
1973
|
+
var ITERATOR$2 = wellKnownSymbol$4('iterator');
|
|
1974
|
+
var ArrayPrototype = Array.prototype;
|
|
1975
|
+
|
|
1976
|
+
// check on default Array iterator
|
|
1977
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
1978
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1979
|
+
};
|
|
1980
|
+
|
|
1981
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1982
|
+
var fails$1 = fails$g;
|
|
1983
|
+
var isCallable$1 = isCallable$g;
|
|
1984
|
+
var classof$3 = classof$5;
|
|
1985
|
+
var getBuiltIn$1 = getBuiltIn$6;
|
|
1986
|
+
var inspectSource = inspectSource$3;
|
|
1987
|
+
|
|
1988
|
+
var noop = function () { /* empty */ };
|
|
1989
|
+
var empty = [];
|
|
1990
|
+
var construct = getBuiltIn$1('Reflect', 'construct');
|
|
1991
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1992
|
+
var exec$2 = uncurryThis$5(constructorRegExp.exec);
|
|
1993
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1994
|
+
|
|
1995
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1996
|
+
if (!isCallable$1(argument)) return false;
|
|
1997
|
+
try {
|
|
1998
|
+
construct(noop, empty, argument);
|
|
1999
|
+
return true;
|
|
2000
|
+
} catch (error) {
|
|
2001
|
+
return false;
|
|
2002
|
+
}
|
|
2003
|
+
};
|
|
2004
|
+
|
|
2005
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
2006
|
+
if (!isCallable$1(argument)) return false;
|
|
2007
|
+
switch (classof$3(argument)) {
|
|
2008
|
+
case 'AsyncFunction':
|
|
2009
|
+
case 'GeneratorFunction':
|
|
2010
|
+
case 'AsyncGeneratorFunction': return false;
|
|
2011
|
+
}
|
|
2012
|
+
try {
|
|
2013
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2014
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2015
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
2016
|
+
return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
|
|
2017
|
+
} catch (error) {
|
|
2018
|
+
return true;
|
|
2019
|
+
}
|
|
2020
|
+
};
|
|
2021
|
+
|
|
2022
|
+
isConstructorLegacy.sham = true;
|
|
2023
|
+
|
|
2024
|
+
// `IsConstructor` abstract operation
|
|
2025
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2026
|
+
var isConstructor$1 = !construct || fails$1(function () {
|
|
2027
|
+
var called;
|
|
2028
|
+
return isConstructorModern(isConstructorModern.call)
|
|
2029
|
+
|| !isConstructorModern(Object)
|
|
2030
|
+
|| !isConstructorModern(function () { called = true; })
|
|
2031
|
+
|| called;
|
|
2032
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
2033
|
+
|
|
2034
|
+
var toPropertyKey = toPropertyKey$3;
|
|
2035
|
+
var definePropertyModule = objectDefineProperty;
|
|
2036
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$5;
|
|
2037
|
+
|
|
2038
|
+
var createProperty$2 = function (object, key, value) {
|
|
2039
|
+
var propertyKey = toPropertyKey(key);
|
|
2040
|
+
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor$1(0, value));
|
|
2041
|
+
else object[propertyKey] = value;
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
var classof$2 = classof$5;
|
|
2045
|
+
var getMethod = getMethod$3;
|
|
2046
|
+
var Iterators = iterators;
|
|
2047
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
2048
|
+
|
|
2049
|
+
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
2050
|
+
|
|
2051
|
+
var getIteratorMethod$3 = function (it) {
|
|
2052
|
+
if (it != undefined) return getMethod(it, ITERATOR$1)
|
|
2053
|
+
|| getMethod(it, '@@iterator')
|
|
2054
|
+
|| Iterators[classof$2(it)];
|
|
2055
|
+
};
|
|
2056
|
+
|
|
2057
|
+
var global$8 = global$C;
|
|
2058
|
+
var call$2 = functionCall;
|
|
2059
|
+
var aCallable = aCallable$3;
|
|
2060
|
+
var anObject$2 = anObject$b;
|
|
2061
|
+
var tryToString = tryToString$2;
|
|
2062
|
+
var getIteratorMethod$2 = getIteratorMethod$3;
|
|
2063
|
+
|
|
2064
|
+
var TypeError$5 = global$8.TypeError;
|
|
2065
|
+
|
|
2066
|
+
var getIterator$2 = function (argument, usingIterator) {
|
|
2067
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$2(argument) : usingIterator;
|
|
2068
|
+
if (aCallable(iteratorMethod)) return anObject$2(call$2(iteratorMethod, argument));
|
|
2069
|
+
throw TypeError$5(tryToString(argument) + ' is not iterable');
|
|
2070
|
+
};
|
|
2071
|
+
|
|
2072
|
+
var global$7 = global$C;
|
|
2073
|
+
var bind$2 = functionBindContext;
|
|
2074
|
+
var call$1 = functionCall;
|
|
2075
|
+
var toObject = toObject$4;
|
|
2076
|
+
var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
|
|
2077
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
2078
|
+
var isConstructor = isConstructor$1;
|
|
2079
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
2080
|
+
var createProperty$1 = createProperty$2;
|
|
2081
|
+
var getIterator$1 = getIterator$2;
|
|
2082
|
+
var getIteratorMethod$1 = getIteratorMethod$3;
|
|
2083
|
+
|
|
2084
|
+
var Array$2 = global$7.Array;
|
|
2085
|
+
|
|
2086
|
+
// `Array.from` method implementation
|
|
2087
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
2088
|
+
var arrayFrom$1 = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
2089
|
+
var O = toObject(arrayLike);
|
|
2090
|
+
var IS_CONSTRUCTOR = isConstructor(this);
|
|
2091
|
+
var argumentsLength = arguments.length;
|
|
2092
|
+
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
2093
|
+
var mapping = mapfn !== undefined;
|
|
2094
|
+
if (mapping) mapfn = bind$2(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
2095
|
+
var iteratorMethod = getIteratorMethod$1(O);
|
|
2096
|
+
var index = 0;
|
|
2097
|
+
var length, result, step, iterator, next, value;
|
|
2098
|
+
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
2099
|
+
if (iteratorMethod && !(this == Array$2 && isArrayIteratorMethod(iteratorMethod))) {
|
|
2100
|
+
iterator = getIterator$1(O, iteratorMethod);
|
|
2101
|
+
next = iterator.next;
|
|
2102
|
+
result = IS_CONSTRUCTOR ? new this() : [];
|
|
2103
|
+
for (;!(step = call$1(next, iterator)).done; index++) {
|
|
2104
|
+
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
2105
|
+
createProperty$1(result, index, value);
|
|
2106
|
+
}
|
|
2107
|
+
} else {
|
|
2108
|
+
length = lengthOfArrayLike$1(O);
|
|
2109
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$2(length);
|
|
2110
|
+
for (;length > index; index++) {
|
|
2111
|
+
value = mapping ? mapfn(O[index], index) : O[index];
|
|
2112
|
+
createProperty$1(result, index, value);
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
result.length = index;
|
|
2116
|
+
return result;
|
|
2117
|
+
};
|
|
2118
|
+
|
|
2119
|
+
var global$6 = global$C;
|
|
2120
|
+
var toAbsoluteIndex = toAbsoluteIndex$2;
|
|
2121
|
+
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
2122
|
+
var createProperty = createProperty$2;
|
|
2123
|
+
|
|
2124
|
+
var Array$1 = global$6.Array;
|
|
2125
|
+
var max = Math.max;
|
|
2126
|
+
|
|
2127
|
+
var arraySliceSimple = function (O, start, end) {
|
|
2128
|
+
var length = lengthOfArrayLike(O);
|
|
2129
|
+
var k = toAbsoluteIndex(start, length);
|
|
2130
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
2131
|
+
var result = Array$1(max(fin - k, 0));
|
|
2132
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
2133
|
+
result.length = n;
|
|
2134
|
+
return result;
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
|
|
2138
|
+
var global$5 = global$C;
|
|
2139
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
2140
|
+
|
|
2141
|
+
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
|
|
2142
|
+
var base = 36;
|
|
2143
|
+
var tMin = 1;
|
|
2144
|
+
var tMax = 26;
|
|
2145
|
+
var skew = 38;
|
|
2146
|
+
var damp = 700;
|
|
2147
|
+
var initialBias = 72;
|
|
2148
|
+
var initialN = 128; // 0x80
|
|
2149
|
+
var delimiter = '-'; // '\x2D'
|
|
2150
|
+
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
|
|
2151
|
+
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
|
|
2152
|
+
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
|
|
2153
|
+
var baseMinusTMin = base - tMin;
|
|
2154
|
+
|
|
2155
|
+
var RangeError = global$5.RangeError;
|
|
2156
|
+
var exec$1 = uncurryThis$4(regexSeparators.exec);
|
|
2157
|
+
var floor$2 = Math.floor;
|
|
2158
|
+
var fromCharCode = String.fromCharCode;
|
|
2159
|
+
var charCodeAt = uncurryThis$4(''.charCodeAt);
|
|
2160
|
+
var join$2 = uncurryThis$4([].join);
|
|
2161
|
+
var push$2 = uncurryThis$4([].push);
|
|
2162
|
+
var replace$2 = uncurryThis$4(''.replace);
|
|
2163
|
+
var split$2 = uncurryThis$4(''.split);
|
|
2164
|
+
var toLowerCase$1 = uncurryThis$4(''.toLowerCase);
|
|
2165
|
+
|
|
2166
|
+
/**
|
|
2167
|
+
* Creates an array containing the numeric code points of each Unicode
|
|
2168
|
+
* character in the string. While JavaScript uses UCS-2 internally,
|
|
2169
|
+
* this function will convert a pair of surrogate halves (each of which
|
|
2170
|
+
* UCS-2 exposes as separate characters) into a single code point,
|
|
2171
|
+
* matching UTF-16.
|
|
2172
|
+
*/
|
|
2173
|
+
var ucs2decode = function (string) {
|
|
2174
|
+
var output = [];
|
|
2175
|
+
var counter = 0;
|
|
2176
|
+
var length = string.length;
|
|
2177
|
+
while (counter < length) {
|
|
2178
|
+
var value = charCodeAt(string, counter++);
|
|
2179
|
+
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
|
2180
|
+
// It's a high surrogate, and there is a next character.
|
|
2181
|
+
var extra = charCodeAt(string, counter++);
|
|
2182
|
+
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
|
|
2183
|
+
push$2(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
|
2184
|
+
} else {
|
|
2185
|
+
// It's an unmatched surrogate; only append this code unit, in case the
|
|
2186
|
+
// next code unit is the high surrogate of a surrogate pair.
|
|
2187
|
+
push$2(output, value);
|
|
2188
|
+
counter--;
|
|
2189
|
+
}
|
|
2190
|
+
} else {
|
|
2191
|
+
push$2(output, value);
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
return output;
|
|
2195
|
+
};
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Converts a digit/integer into a basic code point.
|
|
2199
|
+
*/
|
|
2200
|
+
var digitToBasic = function (digit) {
|
|
2201
|
+
// 0..25 map to ASCII a..z or A..Z
|
|
2202
|
+
// 26..35 map to ASCII 0..9
|
|
2203
|
+
return digit + 22 + 75 * (digit < 26);
|
|
2204
|
+
};
|
|
2205
|
+
|
|
2206
|
+
/**
|
|
2207
|
+
* Bias adaptation function as per section 3.4 of RFC 3492.
|
|
2208
|
+
* https://tools.ietf.org/html/rfc3492#section-3.4
|
|
2209
|
+
*/
|
|
2210
|
+
var adapt = function (delta, numPoints, firstTime) {
|
|
2211
|
+
var k = 0;
|
|
2212
|
+
delta = firstTime ? floor$2(delta / damp) : delta >> 1;
|
|
2213
|
+
delta += floor$2(delta / numPoints);
|
|
2214
|
+
while (delta > baseMinusTMin * tMax >> 1) {
|
|
2215
|
+
delta = floor$2(delta / baseMinusTMin);
|
|
2216
|
+
k += base;
|
|
2217
|
+
}
|
|
2218
|
+
return floor$2(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
|
2219
|
+
};
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
|
2223
|
+
* Punycode string of ASCII-only symbols.
|
|
2224
|
+
*/
|
|
2225
|
+
var encode = function (input) {
|
|
2226
|
+
var output = [];
|
|
2227
|
+
|
|
2228
|
+
// Convert the input in UCS-2 to an array of Unicode code points.
|
|
2229
|
+
input = ucs2decode(input);
|
|
2230
|
+
|
|
2231
|
+
// Cache the length.
|
|
2232
|
+
var inputLength = input.length;
|
|
2233
|
+
|
|
2234
|
+
// Initialize the state.
|
|
2235
|
+
var n = initialN;
|
|
2236
|
+
var delta = 0;
|
|
2237
|
+
var bias = initialBias;
|
|
2238
|
+
var i, currentValue;
|
|
2239
|
+
|
|
2240
|
+
// Handle the basic code points.
|
|
2241
|
+
for (i = 0; i < input.length; i++) {
|
|
2242
|
+
currentValue = input[i];
|
|
2243
|
+
if (currentValue < 0x80) {
|
|
2244
|
+
push$2(output, fromCharCode(currentValue));
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
var basicLength = output.length; // number of basic code points.
|
|
2249
|
+
var handledCPCount = basicLength; // number of code points that have been handled;
|
|
2250
|
+
|
|
2251
|
+
// Finish the basic string with a delimiter unless it's empty.
|
|
2252
|
+
if (basicLength) {
|
|
2253
|
+
push$2(output, delimiter);
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
// Main encoding loop:
|
|
2257
|
+
while (handledCPCount < inputLength) {
|
|
2258
|
+
// All non-basic code points < n have been handled already. Find the next larger one:
|
|
2259
|
+
var m = maxInt;
|
|
2260
|
+
for (i = 0; i < input.length; i++) {
|
|
2261
|
+
currentValue = input[i];
|
|
2262
|
+
if (currentValue >= n && currentValue < m) {
|
|
2263
|
+
m = currentValue;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
|
|
2268
|
+
var handledCPCountPlusOne = handledCPCount + 1;
|
|
2269
|
+
if (m - n > floor$2((maxInt - delta) / handledCPCountPlusOne)) {
|
|
2270
|
+
throw RangeError(OVERFLOW_ERROR);
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
delta += (m - n) * handledCPCountPlusOne;
|
|
2274
|
+
n = m;
|
|
2275
|
+
|
|
2276
|
+
for (i = 0; i < input.length; i++) {
|
|
2277
|
+
currentValue = input[i];
|
|
2278
|
+
if (currentValue < n && ++delta > maxInt) {
|
|
2279
|
+
throw RangeError(OVERFLOW_ERROR);
|
|
2280
|
+
}
|
|
2281
|
+
if (currentValue == n) {
|
|
2282
|
+
// Represent delta as a generalized variable-length integer.
|
|
2283
|
+
var q = delta;
|
|
2284
|
+
var k = base;
|
|
2285
|
+
while (true) {
|
|
2286
|
+
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
|
2287
|
+
if (q < t) break;
|
|
2288
|
+
var qMinusT = q - t;
|
|
2289
|
+
var baseMinusT = base - t;
|
|
2290
|
+
push$2(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
|
|
2291
|
+
q = floor$2(qMinusT / baseMinusT);
|
|
2292
|
+
k += base;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
push$2(output, fromCharCode(digitToBasic(q)));
|
|
2296
|
+
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
|
2297
|
+
delta = 0;
|
|
2298
|
+
handledCPCount++;
|
|
2299
|
+
}
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
delta++;
|
|
2303
|
+
n++;
|
|
2304
|
+
}
|
|
2305
|
+
return join$2(output, '');
|
|
2306
|
+
};
|
|
2307
|
+
|
|
2308
|
+
var stringPunycodeToAscii = function (input) {
|
|
2309
|
+
var encoded = [];
|
|
2310
|
+
var labels = split$2(replace$2(toLowerCase$1(input), regexSeparators, '\u002E'), '.');
|
|
2311
|
+
var i, label;
|
|
2312
|
+
for (i = 0; i < labels.length; i++) {
|
|
2313
|
+
label = labels[i];
|
|
2314
|
+
push$2(encoded, exec$1(regexNonASCII, label) ? 'xn--' + encode(label) : label);
|
|
2315
|
+
}
|
|
2316
|
+
return join$2(encoded, '.');
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
var global$4 = global$C;
|
|
2320
|
+
|
|
2321
|
+
var TypeError$4 = global$4.TypeError;
|
|
2322
|
+
|
|
2323
|
+
var validateArgumentsLength$2 = function (passed, required) {
|
|
2324
|
+
if (passed < required) throw TypeError$4('Not enough arguments');
|
|
2325
|
+
return passed;
|
|
2326
|
+
};
|
|
2327
|
+
|
|
2328
|
+
var redefine$3 = redefine$7.exports;
|
|
2329
|
+
|
|
2330
|
+
var redefineAll$1 = function (target, src, options) {
|
|
2331
|
+
for (var key in src) redefine$3(target, key, src[key], options);
|
|
2332
|
+
return target;
|
|
2333
|
+
};
|
|
2334
|
+
|
|
2335
|
+
var arraySlice$1 = arraySliceSimple;
|
|
2336
|
+
|
|
2337
|
+
var floor$1 = Math.floor;
|
|
2338
|
+
|
|
2339
|
+
var mergeSort = function (array, comparefn) {
|
|
2340
|
+
var length = array.length;
|
|
2341
|
+
var middle = floor$1(length / 2);
|
|
2342
|
+
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
2343
|
+
array,
|
|
2344
|
+
mergeSort(arraySlice$1(array, 0, middle), comparefn),
|
|
2345
|
+
mergeSort(arraySlice$1(array, middle), comparefn),
|
|
2346
|
+
comparefn
|
|
2347
|
+
);
|
|
2348
|
+
};
|
|
2349
|
+
|
|
2350
|
+
var insertionSort = function (array, comparefn) {
|
|
2351
|
+
var length = array.length;
|
|
2352
|
+
var i = 1;
|
|
2353
|
+
var element, j;
|
|
2354
|
+
|
|
2355
|
+
while (i < length) {
|
|
2356
|
+
j = i;
|
|
2357
|
+
element = array[i];
|
|
2358
|
+
while (j && comparefn(array[j - 1], element) > 0) {
|
|
2359
|
+
array[j] = array[--j];
|
|
2360
|
+
}
|
|
2361
|
+
if (j !== i++) array[j] = element;
|
|
2362
|
+
} return array;
|
|
2363
|
+
};
|
|
2364
|
+
|
|
2365
|
+
var merge = function (array, left, right, comparefn) {
|
|
2366
|
+
var llength = left.length;
|
|
2367
|
+
var rlength = right.length;
|
|
2368
|
+
var lindex = 0;
|
|
2369
|
+
var rindex = 0;
|
|
2370
|
+
|
|
2371
|
+
while (lindex < llength || rindex < rlength) {
|
|
2372
|
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
2373
|
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
2374
|
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
2375
|
+
} return array;
|
|
2376
|
+
};
|
|
2377
|
+
|
|
2378
|
+
var arraySort$1 = mergeSort;
|
|
2379
|
+
|
|
2380
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
2381
|
+
|
|
2382
|
+
var $$2 = _export;
|
|
2383
|
+
var global$3 = global$C;
|
|
2384
|
+
var getBuiltIn = getBuiltIn$6;
|
|
2385
|
+
var call = functionCall;
|
|
2386
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2387
|
+
var USE_NATIVE_URL$1 = nativeUrl;
|
|
2388
|
+
var redefine$2 = redefine$7.exports;
|
|
2389
|
+
var redefineAll = redefineAll$1;
|
|
2390
|
+
var setToStringTag$1 = setToStringTag$4;
|
|
2391
|
+
var createIteratorConstructor = createIteratorConstructor$2;
|
|
2392
|
+
var InternalStateModule$1 = internalState;
|
|
2393
|
+
var anInstance$1 = anInstance$2;
|
|
2394
|
+
var isCallable = isCallable$g;
|
|
2395
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2396
|
+
var bind$1 = functionBindContext;
|
|
2397
|
+
var classof$1 = classof$5;
|
|
2398
|
+
var anObject$1 = anObject$b;
|
|
2399
|
+
var isObject$1 = isObject$7;
|
|
2400
|
+
var $toString$2 = toString$4;
|
|
2401
|
+
var create = objectCreate;
|
|
2402
|
+
var createPropertyDescriptor = createPropertyDescriptor$5;
|
|
2403
|
+
var getIterator = getIterator$2;
|
|
2404
|
+
var getIteratorMethod = getIteratorMethod$3;
|
|
2405
|
+
var validateArgumentsLength$1 = validateArgumentsLength$2;
|
|
2406
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
2407
|
+
var arraySort = arraySort$1;
|
|
2408
|
+
|
|
2409
|
+
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
2410
|
+
var URL_SEARCH_PARAMS = 'URLSearchParams';
|
|
2411
|
+
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
|
|
2412
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
2413
|
+
var getInternalParamsState = InternalStateModule$1.getterFor(URL_SEARCH_PARAMS);
|
|
2414
|
+
var getInternalIteratorState = InternalStateModule$1.getterFor(URL_SEARCH_PARAMS_ITERATOR);
|
|
2415
|
+
|
|
2416
|
+
var n$Fetch = getBuiltIn('fetch');
|
|
2417
|
+
var N$Request = getBuiltIn('Request');
|
|
2418
|
+
var Headers = getBuiltIn('Headers');
|
|
2419
|
+
var RequestPrototype = N$Request && N$Request.prototype;
|
|
2420
|
+
var HeadersPrototype = Headers && Headers.prototype;
|
|
2421
|
+
var RegExp$1 = global$3.RegExp;
|
|
2422
|
+
var TypeError$3 = global$3.TypeError;
|
|
2423
|
+
var decodeURIComponent = global$3.decodeURIComponent;
|
|
2424
|
+
var encodeURIComponent$1 = global$3.encodeURIComponent;
|
|
2425
|
+
var charAt$1 = uncurryThis$3(''.charAt);
|
|
2426
|
+
var join$1 = uncurryThis$3([].join);
|
|
2427
|
+
var push$1 = uncurryThis$3([].push);
|
|
2428
|
+
var replace$1 = uncurryThis$3(''.replace);
|
|
2429
|
+
var shift$1 = uncurryThis$3([].shift);
|
|
2430
|
+
var splice = uncurryThis$3([].splice);
|
|
2431
|
+
var split$1 = uncurryThis$3(''.split);
|
|
2432
|
+
var stringSlice$2 = uncurryThis$3(''.slice);
|
|
2433
|
+
|
|
2434
|
+
var plus = /\+/g;
|
|
2435
|
+
var sequences = Array(4);
|
|
2436
|
+
|
|
2437
|
+
var percentSequence = function (bytes) {
|
|
2438
|
+
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp$1('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
|
|
2439
|
+
};
|
|
2440
|
+
|
|
2441
|
+
var percentDecode = function (sequence) {
|
|
2442
|
+
try {
|
|
2443
|
+
return decodeURIComponent(sequence);
|
|
2444
|
+
} catch (error) {
|
|
2445
|
+
return sequence;
|
|
2446
|
+
}
|
|
2447
|
+
};
|
|
2448
|
+
|
|
2449
|
+
var deserialize = function (it) {
|
|
2450
|
+
var result = replace$1(it, plus, ' ');
|
|
2451
|
+
var bytes = 4;
|
|
2452
|
+
try {
|
|
2453
|
+
return decodeURIComponent(result);
|
|
2454
|
+
} catch (error) {
|
|
2455
|
+
while (bytes) {
|
|
2456
|
+
result = replace$1(result, percentSequence(bytes--), percentDecode);
|
|
2457
|
+
}
|
|
2458
|
+
return result;
|
|
2459
|
+
}
|
|
2460
|
+
};
|
|
2461
|
+
|
|
2462
|
+
var find = /[!'()~]|%20/g;
|
|
2463
|
+
|
|
2464
|
+
var replacements = {
|
|
2465
|
+
'!': '%21',
|
|
2466
|
+
"'": '%27',
|
|
2467
|
+
'(': '%28',
|
|
2468
|
+
')': '%29',
|
|
2469
|
+
'~': '%7E',
|
|
2470
|
+
'%20': '+'
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
var replacer = function (match) {
|
|
2474
|
+
return replacements[match];
|
|
2475
|
+
};
|
|
2476
|
+
|
|
2477
|
+
var serialize = function (it) {
|
|
2478
|
+
return replace$1(encodeURIComponent$1(it), find, replacer);
|
|
2479
|
+
};
|
|
2480
|
+
|
|
2481
|
+
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
|
|
2482
|
+
setInternalState$1(this, {
|
|
2483
|
+
type: URL_SEARCH_PARAMS_ITERATOR,
|
|
2484
|
+
iterator: getIterator(getInternalParamsState(params).entries),
|
|
2485
|
+
kind: kind
|
|
2486
|
+
});
|
|
2487
|
+
}, 'Iterator', function next() {
|
|
2488
|
+
var state = getInternalIteratorState(this);
|
|
2489
|
+
var kind = state.kind;
|
|
2490
|
+
var step = state.iterator.next();
|
|
2491
|
+
var entry = step.value;
|
|
2492
|
+
if (!step.done) {
|
|
2493
|
+
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
|
|
2494
|
+
} return step;
|
|
2495
|
+
}, true);
|
|
2496
|
+
|
|
2497
|
+
var URLSearchParamsState = function (init) {
|
|
2498
|
+
this.entries = [];
|
|
2499
|
+
this.url = null;
|
|
2500
|
+
|
|
2501
|
+
if (init !== undefined) {
|
|
2502
|
+
if (isObject$1(init)) this.parseObject(init);
|
|
2503
|
+
else this.parseQuery(typeof init == 'string' ? charAt$1(init, 0) === '?' ? stringSlice$2(init, 1) : init : $toString$2(init));
|
|
2504
|
+
}
|
|
2505
|
+
};
|
|
2506
|
+
|
|
2507
|
+
URLSearchParamsState.prototype = {
|
|
2508
|
+
type: URL_SEARCH_PARAMS,
|
|
2509
|
+
bindURL: function (url) {
|
|
2510
|
+
this.url = url;
|
|
2511
|
+
this.update();
|
|
2512
|
+
},
|
|
2513
|
+
parseObject: function (object) {
|
|
2514
|
+
var iteratorMethod = getIteratorMethod(object);
|
|
2515
|
+
var iterator, next, step, entryIterator, entryNext, first, second;
|
|
2516
|
+
|
|
2517
|
+
if (iteratorMethod) {
|
|
2518
|
+
iterator = getIterator(object, iteratorMethod);
|
|
2519
|
+
next = iterator.next;
|
|
2520
|
+
while (!(step = call(next, iterator)).done) {
|
|
2521
|
+
entryIterator = getIterator(anObject$1(step.value));
|
|
2522
|
+
entryNext = entryIterator.next;
|
|
2523
|
+
if (
|
|
2524
|
+
(first = call(entryNext, entryIterator)).done ||
|
|
2525
|
+
(second = call(entryNext, entryIterator)).done ||
|
|
2526
|
+
!call(entryNext, entryIterator).done
|
|
2527
|
+
) throw TypeError$3('Expected sequence with length 2');
|
|
2528
|
+
push$1(this.entries, { key: $toString$2(first.value), value: $toString$2(second.value) });
|
|
2529
|
+
}
|
|
2530
|
+
} else for (var key in object) if (hasOwn$1(object, key)) {
|
|
2531
|
+
push$1(this.entries, { key: key, value: $toString$2(object[key]) });
|
|
2532
|
+
}
|
|
2533
|
+
},
|
|
2534
|
+
parseQuery: function (query) {
|
|
2535
|
+
if (query) {
|
|
2536
|
+
var attributes = split$1(query, '&');
|
|
2537
|
+
var index = 0;
|
|
2538
|
+
var attribute, entry;
|
|
2539
|
+
while (index < attributes.length) {
|
|
2540
|
+
attribute = attributes[index++];
|
|
2541
|
+
if (attribute.length) {
|
|
2542
|
+
entry = split$1(attribute, '=');
|
|
2543
|
+
push$1(this.entries, {
|
|
2544
|
+
key: deserialize(shift$1(entry)),
|
|
2545
|
+
value: deserialize(join$1(entry, '='))
|
|
2546
|
+
});
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
serialize: function () {
|
|
2552
|
+
var entries = this.entries;
|
|
2553
|
+
var result = [];
|
|
2554
|
+
var index = 0;
|
|
2555
|
+
var entry;
|
|
2556
|
+
while (index < entries.length) {
|
|
2557
|
+
entry = entries[index++];
|
|
2558
|
+
push$1(result, serialize(entry.key) + '=' + serialize(entry.value));
|
|
2559
|
+
} return join$1(result, '&');
|
|
2560
|
+
},
|
|
2561
|
+
update: function () {
|
|
2562
|
+
this.entries.length = 0;
|
|
2563
|
+
this.parseQuery(this.url.query);
|
|
2564
|
+
},
|
|
2565
|
+
updateURL: function () {
|
|
2566
|
+
if (this.url) this.url.update();
|
|
2567
|
+
}
|
|
2568
|
+
};
|
|
2569
|
+
|
|
2570
|
+
// `URLSearchParams` constructor
|
|
2571
|
+
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
2572
|
+
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
2573
|
+
anInstance$1(this, URLSearchParamsPrototype);
|
|
2574
|
+
var init = arguments.length > 0 ? arguments[0] : undefined;
|
|
2575
|
+
setInternalState$1(this, new URLSearchParamsState(init));
|
|
2576
|
+
};
|
|
2577
|
+
|
|
2578
|
+
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
|
|
2579
|
+
|
|
2580
|
+
redefineAll(URLSearchParamsPrototype, {
|
|
2581
|
+
// `URLSearchParams.prototype.append` method
|
|
2582
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
2583
|
+
append: function append(name, value) {
|
|
2584
|
+
validateArgumentsLength$1(arguments.length, 2);
|
|
2585
|
+
var state = getInternalParamsState(this);
|
|
2586
|
+
push$1(state.entries, { key: $toString$2(name), value: $toString$2(value) });
|
|
2587
|
+
state.updateURL();
|
|
2588
|
+
},
|
|
2589
|
+
// `URLSearchParams.prototype.delete` method
|
|
2590
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
2591
|
+
'delete': function (name) {
|
|
2592
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2593
|
+
var state = getInternalParamsState(this);
|
|
2594
|
+
var entries = state.entries;
|
|
2595
|
+
var key = $toString$2(name);
|
|
2596
|
+
var index = 0;
|
|
2597
|
+
while (index < entries.length) {
|
|
2598
|
+
if (entries[index].key === key) splice(entries, index, 1);
|
|
2599
|
+
else index++;
|
|
2600
|
+
}
|
|
2601
|
+
state.updateURL();
|
|
2602
|
+
},
|
|
2603
|
+
// `URLSearchParams.prototype.get` method
|
|
2604
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
|
|
2605
|
+
get: function get(name) {
|
|
2606
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2607
|
+
var entries = getInternalParamsState(this).entries;
|
|
2608
|
+
var key = $toString$2(name);
|
|
2609
|
+
var index = 0;
|
|
2610
|
+
for (; index < entries.length; index++) {
|
|
2611
|
+
if (entries[index].key === key) return entries[index].value;
|
|
2612
|
+
}
|
|
2613
|
+
return null;
|
|
2614
|
+
},
|
|
2615
|
+
// `URLSearchParams.prototype.getAll` method
|
|
2616
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
|
|
2617
|
+
getAll: function getAll(name) {
|
|
2618
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2619
|
+
var entries = getInternalParamsState(this).entries;
|
|
2620
|
+
var key = $toString$2(name);
|
|
2621
|
+
var result = [];
|
|
2622
|
+
var index = 0;
|
|
2623
|
+
for (; index < entries.length; index++) {
|
|
2624
|
+
if (entries[index].key === key) push$1(result, entries[index].value);
|
|
2625
|
+
}
|
|
2626
|
+
return result;
|
|
2627
|
+
},
|
|
2628
|
+
// `URLSearchParams.prototype.has` method
|
|
2629
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
|
|
2630
|
+
has: function has(name) {
|
|
2631
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2632
|
+
var entries = getInternalParamsState(this).entries;
|
|
2633
|
+
var key = $toString$2(name);
|
|
2634
|
+
var index = 0;
|
|
2635
|
+
while (index < entries.length) {
|
|
2636
|
+
if (entries[index++].key === key) return true;
|
|
2637
|
+
}
|
|
2638
|
+
return false;
|
|
2639
|
+
},
|
|
2640
|
+
// `URLSearchParams.prototype.set` method
|
|
2641
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
|
|
2642
|
+
set: function set(name, value) {
|
|
2643
|
+
validateArgumentsLength$1(arguments.length, 1);
|
|
2644
|
+
var state = getInternalParamsState(this);
|
|
2645
|
+
var entries = state.entries;
|
|
2646
|
+
var found = false;
|
|
2647
|
+
var key = $toString$2(name);
|
|
2648
|
+
var val = $toString$2(value);
|
|
2649
|
+
var index = 0;
|
|
2650
|
+
var entry;
|
|
2651
|
+
for (; index < entries.length; index++) {
|
|
2652
|
+
entry = entries[index];
|
|
2653
|
+
if (entry.key === key) {
|
|
2654
|
+
if (found) splice(entries, index--, 1);
|
|
2655
|
+
else {
|
|
2656
|
+
found = true;
|
|
2657
|
+
entry.value = val;
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
if (!found) push$1(entries, { key: key, value: val });
|
|
2662
|
+
state.updateURL();
|
|
2663
|
+
},
|
|
2664
|
+
// `URLSearchParams.prototype.sort` method
|
|
2665
|
+
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
2666
|
+
sort: function sort() {
|
|
2667
|
+
var state = getInternalParamsState(this);
|
|
2668
|
+
arraySort(state.entries, function (a, b) {
|
|
2669
|
+
return a.key > b.key ? 1 : -1;
|
|
2670
|
+
});
|
|
2671
|
+
state.updateURL();
|
|
2672
|
+
},
|
|
2673
|
+
// `URLSearchParams.prototype.forEach` method
|
|
2674
|
+
forEach: function forEach(callback /* , thisArg */) {
|
|
2675
|
+
var entries = getInternalParamsState(this).entries;
|
|
2676
|
+
var boundFunction = bind$1(callback, arguments.length > 1 ? arguments[1] : undefined);
|
|
2677
|
+
var index = 0;
|
|
2678
|
+
var entry;
|
|
2679
|
+
while (index < entries.length) {
|
|
2680
|
+
entry = entries[index++];
|
|
2681
|
+
boundFunction(entry.value, entry.key, this);
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2684
|
+
// `URLSearchParams.prototype.keys` method
|
|
2685
|
+
keys: function keys() {
|
|
2686
|
+
return new URLSearchParamsIterator(this, 'keys');
|
|
2687
|
+
},
|
|
2688
|
+
// `URLSearchParams.prototype.values` method
|
|
2689
|
+
values: function values() {
|
|
2690
|
+
return new URLSearchParamsIterator(this, 'values');
|
|
2691
|
+
},
|
|
2692
|
+
// `URLSearchParams.prototype.entries` method
|
|
2693
|
+
entries: function entries() {
|
|
2694
|
+
return new URLSearchParamsIterator(this, 'entries');
|
|
2695
|
+
}
|
|
2696
|
+
}, { enumerable: true });
|
|
2697
|
+
|
|
2698
|
+
// `URLSearchParams.prototype[@@iterator]` method
|
|
2699
|
+
redefine$2(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });
|
|
2700
|
+
|
|
2701
|
+
// `URLSearchParams.prototype.toString` method
|
|
2702
|
+
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
2703
|
+
redefine$2(URLSearchParamsPrototype, 'toString', function toString() {
|
|
2704
|
+
return getInternalParamsState(this).serialize();
|
|
2705
|
+
}, { enumerable: true });
|
|
2706
|
+
|
|
2707
|
+
setToStringTag$1(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
|
|
2708
|
+
|
|
2709
|
+
$$2({ global: true, forced: !USE_NATIVE_URL$1 }, {
|
|
2710
|
+
URLSearchParams: URLSearchParamsConstructor
|
|
2711
|
+
});
|
|
2712
|
+
|
|
2713
|
+
// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
|
|
2714
|
+
if (!USE_NATIVE_URL$1 && isCallable(Headers)) {
|
|
2715
|
+
var headersHas = uncurryThis$3(HeadersPrototype.has);
|
|
2716
|
+
var headersSet = uncurryThis$3(HeadersPrototype.set);
|
|
2717
|
+
|
|
2718
|
+
var wrapRequestOptions = function (init) {
|
|
2719
|
+
if (isObject$1(init)) {
|
|
2720
|
+
var body = init.body;
|
|
2721
|
+
var headers;
|
|
2722
|
+
if (classof$1(body) === URL_SEARCH_PARAMS) {
|
|
2723
|
+
headers = init.headers ? new Headers(init.headers) : new Headers();
|
|
2724
|
+
if (!headersHas(headers, 'content-type')) {
|
|
2725
|
+
headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
2726
|
+
}
|
|
2727
|
+
return create(init, {
|
|
2728
|
+
body: createPropertyDescriptor(0, $toString$2(body)),
|
|
2729
|
+
headers: createPropertyDescriptor(0, headers)
|
|
2730
|
+
});
|
|
2731
|
+
}
|
|
2732
|
+
} return init;
|
|
2733
|
+
};
|
|
2734
|
+
|
|
2735
|
+
if (isCallable(n$Fetch)) {
|
|
2736
|
+
$$2({ global: true, enumerable: true, forced: true }, {
|
|
2737
|
+
fetch: function fetch(input /* , init */) {
|
|
2738
|
+
return n$Fetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
2739
|
+
}
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
if (isCallable(N$Request)) {
|
|
2744
|
+
var RequestConstructor = function Request(input /* , init */) {
|
|
2745
|
+
anInstance$1(this, RequestPrototype);
|
|
2746
|
+
return new N$Request(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
2747
|
+
};
|
|
2748
|
+
|
|
2749
|
+
RequestPrototype.constructor = RequestConstructor;
|
|
2750
|
+
RequestConstructor.prototype = RequestPrototype;
|
|
2751
|
+
|
|
2752
|
+
$$2({ global: true, forced: true }, {
|
|
2753
|
+
Request: RequestConstructor
|
|
2754
|
+
});
|
|
2755
|
+
}
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
var web_urlSearchParams = {
|
|
2759
|
+
URLSearchParams: URLSearchParamsConstructor,
|
|
2760
|
+
getState: getInternalParamsState
|
|
2761
|
+
};
|
|
2762
|
+
|
|
2763
|
+
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
2764
|
+
|
|
2765
|
+
var $$1 = _export;
|
|
2766
|
+
var DESCRIPTORS = descriptors;
|
|
2767
|
+
var USE_NATIVE_URL = nativeUrl;
|
|
2768
|
+
var global$2 = global$C;
|
|
2769
|
+
var bind = functionBindContext;
|
|
2770
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2771
|
+
var defineProperties = objectDefineProperties.f;
|
|
2772
|
+
var redefine$1 = redefine$7.exports;
|
|
2773
|
+
var anInstance = anInstance$2;
|
|
2774
|
+
var hasOwn = hasOwnProperty_1;
|
|
2775
|
+
var assign = objectAssign;
|
|
2776
|
+
var arrayFrom = arrayFrom$1;
|
|
2777
|
+
var arraySlice = arraySliceSimple;
|
|
2778
|
+
var codeAt = stringMultibyte.codeAt;
|
|
2779
|
+
var toASCII = stringPunycodeToAscii;
|
|
2780
|
+
var $toString$1 = toString$4;
|
|
2781
|
+
var setToStringTag = setToStringTag$4;
|
|
2782
|
+
var validateArgumentsLength = validateArgumentsLength$2;
|
|
2783
|
+
var URLSearchParamsModule = web_urlSearchParams;
|
|
2784
|
+
var InternalStateModule = internalState;
|
|
2785
|
+
|
|
2786
|
+
var setInternalState = InternalStateModule.set;
|
|
2787
|
+
var getInternalURLState = InternalStateModule.getterFor('URL');
|
|
2788
|
+
var URLSearchParams$1 = URLSearchParamsModule.URLSearchParams;
|
|
2789
|
+
var getInternalSearchParamsState = URLSearchParamsModule.getState;
|
|
2790
|
+
|
|
2791
|
+
var NativeURL = global$2.URL;
|
|
2792
|
+
var TypeError$2 = global$2.TypeError;
|
|
2793
|
+
var parseInt = global$2.parseInt;
|
|
2794
|
+
var floor = Math.floor;
|
|
2795
|
+
var pow = Math.pow;
|
|
2796
|
+
var charAt = uncurryThis$2(''.charAt);
|
|
2797
|
+
var exec = uncurryThis$2(/./.exec);
|
|
2798
|
+
var join = uncurryThis$2([].join);
|
|
2799
|
+
var numberToString = uncurryThis$2(1.0.toString);
|
|
2800
|
+
var pop = uncurryThis$2([].pop);
|
|
2801
|
+
var push = uncurryThis$2([].push);
|
|
2802
|
+
var replace = uncurryThis$2(''.replace);
|
|
2803
|
+
var shift = uncurryThis$2([].shift);
|
|
2804
|
+
var split = uncurryThis$2(''.split);
|
|
2805
|
+
var stringSlice$1 = uncurryThis$2(''.slice);
|
|
2806
|
+
var toLowerCase = uncurryThis$2(''.toLowerCase);
|
|
2807
|
+
var unshift = uncurryThis$2([].unshift);
|
|
2808
|
+
|
|
2809
|
+
var INVALID_AUTHORITY = 'Invalid authority';
|
|
2810
|
+
var INVALID_SCHEME = 'Invalid scheme';
|
|
2811
|
+
var INVALID_HOST = 'Invalid host';
|
|
2812
|
+
var INVALID_PORT = 'Invalid port';
|
|
2813
|
+
|
|
2814
|
+
var ALPHA = /[a-z]/i;
|
|
2815
|
+
// eslint-disable-next-line regexp/no-obscure-range -- safe
|
|
2816
|
+
var ALPHANUMERIC = /[\d+-.a-z]/i;
|
|
2817
|
+
var DIGIT = /\d/;
|
|
2818
|
+
var HEX_START = /^0x/i;
|
|
2819
|
+
var OCT = /^[0-7]+$/;
|
|
2820
|
+
var DEC = /^\d+$/;
|
|
2821
|
+
var HEX = /^[\da-f]+$/i;
|
|
2822
|
+
/* eslint-disable regexp/no-control-character -- safe */
|
|
2823
|
+
var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
|
|
2824
|
+
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
|
|
2825
|
+
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g;
|
|
2826
|
+
var TAB_AND_NEW_LINE = /[\t\n\r]/g;
|
|
2827
|
+
/* eslint-enable regexp/no-control-character -- safe */
|
|
2828
|
+
var EOF;
|
|
2829
|
+
|
|
2830
|
+
// https://url.spec.whatwg.org/#ipv4-number-parser
|
|
2831
|
+
var parseIPv4 = function (input) {
|
|
2832
|
+
var parts = split(input, '.');
|
|
2833
|
+
var partsLength, numbers, index, part, radix, number, ipv4;
|
|
2834
|
+
if (parts.length && parts[parts.length - 1] == '') {
|
|
2835
|
+
parts.length--;
|
|
2836
|
+
}
|
|
2837
|
+
partsLength = parts.length;
|
|
2838
|
+
if (partsLength > 4) return input;
|
|
2839
|
+
numbers = [];
|
|
2840
|
+
for (index = 0; index < partsLength; index++) {
|
|
2841
|
+
part = parts[index];
|
|
2842
|
+
if (part == '') return input;
|
|
2843
|
+
radix = 10;
|
|
2844
|
+
if (part.length > 1 && charAt(part, 0) == '0') {
|
|
2845
|
+
radix = exec(HEX_START, part) ? 16 : 8;
|
|
2846
|
+
part = stringSlice$1(part, radix == 8 ? 1 : 2);
|
|
2847
|
+
}
|
|
2848
|
+
if (part === '') {
|
|
2849
|
+
number = 0;
|
|
2850
|
+
} else {
|
|
2851
|
+
if (!exec(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;
|
|
2852
|
+
number = parseInt(part, radix);
|
|
2853
|
+
}
|
|
2854
|
+
push(numbers, number);
|
|
2855
|
+
}
|
|
2856
|
+
for (index = 0; index < partsLength; index++) {
|
|
2857
|
+
number = numbers[index];
|
|
2858
|
+
if (index == partsLength - 1) {
|
|
2859
|
+
if (number >= pow(256, 5 - partsLength)) return null;
|
|
2860
|
+
} else if (number > 255) return null;
|
|
2861
|
+
}
|
|
2862
|
+
ipv4 = pop(numbers);
|
|
2863
|
+
for (index = 0; index < numbers.length; index++) {
|
|
2864
|
+
ipv4 += numbers[index] * pow(256, 3 - index);
|
|
2865
|
+
}
|
|
2866
|
+
return ipv4;
|
|
2867
|
+
};
|
|
2868
|
+
|
|
2869
|
+
// https://url.spec.whatwg.org/#concept-ipv6-parser
|
|
2870
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
2871
|
+
var parseIPv6 = function (input) {
|
|
2872
|
+
var address = [0, 0, 0, 0, 0, 0, 0, 0];
|
|
2873
|
+
var pieceIndex = 0;
|
|
2874
|
+
var compress = null;
|
|
2875
|
+
var pointer = 0;
|
|
2876
|
+
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
|
|
2877
|
+
|
|
2878
|
+
var chr = function () {
|
|
2879
|
+
return charAt(input, pointer);
|
|
2880
|
+
};
|
|
2881
|
+
|
|
2882
|
+
if (chr() == ':') {
|
|
2883
|
+
if (charAt(input, 1) != ':') return;
|
|
2884
|
+
pointer += 2;
|
|
2885
|
+
pieceIndex++;
|
|
2886
|
+
compress = pieceIndex;
|
|
2887
|
+
}
|
|
2888
|
+
while (chr()) {
|
|
2889
|
+
if (pieceIndex == 8) return;
|
|
2890
|
+
if (chr() == ':') {
|
|
2891
|
+
if (compress !== null) return;
|
|
2892
|
+
pointer++;
|
|
2893
|
+
pieceIndex++;
|
|
2894
|
+
compress = pieceIndex;
|
|
2895
|
+
continue;
|
|
2896
|
+
}
|
|
2897
|
+
value = length = 0;
|
|
2898
|
+
while (length < 4 && exec(HEX, chr())) {
|
|
2899
|
+
value = value * 16 + parseInt(chr(), 16);
|
|
2900
|
+
pointer++;
|
|
2901
|
+
length++;
|
|
2902
|
+
}
|
|
2903
|
+
if (chr() == '.') {
|
|
2904
|
+
if (length == 0) return;
|
|
2905
|
+
pointer -= length;
|
|
2906
|
+
if (pieceIndex > 6) return;
|
|
2907
|
+
numbersSeen = 0;
|
|
2908
|
+
while (chr()) {
|
|
2909
|
+
ipv4Piece = null;
|
|
2910
|
+
if (numbersSeen > 0) {
|
|
2911
|
+
if (chr() == '.' && numbersSeen < 4) pointer++;
|
|
2912
|
+
else return;
|
|
2913
|
+
}
|
|
2914
|
+
if (!exec(DIGIT, chr())) return;
|
|
2915
|
+
while (exec(DIGIT, chr())) {
|
|
2916
|
+
number = parseInt(chr(), 10);
|
|
2917
|
+
if (ipv4Piece === null) ipv4Piece = number;
|
|
2918
|
+
else if (ipv4Piece == 0) return;
|
|
2919
|
+
else ipv4Piece = ipv4Piece * 10 + number;
|
|
2920
|
+
if (ipv4Piece > 255) return;
|
|
2921
|
+
pointer++;
|
|
2922
|
+
}
|
|
2923
|
+
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
|
|
2924
|
+
numbersSeen++;
|
|
2925
|
+
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
|
|
2926
|
+
}
|
|
2927
|
+
if (numbersSeen != 4) return;
|
|
2928
|
+
break;
|
|
2929
|
+
} else if (chr() == ':') {
|
|
2930
|
+
pointer++;
|
|
2931
|
+
if (!chr()) return;
|
|
2932
|
+
} else if (chr()) return;
|
|
2933
|
+
address[pieceIndex++] = value;
|
|
2934
|
+
}
|
|
2935
|
+
if (compress !== null) {
|
|
2936
|
+
swaps = pieceIndex - compress;
|
|
2937
|
+
pieceIndex = 7;
|
|
2938
|
+
while (pieceIndex != 0 && swaps > 0) {
|
|
2939
|
+
swap = address[pieceIndex];
|
|
2940
|
+
address[pieceIndex--] = address[compress + swaps - 1];
|
|
2941
|
+
address[compress + --swaps] = swap;
|
|
2942
|
+
}
|
|
2943
|
+
} else if (pieceIndex != 8) return;
|
|
2944
|
+
return address;
|
|
2945
|
+
};
|
|
2946
|
+
|
|
2947
|
+
var findLongestZeroSequence = function (ipv6) {
|
|
2948
|
+
var maxIndex = null;
|
|
2949
|
+
var maxLength = 1;
|
|
2950
|
+
var currStart = null;
|
|
2951
|
+
var currLength = 0;
|
|
2952
|
+
var index = 0;
|
|
2953
|
+
for (; index < 8; index++) {
|
|
2954
|
+
if (ipv6[index] !== 0) {
|
|
2955
|
+
if (currLength > maxLength) {
|
|
2956
|
+
maxIndex = currStart;
|
|
2957
|
+
maxLength = currLength;
|
|
2958
|
+
}
|
|
2959
|
+
currStart = null;
|
|
2960
|
+
currLength = 0;
|
|
2961
|
+
} else {
|
|
2962
|
+
if (currStart === null) currStart = index;
|
|
2963
|
+
++currLength;
|
|
2964
|
+
}
|
|
2965
|
+
}
|
|
2966
|
+
if (currLength > maxLength) {
|
|
2967
|
+
maxIndex = currStart;
|
|
2968
|
+
maxLength = currLength;
|
|
2969
|
+
}
|
|
2970
|
+
return maxIndex;
|
|
2971
|
+
};
|
|
2972
|
+
|
|
2973
|
+
// https://url.spec.whatwg.org/#host-serializing
|
|
2974
|
+
var serializeHost = function (host) {
|
|
2975
|
+
var result, index, compress, ignore0;
|
|
2976
|
+
// ipv4
|
|
2977
|
+
if (typeof host == 'number') {
|
|
2978
|
+
result = [];
|
|
2979
|
+
for (index = 0; index < 4; index++) {
|
|
2980
|
+
unshift(result, host % 256);
|
|
2981
|
+
host = floor(host / 256);
|
|
2982
|
+
} return join(result, '.');
|
|
2983
|
+
// ipv6
|
|
2984
|
+
} else if (typeof host == 'object') {
|
|
2985
|
+
result = '';
|
|
2986
|
+
compress = findLongestZeroSequence(host);
|
|
2987
|
+
for (index = 0; index < 8; index++) {
|
|
2988
|
+
if (ignore0 && host[index] === 0) continue;
|
|
2989
|
+
if (ignore0) ignore0 = false;
|
|
2990
|
+
if (compress === index) {
|
|
2991
|
+
result += index ? ':' : '::';
|
|
2992
|
+
ignore0 = true;
|
|
2993
|
+
} else {
|
|
2994
|
+
result += numberToString(host[index], 16);
|
|
2995
|
+
if (index < 7) result += ':';
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
return '[' + result + ']';
|
|
2999
|
+
} return host;
|
|
3000
|
+
};
|
|
3001
|
+
|
|
3002
|
+
var C0ControlPercentEncodeSet = {};
|
|
3003
|
+
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
|
|
3004
|
+
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
|
|
3005
|
+
});
|
|
3006
|
+
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
|
|
3007
|
+
'#': 1, '?': 1, '{': 1, '}': 1
|
|
3008
|
+
});
|
|
3009
|
+
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
|
|
3010
|
+
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
|
|
3011
|
+
});
|
|
3012
|
+
|
|
3013
|
+
var percentEncode = function (chr, set) {
|
|
3014
|
+
var code = codeAt(chr, 0);
|
|
3015
|
+
return code > 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : encodeURIComponent(chr);
|
|
3016
|
+
};
|
|
3017
|
+
|
|
3018
|
+
// https://url.spec.whatwg.org/#special-scheme
|
|
3019
|
+
var specialSchemes = {
|
|
3020
|
+
ftp: 21,
|
|
3021
|
+
file: null,
|
|
3022
|
+
http: 80,
|
|
3023
|
+
https: 443,
|
|
3024
|
+
ws: 80,
|
|
3025
|
+
wss: 443
|
|
3026
|
+
};
|
|
3027
|
+
|
|
3028
|
+
// https://url.spec.whatwg.org/#windows-drive-letter
|
|
3029
|
+
var isWindowsDriveLetter = function (string, normalized) {
|
|
3030
|
+
var second;
|
|
3031
|
+
return string.length == 2 && exec(ALPHA, charAt(string, 0))
|
|
3032
|
+
&& ((second = charAt(string, 1)) == ':' || (!normalized && second == '|'));
|
|
3033
|
+
};
|
|
3034
|
+
|
|
3035
|
+
// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter
|
|
3036
|
+
var startsWithWindowsDriveLetter = function (string) {
|
|
3037
|
+
var third;
|
|
3038
|
+
return string.length > 1 && isWindowsDriveLetter(stringSlice$1(string, 0, 2)) && (
|
|
3039
|
+
string.length == 2 ||
|
|
3040
|
+
((third = charAt(string, 2)) === '/' || third === '\\' || third === '?' || third === '#')
|
|
3041
|
+
);
|
|
3042
|
+
};
|
|
3043
|
+
|
|
3044
|
+
// https://url.spec.whatwg.org/#single-dot-path-segment
|
|
3045
|
+
var isSingleDot = function (segment) {
|
|
3046
|
+
return segment === '.' || toLowerCase(segment) === '%2e';
|
|
3047
|
+
};
|
|
3048
|
+
|
|
3049
|
+
// https://url.spec.whatwg.org/#double-dot-path-segment
|
|
3050
|
+
var isDoubleDot = function (segment) {
|
|
3051
|
+
segment = toLowerCase(segment);
|
|
3052
|
+
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
|
|
3053
|
+
};
|
|
3054
|
+
|
|
3055
|
+
// States:
|
|
3056
|
+
var SCHEME_START = {};
|
|
3057
|
+
var SCHEME = {};
|
|
3058
|
+
var NO_SCHEME = {};
|
|
3059
|
+
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
|
|
3060
|
+
var PATH_OR_AUTHORITY = {};
|
|
3061
|
+
var RELATIVE = {};
|
|
3062
|
+
var RELATIVE_SLASH = {};
|
|
3063
|
+
var SPECIAL_AUTHORITY_SLASHES = {};
|
|
3064
|
+
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
|
|
3065
|
+
var AUTHORITY = {};
|
|
3066
|
+
var HOST = {};
|
|
3067
|
+
var HOSTNAME = {};
|
|
3068
|
+
var PORT = {};
|
|
3069
|
+
var FILE = {};
|
|
3070
|
+
var FILE_SLASH = {};
|
|
3071
|
+
var FILE_HOST = {};
|
|
3072
|
+
var PATH_START = {};
|
|
3073
|
+
var PATH = {};
|
|
3074
|
+
var CANNOT_BE_A_BASE_URL_PATH = {};
|
|
3075
|
+
var QUERY = {};
|
|
3076
|
+
var FRAGMENT = {};
|
|
3077
|
+
|
|
3078
|
+
var URLState = function (url, isBase, base) {
|
|
3079
|
+
var urlString = $toString$1(url);
|
|
3080
|
+
var baseState, failure, searchParams;
|
|
3081
|
+
if (isBase) {
|
|
3082
|
+
failure = this.parse(urlString);
|
|
3083
|
+
if (failure) throw TypeError$2(failure);
|
|
3084
|
+
this.searchParams = null;
|
|
3085
|
+
} else {
|
|
3086
|
+
if (base !== undefined) baseState = new URLState(base, true);
|
|
3087
|
+
failure = this.parse(urlString, null, baseState);
|
|
3088
|
+
if (failure) throw TypeError$2(failure);
|
|
3089
|
+
searchParams = getInternalSearchParamsState(new URLSearchParams$1());
|
|
3090
|
+
searchParams.bindURL(this);
|
|
3091
|
+
this.searchParams = searchParams;
|
|
3092
|
+
}
|
|
3093
|
+
};
|
|
3094
|
+
|
|
3095
|
+
URLState.prototype = {
|
|
3096
|
+
type: 'URL',
|
|
3097
|
+
// https://url.spec.whatwg.org/#url-parsing
|
|
3098
|
+
// eslint-disable-next-line max-statements -- TODO
|
|
3099
|
+
parse: function (input, stateOverride, base) {
|
|
3100
|
+
var url = this;
|
|
3101
|
+
var state = stateOverride || SCHEME_START;
|
|
3102
|
+
var pointer = 0;
|
|
3103
|
+
var buffer = '';
|
|
3104
|
+
var seenAt = false;
|
|
3105
|
+
var seenBracket = false;
|
|
3106
|
+
var seenPasswordToken = false;
|
|
3107
|
+
var codePoints, chr, bufferCodePoints, failure;
|
|
3108
|
+
|
|
3109
|
+
input = $toString$1(input);
|
|
3110
|
+
|
|
3111
|
+
if (!stateOverride) {
|
|
3112
|
+
url.scheme = '';
|
|
3113
|
+
url.username = '';
|
|
3114
|
+
url.password = '';
|
|
3115
|
+
url.host = null;
|
|
3116
|
+
url.port = null;
|
|
3117
|
+
url.path = [];
|
|
3118
|
+
url.query = null;
|
|
3119
|
+
url.fragment = null;
|
|
3120
|
+
url.cannotBeABaseURL = false;
|
|
3121
|
+
input = replace(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
input = replace(input, TAB_AND_NEW_LINE, '');
|
|
3125
|
+
|
|
3126
|
+
codePoints = arrayFrom(input);
|
|
3127
|
+
|
|
3128
|
+
while (pointer <= codePoints.length) {
|
|
3129
|
+
chr = codePoints[pointer];
|
|
3130
|
+
switch (state) {
|
|
3131
|
+
case SCHEME_START:
|
|
3132
|
+
if (chr && exec(ALPHA, chr)) {
|
|
3133
|
+
buffer += toLowerCase(chr);
|
|
3134
|
+
state = SCHEME;
|
|
3135
|
+
} else if (!stateOverride) {
|
|
3136
|
+
state = NO_SCHEME;
|
|
3137
|
+
continue;
|
|
3138
|
+
} else return INVALID_SCHEME;
|
|
3139
|
+
break;
|
|
3140
|
+
|
|
3141
|
+
case SCHEME:
|
|
3142
|
+
if (chr && (exec(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {
|
|
3143
|
+
buffer += toLowerCase(chr);
|
|
3144
|
+
} else if (chr == ':') {
|
|
3145
|
+
if (stateOverride && (
|
|
3146
|
+
(url.isSpecial() != hasOwn(specialSchemes, buffer)) ||
|
|
3147
|
+
(buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||
|
|
3148
|
+
(url.scheme == 'file' && !url.host)
|
|
3149
|
+
)) return;
|
|
3150
|
+
url.scheme = buffer;
|
|
3151
|
+
if (stateOverride) {
|
|
3152
|
+
if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;
|
|
3153
|
+
return;
|
|
3154
|
+
}
|
|
3155
|
+
buffer = '';
|
|
3156
|
+
if (url.scheme == 'file') {
|
|
3157
|
+
state = FILE;
|
|
3158
|
+
} else if (url.isSpecial() && base && base.scheme == url.scheme) {
|
|
3159
|
+
state = SPECIAL_RELATIVE_OR_AUTHORITY;
|
|
3160
|
+
} else if (url.isSpecial()) {
|
|
3161
|
+
state = SPECIAL_AUTHORITY_SLASHES;
|
|
3162
|
+
} else if (codePoints[pointer + 1] == '/') {
|
|
3163
|
+
state = PATH_OR_AUTHORITY;
|
|
3164
|
+
pointer++;
|
|
3165
|
+
} else {
|
|
3166
|
+
url.cannotBeABaseURL = true;
|
|
3167
|
+
push(url.path, '');
|
|
3168
|
+
state = CANNOT_BE_A_BASE_URL_PATH;
|
|
3169
|
+
}
|
|
3170
|
+
} else if (!stateOverride) {
|
|
3171
|
+
buffer = '';
|
|
3172
|
+
state = NO_SCHEME;
|
|
3173
|
+
pointer = 0;
|
|
3174
|
+
continue;
|
|
3175
|
+
} else return INVALID_SCHEME;
|
|
3176
|
+
break;
|
|
3177
|
+
|
|
3178
|
+
case NO_SCHEME:
|
|
3179
|
+
if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;
|
|
3180
|
+
if (base.cannotBeABaseURL && chr == '#') {
|
|
3181
|
+
url.scheme = base.scheme;
|
|
3182
|
+
url.path = arraySlice(base.path);
|
|
3183
|
+
url.query = base.query;
|
|
3184
|
+
url.fragment = '';
|
|
3185
|
+
url.cannotBeABaseURL = true;
|
|
3186
|
+
state = FRAGMENT;
|
|
3187
|
+
break;
|
|
3188
|
+
}
|
|
3189
|
+
state = base.scheme == 'file' ? FILE : RELATIVE;
|
|
3190
|
+
continue;
|
|
3191
|
+
|
|
3192
|
+
case SPECIAL_RELATIVE_OR_AUTHORITY:
|
|
3193
|
+
if (chr == '/' && codePoints[pointer + 1] == '/') {
|
|
3194
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3195
|
+
pointer++;
|
|
3196
|
+
} else {
|
|
3197
|
+
state = RELATIVE;
|
|
3198
|
+
continue;
|
|
3199
|
+
} break;
|
|
3200
|
+
|
|
3201
|
+
case PATH_OR_AUTHORITY:
|
|
3202
|
+
if (chr == '/') {
|
|
3203
|
+
state = AUTHORITY;
|
|
3204
|
+
break;
|
|
3205
|
+
} else {
|
|
3206
|
+
state = PATH;
|
|
3207
|
+
continue;
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
case RELATIVE:
|
|
3211
|
+
url.scheme = base.scheme;
|
|
3212
|
+
if (chr == EOF) {
|
|
3213
|
+
url.username = base.username;
|
|
3214
|
+
url.password = base.password;
|
|
3215
|
+
url.host = base.host;
|
|
3216
|
+
url.port = base.port;
|
|
3217
|
+
url.path = arraySlice(base.path);
|
|
3218
|
+
url.query = base.query;
|
|
3219
|
+
} else if (chr == '/' || (chr == '\\' && url.isSpecial())) {
|
|
3220
|
+
state = RELATIVE_SLASH;
|
|
3221
|
+
} else if (chr == '?') {
|
|
3222
|
+
url.username = base.username;
|
|
3223
|
+
url.password = base.password;
|
|
3224
|
+
url.host = base.host;
|
|
3225
|
+
url.port = base.port;
|
|
3226
|
+
url.path = arraySlice(base.path);
|
|
3227
|
+
url.query = '';
|
|
3228
|
+
state = QUERY;
|
|
3229
|
+
} else if (chr == '#') {
|
|
3230
|
+
url.username = base.username;
|
|
3231
|
+
url.password = base.password;
|
|
3232
|
+
url.host = base.host;
|
|
3233
|
+
url.port = base.port;
|
|
3234
|
+
url.path = arraySlice(base.path);
|
|
3235
|
+
url.query = base.query;
|
|
3236
|
+
url.fragment = '';
|
|
3237
|
+
state = FRAGMENT;
|
|
3238
|
+
} else {
|
|
3239
|
+
url.username = base.username;
|
|
3240
|
+
url.password = base.password;
|
|
3241
|
+
url.host = base.host;
|
|
3242
|
+
url.port = base.port;
|
|
3243
|
+
url.path = arraySlice(base.path);
|
|
3244
|
+
url.path.length--;
|
|
3245
|
+
state = PATH;
|
|
3246
|
+
continue;
|
|
3247
|
+
} break;
|
|
3248
|
+
|
|
3249
|
+
case RELATIVE_SLASH:
|
|
3250
|
+
if (url.isSpecial() && (chr == '/' || chr == '\\')) {
|
|
3251
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3252
|
+
} else if (chr == '/') {
|
|
3253
|
+
state = AUTHORITY;
|
|
3254
|
+
} else {
|
|
3255
|
+
url.username = base.username;
|
|
3256
|
+
url.password = base.password;
|
|
3257
|
+
url.host = base.host;
|
|
3258
|
+
url.port = base.port;
|
|
3259
|
+
state = PATH;
|
|
3260
|
+
continue;
|
|
3261
|
+
} break;
|
|
3262
|
+
|
|
3263
|
+
case SPECIAL_AUTHORITY_SLASHES:
|
|
3264
|
+
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
|
|
3265
|
+
if (chr != '/' || charAt(buffer, pointer + 1) != '/') continue;
|
|
3266
|
+
pointer++;
|
|
3267
|
+
break;
|
|
3268
|
+
|
|
3269
|
+
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
|
|
3270
|
+
if (chr != '/' && chr != '\\') {
|
|
3271
|
+
state = AUTHORITY;
|
|
3272
|
+
continue;
|
|
3273
|
+
} break;
|
|
3274
|
+
|
|
3275
|
+
case AUTHORITY:
|
|
3276
|
+
if (chr == '@') {
|
|
3277
|
+
if (seenAt) buffer = '%40' + buffer;
|
|
3278
|
+
seenAt = true;
|
|
3279
|
+
bufferCodePoints = arrayFrom(buffer);
|
|
3280
|
+
for (var i = 0; i < bufferCodePoints.length; i++) {
|
|
3281
|
+
var codePoint = bufferCodePoints[i];
|
|
3282
|
+
if (codePoint == ':' && !seenPasswordToken) {
|
|
3283
|
+
seenPasswordToken = true;
|
|
3284
|
+
continue;
|
|
3285
|
+
}
|
|
3286
|
+
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
|
|
3287
|
+
if (seenPasswordToken) url.password += encodedCodePoints;
|
|
3288
|
+
else url.username += encodedCodePoints;
|
|
3289
|
+
}
|
|
3290
|
+
buffer = '';
|
|
3291
|
+
} else if (
|
|
3292
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3293
|
+
(chr == '\\' && url.isSpecial())
|
|
3294
|
+
) {
|
|
3295
|
+
if (seenAt && buffer == '') return INVALID_AUTHORITY;
|
|
3296
|
+
pointer -= arrayFrom(buffer).length + 1;
|
|
3297
|
+
buffer = '';
|
|
3298
|
+
state = HOST;
|
|
3299
|
+
} else buffer += chr;
|
|
3300
|
+
break;
|
|
3301
|
+
|
|
3302
|
+
case HOST:
|
|
3303
|
+
case HOSTNAME:
|
|
3304
|
+
if (stateOverride && url.scheme == 'file') {
|
|
3305
|
+
state = FILE_HOST;
|
|
3306
|
+
continue;
|
|
3307
|
+
} else if (chr == ':' && !seenBracket) {
|
|
3308
|
+
if (buffer == '') return INVALID_HOST;
|
|
3309
|
+
failure = url.parseHost(buffer);
|
|
3310
|
+
if (failure) return failure;
|
|
3311
|
+
buffer = '';
|
|
3312
|
+
state = PORT;
|
|
3313
|
+
if (stateOverride == HOSTNAME) return;
|
|
3314
|
+
} else if (
|
|
3315
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3316
|
+
(chr == '\\' && url.isSpecial())
|
|
3317
|
+
) {
|
|
3318
|
+
if (url.isSpecial() && buffer == '') return INVALID_HOST;
|
|
3319
|
+
if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;
|
|
3320
|
+
failure = url.parseHost(buffer);
|
|
3321
|
+
if (failure) return failure;
|
|
3322
|
+
buffer = '';
|
|
3323
|
+
state = PATH_START;
|
|
3324
|
+
if (stateOverride) return;
|
|
3325
|
+
continue;
|
|
3326
|
+
} else {
|
|
3327
|
+
if (chr == '[') seenBracket = true;
|
|
3328
|
+
else if (chr == ']') seenBracket = false;
|
|
3329
|
+
buffer += chr;
|
|
3330
|
+
} break;
|
|
3331
|
+
|
|
3332
|
+
case PORT:
|
|
3333
|
+
if (exec(DIGIT, chr)) {
|
|
3334
|
+
buffer += chr;
|
|
3335
|
+
} else if (
|
|
3336
|
+
chr == EOF || chr == '/' || chr == '?' || chr == '#' ||
|
|
3337
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
3338
|
+
stateOverride
|
|
3339
|
+
) {
|
|
3340
|
+
if (buffer != '') {
|
|
3341
|
+
var port = parseInt(buffer, 10);
|
|
3342
|
+
if (port > 0xFFFF) return INVALID_PORT;
|
|
3343
|
+
url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;
|
|
3344
|
+
buffer = '';
|
|
3345
|
+
}
|
|
3346
|
+
if (stateOverride) return;
|
|
3347
|
+
state = PATH_START;
|
|
3348
|
+
continue;
|
|
3349
|
+
} else return INVALID_PORT;
|
|
3350
|
+
break;
|
|
3351
|
+
|
|
3352
|
+
case FILE:
|
|
3353
|
+
url.scheme = 'file';
|
|
3354
|
+
if (chr == '/' || chr == '\\') state = FILE_SLASH;
|
|
3355
|
+
else if (base && base.scheme == 'file') {
|
|
3356
|
+
if (chr == EOF) {
|
|
3357
|
+
url.host = base.host;
|
|
3358
|
+
url.path = arraySlice(base.path);
|
|
3359
|
+
url.query = base.query;
|
|
3360
|
+
} else if (chr == '?') {
|
|
3361
|
+
url.host = base.host;
|
|
3362
|
+
url.path = arraySlice(base.path);
|
|
3363
|
+
url.query = '';
|
|
3364
|
+
state = QUERY;
|
|
3365
|
+
} else if (chr == '#') {
|
|
3366
|
+
url.host = base.host;
|
|
3367
|
+
url.path = arraySlice(base.path);
|
|
3368
|
+
url.query = base.query;
|
|
3369
|
+
url.fragment = '';
|
|
3370
|
+
state = FRAGMENT;
|
|
3371
|
+
} else {
|
|
3372
|
+
if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3373
|
+
url.host = base.host;
|
|
3374
|
+
url.path = arraySlice(base.path);
|
|
3375
|
+
url.shortenPath();
|
|
3376
|
+
}
|
|
3377
|
+
state = PATH;
|
|
3378
|
+
continue;
|
|
3379
|
+
}
|
|
3380
|
+
} else {
|
|
3381
|
+
state = PATH;
|
|
3382
|
+
continue;
|
|
3383
|
+
} break;
|
|
3384
|
+
|
|
3385
|
+
case FILE_SLASH:
|
|
3386
|
+
if (chr == '/' || chr == '\\') {
|
|
3387
|
+
state = FILE_HOST;
|
|
3388
|
+
break;
|
|
3389
|
+
}
|
|
3390
|
+
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {
|
|
3391
|
+
if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);
|
|
3392
|
+
else url.host = base.host;
|
|
3393
|
+
}
|
|
3394
|
+
state = PATH;
|
|
3395
|
+
continue;
|
|
3396
|
+
|
|
3397
|
+
case FILE_HOST:
|
|
3398
|
+
if (chr == EOF || chr == '/' || chr == '\\' || chr == '?' || chr == '#') {
|
|
3399
|
+
if (!stateOverride && isWindowsDriveLetter(buffer)) {
|
|
3400
|
+
state = PATH;
|
|
3401
|
+
} else if (buffer == '') {
|
|
3402
|
+
url.host = '';
|
|
3403
|
+
if (stateOverride) return;
|
|
3404
|
+
state = PATH_START;
|
|
3405
|
+
} else {
|
|
3406
|
+
failure = url.parseHost(buffer);
|
|
3407
|
+
if (failure) return failure;
|
|
3408
|
+
if (url.host == 'localhost') url.host = '';
|
|
3409
|
+
if (stateOverride) return;
|
|
3410
|
+
buffer = '';
|
|
3411
|
+
state = PATH_START;
|
|
3412
|
+
} continue;
|
|
3413
|
+
} else buffer += chr;
|
|
3414
|
+
break;
|
|
3415
|
+
|
|
3416
|
+
case PATH_START:
|
|
3417
|
+
if (url.isSpecial()) {
|
|
3418
|
+
state = PATH;
|
|
3419
|
+
if (chr != '/' && chr != '\\') continue;
|
|
3420
|
+
} else if (!stateOverride && chr == '?') {
|
|
3421
|
+
url.query = '';
|
|
3422
|
+
state = QUERY;
|
|
3423
|
+
} else if (!stateOverride && chr == '#') {
|
|
3424
|
+
url.fragment = '';
|
|
3425
|
+
state = FRAGMENT;
|
|
3426
|
+
} else if (chr != EOF) {
|
|
3427
|
+
state = PATH;
|
|
3428
|
+
if (chr != '/') continue;
|
|
3429
|
+
} break;
|
|
3430
|
+
|
|
3431
|
+
case PATH:
|
|
3432
|
+
if (
|
|
3433
|
+
chr == EOF || chr == '/' ||
|
|
3434
|
+
(chr == '\\' && url.isSpecial()) ||
|
|
3435
|
+
(!stateOverride && (chr == '?' || chr == '#'))
|
|
3436
|
+
) {
|
|
3437
|
+
if (isDoubleDot(buffer)) {
|
|
3438
|
+
url.shortenPath();
|
|
3439
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
3440
|
+
push(url.path, '');
|
|
3441
|
+
}
|
|
3442
|
+
} else if (isSingleDot(buffer)) {
|
|
3443
|
+
if (chr != '/' && !(chr == '\\' && url.isSpecial())) {
|
|
3444
|
+
push(url.path, '');
|
|
3445
|
+
}
|
|
3446
|
+
} else {
|
|
3447
|
+
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
|
|
3448
|
+
if (url.host) url.host = '';
|
|
3449
|
+
buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter
|
|
3450
|
+
}
|
|
3451
|
+
push(url.path, buffer);
|
|
3452
|
+
}
|
|
3453
|
+
buffer = '';
|
|
3454
|
+
if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {
|
|
3455
|
+
while (url.path.length > 1 && url.path[0] === '') {
|
|
3456
|
+
shift(url.path);
|
|
3457
|
+
}
|
|
3458
|
+
}
|
|
3459
|
+
if (chr == '?') {
|
|
3460
|
+
url.query = '';
|
|
3461
|
+
state = QUERY;
|
|
3462
|
+
} else if (chr == '#') {
|
|
3463
|
+
url.fragment = '';
|
|
3464
|
+
state = FRAGMENT;
|
|
3465
|
+
}
|
|
3466
|
+
} else {
|
|
3467
|
+
buffer += percentEncode(chr, pathPercentEncodeSet);
|
|
3468
|
+
} break;
|
|
3469
|
+
|
|
3470
|
+
case CANNOT_BE_A_BASE_URL_PATH:
|
|
3471
|
+
if (chr == '?') {
|
|
3472
|
+
url.query = '';
|
|
3473
|
+
state = QUERY;
|
|
3474
|
+
} else if (chr == '#') {
|
|
3475
|
+
url.fragment = '';
|
|
3476
|
+
state = FRAGMENT;
|
|
3477
|
+
} else if (chr != EOF) {
|
|
3478
|
+
url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3479
|
+
} break;
|
|
3480
|
+
|
|
3481
|
+
case QUERY:
|
|
3482
|
+
if (!stateOverride && chr == '#') {
|
|
3483
|
+
url.fragment = '';
|
|
3484
|
+
state = FRAGMENT;
|
|
3485
|
+
} else if (chr != EOF) {
|
|
3486
|
+
if (chr == "'" && url.isSpecial()) url.query += '%27';
|
|
3487
|
+
else if (chr == '#') url.query += '%23';
|
|
3488
|
+
else url.query += percentEncode(chr, C0ControlPercentEncodeSet);
|
|
3489
|
+
} break;
|
|
3490
|
+
|
|
3491
|
+
case FRAGMENT:
|
|
3492
|
+
if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);
|
|
3493
|
+
break;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
pointer++;
|
|
3497
|
+
}
|
|
3498
|
+
},
|
|
3499
|
+
// https://url.spec.whatwg.org/#host-parsing
|
|
3500
|
+
parseHost: function (input) {
|
|
3501
|
+
var result, codePoints, index;
|
|
3502
|
+
if (charAt(input, 0) == '[') {
|
|
3503
|
+
if (charAt(input, input.length - 1) != ']') return INVALID_HOST;
|
|
3504
|
+
result = parseIPv6(stringSlice$1(input, 1, -1));
|
|
3505
|
+
if (!result) return INVALID_HOST;
|
|
3506
|
+
this.host = result;
|
|
3507
|
+
// opaque host
|
|
3508
|
+
} else if (!this.isSpecial()) {
|
|
3509
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;
|
|
3510
|
+
result = '';
|
|
3511
|
+
codePoints = arrayFrom(input);
|
|
3512
|
+
for (index = 0; index < codePoints.length; index++) {
|
|
3513
|
+
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
|
|
3514
|
+
}
|
|
3515
|
+
this.host = result;
|
|
3516
|
+
} else {
|
|
3517
|
+
input = toASCII(input);
|
|
3518
|
+
if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;
|
|
3519
|
+
result = parseIPv4(input);
|
|
3520
|
+
if (result === null) return INVALID_HOST;
|
|
3521
|
+
this.host = result;
|
|
3522
|
+
}
|
|
3523
|
+
},
|
|
3524
|
+
// https://url.spec.whatwg.org/#cannot-have-a-username-password-port
|
|
3525
|
+
cannotHaveUsernamePasswordPort: function () {
|
|
3526
|
+
return !this.host || this.cannotBeABaseURL || this.scheme == 'file';
|
|
3527
|
+
},
|
|
3528
|
+
// https://url.spec.whatwg.org/#include-credentials
|
|
3529
|
+
includesCredentials: function () {
|
|
3530
|
+
return this.username != '' || this.password != '';
|
|
3531
|
+
},
|
|
3532
|
+
// https://url.spec.whatwg.org/#is-special
|
|
3533
|
+
isSpecial: function () {
|
|
3534
|
+
return hasOwn(specialSchemes, this.scheme);
|
|
3535
|
+
},
|
|
3536
|
+
// https://url.spec.whatwg.org/#shorten-a-urls-path
|
|
3537
|
+
shortenPath: function () {
|
|
3538
|
+
var path = this.path;
|
|
3539
|
+
var pathSize = path.length;
|
|
3540
|
+
if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
|
|
3541
|
+
path.length--;
|
|
3542
|
+
}
|
|
3543
|
+
},
|
|
3544
|
+
// https://url.spec.whatwg.org/#concept-url-serializer
|
|
3545
|
+
serialize: function () {
|
|
3546
|
+
var url = this;
|
|
3547
|
+
var scheme = url.scheme;
|
|
3548
|
+
var username = url.username;
|
|
3549
|
+
var password = url.password;
|
|
3550
|
+
var host = url.host;
|
|
3551
|
+
var port = url.port;
|
|
3552
|
+
var path = url.path;
|
|
3553
|
+
var query = url.query;
|
|
3554
|
+
var fragment = url.fragment;
|
|
3555
|
+
var output = scheme + ':';
|
|
3556
|
+
if (host !== null) {
|
|
3557
|
+
output += '//';
|
|
3558
|
+
if (url.includesCredentials()) {
|
|
3559
|
+
output += username + (password ? ':' + password : '') + '@';
|
|
3560
|
+
}
|
|
3561
|
+
output += serializeHost(host);
|
|
3562
|
+
if (port !== null) output += ':' + port;
|
|
3563
|
+
} else if (scheme == 'file') output += '//';
|
|
3564
|
+
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3565
|
+
if (query !== null) output += '?' + query;
|
|
3566
|
+
if (fragment !== null) output += '#' + fragment;
|
|
3567
|
+
return output;
|
|
3568
|
+
},
|
|
3569
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
3570
|
+
setHref: function (href) {
|
|
3571
|
+
var failure = this.parse(href);
|
|
3572
|
+
if (failure) throw TypeError$2(failure);
|
|
3573
|
+
this.searchParams.update();
|
|
3574
|
+
},
|
|
3575
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
3576
|
+
getOrigin: function () {
|
|
3577
|
+
var scheme = this.scheme;
|
|
3578
|
+
var port = this.port;
|
|
3579
|
+
if (scheme == 'blob') try {
|
|
3580
|
+
return new URLConstructor(scheme.path[0]).origin;
|
|
3581
|
+
} catch (error) {
|
|
3582
|
+
return 'null';
|
|
3583
|
+
}
|
|
3584
|
+
if (scheme == 'file' || !this.isSpecial()) return 'null';
|
|
3585
|
+
return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');
|
|
3586
|
+
},
|
|
3587
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
3588
|
+
getProtocol: function () {
|
|
3589
|
+
return this.scheme + ':';
|
|
3590
|
+
},
|
|
3591
|
+
setProtocol: function (protocol) {
|
|
3592
|
+
this.parse($toString$1(protocol) + ':', SCHEME_START);
|
|
3593
|
+
},
|
|
3594
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
3595
|
+
getUsername: function () {
|
|
3596
|
+
return this.username;
|
|
3597
|
+
},
|
|
3598
|
+
setUsername: function (username) {
|
|
3599
|
+
var codePoints = arrayFrom($toString$1(username));
|
|
3600
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3601
|
+
this.username = '';
|
|
3602
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
3603
|
+
this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
3604
|
+
}
|
|
3605
|
+
},
|
|
3606
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
3607
|
+
getPassword: function () {
|
|
3608
|
+
return this.password;
|
|
3609
|
+
},
|
|
3610
|
+
setPassword: function (password) {
|
|
3611
|
+
var codePoints = arrayFrom($toString$1(password));
|
|
3612
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3613
|
+
this.password = '';
|
|
3614
|
+
for (var i = 0; i < codePoints.length; i++) {
|
|
3615
|
+
this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
|
|
3616
|
+
}
|
|
3617
|
+
},
|
|
3618
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
3619
|
+
getHost: function () {
|
|
3620
|
+
var host = this.host;
|
|
3621
|
+
var port = this.port;
|
|
3622
|
+
return host === null ? ''
|
|
3623
|
+
: port === null ? serializeHost(host)
|
|
3624
|
+
: serializeHost(host) + ':' + port;
|
|
3625
|
+
},
|
|
3626
|
+
setHost: function (host) {
|
|
3627
|
+
if (this.cannotBeABaseURL) return;
|
|
3628
|
+
this.parse(host, HOST);
|
|
3629
|
+
},
|
|
3630
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
3631
|
+
getHostname: function () {
|
|
3632
|
+
var host = this.host;
|
|
3633
|
+
return host === null ? '' : serializeHost(host);
|
|
3634
|
+
},
|
|
3635
|
+
setHostname: function (hostname) {
|
|
3636
|
+
if (this.cannotBeABaseURL) return;
|
|
3637
|
+
this.parse(hostname, HOSTNAME);
|
|
3638
|
+
},
|
|
3639
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
3640
|
+
getPort: function () {
|
|
3641
|
+
var port = this.port;
|
|
3642
|
+
return port === null ? '' : $toString$1(port);
|
|
3643
|
+
},
|
|
3644
|
+
setPort: function (port) {
|
|
3645
|
+
if (this.cannotHaveUsernamePasswordPort()) return;
|
|
3646
|
+
port = $toString$1(port);
|
|
3647
|
+
if (port == '') this.port = null;
|
|
3648
|
+
else this.parse(port, PORT);
|
|
3649
|
+
},
|
|
3650
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
3651
|
+
getPathname: function () {
|
|
3652
|
+
var path = this.path;
|
|
3653
|
+
return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';
|
|
3654
|
+
},
|
|
3655
|
+
setPathname: function (pathname) {
|
|
3656
|
+
if (this.cannotBeABaseURL) return;
|
|
3657
|
+
this.path = [];
|
|
3658
|
+
this.parse(pathname, PATH_START);
|
|
3659
|
+
},
|
|
3660
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
3661
|
+
getSearch: function () {
|
|
3662
|
+
var query = this.query;
|
|
3663
|
+
return query ? '?' + query : '';
|
|
3664
|
+
},
|
|
3665
|
+
setSearch: function (search) {
|
|
3666
|
+
search = $toString$1(search);
|
|
3667
|
+
if (search == '') {
|
|
3668
|
+
this.query = null;
|
|
3669
|
+
} else {
|
|
3670
|
+
if ('?' == charAt(search, 0)) search = stringSlice$1(search, 1);
|
|
3671
|
+
this.query = '';
|
|
3672
|
+
this.parse(search, QUERY);
|
|
3673
|
+
}
|
|
3674
|
+
this.searchParams.update();
|
|
3675
|
+
},
|
|
3676
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
3677
|
+
getSearchParams: function () {
|
|
3678
|
+
return this.searchParams.facade;
|
|
3679
|
+
},
|
|
3680
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
3681
|
+
getHash: function () {
|
|
3682
|
+
var fragment = this.fragment;
|
|
3683
|
+
return fragment ? '#' + fragment : '';
|
|
3684
|
+
},
|
|
3685
|
+
setHash: function (hash) {
|
|
3686
|
+
hash = $toString$1(hash);
|
|
3687
|
+
if (hash == '') {
|
|
3688
|
+
this.fragment = null;
|
|
3689
|
+
return;
|
|
3690
|
+
}
|
|
3691
|
+
if ('#' == charAt(hash, 0)) hash = stringSlice$1(hash, 1);
|
|
3692
|
+
this.fragment = '';
|
|
3693
|
+
this.parse(hash, FRAGMENT);
|
|
3694
|
+
},
|
|
3695
|
+
update: function () {
|
|
3696
|
+
this.query = this.searchParams.serialize() || null;
|
|
3697
|
+
}
|
|
3698
|
+
};
|
|
3699
|
+
|
|
3700
|
+
// `URL` constructor
|
|
3701
|
+
// https://url.spec.whatwg.org/#url-class
|
|
3702
|
+
var URLConstructor = function URL(url /* , base */) {
|
|
3703
|
+
var that = anInstance(this, URLPrototype);
|
|
3704
|
+
var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;
|
|
3705
|
+
var state = setInternalState(that, new URLState(url, false, base));
|
|
3706
|
+
if (!DESCRIPTORS) {
|
|
3707
|
+
that.href = state.serialize();
|
|
3708
|
+
that.origin = state.getOrigin();
|
|
3709
|
+
that.protocol = state.getProtocol();
|
|
3710
|
+
that.username = state.getUsername();
|
|
3711
|
+
that.password = state.getPassword();
|
|
3712
|
+
that.host = state.getHost();
|
|
3713
|
+
that.hostname = state.getHostname();
|
|
3714
|
+
that.port = state.getPort();
|
|
3715
|
+
that.pathname = state.getPathname();
|
|
3716
|
+
that.search = state.getSearch();
|
|
3717
|
+
that.searchParams = state.getSearchParams();
|
|
3718
|
+
that.hash = state.getHash();
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
|
|
3722
|
+
var URLPrototype = URLConstructor.prototype;
|
|
3723
|
+
|
|
3724
|
+
var accessorDescriptor = function (getter, setter) {
|
|
3725
|
+
return {
|
|
3726
|
+
get: function () {
|
|
3727
|
+
return getInternalURLState(this)[getter]();
|
|
3728
|
+
},
|
|
3729
|
+
set: setter && function (value) {
|
|
3730
|
+
return getInternalURLState(this)[setter](value);
|
|
3731
|
+
},
|
|
3732
|
+
configurable: true,
|
|
3733
|
+
enumerable: true
|
|
3734
|
+
};
|
|
3735
|
+
};
|
|
3736
|
+
|
|
3737
|
+
if (DESCRIPTORS) {
|
|
3738
|
+
defineProperties(URLPrototype, {
|
|
3739
|
+
// `URL.prototype.href` accessors pair
|
|
3740
|
+
// https://url.spec.whatwg.org/#dom-url-href
|
|
3741
|
+
href: accessorDescriptor('serialize', 'setHref'),
|
|
3742
|
+
// `URL.prototype.origin` getter
|
|
3743
|
+
// https://url.spec.whatwg.org/#dom-url-origin
|
|
3744
|
+
origin: accessorDescriptor('getOrigin'),
|
|
3745
|
+
// `URL.prototype.protocol` accessors pair
|
|
3746
|
+
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
3747
|
+
protocol: accessorDescriptor('getProtocol', 'setProtocol'),
|
|
3748
|
+
// `URL.prototype.username` accessors pair
|
|
3749
|
+
// https://url.spec.whatwg.org/#dom-url-username
|
|
3750
|
+
username: accessorDescriptor('getUsername', 'setUsername'),
|
|
3751
|
+
// `URL.prototype.password` accessors pair
|
|
3752
|
+
// https://url.spec.whatwg.org/#dom-url-password
|
|
3753
|
+
password: accessorDescriptor('getPassword', 'setPassword'),
|
|
3754
|
+
// `URL.prototype.host` accessors pair
|
|
3755
|
+
// https://url.spec.whatwg.org/#dom-url-host
|
|
3756
|
+
host: accessorDescriptor('getHost', 'setHost'),
|
|
3757
|
+
// `URL.prototype.hostname` accessors pair
|
|
3758
|
+
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
3759
|
+
hostname: accessorDescriptor('getHostname', 'setHostname'),
|
|
3760
|
+
// `URL.prototype.port` accessors pair
|
|
3761
|
+
// https://url.spec.whatwg.org/#dom-url-port
|
|
3762
|
+
port: accessorDescriptor('getPort', 'setPort'),
|
|
3763
|
+
// `URL.prototype.pathname` accessors pair
|
|
3764
|
+
// https://url.spec.whatwg.org/#dom-url-pathname
|
|
3765
|
+
pathname: accessorDescriptor('getPathname', 'setPathname'),
|
|
3766
|
+
// `URL.prototype.search` accessors pair
|
|
3767
|
+
// https://url.spec.whatwg.org/#dom-url-search
|
|
3768
|
+
search: accessorDescriptor('getSearch', 'setSearch'),
|
|
3769
|
+
// `URL.prototype.searchParams` getter
|
|
3770
|
+
// https://url.spec.whatwg.org/#dom-url-searchparams
|
|
3771
|
+
searchParams: accessorDescriptor('getSearchParams'),
|
|
3772
|
+
// `URL.prototype.hash` accessors pair
|
|
3773
|
+
// https://url.spec.whatwg.org/#dom-url-hash
|
|
3774
|
+
hash: accessorDescriptor('getHash', 'setHash')
|
|
3775
|
+
});
|
|
3776
|
+
}
|
|
3777
|
+
|
|
3778
|
+
// `URL.prototype.toJSON` method
|
|
3779
|
+
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
3780
|
+
redefine$1(URLPrototype, 'toJSON', function toJSON() {
|
|
3781
|
+
return getInternalURLState(this).serialize();
|
|
3782
|
+
}, { enumerable: true });
|
|
3783
|
+
|
|
3784
|
+
// `URL.prototype.toString` method
|
|
3785
|
+
// https://url.spec.whatwg.org/#URL-stringification-behavior
|
|
3786
|
+
redefine$1(URLPrototype, 'toString', function toString() {
|
|
3787
|
+
return getInternalURLState(this).serialize();
|
|
3788
|
+
}, { enumerable: true });
|
|
3789
|
+
|
|
3790
|
+
if (NativeURL) {
|
|
3791
|
+
var nativeCreateObjectURL = NativeURL.createObjectURL;
|
|
3792
|
+
var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
|
|
3793
|
+
// `URL.createObjectURL` method
|
|
3794
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
|
|
3795
|
+
if (nativeCreateObjectURL) redefine$1(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));
|
|
3796
|
+
// `URL.revokeObjectURL` method
|
|
3797
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
3798
|
+
if (nativeRevokeObjectURL) redefine$1(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3801
|
+
setToStringTag(URLConstructor, 'URL');
|
|
3802
|
+
|
|
3803
|
+
$$1({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
|
|
3804
|
+
URL: URLConstructor
|
|
3805
|
+
});
|
|
3806
|
+
|
|
3807
|
+
var isObject = isObject$7;
|
|
3808
|
+
var classof = classofRaw$1;
|
|
3809
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
3810
|
+
|
|
3811
|
+
var MATCH$1 = wellKnownSymbol$1('match');
|
|
3812
|
+
|
|
3813
|
+
// `IsRegExp` abstract operation
|
|
3814
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
3815
|
+
var isRegexp = function (it) {
|
|
3816
|
+
var isRegExp;
|
|
3817
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
|
|
3818
|
+
};
|
|
3819
|
+
|
|
3820
|
+
var global$1 = global$C;
|
|
3821
|
+
var isRegExp = isRegexp;
|
|
3822
|
+
|
|
3823
|
+
var TypeError$1 = global$1.TypeError;
|
|
3824
|
+
|
|
3825
|
+
var notARegexp = function (it) {
|
|
3826
|
+
if (isRegExp(it)) {
|
|
3827
|
+
throw TypeError$1("The method doesn't accept regular expressions");
|
|
3828
|
+
} return it;
|
|
3829
|
+
};
|
|
3830
|
+
|
|
3831
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3832
|
+
|
|
3833
|
+
var MATCH = wellKnownSymbol('match');
|
|
3834
|
+
|
|
3835
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
3836
|
+
var regexp = /./;
|
|
3837
|
+
try {
|
|
3838
|
+
'/./'[METHOD_NAME](regexp);
|
|
3839
|
+
} catch (error1) {
|
|
3840
|
+
try {
|
|
3841
|
+
regexp[MATCH] = false;
|
|
3842
|
+
return '/./'[METHOD_NAME](regexp);
|
|
3843
|
+
} catch (error2) { /* empty */ }
|
|
3844
|
+
} return false;
|
|
3845
|
+
};
|
|
3846
|
+
|
|
3847
|
+
var $ = _export;
|
|
3848
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
3849
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
3850
|
+
var toLength = toLength$2;
|
|
3851
|
+
var toString = toString$4;
|
|
3852
|
+
var notARegExp = notARegexp;
|
|
3853
|
+
var requireObjectCoercible = requireObjectCoercible$4;
|
|
3854
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3855
|
+
|
|
3856
|
+
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
3857
|
+
var un$StartsWith = uncurryThis$1(''.startsWith);
|
|
3858
|
+
var stringSlice = uncurryThis$1(''.slice);
|
|
3859
|
+
var min = Math.min;
|
|
3860
|
+
|
|
3861
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
3862
|
+
// https://github.com/zloirock/core-js/pull/702
|
|
3863
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
3864
|
+
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
3865
|
+
return descriptor && !descriptor.writable;
|
|
3866
|
+
}();
|
|
3867
|
+
|
|
3868
|
+
// `String.prototype.startsWith` method
|
|
3869
|
+
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
3870
|
+
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
3871
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
3872
|
+
var that = toString(requireObjectCoercible(this));
|
|
3873
|
+
notARegExp(searchString);
|
|
3874
|
+
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
3875
|
+
var search = toString(searchString);
|
|
3876
|
+
return un$StartsWith
|
|
3877
|
+
? un$StartsWith(that, search, index)
|
|
3878
|
+
: stringSlice(that, index, index + search.length) === search;
|
|
3879
|
+
}
|
|
3880
|
+
});
|
|
3881
|
+
|
|
3882
|
+
var uncurryThis = functionUncurryThis;
|
|
3883
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
3884
|
+
var redefine = redefine$7.exports;
|
|
3885
|
+
var anObject = anObject$b;
|
|
3886
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
3887
|
+
var $toString = toString$4;
|
|
3888
|
+
var fails = fails$g;
|
|
3889
|
+
var regExpFlags = regexpFlags$1;
|
|
3890
|
+
|
|
3891
|
+
var TO_STRING = 'toString';
|
|
3892
|
+
var RegExpPrototype = RegExp.prototype;
|
|
3893
|
+
var n$ToString = RegExpPrototype[TO_STRING];
|
|
3894
|
+
var getFlags = uncurryThis(regExpFlags);
|
|
3895
|
+
|
|
3896
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
3897
|
+
// FF44- RegExp#toString has a wrong name
|
|
3898
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
|
|
3899
|
+
|
|
3900
|
+
// `RegExp.prototype.toString` method
|
|
3901
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
3902
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
3903
|
+
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
3904
|
+
var R = anObject(this);
|
|
3905
|
+
var p = $toString(R.source);
|
|
3906
|
+
var rf = R.flags;
|
|
3907
|
+
var f = $toString(rf === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf);
|
|
3908
|
+
return '/' + p + '/' + f;
|
|
3909
|
+
}, { unsafe: true });
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3912
|
+
var Chanukah="Hanukkah, the Jewish festival of rededication. Also known as the Festival of Lights";var Pesach="Passover, the Feast of Unleavened Bread. Also called Chag HaMatzot (the Festival of Matzah), it commemorates the Exodus and freedom of the Israelites from ancient Egypt";var Purim="Celebration of Jewish deliverance as told by Megilat Esther. It commemorates a time when the Jewish people living in Persia were saved from extermination";var Shavuot="Festival of Weeks. Commemorates the giving of the Torah at Mount Sinai";var Sigd="Ethiopian Jewish holiday occurring 50 days after Yom Kippur";var Sukkot="Feast of Booths";var holidayDescription = {"Asara B'Tevet":"Fast commemorating the siege of Jerusalem",Chanukah:Chanukah,"Days of the Omer":"7 weeks from the second night of Pesach to the day before Shavuot","Lag BaOmer":"33rd day of counting the Omer","Leil Selichot":"Prayers for forgiveness in preparation for the High Holidays","Pesach Sheni":"Second Passover, one month after Passover",Pesach:Pesach,"Purim Katan":"Minor Purim celebration during Adar I on leap years",Purim:Purim,"Rosh Chodesh Nisan":"Start of month of Nisan on the Hebrew calendar. נִיסָן (transliterated Nisan or Nissan) is the 1st month of the Hebrew year, has 30 days, and corresponds to March or April on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Iyyar":"Start of month of Iyyar on the Hebrew calendar. אִיָיר (transliterated Iyyar or Iyar) is the 2nd month of the Hebrew year, has 29 days, and corresponds to April or May on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sivan":"Start of month of Sivan on the Hebrew calendar. Sivan (סִיוָן) is the 3rd month of the Hebrew year, has 30 days, and corresponds to May or June on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tamuz":"Start of month of Tamuz on the Hebrew calendar. תַּמּוּז (transliterated Tamuz or Tammuz) is the 4th month of the Hebrew year, has 29 days, and corresponds to June or July on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Av":"Start of month of Av on the Hebrew calendar. Av (אָב) is the 5th month of the Hebrew year, has 30 days, and corresponds to July or August on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Elul":"Start of month of Elul on the Hebrew calendar. Elul (אֱלוּל) is the 6th month of the Hebrew year, has 29 days, and corresponds to August or September on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Cheshvan":"Start of month of Cheshvan on the Hebrew calendar. חֶשְׁוָן (transliterated Cheshvan or Heshvan) is the 8th month of the Hebrew year, has 29 or 30 days, and corresponds to October or November on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Kislev":"Start of month of Kislev on the Hebrew calendar. Kislev (כִּסְלֵו) is the 9th month of the Hebrew year, has 30 or 29 days, and corresponds to November or December on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Tevet":"Start of month of Tevet on the Hebrew calendar. Tevet (טֵבֵת) is the 10th month of the Hebrew year, has 29 days, and corresponds to December or January on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Sh'vat":"Start of month of Sh'vat on the Hebrew calendar. שְׁבָט (transliterated Sh'vat or Shevat) is the 11th month of the Hebrew year, has 30 days, and corresponds to January or February on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar":"Start of month of Adar on the Hebrew calendar. Adar (אַדָר) is the 12th month of the Hebrew year, has 29 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar I":"Start of month of Adar I (on leap years) on the Hebrew calendar. Adar I (אַדָר א׳) is the 12th month of the Hebrew year, occurs only on leap years, has 30 days, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Chodesh Adar II":"Start of month of Adar II (on leap years) on the Hebrew calendar. Adar II (אַדָר ב׳), sometimes \"Adar Bet\" or \"Adar Sheni\", is the 13th month of the Hebrew year, has 29 days, occurs only on leap years, and corresponds to February or March on the Gregorian calendar. רֹאשׁ חוֹדֶשׁ, transliterated Rosh Chodesh or Rosh Hodesh, is a minor holiday that occurs at the beginning of every month in the Hebrew calendar. It is marked by the birth of a new moon","Rosh Hashana":"The Jewish New Year. Also spelled Rosh Hashanah","Rosh Hashana LaBehemot":"New Year for Tithing Animals","Shabbat Chazon":"Shabbat before Tish'a B'Av (Shabbat of Prophecy/Shabbat of Vision)","Shabbat HaChodesh":"Shabbat before Rosh Chodesh Nissan","Shabbat HaGadol":"Shabbat before Pesach","Shabbat Machar Chodesh":"When Shabbat falls the day before Rosh Chodesh","Shabbat Nachamu":"Shabbat after Tish'a B'Av (Shabbat of Consolation). The first of seven Shabbatot leading up to Rosh Hashanah. Named after the Haftarah (from Isaiah 40) which begins with the verse נַחֲמוּ נַחֲמוּ, עַמִּי (\"Comfort, oh comfort my people\")","Shabbat Parah":"Shabbat of the Red Heifer","Shabbat Rosh Chodesh":"When Shabbat falls on Rosh Chodesh","Shabbat Shekalim":"Shabbat before Rosh Chodesh Adar","Shabbat Shirah":"Shabbat of Song","Shabbat Shuva":"Shabbat that falls between Rosh Hashanah and Yom Kippur (Shabbat of Returning)","Shabbat Zachor":"Shabbat before Purim",Shavuot:Shavuot,"Shmini Atzeret":"Eighth Day of Assembly","Shushan Purim":"Purim celebrated in Jerusalem and walled cities",Sigd:Sigd,"Simchat Torah":"Day of Celebrating the Torah",Sukkot:Sukkot,"Ta'anit Bechorot":"Fast of the First Born","Ta'anit Esther":"Fast of Esther","Tish'a B'Av":"The Ninth of Av. Fast commemorating the destruction of the two Temples","Tu B'Av":"Minor Jewish holiday of love. Observed on the 15th day of the Hebrew month of Av","Tu BiShvat":"New Year for Trees","Tzom Gedaliah":"Fast of the Seventh Month. Commemorates the assassination of the Jewish governor of Judah","Tzom Tammuz":"Fast commemorating breaching of the walls of Jerusalem before the destruction of the Second Temple","Yom HaAliyah":"Recognizes Aliyah, immigration to the Jewish State of Israel","Yom HaAliyah School Observance":"Aliyah Day observed in Israeli schools","Yom HaAtzma'ut":"Israeli Independence Day. Commemorates the declaration of independence of Israel in 1948. Note that Hebcal displays modern holidays like Yom HaAtzma'ut according to the Israeli schedule. Although Yom HaAtzma'ut is normally observed on the 5th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaZikaron, which always precedes it) would conflict with Shabbat","Yom HaShoah":"Holocaust Memorial Day","Yom HaZikaron":"Israeli Memorial Day. Note that Hebcal displays modern holidays like Yom HaZikaron according to the Israeli schedule. Although Yom Hazikaron is normally observed on the 4th of Iyyar, it may be moved earlier or postponed if observance of the holiday (or Yom HaAtzma'ut, which always follows it) would conflict with Shabbat","Yom Kippur":"Day of Atonement","Yom Yerushalayim":"Jerusalem Day. Commemorates the re-unification of Jerusalem in 1967"};
|
|
3913
|
+
|
|
3914
|
+
/**
|
|
3915
|
+
* Helper function to transform a string to make it more usable in a URL or filename.
|
|
3916
|
+
* Converts to lowercase and replaces non-word characters with hyphen ('-').
|
|
3917
|
+
* @example
|
|
3918
|
+
* makeAnchor('Rosh Chodesh Adar II') // 'rosh-chodesh-adar-ii'
|
|
3919
|
+
* @param {string} s
|
|
3920
|
+
* @return {string}
|
|
3921
|
+
*/
|
|
3922
|
+
|
|
3923
|
+
function makeAnchor(s) {
|
|
3924
|
+
return s.toLowerCase().replace(/'/g, '').replace(/[^\w]/g, '-').replace(/-+/g, '-').replace(/^-/g, '').replace(/-$/g, '');
|
|
3925
|
+
}
|
|
3926
|
+
/**
|
|
3927
|
+
* @param {HebrewCalendar.Options} options
|
|
3928
|
+
* @return {string}
|
|
3929
|
+
*/
|
|
3930
|
+
|
|
3931
|
+
function getDownloadFilename(options) {
|
|
3932
|
+
let fileName = 'hebcal_' + options.year;
|
|
3933
|
+
|
|
3934
|
+
if (options.isHebrewYear) {
|
|
3935
|
+
fileName += 'h';
|
|
3936
|
+
}
|
|
3937
|
+
|
|
3938
|
+
if (options.month) {
|
|
3939
|
+
fileName += '_' + options.month;
|
|
3940
|
+
}
|
|
3941
|
+
|
|
3942
|
+
if (options.location) {
|
|
3943
|
+
const name = options.location.zip || options.location.asciiname || options.location.getShortName();
|
|
3944
|
+
fileName += '_' + makeAnchor(name).replace(/[-]/g, '_');
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
return fileName;
|
|
3948
|
+
}
|
|
3949
|
+
/**
|
|
3950
|
+
* @param {number} number
|
|
3951
|
+
* @return {string}
|
|
3952
|
+
*/
|
|
3953
|
+
|
|
3954
|
+
function pad2(number) {
|
|
3955
|
+
if (number < 10) {
|
|
3956
|
+
return '0' + number;
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
return String(number);
|
|
3960
|
+
}
|
|
3961
|
+
/**
|
|
3962
|
+
* @param {number} number
|
|
3963
|
+
* @return {string}
|
|
3964
|
+
*/
|
|
3965
|
+
|
|
3966
|
+
function pad4(number) {
|
|
3967
|
+
if (number < 0) {
|
|
3968
|
+
return '-00' + pad4(-number);
|
|
3969
|
+
} else if (number < 10) {
|
|
3970
|
+
return '000' + number;
|
|
3971
|
+
} else if (number < 100) {
|
|
3972
|
+
return '00' + number;
|
|
3973
|
+
} else if (number < 1000) {
|
|
3974
|
+
return '0' + number;
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
return String(number);
|
|
3978
|
+
}
|
|
3979
|
+
/**
|
|
3980
|
+
* Get offset string (like "+05:00" or "-08:00") from tzid (like "Europe/Moscow")
|
|
3981
|
+
* @deprecated
|
|
3982
|
+
* @param {string} tzid
|
|
3983
|
+
* @param {Date} date
|
|
3984
|
+
* @return {string}
|
|
3985
|
+
*/
|
|
3986
|
+
|
|
3987
|
+
function timeZoneOffsetStr(tzid, date) {
|
|
3988
|
+
return core.Zmanim.timeZoneOffset(tzid, date);
|
|
3989
|
+
}
|
|
3990
|
+
/**
|
|
3991
|
+
* Returns just the date portion as YYYY-MM-DD
|
|
3992
|
+
* @param {Date} d
|
|
3993
|
+
* @return {string}
|
|
3994
|
+
*/
|
|
3995
|
+
|
|
3996
|
+
function toISOString(d) {
|
|
3997
|
+
return pad4(d.getFullYear()) + '-' + pad2(d.getMonth() + 1) + '-' + pad2(d.getDate());
|
|
3998
|
+
}
|
|
3999
|
+
/**
|
|
4000
|
+
* Returns a string like "2018-09-01T12:30:00-05:00"
|
|
4001
|
+
* @deprecated
|
|
4002
|
+
* @param {Date} date
|
|
4003
|
+
* @param {string} timeStr must be formatted with only hours and minutes, like "17:12"
|
|
4004
|
+
* @param {string} tzid like "America/New_York"
|
|
4005
|
+
* @return {string}
|
|
4006
|
+
*/
|
|
4007
|
+
|
|
4008
|
+
function toISOStringWithTimezone(date, timeStr, tzid) {
|
|
4009
|
+
const str = toISOString(date);
|
|
4010
|
+
if (!timeStr) return str;
|
|
4011
|
+
return str + 'T' + timeStr + ':00' + core.Zmanim.timeZoneOffset(tzid, date);
|
|
4012
|
+
}
|
|
4013
|
+
/**
|
|
4014
|
+
* Returns a category and subcategory name
|
|
4015
|
+
* @param {Event} ev
|
|
4016
|
+
* @return {string[]}
|
|
4017
|
+
*/
|
|
4018
|
+
|
|
4019
|
+
function getEventCategories(ev) {
|
|
4020
|
+
const desc = ev.getDesc(); // since these use flags.MINOR_FAST or flags.MAJOR_FAST, check description first
|
|
4021
|
+
|
|
4022
|
+
if (desc === 'Fast begins' || desc === 'Fast ends') {
|
|
4023
|
+
return ['zmanim', 'fast'];
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
switch (ev.getFlags()) {
|
|
4027
|
+
case core.flags.OMER_COUNT:
|
|
4028
|
+
return ['omer'];
|
|
4029
|
+
|
|
4030
|
+
case core.flags.HEBREW_DATE:
|
|
4031
|
+
return ['hebdate'];
|
|
4032
|
+
|
|
4033
|
+
case core.flags.PARSHA_HASHAVUA:
|
|
4034
|
+
return ['parashat'];
|
|
4035
|
+
// backwards-compat
|
|
4036
|
+
|
|
4037
|
+
case core.flags.DAF_YOMI:
|
|
4038
|
+
return ['dafyomi'];
|
|
4039
|
+
|
|
4040
|
+
case core.flags.ROSH_CHODESH:
|
|
4041
|
+
return ['roshchodesh'];
|
|
4042
|
+
|
|
4043
|
+
case core.flags.SPECIAL_SHABBAT:
|
|
4044
|
+
return ['holiday', 'shabbat'];
|
|
4045
|
+
|
|
4046
|
+
case core.flags.MINOR_FAST:
|
|
4047
|
+
return ['holiday', 'fast'];
|
|
4048
|
+
|
|
4049
|
+
case core.flags.MAJOR_FAST:
|
|
4050
|
+
return ['holiday', 'fast', 'major'];
|
|
4051
|
+
|
|
4052
|
+
case core.flags.MODERN_HOLIDAY:
|
|
4053
|
+
return ['holiday', 'modern'];
|
|
4054
|
+
|
|
4055
|
+
case core.flags.SHABBAT_MEVARCHIM:
|
|
4056
|
+
return ['mevarchim'];
|
|
4057
|
+
|
|
4058
|
+
case core.flags.MOLAD:
|
|
4059
|
+
return ['molad'];
|
|
4060
|
+
|
|
4061
|
+
case core.flags.USER_EVENT:
|
|
4062
|
+
return ['user'];
|
|
4063
|
+
|
|
4064
|
+
case core.flags.MINOR_HOLIDAY:
|
|
4065
|
+
return ['holiday', 'minor'];
|
|
4066
|
+
|
|
4067
|
+
case core.flags.MISHNA_YOMI:
|
|
4068
|
+
return ['mishnayomi'];
|
|
4069
|
+
// fall through to string-based category
|
|
4070
|
+
}
|
|
4071
|
+
|
|
4072
|
+
if (ev.cholHaMoedDay) {
|
|
4073
|
+
return ['holiday', 'major', 'cholhamoed'];
|
|
4074
|
+
}
|
|
4075
|
+
|
|
4076
|
+
switch (desc) {
|
|
4077
|
+
case 'Havdalah':
|
|
4078
|
+
return ['havdalah'];
|
|
4079
|
+
|
|
4080
|
+
case 'Candle lighting':
|
|
4081
|
+
return ['candles'];
|
|
4082
|
+
|
|
4083
|
+
case 'Lag BaOmer':
|
|
4084
|
+
case 'Leil Selichot':
|
|
4085
|
+
case 'Pesach Sheni':
|
|
4086
|
+
case 'Erev Purim':
|
|
4087
|
+
case 'Purim Katan':
|
|
4088
|
+
case 'Shushan Purim':
|
|
4089
|
+
case 'Tu B\'Av':
|
|
4090
|
+
case 'Tu BiShvat':
|
|
4091
|
+
case 'Rosh Hashana LaBehemot':
|
|
4092
|
+
return ['holiday', 'minor'];
|
|
4093
|
+
|
|
4094
|
+
case 'Erev Tish\'a B\'Av':
|
|
4095
|
+
return ['holiday', 'fast', 'major'];
|
|
4096
|
+
|
|
4097
|
+
default:
|
|
4098
|
+
return ['holiday', 'major'];
|
|
4099
|
+
}
|
|
4100
|
+
}
|
|
4101
|
+
/**
|
|
4102
|
+
* Renders the event title in default locale, but strips off time
|
|
4103
|
+
* @param {Event} ev
|
|
1533
4104
|
* @return {string}
|
|
1534
4105
|
*/
|
|
1535
4106
|
|
|
@@ -1658,16 +4229,60 @@ function makeTorahMemoText(ev, il) {
|
|
|
1658
4229
|
*/
|
|
1659
4230
|
|
|
1660
4231
|
function appendIsraelAndTracking(url, il, utmSource, utmMedium, utmCampaign) {
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
4232
|
+
const u = new URL(url);
|
|
4233
|
+
const isHebcal = u.host === 'www.hebcal.com';
|
|
4234
|
+
|
|
4235
|
+
if (isHebcal) {
|
|
4236
|
+
if (il) {
|
|
4237
|
+
u.searchParams.set('i', 'on');
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
const path = u.pathname;
|
|
4241
|
+
const isHolidays = path.startsWith('/holidays/');
|
|
4242
|
+
const isSedrot = path.startsWith('/sedrot/');
|
|
4243
|
+
|
|
4244
|
+
if (isHolidays || isSedrot) {
|
|
4245
|
+
u.host = 'hebcal.com';
|
|
4246
|
+
|
|
4247
|
+
if (isHolidays) {
|
|
4248
|
+
u.pathname = '/h/' + path.substring(10);
|
|
4249
|
+
} else {
|
|
4250
|
+
u.pathname = '/s/' + path.substring(8);
|
|
4251
|
+
}
|
|
4252
|
+
|
|
4253
|
+
if (!utmCampaign || !(utmCampaign.startsWith('ical-') || utmCampaign.startsWith('pdf-'))) {
|
|
4254
|
+
if (utmSource) {
|
|
4255
|
+
u.searchParams.set('us', utmSource);
|
|
4256
|
+
}
|
|
4257
|
+
|
|
4258
|
+
if (utmMedium) {
|
|
4259
|
+
u.searchParams.set('um', utmMedium);
|
|
4260
|
+
}
|
|
4261
|
+
}
|
|
4262
|
+
|
|
4263
|
+
if (utmCampaign) {
|
|
4264
|
+
u.searchParams.set('uc', utmCampaign);
|
|
4265
|
+
}
|
|
4266
|
+
|
|
4267
|
+
return u.toString();
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
|
|
4271
|
+
utmSource = isHebcal ? utmSource : 'hebcal.com';
|
|
4272
|
+
|
|
4273
|
+
if (utmSource) {
|
|
4274
|
+
u.searchParams.set('utm_source', utmSource);
|
|
4275
|
+
}
|
|
4276
|
+
|
|
4277
|
+
if (utmMedium) {
|
|
4278
|
+
u.searchParams.set('utm_medium', utmMedium);
|
|
4279
|
+
}
|
|
4280
|
+
|
|
4281
|
+
if (utmCampaign) {
|
|
4282
|
+
u.searchParams.set('utm_campaign', utmCampaign);
|
|
1665
4283
|
}
|
|
1666
4284
|
|
|
1667
|
-
|
|
1668
|
-
const utm = "utm_source=".concat(utmSource, "&utm_medium=").concat(utmMedium);
|
|
1669
|
-
const campaign = utmCampaign ? "&utm_campaign=".concat(utmCampaign) : '';
|
|
1670
|
-
return url + sep + utm + campaign;
|
|
4285
|
+
return u.toString();
|
|
1671
4286
|
}
|
|
1672
4287
|
/**
|
|
1673
4288
|
* @private
|
|
@@ -1808,7 +4423,7 @@ function eventsToClassicApi(events, options) {
|
|
|
1808
4423
|
cc: location.getCountryCode(),
|
|
1809
4424
|
country: countryNames[location.getCountryCode()]
|
|
1810
4425
|
};
|
|
1811
|
-
['admin1', 'asciiname', 'geo', 'zip', 'state', 'geonameid'].forEach(k => {
|
|
4426
|
+
['admin1', 'asciiname', 'geo', 'zip', 'state', 'stateName', 'geonameid'].forEach(k => {
|
|
1812
4427
|
if (location[k]) {
|
|
1813
4428
|
result.location[k] = location[k];
|
|
1814
4429
|
}
|