@tryghost/content-api 1.5.13 → 1.5.17
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/LICENSE +1 -1
- package/README.md +1 -1
- package/es/content-api.js +816 -338
- package/es/content-api.js.map +1 -1
- package/package.json +8 -8
- package/umd/content-api.min.js +1 -1
- package/umd/content-api.min.js.map +1 -1
package/es/content-api.js
CHANGED
|
@@ -48,6 +48,18 @@ var descriptors = !fails(function () {
|
|
|
48
48
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
+
var functionBindNative = !fails(function () {
|
|
52
|
+
var test = (function () { /* empty */ }).bind();
|
|
53
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
54
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var call$2 = Function.prototype.call;
|
|
58
|
+
|
|
59
|
+
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
|
|
60
|
+
return call$2.apply(call$2, arguments);
|
|
61
|
+
};
|
|
62
|
+
|
|
51
63
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
52
64
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
53
65
|
var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
|
|
@@ -57,13 +69,13 @@ var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable.call({ 1:
|
|
|
57
69
|
|
|
58
70
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
59
71
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
60
|
-
var f$
|
|
72
|
+
var f$6 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
61
73
|
var descriptor = getOwnPropertyDescriptor$4(this, V);
|
|
62
74
|
return !!descriptor && descriptor.enumerable;
|
|
63
75
|
} : $propertyIsEnumerable;
|
|
64
76
|
|
|
65
77
|
var objectPropertyIsEnumerable = {
|
|
66
|
-
f: f$
|
|
78
|
+
f: f$6
|
|
67
79
|
};
|
|
68
80
|
|
|
69
81
|
var createPropertyDescriptor = function (bitmap, value) {
|
|
@@ -75,27 +87,44 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
75
87
|
};
|
|
76
88
|
};
|
|
77
89
|
|
|
78
|
-
var
|
|
90
|
+
var FunctionPrototype$3 = Function.prototype;
|
|
91
|
+
var bind$3 = FunctionPrototype$3.bind;
|
|
92
|
+
var call$1 = FunctionPrototype$3.call;
|
|
93
|
+
var uncurryThis = functionBindNative && bind$3.bind(call$1, call$1);
|
|
94
|
+
|
|
95
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
96
|
+
return fn && uncurryThis(fn);
|
|
97
|
+
} : function (fn) {
|
|
98
|
+
return fn && function () {
|
|
99
|
+
return call$1.apply(fn, arguments);
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
var toString$2 = functionUncurryThis({}.toString);
|
|
104
|
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
|
79
105
|
|
|
80
106
|
var classofRaw = function (it) {
|
|
81
|
-
return toString$
|
|
107
|
+
return stringSlice$2(toString$2(it), 8, -1);
|
|
82
108
|
};
|
|
83
109
|
|
|
84
|
-
var
|
|
110
|
+
var Object$4 = global_1.Object;
|
|
111
|
+
var split = functionUncurryThis(''.split);
|
|
85
112
|
|
|
86
113
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
87
114
|
var indexedObject = fails(function () {
|
|
88
115
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
89
116
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
90
|
-
return !Object('z').propertyIsEnumerable(0);
|
|
117
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
|
91
118
|
}) ? function (it) {
|
|
92
|
-
return classofRaw(it) == 'String' ? split
|
|
93
|
-
} : Object;
|
|
119
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
|
120
|
+
} : Object$4;
|
|
121
|
+
|
|
122
|
+
var TypeError$f = global_1.TypeError;
|
|
94
123
|
|
|
95
124
|
// `RequireObjectCoercible` abstract operation
|
|
96
125
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
97
126
|
var requireObjectCoercible = function (it) {
|
|
98
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
127
|
+
if (it == undefined) throw TypeError$f("Can't call method on " + it);
|
|
99
128
|
return it;
|
|
100
129
|
};
|
|
101
130
|
|
|
@@ -107,18 +136,26 @@ var toIndexedObject = function (it) {
|
|
|
107
136
|
return indexedObject(requireObjectCoercible(it));
|
|
108
137
|
};
|
|
109
138
|
|
|
139
|
+
// `IsCallable` abstract operation
|
|
140
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
141
|
+
var isCallable = function (argument) {
|
|
142
|
+
return typeof argument == 'function';
|
|
143
|
+
};
|
|
144
|
+
|
|
110
145
|
var isObject$1 = function (it) {
|
|
111
|
-
return typeof it
|
|
146
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
112
147
|
};
|
|
113
148
|
|
|
114
|
-
var aFunction
|
|
115
|
-
return
|
|
149
|
+
var aFunction = function (argument) {
|
|
150
|
+
return isCallable(argument) ? argument : undefined;
|
|
116
151
|
};
|
|
117
152
|
|
|
118
153
|
var getBuiltIn = function (namespace, method) {
|
|
119
|
-
return arguments.length < 2 ? aFunction
|
|
154
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
120
155
|
};
|
|
121
156
|
|
|
157
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
158
|
+
|
|
122
159
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
123
160
|
|
|
124
161
|
var process$4 = global_1.process;
|
|
@@ -129,16 +166,22 @@ var match, version;
|
|
|
129
166
|
|
|
130
167
|
if (v8) {
|
|
131
168
|
match = v8.split('.');
|
|
132
|
-
|
|
133
|
-
|
|
169
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
170
|
+
// but their correct versions are not interesting for us
|
|
171
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
175
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
176
|
+
if (!version && engineUserAgent) {
|
|
134
177
|
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
135
178
|
if (!match || match[1] >= 74) {
|
|
136
179
|
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
137
|
-
if (match) version = match[1];
|
|
180
|
+
if (match) version = +match[1];
|
|
138
181
|
}
|
|
139
182
|
}
|
|
140
183
|
|
|
141
|
-
var engineV8Version = version
|
|
184
|
+
var engineV8Version = version;
|
|
142
185
|
|
|
143
186
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
144
187
|
|
|
@@ -161,27 +204,58 @@ var useSymbolAsUid = nativeSymbol
|
|
|
161
204
|
&& !Symbol.sham
|
|
162
205
|
&& typeof Symbol.iterator == 'symbol';
|
|
163
206
|
|
|
207
|
+
var Object$3 = global_1.Object;
|
|
208
|
+
|
|
164
209
|
var isSymbol = useSymbolAsUid ? function (it) {
|
|
165
210
|
return typeof it == 'symbol';
|
|
166
211
|
} : function (it) {
|
|
167
212
|
var $Symbol = getBuiltIn('Symbol');
|
|
168
|
-
return
|
|
213
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
var String$5 = global_1.String;
|
|
217
|
+
|
|
218
|
+
var tryToString = function (argument) {
|
|
219
|
+
try {
|
|
220
|
+
return String$5(argument);
|
|
221
|
+
} catch (error) {
|
|
222
|
+
return 'Object';
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
var TypeError$e = global_1.TypeError;
|
|
227
|
+
|
|
228
|
+
// `Assert: IsCallable(argument) is true`
|
|
229
|
+
var aCallable = function (argument) {
|
|
230
|
+
if (isCallable(argument)) return argument;
|
|
231
|
+
throw TypeError$e(tryToString(argument) + ' is not a function');
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// `GetMethod` abstract operation
|
|
235
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
236
|
+
var getMethod = function (V, P) {
|
|
237
|
+
var func = V[P];
|
|
238
|
+
return func == null ? undefined : aCallable(func);
|
|
169
239
|
};
|
|
170
240
|
|
|
241
|
+
var TypeError$d = global_1.TypeError;
|
|
242
|
+
|
|
171
243
|
// `OrdinaryToPrimitive` abstract operation
|
|
172
244
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
173
245
|
var ordinaryToPrimitive = function (input, pref) {
|
|
174
246
|
var fn, val;
|
|
175
|
-
if (pref === 'string' &&
|
|
176
|
-
if (
|
|
177
|
-
if (pref !== 'string' &&
|
|
178
|
-
throw TypeError("Can't convert object to primitive value");
|
|
247
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
248
|
+
if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
249
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
250
|
+
throw TypeError$d("Can't convert object to primitive value");
|
|
179
251
|
};
|
|
180
252
|
|
|
253
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
254
|
+
var defineProperty$3 = Object.defineProperty;
|
|
255
|
+
|
|
181
256
|
var setGlobal = function (key, value) {
|
|
182
257
|
try {
|
|
183
|
-
|
|
184
|
-
Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
258
|
+
defineProperty$3(global_1, key, { value: value, configurable: true, writable: true });
|
|
185
259
|
} catch (error) {
|
|
186
260
|
global_1[key] = value;
|
|
187
261
|
} return value;
|
|
@@ -196,58 +270,70 @@ var shared = createCommonjsModule(function (module) {
|
|
|
196
270
|
(module.exports = function (key, value) {
|
|
197
271
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
198
272
|
})('versions', []).push({
|
|
199
|
-
version: '3.
|
|
273
|
+
version: '3.20.3',
|
|
200
274
|
mode: 'global',
|
|
201
|
-
copyright: '©
|
|
275
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
276
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE',
|
|
277
|
+
source: 'https://github.com/zloirock/core-js'
|
|
202
278
|
});
|
|
203
279
|
});
|
|
204
280
|
|
|
281
|
+
var Object$2 = global_1.Object;
|
|
282
|
+
|
|
205
283
|
// `ToObject` abstract operation
|
|
206
284
|
// https://tc39.es/ecma262/#sec-toobject
|
|
207
285
|
var toObject = function (argument) {
|
|
208
|
-
return Object(requireObjectCoercible(argument));
|
|
286
|
+
return Object$2(requireObjectCoercible(argument));
|
|
209
287
|
};
|
|
210
288
|
|
|
211
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
289
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
212
290
|
|
|
213
|
-
|
|
214
|
-
|
|
291
|
+
// `HasOwnProperty` abstract operation
|
|
292
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
293
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
294
|
+
return hasOwnProperty(toObject(it), key);
|
|
215
295
|
};
|
|
216
296
|
|
|
217
297
|
var id = 0;
|
|
218
298
|
var postfix = Math.random();
|
|
299
|
+
var toString$1 = functionUncurryThis(1.0.toString);
|
|
219
300
|
|
|
220
301
|
var uid = function (key) {
|
|
221
|
-
return 'Symbol(' +
|
|
302
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
|
|
222
303
|
};
|
|
223
304
|
|
|
224
305
|
var WellKnownSymbolsStore = shared('wks');
|
|
225
306
|
var Symbol$1 = global_1.Symbol;
|
|
307
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
226
308
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
227
309
|
|
|
228
310
|
var wellKnownSymbol = function (name) {
|
|
229
|
-
if (!
|
|
230
|
-
|
|
311
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
312
|
+
var description = 'Symbol.' + name;
|
|
313
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
231
314
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
315
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
316
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
232
317
|
} else {
|
|
233
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(
|
|
318
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
234
319
|
}
|
|
235
320
|
} return WellKnownSymbolsStore[name];
|
|
236
321
|
};
|
|
237
322
|
|
|
323
|
+
var TypeError$c = global_1.TypeError;
|
|
238
324
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
239
325
|
|
|
240
326
|
// `ToPrimitive` abstract operation
|
|
241
327
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
242
328
|
var toPrimitive = function (input, pref) {
|
|
243
329
|
if (!isObject$1(input) || isSymbol(input)) return input;
|
|
244
|
-
var exoticToPrim = input
|
|
330
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
245
331
|
var result;
|
|
246
|
-
if (exoticToPrim
|
|
332
|
+
if (exoticToPrim) {
|
|
247
333
|
if (pref === undefined) pref = 'default';
|
|
248
|
-
result = exoticToPrim
|
|
334
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
249
335
|
if (!isObject$1(result) || isSymbol(result)) return result;
|
|
250
|
-
throw TypeError("Can't convert object to primitive value");
|
|
336
|
+
throw TypeError$c("Can't convert object to primitive value");
|
|
251
337
|
}
|
|
252
338
|
if (pref === undefined) pref = 'number';
|
|
253
339
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -257,68 +343,102 @@ var toPrimitive = function (input, pref) {
|
|
|
257
343
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
258
344
|
var toPropertyKey = function (argument) {
|
|
259
345
|
var key = toPrimitive(argument, 'string');
|
|
260
|
-
return isSymbol(key) ? key :
|
|
346
|
+
return isSymbol(key) ? key : key + '';
|
|
261
347
|
};
|
|
262
348
|
|
|
263
349
|
var document$3 = global_1.document;
|
|
264
350
|
// typeof document.createElement is 'object' in old IE
|
|
265
|
-
var EXISTS = isObject$1(document$3) && isObject$1(document$3.createElement);
|
|
351
|
+
var EXISTS$1 = isObject$1(document$3) && isObject$1(document$3.createElement);
|
|
266
352
|
|
|
267
353
|
var documentCreateElement = function (it) {
|
|
268
|
-
return EXISTS ? document$3.createElement(it) : {};
|
|
354
|
+
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
269
355
|
};
|
|
270
356
|
|
|
271
|
-
//
|
|
357
|
+
// Thanks to IE8 for its funny defineProperty
|
|
272
358
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
273
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
|
359
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
274
360
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
275
361
|
get: function () { return 7; }
|
|
276
362
|
}).a != 7;
|
|
277
363
|
});
|
|
278
364
|
|
|
279
365
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
280
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
366
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
281
367
|
|
|
282
368
|
// `Object.getOwnPropertyDescriptor` method
|
|
283
369
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
284
|
-
var f$
|
|
370
|
+
var f$5 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
285
371
|
O = toIndexedObject(O);
|
|
286
372
|
P = toPropertyKey(P);
|
|
287
373
|
if (ie8DomDefine) try {
|
|
288
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
374
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
289
375
|
} catch (error) { /* empty */ }
|
|
290
|
-
if (
|
|
376
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
291
377
|
};
|
|
292
378
|
|
|
293
379
|
var objectGetOwnPropertyDescriptor = {
|
|
294
|
-
f: f$
|
|
380
|
+
f: f$5
|
|
295
381
|
};
|
|
296
382
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
383
|
+
// V8 ~ Chrome 36-
|
|
384
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
385
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
386
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
387
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
388
|
+
value: 42,
|
|
389
|
+
writable: false
|
|
390
|
+
}).prototype != 42;
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
var String$4 = global_1.String;
|
|
394
|
+
var TypeError$b = global_1.TypeError;
|
|
395
|
+
|
|
396
|
+
// `Assert: Type(argument) is Object`
|
|
397
|
+
var anObject = function (argument) {
|
|
398
|
+
if (isObject$1(argument)) return argument;
|
|
399
|
+
throw TypeError$b(String$4(argument) + ' is not an object');
|
|
301
400
|
};
|
|
302
401
|
|
|
402
|
+
var TypeError$a = global_1.TypeError;
|
|
303
403
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
304
404
|
var $defineProperty = Object.defineProperty;
|
|
405
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
406
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
407
|
+
var ENUMERABLE = 'enumerable';
|
|
408
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
409
|
+
var WRITABLE = 'writable';
|
|
305
410
|
|
|
306
411
|
// `Object.defineProperty` method
|
|
307
412
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
308
|
-
var f$
|
|
413
|
+
var f$4 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
414
|
+
anObject(O);
|
|
415
|
+
P = toPropertyKey(P);
|
|
416
|
+
anObject(Attributes);
|
|
417
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
418
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
419
|
+
if (current && current[WRITABLE]) {
|
|
420
|
+
O[P] = Attributes.value;
|
|
421
|
+
Attributes = {
|
|
422
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
423
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
424
|
+
writable: false
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
} return $defineProperty(O, P, Attributes);
|
|
428
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
309
429
|
anObject(O);
|
|
310
430
|
P = toPropertyKey(P);
|
|
311
431
|
anObject(Attributes);
|
|
312
432
|
if (ie8DomDefine) try {
|
|
313
433
|
return $defineProperty(O, P, Attributes);
|
|
314
434
|
} catch (error) { /* empty */ }
|
|
315
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
435
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$a('Accessors not supported');
|
|
316
436
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
317
437
|
return O;
|
|
318
438
|
};
|
|
319
439
|
|
|
320
440
|
var objectDefineProperty = {
|
|
321
|
-
f: f$
|
|
441
|
+
f: f$4
|
|
322
442
|
};
|
|
323
443
|
|
|
324
444
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
@@ -328,12 +448,12 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
328
448
|
return object;
|
|
329
449
|
};
|
|
330
450
|
|
|
331
|
-
var functionToString = Function.toString;
|
|
451
|
+
var functionToString$1 = functionUncurryThis(Function.toString);
|
|
332
452
|
|
|
333
453
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
334
|
-
if (
|
|
454
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
335
455
|
sharedStore.inspectSource = function (it) {
|
|
336
|
-
return functionToString
|
|
456
|
+
return functionToString$1(it);
|
|
337
457
|
};
|
|
338
458
|
}
|
|
339
459
|
|
|
@@ -341,7 +461,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
341
461
|
|
|
342
462
|
var WeakMap$1 = global_1.WeakMap;
|
|
343
463
|
|
|
344
|
-
var nativeWeakMap =
|
|
464
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
|
345
465
|
|
|
346
466
|
var keys = shared('keys');
|
|
347
467
|
|
|
@@ -352,6 +472,7 @@ var sharedKey = function (key) {
|
|
|
352
472
|
var hiddenKeys$1 = {};
|
|
353
473
|
|
|
354
474
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
475
|
+
var TypeError$9 = global_1.TypeError;
|
|
355
476
|
var WeakMap = global_1.WeakMap;
|
|
356
477
|
var set$1, get, has;
|
|
357
478
|
|
|
@@ -363,42 +484,42 @@ var getterFor = function (TYPE) {
|
|
|
363
484
|
return function (it) {
|
|
364
485
|
var state;
|
|
365
486
|
if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
|
|
366
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
487
|
+
throw TypeError$9('Incompatible receiver, ' + TYPE + ' required');
|
|
367
488
|
} return state;
|
|
368
489
|
};
|
|
369
490
|
};
|
|
370
491
|
|
|
371
492
|
if (nativeWeakMap || sharedStore.state) {
|
|
372
493
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
373
|
-
var wmget = store.get;
|
|
374
|
-
var wmhas = store.has;
|
|
375
|
-
var wmset = store.set;
|
|
494
|
+
var wmget = functionUncurryThis(store.get);
|
|
495
|
+
var wmhas = functionUncurryThis(store.has);
|
|
496
|
+
var wmset = functionUncurryThis(store.set);
|
|
376
497
|
set$1 = function (it, metadata) {
|
|
377
|
-
if (wmhas
|
|
498
|
+
if (wmhas(store, it)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
|
|
378
499
|
metadata.facade = it;
|
|
379
|
-
wmset
|
|
500
|
+
wmset(store, it, metadata);
|
|
380
501
|
return metadata;
|
|
381
502
|
};
|
|
382
503
|
get = function (it) {
|
|
383
|
-
return wmget
|
|
504
|
+
return wmget(store, it) || {};
|
|
384
505
|
};
|
|
385
506
|
has = function (it) {
|
|
386
|
-
return wmhas
|
|
507
|
+
return wmhas(store, it);
|
|
387
508
|
};
|
|
388
509
|
} else {
|
|
389
510
|
var STATE = sharedKey('state');
|
|
390
511
|
hiddenKeys$1[STATE] = true;
|
|
391
512
|
set$1 = function (it, metadata) {
|
|
392
|
-
if (
|
|
513
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
|
|
393
514
|
metadata.facade = it;
|
|
394
515
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
395
516
|
return metadata;
|
|
396
517
|
};
|
|
397
518
|
get = function (it) {
|
|
398
|
-
return
|
|
519
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
399
520
|
};
|
|
400
521
|
has = function (it) {
|
|
401
|
-
return
|
|
522
|
+
return hasOwnProperty_1(it, STATE);
|
|
402
523
|
};
|
|
403
524
|
}
|
|
404
525
|
|
|
@@ -410,7 +531,24 @@ var internalState = {
|
|
|
410
531
|
getterFor: getterFor
|
|
411
532
|
};
|
|
412
533
|
|
|
534
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
535
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
536
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
537
|
+
|
|
538
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$2, 'name');
|
|
539
|
+
// additional protection from minified / mangled / dropped function names
|
|
540
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
541
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$2, 'name').configurable));
|
|
542
|
+
|
|
543
|
+
var functionName = {
|
|
544
|
+
EXISTS: EXISTS,
|
|
545
|
+
PROPER: PROPER,
|
|
546
|
+
CONFIGURABLE: CONFIGURABLE
|
|
547
|
+
};
|
|
548
|
+
|
|
413
549
|
var redefine = createCommonjsModule(function (module) {
|
|
550
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
551
|
+
|
|
414
552
|
var getInternalState = internalState.get;
|
|
415
553
|
var enforceInternalState = internalState.enforce;
|
|
416
554
|
var TEMPLATE = String(String).split('String');
|
|
@@ -419,14 +557,18 @@ var TEMPLATE = String(String).split('String');
|
|
|
419
557
|
var unsafe = options ? !!options.unsafe : false;
|
|
420
558
|
var simple = options ? !!options.enumerable : false;
|
|
421
559
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
560
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
422
561
|
var state;
|
|
423
|
-
if (
|
|
424
|
-
if (
|
|
425
|
-
|
|
562
|
+
if (isCallable(value)) {
|
|
563
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
564
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
565
|
+
}
|
|
566
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
567
|
+
createNonEnumerableProperty(value, 'name', name);
|
|
426
568
|
}
|
|
427
569
|
state = enforceInternalState(value);
|
|
428
570
|
if (!state.source) {
|
|
429
|
-
state.source = TEMPLATE.join(typeof
|
|
571
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
430
572
|
}
|
|
431
573
|
}
|
|
432
574
|
if (O === global_1) {
|
|
@@ -442,43 +584,51 @@ var TEMPLATE = String(String).split('String');
|
|
|
442
584
|
else createNonEnumerableProperty(O, key, value);
|
|
443
585
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
444
586
|
})(Function.prototype, 'toString', function toString() {
|
|
445
|
-
return
|
|
587
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
446
588
|
});
|
|
447
589
|
});
|
|
448
590
|
|
|
449
591
|
var ceil = Math.ceil;
|
|
450
592
|
var floor = Math.floor;
|
|
451
593
|
|
|
452
|
-
// `
|
|
453
|
-
// https://tc39.es/ecma262/#sec-
|
|
454
|
-
var
|
|
455
|
-
|
|
594
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
595
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
596
|
+
var toIntegerOrInfinity = function (argument) {
|
|
597
|
+
var number = +argument;
|
|
598
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
599
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
456
600
|
};
|
|
457
601
|
|
|
602
|
+
var max = Math.max;
|
|
458
603
|
var min$3 = Math.min;
|
|
459
604
|
|
|
605
|
+
// Helper for a popular repeating case of the spec:
|
|
606
|
+
// Let integer be ? ToInteger(index).
|
|
607
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
608
|
+
var toAbsoluteIndex = function (index, length) {
|
|
609
|
+
var integer = toIntegerOrInfinity(index);
|
|
610
|
+
return integer < 0 ? max(integer + length, 0) : min$3(integer, length);
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
var min$2 = Math.min;
|
|
614
|
+
|
|
460
615
|
// `ToLength` abstract operation
|
|
461
616
|
// https://tc39.es/ecma262/#sec-tolength
|
|
462
617
|
var toLength = function (argument) {
|
|
463
|
-
return argument > 0 ? min$
|
|
618
|
+
return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
464
619
|
};
|
|
465
620
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
// Let integer be ? ToInteger(index).
|
|
471
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
472
|
-
var toAbsoluteIndex = function (index, length) {
|
|
473
|
-
var integer = toInteger(index);
|
|
474
|
-
return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
|
|
621
|
+
// `LengthOfArrayLike` abstract operation
|
|
622
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
623
|
+
var lengthOfArrayLike = function (obj) {
|
|
624
|
+
return toLength(obj.length);
|
|
475
625
|
};
|
|
476
626
|
|
|
477
627
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
478
628
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
479
629
|
return function ($this, el, fromIndex) {
|
|
480
630
|
var O = toIndexedObject($this);
|
|
481
|
-
var length =
|
|
631
|
+
var length = lengthOfArrayLike(O);
|
|
482
632
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
483
633
|
var value;
|
|
484
634
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -503,18 +653,20 @@ var arrayIncludes = {
|
|
|
503
653
|
indexOf: createMethod$1(false)
|
|
504
654
|
};
|
|
505
655
|
|
|
506
|
-
var indexOf = arrayIncludes.indexOf;
|
|
656
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
|
657
|
+
|
|
507
658
|
|
|
659
|
+
var push$1 = functionUncurryThis([].push);
|
|
508
660
|
|
|
509
661
|
var objectKeysInternal = function (object, names) {
|
|
510
662
|
var O = toIndexedObject(object);
|
|
511
663
|
var i = 0;
|
|
512
664
|
var result = [];
|
|
513
665
|
var key;
|
|
514
|
-
for (key in O) !
|
|
666
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
|
|
515
667
|
// Don't enum bug & hidden keys
|
|
516
|
-
while (names.length > i) if (
|
|
517
|
-
~indexOf(result, key) ||
|
|
668
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
669
|
+
~indexOf$1(result, key) || push$1(result, key);
|
|
518
670
|
}
|
|
519
671
|
return result;
|
|
520
672
|
};
|
|
@@ -535,35 +687,39 @@ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
|
535
687
|
// `Object.getOwnPropertyNames` method
|
|
536
688
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
537
689
|
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
538
|
-
var f$
|
|
690
|
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
539
691
|
return objectKeysInternal(O, hiddenKeys);
|
|
540
692
|
};
|
|
541
693
|
|
|
542
694
|
var objectGetOwnPropertyNames = {
|
|
543
|
-
f: f$
|
|
695
|
+
f: f$3
|
|
544
696
|
};
|
|
545
697
|
|
|
546
698
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
547
|
-
var f$
|
|
699
|
+
var f$2 = Object.getOwnPropertySymbols;
|
|
548
700
|
|
|
549
701
|
var objectGetOwnPropertySymbols = {
|
|
550
|
-
f: f$
|
|
702
|
+
f: f$2
|
|
551
703
|
};
|
|
552
704
|
|
|
705
|
+
var concat$1 = functionUncurryThis([].concat);
|
|
706
|
+
|
|
553
707
|
// all object keys, includes non-enumerable and symbols
|
|
554
708
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
555
709
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
556
710
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
557
|
-
return getOwnPropertySymbols ?
|
|
711
|
+
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
558
712
|
};
|
|
559
713
|
|
|
560
|
-
var copyConstructorProperties = function (target, source) {
|
|
714
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
561
715
|
var keys = ownKeys(source);
|
|
562
716
|
var defineProperty = objectDefineProperty.f;
|
|
563
717
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
564
718
|
for (var i = 0; i < keys.length; i++) {
|
|
565
719
|
var key = keys[i];
|
|
566
|
-
if (!
|
|
720
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
721
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
722
|
+
}
|
|
567
723
|
}
|
|
568
724
|
};
|
|
569
725
|
|
|
@@ -573,7 +729,7 @@ var isForced = function (feature, detection) {
|
|
|
573
729
|
var value = data[normalize(feature)];
|
|
574
730
|
return value == POLYFILL ? true
|
|
575
731
|
: value == NATIVE ? false
|
|
576
|
-
:
|
|
732
|
+
: isCallable(detection) ? fails(detection)
|
|
577
733
|
: !!detection;
|
|
578
734
|
};
|
|
579
735
|
|
|
@@ -607,6 +763,7 @@ var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
|
|
607
763
|
options.sham - add a flag to not completely full polyfills
|
|
608
764
|
options.enumerable - export as enumerable property
|
|
609
765
|
options.noTargetGet - prevent calling a getter on target
|
|
766
|
+
options.name - the .name of the function if it does not match the key
|
|
610
767
|
*/
|
|
611
768
|
var _export = function (options, source) {
|
|
612
769
|
var TARGET = options.target;
|
|
@@ -629,7 +786,7 @@ var _export = function (options, source) {
|
|
|
629
786
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
630
787
|
// contained in target
|
|
631
788
|
if (!FORCED && targetProperty !== undefined) {
|
|
632
|
-
if (typeof sourceProperty
|
|
789
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
633
790
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
634
791
|
}
|
|
635
792
|
// add a flag to not completely full polyfills
|
|
@@ -649,7 +806,7 @@ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
|
649
806
|
});
|
|
650
807
|
};
|
|
651
808
|
|
|
652
|
-
var
|
|
809
|
+
var un$Join = functionUncurryThis([].join);
|
|
653
810
|
|
|
654
811
|
var ES3_STRINGS = indexedObject != Object;
|
|
655
812
|
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
@@ -658,7 +815,7 @@ var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
|
658
815
|
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
659
816
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
660
817
|
join: function join(separator) {
|
|
661
|
-
return
|
|
818
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
662
819
|
}
|
|
663
820
|
});
|
|
664
821
|
|
|
@@ -672,16 +829,21 @@ var objectKeys = Object.keys || function keys(O) {
|
|
|
672
829
|
// `Object.defineProperties` method
|
|
673
830
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
674
831
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
675
|
-
var
|
|
832
|
+
var f$1 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
676
833
|
anObject(O);
|
|
834
|
+
var props = toIndexedObject(Properties);
|
|
677
835
|
var keys = objectKeys(Properties);
|
|
678
836
|
var length = keys.length;
|
|
679
837
|
var index = 0;
|
|
680
838
|
var key;
|
|
681
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
|
839
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
682
840
|
return O;
|
|
683
841
|
};
|
|
684
842
|
|
|
843
|
+
var objectDefineProperties = {
|
|
844
|
+
f: f$1
|
|
845
|
+
};
|
|
846
|
+
|
|
685
847
|
var html = getBuiltIn('document', 'documentElement');
|
|
686
848
|
|
|
687
849
|
/* global ActiveXObject -- old IE, WSH */
|
|
@@ -720,17 +882,15 @@ var NullProtoObjectViaIFrame = function () {
|
|
|
720
882
|
var iframe = documentCreateElement('iframe');
|
|
721
883
|
var JS = 'java' + SCRIPT + ':';
|
|
722
884
|
var iframeDocument;
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
return iframeDocument.F;
|
|
733
|
-
}
|
|
885
|
+
iframe.style.display = 'none';
|
|
886
|
+
html.appendChild(iframe);
|
|
887
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
888
|
+
iframe.src = String(JS);
|
|
889
|
+
iframeDocument = iframe.contentWindow.document;
|
|
890
|
+
iframeDocument.open();
|
|
891
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
892
|
+
iframeDocument.close();
|
|
893
|
+
return iframeDocument.F;
|
|
734
894
|
};
|
|
735
895
|
|
|
736
896
|
// Check for document.domain and active x support
|
|
@@ -743,10 +903,11 @@ var NullProtoObject = function () {
|
|
|
743
903
|
try {
|
|
744
904
|
activeXDocument = new ActiveXObject('htmlfile');
|
|
745
905
|
} catch (error) { /* ignore */ }
|
|
746
|
-
NullProtoObject = document
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
906
|
+
NullProtoObject = typeof document != 'undefined'
|
|
907
|
+
? document.domain && activeXDocument
|
|
908
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
909
|
+
: NullProtoObjectViaIFrame()
|
|
910
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
750
911
|
var length = enumBugKeys.length;
|
|
751
912
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
752
913
|
return NullProtoObject();
|
|
@@ -765,7 +926,7 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
765
926
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
766
927
|
result[IE_PROTO] = O;
|
|
767
928
|
} else result = NullProtoObject();
|
|
768
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
929
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
769
930
|
};
|
|
770
931
|
|
|
771
932
|
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
@@ -799,11 +960,227 @@ _export({ target: 'Array', proto: true }, {
|
|
|
799
960
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
800
961
|
addToUnscopables('includes');
|
|
801
962
|
|
|
963
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
964
|
+
var test = {};
|
|
965
|
+
|
|
966
|
+
test[TO_STRING_TAG$2] = 'z';
|
|
967
|
+
|
|
968
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
969
|
+
|
|
970
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
971
|
+
var Object$1 = global_1.Object;
|
|
972
|
+
|
|
973
|
+
// ES3 wrong here
|
|
974
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
975
|
+
|
|
976
|
+
// fallback for IE11 Script Access Denied error
|
|
977
|
+
var tryGet = function (it, key) {
|
|
978
|
+
try {
|
|
979
|
+
return it[key];
|
|
980
|
+
} catch (error) { /* empty */ }
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
984
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
985
|
+
var O, tag, result;
|
|
986
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
987
|
+
// @@toStringTag case
|
|
988
|
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
989
|
+
// builtinTag case
|
|
990
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
991
|
+
// ES3 arguments fallback
|
|
992
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
var String$3 = global_1.String;
|
|
996
|
+
|
|
802
997
|
var toString_1 = function (argument) {
|
|
803
|
-
if (
|
|
804
|
-
return String(argument);
|
|
998
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
999
|
+
return String$3(argument);
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
// `RegExp.prototype.flags` getter implementation
|
|
1003
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1004
|
+
var regexpFlags = function () {
|
|
1005
|
+
var that = anObject(this);
|
|
1006
|
+
var result = '';
|
|
1007
|
+
if (that.global) result += 'g';
|
|
1008
|
+
if (that.ignoreCase) result += 'i';
|
|
1009
|
+
if (that.multiline) result += 'm';
|
|
1010
|
+
if (that.dotAll) result += 's';
|
|
1011
|
+
if (that.unicode) result += 'u';
|
|
1012
|
+
if (that.sticky) result += 'y';
|
|
1013
|
+
return result;
|
|
805
1014
|
};
|
|
806
1015
|
|
|
1016
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1017
|
+
var $RegExp$2 = global_1.RegExp;
|
|
1018
|
+
|
|
1019
|
+
var UNSUPPORTED_Y$1 = fails(function () {
|
|
1020
|
+
var re = $RegExp$2('a', 'y');
|
|
1021
|
+
re.lastIndex = 2;
|
|
1022
|
+
return re.exec('abcd') != null;
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
// UC Browser bug
|
|
1026
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
1027
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
|
|
1028
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
1029
|
+
});
|
|
1030
|
+
|
|
1031
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
|
|
1032
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1033
|
+
var re = $RegExp$2('^r', 'gy');
|
|
1034
|
+
re.lastIndex = 2;
|
|
1035
|
+
return re.exec('str') != null;
|
|
1036
|
+
});
|
|
1037
|
+
|
|
1038
|
+
var regexpStickyHelpers = {
|
|
1039
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
1040
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
1041
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
1042
|
+
};
|
|
1043
|
+
|
|
1044
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1045
|
+
var $RegExp$1 = global_1.RegExp;
|
|
1046
|
+
|
|
1047
|
+
var regexpUnsupportedDotAll = fails(function () {
|
|
1048
|
+
var re = $RegExp$1('.', 's');
|
|
1049
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1052
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1053
|
+
var $RegExp = global_1.RegExp;
|
|
1054
|
+
|
|
1055
|
+
var regexpUnsupportedNcg = fails(function () {
|
|
1056
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
1057
|
+
return re.exec('b').groups.a !== 'b' ||
|
|
1058
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
|
1059
|
+
});
|
|
1060
|
+
|
|
1061
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1062
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
var getInternalState$1 = internalState.get;
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1075
|
+
var nativeExec = RegExp.prototype.exec;
|
|
1076
|
+
var patchedExec = nativeExec;
|
|
1077
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
1078
|
+
var indexOf = functionUncurryThis(''.indexOf);
|
|
1079
|
+
var replace = functionUncurryThis(''.replace);
|
|
1080
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
|
1081
|
+
|
|
1082
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1083
|
+
var re1 = /a/;
|
|
1084
|
+
var re2 = /b*/g;
|
|
1085
|
+
functionCall(nativeExec, re1, 'a');
|
|
1086
|
+
functionCall(nativeExec, re2, 'a');
|
|
1087
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1088
|
+
})();
|
|
1089
|
+
|
|
1090
|
+
var UNSUPPORTED_Y = regexpStickyHelpers.BROKEN_CARET;
|
|
1091
|
+
|
|
1092
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
1093
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
1094
|
+
|
|
1095
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexpUnsupportedDotAll || regexpUnsupportedNcg;
|
|
1096
|
+
|
|
1097
|
+
if (PATCH) {
|
|
1098
|
+
patchedExec = function exec(string) {
|
|
1099
|
+
var re = this;
|
|
1100
|
+
var state = getInternalState$1(re);
|
|
1101
|
+
var str = toString_1(string);
|
|
1102
|
+
var raw = state.raw;
|
|
1103
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
|
1104
|
+
|
|
1105
|
+
if (raw) {
|
|
1106
|
+
raw.lastIndex = re.lastIndex;
|
|
1107
|
+
result = functionCall(patchedExec, raw, str);
|
|
1108
|
+
re.lastIndex = raw.lastIndex;
|
|
1109
|
+
return result;
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
var groups = state.groups;
|
|
1113
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
1114
|
+
var flags = functionCall(regexpFlags, re);
|
|
1115
|
+
var source = re.source;
|
|
1116
|
+
var charsAdded = 0;
|
|
1117
|
+
var strCopy = str;
|
|
1118
|
+
|
|
1119
|
+
if (sticky) {
|
|
1120
|
+
flags = replace(flags, 'y', '');
|
|
1121
|
+
if (indexOf(flags, 'g') === -1) {
|
|
1122
|
+
flags += 'g';
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
strCopy = stringSlice$1(str, re.lastIndex);
|
|
1126
|
+
// Support anchored sticky behavior.
|
|
1127
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
|
|
1128
|
+
source = '(?: ' + source + ')';
|
|
1129
|
+
strCopy = ' ' + strCopy;
|
|
1130
|
+
charsAdded++;
|
|
1131
|
+
}
|
|
1132
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
1133
|
+
// simulate the 'y' flag.
|
|
1134
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
if (NPCG_INCLUDED) {
|
|
1138
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
1139
|
+
}
|
|
1140
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1141
|
+
|
|
1142
|
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1143
|
+
|
|
1144
|
+
if (sticky) {
|
|
1145
|
+
if (match) {
|
|
1146
|
+
match.input = stringSlice$1(match.input, charsAdded);
|
|
1147
|
+
match[0] = stringSlice$1(match[0], charsAdded);
|
|
1148
|
+
match.index = re.lastIndex;
|
|
1149
|
+
re.lastIndex += match[0].length;
|
|
1150
|
+
} else re.lastIndex = 0;
|
|
1151
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
1152
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
1153
|
+
}
|
|
1154
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1155
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1156
|
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1157
|
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
|
1158
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
1159
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
1160
|
+
}
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
if (match && groups) {
|
|
1165
|
+
match.groups = object = objectCreate(null);
|
|
1166
|
+
for (i = 0; i < groups.length; i++) {
|
|
1167
|
+
group = groups[i];
|
|
1168
|
+
object[group[0]] = match[group[1]];
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
return match;
|
|
1173
|
+
};
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
var regexpExec = patchedExec;
|
|
1177
|
+
|
|
1178
|
+
// `RegExp.prototype.exec` method
|
|
1179
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1180
|
+
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
1181
|
+
exec: regexpExec
|
|
1182
|
+
});
|
|
1183
|
+
|
|
807
1184
|
var MATCH$1 = wellKnownSymbol('match');
|
|
808
1185
|
|
|
809
1186
|
// `IsRegExp` abstract operation
|
|
@@ -813,9 +1190,11 @@ var isRegexp = function (it) {
|
|
|
813
1190
|
return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
814
1191
|
};
|
|
815
1192
|
|
|
1193
|
+
var TypeError$8 = global_1.TypeError;
|
|
1194
|
+
|
|
816
1195
|
var notARegexp = function (it) {
|
|
817
1196
|
if (isRegexp(it)) {
|
|
818
|
-
throw TypeError("The method doesn't accept regular expressions");
|
|
1197
|
+
throw TypeError$8("The method doesn't accept regular expressions");
|
|
819
1198
|
} return it;
|
|
820
1199
|
};
|
|
821
1200
|
|
|
@@ -842,7 +1221,8 @@ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
|
842
1221
|
|
|
843
1222
|
|
|
844
1223
|
// eslint-disable-next-line es/no-string-prototype-endswith -- safe
|
|
845
|
-
var $
|
|
1224
|
+
var un$EndsWith = functionUncurryThis(''.endsWith);
|
|
1225
|
+
var slice = functionUncurryThis(''.slice);
|
|
846
1226
|
var min$1 = Math.min;
|
|
847
1227
|
|
|
848
1228
|
var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('endsWith');
|
|
@@ -859,12 +1239,12 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT
|
|
|
859
1239
|
var that = toString_1(requireObjectCoercible(this));
|
|
860
1240
|
notARegexp(searchString);
|
|
861
1241
|
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
862
|
-
var len =
|
|
1242
|
+
var len = that.length;
|
|
863
1243
|
var end = endPosition === undefined ? len : min$1(toLength(endPosition), len);
|
|
864
1244
|
var search = toString_1(searchString);
|
|
865
|
-
return $
|
|
866
|
-
? $
|
|
867
|
-
:
|
|
1245
|
+
return un$EndsWith
|
|
1246
|
+
? un$EndsWith(that, search, end)
|
|
1247
|
+
: slice(that, end - search.length, end) === search;
|
|
868
1248
|
}
|
|
869
1249
|
});
|
|
870
1250
|
|
|
@@ -877,7 +1257,8 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
|
877
1257
|
|
|
878
1258
|
|
|
879
1259
|
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
880
|
-
var $
|
|
1260
|
+
var un$StartsWith = functionUncurryThis(''.startsWith);
|
|
1261
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
881
1262
|
var min = Math.min;
|
|
882
1263
|
|
|
883
1264
|
var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith');
|
|
@@ -895,42 +1276,12 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
|
|
|
895
1276
|
notARegexp(searchString);
|
|
896
1277
|
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
897
1278
|
var search = toString_1(searchString);
|
|
898
|
-
return $
|
|
899
|
-
? $
|
|
900
|
-
: that
|
|
1279
|
+
return un$StartsWith
|
|
1280
|
+
? un$StartsWith(that, search, index)
|
|
1281
|
+
: stringSlice(that, index, index + search.length) === search;
|
|
901
1282
|
}
|
|
902
1283
|
});
|
|
903
1284
|
|
|
904
|
-
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
905
|
-
var test = {};
|
|
906
|
-
|
|
907
|
-
test[TO_STRING_TAG$2] = 'z';
|
|
908
|
-
|
|
909
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
910
|
-
|
|
911
|
-
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
912
|
-
// ES3 wrong here
|
|
913
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
914
|
-
|
|
915
|
-
// fallback for IE11 Script Access Denied error
|
|
916
|
-
var tryGet = function (it, key) {
|
|
917
|
-
try {
|
|
918
|
-
return it[key];
|
|
919
|
-
} catch (error) { /* empty */ }
|
|
920
|
-
};
|
|
921
|
-
|
|
922
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
923
|
-
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
924
|
-
var O, tag, result;
|
|
925
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
926
|
-
// @@toStringTag case
|
|
927
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
928
|
-
// builtinTag case
|
|
929
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
930
|
-
// ES3 arguments fallback
|
|
931
|
-
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
|
|
932
|
-
};
|
|
933
|
-
|
|
934
1285
|
// `Object.prototype.toString` method implementation
|
|
935
1286
|
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
936
1287
|
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
@@ -950,16 +1301,19 @@ var redefineAll = function (target, src, options) {
|
|
|
950
1301
|
return target;
|
|
951
1302
|
};
|
|
952
1303
|
|
|
953
|
-
var
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
1304
|
+
var String$2 = global_1.String;
|
|
1305
|
+
var TypeError$7 = global_1.TypeError;
|
|
1306
|
+
|
|
1307
|
+
var aPossiblePrototype = function (argument) {
|
|
1308
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1309
|
+
throw TypeError$7("Can't set " + String$2(argument) + ' as a prototype');
|
|
957
1310
|
};
|
|
958
1311
|
|
|
959
1312
|
/* eslint-disable no-proto -- safe */
|
|
960
1313
|
|
|
961
1314
|
|
|
962
1315
|
|
|
1316
|
+
|
|
963
1317
|
// `Object.setPrototypeOf` method
|
|
964
1318
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
965
1319
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
@@ -970,14 +1324,14 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
970
1324
|
var setter;
|
|
971
1325
|
try {
|
|
972
1326
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
973
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
|
974
|
-
setter
|
|
1327
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1328
|
+
setter(test, []);
|
|
975
1329
|
CORRECT_SETTER = test instanceof Array;
|
|
976
1330
|
} catch (error) { /* empty */ }
|
|
977
1331
|
return function setPrototypeOf(O, proto) {
|
|
978
1332
|
anObject(O);
|
|
979
1333
|
aPossiblePrototype(proto);
|
|
980
|
-
if (CORRECT_SETTER) setter
|
|
1334
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
981
1335
|
else O.__proto__ = proto;
|
|
982
1336
|
return O;
|
|
983
1337
|
};
|
|
@@ -989,9 +1343,10 @@ var defineProperty$2 = objectDefineProperty.f;
|
|
|
989
1343
|
|
|
990
1344
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
991
1345
|
|
|
992
|
-
var setToStringTag = function (
|
|
993
|
-
if (
|
|
994
|
-
|
|
1346
|
+
var setToStringTag = function (target, TAG, STATIC) {
|
|
1347
|
+
if (target && !STATIC) target = target.prototype;
|
|
1348
|
+
if (target && !hasOwnProperty_1(target, TO_STRING_TAG)) {
|
|
1349
|
+
defineProperty$2(target, TO_STRING_TAG, { configurable: true, value: TAG });
|
|
995
1350
|
}
|
|
996
1351
|
};
|
|
997
1352
|
|
|
@@ -1009,16 +1364,21 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
|
|
|
1009
1364
|
}
|
|
1010
1365
|
};
|
|
1011
1366
|
|
|
1012
|
-
var
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1367
|
+
var TypeError$6 = global_1.TypeError;
|
|
1368
|
+
|
|
1369
|
+
var anInstance = function (it, Prototype) {
|
|
1370
|
+
if (objectIsPrototypeOf(Prototype, it)) return it;
|
|
1371
|
+
throw TypeError$6('Incorrect invocation');
|
|
1016
1372
|
};
|
|
1017
1373
|
|
|
1018
|
-
var
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1374
|
+
var bind$2 = functionUncurryThis(functionUncurryThis.bind);
|
|
1375
|
+
|
|
1376
|
+
// optional / simple context binding
|
|
1377
|
+
var functionBindContext = function (fn, that) {
|
|
1378
|
+
aCallable(fn);
|
|
1379
|
+
return that === undefined ? fn : functionBindNative ? bind$2(fn, that) : function (/* ...args */) {
|
|
1380
|
+
return fn.apply(that, arguments);
|
|
1381
|
+
};
|
|
1022
1382
|
};
|
|
1023
1383
|
|
|
1024
1384
|
var iterators = {};
|
|
@@ -1031,59 +1391,61 @@ var isArrayIteratorMethod = function (it) {
|
|
|
1031
1391
|
return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1032
1392
|
};
|
|
1033
1393
|
|
|
1034
|
-
// optional / simple context binding
|
|
1035
|
-
var functionBindContext = function (fn, that, length) {
|
|
1036
|
-
aFunction(fn);
|
|
1037
|
-
if (that === undefined) return fn;
|
|
1038
|
-
switch (length) {
|
|
1039
|
-
case 0: return function () {
|
|
1040
|
-
return fn.call(that);
|
|
1041
|
-
};
|
|
1042
|
-
case 1: return function (a) {
|
|
1043
|
-
return fn.call(that, a);
|
|
1044
|
-
};
|
|
1045
|
-
case 2: return function (a, b) {
|
|
1046
|
-
return fn.call(that, a, b);
|
|
1047
|
-
};
|
|
1048
|
-
case 3: return function (a, b, c) {
|
|
1049
|
-
return fn.call(that, a, b, c);
|
|
1050
|
-
};
|
|
1051
|
-
}
|
|
1052
|
-
return function (/* ...args */) {
|
|
1053
|
-
return fn.apply(that, arguments);
|
|
1054
|
-
};
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
1394
|
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
1058
1395
|
|
|
1059
1396
|
var getIteratorMethod = function (it) {
|
|
1060
|
-
if (it != undefined) return it
|
|
1061
|
-
|| it
|
|
1397
|
+
if (it != undefined) return getMethod(it, ITERATOR$1)
|
|
1398
|
+
|| getMethod(it, '@@iterator')
|
|
1062
1399
|
|| iterators[classof(it)];
|
|
1063
1400
|
};
|
|
1064
1401
|
|
|
1065
|
-
var
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1402
|
+
var TypeError$5 = global_1.TypeError;
|
|
1403
|
+
|
|
1404
|
+
var getIterator = function (argument, usingIterator) {
|
|
1405
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
1406
|
+
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
1407
|
+
throw TypeError$5(tryToString(argument) + ' is not iterable');
|
|
1408
|
+
};
|
|
1409
|
+
|
|
1410
|
+
var iteratorClose = function (iterator, kind, value) {
|
|
1411
|
+
var innerResult, innerError;
|
|
1412
|
+
anObject(iterator);
|
|
1413
|
+
try {
|
|
1414
|
+
innerResult = getMethod(iterator, 'return');
|
|
1415
|
+
if (!innerResult) {
|
|
1416
|
+
if (kind === 'throw') throw value;
|
|
1417
|
+
return value;
|
|
1418
|
+
}
|
|
1419
|
+
innerResult = functionCall(innerResult, iterator);
|
|
1420
|
+
} catch (error) {
|
|
1421
|
+
innerError = true;
|
|
1422
|
+
innerResult = error;
|
|
1069
1423
|
}
|
|
1424
|
+
if (kind === 'throw') throw value;
|
|
1425
|
+
if (innerError) throw innerResult;
|
|
1426
|
+
anObject(innerResult);
|
|
1427
|
+
return value;
|
|
1070
1428
|
};
|
|
1071
1429
|
|
|
1430
|
+
var TypeError$4 = global_1.TypeError;
|
|
1431
|
+
|
|
1072
1432
|
var Result = function (stopped, result) {
|
|
1073
1433
|
this.stopped = stopped;
|
|
1074
1434
|
this.result = result;
|
|
1075
1435
|
};
|
|
1076
1436
|
|
|
1437
|
+
var ResultPrototype = Result.prototype;
|
|
1438
|
+
|
|
1077
1439
|
var iterate = function (iterable, unboundFunction, options) {
|
|
1078
1440
|
var that = options && options.that;
|
|
1079
1441
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1080
1442
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1081
1443
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1082
|
-
var fn = functionBindContext(unboundFunction, that
|
|
1444
|
+
var fn = functionBindContext(unboundFunction, that);
|
|
1083
1445
|
var iterator, iterFn, index, length, result, next, step;
|
|
1084
1446
|
|
|
1085
1447
|
var stop = function (condition) {
|
|
1086
|
-
if (iterator) iteratorClose(iterator);
|
|
1448
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
1087
1449
|
return new Result(true, condition);
|
|
1088
1450
|
};
|
|
1089
1451
|
|
|
@@ -1098,26 +1460,25 @@ var iterate = function (iterable, unboundFunction, options) {
|
|
|
1098
1460
|
iterator = iterable;
|
|
1099
1461
|
} else {
|
|
1100
1462
|
iterFn = getIteratorMethod(iterable);
|
|
1101
|
-
if (
|
|
1463
|
+
if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
|
|
1102
1464
|
// optimisation for array iterators
|
|
1103
1465
|
if (isArrayIteratorMethod(iterFn)) {
|
|
1104
|
-
for (index = 0, length =
|
|
1466
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
1105
1467
|
result = callFn(iterable[index]);
|
|
1106
|
-
if (result && result
|
|
1468
|
+
if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
1107
1469
|
} return new Result(false);
|
|
1108
1470
|
}
|
|
1109
|
-
iterator =
|
|
1471
|
+
iterator = getIterator(iterable, iterFn);
|
|
1110
1472
|
}
|
|
1111
1473
|
|
|
1112
1474
|
next = iterator.next;
|
|
1113
|
-
while (!(step = next
|
|
1475
|
+
while (!(step = functionCall(next, iterator)).done) {
|
|
1114
1476
|
try {
|
|
1115
1477
|
result = callFn(step.value);
|
|
1116
1478
|
} catch (error) {
|
|
1117
|
-
iteratorClose(iterator);
|
|
1118
|
-
throw error;
|
|
1479
|
+
iteratorClose(iterator, 'throw', error);
|
|
1119
1480
|
}
|
|
1120
|
-
if (typeof result == 'object' && result && result
|
|
1481
|
+
if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
1121
1482
|
} return new Result(false);
|
|
1122
1483
|
};
|
|
1123
1484
|
|
|
@@ -1158,6 +1519,60 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
|
|
|
1158
1519
|
return ITERATION_SUPPORT;
|
|
1159
1520
|
};
|
|
1160
1521
|
|
|
1522
|
+
var noop = function () { /* empty */ };
|
|
1523
|
+
var empty = [];
|
|
1524
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1525
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1526
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
1527
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1528
|
+
|
|
1529
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1530
|
+
if (!isCallable(argument)) return false;
|
|
1531
|
+
try {
|
|
1532
|
+
construct(noop, empty, argument);
|
|
1533
|
+
return true;
|
|
1534
|
+
} catch (error) {
|
|
1535
|
+
return false;
|
|
1536
|
+
}
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1540
|
+
if (!isCallable(argument)) return false;
|
|
1541
|
+
switch (classof(argument)) {
|
|
1542
|
+
case 'AsyncFunction':
|
|
1543
|
+
case 'GeneratorFunction':
|
|
1544
|
+
case 'AsyncGeneratorFunction': return false;
|
|
1545
|
+
}
|
|
1546
|
+
try {
|
|
1547
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1548
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1549
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1550
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1551
|
+
} catch (error) {
|
|
1552
|
+
return true;
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
|
|
1556
|
+
isConstructorLegacy.sham = true;
|
|
1557
|
+
|
|
1558
|
+
// `IsConstructor` abstract operation
|
|
1559
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1560
|
+
var isConstructor = !construct || fails(function () {
|
|
1561
|
+
var called;
|
|
1562
|
+
return isConstructorModern(isConstructorModern.call)
|
|
1563
|
+
|| !isConstructorModern(Object)
|
|
1564
|
+
|| !isConstructorModern(function () { called = true; })
|
|
1565
|
+
|| called;
|
|
1566
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1567
|
+
|
|
1568
|
+
var TypeError$3 = global_1.TypeError;
|
|
1569
|
+
|
|
1570
|
+
// `Assert: IsConstructor(argument) is true`
|
|
1571
|
+
var aConstructor = function (argument) {
|
|
1572
|
+
if (isConstructor(argument)) return argument;
|
|
1573
|
+
throw TypeError$3(tryToString(argument) + ' is not a constructor');
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1161
1576
|
var SPECIES$3 = wellKnownSymbol('species');
|
|
1162
1577
|
|
|
1163
1578
|
// `SpeciesConstructor` abstract operation
|
|
@@ -1165,20 +1580,33 @@ var SPECIES$3 = wellKnownSymbol('species');
|
|
|
1165
1580
|
var speciesConstructor = function (O, defaultConstructor) {
|
|
1166
1581
|
var C = anObject(O).constructor;
|
|
1167
1582
|
var S;
|
|
1168
|
-
return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor :
|
|
1583
|
+
return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aConstructor(S);
|
|
1169
1584
|
};
|
|
1170
1585
|
|
|
1171
|
-
var
|
|
1586
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
1587
|
+
var apply = FunctionPrototype$1.apply;
|
|
1588
|
+
var call = FunctionPrototype$1.call;
|
|
1589
|
+
|
|
1590
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
1591
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
|
|
1592
|
+
return call.apply(apply, arguments);
|
|
1593
|
+
});
|
|
1594
|
+
|
|
1595
|
+
var arraySlice = functionUncurryThis([].slice);
|
|
1596
|
+
|
|
1597
|
+
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
|
|
1172
1598
|
|
|
1173
1599
|
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
1174
1600
|
|
|
1175
1601
|
var set = global_1.setImmediate;
|
|
1176
1602
|
var clear = global_1.clearImmediate;
|
|
1177
1603
|
var process$3 = global_1.process;
|
|
1178
|
-
var MessageChannel = global_1.MessageChannel;
|
|
1179
1604
|
var Dispatch = global_1.Dispatch;
|
|
1605
|
+
var Function$1 = global_1.Function;
|
|
1606
|
+
var MessageChannel = global_1.MessageChannel;
|
|
1607
|
+
var String$1 = global_1.String;
|
|
1180
1608
|
var counter = 0;
|
|
1181
|
-
var queue = {};
|
|
1609
|
+
var queue$1 = {};
|
|
1182
1610
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1183
1611
|
var location, defer, channel, port;
|
|
1184
1612
|
|
|
@@ -1188,10 +1616,9 @@ try {
|
|
|
1188
1616
|
} catch (error) { /* empty */ }
|
|
1189
1617
|
|
|
1190
1618
|
var run = function (id) {
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
delete queue[id];
|
|
1619
|
+
if (hasOwnProperty_1(queue$1, id)) {
|
|
1620
|
+
var fn = queue$1[id];
|
|
1621
|
+
delete queue$1[id];
|
|
1195
1622
|
fn();
|
|
1196
1623
|
}
|
|
1197
1624
|
};
|
|
@@ -1208,25 +1635,21 @@ var listener = function (event) {
|
|
|
1208
1635
|
|
|
1209
1636
|
var post = function (id) {
|
|
1210
1637
|
// old engines have not location.origin
|
|
1211
|
-
global_1.postMessage(String(id), location.protocol + '//' + location.host);
|
|
1638
|
+
global_1.postMessage(String$1(id), location.protocol + '//' + location.host);
|
|
1212
1639
|
};
|
|
1213
1640
|
|
|
1214
1641
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1215
1642
|
if (!set || !clear) {
|
|
1216
1643
|
set = function setImmediate(fn) {
|
|
1217
|
-
var args =
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
while (argumentsLength > i) args.push(arguments[i++]);
|
|
1221
|
-
queue[++counter] = function () {
|
|
1222
|
-
// eslint-disable-next-line no-new-func -- spec requirement
|
|
1223
|
-
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
|
|
1644
|
+
var args = arraySlice(arguments, 1);
|
|
1645
|
+
queue$1[++counter] = function () {
|
|
1646
|
+
functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
|
|
1224
1647
|
};
|
|
1225
1648
|
defer(counter);
|
|
1226
1649
|
return counter;
|
|
1227
1650
|
};
|
|
1228
1651
|
clear = function clearImmediate(id) {
|
|
1229
|
-
delete queue[id];
|
|
1652
|
+
delete queue$1[id];
|
|
1230
1653
|
};
|
|
1231
1654
|
// Node.js 0.8-
|
|
1232
1655
|
if (engineIsNode) {
|
|
@@ -1244,12 +1667,12 @@ if (!set || !clear) {
|
|
|
1244
1667
|
channel = new MessageChannel();
|
|
1245
1668
|
port = channel.port2;
|
|
1246
1669
|
channel.port1.onmessage = listener;
|
|
1247
|
-
defer = functionBindContext(port.postMessage, port
|
|
1670
|
+
defer = functionBindContext(port.postMessage, port);
|
|
1248
1671
|
// Browsers with postMessage, skip WebWorkers
|
|
1249
1672
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1250
1673
|
} else if (
|
|
1251
1674
|
global_1.addEventListener &&
|
|
1252
|
-
|
|
1675
|
+
isCallable(global_1.postMessage) &&
|
|
1253
1676
|
!global_1.importScripts &&
|
|
1254
1677
|
location && location.protocol !== 'file:' &&
|
|
1255
1678
|
!fails(post)
|
|
@@ -1277,6 +1700,8 @@ var task$1 = {
|
|
|
1277
1700
|
clear: clear
|
|
1278
1701
|
};
|
|
1279
1702
|
|
|
1703
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;
|
|
1704
|
+
|
|
1280
1705
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
|
|
1281
1706
|
|
|
1282
1707
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
@@ -1285,6 +1710,7 @@ var macrotask = task$1.set;
|
|
|
1285
1710
|
|
|
1286
1711
|
|
|
1287
1712
|
|
|
1713
|
+
|
|
1288
1714
|
var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
|
|
1289
1715
|
var document$2 = global_1.document;
|
|
1290
1716
|
var process$2 = global_1.process;
|
|
@@ -1324,14 +1750,14 @@ if (!queueMicrotask) {
|
|
|
1324
1750
|
node.data = toggle = !toggle;
|
|
1325
1751
|
};
|
|
1326
1752
|
// environments with maybe non-completely correct, but existent Promise
|
|
1327
|
-
} else if (Promise$1 && Promise$1.resolve) {
|
|
1753
|
+
} else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {
|
|
1328
1754
|
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
1329
1755
|
promise = Promise$1.resolve(undefined);
|
|
1330
1756
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
1331
1757
|
promise.constructor = Promise$1;
|
|
1332
|
-
then = promise.then;
|
|
1758
|
+
then = functionBindContext(promise.then, promise);
|
|
1333
1759
|
notify$1 = function () {
|
|
1334
|
-
then
|
|
1760
|
+
then(flush);
|
|
1335
1761
|
};
|
|
1336
1762
|
// Node.js without promises
|
|
1337
1763
|
} else if (engineIsNode) {
|
|
@@ -1345,9 +1771,10 @@ if (!queueMicrotask) {
|
|
|
1345
1771
|
// - onreadystatechange
|
|
1346
1772
|
// - setTimeout
|
|
1347
1773
|
} else {
|
|
1774
|
+
// strange IE + webpack dev server bug - use .bind(global)
|
|
1775
|
+
macrotask = functionBindContext(macrotask, global_1);
|
|
1348
1776
|
notify$1 = function () {
|
|
1349
|
-
|
|
1350
|
-
macrotask.call(global_1, flush);
|
|
1777
|
+
macrotask(flush);
|
|
1351
1778
|
};
|
|
1352
1779
|
}
|
|
1353
1780
|
}
|
|
@@ -1368,8 +1795,8 @@ var PromiseCapability = function (C) {
|
|
|
1368
1795
|
resolve = $$resolve;
|
|
1369
1796
|
reject = $$reject;
|
|
1370
1797
|
});
|
|
1371
|
-
this.resolve =
|
|
1372
|
-
this.reject =
|
|
1798
|
+
this.resolve = aCallable(resolve);
|
|
1799
|
+
this.reject = aCallable(reject);
|
|
1373
1800
|
};
|
|
1374
1801
|
|
|
1375
1802
|
// `NewPromiseCapability` abstract operation
|
|
@@ -1394,7 +1821,7 @@ var promiseResolve = function (C, x) {
|
|
|
1394
1821
|
var hostReportErrors = function (a, b) {
|
|
1395
1822
|
var console = global_1.console;
|
|
1396
1823
|
if (console && console.error) {
|
|
1397
|
-
arguments.length
|
|
1824
|
+
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
1398
1825
|
}
|
|
1399
1826
|
};
|
|
1400
1827
|
|
|
@@ -1406,6 +1833,30 @@ var perform = function (exec) {
|
|
|
1406
1833
|
}
|
|
1407
1834
|
};
|
|
1408
1835
|
|
|
1836
|
+
var Queue = function () {
|
|
1837
|
+
this.head = null;
|
|
1838
|
+
this.tail = null;
|
|
1839
|
+
};
|
|
1840
|
+
|
|
1841
|
+
Queue.prototype = {
|
|
1842
|
+
add: function (item) {
|
|
1843
|
+
var entry = { item: item, next: null };
|
|
1844
|
+
if (this.head) this.tail.next = entry;
|
|
1845
|
+
else this.head = entry;
|
|
1846
|
+
this.tail = entry;
|
|
1847
|
+
},
|
|
1848
|
+
get: function () {
|
|
1849
|
+
var entry = this.head;
|
|
1850
|
+
if (entry) {
|
|
1851
|
+
this.head = entry.next;
|
|
1852
|
+
if (this.tail === entry) this.tail = null;
|
|
1853
|
+
return entry.item;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
};
|
|
1857
|
+
|
|
1858
|
+
var queue = Queue;
|
|
1859
|
+
|
|
1409
1860
|
var engineIsBrowser = typeof window == 'object';
|
|
1410
1861
|
|
|
1411
1862
|
var task = task$1.set;
|
|
@@ -1421,21 +1872,24 @@ var task = task$1.set;
|
|
|
1421
1872
|
|
|
1422
1873
|
|
|
1423
1874
|
|
|
1875
|
+
|
|
1424
1876
|
var SPECIES$2 = wellKnownSymbol('species');
|
|
1425
1877
|
var PROMISE = 'Promise';
|
|
1426
|
-
|
|
1878
|
+
|
|
1879
|
+
var getInternalState = internalState.getterFor(PROMISE);
|
|
1427
1880
|
var setInternalState = internalState.set;
|
|
1428
1881
|
var getInternalPromiseState = internalState.getterFor(PROMISE);
|
|
1429
1882
|
var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
|
|
1430
1883
|
var PromiseConstructor = nativePromiseConstructor;
|
|
1431
|
-
var
|
|
1432
|
-
var TypeError$
|
|
1884
|
+
var PromisePrototype = NativePromisePrototype;
|
|
1885
|
+
var TypeError$2 = global_1.TypeError;
|
|
1433
1886
|
var document$1 = global_1.document;
|
|
1434
1887
|
var process$1 = global_1.process;
|
|
1435
1888
|
var newPromiseCapability = newPromiseCapability$1.f;
|
|
1436
1889
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
1890
|
+
|
|
1437
1891
|
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
|
|
1438
|
-
var NATIVE_REJECTION_EVENT =
|
|
1892
|
+
var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
|
|
1439
1893
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1440
1894
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1441
1895
|
var PENDING = 0;
|
|
@@ -1444,6 +1898,7 @@ var REJECTED = 2;
|
|
|
1444
1898
|
var HANDLED = 1;
|
|
1445
1899
|
var UNHANDLED = 2;
|
|
1446
1900
|
var SUBCLASSING = false;
|
|
1901
|
+
|
|
1447
1902
|
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
1448
1903
|
|
|
1449
1904
|
var FORCED$1 = isForced_1(PROMISE, function () {
|
|
@@ -1477,52 +1932,53 @@ var INCORRECT_ITERATION = FORCED$1 || !checkCorrectnessOfIteration(function (ite
|
|
|
1477
1932
|
// helpers
|
|
1478
1933
|
var isThenable = function (it) {
|
|
1479
1934
|
var then;
|
|
1480
|
-
return isObject$1(it) &&
|
|
1935
|
+
return isObject$1(it) && isCallable(then = it.then) ? then : false;
|
|
1936
|
+
};
|
|
1937
|
+
|
|
1938
|
+
var callReaction = function (reaction, state) {
|
|
1939
|
+
var value = state.value;
|
|
1940
|
+
var ok = state.state == FULFILLED;
|
|
1941
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
1942
|
+
var resolve = reaction.resolve;
|
|
1943
|
+
var reject = reaction.reject;
|
|
1944
|
+
var domain = reaction.domain;
|
|
1945
|
+
var result, then, exited;
|
|
1946
|
+
try {
|
|
1947
|
+
if (handler) {
|
|
1948
|
+
if (!ok) {
|
|
1949
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
1950
|
+
state.rejection = HANDLED;
|
|
1951
|
+
}
|
|
1952
|
+
if (handler === true) result = value;
|
|
1953
|
+
else {
|
|
1954
|
+
if (domain) domain.enter();
|
|
1955
|
+
result = handler(value); // can throw
|
|
1956
|
+
if (domain) {
|
|
1957
|
+
domain.exit();
|
|
1958
|
+
exited = true;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
if (result === reaction.promise) {
|
|
1962
|
+
reject(TypeError$2('Promise-chain cycle'));
|
|
1963
|
+
} else if (then = isThenable(result)) {
|
|
1964
|
+
functionCall(then, result, resolve, reject);
|
|
1965
|
+
} else resolve(result);
|
|
1966
|
+
} else reject(value);
|
|
1967
|
+
} catch (error) {
|
|
1968
|
+
if (domain && !exited) domain.exit();
|
|
1969
|
+
reject(error);
|
|
1970
|
+
}
|
|
1481
1971
|
};
|
|
1482
1972
|
|
|
1483
1973
|
var notify = function (state, isReject) {
|
|
1484
1974
|
if (state.notified) return;
|
|
1485
1975
|
state.notified = true;
|
|
1486
|
-
var chain = state.reactions;
|
|
1487
1976
|
microtask(function () {
|
|
1488
|
-
var
|
|
1489
|
-
var
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
while (chain.length > index) {
|
|
1493
|
-
var reaction = chain[index++];
|
|
1494
|
-
var handler = ok ? reaction.ok : reaction.fail;
|
|
1495
|
-
var resolve = reaction.resolve;
|
|
1496
|
-
var reject = reaction.reject;
|
|
1497
|
-
var domain = reaction.domain;
|
|
1498
|
-
var result, then, exited;
|
|
1499
|
-
try {
|
|
1500
|
-
if (handler) {
|
|
1501
|
-
if (!ok) {
|
|
1502
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
1503
|
-
state.rejection = HANDLED;
|
|
1504
|
-
}
|
|
1505
|
-
if (handler === true) result = value;
|
|
1506
|
-
else {
|
|
1507
|
-
if (domain) domain.enter();
|
|
1508
|
-
result = handler(value); // can throw
|
|
1509
|
-
if (domain) {
|
|
1510
|
-
domain.exit();
|
|
1511
|
-
exited = true;
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
if (result === reaction.promise) {
|
|
1515
|
-
reject(TypeError$1('Promise-chain cycle'));
|
|
1516
|
-
} else if (then = isThenable(result)) {
|
|
1517
|
-
then.call(result, resolve, reject);
|
|
1518
|
-
} else resolve(result);
|
|
1519
|
-
} else reject(value);
|
|
1520
|
-
} catch (error) {
|
|
1521
|
-
if (domain && !exited) domain.exit();
|
|
1522
|
-
reject(error);
|
|
1523
|
-
}
|
|
1977
|
+
var reactions = state.reactions;
|
|
1978
|
+
var reaction;
|
|
1979
|
+
while (reaction = reactions.get()) {
|
|
1980
|
+
callReaction(reaction, state);
|
|
1524
1981
|
}
|
|
1525
|
-
state.reactions = [];
|
|
1526
1982
|
state.notified = false;
|
|
1527
1983
|
if (isReject && !state.rejection) onUnhandled(state);
|
|
1528
1984
|
});
|
|
@@ -1542,7 +1998,7 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
1542
1998
|
};
|
|
1543
1999
|
|
|
1544
2000
|
var onUnhandled = function (state) {
|
|
1545
|
-
task
|
|
2001
|
+
functionCall(task, global_1, function () {
|
|
1546
2002
|
var promise = state.facade;
|
|
1547
2003
|
var value = state.value;
|
|
1548
2004
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -1565,7 +2021,7 @@ var isUnhandled = function (state) {
|
|
|
1565
2021
|
};
|
|
1566
2022
|
|
|
1567
2023
|
var onHandleUnhandled = function (state) {
|
|
1568
|
-
task
|
|
2024
|
+
functionCall(task, global_1, function () {
|
|
1569
2025
|
var promise = state.facade;
|
|
1570
2026
|
if (engineIsNode) {
|
|
1571
2027
|
process$1.emit('rejectionHandled', promise);
|
|
@@ -1593,13 +2049,13 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1593
2049
|
state.done = true;
|
|
1594
2050
|
if (unwrap) state = unwrap;
|
|
1595
2051
|
try {
|
|
1596
|
-
if (state.facade === value) throw TypeError$
|
|
2052
|
+
if (state.facade === value) throw TypeError$2("Promise can't be resolved itself");
|
|
1597
2053
|
var then = isThenable(value);
|
|
1598
2054
|
if (then) {
|
|
1599
2055
|
microtask(function () {
|
|
1600
2056
|
var wrapper = { done: false };
|
|
1601
2057
|
try {
|
|
1602
|
-
then
|
|
2058
|
+
functionCall(then, value,
|
|
1603
2059
|
bind$1(internalResolve, wrapper, state),
|
|
1604
2060
|
bind$1(internalReject, wrapper, state)
|
|
1605
2061
|
);
|
|
@@ -1621,9 +2077,9 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1621
2077
|
if (FORCED$1) {
|
|
1622
2078
|
// 25.4.3.1 Promise(executor)
|
|
1623
2079
|
PromiseConstructor = function Promise(executor) {
|
|
1624
|
-
anInstance(this,
|
|
1625
|
-
|
|
1626
|
-
Internal
|
|
2080
|
+
anInstance(this, PromisePrototype);
|
|
2081
|
+
aCallable(executor);
|
|
2082
|
+
functionCall(Internal, this);
|
|
1627
2083
|
var state = getInternalState(this);
|
|
1628
2084
|
try {
|
|
1629
2085
|
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
@@ -1631,7 +2087,7 @@ if (FORCED$1) {
|
|
|
1631
2087
|
internalReject(state, error);
|
|
1632
2088
|
}
|
|
1633
2089
|
};
|
|
1634
|
-
|
|
2090
|
+
PromisePrototype = PromiseConstructor.prototype;
|
|
1635
2091
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1636
2092
|
Internal = function Promise(executor) {
|
|
1637
2093
|
setInternalState(this, {
|
|
@@ -1639,24 +2095,27 @@ if (FORCED$1) {
|
|
|
1639
2095
|
done: false,
|
|
1640
2096
|
notified: false,
|
|
1641
2097
|
parent: false,
|
|
1642
|
-
reactions:
|
|
2098
|
+
reactions: new queue(),
|
|
1643
2099
|
rejection: false,
|
|
1644
2100
|
state: PENDING,
|
|
1645
2101
|
value: undefined
|
|
1646
2102
|
});
|
|
1647
2103
|
};
|
|
1648
|
-
Internal.prototype = redefineAll(
|
|
2104
|
+
Internal.prototype = redefineAll(PromisePrototype, {
|
|
1649
2105
|
// `Promise.prototype.then` method
|
|
1650
2106
|
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2107
|
+
// eslint-disable-next-line unicorn/no-thenable -- safe
|
|
1651
2108
|
then: function then(onFulfilled, onRejected) {
|
|
1652
2109
|
var state = getInternalPromiseState(this);
|
|
1653
2110
|
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
1654
|
-
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
1655
|
-
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
1656
|
-
reaction.domain = engineIsNode ? process$1.domain : undefined;
|
|
1657
2111
|
state.parent = true;
|
|
1658
|
-
|
|
1659
|
-
|
|
2112
|
+
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
|
|
2113
|
+
reaction.fail = isCallable(onRejected) && onRejected;
|
|
2114
|
+
reaction.domain = engineIsNode ? process$1.domain : undefined;
|
|
2115
|
+
if (state.state == PENDING) state.reactions.add(reaction);
|
|
2116
|
+
else microtask(function () {
|
|
2117
|
+
callReaction(reaction, state);
|
|
2118
|
+
});
|
|
1660
2119
|
return reaction.promise;
|
|
1661
2120
|
},
|
|
1662
2121
|
// `Promise.prototype.catch` method
|
|
@@ -1678,7 +2137,7 @@ if (FORCED$1) {
|
|
|
1678
2137
|
: newGenericPromiseCapability(C);
|
|
1679
2138
|
};
|
|
1680
2139
|
|
|
1681
|
-
if (
|
|
2140
|
+
if (isCallable(nativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
|
|
1682
2141
|
nativeThen = NativePromisePrototype.then;
|
|
1683
2142
|
|
|
1684
2143
|
if (!SUBCLASSING) {
|
|
@@ -1686,13 +2145,13 @@ if (FORCED$1) {
|
|
|
1686
2145
|
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
1687
2146
|
var that = this;
|
|
1688
2147
|
return new PromiseConstructor(function (resolve, reject) {
|
|
1689
|
-
nativeThen
|
|
2148
|
+
functionCall(nativeThen, that, resolve, reject);
|
|
1690
2149
|
}).then(onFulfilled, onRejected);
|
|
1691
2150
|
// https://github.com/zloirock/core-js/issues/640
|
|
1692
2151
|
}, { unsafe: true });
|
|
1693
2152
|
|
|
1694
2153
|
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1695
|
-
redefine(NativePromisePrototype, 'catch',
|
|
2154
|
+
redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1696
2155
|
}
|
|
1697
2156
|
|
|
1698
2157
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
@@ -1702,7 +2161,7 @@ if (FORCED$1) {
|
|
|
1702
2161
|
|
|
1703
2162
|
// make `instanceof Promise` work for native promise-based APIs
|
|
1704
2163
|
if (objectSetPrototypeOf) {
|
|
1705
|
-
objectSetPrototypeOf(NativePromisePrototype,
|
|
2164
|
+
objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
|
|
1706
2165
|
}
|
|
1707
2166
|
}
|
|
1708
2167
|
}
|
|
@@ -1722,7 +2181,7 @@ _export({ target: PROMISE, stat: true, forced: FORCED$1 }, {
|
|
|
1722
2181
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
1723
2182
|
reject: function reject(r) {
|
|
1724
2183
|
var capability = newPromiseCapability(this);
|
|
1725
|
-
capability.reject
|
|
2184
|
+
functionCall(capability.reject, undefined, r);
|
|
1726
2185
|
return capability.promise;
|
|
1727
2186
|
}
|
|
1728
2187
|
});
|
|
@@ -1744,16 +2203,15 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1744
2203
|
var resolve = capability.resolve;
|
|
1745
2204
|
var reject = capability.reject;
|
|
1746
2205
|
var result = perform(function () {
|
|
1747
|
-
var $promiseResolve =
|
|
2206
|
+
var $promiseResolve = aCallable(C.resolve);
|
|
1748
2207
|
var values = [];
|
|
1749
2208
|
var counter = 0;
|
|
1750
2209
|
var remaining = 1;
|
|
1751
2210
|
iterate(iterable, function (promise) {
|
|
1752
2211
|
var index = counter++;
|
|
1753
2212
|
var alreadyCalled = false;
|
|
1754
|
-
values.push(undefined);
|
|
1755
2213
|
remaining++;
|
|
1756
|
-
$promiseResolve
|
|
2214
|
+
functionCall($promiseResolve, C, promise).then(function (value) {
|
|
1757
2215
|
if (alreadyCalled) return;
|
|
1758
2216
|
alreadyCalled = true;
|
|
1759
2217
|
values[index] = value;
|
|
@@ -1772,9 +2230,9 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1772
2230
|
var capability = newPromiseCapability(C);
|
|
1773
2231
|
var reject = capability.reject;
|
|
1774
2232
|
var result = perform(function () {
|
|
1775
|
-
var $promiseResolve =
|
|
2233
|
+
var $promiseResolve = aCallable(C.resolve);
|
|
1776
2234
|
iterate(iterable, function (promise) {
|
|
1777
|
-
$promiseResolve
|
|
2235
|
+
functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
1778
2236
|
});
|
|
1779
2237
|
});
|
|
1780
2238
|
if (result.error) reject(result.value);
|
|
@@ -1786,6 +2244,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
1786
2244
|
var $assign = Object.assign;
|
|
1787
2245
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1788
2246
|
var defineProperty$1 = Object.defineProperty;
|
|
2247
|
+
var concat = functionUncurryThis([].concat);
|
|
1789
2248
|
|
|
1790
2249
|
// `Object.assign` method
|
|
1791
2250
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
@@ -1817,13 +2276,13 @@ var objectAssign = !$assign || fails(function () {
|
|
|
1817
2276
|
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
1818
2277
|
while (argumentsLength > index) {
|
|
1819
2278
|
var S = indexedObject(arguments[index++]);
|
|
1820
|
-
var keys = getOwnPropertySymbols ? objectKeys(S)
|
|
2279
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1821
2280
|
var length = keys.length;
|
|
1822
2281
|
var j = 0;
|
|
1823
2282
|
var key;
|
|
1824
2283
|
while (length > j) {
|
|
1825
2284
|
key = keys[j++];
|
|
1826
|
-
if (!descriptors || propertyIsEnumerable
|
|
2285
|
+
if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1827
2286
|
}
|
|
1828
2287
|
} return T;
|
|
1829
2288
|
} : $assign;
|
|
@@ -1838,8 +2297,8 @@ _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }
|
|
|
1838
2297
|
// `IsArray` abstract operation
|
|
1839
2298
|
// https://tc39.es/ecma262/#sec-isarray
|
|
1840
2299
|
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
1841
|
-
var isArray$1 = Array.isArray || function isArray(
|
|
1842
|
-
return classofRaw(
|
|
2300
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
2301
|
+
return classofRaw(argument) == 'Array';
|
|
1843
2302
|
};
|
|
1844
2303
|
|
|
1845
2304
|
var createProperty = function (object, key, value) {
|
|
@@ -1849,6 +2308,7 @@ var createProperty = function (object, key, value) {
|
|
|
1849
2308
|
};
|
|
1850
2309
|
|
|
1851
2310
|
var SPECIES$1 = wellKnownSymbol('species');
|
|
2311
|
+
var Array$1 = global_1.Array;
|
|
1852
2312
|
|
|
1853
2313
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
1854
2314
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
@@ -1857,12 +2317,12 @@ var arraySpeciesConstructor = function (originalArray) {
|
|
|
1857
2317
|
if (isArray$1(originalArray)) {
|
|
1858
2318
|
C = originalArray.constructor;
|
|
1859
2319
|
// cross-realm fallback
|
|
1860
|
-
if (
|
|
2320
|
+
if (isConstructor(C) && (C === Array$1 || isArray$1(C.prototype))) C = undefined;
|
|
1861
2321
|
else if (isObject$1(C)) {
|
|
1862
2322
|
C = C[SPECIES$1];
|
|
1863
2323
|
if (C === null) C = undefined;
|
|
1864
2324
|
}
|
|
1865
|
-
} return C === undefined ? Array : C;
|
|
2325
|
+
} return C === undefined ? Array$1 : C;
|
|
1866
2326
|
};
|
|
1867
2327
|
|
|
1868
2328
|
// `ArraySpeciesCreate` abstract operation
|
|
@@ -1890,6 +2350,7 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
|
|
|
1890
2350
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
1891
2351
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
1892
2352
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
2353
|
+
var TypeError$1 = global_1.TypeError;
|
|
1893
2354
|
|
|
1894
2355
|
// We can't use this feature detection in V8 since it causes
|
|
1895
2356
|
// deoptimization and serious performance degradation
|
|
@@ -1923,11 +2384,11 @@ _export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
|
1923
2384
|
for (i = -1, length = arguments.length; i < length; i++) {
|
|
1924
2385
|
E = i === -1 ? O : arguments[i];
|
|
1925
2386
|
if (isConcatSpreadable(E)) {
|
|
1926
|
-
len =
|
|
1927
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
2387
|
+
len = lengthOfArrayLike(E);
|
|
2388
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1928
2389
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1929
2390
|
} else {
|
|
1930
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
2391
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1931
2392
|
createProperty(A, n++, E);
|
|
1932
2393
|
}
|
|
1933
2394
|
}
|
|
@@ -1946,21 +2407,24 @@ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
|
1946
2407
|
}
|
|
1947
2408
|
});
|
|
1948
2409
|
|
|
2410
|
+
var FUNCTION_NAME_EXISTS = functionName.EXISTS;
|
|
2411
|
+
|
|
1949
2412
|
var defineProperty = objectDefineProperty.f;
|
|
1950
2413
|
|
|
1951
2414
|
var FunctionPrototype = Function.prototype;
|
|
1952
|
-
var
|
|
1953
|
-
var nameRE =
|
|
2415
|
+
var functionToString = functionUncurryThis(FunctionPrototype.toString);
|
|
2416
|
+
var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
|
|
2417
|
+
var regExpExec = functionUncurryThis(nameRE.exec);
|
|
1954
2418
|
var NAME = 'name';
|
|
1955
2419
|
|
|
1956
2420
|
// Function instances `.name` property
|
|
1957
2421
|
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
1958
|
-
if (descriptors && !
|
|
2422
|
+
if (descriptors && !FUNCTION_NAME_EXISTS) {
|
|
1959
2423
|
defineProperty(FunctionPrototype, NAME, {
|
|
1960
2424
|
configurable: true,
|
|
1961
2425
|
get: function () {
|
|
1962
2426
|
try {
|
|
1963
|
-
return
|
|
2427
|
+
return regExpExec(nameRE, functionToString(this))[1];
|
|
1964
2428
|
} catch (error) {
|
|
1965
2429
|
return '';
|
|
1966
2430
|
}
|
|
@@ -2004,7 +2468,15 @@ var domIterables = {
|
|
|
2004
2468
|
TouchList: 0
|
|
2005
2469
|
};
|
|
2006
2470
|
|
|
2007
|
-
|
|
2471
|
+
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
var classList = documentCreateElement('span').classList;
|
|
2475
|
+
var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
|
|
2476
|
+
|
|
2477
|
+
var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
|
|
2478
|
+
|
|
2479
|
+
var push = functionUncurryThis([].push);
|
|
2008
2480
|
|
|
2009
2481
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
2010
2482
|
var createMethod = function (TYPE) {
|
|
@@ -2018,8 +2490,8 @@ var createMethod = function (TYPE) {
|
|
|
2018
2490
|
return function ($this, callbackfn, that, specificCreate) {
|
|
2019
2491
|
var O = toObject($this);
|
|
2020
2492
|
var self = indexedObject(O);
|
|
2021
|
-
var boundFunction = functionBindContext(callbackfn, that
|
|
2022
|
-
var length =
|
|
2493
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
|
2494
|
+
var length = lengthOfArrayLike(self);
|
|
2023
2495
|
var index = 0;
|
|
2024
2496
|
var create = specificCreate || arraySpeciesCreate;
|
|
2025
2497
|
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
|
@@ -2033,10 +2505,10 @@ var createMethod = function (TYPE) {
|
|
|
2033
2505
|
case 3: return true; // some
|
|
2034
2506
|
case 5: return value; // find
|
|
2035
2507
|
case 6: return index; // findIndex
|
|
2036
|
-
case 2: push
|
|
2508
|
+
case 2: push(target, value); // filter
|
|
2037
2509
|
} else switch (TYPE) {
|
|
2038
2510
|
case 4: return false; // every
|
|
2039
|
-
case 7: push
|
|
2511
|
+
case 7: push(target, value); // filterReject
|
|
2040
2512
|
}
|
|
2041
2513
|
}
|
|
2042
2514
|
}
|
|
@@ -2083,17 +2555,23 @@ var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */)
|
|
|
2083
2555
|
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
2084
2556
|
} : [].forEach;
|
|
2085
2557
|
|
|
2086
|
-
|
|
2087
|
-
var Collection = global_1[COLLECTION_NAME];
|
|
2088
|
-
var CollectionPrototype = Collection && Collection.prototype;
|
|
2558
|
+
var handlePrototype = function (CollectionPrototype) {
|
|
2089
2559
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
2090
2560
|
if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
|
|
2091
2561
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
|
|
2092
2562
|
} catch (error) {
|
|
2093
2563
|
CollectionPrototype.forEach = arrayForEach;
|
|
2094
2564
|
}
|
|
2565
|
+
};
|
|
2566
|
+
|
|
2567
|
+
for (var COLLECTION_NAME in domIterables) {
|
|
2568
|
+
if (domIterables[COLLECTION_NAME]) {
|
|
2569
|
+
handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
|
|
2570
|
+
}
|
|
2095
2571
|
}
|
|
2096
2572
|
|
|
2573
|
+
handlePrototype(domTokenListPrototype);
|
|
2574
|
+
|
|
2097
2575
|
var bind = function bind(fn, thisArg) {
|
|
2098
2576
|
return function wrap() {
|
|
2099
2577
|
var args = new Array(arguments.length);
|