@dynamic-labs/react-hooks 4.0.0-alpha.3 → 4.0.0-alpha.5
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/index.cjs +89 -0
- package/index.js +0 -1544
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,1550 +1,6 @@
|
|
|
1
1
|
import { useRef, useState, useCallback, useMemo } from 'react';
|
|
2
2
|
import { effect, stop } from '@vue/reactivity';
|
|
3
3
|
|
|
4
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
|
-
|
|
6
|
-
var fails$a = function (exec) {
|
|
7
|
-
try {
|
|
8
|
-
return !!exec();
|
|
9
|
-
} catch (error) {
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
var fails$9 = fails$a;
|
|
15
|
-
|
|
16
|
-
var functionBindNative = !fails$9(function () {
|
|
17
|
-
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
18
|
-
var test = (function () { /* empty */ }).bind();
|
|
19
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
20
|
-
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
24
|
-
|
|
25
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
26
|
-
var call$5 = FunctionPrototype$1.call;
|
|
27
|
-
var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$5, call$5);
|
|
28
|
-
|
|
29
|
-
var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
|
|
30
|
-
return function () {
|
|
31
|
-
return call$5.apply(fn, arguments);
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
36
|
-
|
|
37
|
-
var toString$1 = uncurryThis$8({}.toString);
|
|
38
|
-
var stringSlice = uncurryThis$8(''.slice);
|
|
39
|
-
|
|
40
|
-
var classofRaw = function (it) {
|
|
41
|
-
return stringSlice(toString$1(it), 8, -1);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
45
|
-
var fails$8 = fails$a;
|
|
46
|
-
var classof = classofRaw;
|
|
47
|
-
|
|
48
|
-
var $Object$3 = Object;
|
|
49
|
-
var split = uncurryThis$7(''.split);
|
|
50
|
-
|
|
51
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
52
|
-
var indexedObject = fails$8(function () {
|
|
53
|
-
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
54
|
-
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
55
|
-
return !$Object$3('z').propertyIsEnumerable(0);
|
|
56
|
-
}) ? function (it) {
|
|
57
|
-
return classof(it) == 'String' ? split(it, '') : $Object$3(it);
|
|
58
|
-
} : $Object$3;
|
|
59
|
-
|
|
60
|
-
// we can't use just `it == null` since of `document.all` special case
|
|
61
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
62
|
-
var isNullOrUndefined$2 = function (it) {
|
|
63
|
-
return it === null || it === undefined;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
var isNullOrUndefined$1 = isNullOrUndefined$2;
|
|
67
|
-
|
|
68
|
-
var $TypeError$6 = TypeError;
|
|
69
|
-
|
|
70
|
-
// `RequireObjectCoercible` abstract operation
|
|
71
|
-
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
72
|
-
var requireObjectCoercible$2 = function (it) {
|
|
73
|
-
if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it);
|
|
74
|
-
return it;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// toObject with fallback for non-array-like ES3 strings
|
|
78
|
-
var IndexedObject = indexedObject;
|
|
79
|
-
var requireObjectCoercible$1 = requireObjectCoercible$2;
|
|
80
|
-
|
|
81
|
-
var toIndexedObject$5 = function (it) {
|
|
82
|
-
return IndexedObject(requireObjectCoercible$1(it));
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
var check = function (it) {
|
|
86
|
-
return it && it.Math == Math && it;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
90
|
-
var global$b =
|
|
91
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
92
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
93
|
-
check(typeof window == 'object' && window) ||
|
|
94
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
95
|
-
check(typeof self == 'object' && self) ||
|
|
96
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
97
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
98
|
-
(function () { return this; })() || Function('return this')();
|
|
99
|
-
|
|
100
|
-
var shared$3 = {exports: {}};
|
|
101
|
-
|
|
102
|
-
var global$a = global$b;
|
|
103
|
-
|
|
104
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
105
|
-
var defineProperty$4 = Object.defineProperty;
|
|
106
|
-
|
|
107
|
-
var defineGlobalProperty$3 = function (key, value) {
|
|
108
|
-
try {
|
|
109
|
-
defineProperty$4(global$a, key, { value: value, configurable: true, writable: true });
|
|
110
|
-
} catch (error) {
|
|
111
|
-
global$a[key] = value;
|
|
112
|
-
} return value;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
var global$9 = global$b;
|
|
116
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
117
|
-
|
|
118
|
-
var SHARED = '__core-js_shared__';
|
|
119
|
-
var store$3 = global$9[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
120
|
-
|
|
121
|
-
var sharedStore = store$3;
|
|
122
|
-
|
|
123
|
-
var store$2 = sharedStore;
|
|
124
|
-
|
|
125
|
-
(shared$3.exports = function (key, value) {
|
|
126
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
127
|
-
})('versions', []).push({
|
|
128
|
-
version: '3.27.0',
|
|
129
|
-
mode: 'global',
|
|
130
|
-
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
131
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.27.0/LICENSE',
|
|
132
|
-
source: 'https://github.com/zloirock/core-js'
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
var requireObjectCoercible = requireObjectCoercible$2;
|
|
136
|
-
|
|
137
|
-
var $Object$2 = Object;
|
|
138
|
-
|
|
139
|
-
// `ToObject` abstract operation
|
|
140
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
141
|
-
var toObject$2 = function (argument) {
|
|
142
|
-
return $Object$2(requireObjectCoercible(argument));
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
146
|
-
var toObject$1 = toObject$2;
|
|
147
|
-
|
|
148
|
-
var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
|
|
149
|
-
|
|
150
|
-
// `HasOwnProperty` abstract operation
|
|
151
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
152
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
153
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
154
|
-
return hasOwnProperty(toObject$1(it), key);
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
var uncurryThis$5 = functionUncurryThis;
|
|
158
|
-
|
|
159
|
-
var id = 0;
|
|
160
|
-
var postfix = Math.random();
|
|
161
|
-
var toString = uncurryThis$5(1.0.toString);
|
|
162
|
-
|
|
163
|
-
var uid$2 = function (key) {
|
|
164
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
var documentAll$2 = typeof document == 'object' && document.all;
|
|
168
|
-
|
|
169
|
-
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
170
|
-
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
171
|
-
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
172
|
-
|
|
173
|
-
var documentAll_1 = {
|
|
174
|
-
all: documentAll$2,
|
|
175
|
-
IS_HTMLDDA: IS_HTMLDDA
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
var $documentAll$1 = documentAll_1;
|
|
179
|
-
|
|
180
|
-
var documentAll$1 = $documentAll$1.all;
|
|
181
|
-
|
|
182
|
-
// `IsCallable` abstract operation
|
|
183
|
-
// https://tc39.es/ecma262/#sec-iscallable
|
|
184
|
-
var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
185
|
-
return typeof argument == 'function' || argument === documentAll$1;
|
|
186
|
-
} : function (argument) {
|
|
187
|
-
return typeof argument == 'function';
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
var global$8 = global$b;
|
|
191
|
-
var isCallable$d = isCallable$e;
|
|
192
|
-
|
|
193
|
-
var aFunction = function (argument) {
|
|
194
|
-
return isCallable$d(argument) ? argument : undefined;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
var getBuiltIn$4 = function (namespace, method) {
|
|
198
|
-
return arguments.length < 2 ? aFunction(global$8[namespace]) : global$8[namespace] && global$8[namespace][method];
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
var getBuiltIn$3 = getBuiltIn$4;
|
|
202
|
-
|
|
203
|
-
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
204
|
-
|
|
205
|
-
var global$7 = global$b;
|
|
206
|
-
var userAgent = engineUserAgent;
|
|
207
|
-
|
|
208
|
-
var process = global$7.process;
|
|
209
|
-
var Deno = global$7.Deno;
|
|
210
|
-
var versions = process && process.versions || Deno && Deno.version;
|
|
211
|
-
var v8 = versions && versions.v8;
|
|
212
|
-
var match, version;
|
|
213
|
-
|
|
214
|
-
if (v8) {
|
|
215
|
-
match = v8.split('.');
|
|
216
|
-
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
217
|
-
// but their correct versions are not interesting for us
|
|
218
|
-
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
222
|
-
// so check `userAgent` even if `.v8` exists, but 0
|
|
223
|
-
if (!version && userAgent) {
|
|
224
|
-
match = userAgent.match(/Edge\/(\d+)/);
|
|
225
|
-
if (!match || match[1] >= 74) {
|
|
226
|
-
match = userAgent.match(/Chrome\/(\d+)/);
|
|
227
|
-
if (match) version = +match[1];
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
var engineV8Version = version;
|
|
232
|
-
|
|
233
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
234
|
-
|
|
235
|
-
var V8_VERSION = engineV8Version;
|
|
236
|
-
var fails$7 = fails$a;
|
|
237
|
-
|
|
238
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
239
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
|
|
240
|
-
var symbol = Symbol();
|
|
241
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
242
|
-
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
243
|
-
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
244
|
-
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
245
|
-
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
249
|
-
|
|
250
|
-
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
251
|
-
|
|
252
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
253
|
-
&& !Symbol.sham
|
|
254
|
-
&& typeof Symbol.iterator == 'symbol';
|
|
255
|
-
|
|
256
|
-
var global$6 = global$b;
|
|
257
|
-
var shared$2 = shared$3.exports;
|
|
258
|
-
var hasOwn$8 = hasOwnProperty_1;
|
|
259
|
-
var uid$1 = uid$2;
|
|
260
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
261
|
-
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
262
|
-
|
|
263
|
-
var WellKnownSymbolsStore = shared$2('wks');
|
|
264
|
-
var Symbol$1 = global$6.Symbol;
|
|
265
|
-
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
266
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
267
|
-
|
|
268
|
-
var wellKnownSymbol$6 = function (name) {
|
|
269
|
-
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
270
|
-
var description = 'Symbol.' + name;
|
|
271
|
-
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
272
|
-
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
273
|
-
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
274
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
275
|
-
} else {
|
|
276
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
277
|
-
}
|
|
278
|
-
} return WellKnownSymbolsStore[name];
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
var isCallable$c = isCallable$e;
|
|
282
|
-
var $documentAll = documentAll_1;
|
|
283
|
-
|
|
284
|
-
var documentAll = $documentAll.all;
|
|
285
|
-
|
|
286
|
-
var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
287
|
-
return typeof it == 'object' ? it !== null : isCallable$c(it) || it === documentAll;
|
|
288
|
-
} : function (it) {
|
|
289
|
-
return typeof it == 'object' ? it !== null : isCallable$c(it);
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
var isObject$6 = isObject$7;
|
|
293
|
-
|
|
294
|
-
var $String$2 = String;
|
|
295
|
-
var $TypeError$5 = TypeError;
|
|
296
|
-
|
|
297
|
-
// `Assert: Type(argument) is Object`
|
|
298
|
-
var anObject$5 = function (argument) {
|
|
299
|
-
if (isObject$6(argument)) return argument;
|
|
300
|
-
throw $TypeError$5($String$2(argument) + ' is not an object');
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
var objectDefineProperties = {};
|
|
304
|
-
|
|
305
|
-
var fails$6 = fails$a;
|
|
306
|
-
|
|
307
|
-
// Detect IE8's incomplete defineProperty implementation
|
|
308
|
-
var descriptors = !fails$6(function () {
|
|
309
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
310
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
var DESCRIPTORS$8 = descriptors;
|
|
314
|
-
var fails$5 = fails$a;
|
|
315
|
-
|
|
316
|
-
// V8 ~ Chrome 36-
|
|
317
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
318
|
-
var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$5(function () {
|
|
319
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
320
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
321
|
-
value: 42,
|
|
322
|
-
writable: false
|
|
323
|
-
}).prototype != 42;
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
var objectDefineProperty = {};
|
|
327
|
-
|
|
328
|
-
var global$5 = global$b;
|
|
329
|
-
var isObject$5 = isObject$7;
|
|
330
|
-
|
|
331
|
-
var document$1 = global$5.document;
|
|
332
|
-
// typeof document.createElement is 'object' in old IE
|
|
333
|
-
var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
|
|
334
|
-
|
|
335
|
-
var documentCreateElement$2 = function (it) {
|
|
336
|
-
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
var DESCRIPTORS$7 = descriptors;
|
|
340
|
-
var fails$4 = fails$a;
|
|
341
|
-
var createElement = documentCreateElement$2;
|
|
342
|
-
|
|
343
|
-
// Thanks to IE8 for its funny defineProperty
|
|
344
|
-
var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
|
|
345
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
346
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
347
|
-
get: function () { return 7; }
|
|
348
|
-
}).a != 7;
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
var NATIVE_BIND = functionBindNative;
|
|
352
|
-
|
|
353
|
-
var call$4 = Function.prototype.call;
|
|
354
|
-
|
|
355
|
-
var functionCall = NATIVE_BIND ? call$4.bind(call$4) : function () {
|
|
356
|
-
return call$4.apply(call$4, arguments);
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
var uncurryThis$4 = functionUncurryThis;
|
|
360
|
-
|
|
361
|
-
var objectIsPrototypeOf = uncurryThis$4({}.isPrototypeOf);
|
|
362
|
-
|
|
363
|
-
var getBuiltIn$2 = getBuiltIn$4;
|
|
364
|
-
var isCallable$b = isCallable$e;
|
|
365
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
366
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
367
|
-
|
|
368
|
-
var $Object$1 = Object;
|
|
369
|
-
|
|
370
|
-
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
371
|
-
return typeof it == 'symbol';
|
|
372
|
-
} : function (it) {
|
|
373
|
-
var $Symbol = getBuiltIn$2('Symbol');
|
|
374
|
-
return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
var $String$1 = String;
|
|
378
|
-
|
|
379
|
-
var tryToString$1 = function (argument) {
|
|
380
|
-
try {
|
|
381
|
-
return $String$1(argument);
|
|
382
|
-
} catch (error) {
|
|
383
|
-
return 'Object';
|
|
384
|
-
}
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
var isCallable$a = isCallable$e;
|
|
388
|
-
var tryToString = tryToString$1;
|
|
389
|
-
|
|
390
|
-
var $TypeError$4 = TypeError;
|
|
391
|
-
|
|
392
|
-
// `Assert: IsCallable(argument) is true`
|
|
393
|
-
var aCallable$1 = function (argument) {
|
|
394
|
-
if (isCallable$a(argument)) return argument;
|
|
395
|
-
throw $TypeError$4(tryToString(argument) + ' is not a function');
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
var aCallable = aCallable$1;
|
|
399
|
-
var isNullOrUndefined = isNullOrUndefined$2;
|
|
400
|
-
|
|
401
|
-
// `GetMethod` abstract operation
|
|
402
|
-
// https://tc39.es/ecma262/#sec-getmethod
|
|
403
|
-
var getMethod$1 = function (V, P) {
|
|
404
|
-
var func = V[P];
|
|
405
|
-
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
406
|
-
};
|
|
407
|
-
|
|
408
|
-
var call$3 = functionCall;
|
|
409
|
-
var isCallable$9 = isCallable$e;
|
|
410
|
-
var isObject$4 = isObject$7;
|
|
411
|
-
|
|
412
|
-
var $TypeError$3 = TypeError;
|
|
413
|
-
|
|
414
|
-
// `OrdinaryToPrimitive` abstract operation
|
|
415
|
-
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
416
|
-
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
417
|
-
var fn, val;
|
|
418
|
-
if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
|
|
419
|
-
if (isCallable$9(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
|
|
420
|
-
if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
|
|
421
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
var call$2 = functionCall;
|
|
425
|
-
var isObject$3 = isObject$7;
|
|
426
|
-
var isSymbol$1 = isSymbol$2;
|
|
427
|
-
var getMethod = getMethod$1;
|
|
428
|
-
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
429
|
-
var wellKnownSymbol$5 = wellKnownSymbol$6;
|
|
430
|
-
|
|
431
|
-
var $TypeError$2 = TypeError;
|
|
432
|
-
var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
|
|
433
|
-
|
|
434
|
-
// `ToPrimitive` abstract operation
|
|
435
|
-
// https://tc39.es/ecma262/#sec-toprimitive
|
|
436
|
-
var toPrimitive$1 = function (input, pref) {
|
|
437
|
-
if (!isObject$3(input) || isSymbol$1(input)) return input;
|
|
438
|
-
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
439
|
-
var result;
|
|
440
|
-
if (exoticToPrim) {
|
|
441
|
-
if (pref === undefined) pref = 'default';
|
|
442
|
-
result = call$2(exoticToPrim, input, pref);
|
|
443
|
-
if (!isObject$3(result) || isSymbol$1(result)) return result;
|
|
444
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
445
|
-
}
|
|
446
|
-
if (pref === undefined) pref = 'number';
|
|
447
|
-
return ordinaryToPrimitive(input, pref);
|
|
448
|
-
};
|
|
449
|
-
|
|
450
|
-
var toPrimitive = toPrimitive$1;
|
|
451
|
-
var isSymbol = isSymbol$2;
|
|
452
|
-
|
|
453
|
-
// `ToPropertyKey` abstract operation
|
|
454
|
-
// https://tc39.es/ecma262/#sec-topropertykey
|
|
455
|
-
var toPropertyKey$2 = function (argument) {
|
|
456
|
-
var key = toPrimitive(argument, 'string');
|
|
457
|
-
return isSymbol(key) ? key : key + '';
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
var DESCRIPTORS$6 = descriptors;
|
|
461
|
-
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
462
|
-
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
463
|
-
var anObject$4 = anObject$5;
|
|
464
|
-
var toPropertyKey$1 = toPropertyKey$2;
|
|
465
|
-
|
|
466
|
-
var $TypeError$1 = TypeError;
|
|
467
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
468
|
-
var $defineProperty = Object.defineProperty;
|
|
469
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
470
|
-
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
471
|
-
var ENUMERABLE = 'enumerable';
|
|
472
|
-
var CONFIGURABLE$1 = 'configurable';
|
|
473
|
-
var WRITABLE = 'writable';
|
|
474
|
-
|
|
475
|
-
// `Object.defineProperty` method
|
|
476
|
-
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
477
|
-
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
478
|
-
anObject$4(O);
|
|
479
|
-
P = toPropertyKey$1(P);
|
|
480
|
-
anObject$4(Attributes);
|
|
481
|
-
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
482
|
-
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
483
|
-
if (current && current[WRITABLE]) {
|
|
484
|
-
O[P] = Attributes.value;
|
|
485
|
-
Attributes = {
|
|
486
|
-
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
487
|
-
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
488
|
-
writable: false
|
|
489
|
-
};
|
|
490
|
-
}
|
|
491
|
-
} return $defineProperty(O, P, Attributes);
|
|
492
|
-
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
493
|
-
anObject$4(O);
|
|
494
|
-
P = toPropertyKey$1(P);
|
|
495
|
-
anObject$4(Attributes);
|
|
496
|
-
if (IE8_DOM_DEFINE$1) try {
|
|
497
|
-
return $defineProperty(O, P, Attributes);
|
|
498
|
-
} catch (error) { /* empty */ }
|
|
499
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
500
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
501
|
-
return O;
|
|
502
|
-
};
|
|
503
|
-
|
|
504
|
-
var ceil = Math.ceil;
|
|
505
|
-
var floor = Math.floor;
|
|
506
|
-
|
|
507
|
-
// `Math.trunc` method
|
|
508
|
-
// https://tc39.es/ecma262/#sec-math.trunc
|
|
509
|
-
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
510
|
-
var mathTrunc = Math.trunc || function trunc(x) {
|
|
511
|
-
var n = +x;
|
|
512
|
-
return (n > 0 ? floor : ceil)(n);
|
|
513
|
-
};
|
|
514
|
-
|
|
515
|
-
var trunc = mathTrunc;
|
|
516
|
-
|
|
517
|
-
// `ToIntegerOrInfinity` abstract operation
|
|
518
|
-
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
519
|
-
var toIntegerOrInfinity$2 = function (argument) {
|
|
520
|
-
var number = +argument;
|
|
521
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
522
|
-
return number !== number || number === 0 ? 0 : trunc(number);
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
526
|
-
|
|
527
|
-
var max = Math.max;
|
|
528
|
-
var min$1 = Math.min;
|
|
529
|
-
|
|
530
|
-
// Helper for a popular repeating case of the spec:
|
|
531
|
-
// Let integer be ? ToInteger(index).
|
|
532
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
533
|
-
var toAbsoluteIndex$1 = function (index, length) {
|
|
534
|
-
var integer = toIntegerOrInfinity$1(index);
|
|
535
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$2;
|
|
539
|
-
|
|
540
|
-
var min = Math.min;
|
|
541
|
-
|
|
542
|
-
// `ToLength` abstract operation
|
|
543
|
-
// https://tc39.es/ecma262/#sec-tolength
|
|
544
|
-
var toLength$1 = function (argument) {
|
|
545
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
var toLength = toLength$1;
|
|
549
|
-
|
|
550
|
-
// `LengthOfArrayLike` abstract operation
|
|
551
|
-
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
552
|
-
var lengthOfArrayLike$1 = function (obj) {
|
|
553
|
-
return toLength(obj.length);
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
var toIndexedObject$4 = toIndexedObject$5;
|
|
557
|
-
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
558
|
-
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
559
|
-
|
|
560
|
-
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
561
|
-
var createMethod = function (IS_INCLUDES) {
|
|
562
|
-
return function ($this, el, fromIndex) {
|
|
563
|
-
var O = toIndexedObject$4($this);
|
|
564
|
-
var length = lengthOfArrayLike(O);
|
|
565
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
566
|
-
var value;
|
|
567
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
568
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
569
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
|
570
|
-
value = O[index++];
|
|
571
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
572
|
-
if (value != value) return true;
|
|
573
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
574
|
-
} else for (;length > index; index++) {
|
|
575
|
-
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
576
|
-
} return !IS_INCLUDES && -1;
|
|
577
|
-
};
|
|
578
|
-
};
|
|
579
|
-
|
|
580
|
-
var arrayIncludes = {
|
|
581
|
-
// `Array.prototype.includes` method
|
|
582
|
-
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
583
|
-
includes: createMethod(true),
|
|
584
|
-
// `Array.prototype.indexOf` method
|
|
585
|
-
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
586
|
-
indexOf: createMethod(false)
|
|
587
|
-
};
|
|
588
|
-
|
|
589
|
-
var hiddenKeys$4 = {};
|
|
590
|
-
|
|
591
|
-
var uncurryThis$3 = functionUncurryThis;
|
|
592
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
593
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
594
|
-
var indexOf = arrayIncludes.indexOf;
|
|
595
|
-
var hiddenKeys$3 = hiddenKeys$4;
|
|
596
|
-
|
|
597
|
-
var push = uncurryThis$3([].push);
|
|
598
|
-
|
|
599
|
-
var objectKeysInternal = function (object, names) {
|
|
600
|
-
var O = toIndexedObject$3(object);
|
|
601
|
-
var i = 0;
|
|
602
|
-
var result = [];
|
|
603
|
-
var key;
|
|
604
|
-
for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push(result, key);
|
|
605
|
-
// Don't enum bug & hidden keys
|
|
606
|
-
while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
|
|
607
|
-
~indexOf(result, key) || push(result, key);
|
|
608
|
-
}
|
|
609
|
-
return result;
|
|
610
|
-
};
|
|
611
|
-
|
|
612
|
-
// IE8- don't enum bug keys
|
|
613
|
-
var enumBugKeys$3 = [
|
|
614
|
-
'constructor',
|
|
615
|
-
'hasOwnProperty',
|
|
616
|
-
'isPrototypeOf',
|
|
617
|
-
'propertyIsEnumerable',
|
|
618
|
-
'toLocaleString',
|
|
619
|
-
'toString',
|
|
620
|
-
'valueOf'
|
|
621
|
-
];
|
|
622
|
-
|
|
623
|
-
var internalObjectKeys$1 = objectKeysInternal;
|
|
624
|
-
var enumBugKeys$2 = enumBugKeys$3;
|
|
625
|
-
|
|
626
|
-
// `Object.keys` method
|
|
627
|
-
// https://tc39.es/ecma262/#sec-object.keys
|
|
628
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
629
|
-
var objectKeys$1 = Object.keys || function keys(O) {
|
|
630
|
-
return internalObjectKeys$1(O, enumBugKeys$2);
|
|
631
|
-
};
|
|
632
|
-
|
|
633
|
-
var DESCRIPTORS$5 = descriptors;
|
|
634
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
635
|
-
var definePropertyModule$3 = objectDefineProperty;
|
|
636
|
-
var anObject$3 = anObject$5;
|
|
637
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
638
|
-
var objectKeys = objectKeys$1;
|
|
639
|
-
|
|
640
|
-
// `Object.defineProperties` method
|
|
641
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
642
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
643
|
-
objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
644
|
-
anObject$3(O);
|
|
645
|
-
var props = toIndexedObject$2(Properties);
|
|
646
|
-
var keys = objectKeys(Properties);
|
|
647
|
-
var length = keys.length;
|
|
648
|
-
var index = 0;
|
|
649
|
-
var key;
|
|
650
|
-
while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
|
|
651
|
-
return O;
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
var getBuiltIn$1 = getBuiltIn$4;
|
|
655
|
-
|
|
656
|
-
var html$1 = getBuiltIn$1('document', 'documentElement');
|
|
657
|
-
|
|
658
|
-
var shared$1 = shared$3.exports;
|
|
659
|
-
var uid = uid$2;
|
|
660
|
-
|
|
661
|
-
var keys = shared$1('keys');
|
|
662
|
-
|
|
663
|
-
var sharedKey$3 = function (key) {
|
|
664
|
-
return keys[key] || (keys[key] = uid(key));
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
668
|
-
|
|
669
|
-
var anObject$2 = anObject$5;
|
|
670
|
-
var definePropertiesModule = objectDefineProperties;
|
|
671
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
672
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
673
|
-
var html = html$1;
|
|
674
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
675
|
-
var sharedKey$2 = sharedKey$3;
|
|
676
|
-
|
|
677
|
-
var GT = '>';
|
|
678
|
-
var LT = '<';
|
|
679
|
-
var PROTOTYPE = 'prototype';
|
|
680
|
-
var SCRIPT = 'script';
|
|
681
|
-
var IE_PROTO$1 = sharedKey$2('IE_PROTO');
|
|
682
|
-
|
|
683
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
684
|
-
|
|
685
|
-
var scriptTag = function (content) {
|
|
686
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
687
|
-
};
|
|
688
|
-
|
|
689
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
690
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
691
|
-
activeXDocument.write(scriptTag(''));
|
|
692
|
-
activeXDocument.close();
|
|
693
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
694
|
-
activeXDocument = null; // avoid memory leak
|
|
695
|
-
return temp;
|
|
696
|
-
};
|
|
697
|
-
|
|
698
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
699
|
-
var NullProtoObjectViaIFrame = function () {
|
|
700
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
701
|
-
var iframe = documentCreateElement$1('iframe');
|
|
702
|
-
var JS = 'java' + SCRIPT + ':';
|
|
703
|
-
var iframeDocument;
|
|
704
|
-
iframe.style.display = 'none';
|
|
705
|
-
html.appendChild(iframe);
|
|
706
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
707
|
-
iframe.src = String(JS);
|
|
708
|
-
iframeDocument = iframe.contentWindow.document;
|
|
709
|
-
iframeDocument.open();
|
|
710
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
711
|
-
iframeDocument.close();
|
|
712
|
-
return iframeDocument.F;
|
|
713
|
-
};
|
|
714
|
-
|
|
715
|
-
// Check for document.domain and active x support
|
|
716
|
-
// No need to use active x approach when document.domain is not set
|
|
717
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
718
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
719
|
-
// avoid IE GC bug
|
|
720
|
-
var activeXDocument;
|
|
721
|
-
var NullProtoObject = function () {
|
|
722
|
-
try {
|
|
723
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
724
|
-
} catch (error) { /* ignore */ }
|
|
725
|
-
NullProtoObject = typeof document != 'undefined'
|
|
726
|
-
? document.domain && activeXDocument
|
|
727
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
728
|
-
: NullProtoObjectViaIFrame()
|
|
729
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
730
|
-
var length = enumBugKeys$1.length;
|
|
731
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
732
|
-
return NullProtoObject();
|
|
733
|
-
};
|
|
734
|
-
|
|
735
|
-
hiddenKeys$2[IE_PROTO$1] = true;
|
|
736
|
-
|
|
737
|
-
// `Object.create` method
|
|
738
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
739
|
-
// eslint-disable-next-line es/no-object-create -- safe
|
|
740
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
741
|
-
var result;
|
|
742
|
-
if (O !== null) {
|
|
743
|
-
EmptyConstructor[PROTOTYPE] = anObject$2(O);
|
|
744
|
-
result = new EmptyConstructor();
|
|
745
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
746
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
747
|
-
result[IE_PROTO$1] = O;
|
|
748
|
-
} else result = NullProtoObject();
|
|
749
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
750
|
-
};
|
|
751
|
-
|
|
752
|
-
var wellKnownSymbol$4 = wellKnownSymbol$6;
|
|
753
|
-
var create$1 = objectCreate;
|
|
754
|
-
var defineProperty$3 = objectDefineProperty.f;
|
|
755
|
-
|
|
756
|
-
var UNSCOPABLES = wellKnownSymbol$4('unscopables');
|
|
757
|
-
var ArrayPrototype = Array.prototype;
|
|
758
|
-
|
|
759
|
-
// Array.prototype[@@unscopables]
|
|
760
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
761
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
762
|
-
defineProperty$3(ArrayPrototype, UNSCOPABLES, {
|
|
763
|
-
configurable: true,
|
|
764
|
-
value: create$1(null)
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
// add a key to Array.prototype[@@unscopables]
|
|
769
|
-
var addToUnscopables$1 = function (key) {
|
|
770
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
771
|
-
};
|
|
772
|
-
|
|
773
|
-
var iterators = {};
|
|
774
|
-
|
|
775
|
-
var global$4 = global$b;
|
|
776
|
-
var isCallable$8 = isCallable$e;
|
|
777
|
-
|
|
778
|
-
var WeakMap$1 = global$4.WeakMap;
|
|
779
|
-
|
|
780
|
-
var weakMapBasicDetection = isCallable$8(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
781
|
-
|
|
782
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
783
|
-
return {
|
|
784
|
-
enumerable: !(bitmap & 1),
|
|
785
|
-
configurable: !(bitmap & 2),
|
|
786
|
-
writable: !(bitmap & 4),
|
|
787
|
-
value: value
|
|
788
|
-
};
|
|
789
|
-
};
|
|
790
|
-
|
|
791
|
-
var DESCRIPTORS$4 = descriptors;
|
|
792
|
-
var definePropertyModule$2 = objectDefineProperty;
|
|
793
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
794
|
-
|
|
795
|
-
var createNonEnumerableProperty$4 = DESCRIPTORS$4 ? function (object, key, value) {
|
|
796
|
-
return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
|
|
797
|
-
} : function (object, key, value) {
|
|
798
|
-
object[key] = value;
|
|
799
|
-
return object;
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
803
|
-
var global$3 = global$b;
|
|
804
|
-
var isObject$2 = isObject$7;
|
|
805
|
-
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
806
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
807
|
-
var shared = sharedStore;
|
|
808
|
-
var sharedKey$1 = sharedKey$3;
|
|
809
|
-
var hiddenKeys$1 = hiddenKeys$4;
|
|
810
|
-
|
|
811
|
-
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
812
|
-
var TypeError$1 = global$3.TypeError;
|
|
813
|
-
var WeakMap = global$3.WeakMap;
|
|
814
|
-
var set, get, has;
|
|
815
|
-
|
|
816
|
-
var enforce = function (it) {
|
|
817
|
-
return has(it) ? get(it) : set(it, {});
|
|
818
|
-
};
|
|
819
|
-
|
|
820
|
-
var getterFor = function (TYPE) {
|
|
821
|
-
return function (it) {
|
|
822
|
-
var state;
|
|
823
|
-
if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
|
|
824
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
825
|
-
} return state;
|
|
826
|
-
};
|
|
827
|
-
};
|
|
828
|
-
|
|
829
|
-
if (NATIVE_WEAK_MAP || shared.state) {
|
|
830
|
-
var store$1 = shared.state || (shared.state = new WeakMap());
|
|
831
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
832
|
-
store$1.get = store$1.get;
|
|
833
|
-
store$1.has = store$1.has;
|
|
834
|
-
store$1.set = store$1.set;
|
|
835
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
836
|
-
set = function (it, metadata) {
|
|
837
|
-
if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
838
|
-
metadata.facade = it;
|
|
839
|
-
store$1.set(it, metadata);
|
|
840
|
-
return metadata;
|
|
841
|
-
};
|
|
842
|
-
get = function (it) {
|
|
843
|
-
return store$1.get(it) || {};
|
|
844
|
-
};
|
|
845
|
-
has = function (it) {
|
|
846
|
-
return store$1.has(it);
|
|
847
|
-
};
|
|
848
|
-
} else {
|
|
849
|
-
var STATE = sharedKey$1('state');
|
|
850
|
-
hiddenKeys$1[STATE] = true;
|
|
851
|
-
set = function (it, metadata) {
|
|
852
|
-
if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
853
|
-
metadata.facade = it;
|
|
854
|
-
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
855
|
-
return metadata;
|
|
856
|
-
};
|
|
857
|
-
get = function (it) {
|
|
858
|
-
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
859
|
-
};
|
|
860
|
-
has = function (it) {
|
|
861
|
-
return hasOwn$6(it, STATE);
|
|
862
|
-
};
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
var internalState = {
|
|
866
|
-
set: set,
|
|
867
|
-
get: get,
|
|
868
|
-
has: has,
|
|
869
|
-
enforce: enforce,
|
|
870
|
-
getterFor: getterFor
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
var objectGetOwnPropertyDescriptor = {};
|
|
874
|
-
|
|
875
|
-
var objectPropertyIsEnumerable = {};
|
|
876
|
-
|
|
877
|
-
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
878
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
879
|
-
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
880
|
-
|
|
881
|
-
// Nashorn ~ JDK8 bug
|
|
882
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
883
|
-
|
|
884
|
-
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
885
|
-
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
886
|
-
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
887
|
-
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
888
|
-
return !!descriptor && descriptor.enumerable;
|
|
889
|
-
} : $propertyIsEnumerable;
|
|
890
|
-
|
|
891
|
-
var DESCRIPTORS$3 = descriptors;
|
|
892
|
-
var call$1 = functionCall;
|
|
893
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
894
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
895
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
896
|
-
var toPropertyKey = toPropertyKey$2;
|
|
897
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
898
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
899
|
-
|
|
900
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
901
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
902
|
-
|
|
903
|
-
// `Object.getOwnPropertyDescriptor` method
|
|
904
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
905
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
906
|
-
O = toIndexedObject$1(O);
|
|
907
|
-
P = toPropertyKey(P);
|
|
908
|
-
if (IE8_DOM_DEFINE) try {
|
|
909
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
910
|
-
} catch (error) { /* empty */ }
|
|
911
|
-
if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$1(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
912
|
-
};
|
|
913
|
-
|
|
914
|
-
var makeBuiltIn$2 = {exports: {}};
|
|
915
|
-
|
|
916
|
-
var DESCRIPTORS$2 = descriptors;
|
|
917
|
-
var hasOwn$4 = hasOwnProperty_1;
|
|
918
|
-
|
|
919
|
-
var FunctionPrototype = Function.prototype;
|
|
920
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
921
|
-
var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
|
|
922
|
-
|
|
923
|
-
var EXISTS = hasOwn$4(FunctionPrototype, 'name');
|
|
924
|
-
// additional protection from minified / mangled / dropped function names
|
|
925
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
926
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
927
|
-
|
|
928
|
-
var functionName = {
|
|
929
|
-
EXISTS: EXISTS,
|
|
930
|
-
PROPER: PROPER,
|
|
931
|
-
CONFIGURABLE: CONFIGURABLE
|
|
932
|
-
};
|
|
933
|
-
|
|
934
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
935
|
-
var isCallable$7 = isCallable$e;
|
|
936
|
-
var store = sharedStore;
|
|
937
|
-
|
|
938
|
-
var functionToString = uncurryThis$2(Function.toString);
|
|
939
|
-
|
|
940
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
941
|
-
if (!isCallable$7(store.inspectSource)) {
|
|
942
|
-
store.inspectSource = function (it) {
|
|
943
|
-
return functionToString(it);
|
|
944
|
-
};
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
var inspectSource$1 = store.inspectSource;
|
|
948
|
-
|
|
949
|
-
var fails$3 = fails$a;
|
|
950
|
-
var isCallable$6 = isCallable$e;
|
|
951
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
952
|
-
var DESCRIPTORS$1 = descriptors;
|
|
953
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
954
|
-
var inspectSource = inspectSource$1;
|
|
955
|
-
var InternalStateModule$1 = internalState;
|
|
956
|
-
|
|
957
|
-
var enforceInternalState = InternalStateModule$1.enforce;
|
|
958
|
-
var getInternalState$1 = InternalStateModule$1.get;
|
|
959
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
960
|
-
var defineProperty$2 = Object.defineProperty;
|
|
961
|
-
|
|
962
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$3(function () {
|
|
963
|
-
return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
964
|
-
});
|
|
965
|
-
|
|
966
|
-
var TEMPLATE = String(String).split('String');
|
|
967
|
-
|
|
968
|
-
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
969
|
-
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
970
|
-
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
971
|
-
}
|
|
972
|
-
if (options && options.getter) name = 'get ' + name;
|
|
973
|
-
if (options && options.setter) name = 'set ' + name;
|
|
974
|
-
if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
975
|
-
if (DESCRIPTORS$1) defineProperty$2(value, 'name', { value: name, configurable: true });
|
|
976
|
-
else value.name = name;
|
|
977
|
-
}
|
|
978
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
|
|
979
|
-
defineProperty$2(value, 'length', { value: options.arity });
|
|
980
|
-
}
|
|
981
|
-
try {
|
|
982
|
-
if (options && hasOwn$3(options, 'constructor') && options.constructor) {
|
|
983
|
-
if (DESCRIPTORS$1) defineProperty$2(value, 'prototype', { writable: false });
|
|
984
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
985
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
986
|
-
} catch (error) { /* empty */ }
|
|
987
|
-
var state = enforceInternalState(value);
|
|
988
|
-
if (!hasOwn$3(state, 'source')) {
|
|
989
|
-
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
990
|
-
} return value;
|
|
991
|
-
};
|
|
992
|
-
|
|
993
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
994
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
995
|
-
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
996
|
-
return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
|
|
997
|
-
}, 'toString');
|
|
998
|
-
|
|
999
|
-
var isCallable$5 = isCallable$e;
|
|
1000
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
1001
|
-
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
1002
|
-
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
1003
|
-
|
|
1004
|
-
var defineBuiltIn$3 = function (O, key, value, options) {
|
|
1005
|
-
if (!options) options = {};
|
|
1006
|
-
var simple = options.enumerable;
|
|
1007
|
-
var name = options.name !== undefined ? options.name : key;
|
|
1008
|
-
if (isCallable$5(value)) makeBuiltIn(value, name, options);
|
|
1009
|
-
if (options.global) {
|
|
1010
|
-
if (simple) O[key] = value;
|
|
1011
|
-
else defineGlobalProperty$1(key, value);
|
|
1012
|
-
} else {
|
|
1013
|
-
try {
|
|
1014
|
-
if (!options.unsafe) delete O[key];
|
|
1015
|
-
else if (O[key]) simple = true;
|
|
1016
|
-
} catch (error) { /* empty */ }
|
|
1017
|
-
if (simple) O[key] = value;
|
|
1018
|
-
else definePropertyModule$1.f(O, key, {
|
|
1019
|
-
value: value,
|
|
1020
|
-
enumerable: false,
|
|
1021
|
-
configurable: !options.nonConfigurable,
|
|
1022
|
-
writable: !options.nonWritable
|
|
1023
|
-
});
|
|
1024
|
-
} return O;
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
var objectGetOwnPropertyNames = {};
|
|
1028
|
-
|
|
1029
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1030
|
-
var enumBugKeys = enumBugKeys$3;
|
|
1031
|
-
|
|
1032
|
-
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
|
|
1033
|
-
|
|
1034
|
-
// `Object.getOwnPropertyNames` method
|
|
1035
|
-
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1036
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
1037
|
-
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
1038
|
-
return internalObjectKeys(O, hiddenKeys);
|
|
1039
|
-
};
|
|
1040
|
-
|
|
1041
|
-
var objectGetOwnPropertySymbols = {};
|
|
1042
|
-
|
|
1043
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1044
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1045
|
-
|
|
1046
|
-
var getBuiltIn = getBuiltIn$4;
|
|
1047
|
-
var uncurryThis$1 = functionUncurryThis;
|
|
1048
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1049
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1050
|
-
var anObject$1 = anObject$5;
|
|
1051
|
-
|
|
1052
|
-
var concat = uncurryThis$1([].concat);
|
|
1053
|
-
|
|
1054
|
-
// all object keys, includes non-enumerable and symbols
|
|
1055
|
-
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1056
|
-
var keys = getOwnPropertyNamesModule.f(anObject$1(it));
|
|
1057
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1058
|
-
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
1059
|
-
};
|
|
1060
|
-
|
|
1061
|
-
var hasOwn$2 = hasOwnProperty_1;
|
|
1062
|
-
var ownKeys = ownKeys$1;
|
|
1063
|
-
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
1064
|
-
var definePropertyModule = objectDefineProperty;
|
|
1065
|
-
|
|
1066
|
-
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
1067
|
-
var keys = ownKeys(source);
|
|
1068
|
-
var defineProperty = definePropertyModule.f;
|
|
1069
|
-
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
1070
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1071
|
-
var key = keys[i];
|
|
1072
|
-
if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
|
|
1073
|
-
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
|
-
var fails$2 = fails$a;
|
|
1079
|
-
var isCallable$4 = isCallable$e;
|
|
1080
|
-
|
|
1081
|
-
var replacement = /#|\.prototype\./;
|
|
1082
|
-
|
|
1083
|
-
var isForced$1 = function (feature, detection) {
|
|
1084
|
-
var value = data[normalize(feature)];
|
|
1085
|
-
return value == POLYFILL ? true
|
|
1086
|
-
: value == NATIVE ? false
|
|
1087
|
-
: isCallable$4(detection) ? fails$2(detection)
|
|
1088
|
-
: !!detection;
|
|
1089
|
-
};
|
|
1090
|
-
|
|
1091
|
-
var normalize = isForced$1.normalize = function (string) {
|
|
1092
|
-
return String(string).replace(replacement, '.').toLowerCase();
|
|
1093
|
-
};
|
|
1094
|
-
|
|
1095
|
-
var data = isForced$1.data = {};
|
|
1096
|
-
var NATIVE = isForced$1.NATIVE = 'N';
|
|
1097
|
-
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
1098
|
-
|
|
1099
|
-
var isForced_1 = isForced$1;
|
|
1100
|
-
|
|
1101
|
-
var global$2 = global$b;
|
|
1102
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1103
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
1104
|
-
var defineBuiltIn$2 = defineBuiltIn$3;
|
|
1105
|
-
var defineGlobalProperty = defineGlobalProperty$3;
|
|
1106
|
-
var copyConstructorProperties = copyConstructorProperties$1;
|
|
1107
|
-
var isForced = isForced_1;
|
|
1108
|
-
|
|
1109
|
-
/*
|
|
1110
|
-
options.target - name of the target object
|
|
1111
|
-
options.global - target is the global object
|
|
1112
|
-
options.stat - export as static methods of target
|
|
1113
|
-
options.proto - export as prototype methods of target
|
|
1114
|
-
options.real - real prototype method for the `pure` version
|
|
1115
|
-
options.forced - export even if the native feature is available
|
|
1116
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
1117
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1118
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1119
|
-
options.sham - add a flag to not completely full polyfills
|
|
1120
|
-
options.enumerable - export as enumerable property
|
|
1121
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
1122
|
-
options.name - the .name of the function if it does not match the key
|
|
1123
|
-
*/
|
|
1124
|
-
var _export = function (options, source) {
|
|
1125
|
-
var TARGET = options.target;
|
|
1126
|
-
var GLOBAL = options.global;
|
|
1127
|
-
var STATIC = options.stat;
|
|
1128
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1129
|
-
if (GLOBAL) {
|
|
1130
|
-
target = global$2;
|
|
1131
|
-
} else if (STATIC) {
|
|
1132
|
-
target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1133
|
-
} else {
|
|
1134
|
-
target = (global$2[TARGET] || {}).prototype;
|
|
1135
|
-
}
|
|
1136
|
-
if (target) for (key in source) {
|
|
1137
|
-
sourceProperty = source[key];
|
|
1138
|
-
if (options.dontCallGetSet) {
|
|
1139
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1140
|
-
targetProperty = descriptor && descriptor.value;
|
|
1141
|
-
} else targetProperty = target[key];
|
|
1142
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1143
|
-
// contained in target
|
|
1144
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
1145
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1146
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1147
|
-
}
|
|
1148
|
-
// add a flag to not completely full polyfills
|
|
1149
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1150
|
-
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
1151
|
-
}
|
|
1152
|
-
defineBuiltIn$2(target, key, sourceProperty, options);
|
|
1153
|
-
}
|
|
1154
|
-
};
|
|
1155
|
-
|
|
1156
|
-
var fails$1 = fails$a;
|
|
1157
|
-
|
|
1158
|
-
var correctPrototypeGetter = !fails$1(function () {
|
|
1159
|
-
function F() { /* empty */ }
|
|
1160
|
-
F.prototype.constructor = null;
|
|
1161
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1162
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1163
|
-
});
|
|
1164
|
-
|
|
1165
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
1166
|
-
var isCallable$3 = isCallable$e;
|
|
1167
|
-
var toObject = toObject$2;
|
|
1168
|
-
var sharedKey = sharedKey$3;
|
|
1169
|
-
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1170
|
-
|
|
1171
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1172
|
-
var $Object = Object;
|
|
1173
|
-
var ObjectPrototype = $Object.prototype;
|
|
1174
|
-
|
|
1175
|
-
// `Object.getPrototypeOf` method
|
|
1176
|
-
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1177
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1178
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1179
|
-
var object = toObject(O);
|
|
1180
|
-
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1181
|
-
var constructor = object.constructor;
|
|
1182
|
-
if (isCallable$3(constructor) && object instanceof constructor) {
|
|
1183
|
-
return constructor.prototype;
|
|
1184
|
-
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1185
|
-
};
|
|
1186
|
-
|
|
1187
|
-
var fails = fails$a;
|
|
1188
|
-
var isCallable$2 = isCallable$e;
|
|
1189
|
-
var isObject$1 = isObject$7;
|
|
1190
|
-
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1191
|
-
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
1192
|
-
var wellKnownSymbol$3 = wellKnownSymbol$6;
|
|
1193
|
-
|
|
1194
|
-
var ITERATOR$2 = wellKnownSymbol$3('iterator');
|
|
1195
|
-
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1196
|
-
|
|
1197
|
-
// `%IteratorPrototype%` object
|
|
1198
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1199
|
-
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1200
|
-
|
|
1201
|
-
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1202
|
-
if ([].keys) {
|
|
1203
|
-
arrayIterator = [].keys();
|
|
1204
|
-
// Safari 8 has buggy iterators w/o `next`
|
|
1205
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1206
|
-
else {
|
|
1207
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
|
|
1208
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$1(IteratorPrototype$2) || fails(function () {
|
|
1213
|
-
var test = {};
|
|
1214
|
-
// FF44- legacy iterators case
|
|
1215
|
-
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
1216
|
-
});
|
|
1217
|
-
|
|
1218
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1219
|
-
|
|
1220
|
-
// `%IteratorPrototype%[@@iterator]()` method
|
|
1221
|
-
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1222
|
-
if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
|
|
1223
|
-
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1224
|
-
return this;
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
var iteratorsCore = {
|
|
1229
|
-
IteratorPrototype: IteratorPrototype$2,
|
|
1230
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1231
|
-
};
|
|
1232
|
-
|
|
1233
|
-
var defineProperty$1 = objectDefineProperty.f;
|
|
1234
|
-
var hasOwn = hasOwnProperty_1;
|
|
1235
|
-
var wellKnownSymbol$2 = wellKnownSymbol$6;
|
|
1236
|
-
|
|
1237
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
1238
|
-
|
|
1239
|
-
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1240
|
-
if (target && !STATIC) target = target.prototype;
|
|
1241
|
-
if (target && !hasOwn(target, TO_STRING_TAG$1)) {
|
|
1242
|
-
defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1243
|
-
}
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1247
|
-
var create = objectCreate;
|
|
1248
|
-
var createPropertyDescriptor = createPropertyDescriptor$3;
|
|
1249
|
-
var setToStringTag$1 = setToStringTag$2;
|
|
1250
|
-
var Iterators$2 = iterators;
|
|
1251
|
-
|
|
1252
|
-
var returnThis$1 = function () { return this; };
|
|
1253
|
-
|
|
1254
|
-
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1255
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1256
|
-
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1257
|
-
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
|
|
1258
|
-
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
1259
|
-
return IteratorConstructor;
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
var isCallable$1 = isCallable$e;
|
|
1263
|
-
|
|
1264
|
-
var $String = String;
|
|
1265
|
-
var $TypeError = TypeError;
|
|
1266
|
-
|
|
1267
|
-
var aPossiblePrototype$1 = function (argument) {
|
|
1268
|
-
if (typeof argument == 'object' || isCallable$1(argument)) return argument;
|
|
1269
|
-
throw $TypeError("Can't set " + $String(argument) + ' as a prototype');
|
|
1270
|
-
};
|
|
1271
|
-
|
|
1272
|
-
/* eslint-disable no-proto -- safe */
|
|
1273
|
-
|
|
1274
|
-
var uncurryThis = functionUncurryThis;
|
|
1275
|
-
var anObject = anObject$5;
|
|
1276
|
-
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1277
|
-
|
|
1278
|
-
// `Object.setPrototypeOf` method
|
|
1279
|
-
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1280
|
-
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1281
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1282
|
-
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1283
|
-
var CORRECT_SETTER = false;
|
|
1284
|
-
var test = {};
|
|
1285
|
-
var setter;
|
|
1286
|
-
try {
|
|
1287
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1288
|
-
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1289
|
-
setter(test, []);
|
|
1290
|
-
CORRECT_SETTER = test instanceof Array;
|
|
1291
|
-
} catch (error) { /* empty */ }
|
|
1292
|
-
return function setPrototypeOf(O, proto) {
|
|
1293
|
-
anObject(O);
|
|
1294
|
-
aPossiblePrototype(proto);
|
|
1295
|
-
if (CORRECT_SETTER) setter(O, proto);
|
|
1296
|
-
else O.__proto__ = proto;
|
|
1297
|
-
return O;
|
|
1298
|
-
};
|
|
1299
|
-
}() : undefined);
|
|
1300
|
-
|
|
1301
|
-
var $ = _export;
|
|
1302
|
-
var call = functionCall;
|
|
1303
|
-
var FunctionName = functionName;
|
|
1304
|
-
var isCallable = isCallable$e;
|
|
1305
|
-
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1306
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
1307
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
1308
|
-
var setToStringTag = setToStringTag$2;
|
|
1309
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1310
|
-
var defineBuiltIn = defineBuiltIn$3;
|
|
1311
|
-
var wellKnownSymbol$1 = wellKnownSymbol$6;
|
|
1312
|
-
var Iterators$1 = iterators;
|
|
1313
|
-
var IteratorsCore = iteratorsCore;
|
|
1314
|
-
|
|
1315
|
-
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
1316
|
-
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1317
|
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1318
|
-
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1319
|
-
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
1320
|
-
var KEYS = 'keys';
|
|
1321
|
-
var VALUES = 'values';
|
|
1322
|
-
var ENTRIES = 'entries';
|
|
1323
|
-
|
|
1324
|
-
var returnThis = function () { return this; };
|
|
1325
|
-
|
|
1326
|
-
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1327
|
-
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1328
|
-
|
|
1329
|
-
var getIterationMethod = function (KIND) {
|
|
1330
|
-
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
|
|
1331
|
-
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
|
|
1332
|
-
switch (KIND) {
|
|
1333
|
-
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
|
|
1334
|
-
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
|
|
1335
|
-
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
|
|
1336
|
-
} return function () { return new IteratorConstructor(this); };
|
|
1337
|
-
};
|
|
1338
|
-
|
|
1339
|
-
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1340
|
-
var INCORRECT_VALUES_NAME = false;
|
|
1341
|
-
var IterablePrototype = Iterable.prototype;
|
|
1342
|
-
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
1343
|
-
|| IterablePrototype['@@iterator']
|
|
1344
|
-
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1345
|
-
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
1346
|
-
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
|
|
1347
|
-
var CurrentIteratorPrototype, methods, KEY;
|
|
1348
|
-
|
|
1349
|
-
// fix native
|
|
1350
|
-
if (anyNativeIterator) {
|
|
1351
|
-
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1352
|
-
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1353
|
-
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1354
|
-
if (setPrototypeOf) {
|
|
1355
|
-
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1356
|
-
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1357
|
-
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1358
|
-
}
|
|
1359
|
-
}
|
|
1360
|
-
// Set @@toStringTag to native iterators
|
|
1361
|
-
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1366
|
-
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1367
|
-
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1368
|
-
createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
|
|
1369
|
-
} else {
|
|
1370
|
-
INCORRECT_VALUES_NAME = true;
|
|
1371
|
-
defaultIterator = function values() { return call(nativeIterator, this); };
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
// export additional methods
|
|
1376
|
-
if (DEFAULT) {
|
|
1377
|
-
methods = {
|
|
1378
|
-
values: getIterationMethod(VALUES),
|
|
1379
|
-
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
|
|
1380
|
-
entries: getIterationMethod(ENTRIES)
|
|
1381
|
-
};
|
|
1382
|
-
if (FORCED) for (KEY in methods) {
|
|
1383
|
-
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1384
|
-
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1385
|
-
}
|
|
1386
|
-
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
// define iterator
|
|
1390
|
-
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1391
|
-
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1392
|
-
}
|
|
1393
|
-
Iterators$1[NAME] = defaultIterator;
|
|
1394
|
-
|
|
1395
|
-
return methods;
|
|
1396
|
-
};
|
|
1397
|
-
|
|
1398
|
-
// `CreateIterResultObject` abstract operation
|
|
1399
|
-
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1400
|
-
var createIterResultObject$1 = function (value, done) {
|
|
1401
|
-
return { value: value, done: done };
|
|
1402
|
-
};
|
|
1403
|
-
|
|
1404
|
-
var toIndexedObject = toIndexedObject$5;
|
|
1405
|
-
var addToUnscopables = addToUnscopables$1;
|
|
1406
|
-
var Iterators = iterators;
|
|
1407
|
-
var InternalStateModule = internalState;
|
|
1408
|
-
var defineProperty = objectDefineProperty.f;
|
|
1409
|
-
var defineIterator = iteratorDefine;
|
|
1410
|
-
var createIterResultObject = createIterResultObject$1;
|
|
1411
|
-
var DESCRIPTORS = descriptors;
|
|
1412
|
-
|
|
1413
|
-
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1414
|
-
var setInternalState = InternalStateModule.set;
|
|
1415
|
-
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
|
|
1416
|
-
|
|
1417
|
-
// `Array.prototype.entries` method
|
|
1418
|
-
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
1419
|
-
// `Array.prototype.keys` method
|
|
1420
|
-
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
1421
|
-
// `Array.prototype.values` method
|
|
1422
|
-
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
1423
|
-
// `Array.prototype[@@iterator]` method
|
|
1424
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
1425
|
-
// `CreateArrayIterator` internal method
|
|
1426
|
-
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1427
|
-
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1428
|
-
setInternalState(this, {
|
|
1429
|
-
type: ARRAY_ITERATOR,
|
|
1430
|
-
target: toIndexedObject(iterated), // target
|
|
1431
|
-
index: 0, // next index
|
|
1432
|
-
kind: kind // kind
|
|
1433
|
-
});
|
|
1434
|
-
// `%ArrayIteratorPrototype%.next` method
|
|
1435
|
-
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
1436
|
-
}, function () {
|
|
1437
|
-
var state = getInternalState(this);
|
|
1438
|
-
var target = state.target;
|
|
1439
|
-
var kind = state.kind;
|
|
1440
|
-
var index = state.index++;
|
|
1441
|
-
if (!target || index >= target.length) {
|
|
1442
|
-
state.target = undefined;
|
|
1443
|
-
return createIterResultObject(undefined, true);
|
|
1444
|
-
}
|
|
1445
|
-
if (kind == 'keys') return createIterResultObject(index, false);
|
|
1446
|
-
if (kind == 'values') return createIterResultObject(target[index], false);
|
|
1447
|
-
return createIterResultObject([index, target[index]], false);
|
|
1448
|
-
}, 'values');
|
|
1449
|
-
|
|
1450
|
-
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1451
|
-
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1452
|
-
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1453
|
-
var values = Iterators.Arguments = Iterators.Array;
|
|
1454
|
-
|
|
1455
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1456
|
-
addToUnscopables('keys');
|
|
1457
|
-
addToUnscopables('values');
|
|
1458
|
-
addToUnscopables('entries');
|
|
1459
|
-
|
|
1460
|
-
// V8 ~ Chrome 45- bug
|
|
1461
|
-
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1462
|
-
defineProperty(values, 'name', { value: 'values' });
|
|
1463
|
-
} catch (error) { /* empty */ }
|
|
1464
|
-
|
|
1465
|
-
// iterable DOM collections
|
|
1466
|
-
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1467
|
-
var domIterables = {
|
|
1468
|
-
CSSRuleList: 0,
|
|
1469
|
-
CSSStyleDeclaration: 0,
|
|
1470
|
-
CSSValueList: 0,
|
|
1471
|
-
ClientRectList: 0,
|
|
1472
|
-
DOMRectList: 0,
|
|
1473
|
-
DOMStringList: 0,
|
|
1474
|
-
DOMTokenList: 1,
|
|
1475
|
-
DataTransferItemList: 0,
|
|
1476
|
-
FileList: 0,
|
|
1477
|
-
HTMLAllCollection: 0,
|
|
1478
|
-
HTMLCollection: 0,
|
|
1479
|
-
HTMLFormElement: 0,
|
|
1480
|
-
HTMLSelectElement: 0,
|
|
1481
|
-
MediaList: 0,
|
|
1482
|
-
MimeTypeArray: 0,
|
|
1483
|
-
NamedNodeMap: 0,
|
|
1484
|
-
NodeList: 1,
|
|
1485
|
-
PaintRequestList: 0,
|
|
1486
|
-
Plugin: 0,
|
|
1487
|
-
PluginArray: 0,
|
|
1488
|
-
SVGLengthList: 0,
|
|
1489
|
-
SVGNumberList: 0,
|
|
1490
|
-
SVGPathSegList: 0,
|
|
1491
|
-
SVGPointList: 0,
|
|
1492
|
-
SVGStringList: 0,
|
|
1493
|
-
SVGTransformList: 0,
|
|
1494
|
-
SourceBufferList: 0,
|
|
1495
|
-
StyleSheetList: 0,
|
|
1496
|
-
TextTrackCueList: 0,
|
|
1497
|
-
TextTrackList: 0,
|
|
1498
|
-
TouchList: 0
|
|
1499
|
-
};
|
|
1500
|
-
|
|
1501
|
-
// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
|
|
1502
|
-
var documentCreateElement = documentCreateElement$2;
|
|
1503
|
-
|
|
1504
|
-
var classList = documentCreateElement('span').classList;
|
|
1505
|
-
var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
|
|
1506
|
-
|
|
1507
|
-
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1508
|
-
|
|
1509
|
-
var global$1 = global$b;
|
|
1510
|
-
var DOMIterables = domIterables;
|
|
1511
|
-
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1512
|
-
var ArrayIteratorMethods = es_array_iterator;
|
|
1513
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1514
|
-
var wellKnownSymbol = wellKnownSymbol$6;
|
|
1515
|
-
|
|
1516
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
1517
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1518
|
-
var ArrayValues = ArrayIteratorMethods.values;
|
|
1519
|
-
|
|
1520
|
-
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1521
|
-
if (CollectionPrototype) {
|
|
1522
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1523
|
-
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
1524
|
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
|
1525
|
-
} catch (error) {
|
|
1526
|
-
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
1527
|
-
}
|
|
1528
|
-
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1529
|
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1530
|
-
}
|
|
1531
|
-
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1532
|
-
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1533
|
-
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
1534
|
-
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
1535
|
-
} catch (error) {
|
|
1536
|
-
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
};
|
|
1541
|
-
|
|
1542
|
-
for (var COLLECTION_NAME in DOMIterables) {
|
|
1543
|
-
handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1547
|
-
|
|
1548
4
|
const isObject = value => typeof value === 'object' && value !== null && value !== undefined && typeof value !== 'function' && typeof value !== 'symbol' && typeof value !== 'bigint' && !Array.isArray(value) && !(value instanceof Date);
|
|
1549
5
|
/**
|
|
1550
6
|
* Watches for changes in the source and calls the callback when the source changes
|