@ninetailed/experience.js 1.8.1 → 2.0.0-beta.12
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.d.ts +1 -0
- package/index.esm.js +1217 -1181
- package/index.umd.js +1363 -1184
- package/lib/Ninetailed.d.ts +1 -1
- package/lib/analytics/utility/debug.d.ts +2 -2
- package/lib/experience/constants.d.ts +1 -0
- package/lib/experience/index.d.ts +8 -0
- package/lib/experience/selectActiveExperiments.d.ts +3 -0
- package/lib/experience/selectBaselineWithVariants.d.ts +2 -0
- package/lib/experience/selectEglibleExperiences.d.ts +12 -0
- package/lib/experience/selectExperience.d.ts +9 -0
- package/lib/experience/selectHasVariants.d.ts +2 -0
- package/lib/experience/selectVariant.d.ts +9 -0
- package/lib/experience/selectVariants.d.ts +2 -0
- package/lib/experience/types/Baseline.d.ts +3 -0
- package/lib/experience/types/BaselineWithVariants.d.ts +6 -0
- package/lib/experience/types/Distribution.d.ts +5 -0
- package/lib/experience/types/ExperienceConfiguration.d.ts +13 -0
- package/lib/experience/types/Variant.d.ts +4 -0
- package/lib/experience/types/index.d.ts +5 -0
- package/lib/experience/utils.d.ts +4 -0
- package/lib/selectVariant.d.ts +1 -1
- package/lib/types.d.ts +18 -5
- package/package.json +5 -3
package/index.umd.js
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/get'), require('lodash/unionBy'), require('@ninetailed/experience.js-shared'), require('analytics'), require('lodash/flatten'), require('lodash/find'), require('lodash/includes')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'lodash/get', 'lodash/unionBy', '@ninetailed/experience.js-shared', 'analytics', 'lodash/flatten', 'lodash/find', 'lodash/includes'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Javascript = {}, global.get$2, global.unionBy, global.experience_jsShared, global.Analytics, global.flatten, global.find, global.includes));
|
|
5
|
-
})(this, (function (exports, get$2, unionBy, experience_jsShared, Analytics, flatten, find, includes) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash/get'), require('lodash/unionBy'), require('@ninetailed/experience.js-shared'), require('loglevel'), require('analytics'), require('lodash/flatten'), require('lodash/find'), require('lodash/includes'), require('lodash/pickBy'), require('murmurhash-js')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lodash/get', 'lodash/unionBy', '@ninetailed/experience.js-shared', 'loglevel', 'analytics', 'lodash/flatten', 'lodash/find', 'lodash/includes', 'lodash/pickBy', 'murmurhash-js'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Javascript = {}, global.get$2, global.unionBy, global.experience_jsShared, global.loglevel, global.Analytics, global.flatten, global.find, global.includes, global.pickBy, global.murmurhashJs));
|
|
5
|
+
})(this, (function (exports, get$2, unionBy, experience_jsShared, loglevel, Analytics, flatten, find, includes, pickBy, murmurhashJs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
+
function _interopNamespace(e) {
|
|
10
|
+
if (e && e.__esModule) return e;
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n["default"] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
9
27
|
var get__default = /*#__PURE__*/_interopDefaultLegacy(get$2);
|
|
10
28
|
var unionBy__default = /*#__PURE__*/_interopDefaultLegacy(unionBy);
|
|
29
|
+
var loglevel__namespace = /*#__PURE__*/_interopNamespace(loglevel);
|
|
11
30
|
var Analytics__default = /*#__PURE__*/_interopDefaultLegacy(Analytics);
|
|
12
31
|
var flatten__default = /*#__PURE__*/_interopDefaultLegacy(flatten);
|
|
13
32
|
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
14
33
|
var includes__default = /*#__PURE__*/_interopDefaultLegacy(includes);
|
|
34
|
+
var pickBy__default = /*#__PURE__*/_interopDefaultLegacy(pickBy);
|
|
15
35
|
|
|
16
36
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
37
|
|
|
@@ -20,7 +40,7 @@
|
|
|
20
40
|
};
|
|
21
41
|
|
|
22
42
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
23
|
-
var global$
|
|
43
|
+
var global$F =
|
|
24
44
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
25
45
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
26
46
|
check(typeof window == 'object' && window) ||
|
|
@@ -32,7 +52,7 @@
|
|
|
32
52
|
|
|
33
53
|
var objectGetOwnPropertyDescriptor = {};
|
|
34
54
|
|
|
35
|
-
var fails$
|
|
55
|
+
var fails$f = function (exec) {
|
|
36
56
|
try {
|
|
37
57
|
return !!exec();
|
|
38
58
|
} catch (error) {
|
|
@@ -40,17 +60,17 @@
|
|
|
40
60
|
}
|
|
41
61
|
};
|
|
42
62
|
|
|
43
|
-
var fails$
|
|
63
|
+
var fails$e = fails$f;
|
|
44
64
|
|
|
45
65
|
// Detect IE8's incomplete defineProperty implementation
|
|
46
|
-
var descriptors = !fails$
|
|
66
|
+
var descriptors = !fails$e(function () {
|
|
47
67
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
48
68
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
49
69
|
});
|
|
50
70
|
|
|
51
|
-
var fails$
|
|
71
|
+
var fails$d = fails$f;
|
|
52
72
|
|
|
53
|
-
var functionBindNative = !fails$
|
|
73
|
+
var functionBindNative = !fails$d(function () {
|
|
54
74
|
var test = (function () { /* empty */ }).bind();
|
|
55
75
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
56
76
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -58,25 +78,25 @@
|
|
|
58
78
|
|
|
59
79
|
var NATIVE_BIND$3 = functionBindNative;
|
|
60
80
|
|
|
61
|
-
var call$
|
|
81
|
+
var call$d = Function.prototype.call;
|
|
62
82
|
|
|
63
|
-
var functionCall = NATIVE_BIND$3 ? call$
|
|
64
|
-
return call$
|
|
83
|
+
var functionCall = NATIVE_BIND$3 ? call$d.bind(call$d) : function () {
|
|
84
|
+
return call$d.apply(call$d, arguments);
|
|
65
85
|
};
|
|
66
86
|
|
|
67
87
|
var objectPropertyIsEnumerable = {};
|
|
68
88
|
|
|
69
89
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
70
90
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
71
|
-
var getOwnPropertyDescriptor$
|
|
91
|
+
var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
|
|
72
92
|
|
|
73
93
|
// Nashorn ~ JDK8 bug
|
|
74
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
94
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
75
95
|
|
|
76
96
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
77
97
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
78
98
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
79
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
99
|
+
var descriptor = getOwnPropertyDescriptor$3(this, V);
|
|
80
100
|
return !!descriptor && descriptor.enumerable;
|
|
81
101
|
} : $propertyIsEnumerable;
|
|
82
102
|
|
|
@@ -93,99 +113,99 @@
|
|
|
93
113
|
|
|
94
114
|
var FunctionPrototype$2 = Function.prototype;
|
|
95
115
|
var bind$5 = FunctionPrototype$2.bind;
|
|
96
|
-
var call$
|
|
97
|
-
var uncurryThis$
|
|
116
|
+
var call$c = FunctionPrototype$2.call;
|
|
117
|
+
var uncurryThis$k = NATIVE_BIND$2 && bind$5.bind(call$c, call$c);
|
|
98
118
|
|
|
99
119
|
var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
|
|
100
|
-
return fn && uncurryThis$
|
|
120
|
+
return fn && uncurryThis$k(fn);
|
|
101
121
|
} : function (fn) {
|
|
102
122
|
return fn && function () {
|
|
103
|
-
return call$
|
|
123
|
+
return call$c.apply(fn, arguments);
|
|
104
124
|
};
|
|
105
125
|
};
|
|
106
126
|
|
|
107
|
-
var uncurryThis$
|
|
127
|
+
var uncurryThis$j = functionUncurryThis;
|
|
108
128
|
|
|
109
|
-
var toString$
|
|
110
|
-
var stringSlice = uncurryThis$
|
|
129
|
+
var toString$6 = uncurryThis$j({}.toString);
|
|
130
|
+
var stringSlice$5 = uncurryThis$j(''.slice);
|
|
111
131
|
|
|
112
132
|
var classofRaw$1 = function (it) {
|
|
113
|
-
return stringSlice(toString$
|
|
133
|
+
return stringSlice$5(toString$6(it), 8, -1);
|
|
114
134
|
};
|
|
115
135
|
|
|
116
|
-
var global$
|
|
117
|
-
var uncurryThis$
|
|
118
|
-
var fails$
|
|
119
|
-
var classof$
|
|
136
|
+
var global$E = global$F;
|
|
137
|
+
var uncurryThis$i = functionUncurryThis;
|
|
138
|
+
var fails$c = fails$f;
|
|
139
|
+
var classof$7 = classofRaw$1;
|
|
120
140
|
|
|
121
|
-
var Object$4 = global$
|
|
122
|
-
var split = uncurryThis$
|
|
141
|
+
var Object$4 = global$E.Object;
|
|
142
|
+
var split = uncurryThis$i(''.split);
|
|
123
143
|
|
|
124
144
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
125
|
-
var indexedObject = fails$
|
|
145
|
+
var indexedObject = fails$c(function () {
|
|
126
146
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
127
147
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
128
148
|
return !Object$4('z').propertyIsEnumerable(0);
|
|
129
149
|
}) ? function (it) {
|
|
130
|
-
return classof$
|
|
150
|
+
return classof$7(it) == 'String' ? split(it, '') : Object$4(it);
|
|
131
151
|
} : Object$4;
|
|
132
152
|
|
|
133
|
-
var global$
|
|
153
|
+
var global$D = global$F;
|
|
134
154
|
|
|
135
|
-
var TypeError$
|
|
155
|
+
var TypeError$g = global$D.TypeError;
|
|
136
156
|
|
|
137
157
|
// `RequireObjectCoercible` abstract operation
|
|
138
158
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
139
|
-
var requireObjectCoercible$
|
|
140
|
-
if (it == undefined) throw TypeError$
|
|
159
|
+
var requireObjectCoercible$5 = function (it) {
|
|
160
|
+
if (it == undefined) throw TypeError$g("Can't call method on " + it);
|
|
141
161
|
return it;
|
|
142
162
|
};
|
|
143
163
|
|
|
144
164
|
// toObject with fallback for non-array-like ES3 strings
|
|
145
165
|
var IndexedObject$1 = indexedObject;
|
|
146
|
-
var requireObjectCoercible$
|
|
166
|
+
var requireObjectCoercible$4 = requireObjectCoercible$5;
|
|
147
167
|
|
|
148
|
-
var toIndexedObject$
|
|
149
|
-
return IndexedObject$1(requireObjectCoercible$
|
|
168
|
+
var toIndexedObject$4 = function (it) {
|
|
169
|
+
return IndexedObject$1(requireObjectCoercible$4(it));
|
|
150
170
|
};
|
|
151
171
|
|
|
152
172
|
// `IsCallable` abstract operation
|
|
153
173
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
154
|
-
var isCallable$
|
|
174
|
+
var isCallable$g = function (argument) {
|
|
155
175
|
return typeof argument == 'function';
|
|
156
176
|
};
|
|
157
177
|
|
|
158
|
-
var isCallable$
|
|
178
|
+
var isCallable$f = isCallable$g;
|
|
159
179
|
|
|
160
|
-
var isObject$
|
|
161
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
180
|
+
var isObject$8 = function (it) {
|
|
181
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
162
182
|
};
|
|
163
183
|
|
|
164
|
-
var global$
|
|
165
|
-
var isCallable$
|
|
184
|
+
var global$C = global$F;
|
|
185
|
+
var isCallable$e = isCallable$g;
|
|
166
186
|
|
|
167
187
|
var aFunction = function (argument) {
|
|
168
|
-
return isCallable$
|
|
188
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
169
189
|
};
|
|
170
190
|
|
|
171
191
|
var getBuiltIn$7 = function (namespace, method) {
|
|
172
|
-
return arguments.length < 2 ? aFunction(global$
|
|
192
|
+
return arguments.length < 2 ? aFunction(global$C[namespace]) : global$C[namespace] && global$C[namespace][method];
|
|
173
193
|
};
|
|
174
194
|
|
|
175
|
-
var uncurryThis$
|
|
195
|
+
var uncurryThis$h = functionUncurryThis;
|
|
176
196
|
|
|
177
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
197
|
+
var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
178
198
|
|
|
179
199
|
var getBuiltIn$6 = getBuiltIn$7;
|
|
180
200
|
|
|
181
201
|
var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || '';
|
|
182
202
|
|
|
183
|
-
var global$
|
|
203
|
+
var global$B = global$F;
|
|
184
204
|
var userAgent$3 = engineUserAgent;
|
|
185
205
|
|
|
186
|
-
var process$
|
|
187
|
-
var Deno = global$
|
|
188
|
-
var versions = process$
|
|
206
|
+
var process$3 = global$B.process;
|
|
207
|
+
var Deno = global$B.Deno;
|
|
208
|
+
var versions = process$3 && process$3.versions || Deno && Deno.version;
|
|
189
209
|
var v8 = versions && versions.v8;
|
|
190
210
|
var match, version;
|
|
191
211
|
|
|
@@ -211,10 +231,10 @@
|
|
|
211
231
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
212
232
|
|
|
213
233
|
var V8_VERSION$1 = engineV8Version;
|
|
214
|
-
var fails$
|
|
234
|
+
var fails$b = fails$f;
|
|
215
235
|
|
|
216
236
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
217
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
237
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$b(function () {
|
|
218
238
|
var symbol = Symbol();
|
|
219
239
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
220
240
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -231,97 +251,97 @@
|
|
|
231
251
|
&& !Symbol.sham
|
|
232
252
|
&& typeof Symbol.iterator == 'symbol';
|
|
233
253
|
|
|
234
|
-
var global$
|
|
254
|
+
var global$A = global$F;
|
|
235
255
|
var getBuiltIn$5 = getBuiltIn$7;
|
|
236
|
-
var isCallable$
|
|
256
|
+
var isCallable$d = isCallable$g;
|
|
237
257
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
238
258
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
239
259
|
|
|
240
|
-
var Object$3 = global$
|
|
260
|
+
var Object$3 = global$A.Object;
|
|
241
261
|
|
|
242
262
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
243
263
|
return typeof it == 'symbol';
|
|
244
264
|
} : function (it) {
|
|
245
265
|
var $Symbol = getBuiltIn$5('Symbol');
|
|
246
|
-
return isCallable$
|
|
266
|
+
return isCallable$d($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$3(it));
|
|
247
267
|
};
|
|
248
268
|
|
|
249
|
-
var global$
|
|
269
|
+
var global$z = global$F;
|
|
250
270
|
|
|
251
|
-
var String$
|
|
271
|
+
var String$5 = global$z.String;
|
|
252
272
|
|
|
253
273
|
var tryToString$4 = function (argument) {
|
|
254
274
|
try {
|
|
255
|
-
return String$
|
|
275
|
+
return String$5(argument);
|
|
256
276
|
} catch (error) {
|
|
257
277
|
return 'Object';
|
|
258
278
|
}
|
|
259
279
|
};
|
|
260
280
|
|
|
261
|
-
var global$
|
|
262
|
-
var isCallable$
|
|
281
|
+
var global$y = global$F;
|
|
282
|
+
var isCallable$c = isCallable$g;
|
|
263
283
|
var tryToString$3 = tryToString$4;
|
|
264
284
|
|
|
265
|
-
var TypeError$
|
|
285
|
+
var TypeError$f = global$y.TypeError;
|
|
266
286
|
|
|
267
287
|
// `Assert: IsCallable(argument) is true`
|
|
268
288
|
var aCallable$5 = function (argument) {
|
|
269
|
-
if (isCallable$
|
|
270
|
-
throw TypeError$
|
|
289
|
+
if (isCallable$c(argument)) return argument;
|
|
290
|
+
throw TypeError$f(tryToString$3(argument) + ' is not a function');
|
|
271
291
|
};
|
|
272
292
|
|
|
273
293
|
var aCallable$4 = aCallable$5;
|
|
274
294
|
|
|
275
295
|
// `GetMethod` abstract operation
|
|
276
296
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
277
|
-
var getMethod$
|
|
297
|
+
var getMethod$4 = function (V, P) {
|
|
278
298
|
var func = V[P];
|
|
279
299
|
return func == null ? undefined : aCallable$4(func);
|
|
280
300
|
};
|
|
281
301
|
|
|
282
|
-
var global$
|
|
283
|
-
var call$
|
|
284
|
-
var isCallable$
|
|
285
|
-
var isObject$
|
|
302
|
+
var global$x = global$F;
|
|
303
|
+
var call$b = functionCall;
|
|
304
|
+
var isCallable$b = isCallable$g;
|
|
305
|
+
var isObject$7 = isObject$8;
|
|
286
306
|
|
|
287
|
-
var TypeError$
|
|
307
|
+
var TypeError$e = global$x.TypeError;
|
|
288
308
|
|
|
289
309
|
// `OrdinaryToPrimitive` abstract operation
|
|
290
310
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
291
311
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
292
312
|
var fn, val;
|
|
293
|
-
if (pref === 'string' && isCallable$
|
|
294
|
-
if (isCallable$
|
|
295
|
-
if (pref !== 'string' && isCallable$
|
|
296
|
-
throw TypeError$
|
|
313
|
+
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$b(fn, input))) return val;
|
|
314
|
+
if (isCallable$b(fn = input.valueOf) && !isObject$7(val = call$b(fn, input))) return val;
|
|
315
|
+
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$b(fn, input))) return val;
|
|
316
|
+
throw TypeError$e("Can't convert object to primitive value");
|
|
297
317
|
};
|
|
298
318
|
|
|
299
|
-
var shared$
|
|
319
|
+
var shared$4 = {exports: {}};
|
|
300
320
|
|
|
301
|
-
var global$
|
|
321
|
+
var global$w = global$F;
|
|
302
322
|
|
|
303
323
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
304
324
|
var defineProperty$2 = Object.defineProperty;
|
|
305
325
|
|
|
306
326
|
var setGlobal$3 = function (key, value) {
|
|
307
327
|
try {
|
|
308
|
-
defineProperty$2(global$
|
|
328
|
+
defineProperty$2(global$w, key, { value: value, configurable: true, writable: true });
|
|
309
329
|
} catch (error) {
|
|
310
|
-
global$
|
|
330
|
+
global$w[key] = value;
|
|
311
331
|
} return value;
|
|
312
332
|
};
|
|
313
333
|
|
|
314
|
-
var global$
|
|
334
|
+
var global$v = global$F;
|
|
315
335
|
var setGlobal$2 = setGlobal$3;
|
|
316
336
|
|
|
317
337
|
var SHARED = '__core-js_shared__';
|
|
318
|
-
var store$3 = global$
|
|
338
|
+
var store$3 = global$v[SHARED] || setGlobal$2(SHARED, {});
|
|
319
339
|
|
|
320
340
|
var sharedStore = store$3;
|
|
321
341
|
|
|
322
342
|
var store$2 = sharedStore;
|
|
323
343
|
|
|
324
|
-
(shared$
|
|
344
|
+
(shared$4.exports = function (key, value) {
|
|
325
345
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
326
346
|
})('versions', []).push({
|
|
327
347
|
version: '3.21.1',
|
|
@@ -331,51 +351,51 @@
|
|
|
331
351
|
source: 'https://github.com/zloirock/core-js'
|
|
332
352
|
});
|
|
333
353
|
|
|
334
|
-
var global$
|
|
335
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
354
|
+
var global$u = global$F;
|
|
355
|
+
var requireObjectCoercible$3 = requireObjectCoercible$5;
|
|
336
356
|
|
|
337
|
-
var Object$2 = global$
|
|
357
|
+
var Object$2 = global$u.Object;
|
|
338
358
|
|
|
339
359
|
// `ToObject` abstract operation
|
|
340
360
|
// https://tc39.es/ecma262/#sec-toobject
|
|
341
|
-
var toObject$
|
|
342
|
-
return Object$2(requireObjectCoercible(argument));
|
|
361
|
+
var toObject$3 = function (argument) {
|
|
362
|
+
return Object$2(requireObjectCoercible$3(argument));
|
|
343
363
|
};
|
|
344
364
|
|
|
345
|
-
var uncurryThis$
|
|
346
|
-
var toObject$
|
|
365
|
+
var uncurryThis$g = functionUncurryThis;
|
|
366
|
+
var toObject$2 = toObject$3;
|
|
347
367
|
|
|
348
|
-
var hasOwnProperty = uncurryThis$
|
|
368
|
+
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
349
369
|
|
|
350
370
|
// `HasOwnProperty` abstract operation
|
|
351
371
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
352
372
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
353
|
-
return hasOwnProperty(toObject$
|
|
373
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
354
374
|
};
|
|
355
375
|
|
|
356
|
-
var uncurryThis$
|
|
376
|
+
var uncurryThis$f = functionUncurryThis;
|
|
357
377
|
|
|
358
378
|
var id = 0;
|
|
359
379
|
var postfix = Math.random();
|
|
360
|
-
var toString = uncurryThis$
|
|
380
|
+
var toString$5 = uncurryThis$f(1.0.toString);
|
|
361
381
|
|
|
362
382
|
var uid$2 = function (key) {
|
|
363
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
383
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
364
384
|
};
|
|
365
385
|
|
|
366
|
-
var global$
|
|
367
|
-
var shared$
|
|
386
|
+
var global$t = global$F;
|
|
387
|
+
var shared$3 = shared$4.exports;
|
|
368
388
|
var hasOwn$8 = hasOwnProperty_1;
|
|
369
389
|
var uid$1 = uid$2;
|
|
370
390
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
371
391
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
372
392
|
|
|
373
|
-
var WellKnownSymbolsStore = shared$
|
|
374
|
-
var Symbol$1 = global$
|
|
393
|
+
var WellKnownSymbolsStore = shared$3('wks');
|
|
394
|
+
var Symbol$1 = global$t.Symbol;
|
|
375
395
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
376
396
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
377
397
|
|
|
378
|
-
var wellKnownSymbol$
|
|
398
|
+
var wellKnownSymbol$e = function (name) {
|
|
379
399
|
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
380
400
|
var description = 'Symbol.' + name;
|
|
381
401
|
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
@@ -388,28 +408,28 @@
|
|
|
388
408
|
} return WellKnownSymbolsStore[name];
|
|
389
409
|
};
|
|
390
410
|
|
|
391
|
-
var global$
|
|
392
|
-
var call$
|
|
393
|
-
var isObject$
|
|
411
|
+
var global$s = global$F;
|
|
412
|
+
var call$a = functionCall;
|
|
413
|
+
var isObject$6 = isObject$8;
|
|
394
414
|
var isSymbol$1 = isSymbol$2;
|
|
395
|
-
var getMethod$
|
|
415
|
+
var getMethod$3 = getMethod$4;
|
|
396
416
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
397
|
-
var wellKnownSymbol$
|
|
417
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
398
418
|
|
|
399
|
-
var TypeError$
|
|
400
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
419
|
+
var TypeError$d = global$s.TypeError;
|
|
420
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
401
421
|
|
|
402
422
|
// `ToPrimitive` abstract operation
|
|
403
423
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
404
424
|
var toPrimitive$1 = function (input, pref) {
|
|
405
|
-
if (!isObject$
|
|
406
|
-
var exoticToPrim = getMethod$
|
|
425
|
+
if (!isObject$6(input) || isSymbol$1(input)) return input;
|
|
426
|
+
var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
|
|
407
427
|
var result;
|
|
408
428
|
if (exoticToPrim) {
|
|
409
429
|
if (pref === undefined) pref = 'default';
|
|
410
|
-
result = call$
|
|
411
|
-
if (!isObject$
|
|
412
|
-
throw TypeError$
|
|
430
|
+
result = call$a(exoticToPrim, input, pref);
|
|
431
|
+
if (!isObject$6(result) || isSymbol$1(result)) return result;
|
|
432
|
+
throw TypeError$d("Can't convert object to primitive value");
|
|
413
433
|
}
|
|
414
434
|
if (pref === undefined) pref = 'number';
|
|
415
435
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -425,34 +445,34 @@
|
|
|
425
445
|
return isSymbol(key) ? key : key + '';
|
|
426
446
|
};
|
|
427
447
|
|
|
428
|
-
var global$
|
|
429
|
-
var isObject$
|
|
448
|
+
var global$r = global$F;
|
|
449
|
+
var isObject$5 = isObject$8;
|
|
430
450
|
|
|
431
|
-
var document$3 = global$
|
|
451
|
+
var document$3 = global$r.document;
|
|
432
452
|
// typeof document.createElement is 'object' in old IE
|
|
433
|
-
var EXISTS$1 = isObject$
|
|
453
|
+
var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
|
|
434
454
|
|
|
435
|
-
var documentCreateElement = function (it) {
|
|
455
|
+
var documentCreateElement$1 = function (it) {
|
|
436
456
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
437
457
|
};
|
|
438
458
|
|
|
439
|
-
var DESCRIPTORS$
|
|
440
|
-
var fails$
|
|
441
|
-
var createElement$1 = documentCreateElement;
|
|
459
|
+
var DESCRIPTORS$8 = descriptors;
|
|
460
|
+
var fails$a = fails$f;
|
|
461
|
+
var createElement$1 = documentCreateElement$1;
|
|
442
462
|
|
|
443
463
|
// Thanks to IE8 for its funny defineProperty
|
|
444
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
464
|
+
var ie8DomDefine = !DESCRIPTORS$8 && !fails$a(function () {
|
|
445
465
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
446
466
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
447
467
|
get: function () { return 7; }
|
|
448
468
|
}).a != 7;
|
|
449
469
|
});
|
|
450
470
|
|
|
451
|
-
var DESCRIPTORS$
|
|
452
|
-
var call$
|
|
471
|
+
var DESCRIPTORS$7 = descriptors;
|
|
472
|
+
var call$9 = functionCall;
|
|
453
473
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
454
474
|
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
455
|
-
var toIndexedObject$
|
|
475
|
+
var toIndexedObject$3 = toIndexedObject$4;
|
|
456
476
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
457
477
|
var hasOwn$7 = hasOwnProperty_1;
|
|
458
478
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
@@ -462,23 +482,23 @@
|
|
|
462
482
|
|
|
463
483
|
// `Object.getOwnPropertyDescriptor` method
|
|
464
484
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
465
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
466
|
-
O = toIndexedObject$
|
|
485
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
486
|
+
O = toIndexedObject$3(O);
|
|
467
487
|
P = toPropertyKey$1(P);
|
|
468
488
|
if (IE8_DOM_DEFINE$1) try {
|
|
469
489
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
470
490
|
} catch (error) { /* empty */ }
|
|
471
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$
|
|
491
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$9(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
472
492
|
};
|
|
473
493
|
|
|
474
494
|
var objectDefineProperty = {};
|
|
475
495
|
|
|
476
|
-
var DESCRIPTORS$
|
|
477
|
-
var fails$
|
|
496
|
+
var DESCRIPTORS$6 = descriptors;
|
|
497
|
+
var fails$9 = fails$f;
|
|
478
498
|
|
|
479
499
|
// V8 ~ Chrome 36-
|
|
480
500
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
481
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
501
|
+
var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$9(function () {
|
|
482
502
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
483
503
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
484
504
|
value: 42,
|
|
@@ -486,26 +506,26 @@
|
|
|
486
506
|
}).prototype != 42;
|
|
487
507
|
});
|
|
488
508
|
|
|
489
|
-
var global$
|
|
490
|
-
var isObject$
|
|
509
|
+
var global$q = global$F;
|
|
510
|
+
var isObject$4 = isObject$8;
|
|
491
511
|
|
|
492
|
-
var String$
|
|
493
|
-
var TypeError$
|
|
512
|
+
var String$4 = global$q.String;
|
|
513
|
+
var TypeError$c = global$q.TypeError;
|
|
494
514
|
|
|
495
515
|
// `Assert: Type(argument) is Object`
|
|
496
|
-
var anObject$
|
|
497
|
-
if (isObject$
|
|
498
|
-
throw TypeError$
|
|
516
|
+
var anObject$d = function (argument) {
|
|
517
|
+
if (isObject$4(argument)) return argument;
|
|
518
|
+
throw TypeError$c(String$4(argument) + ' is not an object');
|
|
499
519
|
};
|
|
500
520
|
|
|
501
|
-
var global$
|
|
502
|
-
var DESCRIPTORS$
|
|
521
|
+
var global$p = global$F;
|
|
522
|
+
var DESCRIPTORS$5 = descriptors;
|
|
503
523
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
504
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
505
|
-
var anObject$
|
|
524
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
525
|
+
var anObject$c = anObject$d;
|
|
506
526
|
var toPropertyKey = toPropertyKey$2;
|
|
507
527
|
|
|
508
|
-
var TypeError$
|
|
528
|
+
var TypeError$b = global$p.TypeError;
|
|
509
529
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
510
530
|
var $defineProperty = Object.defineProperty;
|
|
511
531
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -516,10 +536,10 @@
|
|
|
516
536
|
|
|
517
537
|
// `Object.defineProperty` method
|
|
518
538
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
519
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
520
|
-
anObject$
|
|
539
|
+
objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
540
|
+
anObject$c(O);
|
|
521
541
|
P = toPropertyKey(P);
|
|
522
|
-
anObject$
|
|
542
|
+
anObject$c(Attributes);
|
|
523
543
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
524
544
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
525
545
|
if (current && current[WRITABLE]) {
|
|
@@ -532,38 +552,38 @@
|
|
|
532
552
|
}
|
|
533
553
|
} return $defineProperty(O, P, Attributes);
|
|
534
554
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
535
|
-
anObject$
|
|
555
|
+
anObject$c(O);
|
|
536
556
|
P = toPropertyKey(P);
|
|
537
|
-
anObject$
|
|
557
|
+
anObject$c(Attributes);
|
|
538
558
|
if (IE8_DOM_DEFINE) try {
|
|
539
559
|
return $defineProperty(O, P, Attributes);
|
|
540
560
|
} catch (error) { /* empty */ }
|
|
541
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
561
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
|
|
542
562
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
543
563
|
return O;
|
|
544
564
|
};
|
|
545
565
|
|
|
546
|
-
var DESCRIPTORS$
|
|
547
|
-
var definePropertyModule$
|
|
566
|
+
var DESCRIPTORS$4 = descriptors;
|
|
567
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
548
568
|
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
549
569
|
|
|
550
|
-
var createNonEnumerableProperty$
|
|
551
|
-
return definePropertyModule$
|
|
570
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$4 ? function (object, key, value) {
|
|
571
|
+
return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
|
|
552
572
|
} : function (object, key, value) {
|
|
553
573
|
object[key] = value;
|
|
554
574
|
return object;
|
|
555
575
|
};
|
|
556
576
|
|
|
557
|
-
var redefine$
|
|
577
|
+
var redefine$4 = {exports: {}};
|
|
558
578
|
|
|
559
|
-
var uncurryThis$
|
|
560
|
-
var isCallable$
|
|
579
|
+
var uncurryThis$e = functionUncurryThis;
|
|
580
|
+
var isCallable$a = isCallable$g;
|
|
561
581
|
var store$1 = sharedStore;
|
|
562
582
|
|
|
563
|
-
var functionToString = uncurryThis$
|
|
583
|
+
var functionToString = uncurryThis$e(Function.toString);
|
|
564
584
|
|
|
565
585
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
566
|
-
if (!isCallable$
|
|
586
|
+
if (!isCallable$a(store$1.inspectSource)) {
|
|
567
587
|
store$1.inspectSource = function (it) {
|
|
568
588
|
return functionToString(it);
|
|
569
589
|
};
|
|
@@ -571,38 +591,38 @@
|
|
|
571
591
|
|
|
572
592
|
var inspectSource$4 = store$1.inspectSource;
|
|
573
593
|
|
|
574
|
-
var global$
|
|
575
|
-
var isCallable$
|
|
594
|
+
var global$o = global$F;
|
|
595
|
+
var isCallable$9 = isCallable$g;
|
|
576
596
|
var inspectSource$3 = inspectSource$4;
|
|
577
597
|
|
|
578
|
-
var WeakMap$1 = global$
|
|
598
|
+
var WeakMap$1 = global$o.WeakMap;
|
|
579
599
|
|
|
580
|
-
var nativeWeakMap = isCallable$
|
|
600
|
+
var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
|
|
581
601
|
|
|
582
|
-
var shared$
|
|
602
|
+
var shared$2 = shared$4.exports;
|
|
583
603
|
var uid = uid$2;
|
|
584
604
|
|
|
585
|
-
var keys = shared$
|
|
605
|
+
var keys = shared$2('keys');
|
|
586
606
|
|
|
587
|
-
var sharedKey$
|
|
607
|
+
var sharedKey$2 = function (key) {
|
|
588
608
|
return keys[key] || (keys[key] = uid(key));
|
|
589
609
|
};
|
|
590
610
|
|
|
591
|
-
var hiddenKeys$
|
|
611
|
+
var hiddenKeys$4 = {};
|
|
592
612
|
|
|
593
613
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
594
|
-
var global$
|
|
595
|
-
var uncurryThis$
|
|
596
|
-
var isObject$
|
|
597
|
-
var createNonEnumerableProperty$
|
|
614
|
+
var global$n = global$F;
|
|
615
|
+
var uncurryThis$d = functionUncurryThis;
|
|
616
|
+
var isObject$3 = isObject$8;
|
|
617
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
598
618
|
var hasOwn$6 = hasOwnProperty_1;
|
|
599
|
-
var shared = sharedStore;
|
|
600
|
-
var sharedKey = sharedKey$
|
|
601
|
-
var hiddenKeys$
|
|
619
|
+
var shared$1 = sharedStore;
|
|
620
|
+
var sharedKey$1 = sharedKey$2;
|
|
621
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
602
622
|
|
|
603
623
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
604
|
-
var TypeError$
|
|
605
|
-
var WeakMap = global$
|
|
624
|
+
var TypeError$a = global$n.TypeError;
|
|
625
|
+
var WeakMap = global$n.WeakMap;
|
|
606
626
|
var set$2, get$1, has;
|
|
607
627
|
|
|
608
628
|
var enforce = function (it) {
|
|
@@ -612,19 +632,19 @@
|
|
|
612
632
|
var getterFor = function (TYPE) {
|
|
613
633
|
return function (it) {
|
|
614
634
|
var state;
|
|
615
|
-
if (!isObject$
|
|
616
|
-
throw TypeError$
|
|
635
|
+
if (!isObject$3(it) || (state = get$1(it)).type !== TYPE) {
|
|
636
|
+
throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
|
|
617
637
|
} return state;
|
|
618
638
|
};
|
|
619
639
|
};
|
|
620
640
|
|
|
621
|
-
if (NATIVE_WEAK_MAP || shared.state) {
|
|
622
|
-
var store = shared.state || (shared.state = new WeakMap());
|
|
623
|
-
var wmget = uncurryThis$
|
|
624
|
-
var wmhas = uncurryThis$
|
|
625
|
-
var wmset = uncurryThis$
|
|
641
|
+
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
642
|
+
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
643
|
+
var wmget = uncurryThis$d(store.get);
|
|
644
|
+
var wmhas = uncurryThis$d(store.has);
|
|
645
|
+
var wmset = uncurryThis$d(store.set);
|
|
626
646
|
set$2 = function (it, metadata) {
|
|
627
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
647
|
+
if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
628
648
|
metadata.facade = it;
|
|
629
649
|
wmset(store, it, metadata);
|
|
630
650
|
return metadata;
|
|
@@ -636,12 +656,12 @@
|
|
|
636
656
|
return wmhas(store, it);
|
|
637
657
|
};
|
|
638
658
|
} else {
|
|
639
|
-
var STATE = sharedKey('state');
|
|
640
|
-
hiddenKeys$
|
|
659
|
+
var STATE = sharedKey$1('state');
|
|
660
|
+
hiddenKeys$3[STATE] = true;
|
|
641
661
|
set$2 = function (it, metadata) {
|
|
642
|
-
if (hasOwn$6(it, STATE)) throw new TypeError$
|
|
662
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
643
663
|
metadata.facade = it;
|
|
644
|
-
createNonEnumerableProperty$
|
|
664
|
+
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
645
665
|
return metadata;
|
|
646
666
|
};
|
|
647
667
|
get$1 = function (it) {
|
|
@@ -660,17 +680,17 @@
|
|
|
660
680
|
getterFor: getterFor
|
|
661
681
|
};
|
|
662
682
|
|
|
663
|
-
var DESCRIPTORS$
|
|
683
|
+
var DESCRIPTORS$3 = descriptors;
|
|
664
684
|
var hasOwn$5 = hasOwnProperty_1;
|
|
665
685
|
|
|
666
686
|
var FunctionPrototype$1 = Function.prototype;
|
|
667
687
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
668
|
-
var getDescriptor = DESCRIPTORS$
|
|
688
|
+
var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
|
|
669
689
|
|
|
670
690
|
var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
|
|
671
691
|
// additional protection from minified / mangled / dropped function names
|
|
672
692
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
673
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
693
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
674
694
|
|
|
675
695
|
var functionName = {
|
|
676
696
|
EXISTS: EXISTS,
|
|
@@ -678,38 +698,38 @@
|
|
|
678
698
|
CONFIGURABLE: CONFIGURABLE
|
|
679
699
|
};
|
|
680
700
|
|
|
681
|
-
var global$
|
|
682
|
-
var isCallable$
|
|
701
|
+
var global$m = global$F;
|
|
702
|
+
var isCallable$8 = isCallable$g;
|
|
683
703
|
var hasOwn$4 = hasOwnProperty_1;
|
|
684
|
-
var createNonEnumerableProperty$
|
|
704
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
685
705
|
var setGlobal$1 = setGlobal$3;
|
|
686
706
|
var inspectSource$2 = inspectSource$4;
|
|
687
707
|
var InternalStateModule$1 = internalState;
|
|
688
708
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
689
709
|
|
|
690
|
-
var getInternalState$
|
|
710
|
+
var getInternalState$2 = InternalStateModule$1.get;
|
|
691
711
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
692
712
|
var TEMPLATE = String(String).split('String');
|
|
693
713
|
|
|
694
|
-
(redefine$
|
|
714
|
+
(redefine$4.exports = function (O, key, value, options) {
|
|
695
715
|
var unsafe = options ? !!options.unsafe : false;
|
|
696
716
|
var simple = options ? !!options.enumerable : false;
|
|
697
717
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
698
718
|
var name = options && options.name !== undefined ? options.name : key;
|
|
699
719
|
var state;
|
|
700
|
-
if (isCallable$
|
|
720
|
+
if (isCallable$8(value)) {
|
|
701
721
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
702
722
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
703
723
|
}
|
|
704
724
|
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
705
|
-
createNonEnumerableProperty$
|
|
725
|
+
createNonEnumerableProperty$2(value, 'name', name);
|
|
706
726
|
}
|
|
707
727
|
state = enforceInternalState(value);
|
|
708
728
|
if (!state.source) {
|
|
709
729
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
710
730
|
}
|
|
711
731
|
}
|
|
712
|
-
if (O === global$
|
|
732
|
+
if (O === global$m) {
|
|
713
733
|
if (simple) O[key] = value;
|
|
714
734
|
else setGlobal$1(key, value);
|
|
715
735
|
return;
|
|
@@ -719,64 +739,64 @@
|
|
|
719
739
|
simple = true;
|
|
720
740
|
}
|
|
721
741
|
if (simple) O[key] = value;
|
|
722
|
-
else createNonEnumerableProperty$
|
|
742
|
+
else createNonEnumerableProperty$2(O, key, value);
|
|
723
743
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
724
744
|
})(Function.prototype, 'toString', function toString() {
|
|
725
|
-
return isCallable$
|
|
745
|
+
return isCallable$8(this) && getInternalState$2(this).source || inspectSource$2(this);
|
|
726
746
|
});
|
|
727
747
|
|
|
728
748
|
var objectGetOwnPropertyNames = {};
|
|
729
749
|
|
|
730
750
|
var ceil = Math.ceil;
|
|
731
|
-
var floor = Math.floor;
|
|
751
|
+
var floor$1 = Math.floor;
|
|
732
752
|
|
|
733
753
|
// `ToIntegerOrInfinity` abstract operation
|
|
734
754
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
735
|
-
var toIntegerOrInfinity$
|
|
755
|
+
var toIntegerOrInfinity$4 = function (argument) {
|
|
736
756
|
var number = +argument;
|
|
737
757
|
// eslint-disable-next-line no-self-compare -- safe
|
|
738
|
-
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
758
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
|
|
739
759
|
};
|
|
740
760
|
|
|
741
|
-
var toIntegerOrInfinity$
|
|
761
|
+
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
742
762
|
|
|
743
|
-
var max = Math.max;
|
|
744
|
-
var min$
|
|
763
|
+
var max$1 = Math.max;
|
|
764
|
+
var min$3 = Math.min;
|
|
745
765
|
|
|
746
766
|
// Helper for a popular repeating case of the spec:
|
|
747
767
|
// Let integer be ? ToInteger(index).
|
|
748
768
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
749
769
|
var toAbsoluteIndex$1 = function (index, length) {
|
|
750
|
-
var integer = toIntegerOrInfinity$
|
|
751
|
-
return integer < 0 ? max(integer + length, 0) : min$
|
|
770
|
+
var integer = toIntegerOrInfinity$3(index);
|
|
771
|
+
return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
|
|
752
772
|
};
|
|
753
773
|
|
|
754
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$
|
|
774
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
|
|
755
775
|
|
|
756
|
-
var min = Math.min;
|
|
776
|
+
var min$2 = Math.min;
|
|
757
777
|
|
|
758
778
|
// `ToLength` abstract operation
|
|
759
779
|
// https://tc39.es/ecma262/#sec-tolength
|
|
760
|
-
var toLength$
|
|
761
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
780
|
+
var toLength$3 = function (argument) {
|
|
781
|
+
return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
762
782
|
};
|
|
763
783
|
|
|
764
|
-
var toLength = toLength$
|
|
784
|
+
var toLength$2 = toLength$3;
|
|
765
785
|
|
|
766
786
|
// `LengthOfArrayLike` abstract operation
|
|
767
787
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
768
788
|
var lengthOfArrayLike$2 = function (obj) {
|
|
769
|
-
return toLength(obj.length);
|
|
789
|
+
return toLength$2(obj.length);
|
|
770
790
|
};
|
|
771
791
|
|
|
772
|
-
var toIndexedObject$
|
|
792
|
+
var toIndexedObject$2 = toIndexedObject$4;
|
|
773
793
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
774
794
|
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
775
795
|
|
|
776
796
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
777
|
-
var createMethod = function (IS_INCLUDES) {
|
|
797
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
|
778
798
|
return function ($this, el, fromIndex) {
|
|
779
|
-
var O = toIndexedObject$
|
|
799
|
+
var O = toIndexedObject$2($this);
|
|
780
800
|
var length = lengthOfArrayLike$1(O);
|
|
781
801
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
782
802
|
var value;
|
|
@@ -796,35 +816,35 @@
|
|
|
796
816
|
var arrayIncludes = {
|
|
797
817
|
// `Array.prototype.includes` method
|
|
798
818
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
799
|
-
includes: createMethod(true),
|
|
819
|
+
includes: createMethod$1(true),
|
|
800
820
|
// `Array.prototype.indexOf` method
|
|
801
821
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
802
|
-
indexOf: createMethod(false)
|
|
822
|
+
indexOf: createMethod$1(false)
|
|
803
823
|
};
|
|
804
824
|
|
|
805
|
-
var uncurryThis$
|
|
825
|
+
var uncurryThis$c = functionUncurryThis;
|
|
806
826
|
var hasOwn$3 = hasOwnProperty_1;
|
|
807
|
-
var toIndexedObject = toIndexedObject$
|
|
808
|
-
var indexOf = arrayIncludes.indexOf;
|
|
809
|
-
var hiddenKeys$
|
|
827
|
+
var toIndexedObject$1 = toIndexedObject$4;
|
|
828
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
|
829
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
810
830
|
|
|
811
|
-
var push = uncurryThis$
|
|
831
|
+
var push$1 = uncurryThis$c([].push);
|
|
812
832
|
|
|
813
833
|
var objectKeysInternal = function (object, names) {
|
|
814
|
-
var O = toIndexedObject(object);
|
|
834
|
+
var O = toIndexedObject$1(object);
|
|
815
835
|
var i = 0;
|
|
816
836
|
var result = [];
|
|
817
837
|
var key;
|
|
818
|
-
for (key in O) !hasOwn$3(hiddenKeys$
|
|
838
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
|
|
819
839
|
// Don't enum bug & hidden keys
|
|
820
840
|
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
821
|
-
~indexOf(result, key) || push(result, key);
|
|
841
|
+
~indexOf$1(result, key) || push$1(result, key);
|
|
822
842
|
}
|
|
823
843
|
return result;
|
|
824
844
|
};
|
|
825
845
|
|
|
826
846
|
// IE8- don't enum bug keys
|
|
827
|
-
var enumBugKeys$
|
|
847
|
+
var enumBugKeys$3 = [
|
|
828
848
|
'constructor',
|
|
829
849
|
'hasOwnProperty',
|
|
830
850
|
'isPrototypeOf',
|
|
@@ -835,15 +855,15 @@
|
|
|
835
855
|
];
|
|
836
856
|
|
|
837
857
|
var internalObjectKeys$1 = objectKeysInternal;
|
|
838
|
-
var enumBugKeys$
|
|
858
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
839
859
|
|
|
840
|
-
var hiddenKeys = enumBugKeys$
|
|
860
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
841
861
|
|
|
842
862
|
// `Object.getOwnPropertyNames` method
|
|
843
863
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
844
864
|
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
845
865
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
846
|
-
return internalObjectKeys$1(O, hiddenKeys);
|
|
866
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
847
867
|
};
|
|
848
868
|
|
|
849
869
|
var objectGetOwnPropertySymbols = {};
|
|
@@ -852,28 +872,28 @@
|
|
|
852
872
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
853
873
|
|
|
854
874
|
var getBuiltIn$4 = getBuiltIn$7;
|
|
855
|
-
var uncurryThis$
|
|
875
|
+
var uncurryThis$b = functionUncurryThis;
|
|
856
876
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
857
877
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
858
|
-
var anObject$
|
|
878
|
+
var anObject$b = anObject$d;
|
|
859
879
|
|
|
860
|
-
var concat$
|
|
880
|
+
var concat$2 = uncurryThis$b([].concat);
|
|
861
881
|
|
|
862
882
|
// all object keys, includes non-enumerable and symbols
|
|
863
883
|
var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
864
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
884
|
+
var keys = getOwnPropertyNamesModule.f(anObject$b(it));
|
|
865
885
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
866
|
-
return getOwnPropertySymbols ? concat$
|
|
886
|
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
867
887
|
};
|
|
868
888
|
|
|
869
889
|
var hasOwn$2 = hasOwnProperty_1;
|
|
870
890
|
var ownKeys = ownKeys$1;
|
|
871
891
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
872
|
-
var definePropertyModule$
|
|
892
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
873
893
|
|
|
874
894
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
875
895
|
var keys = ownKeys(source);
|
|
876
|
-
var defineProperty = definePropertyModule$
|
|
896
|
+
var defineProperty = definePropertyModule$2.f;
|
|
877
897
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
878
898
|
for (var i = 0; i < keys.length; i++) {
|
|
879
899
|
var key = keys[i];
|
|
@@ -883,20 +903,20 @@
|
|
|
883
903
|
}
|
|
884
904
|
};
|
|
885
905
|
|
|
886
|
-
var fails$
|
|
887
|
-
var isCallable$
|
|
906
|
+
var fails$8 = fails$f;
|
|
907
|
+
var isCallable$7 = isCallable$g;
|
|
888
908
|
|
|
889
909
|
var replacement = /#|\.prototype\./;
|
|
890
910
|
|
|
891
911
|
var isForced$2 = function (feature, detection) {
|
|
892
|
-
var value = data[normalize(feature)];
|
|
912
|
+
var value = data[normalize$1(feature)];
|
|
893
913
|
return value == POLYFILL ? true
|
|
894
914
|
: value == NATIVE ? false
|
|
895
|
-
: isCallable$
|
|
915
|
+
: isCallable$7(detection) ? fails$8(detection)
|
|
896
916
|
: !!detection;
|
|
897
917
|
};
|
|
898
918
|
|
|
899
|
-
var normalize = isForced$2.normalize = function (string) {
|
|
919
|
+
var normalize$1 = isForced$2.normalize = function (string) {
|
|
900
920
|
return String(string).replace(replacement, '.').toLowerCase();
|
|
901
921
|
};
|
|
902
922
|
|
|
@@ -906,10 +926,10 @@
|
|
|
906
926
|
|
|
907
927
|
var isForced_1 = isForced$2;
|
|
908
928
|
|
|
909
|
-
var global$
|
|
910
|
-
var getOwnPropertyDescriptor$
|
|
911
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
912
|
-
var redefine$
|
|
929
|
+
var global$l = global$F;
|
|
930
|
+
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
931
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
932
|
+
var redefine$3 = redefine$4.exports;
|
|
913
933
|
var setGlobal = setGlobal$3;
|
|
914
934
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
915
935
|
var isForced$1 = isForced_1;
|
|
@@ -935,16 +955,16 @@
|
|
|
935
955
|
var STATIC = options.stat;
|
|
936
956
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
937
957
|
if (GLOBAL) {
|
|
938
|
-
target = global$
|
|
958
|
+
target = global$l;
|
|
939
959
|
} else if (STATIC) {
|
|
940
|
-
target = global$
|
|
960
|
+
target = global$l[TARGET] || setGlobal(TARGET, {});
|
|
941
961
|
} else {
|
|
942
|
-
target = (global$
|
|
962
|
+
target = (global$l[TARGET] || {}).prototype;
|
|
943
963
|
}
|
|
944
964
|
if (target) for (key in source) {
|
|
945
965
|
sourceProperty = source[key];
|
|
946
966
|
if (options.noTargetGet) {
|
|
947
|
-
descriptor = getOwnPropertyDescriptor$
|
|
967
|
+
descriptor = getOwnPropertyDescriptor$2(target, key);
|
|
948
968
|
targetProperty = descriptor && descriptor.value;
|
|
949
969
|
} else targetProperty = target[key];
|
|
950
970
|
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
@@ -955,39 +975,39 @@
|
|
|
955
975
|
}
|
|
956
976
|
// add a flag to not completely full polyfills
|
|
957
977
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
958
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
978
|
+
createNonEnumerableProperty$1(sourceProperty, 'sham', true);
|
|
959
979
|
}
|
|
960
980
|
// extend global
|
|
961
|
-
redefine$
|
|
981
|
+
redefine$3(target, key, sourceProperty, options);
|
|
962
982
|
}
|
|
963
983
|
};
|
|
964
984
|
|
|
965
|
-
var global$
|
|
985
|
+
var global$k = global$F;
|
|
966
986
|
|
|
967
|
-
var nativePromiseConstructor = global$
|
|
987
|
+
var nativePromiseConstructor = global$k.Promise;
|
|
968
988
|
|
|
969
|
-
var redefine$
|
|
989
|
+
var redefine$2 = redefine$4.exports;
|
|
970
990
|
|
|
971
991
|
var redefineAll$1 = function (target, src, options) {
|
|
972
|
-
for (var key in src) redefine$
|
|
992
|
+
for (var key in src) redefine$2(target, key, src[key], options);
|
|
973
993
|
return target;
|
|
974
994
|
};
|
|
975
995
|
|
|
976
|
-
var global$
|
|
977
|
-
var isCallable$
|
|
996
|
+
var global$j = global$F;
|
|
997
|
+
var isCallable$6 = isCallable$g;
|
|
978
998
|
|
|
979
|
-
var String$
|
|
980
|
-
var TypeError$
|
|
999
|
+
var String$3 = global$j.String;
|
|
1000
|
+
var TypeError$9 = global$j.TypeError;
|
|
981
1001
|
|
|
982
1002
|
var aPossiblePrototype$1 = function (argument) {
|
|
983
|
-
if (typeof argument == 'object' || isCallable$
|
|
984
|
-
throw TypeError$
|
|
1003
|
+
if (typeof argument == 'object' || isCallable$6(argument)) return argument;
|
|
1004
|
+
throw TypeError$9("Can't set " + String$3(argument) + ' as a prototype');
|
|
985
1005
|
};
|
|
986
1006
|
|
|
987
1007
|
/* eslint-disable no-proto -- safe */
|
|
988
1008
|
|
|
989
|
-
var uncurryThis$
|
|
990
|
-
var anObject$
|
|
1009
|
+
var uncurryThis$a = functionUncurryThis;
|
|
1010
|
+
var anObject$a = anObject$d;
|
|
991
1011
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
992
1012
|
|
|
993
1013
|
// `Object.setPrototypeOf` method
|
|
@@ -1000,12 +1020,12 @@
|
|
|
1000
1020
|
var setter;
|
|
1001
1021
|
try {
|
|
1002
1022
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1003
|
-
setter = uncurryThis$
|
|
1023
|
+
setter = uncurryThis$a(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1004
1024
|
setter(test, []);
|
|
1005
1025
|
CORRECT_SETTER = test instanceof Array;
|
|
1006
1026
|
} catch (error) { /* empty */ }
|
|
1007
1027
|
return function setPrototypeOf(O, proto) {
|
|
1008
|
-
anObject$
|
|
1028
|
+
anObject$a(O);
|
|
1009
1029
|
aPossiblePrototype(proto);
|
|
1010
1030
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1011
1031
|
else O.__proto__ = proto;
|
|
@@ -1015,9 +1035,9 @@
|
|
|
1015
1035
|
|
|
1016
1036
|
var defineProperty$1 = objectDefineProperty.f;
|
|
1017
1037
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1018
|
-
var wellKnownSymbol$
|
|
1038
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
1019
1039
|
|
|
1020
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1040
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
|
|
1021
1041
|
|
|
1022
1042
|
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
1023
1043
|
if (target && !STATIC) target = target.prototype;
|
|
@@ -1027,39 +1047,39 @@
|
|
|
1027
1047
|
};
|
|
1028
1048
|
|
|
1029
1049
|
var getBuiltIn$3 = getBuiltIn$7;
|
|
1030
|
-
var definePropertyModule = objectDefineProperty;
|
|
1031
|
-
var wellKnownSymbol$
|
|
1032
|
-
var DESCRIPTORS$
|
|
1050
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1051
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
1052
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1033
1053
|
|
|
1034
|
-
var SPECIES$
|
|
1054
|
+
var SPECIES$3 = wellKnownSymbol$b('species');
|
|
1035
1055
|
|
|
1036
1056
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1037
1057
|
var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
|
|
1038
|
-
var defineProperty = definePropertyModule.f;
|
|
1058
|
+
var defineProperty = definePropertyModule$1.f;
|
|
1039
1059
|
|
|
1040
|
-
if (DESCRIPTORS$
|
|
1041
|
-
defineProperty(Constructor, SPECIES$
|
|
1060
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
|
|
1061
|
+
defineProperty(Constructor, SPECIES$3, {
|
|
1042
1062
|
configurable: true,
|
|
1043
1063
|
get: function () { return this; }
|
|
1044
1064
|
});
|
|
1045
1065
|
}
|
|
1046
1066
|
};
|
|
1047
1067
|
|
|
1048
|
-
var global$
|
|
1068
|
+
var global$i = global$F;
|
|
1049
1069
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1050
1070
|
|
|
1051
|
-
var TypeError$
|
|
1071
|
+
var TypeError$8 = global$i.TypeError;
|
|
1052
1072
|
|
|
1053
1073
|
var anInstance$1 = function (it, Prototype) {
|
|
1054
1074
|
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1055
|
-
throw TypeError$
|
|
1075
|
+
throw TypeError$8('Incorrect invocation');
|
|
1056
1076
|
};
|
|
1057
1077
|
|
|
1058
|
-
var uncurryThis$
|
|
1078
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1059
1079
|
var aCallable$3 = aCallable$5;
|
|
1060
1080
|
var NATIVE_BIND$1 = functionBindNative;
|
|
1061
1081
|
|
|
1062
|
-
var bind$4 = uncurryThis$
|
|
1082
|
+
var bind$4 = uncurryThis$9(uncurryThis$9.bind);
|
|
1063
1083
|
|
|
1064
1084
|
// optional / simple context binding
|
|
1065
1085
|
var functionBindContext = function (fn, that) {
|
|
@@ -1071,10 +1091,10 @@
|
|
|
1071
1091
|
|
|
1072
1092
|
var iterators = {};
|
|
1073
1093
|
|
|
1074
|
-
var wellKnownSymbol$
|
|
1094
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1075
1095
|
var Iterators$1 = iterators;
|
|
1076
1096
|
|
|
1077
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1097
|
+
var ITERATOR$2 = wellKnownSymbol$a('iterator');
|
|
1078
1098
|
var ArrayPrototype = Array.prototype;
|
|
1079
1099
|
|
|
1080
1100
|
// check on default Array iterator
|
|
@@ -1082,23 +1102,23 @@
|
|
|
1082
1102
|
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1083
1103
|
};
|
|
1084
1104
|
|
|
1085
|
-
var wellKnownSymbol$
|
|
1105
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1086
1106
|
|
|
1087
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1107
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$9('toStringTag');
|
|
1088
1108
|
var test = {};
|
|
1089
1109
|
|
|
1090
1110
|
test[TO_STRING_TAG$1] = 'z';
|
|
1091
1111
|
|
|
1092
1112
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1093
1113
|
|
|
1094
|
-
var global$
|
|
1114
|
+
var global$h = global$F;
|
|
1095
1115
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1096
|
-
var isCallable$
|
|
1116
|
+
var isCallable$5 = isCallable$g;
|
|
1097
1117
|
var classofRaw = classofRaw$1;
|
|
1098
|
-
var wellKnownSymbol$
|
|
1118
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1099
1119
|
|
|
1100
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1101
|
-
var Object$1 = global$
|
|
1120
|
+
var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
|
|
1121
|
+
var Object$1 = global$h.Object;
|
|
1102
1122
|
|
|
1103
1123
|
// ES3 wrong here
|
|
1104
1124
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -1111,7 +1131,7 @@
|
|
|
1111
1131
|
};
|
|
1112
1132
|
|
|
1113
1133
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1114
|
-
var classof$
|
|
1134
|
+
var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1115
1135
|
var O, tag, result;
|
|
1116
1136
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1117
1137
|
// @@toStringTag case
|
|
@@ -1119,65 +1139,65 @@
|
|
|
1119
1139
|
// builtinTag case
|
|
1120
1140
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1121
1141
|
// ES3 arguments fallback
|
|
1122
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$
|
|
1142
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
|
|
1123
1143
|
};
|
|
1124
1144
|
|
|
1125
|
-
var classof$
|
|
1126
|
-
var getMethod$
|
|
1145
|
+
var classof$5 = classof$6;
|
|
1146
|
+
var getMethod$2 = getMethod$4;
|
|
1127
1147
|
var Iterators = iterators;
|
|
1128
|
-
var wellKnownSymbol$
|
|
1148
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1129
1149
|
|
|
1130
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1150
|
+
var ITERATOR$1 = wellKnownSymbol$7('iterator');
|
|
1131
1151
|
|
|
1132
1152
|
var getIteratorMethod$2 = function (it) {
|
|
1133
|
-
if (it != undefined) return getMethod$
|
|
1134
|
-
|| getMethod$
|
|
1135
|
-
|| Iterators[classof$
|
|
1153
|
+
if (it != undefined) return getMethod$2(it, ITERATOR$1)
|
|
1154
|
+
|| getMethod$2(it, '@@iterator')
|
|
1155
|
+
|| Iterators[classof$5(it)];
|
|
1136
1156
|
};
|
|
1137
1157
|
|
|
1138
|
-
var global$
|
|
1139
|
-
var call$
|
|
1158
|
+
var global$g = global$F;
|
|
1159
|
+
var call$8 = functionCall;
|
|
1140
1160
|
var aCallable$2 = aCallable$5;
|
|
1141
|
-
var anObject$
|
|
1161
|
+
var anObject$9 = anObject$d;
|
|
1142
1162
|
var tryToString$2 = tryToString$4;
|
|
1143
1163
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1144
1164
|
|
|
1145
|
-
var TypeError$
|
|
1165
|
+
var TypeError$7 = global$g.TypeError;
|
|
1146
1166
|
|
|
1147
1167
|
var getIterator$1 = function (argument, usingIterator) {
|
|
1148
1168
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1149
|
-
if (aCallable$2(iteratorMethod)) return anObject$
|
|
1150
|
-
throw TypeError$
|
|
1169
|
+
if (aCallable$2(iteratorMethod)) return anObject$9(call$8(iteratorMethod, argument));
|
|
1170
|
+
throw TypeError$7(tryToString$2(argument) + ' is not iterable');
|
|
1151
1171
|
};
|
|
1152
1172
|
|
|
1153
|
-
var call$
|
|
1154
|
-
var anObject$
|
|
1155
|
-
var getMethod = getMethod$
|
|
1173
|
+
var call$7 = functionCall;
|
|
1174
|
+
var anObject$8 = anObject$d;
|
|
1175
|
+
var getMethod$1 = getMethod$4;
|
|
1156
1176
|
|
|
1157
1177
|
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1158
1178
|
var innerResult, innerError;
|
|
1159
|
-
anObject$
|
|
1179
|
+
anObject$8(iterator);
|
|
1160
1180
|
try {
|
|
1161
|
-
innerResult = getMethod(iterator, 'return');
|
|
1181
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1162
1182
|
if (!innerResult) {
|
|
1163
1183
|
if (kind === 'throw') throw value;
|
|
1164
1184
|
return value;
|
|
1165
1185
|
}
|
|
1166
|
-
innerResult = call$
|
|
1186
|
+
innerResult = call$7(innerResult, iterator);
|
|
1167
1187
|
} catch (error) {
|
|
1168
1188
|
innerError = true;
|
|
1169
1189
|
innerResult = error;
|
|
1170
1190
|
}
|
|
1171
1191
|
if (kind === 'throw') throw value;
|
|
1172
1192
|
if (innerError) throw innerResult;
|
|
1173
|
-
anObject$
|
|
1193
|
+
anObject$8(innerResult);
|
|
1174
1194
|
return value;
|
|
1175
1195
|
};
|
|
1176
1196
|
|
|
1177
|
-
var global$
|
|
1197
|
+
var global$f = global$F;
|
|
1178
1198
|
var bind$3 = functionBindContext;
|
|
1179
|
-
var call$
|
|
1180
|
-
var anObject$
|
|
1199
|
+
var call$6 = functionCall;
|
|
1200
|
+
var anObject$7 = anObject$d;
|
|
1181
1201
|
var tryToString$1 = tryToString$4;
|
|
1182
1202
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1183
1203
|
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
@@ -1186,7 +1206,7 @@
|
|
|
1186
1206
|
var getIteratorMethod = getIteratorMethod$2;
|
|
1187
1207
|
var iteratorClose = iteratorClose$1;
|
|
1188
1208
|
|
|
1189
|
-
var TypeError$
|
|
1209
|
+
var TypeError$6 = global$f.TypeError;
|
|
1190
1210
|
|
|
1191
1211
|
var Result = function (stopped, result) {
|
|
1192
1212
|
this.stopped = stopped;
|
|
@@ -1210,7 +1230,7 @@
|
|
|
1210
1230
|
|
|
1211
1231
|
var callFn = function (value) {
|
|
1212
1232
|
if (AS_ENTRIES) {
|
|
1213
|
-
anObject$
|
|
1233
|
+
anObject$7(value);
|
|
1214
1234
|
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1215
1235
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1216
1236
|
};
|
|
@@ -1219,7 +1239,7 @@
|
|
|
1219
1239
|
iterator = iterable;
|
|
1220
1240
|
} else {
|
|
1221
1241
|
iterFn = getIteratorMethod(iterable);
|
|
1222
|
-
if (!iterFn) throw TypeError$
|
|
1242
|
+
if (!iterFn) throw TypeError$6(tryToString$1(iterable) + ' is not iterable');
|
|
1223
1243
|
// optimisation for array iterators
|
|
1224
1244
|
if (isArrayIteratorMethod(iterFn)) {
|
|
1225
1245
|
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
@@ -1231,7 +1251,7 @@
|
|
|
1231
1251
|
}
|
|
1232
1252
|
|
|
1233
1253
|
next = iterator.next;
|
|
1234
|
-
while (!(step = call$
|
|
1254
|
+
while (!(step = call$6(next, iterator)).done) {
|
|
1235
1255
|
try {
|
|
1236
1256
|
result = callFn(step.value);
|
|
1237
1257
|
} catch (error) {
|
|
@@ -1241,9 +1261,9 @@
|
|
|
1241
1261
|
} return new Result(false);
|
|
1242
1262
|
};
|
|
1243
1263
|
|
|
1244
|
-
var wellKnownSymbol$
|
|
1264
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1245
1265
|
|
|
1246
|
-
var ITERATOR = wellKnownSymbol$
|
|
1266
|
+
var ITERATOR = wellKnownSymbol$6('iterator');
|
|
1247
1267
|
var SAFE_CLOSING = false;
|
|
1248
1268
|
|
|
1249
1269
|
try {
|
|
@@ -1280,10 +1300,10 @@
|
|
|
1280
1300
|
return ITERATION_SUPPORT;
|
|
1281
1301
|
};
|
|
1282
1302
|
|
|
1283
|
-
var uncurryThis$
|
|
1284
|
-
var fails$
|
|
1285
|
-
var isCallable$
|
|
1286
|
-
var classof$
|
|
1303
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1304
|
+
var fails$7 = fails$f;
|
|
1305
|
+
var isCallable$4 = isCallable$g;
|
|
1306
|
+
var classof$4 = classof$6;
|
|
1287
1307
|
var getBuiltIn$2 = getBuiltIn$7;
|
|
1288
1308
|
var inspectSource$1 = inspectSource$4;
|
|
1289
1309
|
|
|
@@ -1291,11 +1311,11 @@
|
|
|
1291
1311
|
var empty = [];
|
|
1292
1312
|
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
1293
1313
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1294
|
-
var exec = uncurryThis$
|
|
1314
|
+
var exec$1 = uncurryThis$8(constructorRegExp.exec);
|
|
1295
1315
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1296
1316
|
|
|
1297
1317
|
var isConstructorModern = function isConstructor(argument) {
|
|
1298
|
-
if (!isCallable$
|
|
1318
|
+
if (!isCallable$4(argument)) return false;
|
|
1299
1319
|
try {
|
|
1300
1320
|
construct(noop, empty, argument);
|
|
1301
1321
|
return true;
|
|
@@ -1305,8 +1325,8 @@
|
|
|
1305
1325
|
};
|
|
1306
1326
|
|
|
1307
1327
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
1308
|
-
if (!isCallable$
|
|
1309
|
-
switch (classof$
|
|
1328
|
+
if (!isCallable$4(argument)) return false;
|
|
1329
|
+
switch (classof$4(argument)) {
|
|
1310
1330
|
case 'AsyncFunction':
|
|
1311
1331
|
case 'GeneratorFunction':
|
|
1312
1332
|
case 'AsyncGeneratorFunction': return false;
|
|
@@ -1315,7 +1335,7 @@
|
|
|
1315
1335
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1316
1336
|
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1317
1337
|
// (for example, `DOMQuad` and similar in FF41-)
|
|
1318
|
-
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
1338
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
1319
1339
|
} catch (error) {
|
|
1320
1340
|
return true;
|
|
1321
1341
|
}
|
|
@@ -1325,7 +1345,7 @@
|
|
|
1325
1345
|
|
|
1326
1346
|
// `IsConstructor` abstract operation
|
|
1327
1347
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1328
|
-
var isConstructor$1 = !construct || fails$
|
|
1348
|
+
var isConstructor$1 = !construct || fails$7(function () {
|
|
1329
1349
|
var called;
|
|
1330
1350
|
return isConstructorModern(isConstructorModern.call)
|
|
1331
1351
|
|| !isConstructorModern(Object)
|
|
@@ -1333,57 +1353,57 @@
|
|
|
1333
1353
|
|| called;
|
|
1334
1354
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
1335
1355
|
|
|
1336
|
-
var global$
|
|
1356
|
+
var global$e = global$F;
|
|
1337
1357
|
var isConstructor = isConstructor$1;
|
|
1338
1358
|
var tryToString = tryToString$4;
|
|
1339
1359
|
|
|
1340
|
-
var TypeError$
|
|
1360
|
+
var TypeError$5 = global$e.TypeError;
|
|
1341
1361
|
|
|
1342
1362
|
// `Assert: IsConstructor(argument) is true`
|
|
1343
1363
|
var aConstructor$1 = function (argument) {
|
|
1344
1364
|
if (isConstructor(argument)) return argument;
|
|
1345
|
-
throw TypeError$
|
|
1365
|
+
throw TypeError$5(tryToString(argument) + ' is not a constructor');
|
|
1346
1366
|
};
|
|
1347
1367
|
|
|
1348
|
-
var anObject$
|
|
1368
|
+
var anObject$6 = anObject$d;
|
|
1349
1369
|
var aConstructor = aConstructor$1;
|
|
1350
|
-
var wellKnownSymbol$
|
|
1370
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
1351
1371
|
|
|
1352
|
-
var SPECIES$
|
|
1372
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
1353
1373
|
|
|
1354
1374
|
// `SpeciesConstructor` abstract operation
|
|
1355
1375
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1356
1376
|
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1357
|
-
var C = anObject$
|
|
1377
|
+
var C = anObject$6(O).constructor;
|
|
1358
1378
|
var S;
|
|
1359
|
-
return C === undefined || (S = anObject$
|
|
1379
|
+
return C === undefined || (S = anObject$6(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
|
|
1360
1380
|
};
|
|
1361
1381
|
|
|
1362
1382
|
var NATIVE_BIND = functionBindNative;
|
|
1363
1383
|
|
|
1364
1384
|
var FunctionPrototype = Function.prototype;
|
|
1365
|
-
var apply$
|
|
1366
|
-
var call$
|
|
1385
|
+
var apply$2 = FunctionPrototype.apply;
|
|
1386
|
+
var call$5 = FunctionPrototype.call;
|
|
1367
1387
|
|
|
1368
1388
|
// eslint-disable-next-line es/no-reflect -- safe
|
|
1369
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
1370
|
-
return call$
|
|
1389
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$2) : function () {
|
|
1390
|
+
return call$5.apply(apply$2, arguments);
|
|
1371
1391
|
});
|
|
1372
1392
|
|
|
1373
1393
|
var getBuiltIn$1 = getBuiltIn$7;
|
|
1374
1394
|
|
|
1375
|
-
var html$
|
|
1395
|
+
var html$2 = getBuiltIn$1('document', 'documentElement');
|
|
1376
1396
|
|
|
1377
|
-
var uncurryThis$
|
|
1397
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1378
1398
|
|
|
1379
|
-
var arraySlice$1 = uncurryThis$
|
|
1399
|
+
var arraySlice$1 = uncurryThis$7([].slice);
|
|
1380
1400
|
|
|
1381
|
-
var global$
|
|
1401
|
+
var global$d = global$F;
|
|
1382
1402
|
|
|
1383
|
-
var TypeError$
|
|
1403
|
+
var TypeError$4 = global$d.TypeError;
|
|
1384
1404
|
|
|
1385
1405
|
var validateArgumentsLength$1 = function (passed, required) {
|
|
1386
|
-
if (passed < required) throw TypeError$
|
|
1406
|
+
if (passed < required) throw TypeError$4('Not enough arguments');
|
|
1387
1407
|
return passed;
|
|
1388
1408
|
};
|
|
1389
1409
|
|
|
@@ -1391,31 +1411,31 @@
|
|
|
1391
1411
|
|
|
1392
1412
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1393
1413
|
|
|
1394
|
-
var classof = classofRaw$1;
|
|
1395
|
-
var global$
|
|
1414
|
+
var classof$3 = classofRaw$1;
|
|
1415
|
+
var global$c = global$F;
|
|
1396
1416
|
|
|
1397
|
-
var engineIsNode = classof(global$
|
|
1417
|
+
var engineIsNode = classof$3(global$c.process) == 'process';
|
|
1398
1418
|
|
|
1399
|
-
var global$
|
|
1400
|
-
var apply = functionApply;
|
|
1419
|
+
var global$b = global$F;
|
|
1420
|
+
var apply$1 = functionApply;
|
|
1401
1421
|
var bind$2 = functionBindContext;
|
|
1402
|
-
var isCallable$
|
|
1422
|
+
var isCallable$3 = isCallable$g;
|
|
1403
1423
|
var hasOwn = hasOwnProperty_1;
|
|
1404
|
-
var fails$
|
|
1405
|
-
var html = html$
|
|
1424
|
+
var fails$6 = fails$f;
|
|
1425
|
+
var html$1 = html$2;
|
|
1406
1426
|
var arraySlice = arraySlice$1;
|
|
1407
|
-
var createElement = documentCreateElement;
|
|
1427
|
+
var createElement = documentCreateElement$1;
|
|
1408
1428
|
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1409
1429
|
var IS_IOS$1 = engineIsIos;
|
|
1410
1430
|
var IS_NODE$2 = engineIsNode;
|
|
1411
1431
|
|
|
1412
|
-
var set$1 = global$
|
|
1413
|
-
var clear = global$
|
|
1414
|
-
var process$
|
|
1415
|
-
var Dispatch = global$
|
|
1416
|
-
var Function$1 = global$
|
|
1417
|
-
var MessageChannel = global$
|
|
1418
|
-
var String$
|
|
1432
|
+
var set$1 = global$b.setImmediate;
|
|
1433
|
+
var clear = global$b.clearImmediate;
|
|
1434
|
+
var process$2 = global$b.process;
|
|
1435
|
+
var Dispatch = global$b.Dispatch;
|
|
1436
|
+
var Function$1 = global$b.Function;
|
|
1437
|
+
var MessageChannel = global$b.MessageChannel;
|
|
1438
|
+
var String$2 = global$b.String;
|
|
1419
1439
|
var counter = 0;
|
|
1420
1440
|
var queue$1 = {};
|
|
1421
1441
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
@@ -1423,7 +1443,7 @@
|
|
|
1423
1443
|
|
|
1424
1444
|
try {
|
|
1425
1445
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1426
|
-
location = global$
|
|
1446
|
+
location = global$b.location;
|
|
1427
1447
|
} catch (error) { /* empty */ }
|
|
1428
1448
|
|
|
1429
1449
|
var run = function (id) {
|
|
@@ -1446,17 +1466,17 @@
|
|
|
1446
1466
|
|
|
1447
1467
|
var post = function (id) {
|
|
1448
1468
|
// old engines have not location.origin
|
|
1449
|
-
global$
|
|
1469
|
+
global$b.postMessage(String$2(id), location.protocol + '//' + location.host);
|
|
1450
1470
|
};
|
|
1451
1471
|
|
|
1452
1472
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1453
1473
|
if (!set$1 || !clear) {
|
|
1454
1474
|
set$1 = function setImmediate(handler) {
|
|
1455
1475
|
validateArgumentsLength(arguments.length, 1);
|
|
1456
|
-
var fn = isCallable$
|
|
1476
|
+
var fn = isCallable$3(handler) ? handler : Function$1(handler);
|
|
1457
1477
|
var args = arraySlice(arguments, 1);
|
|
1458
1478
|
queue$1[++counter] = function () {
|
|
1459
|
-
apply(fn, undefined, args);
|
|
1479
|
+
apply$1(fn, undefined, args);
|
|
1460
1480
|
};
|
|
1461
1481
|
defer(counter);
|
|
1462
1482
|
return counter;
|
|
@@ -1467,7 +1487,7 @@
|
|
|
1467
1487
|
// Node.js 0.8-
|
|
1468
1488
|
if (IS_NODE$2) {
|
|
1469
1489
|
defer = function (id) {
|
|
1470
|
-
process$
|
|
1490
|
+
process$2.nextTick(runner(id));
|
|
1471
1491
|
};
|
|
1472
1492
|
// Sphere (JS game engine) Dispatch API
|
|
1473
1493
|
} else if (Dispatch && Dispatch.now) {
|
|
@@ -1484,19 +1504,19 @@
|
|
|
1484
1504
|
// Browsers with postMessage, skip WebWorkers
|
|
1485
1505
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1486
1506
|
} else if (
|
|
1487
|
-
global$
|
|
1488
|
-
isCallable$
|
|
1489
|
-
!global$
|
|
1507
|
+
global$b.addEventListener &&
|
|
1508
|
+
isCallable$3(global$b.postMessage) &&
|
|
1509
|
+
!global$b.importScripts &&
|
|
1490
1510
|
location && location.protocol !== 'file:' &&
|
|
1491
|
-
!fails$
|
|
1511
|
+
!fails$6(post)
|
|
1492
1512
|
) {
|
|
1493
1513
|
defer = post;
|
|
1494
|
-
global$
|
|
1514
|
+
global$b.addEventListener('message', listener, false);
|
|
1495
1515
|
// IE8-
|
|
1496
1516
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1497
1517
|
defer = function (id) {
|
|
1498
|
-
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1499
|
-
html.removeChild(this);
|
|
1518
|
+
html$1.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1519
|
+
html$1.removeChild(this);
|
|
1500
1520
|
run(id);
|
|
1501
1521
|
};
|
|
1502
1522
|
};
|
|
@@ -1514,29 +1534,29 @@
|
|
|
1514
1534
|
};
|
|
1515
1535
|
|
|
1516
1536
|
var userAgent$1 = engineUserAgent;
|
|
1517
|
-
var global$
|
|
1537
|
+
var global$a = global$F;
|
|
1518
1538
|
|
|
1519
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$
|
|
1539
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$a.Pebble !== undefined;
|
|
1520
1540
|
|
|
1521
1541
|
var userAgent = engineUserAgent;
|
|
1522
1542
|
|
|
1523
1543
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1524
1544
|
|
|
1525
|
-
var global$
|
|
1545
|
+
var global$9 = global$F;
|
|
1526
1546
|
var bind$1 = functionBindContext;
|
|
1527
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1547
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1528
1548
|
var macrotask = task$1.set;
|
|
1529
1549
|
var IS_IOS = engineIsIos;
|
|
1530
1550
|
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
1531
1551
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
1532
1552
|
var IS_NODE$1 = engineIsNode;
|
|
1533
1553
|
|
|
1534
|
-
var MutationObserver = global$
|
|
1535
|
-
var document$2 = global$
|
|
1536
|
-
var process$
|
|
1537
|
-
var Promise$1 = global$
|
|
1554
|
+
var MutationObserver = global$9.MutationObserver || global$9.WebKitMutationObserver;
|
|
1555
|
+
var document$2 = global$9.document;
|
|
1556
|
+
var process$1 = global$9.process;
|
|
1557
|
+
var Promise$1 = global$9.Promise;
|
|
1538
1558
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
1539
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$
|
|
1559
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$9, 'queueMicrotask');
|
|
1540
1560
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
1541
1561
|
|
|
1542
1562
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
|
@@ -1545,7 +1565,7 @@
|
|
|
1545
1565
|
if (!queueMicrotask) {
|
|
1546
1566
|
flush = function () {
|
|
1547
1567
|
var parent, fn;
|
|
1548
|
-
if (IS_NODE$1 && (parent = process$
|
|
1568
|
+
if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
|
|
1549
1569
|
while (head) {
|
|
1550
1570
|
fn = head.fn;
|
|
1551
1571
|
head = head.next;
|
|
@@ -1582,7 +1602,7 @@
|
|
|
1582
1602
|
// Node.js without promises
|
|
1583
1603
|
} else if (IS_NODE$1) {
|
|
1584
1604
|
notify$1 = function () {
|
|
1585
|
-
process$
|
|
1605
|
+
process$1.nextTick(flush);
|
|
1586
1606
|
};
|
|
1587
1607
|
// for other environments - macrotask based on:
|
|
1588
1608
|
// - setImmediate
|
|
@@ -1592,7 +1612,7 @@
|
|
|
1592
1612
|
// - setTimeout
|
|
1593
1613
|
} else {
|
|
1594
1614
|
// strange IE + webpack dev server bug - use .bind(global)
|
|
1595
|
-
macrotask = bind$1(macrotask, global$
|
|
1615
|
+
macrotask = bind$1(macrotask, global$9);
|
|
1596
1616
|
notify$1 = function () {
|
|
1597
1617
|
macrotask(flush);
|
|
1598
1618
|
};
|
|
@@ -1629,23 +1649,23 @@
|
|
|
1629
1649
|
return new PromiseCapability(C);
|
|
1630
1650
|
};
|
|
1631
1651
|
|
|
1632
|
-
var anObject = anObject$
|
|
1633
|
-
var isObject$
|
|
1652
|
+
var anObject$5 = anObject$d;
|
|
1653
|
+
var isObject$2 = isObject$8;
|
|
1634
1654
|
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
1635
1655
|
|
|
1636
1656
|
var promiseResolve$1 = function (C, x) {
|
|
1637
|
-
anObject(C);
|
|
1638
|
-
if (isObject$
|
|
1657
|
+
anObject$5(C);
|
|
1658
|
+
if (isObject$2(x) && x.constructor === C) return x;
|
|
1639
1659
|
var promiseCapability = newPromiseCapability$1.f(C);
|
|
1640
1660
|
var resolve = promiseCapability.resolve;
|
|
1641
1661
|
resolve(x);
|
|
1642
1662
|
return promiseCapability.promise;
|
|
1643
1663
|
};
|
|
1644
1664
|
|
|
1645
|
-
var global$
|
|
1665
|
+
var global$8 = global$F;
|
|
1646
1666
|
|
|
1647
1667
|
var hostReportErrors$1 = function (a, b) {
|
|
1648
|
-
var console = global$
|
|
1668
|
+
var console = global$8.console;
|
|
1649
1669
|
if (console && console.error) {
|
|
1650
1670
|
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
1651
1671
|
}
|
|
@@ -1685,19 +1705,19 @@
|
|
|
1685
1705
|
|
|
1686
1706
|
var engineIsBrowser = typeof window == 'object';
|
|
1687
1707
|
|
|
1688
|
-
var $$
|
|
1689
|
-
var global$
|
|
1708
|
+
var $$3 = _export;
|
|
1709
|
+
var global$7 = global$F;
|
|
1690
1710
|
var getBuiltIn = getBuiltIn$7;
|
|
1691
|
-
var call$
|
|
1711
|
+
var call$4 = functionCall;
|
|
1692
1712
|
var NativePromise = nativePromiseConstructor;
|
|
1693
|
-
var redefine = redefine$
|
|
1713
|
+
var redefine$1 = redefine$4.exports;
|
|
1694
1714
|
var redefineAll = redefineAll$1;
|
|
1695
1715
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1696
1716
|
var setToStringTag = setToStringTag$1;
|
|
1697
1717
|
var setSpecies = setSpecies$1;
|
|
1698
1718
|
var aCallable = aCallable$5;
|
|
1699
|
-
var isCallable = isCallable$
|
|
1700
|
-
var isObject = isObject$
|
|
1719
|
+
var isCallable$2 = isCallable$g;
|
|
1720
|
+
var isObject$1 = isObject$8;
|
|
1701
1721
|
var anInstance = anInstance$1;
|
|
1702
1722
|
var inspectSource = inspectSource$4;
|
|
1703
1723
|
var iterate = iterate$1;
|
|
@@ -1712,28 +1732,28 @@
|
|
|
1712
1732
|
var Queue = queue;
|
|
1713
1733
|
var InternalStateModule = internalState;
|
|
1714
1734
|
var isForced = isForced_1;
|
|
1715
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
1735
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
1716
1736
|
var IS_BROWSER = engineIsBrowser;
|
|
1717
1737
|
var IS_NODE = engineIsNode;
|
|
1718
1738
|
var V8_VERSION = engineV8Version;
|
|
1719
1739
|
|
|
1720
|
-
var SPECIES = wellKnownSymbol('species');
|
|
1740
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
1721
1741
|
var PROMISE = 'Promise';
|
|
1722
1742
|
|
|
1723
|
-
var getInternalState = InternalStateModule.getterFor(PROMISE);
|
|
1743
|
+
var getInternalState$1 = InternalStateModule.getterFor(PROMISE);
|
|
1724
1744
|
var setInternalState = InternalStateModule.set;
|
|
1725
1745
|
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
1726
1746
|
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
1727
1747
|
var PromiseConstructor = NativePromise;
|
|
1728
1748
|
var PromisePrototype = NativePromisePrototype;
|
|
1729
|
-
var TypeError$
|
|
1730
|
-
var document$1 = global$
|
|
1731
|
-
var process
|
|
1749
|
+
var TypeError$3 = global$7.TypeError;
|
|
1750
|
+
var document$1 = global$7.document;
|
|
1751
|
+
var process = global$7.process;
|
|
1732
1752
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
1733
1753
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
1734
1754
|
|
|
1735
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$
|
|
1736
|
-
var NATIVE_REJECTION_EVENT = isCallable(global$
|
|
1755
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$7.dispatchEvent);
|
|
1756
|
+
var NATIVE_REJECTION_EVENT = isCallable$2(global$7.PromiseRejectionEvent);
|
|
1737
1757
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1738
1758
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1739
1759
|
var PENDING = 0;
|
|
@@ -1762,7 +1782,7 @@
|
|
|
1762
1782
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1763
1783
|
};
|
|
1764
1784
|
var constructor = promise.constructor = {};
|
|
1765
|
-
constructor[SPECIES] = FakePromise;
|
|
1785
|
+
constructor[SPECIES$1] = FakePromise;
|
|
1766
1786
|
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1767
1787
|
if (!SUBCLASSING) return true;
|
|
1768
1788
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -1776,7 +1796,7 @@
|
|
|
1776
1796
|
// helpers
|
|
1777
1797
|
var isThenable = function (it) {
|
|
1778
1798
|
var then;
|
|
1779
|
-
return isObject(it) && isCallable(then = it.then) ? then : false;
|
|
1799
|
+
return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
|
|
1780
1800
|
};
|
|
1781
1801
|
|
|
1782
1802
|
var callReaction = function (reaction, state) {
|
|
@@ -1803,9 +1823,9 @@
|
|
|
1803
1823
|
}
|
|
1804
1824
|
}
|
|
1805
1825
|
if (result === reaction.promise) {
|
|
1806
|
-
reject(TypeError$
|
|
1826
|
+
reject(TypeError$3('Promise-chain cycle'));
|
|
1807
1827
|
} else if (then = isThenable(result)) {
|
|
1808
|
-
call$
|
|
1828
|
+
call$4(then, result, resolve, reject);
|
|
1809
1829
|
} else resolve(result);
|
|
1810
1830
|
} else reject(value);
|
|
1811
1831
|
} catch (error) {
|
|
@@ -1835,14 +1855,14 @@
|
|
|
1835
1855
|
event.promise = promise;
|
|
1836
1856
|
event.reason = reason;
|
|
1837
1857
|
event.initEvent(name, false, true);
|
|
1838
|
-
global$
|
|
1858
|
+
global$7.dispatchEvent(event);
|
|
1839
1859
|
} else event = { promise: promise, reason: reason };
|
|
1840
|
-
if (!NATIVE_REJECTION_EVENT && (handler = global$
|
|
1860
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global$7['on' + name])) handler(event);
|
|
1841
1861
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
1842
1862
|
};
|
|
1843
1863
|
|
|
1844
1864
|
var onUnhandled = function (state) {
|
|
1845
|
-
call$
|
|
1865
|
+
call$4(task, global$7, function () {
|
|
1846
1866
|
var promise = state.facade;
|
|
1847
1867
|
var value = state.value;
|
|
1848
1868
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -1850,7 +1870,7 @@
|
|
|
1850
1870
|
if (IS_UNHANDLED) {
|
|
1851
1871
|
result = perform(function () {
|
|
1852
1872
|
if (IS_NODE) {
|
|
1853
|
-
process
|
|
1873
|
+
process.emit('unhandledRejection', value, promise);
|
|
1854
1874
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
1855
1875
|
});
|
|
1856
1876
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
@@ -1865,10 +1885,10 @@
|
|
|
1865
1885
|
};
|
|
1866
1886
|
|
|
1867
1887
|
var onHandleUnhandled = function (state) {
|
|
1868
|
-
call$
|
|
1888
|
+
call$4(task, global$7, function () {
|
|
1869
1889
|
var promise = state.facade;
|
|
1870
1890
|
if (IS_NODE) {
|
|
1871
|
-
process
|
|
1891
|
+
process.emit('rejectionHandled', promise);
|
|
1872
1892
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
1873
1893
|
});
|
|
1874
1894
|
};
|
|
@@ -1893,13 +1913,13 @@
|
|
|
1893
1913
|
state.done = true;
|
|
1894
1914
|
if (unwrap) state = unwrap;
|
|
1895
1915
|
try {
|
|
1896
|
-
if (state.facade === value) throw TypeError$
|
|
1916
|
+
if (state.facade === value) throw TypeError$3("Promise can't be resolved itself");
|
|
1897
1917
|
var then = isThenable(value);
|
|
1898
1918
|
if (then) {
|
|
1899
1919
|
microtask(function () {
|
|
1900
1920
|
var wrapper = { done: false };
|
|
1901
1921
|
try {
|
|
1902
|
-
call$
|
|
1922
|
+
call$4(then, value,
|
|
1903
1923
|
bind(internalResolve, wrapper, state),
|
|
1904
1924
|
bind(internalReject, wrapper, state)
|
|
1905
1925
|
);
|
|
@@ -1923,8 +1943,8 @@
|
|
|
1923
1943
|
PromiseConstructor = function Promise(executor) {
|
|
1924
1944
|
anInstance(this, PromisePrototype);
|
|
1925
1945
|
aCallable(executor);
|
|
1926
|
-
call$
|
|
1927
|
-
var state = getInternalState(this);
|
|
1946
|
+
call$4(Internal, this);
|
|
1947
|
+
var state = getInternalState$1(this);
|
|
1928
1948
|
try {
|
|
1929
1949
|
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
1930
1950
|
} catch (error) {
|
|
@@ -1953,9 +1973,9 @@
|
|
|
1953
1973
|
var state = getInternalPromiseState(this);
|
|
1954
1974
|
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
1955
1975
|
state.parent = true;
|
|
1956
|
-
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
|
|
1957
|
-
reaction.fail = isCallable(onRejected) && onRejected;
|
|
1958
|
-
reaction.domain = IS_NODE ? process
|
|
1976
|
+
reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
|
|
1977
|
+
reaction.fail = isCallable$2(onRejected) && onRejected;
|
|
1978
|
+
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
1959
1979
|
if (state.state == PENDING) state.reactions.add(reaction);
|
|
1960
1980
|
else microtask(function () {
|
|
1961
1981
|
callReaction(reaction, state);
|
|
@@ -1970,7 +1990,7 @@
|
|
|
1970
1990
|
});
|
|
1971
1991
|
OwnPromiseCapability = function () {
|
|
1972
1992
|
var promise = new Internal();
|
|
1973
|
-
var state = getInternalState(promise);
|
|
1993
|
+
var state = getInternalState$1(promise);
|
|
1974
1994
|
this.promise = promise;
|
|
1975
1995
|
this.resolve = bind(internalResolve, state);
|
|
1976
1996
|
this.reject = bind(internalReject, state);
|
|
@@ -1981,21 +2001,21 @@
|
|
|
1981
2001
|
: newGenericPromiseCapability(C);
|
|
1982
2002
|
};
|
|
1983
2003
|
|
|
1984
|
-
if (isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
|
|
2004
|
+
if (isCallable$2(NativePromise) && NativePromisePrototype !== Object.prototype) {
|
|
1985
2005
|
nativeThen = NativePromisePrototype.then;
|
|
1986
2006
|
|
|
1987
2007
|
if (!SUBCLASSING) {
|
|
1988
2008
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
1989
|
-
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2009
|
+
redefine$1(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
1990
2010
|
var that = this;
|
|
1991
2011
|
return new PromiseConstructor(function (resolve, reject) {
|
|
1992
|
-
call$
|
|
2012
|
+
call$4(nativeThen, that, resolve, reject);
|
|
1993
2013
|
}).then(onFulfilled, onRejected);
|
|
1994
2014
|
// https://github.com/zloirock/core-js/issues/640
|
|
1995
2015
|
}, { unsafe: true });
|
|
1996
2016
|
|
|
1997
2017
|
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1998
|
-
redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
2018
|
+
redefine$1(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1999
2019
|
}
|
|
2000
2020
|
|
|
2001
2021
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
@@ -2010,7 +2030,7 @@
|
|
|
2010
2030
|
}
|
|
2011
2031
|
}
|
|
2012
2032
|
|
|
2013
|
-
$$
|
|
2033
|
+
$$3({ global: true, wrap: true, forced: FORCED }, {
|
|
2014
2034
|
Promise: PromiseConstructor
|
|
2015
2035
|
});
|
|
2016
2036
|
|
|
@@ -2020,17 +2040,17 @@
|
|
|
2020
2040
|
PromiseWrapper = getBuiltIn(PROMISE);
|
|
2021
2041
|
|
|
2022
2042
|
// statics
|
|
2023
|
-
$$
|
|
2043
|
+
$$3({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
2024
2044
|
// `Promise.reject` method
|
|
2025
2045
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2026
2046
|
reject: function reject(r) {
|
|
2027
2047
|
var capability = newPromiseCapability(this);
|
|
2028
|
-
call$
|
|
2048
|
+
call$4(capability.reject, undefined, r);
|
|
2029
2049
|
return capability.promise;
|
|
2030
2050
|
}
|
|
2031
2051
|
});
|
|
2032
2052
|
|
|
2033
|
-
$$
|
|
2053
|
+
$$3({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
2034
2054
|
// `Promise.resolve` method
|
|
2035
2055
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2036
2056
|
resolve: function resolve(x) {
|
|
@@ -2038,7 +2058,7 @@
|
|
|
2038
2058
|
}
|
|
2039
2059
|
});
|
|
2040
2060
|
|
|
2041
|
-
$$
|
|
2061
|
+
$$3({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
2042
2062
|
// `Promise.all` method
|
|
2043
2063
|
// https://tc39.es/ecma262/#sec-promise.all
|
|
2044
2064
|
all: function all(iterable) {
|
|
@@ -2055,7 +2075,7 @@
|
|
|
2055
2075
|
var index = counter++;
|
|
2056
2076
|
var alreadyCalled = false;
|
|
2057
2077
|
remaining++;
|
|
2058
|
-
call$
|
|
2078
|
+
call$4($promiseResolve, C, promise).then(function (value) {
|
|
2059
2079
|
if (alreadyCalled) return;
|
|
2060
2080
|
alreadyCalled = true;
|
|
2061
2081
|
values[index] = value;
|
|
@@ -2076,7 +2096,7 @@
|
|
|
2076
2096
|
var result = perform(function () {
|
|
2077
2097
|
var $promiseResolve = aCallable(C.resolve);
|
|
2078
2098
|
iterate(iterable, function (promise) {
|
|
2079
|
-
call$
|
|
2099
|
+
call$4($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2080
2100
|
});
|
|
2081
2101
|
});
|
|
2082
2102
|
if (result.error) reject(result.value);
|
|
@@ -2085,36 +2105,36 @@
|
|
|
2085
2105
|
});
|
|
2086
2106
|
|
|
2087
2107
|
var internalObjectKeys = objectKeysInternal;
|
|
2088
|
-
var enumBugKeys = enumBugKeys$
|
|
2108
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
2089
2109
|
|
|
2090
2110
|
// `Object.keys` method
|
|
2091
2111
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
2092
2112
|
// eslint-disable-next-line es/no-object-keys -- safe
|
|
2093
|
-
var objectKeys$
|
|
2094
|
-
return internalObjectKeys(O, enumBugKeys);
|
|
2113
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
2114
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
2095
2115
|
};
|
|
2096
2116
|
|
|
2097
|
-
var DESCRIPTORS = descriptors;
|
|
2098
|
-
var uncurryThis = functionUncurryThis;
|
|
2099
|
-
var call = functionCall;
|
|
2100
|
-
var fails = fails$
|
|
2101
|
-
var objectKeys = objectKeys$
|
|
2117
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2118
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2119
|
+
var call$3 = functionCall;
|
|
2120
|
+
var fails$5 = fails$f;
|
|
2121
|
+
var objectKeys$1 = objectKeys$2;
|
|
2102
2122
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2103
2123
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2104
|
-
var toObject = toObject$
|
|
2124
|
+
var toObject$1 = toObject$3;
|
|
2105
2125
|
var IndexedObject = indexedObject;
|
|
2106
2126
|
|
|
2107
2127
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
2108
2128
|
var $assign = Object.assign;
|
|
2109
2129
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2110
2130
|
var defineProperty = Object.defineProperty;
|
|
2111
|
-
var concat = uncurryThis([].concat);
|
|
2131
|
+
var concat$1 = uncurryThis$6([].concat);
|
|
2112
2132
|
|
|
2113
2133
|
// `Object.assign` method
|
|
2114
2134
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2115
|
-
var objectAssign = !$assign || fails(function () {
|
|
2135
|
+
var objectAssign = !$assign || fails$5(function () {
|
|
2116
2136
|
// should have correct order of operations (Edge bug)
|
|
2117
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
2137
|
+
if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
2118
2138
|
enumerable: true,
|
|
2119
2139
|
get: function () {
|
|
2120
2140
|
defineProperty(this, 'b', {
|
|
@@ -2131,33 +2151,33 @@
|
|
|
2131
2151
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
2132
2152
|
A[symbol] = 7;
|
|
2133
2153
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
2134
|
-
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
2154
|
+
return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
|
|
2135
2155
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
2136
|
-
var T = toObject(target);
|
|
2156
|
+
var T = toObject$1(target);
|
|
2137
2157
|
var argumentsLength = arguments.length;
|
|
2138
2158
|
var index = 1;
|
|
2139
2159
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
2140
2160
|
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
2141
2161
|
while (argumentsLength > index) {
|
|
2142
2162
|
var S = IndexedObject(arguments[index++]);
|
|
2143
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
2163
|
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
2144
2164
|
var length = keys.length;
|
|
2145
2165
|
var j = 0;
|
|
2146
2166
|
var key;
|
|
2147
2167
|
while (length > j) {
|
|
2148
2168
|
key = keys[j++];
|
|
2149
|
-
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2169
|
+
if (!DESCRIPTORS$1 || call$3(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2150
2170
|
}
|
|
2151
2171
|
} return T;
|
|
2152
2172
|
} : $assign;
|
|
2153
2173
|
|
|
2154
|
-
var
|
|
2174
|
+
var $$2 = _export;
|
|
2155
2175
|
var assign = objectAssign;
|
|
2156
2176
|
|
|
2157
2177
|
// `Object.assign` method
|
|
2158
2178
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2159
2179
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2160
|
-
|
|
2180
|
+
$$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
2161
2181
|
assign: assign
|
|
2162
2182
|
});
|
|
2163
2183
|
|
|
@@ -2280,726 +2300,14 @@
|
|
|
2280
2300
|
};
|
|
2281
2301
|
};
|
|
2282
2302
|
|
|
2283
|
-
var browser = {exports: {}};
|
|
2284
|
-
|
|
2285
|
-
/**
|
|
2286
|
-
* Helpers.
|
|
2287
|
-
*/
|
|
2288
|
-
|
|
2289
|
-
var s = 1000;
|
|
2290
|
-
var m = s * 60;
|
|
2291
|
-
var h = m * 60;
|
|
2292
|
-
var d = h * 24;
|
|
2293
|
-
var w = d * 7;
|
|
2294
|
-
var y = d * 365.25;
|
|
2295
|
-
|
|
2296
|
-
/**
|
|
2297
|
-
* Parse or format the given `val`.
|
|
2298
|
-
*
|
|
2299
|
-
* Options:
|
|
2300
|
-
*
|
|
2301
|
-
* - `long` verbose formatting [false]
|
|
2302
|
-
*
|
|
2303
|
-
* @param {String|Number} val
|
|
2304
|
-
* @param {Object} [options]
|
|
2305
|
-
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
2306
|
-
* @return {String|Number}
|
|
2307
|
-
* @api public
|
|
2308
|
-
*/
|
|
2309
|
-
|
|
2310
|
-
var ms = function(val, options) {
|
|
2311
|
-
options = options || {};
|
|
2312
|
-
var type = typeof val;
|
|
2313
|
-
if (type === 'string' && val.length > 0) {
|
|
2314
|
-
return parse(val);
|
|
2315
|
-
} else if (type === 'number' && isFinite(val)) {
|
|
2316
|
-
return options.long ? fmtLong(val) : fmtShort(val);
|
|
2317
|
-
}
|
|
2318
|
-
throw new Error(
|
|
2319
|
-
'val is not a non-empty string or a valid number. val=' +
|
|
2320
|
-
JSON.stringify(val)
|
|
2321
|
-
);
|
|
2322
|
-
};
|
|
2323
|
-
|
|
2324
|
-
/**
|
|
2325
|
-
* Parse the given `str` and return milliseconds.
|
|
2326
|
-
*
|
|
2327
|
-
* @param {String} str
|
|
2328
|
-
* @return {Number}
|
|
2329
|
-
* @api private
|
|
2330
|
-
*/
|
|
2331
|
-
|
|
2332
|
-
function parse(str) {
|
|
2333
|
-
str = String(str);
|
|
2334
|
-
if (str.length > 100) {
|
|
2335
|
-
return;
|
|
2336
|
-
}
|
|
2337
|
-
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
2338
|
-
str
|
|
2339
|
-
);
|
|
2340
|
-
if (!match) {
|
|
2341
|
-
return;
|
|
2342
|
-
}
|
|
2343
|
-
var n = parseFloat(match[1]);
|
|
2344
|
-
var type = (match[2] || 'ms').toLowerCase();
|
|
2345
|
-
switch (type) {
|
|
2346
|
-
case 'years':
|
|
2347
|
-
case 'year':
|
|
2348
|
-
case 'yrs':
|
|
2349
|
-
case 'yr':
|
|
2350
|
-
case 'y':
|
|
2351
|
-
return n * y;
|
|
2352
|
-
case 'weeks':
|
|
2353
|
-
case 'week':
|
|
2354
|
-
case 'w':
|
|
2355
|
-
return n * w;
|
|
2356
|
-
case 'days':
|
|
2357
|
-
case 'day':
|
|
2358
|
-
case 'd':
|
|
2359
|
-
return n * d;
|
|
2360
|
-
case 'hours':
|
|
2361
|
-
case 'hour':
|
|
2362
|
-
case 'hrs':
|
|
2363
|
-
case 'hr':
|
|
2364
|
-
case 'h':
|
|
2365
|
-
return n * h;
|
|
2366
|
-
case 'minutes':
|
|
2367
|
-
case 'minute':
|
|
2368
|
-
case 'mins':
|
|
2369
|
-
case 'min':
|
|
2370
|
-
case 'm':
|
|
2371
|
-
return n * m;
|
|
2372
|
-
case 'seconds':
|
|
2373
|
-
case 'second':
|
|
2374
|
-
case 'secs':
|
|
2375
|
-
case 'sec':
|
|
2376
|
-
case 's':
|
|
2377
|
-
return n * s;
|
|
2378
|
-
case 'milliseconds':
|
|
2379
|
-
case 'millisecond':
|
|
2380
|
-
case 'msecs':
|
|
2381
|
-
case 'msec':
|
|
2382
|
-
case 'ms':
|
|
2383
|
-
return n;
|
|
2384
|
-
default:
|
|
2385
|
-
return undefined;
|
|
2386
|
-
}
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
/**
|
|
2390
|
-
* Short format for `ms`.
|
|
2391
|
-
*
|
|
2392
|
-
* @param {Number} ms
|
|
2393
|
-
* @return {String}
|
|
2394
|
-
* @api private
|
|
2395
|
-
*/
|
|
2396
|
-
|
|
2397
|
-
function fmtShort(ms) {
|
|
2398
|
-
var msAbs = Math.abs(ms);
|
|
2399
|
-
if (msAbs >= d) {
|
|
2400
|
-
return Math.round(ms / d) + 'd';
|
|
2401
|
-
}
|
|
2402
|
-
if (msAbs >= h) {
|
|
2403
|
-
return Math.round(ms / h) + 'h';
|
|
2404
|
-
}
|
|
2405
|
-
if (msAbs >= m) {
|
|
2406
|
-
return Math.round(ms / m) + 'm';
|
|
2407
|
-
}
|
|
2408
|
-
if (msAbs >= s) {
|
|
2409
|
-
return Math.round(ms / s) + 's';
|
|
2410
|
-
}
|
|
2411
|
-
return ms + 'ms';
|
|
2412
|
-
}
|
|
2413
|
-
|
|
2414
|
-
/**
|
|
2415
|
-
* Long format for `ms`.
|
|
2416
|
-
*
|
|
2417
|
-
* @param {Number} ms
|
|
2418
|
-
* @return {String}
|
|
2419
|
-
* @api private
|
|
2420
|
-
*/
|
|
2421
|
-
|
|
2422
|
-
function fmtLong(ms) {
|
|
2423
|
-
var msAbs = Math.abs(ms);
|
|
2424
|
-
if (msAbs >= d) {
|
|
2425
|
-
return plural(ms, msAbs, d, 'day');
|
|
2426
|
-
}
|
|
2427
|
-
if (msAbs >= h) {
|
|
2428
|
-
return plural(ms, msAbs, h, 'hour');
|
|
2429
|
-
}
|
|
2430
|
-
if (msAbs >= m) {
|
|
2431
|
-
return plural(ms, msAbs, m, 'minute');
|
|
2432
|
-
}
|
|
2433
|
-
if (msAbs >= s) {
|
|
2434
|
-
return plural(ms, msAbs, s, 'second');
|
|
2435
|
-
}
|
|
2436
|
-
return ms + ' ms';
|
|
2437
|
-
}
|
|
2438
|
-
|
|
2439
|
-
/**
|
|
2440
|
-
* Pluralization helper.
|
|
2441
|
-
*/
|
|
2442
|
-
|
|
2443
|
-
function plural(ms, msAbs, n, name) {
|
|
2444
|
-
var isPlural = msAbs >= n * 1.5;
|
|
2445
|
-
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
/**
|
|
2449
|
-
* This is the common logic for both the Node.js and web browser
|
|
2450
|
-
* implementations of `debug()`.
|
|
2451
|
-
*/
|
|
2452
|
-
|
|
2453
|
-
function setup(env) {
|
|
2454
|
-
createDebug.debug = createDebug;
|
|
2455
|
-
createDebug.default = createDebug;
|
|
2456
|
-
createDebug.coerce = coerce;
|
|
2457
|
-
createDebug.disable = disable;
|
|
2458
|
-
createDebug.enable = enable;
|
|
2459
|
-
createDebug.enabled = enabled;
|
|
2460
|
-
createDebug.humanize = ms;
|
|
2461
|
-
createDebug.destroy = destroy;
|
|
2462
|
-
|
|
2463
|
-
Object.keys(env).forEach(key => {
|
|
2464
|
-
createDebug[key] = env[key];
|
|
2465
|
-
});
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
* The currently active debug mode names, and names to skip.
|
|
2469
|
-
*/
|
|
2470
|
-
|
|
2471
|
-
createDebug.names = [];
|
|
2472
|
-
createDebug.skips = [];
|
|
2473
|
-
|
|
2474
|
-
/**
|
|
2475
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
|
2476
|
-
*
|
|
2477
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
|
2478
|
-
*/
|
|
2479
|
-
createDebug.formatters = {};
|
|
2480
|
-
|
|
2481
|
-
/**
|
|
2482
|
-
* Selects a color for a debug namespace
|
|
2483
|
-
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
2484
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
|
2485
|
-
* @api private
|
|
2486
|
-
*/
|
|
2487
|
-
function selectColor(namespace) {
|
|
2488
|
-
let hash = 0;
|
|
2489
|
-
|
|
2490
|
-
for (let i = 0; i < namespace.length; i++) {
|
|
2491
|
-
hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
|
2492
|
-
hash |= 0; // Convert to 32bit integer
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
|
2496
|
-
}
|
|
2497
|
-
createDebug.selectColor = selectColor;
|
|
2498
|
-
|
|
2499
|
-
/**
|
|
2500
|
-
* Create a debugger with the given `namespace`.
|
|
2501
|
-
*
|
|
2502
|
-
* @param {String} namespace
|
|
2503
|
-
* @return {Function}
|
|
2504
|
-
* @api public
|
|
2505
|
-
*/
|
|
2506
|
-
function createDebug(namespace) {
|
|
2507
|
-
let prevTime;
|
|
2508
|
-
let enableOverride = null;
|
|
2509
|
-
let namespacesCache;
|
|
2510
|
-
let enabledCache;
|
|
2511
|
-
|
|
2512
|
-
function debug(...args) {
|
|
2513
|
-
// Disabled?
|
|
2514
|
-
if (!debug.enabled) {
|
|
2515
|
-
return;
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
const self = debug;
|
|
2519
|
-
|
|
2520
|
-
// Set `diff` timestamp
|
|
2521
|
-
const curr = Number(new Date());
|
|
2522
|
-
const ms = curr - (prevTime || curr);
|
|
2523
|
-
self.diff = ms;
|
|
2524
|
-
self.prev = prevTime;
|
|
2525
|
-
self.curr = curr;
|
|
2526
|
-
prevTime = curr;
|
|
2527
|
-
|
|
2528
|
-
args[0] = createDebug.coerce(args[0]);
|
|
2529
|
-
|
|
2530
|
-
if (typeof args[0] !== 'string') {
|
|
2531
|
-
// Anything else let's inspect with %O
|
|
2532
|
-
args.unshift('%O');
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
// Apply any `formatters` transformations
|
|
2536
|
-
let index = 0;
|
|
2537
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
|
|
2538
|
-
// If we encounter an escaped % then don't increase the array index
|
|
2539
|
-
if (match === '%%') {
|
|
2540
|
-
return '%';
|
|
2541
|
-
}
|
|
2542
|
-
index++;
|
|
2543
|
-
const formatter = createDebug.formatters[format];
|
|
2544
|
-
if (typeof formatter === 'function') {
|
|
2545
|
-
const val = args[index];
|
|
2546
|
-
match = formatter.call(self, val);
|
|
2547
|
-
|
|
2548
|
-
// Now we need to remove `args[index]` since it's inlined in the `format`
|
|
2549
|
-
args.splice(index, 1);
|
|
2550
|
-
index--;
|
|
2551
|
-
}
|
|
2552
|
-
return match;
|
|
2553
|
-
});
|
|
2554
|
-
|
|
2555
|
-
// Apply env-specific formatting (colors, etc.)
|
|
2556
|
-
createDebug.formatArgs.call(self, args);
|
|
2557
|
-
|
|
2558
|
-
const logFn = self.log || createDebug.log;
|
|
2559
|
-
logFn.apply(self, args);
|
|
2560
|
-
}
|
|
2561
|
-
|
|
2562
|
-
debug.namespace = namespace;
|
|
2563
|
-
debug.useColors = createDebug.useColors();
|
|
2564
|
-
debug.color = createDebug.selectColor(namespace);
|
|
2565
|
-
debug.extend = extend;
|
|
2566
|
-
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
2567
|
-
|
|
2568
|
-
Object.defineProperty(debug, 'enabled', {
|
|
2569
|
-
enumerable: true,
|
|
2570
|
-
configurable: false,
|
|
2571
|
-
get: () => {
|
|
2572
|
-
if (enableOverride !== null) {
|
|
2573
|
-
return enableOverride;
|
|
2574
|
-
}
|
|
2575
|
-
if (namespacesCache !== createDebug.namespaces) {
|
|
2576
|
-
namespacesCache = createDebug.namespaces;
|
|
2577
|
-
enabledCache = createDebug.enabled(namespace);
|
|
2578
|
-
}
|
|
2579
|
-
|
|
2580
|
-
return enabledCache;
|
|
2581
|
-
},
|
|
2582
|
-
set: v => {
|
|
2583
|
-
enableOverride = v;
|
|
2584
|
-
}
|
|
2585
|
-
});
|
|
2586
|
-
|
|
2587
|
-
// Env-specific initialization logic for debug instances
|
|
2588
|
-
if (typeof createDebug.init === 'function') {
|
|
2589
|
-
createDebug.init(debug);
|
|
2590
|
-
}
|
|
2591
|
-
|
|
2592
|
-
return debug;
|
|
2593
|
-
}
|
|
2594
|
-
|
|
2595
|
-
function extend(namespace, delimiter) {
|
|
2596
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
2597
|
-
newDebug.log = this.log;
|
|
2598
|
-
return newDebug;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
/**
|
|
2602
|
-
* Enables a debug mode by namespaces. This can include modes
|
|
2603
|
-
* separated by a colon and wildcards.
|
|
2604
|
-
*
|
|
2605
|
-
* @param {String} namespaces
|
|
2606
|
-
* @api public
|
|
2607
|
-
*/
|
|
2608
|
-
function enable(namespaces) {
|
|
2609
|
-
createDebug.save(namespaces);
|
|
2610
|
-
createDebug.namespaces = namespaces;
|
|
2611
|
-
|
|
2612
|
-
createDebug.names = [];
|
|
2613
|
-
createDebug.skips = [];
|
|
2614
|
-
|
|
2615
|
-
let i;
|
|
2616
|
-
const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
|
2617
|
-
const len = split.length;
|
|
2618
|
-
|
|
2619
|
-
for (i = 0; i < len; i++) {
|
|
2620
|
-
if (!split[i]) {
|
|
2621
|
-
// ignore empty strings
|
|
2622
|
-
continue;
|
|
2623
|
-
}
|
|
2624
|
-
|
|
2625
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
|
2626
|
-
|
|
2627
|
-
if (namespaces[0] === '-') {
|
|
2628
|
-
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
|
2629
|
-
} else {
|
|
2630
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
2631
|
-
}
|
|
2632
|
-
}
|
|
2633
|
-
}
|
|
2634
|
-
|
|
2635
|
-
/**
|
|
2636
|
-
* Disable debug output.
|
|
2637
|
-
*
|
|
2638
|
-
* @return {String} namespaces
|
|
2639
|
-
* @api public
|
|
2640
|
-
*/
|
|
2641
|
-
function disable() {
|
|
2642
|
-
const namespaces = [
|
|
2643
|
-
...createDebug.names.map(toNamespace),
|
|
2644
|
-
...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
|
|
2645
|
-
].join(',');
|
|
2646
|
-
createDebug.enable('');
|
|
2647
|
-
return namespaces;
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
/**
|
|
2651
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
|
2652
|
-
*
|
|
2653
|
-
* @param {String} name
|
|
2654
|
-
* @return {Boolean}
|
|
2655
|
-
* @api public
|
|
2656
|
-
*/
|
|
2657
|
-
function enabled(name) {
|
|
2658
|
-
if (name[name.length - 1] === '*') {
|
|
2659
|
-
return true;
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
let i;
|
|
2663
|
-
let len;
|
|
2664
|
-
|
|
2665
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
|
2666
|
-
if (createDebug.skips[i].test(name)) {
|
|
2667
|
-
return false;
|
|
2668
|
-
}
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
|
2672
|
-
if (createDebug.names[i].test(name)) {
|
|
2673
|
-
return true;
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
|
|
2677
|
-
return false;
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
|
-
/**
|
|
2681
|
-
* Convert regexp to namespace
|
|
2682
|
-
*
|
|
2683
|
-
* @param {RegExp} regxep
|
|
2684
|
-
* @return {String} namespace
|
|
2685
|
-
* @api private
|
|
2686
|
-
*/
|
|
2687
|
-
function toNamespace(regexp) {
|
|
2688
|
-
return regexp.toString()
|
|
2689
|
-
.substring(2, regexp.toString().length - 2)
|
|
2690
|
-
.replace(/\.\*\?$/, '*');
|
|
2691
|
-
}
|
|
2692
|
-
|
|
2693
|
-
/**
|
|
2694
|
-
* Coerce `val`.
|
|
2695
|
-
*
|
|
2696
|
-
* @param {Mixed} val
|
|
2697
|
-
* @return {Mixed}
|
|
2698
|
-
* @api private
|
|
2699
|
-
*/
|
|
2700
|
-
function coerce(val) {
|
|
2701
|
-
if (val instanceof Error) {
|
|
2702
|
-
return val.stack || val.message;
|
|
2703
|
-
}
|
|
2704
|
-
return val;
|
|
2705
|
-
}
|
|
2706
|
-
|
|
2707
|
-
/**
|
|
2708
|
-
* XXX DO NOT USE. This is a temporary stub function.
|
|
2709
|
-
* XXX It WILL be removed in the next major release.
|
|
2710
|
-
*/
|
|
2711
|
-
function destroy() {
|
|
2712
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
2713
|
-
}
|
|
2714
|
-
|
|
2715
|
-
createDebug.enable(createDebug.load());
|
|
2716
|
-
|
|
2717
|
-
return createDebug;
|
|
2718
|
-
}
|
|
2719
|
-
|
|
2720
|
-
var common = setup;
|
|
2721
|
-
|
|
2722
|
-
/* eslint-env browser */
|
|
2723
|
-
|
|
2724
|
-
(function (module, exports) {
|
|
2725
|
-
/**
|
|
2726
|
-
* This is the web browser implementation of `debug()`.
|
|
2727
|
-
*/
|
|
2728
|
-
|
|
2729
|
-
exports.formatArgs = formatArgs;
|
|
2730
|
-
exports.save = save;
|
|
2731
|
-
exports.load = load;
|
|
2732
|
-
exports.useColors = useColors;
|
|
2733
|
-
exports.storage = localstorage();
|
|
2734
|
-
exports.destroy = (() => {
|
|
2735
|
-
let warned = false;
|
|
2736
|
-
|
|
2737
|
-
return () => {
|
|
2738
|
-
if (!warned) {
|
|
2739
|
-
warned = true;
|
|
2740
|
-
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
2741
|
-
}
|
|
2742
|
-
};
|
|
2743
|
-
})();
|
|
2744
|
-
|
|
2745
|
-
/**
|
|
2746
|
-
* Colors.
|
|
2747
|
-
*/
|
|
2748
|
-
|
|
2749
|
-
exports.colors = [
|
|
2750
|
-
'#0000CC',
|
|
2751
|
-
'#0000FF',
|
|
2752
|
-
'#0033CC',
|
|
2753
|
-
'#0033FF',
|
|
2754
|
-
'#0066CC',
|
|
2755
|
-
'#0066FF',
|
|
2756
|
-
'#0099CC',
|
|
2757
|
-
'#0099FF',
|
|
2758
|
-
'#00CC00',
|
|
2759
|
-
'#00CC33',
|
|
2760
|
-
'#00CC66',
|
|
2761
|
-
'#00CC99',
|
|
2762
|
-
'#00CCCC',
|
|
2763
|
-
'#00CCFF',
|
|
2764
|
-
'#3300CC',
|
|
2765
|
-
'#3300FF',
|
|
2766
|
-
'#3333CC',
|
|
2767
|
-
'#3333FF',
|
|
2768
|
-
'#3366CC',
|
|
2769
|
-
'#3366FF',
|
|
2770
|
-
'#3399CC',
|
|
2771
|
-
'#3399FF',
|
|
2772
|
-
'#33CC00',
|
|
2773
|
-
'#33CC33',
|
|
2774
|
-
'#33CC66',
|
|
2775
|
-
'#33CC99',
|
|
2776
|
-
'#33CCCC',
|
|
2777
|
-
'#33CCFF',
|
|
2778
|
-
'#6600CC',
|
|
2779
|
-
'#6600FF',
|
|
2780
|
-
'#6633CC',
|
|
2781
|
-
'#6633FF',
|
|
2782
|
-
'#66CC00',
|
|
2783
|
-
'#66CC33',
|
|
2784
|
-
'#9900CC',
|
|
2785
|
-
'#9900FF',
|
|
2786
|
-
'#9933CC',
|
|
2787
|
-
'#9933FF',
|
|
2788
|
-
'#99CC00',
|
|
2789
|
-
'#99CC33',
|
|
2790
|
-
'#CC0000',
|
|
2791
|
-
'#CC0033',
|
|
2792
|
-
'#CC0066',
|
|
2793
|
-
'#CC0099',
|
|
2794
|
-
'#CC00CC',
|
|
2795
|
-
'#CC00FF',
|
|
2796
|
-
'#CC3300',
|
|
2797
|
-
'#CC3333',
|
|
2798
|
-
'#CC3366',
|
|
2799
|
-
'#CC3399',
|
|
2800
|
-
'#CC33CC',
|
|
2801
|
-
'#CC33FF',
|
|
2802
|
-
'#CC6600',
|
|
2803
|
-
'#CC6633',
|
|
2804
|
-
'#CC9900',
|
|
2805
|
-
'#CC9933',
|
|
2806
|
-
'#CCCC00',
|
|
2807
|
-
'#CCCC33',
|
|
2808
|
-
'#FF0000',
|
|
2809
|
-
'#FF0033',
|
|
2810
|
-
'#FF0066',
|
|
2811
|
-
'#FF0099',
|
|
2812
|
-
'#FF00CC',
|
|
2813
|
-
'#FF00FF',
|
|
2814
|
-
'#FF3300',
|
|
2815
|
-
'#FF3333',
|
|
2816
|
-
'#FF3366',
|
|
2817
|
-
'#FF3399',
|
|
2818
|
-
'#FF33CC',
|
|
2819
|
-
'#FF33FF',
|
|
2820
|
-
'#FF6600',
|
|
2821
|
-
'#FF6633',
|
|
2822
|
-
'#FF9900',
|
|
2823
|
-
'#FF9933',
|
|
2824
|
-
'#FFCC00',
|
|
2825
|
-
'#FFCC33'
|
|
2826
|
-
];
|
|
2827
|
-
|
|
2828
|
-
/**
|
|
2829
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
2830
|
-
* and the Firebug extension (any Firefox version) are known
|
|
2831
|
-
* to support "%c" CSS customizations.
|
|
2832
|
-
*
|
|
2833
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
|
2834
|
-
*/
|
|
2835
|
-
|
|
2836
|
-
// eslint-disable-next-line complexity
|
|
2837
|
-
function useColors() {
|
|
2838
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
|
2839
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
|
2840
|
-
// explicitly
|
|
2841
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
|
2842
|
-
return true;
|
|
2843
|
-
}
|
|
2844
|
-
|
|
2845
|
-
// Internet Explorer and Edge do not support colors.
|
|
2846
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
|
2847
|
-
return false;
|
|
2848
|
-
}
|
|
2849
|
-
|
|
2850
|
-
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
|
2851
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
2852
|
-
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
|
2853
|
-
// Is firebug? http://stackoverflow.com/a/398120/376773
|
|
2854
|
-
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
|
2855
|
-
// Is firefox >= v31?
|
|
2856
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
2857
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
|
2858
|
-
// Double check webkit in userAgent just in case we are in a worker
|
|
2859
|
-
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
|
2860
|
-
}
|
|
2861
|
-
|
|
2862
|
-
/**
|
|
2863
|
-
* Colorize log arguments if enabled.
|
|
2864
|
-
*
|
|
2865
|
-
* @api public
|
|
2866
|
-
*/
|
|
2867
|
-
|
|
2868
|
-
function formatArgs(args) {
|
|
2869
|
-
args[0] = (this.useColors ? '%c' : '') +
|
|
2870
|
-
this.namespace +
|
|
2871
|
-
(this.useColors ? ' %c' : ' ') +
|
|
2872
|
-
args[0] +
|
|
2873
|
-
(this.useColors ? '%c ' : ' ') +
|
|
2874
|
-
'+' + module.exports.humanize(this.diff);
|
|
2875
|
-
|
|
2876
|
-
if (!this.useColors) {
|
|
2877
|
-
return;
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
const c = 'color: ' + this.color;
|
|
2881
|
-
args.splice(1, 0, c, 'color: inherit');
|
|
2882
|
-
|
|
2883
|
-
// The final "%c" is somewhat tricky, because there could be other
|
|
2884
|
-
// arguments passed either before or after the %c, so we need to
|
|
2885
|
-
// figure out the correct index to insert the CSS into
|
|
2886
|
-
let index = 0;
|
|
2887
|
-
let lastC = 0;
|
|
2888
|
-
args[0].replace(/%[a-zA-Z%]/g, match => {
|
|
2889
|
-
if (match === '%%') {
|
|
2890
|
-
return;
|
|
2891
|
-
}
|
|
2892
|
-
index++;
|
|
2893
|
-
if (match === '%c') {
|
|
2894
|
-
// We only are interested in the *last* %c
|
|
2895
|
-
// (the user may have provided their own)
|
|
2896
|
-
lastC = index;
|
|
2897
|
-
}
|
|
2898
|
-
});
|
|
2899
|
-
|
|
2900
|
-
args.splice(lastC, 0, c);
|
|
2901
|
-
}
|
|
2902
|
-
|
|
2903
|
-
/**
|
|
2904
|
-
* Invokes `console.debug()` when available.
|
|
2905
|
-
* No-op when `console.debug` is not a "function".
|
|
2906
|
-
* If `console.debug` is not available, falls back
|
|
2907
|
-
* to `console.log`.
|
|
2908
|
-
*
|
|
2909
|
-
* @api public
|
|
2910
|
-
*/
|
|
2911
|
-
exports.log = console.debug || console.log || (() => {});
|
|
2912
|
-
|
|
2913
|
-
/**
|
|
2914
|
-
* Save `namespaces`.
|
|
2915
|
-
*
|
|
2916
|
-
* @param {String} namespaces
|
|
2917
|
-
* @api private
|
|
2918
|
-
*/
|
|
2919
|
-
function save(namespaces) {
|
|
2920
|
-
try {
|
|
2921
|
-
if (namespaces) {
|
|
2922
|
-
exports.storage.setItem('debug', namespaces);
|
|
2923
|
-
} else {
|
|
2924
|
-
exports.storage.removeItem('debug');
|
|
2925
|
-
}
|
|
2926
|
-
} catch (error) {
|
|
2927
|
-
// Swallow
|
|
2928
|
-
// XXX (@Qix-) should we be logging these?
|
|
2929
|
-
}
|
|
2930
|
-
}
|
|
2931
|
-
|
|
2932
|
-
/**
|
|
2933
|
-
* Load `namespaces`.
|
|
2934
|
-
*
|
|
2935
|
-
* @return {String} returns the previously persisted debug modes
|
|
2936
|
-
* @api private
|
|
2937
|
-
*/
|
|
2938
|
-
function load() {
|
|
2939
|
-
let r;
|
|
2940
|
-
try {
|
|
2941
|
-
r = exports.storage.getItem('debug');
|
|
2942
|
-
} catch (error) {
|
|
2943
|
-
// Swallow
|
|
2944
|
-
// XXX (@Qix-) should we be logging these?
|
|
2945
|
-
}
|
|
2946
|
-
|
|
2947
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
|
2948
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
|
2949
|
-
r = process.env.DEBUG;
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
return r;
|
|
2953
|
-
}
|
|
2954
|
-
|
|
2955
|
-
/**
|
|
2956
|
-
* Localstorage attempts to return the localstorage.
|
|
2957
|
-
*
|
|
2958
|
-
* This is necessary because safari throws
|
|
2959
|
-
* when a user disables cookies/localstorage
|
|
2960
|
-
* and you attempt to access it.
|
|
2961
|
-
*
|
|
2962
|
-
* @return {LocalStorage}
|
|
2963
|
-
* @api private
|
|
2964
|
-
*/
|
|
2965
|
-
|
|
2966
|
-
function localstorage() {
|
|
2967
|
-
try {
|
|
2968
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
|
2969
|
-
// The Browser also has localStorage in the global context.
|
|
2970
|
-
return localStorage;
|
|
2971
|
-
} catch (error) {
|
|
2972
|
-
// Swallow
|
|
2973
|
-
// XXX (@Qix-) should we be logging these?
|
|
2974
|
-
}
|
|
2975
|
-
}
|
|
2976
|
-
|
|
2977
|
-
module.exports = common(exports);
|
|
2978
|
-
|
|
2979
|
-
const {formatters} = module.exports;
|
|
2980
|
-
|
|
2981
|
-
/**
|
|
2982
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
|
2983
|
-
*/
|
|
2984
|
-
|
|
2985
|
-
formatters.j = function (v) {
|
|
2986
|
-
try {
|
|
2987
|
-
return JSON.stringify(v);
|
|
2988
|
-
} catch (error) {
|
|
2989
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
|
2990
|
-
}
|
|
2991
|
-
};
|
|
2992
|
-
}(browser, browser.exports));
|
|
2993
|
-
|
|
2994
|
-
var Debug = browser.exports;
|
|
2995
|
-
|
|
2996
|
-
var log = Debug('ninetailed:experience-sdk');
|
|
2997
2303
|
var enable = function enable() {
|
|
2998
|
-
|
|
2304
|
+
loglevel__namespace.enableAll();
|
|
2999
2305
|
};
|
|
3000
2306
|
var disable = function disable() {
|
|
3001
|
-
|
|
2307
|
+
loglevel__namespace.disableAll();
|
|
3002
2308
|
};
|
|
2309
|
+
var Logger = loglevel__namespace.getLogger('ninetailed:experience.js');
|
|
2310
|
+
var log = Logger.log;
|
|
3003
2311
|
|
|
3004
2312
|
var BASE_URL = 'https://api.ninetailed.co';
|
|
3005
2313
|
|
|
@@ -3539,7 +2847,7 @@
|
|
|
3539
2847
|
return _this.instance.on(NINETAILED_TRACKER_EVENTS.profile, function (_a) {
|
|
3540
2848
|
var payload = _a.payload;
|
|
3541
2849
|
cb(__assign(__assign({}, _this._profileState), {
|
|
3542
|
-
|
|
2850
|
+
status: 'success',
|
|
3543
2851
|
profile: payload.profile,
|
|
3544
2852
|
error: undefined
|
|
3545
2853
|
}));
|
|
@@ -3547,12 +2855,23 @@
|
|
|
3547
2855
|
};
|
|
3548
2856
|
|
|
3549
2857
|
this.plugins = flatten__default["default"](plugins || []);
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
2858
|
+
|
|
2859
|
+
if (profile) {
|
|
2860
|
+
this._profileState = {
|
|
2861
|
+
status: 'success',
|
|
2862
|
+
profile: profile,
|
|
2863
|
+
error: undefined,
|
|
2864
|
+
from: 'hydrated'
|
|
2865
|
+
};
|
|
2866
|
+
} else {
|
|
2867
|
+
this._profileState = {
|
|
2868
|
+
status: 'loading',
|
|
2869
|
+
profile: null,
|
|
2870
|
+
error: undefined,
|
|
2871
|
+
from: 'api'
|
|
2872
|
+
};
|
|
2873
|
+
}
|
|
2874
|
+
|
|
3556
2875
|
this.instance = Analytics__default["default"]({
|
|
3557
2876
|
app: 'ninetailed',
|
|
3558
2877
|
plugins: __spreadArray(__spreadArray([], this.plugins, true), [ninetailedPlugin({
|
|
@@ -3603,8 +2922,8 @@
|
|
|
3603
2922
|
return Ninetailed;
|
|
3604
2923
|
}();
|
|
3605
2924
|
|
|
3606
|
-
var selectVariant = function selectVariant(baseline, variants, _a, options) {
|
|
3607
|
-
var
|
|
2925
|
+
var selectVariant$1 = function selectVariant(baseline, variants, _a, options) {
|
|
2926
|
+
var status = _a.status,
|
|
3608
2927
|
profile = _a.profile,
|
|
3609
2928
|
error = _a.error;
|
|
3610
2929
|
|
|
@@ -3614,7 +2933,7 @@
|
|
|
3614
2933
|
};
|
|
3615
2934
|
}
|
|
3616
2935
|
|
|
3617
|
-
if (loading) {
|
|
2936
|
+
if (status === 'loading') {
|
|
3618
2937
|
return {
|
|
3619
2938
|
loading: true,
|
|
3620
2939
|
variant: __assign({
|
|
@@ -3631,7 +2950,7 @@
|
|
|
3631
2950
|
};
|
|
3632
2951
|
}
|
|
3633
2952
|
|
|
3634
|
-
if (error) {
|
|
2953
|
+
if (status === 'error') {
|
|
3635
2954
|
return {
|
|
3636
2955
|
loading: false,
|
|
3637
2956
|
variant: __assign({
|
|
@@ -3703,11 +3022,871 @@
|
|
|
3703
3022
|
};
|
|
3704
3023
|
};
|
|
3705
3024
|
|
|
3025
|
+
var selectBaselineWithVariants = function selectBaselineWithVariants(experience, baseline) {
|
|
3026
|
+
return experience.components.find(function (baselineWithVariants) {
|
|
3027
|
+
return baselineWithVariants.baseline.id === baseline.id;
|
|
3028
|
+
});
|
|
3029
|
+
};
|
|
3030
|
+
|
|
3031
|
+
var selectVariants = function selectVariants(experience, baseline) {
|
|
3032
|
+
var baselineWithVariants = selectBaselineWithVariants(experience, baseline);
|
|
3033
|
+
|
|
3034
|
+
if (!baselineWithVariants) {
|
|
3035
|
+
return [];
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
return baselineWithVariants.variants;
|
|
3039
|
+
};
|
|
3040
|
+
|
|
3041
|
+
var selectHasVariants = function selectHasVariants(experience, baseline) {
|
|
3042
|
+
var variants = selectVariants(experience, baseline);
|
|
3043
|
+
return variants.length > 0;
|
|
3044
|
+
};
|
|
3045
|
+
|
|
3046
|
+
var global$6 = global$F;
|
|
3047
|
+
var classof$2 = classof$6;
|
|
3048
|
+
|
|
3049
|
+
var String$1 = global$6.String;
|
|
3050
|
+
|
|
3051
|
+
var toString$4 = function (argument) {
|
|
3052
|
+
if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
3053
|
+
return String$1(argument);
|
|
3054
|
+
};
|
|
3055
|
+
|
|
3056
|
+
var isObject = isObject$8;
|
|
3057
|
+
var classof$1 = classofRaw$1;
|
|
3058
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
3059
|
+
|
|
3060
|
+
var MATCH$1 = wellKnownSymbol$3('match');
|
|
3061
|
+
|
|
3062
|
+
// `IsRegExp` abstract operation
|
|
3063
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
3064
|
+
var isRegexp = function (it) {
|
|
3065
|
+
var isRegExp;
|
|
3066
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
|
|
3067
|
+
};
|
|
3068
|
+
|
|
3069
|
+
var global$5 = global$F;
|
|
3070
|
+
var isRegExp = isRegexp;
|
|
3071
|
+
|
|
3072
|
+
var TypeError$2 = global$5.TypeError;
|
|
3073
|
+
|
|
3074
|
+
var notARegexp = function (it) {
|
|
3075
|
+
if (isRegExp(it)) {
|
|
3076
|
+
throw TypeError$2("The method doesn't accept regular expressions");
|
|
3077
|
+
} return it;
|
|
3078
|
+
};
|
|
3079
|
+
|
|
3080
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
3081
|
+
|
|
3082
|
+
var MATCH = wellKnownSymbol$2('match');
|
|
3083
|
+
|
|
3084
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
3085
|
+
var regexp = /./;
|
|
3086
|
+
try {
|
|
3087
|
+
'/./'[METHOD_NAME](regexp);
|
|
3088
|
+
} catch (error1) {
|
|
3089
|
+
try {
|
|
3090
|
+
regexp[MATCH] = false;
|
|
3091
|
+
return '/./'[METHOD_NAME](regexp);
|
|
3092
|
+
} catch (error2) { /* empty */ }
|
|
3093
|
+
} return false;
|
|
3094
|
+
};
|
|
3095
|
+
|
|
3096
|
+
var $$1 = _export;
|
|
3097
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
3098
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
3099
|
+
var toLength$1 = toLength$3;
|
|
3100
|
+
var toString$3 = toString$4;
|
|
3101
|
+
var notARegExp = notARegexp;
|
|
3102
|
+
var requireObjectCoercible$2 = requireObjectCoercible$5;
|
|
3103
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3104
|
+
|
|
3105
|
+
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
3106
|
+
var un$StartsWith = uncurryThis$5(''.startsWith);
|
|
3107
|
+
var stringSlice$4 = uncurryThis$5(''.slice);
|
|
3108
|
+
var min$1 = Math.min;
|
|
3109
|
+
|
|
3110
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
3111
|
+
// https://github.com/zloirock/core-js/pull/702
|
|
3112
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
3113
|
+
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
3114
|
+
return descriptor && !descriptor.writable;
|
|
3115
|
+
}();
|
|
3116
|
+
|
|
3117
|
+
// `String.prototype.startsWith` method
|
|
3118
|
+
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
3119
|
+
$$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
3120
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
3121
|
+
var that = toString$3(requireObjectCoercible$2(this));
|
|
3122
|
+
notARegExp(searchString);
|
|
3123
|
+
var index = toLength$1(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
3124
|
+
var search = toString$3(searchString);
|
|
3125
|
+
return un$StartsWith
|
|
3126
|
+
? un$StartsWith(that, search, index)
|
|
3127
|
+
: stringSlice$4(that, index, index + search.length) === search;
|
|
3128
|
+
}
|
|
3129
|
+
});
|
|
3130
|
+
|
|
3131
|
+
var anObject$4 = anObject$d;
|
|
3132
|
+
|
|
3133
|
+
// `RegExp.prototype.flags` getter implementation
|
|
3134
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
3135
|
+
var regexpFlags$1 = function () {
|
|
3136
|
+
var that = anObject$4(this);
|
|
3137
|
+
var result = '';
|
|
3138
|
+
if (that.global) result += 'g';
|
|
3139
|
+
if (that.ignoreCase) result += 'i';
|
|
3140
|
+
if (that.multiline) result += 'm';
|
|
3141
|
+
if (that.dotAll) result += 's';
|
|
3142
|
+
if (that.unicode) result += 'u';
|
|
3143
|
+
if (that.sticky) result += 'y';
|
|
3144
|
+
return result;
|
|
3145
|
+
};
|
|
3146
|
+
|
|
3147
|
+
var fails$4 = fails$f;
|
|
3148
|
+
var global$4 = global$F;
|
|
3149
|
+
|
|
3150
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
3151
|
+
var $RegExp$2 = global$4.RegExp;
|
|
3152
|
+
|
|
3153
|
+
var UNSUPPORTED_Y$1 = fails$4(function () {
|
|
3154
|
+
var re = $RegExp$2('a', 'y');
|
|
3155
|
+
re.lastIndex = 2;
|
|
3156
|
+
return re.exec('abcd') != null;
|
|
3157
|
+
});
|
|
3158
|
+
|
|
3159
|
+
// UC Browser bug
|
|
3160
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
3161
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
3162
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
3163
|
+
});
|
|
3164
|
+
|
|
3165
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
3166
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
3167
|
+
var re = $RegExp$2('^r', 'gy');
|
|
3168
|
+
re.lastIndex = 2;
|
|
3169
|
+
return re.exec('str') != null;
|
|
3170
|
+
});
|
|
3171
|
+
|
|
3172
|
+
var regexpStickyHelpers = {
|
|
3173
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
3174
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
3175
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
3176
|
+
};
|
|
3177
|
+
|
|
3178
|
+
var objectDefineProperties = {};
|
|
3179
|
+
|
|
3180
|
+
var DESCRIPTORS = descriptors;
|
|
3181
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
3182
|
+
var definePropertyModule = objectDefineProperty;
|
|
3183
|
+
var anObject$3 = anObject$d;
|
|
3184
|
+
var toIndexedObject = toIndexedObject$4;
|
|
3185
|
+
var objectKeys = objectKeys$2;
|
|
3186
|
+
|
|
3187
|
+
// `Object.defineProperties` method
|
|
3188
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
3189
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
3190
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
3191
|
+
anObject$3(O);
|
|
3192
|
+
var props = toIndexedObject(Properties);
|
|
3193
|
+
var keys = objectKeys(Properties);
|
|
3194
|
+
var length = keys.length;
|
|
3195
|
+
var index = 0;
|
|
3196
|
+
var key;
|
|
3197
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
3198
|
+
return O;
|
|
3199
|
+
};
|
|
3200
|
+
|
|
3201
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
3202
|
+
|
|
3203
|
+
var anObject$2 = anObject$d;
|
|
3204
|
+
var definePropertiesModule = objectDefineProperties;
|
|
3205
|
+
var enumBugKeys = enumBugKeys$3;
|
|
3206
|
+
var hiddenKeys = hiddenKeys$4;
|
|
3207
|
+
var html = html$2;
|
|
3208
|
+
var documentCreateElement = documentCreateElement$1;
|
|
3209
|
+
var sharedKey = sharedKey$2;
|
|
3210
|
+
|
|
3211
|
+
var GT = '>';
|
|
3212
|
+
var LT = '<';
|
|
3213
|
+
var PROTOTYPE = 'prototype';
|
|
3214
|
+
var SCRIPT = 'script';
|
|
3215
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
3216
|
+
|
|
3217
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
3218
|
+
|
|
3219
|
+
var scriptTag = function (content) {
|
|
3220
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
3221
|
+
};
|
|
3222
|
+
|
|
3223
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
3224
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
3225
|
+
activeXDocument.write(scriptTag(''));
|
|
3226
|
+
activeXDocument.close();
|
|
3227
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
3228
|
+
activeXDocument = null; // avoid memory leak
|
|
3229
|
+
return temp;
|
|
3230
|
+
};
|
|
3231
|
+
|
|
3232
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
3233
|
+
var NullProtoObjectViaIFrame = function () {
|
|
3234
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
3235
|
+
var iframe = documentCreateElement('iframe');
|
|
3236
|
+
var JS = 'java' + SCRIPT + ':';
|
|
3237
|
+
var iframeDocument;
|
|
3238
|
+
iframe.style.display = 'none';
|
|
3239
|
+
html.appendChild(iframe);
|
|
3240
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
3241
|
+
iframe.src = String(JS);
|
|
3242
|
+
iframeDocument = iframe.contentWindow.document;
|
|
3243
|
+
iframeDocument.open();
|
|
3244
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
3245
|
+
iframeDocument.close();
|
|
3246
|
+
return iframeDocument.F;
|
|
3247
|
+
};
|
|
3248
|
+
|
|
3249
|
+
// Check for document.domain and active x support
|
|
3250
|
+
// No need to use active x approach when document.domain is not set
|
|
3251
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
3252
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
3253
|
+
// avoid IE GC bug
|
|
3254
|
+
var activeXDocument;
|
|
3255
|
+
var NullProtoObject = function () {
|
|
3256
|
+
try {
|
|
3257
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
3258
|
+
} catch (error) { /* ignore */ }
|
|
3259
|
+
NullProtoObject = typeof document != 'undefined'
|
|
3260
|
+
? document.domain && activeXDocument
|
|
3261
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
3262
|
+
: NullProtoObjectViaIFrame()
|
|
3263
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
3264
|
+
var length = enumBugKeys.length;
|
|
3265
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
3266
|
+
return NullProtoObject();
|
|
3267
|
+
};
|
|
3268
|
+
|
|
3269
|
+
hiddenKeys[IE_PROTO] = true;
|
|
3270
|
+
|
|
3271
|
+
// `Object.create` method
|
|
3272
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
3273
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
3274
|
+
var result;
|
|
3275
|
+
if (O !== null) {
|
|
3276
|
+
EmptyConstructor[PROTOTYPE] = anObject$2(O);
|
|
3277
|
+
result = new EmptyConstructor();
|
|
3278
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
3279
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
3280
|
+
result[IE_PROTO] = O;
|
|
3281
|
+
} else result = NullProtoObject();
|
|
3282
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
3283
|
+
};
|
|
3284
|
+
|
|
3285
|
+
var fails$3 = fails$f;
|
|
3286
|
+
var global$3 = global$F;
|
|
3287
|
+
|
|
3288
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
3289
|
+
var $RegExp$1 = global$3.RegExp;
|
|
3290
|
+
|
|
3291
|
+
var regexpUnsupportedDotAll = fails$3(function () {
|
|
3292
|
+
var re = $RegExp$1('.', 's');
|
|
3293
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
3294
|
+
});
|
|
3295
|
+
|
|
3296
|
+
var fails$2 = fails$f;
|
|
3297
|
+
var global$2 = global$F;
|
|
3298
|
+
|
|
3299
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
3300
|
+
var $RegExp = global$2.RegExp;
|
|
3301
|
+
|
|
3302
|
+
var regexpUnsupportedNcg = fails$2(function () {
|
|
3303
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
3304
|
+
return re.exec('b').groups.a !== 'b' ||
|
|
3305
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
|
3306
|
+
});
|
|
3307
|
+
|
|
3308
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
3309
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
3310
|
+
var call$2 = functionCall;
|
|
3311
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
3312
|
+
var toString$2 = toString$4;
|
|
3313
|
+
var regexpFlags = regexpFlags$1;
|
|
3314
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
3315
|
+
var shared = shared$4.exports;
|
|
3316
|
+
var create = objectCreate;
|
|
3317
|
+
var getInternalState = internalState.get;
|
|
3318
|
+
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
3319
|
+
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
3320
|
+
|
|
3321
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
3322
|
+
var nativeExec = RegExp.prototype.exec;
|
|
3323
|
+
var patchedExec = nativeExec;
|
|
3324
|
+
var charAt$3 = uncurryThis$4(''.charAt);
|
|
3325
|
+
var indexOf = uncurryThis$4(''.indexOf);
|
|
3326
|
+
var replace$1 = uncurryThis$4(''.replace);
|
|
3327
|
+
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
3328
|
+
|
|
3329
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
3330
|
+
var re1 = /a/;
|
|
3331
|
+
var re2 = /b*/g;
|
|
3332
|
+
call$2(nativeExec, re1, 'a');
|
|
3333
|
+
call$2(nativeExec, re2, 'a');
|
|
3334
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
3335
|
+
})();
|
|
3336
|
+
|
|
3337
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
3338
|
+
|
|
3339
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
3340
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
3341
|
+
|
|
3342
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
3343
|
+
|
|
3344
|
+
if (PATCH) {
|
|
3345
|
+
patchedExec = function exec(string) {
|
|
3346
|
+
var re = this;
|
|
3347
|
+
var state = getInternalState(re);
|
|
3348
|
+
var str = toString$2(string);
|
|
3349
|
+
var raw = state.raw;
|
|
3350
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
|
3351
|
+
|
|
3352
|
+
if (raw) {
|
|
3353
|
+
raw.lastIndex = re.lastIndex;
|
|
3354
|
+
result = call$2(patchedExec, raw, str);
|
|
3355
|
+
re.lastIndex = raw.lastIndex;
|
|
3356
|
+
return result;
|
|
3357
|
+
}
|
|
3358
|
+
|
|
3359
|
+
var groups = state.groups;
|
|
3360
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
3361
|
+
var flags = call$2(regexpFlags, re);
|
|
3362
|
+
var source = re.source;
|
|
3363
|
+
var charsAdded = 0;
|
|
3364
|
+
var strCopy = str;
|
|
3365
|
+
|
|
3366
|
+
if (sticky) {
|
|
3367
|
+
flags = replace$1(flags, 'y', '');
|
|
3368
|
+
if (indexOf(flags, 'g') === -1) {
|
|
3369
|
+
flags += 'g';
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
strCopy = stringSlice$3(str, re.lastIndex);
|
|
3373
|
+
// Support anchored sticky behavior.
|
|
3374
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
3375
|
+
source = '(?: ' + source + ')';
|
|
3376
|
+
strCopy = ' ' + strCopy;
|
|
3377
|
+
charsAdded++;
|
|
3378
|
+
}
|
|
3379
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
3380
|
+
// simulate the 'y' flag.
|
|
3381
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
3382
|
+
}
|
|
3383
|
+
|
|
3384
|
+
if (NPCG_INCLUDED) {
|
|
3385
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
3386
|
+
}
|
|
3387
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
3388
|
+
|
|
3389
|
+
match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
|
|
3390
|
+
|
|
3391
|
+
if (sticky) {
|
|
3392
|
+
if (match) {
|
|
3393
|
+
match.input = stringSlice$3(match.input, charsAdded);
|
|
3394
|
+
match[0] = stringSlice$3(match[0], charsAdded);
|
|
3395
|
+
match.index = re.lastIndex;
|
|
3396
|
+
re.lastIndex += match[0].length;
|
|
3397
|
+
} else re.lastIndex = 0;
|
|
3398
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
3399
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
3400
|
+
}
|
|
3401
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
3402
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
3403
|
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
3404
|
+
call$2(nativeReplace, match[0], reCopy, function () {
|
|
3405
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
3406
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
3407
|
+
}
|
|
3408
|
+
});
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
if (match && groups) {
|
|
3412
|
+
match.groups = object = create(null);
|
|
3413
|
+
for (i = 0; i < groups.length; i++) {
|
|
3414
|
+
group = groups[i];
|
|
3415
|
+
object[group[0]] = match[group[1]];
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3418
|
+
|
|
3419
|
+
return match;
|
|
3420
|
+
};
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
var regexpExec$2 = patchedExec;
|
|
3424
|
+
|
|
3425
|
+
var $ = _export;
|
|
3426
|
+
var exec = regexpExec$2;
|
|
3427
|
+
|
|
3428
|
+
// `RegExp.prototype.exec` method
|
|
3429
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
3430
|
+
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
3431
|
+
exec: exec
|
|
3432
|
+
});
|
|
3433
|
+
|
|
3434
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
3435
|
+
|
|
3436
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
3437
|
+
var redefine = redefine$4.exports;
|
|
3438
|
+
var regexpExec$1 = regexpExec$2;
|
|
3439
|
+
var fails$1 = fails$f;
|
|
3440
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
3441
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
3442
|
+
|
|
3443
|
+
var SPECIES = wellKnownSymbol$1('species');
|
|
3444
|
+
var RegExpPrototype = RegExp.prototype;
|
|
3445
|
+
|
|
3446
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
3447
|
+
var SYMBOL = wellKnownSymbol$1(KEY);
|
|
3448
|
+
|
|
3449
|
+
var DELEGATES_TO_SYMBOL = !fails$1(function () {
|
|
3450
|
+
// String methods call symbol-named RegEp methods
|
|
3451
|
+
var O = {};
|
|
3452
|
+
O[SYMBOL] = function () { return 7; };
|
|
3453
|
+
return ''[KEY](O) != 7;
|
|
3454
|
+
});
|
|
3455
|
+
|
|
3456
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
|
|
3457
|
+
// Symbol-named RegExp methods call .exec
|
|
3458
|
+
var execCalled = false;
|
|
3459
|
+
var re = /a/;
|
|
3460
|
+
|
|
3461
|
+
if (KEY === 'split') {
|
|
3462
|
+
// We can't use real regex here since it causes deoptimization
|
|
3463
|
+
// and serious performance degradation in V8
|
|
3464
|
+
// https://github.com/zloirock/core-js/issues/306
|
|
3465
|
+
re = {};
|
|
3466
|
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
3467
|
+
// a new one. We need to return the patched regex when creating the new one.
|
|
3468
|
+
re.constructor = {};
|
|
3469
|
+
re.constructor[SPECIES] = function () { return re; };
|
|
3470
|
+
re.flags = '';
|
|
3471
|
+
re[SYMBOL] = /./[SYMBOL];
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
re.exec = function () { execCalled = true; return null; };
|
|
3475
|
+
|
|
3476
|
+
re[SYMBOL]('');
|
|
3477
|
+
return !execCalled;
|
|
3478
|
+
});
|
|
3479
|
+
|
|
3480
|
+
if (
|
|
3481
|
+
!DELEGATES_TO_SYMBOL ||
|
|
3482
|
+
!DELEGATES_TO_EXEC ||
|
|
3483
|
+
FORCED
|
|
3484
|
+
) {
|
|
3485
|
+
var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
|
|
3486
|
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
3487
|
+
var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
|
|
3488
|
+
var $exec = regexp.exec;
|
|
3489
|
+
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
3490
|
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
3491
|
+
// The native String method already delegates to @@method (this
|
|
3492
|
+
// polyfilled function), leasing to infinite recursion.
|
|
3493
|
+
// We avoid it by directly calling the native @@method method.
|
|
3494
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
|
3495
|
+
}
|
|
3496
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
|
3497
|
+
}
|
|
3498
|
+
return { done: false };
|
|
3499
|
+
});
|
|
3500
|
+
|
|
3501
|
+
redefine(String.prototype, KEY, methods[0]);
|
|
3502
|
+
redefine(RegExpPrototype, SYMBOL, methods[1]);
|
|
3503
|
+
}
|
|
3504
|
+
|
|
3505
|
+
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
3506
|
+
};
|
|
3507
|
+
|
|
3508
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
3509
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
3510
|
+
var toString$1 = toString$4;
|
|
3511
|
+
var requireObjectCoercible$1 = requireObjectCoercible$5;
|
|
3512
|
+
|
|
3513
|
+
var charAt$2 = uncurryThis$2(''.charAt);
|
|
3514
|
+
var charCodeAt = uncurryThis$2(''.charCodeAt);
|
|
3515
|
+
var stringSlice$2 = uncurryThis$2(''.slice);
|
|
3516
|
+
|
|
3517
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
3518
|
+
return function ($this, pos) {
|
|
3519
|
+
var S = toString$1(requireObjectCoercible$1($this));
|
|
3520
|
+
var position = toIntegerOrInfinity$1(pos);
|
|
3521
|
+
var size = S.length;
|
|
3522
|
+
var first, second;
|
|
3523
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
3524
|
+
first = charCodeAt(S, position);
|
|
3525
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
3526
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
3527
|
+
? CONVERT_TO_STRING
|
|
3528
|
+
? charAt$2(S, position)
|
|
3529
|
+
: first
|
|
3530
|
+
: CONVERT_TO_STRING
|
|
3531
|
+
? stringSlice$2(S, position, position + 2)
|
|
3532
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
3533
|
+
};
|
|
3534
|
+
};
|
|
3535
|
+
|
|
3536
|
+
var stringMultibyte = {
|
|
3537
|
+
// `String.prototype.codePointAt` method
|
|
3538
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
3539
|
+
codeAt: createMethod(false),
|
|
3540
|
+
// `String.prototype.at` method
|
|
3541
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
3542
|
+
charAt: createMethod(true)
|
|
3543
|
+
};
|
|
3544
|
+
|
|
3545
|
+
var charAt$1 = stringMultibyte.charAt;
|
|
3546
|
+
|
|
3547
|
+
// `AdvanceStringIndex` abstract operation
|
|
3548
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
3549
|
+
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
3550
|
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
3551
|
+
};
|
|
3552
|
+
|
|
3553
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
3554
|
+
var toObject = toObject$3;
|
|
3555
|
+
|
|
3556
|
+
var floor = Math.floor;
|
|
3557
|
+
var charAt = uncurryThis$1(''.charAt);
|
|
3558
|
+
var replace = uncurryThis$1(''.replace);
|
|
3559
|
+
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
3560
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
3561
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
3562
|
+
|
|
3563
|
+
// `GetSubstitution` abstract operation
|
|
3564
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
3565
|
+
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
3566
|
+
var tailPos = position + matched.length;
|
|
3567
|
+
var m = captures.length;
|
|
3568
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
3569
|
+
if (namedCaptures !== undefined) {
|
|
3570
|
+
namedCaptures = toObject(namedCaptures);
|
|
3571
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
3572
|
+
}
|
|
3573
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
3574
|
+
var capture;
|
|
3575
|
+
switch (charAt(ch, 0)) {
|
|
3576
|
+
case '$': return '$';
|
|
3577
|
+
case '&': return matched;
|
|
3578
|
+
case '`': return stringSlice$1(str, 0, position);
|
|
3579
|
+
case "'": return stringSlice$1(str, tailPos);
|
|
3580
|
+
case '<':
|
|
3581
|
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
3582
|
+
break;
|
|
3583
|
+
default: // \d\d?
|
|
3584
|
+
var n = +ch;
|
|
3585
|
+
if (n === 0) return match;
|
|
3586
|
+
if (n > m) {
|
|
3587
|
+
var f = floor(n / 10);
|
|
3588
|
+
if (f === 0) return match;
|
|
3589
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
3590
|
+
return match;
|
|
3591
|
+
}
|
|
3592
|
+
capture = captures[n - 1];
|
|
3593
|
+
}
|
|
3594
|
+
return capture === undefined ? '' : capture;
|
|
3595
|
+
});
|
|
3596
|
+
};
|
|
3597
|
+
|
|
3598
|
+
var global$1 = global$F;
|
|
3599
|
+
var call$1 = functionCall;
|
|
3600
|
+
var anObject$1 = anObject$d;
|
|
3601
|
+
var isCallable$1 = isCallable$g;
|
|
3602
|
+
var classof = classofRaw$1;
|
|
3603
|
+
var regexpExec = regexpExec$2;
|
|
3604
|
+
|
|
3605
|
+
var TypeError$1 = global$1.TypeError;
|
|
3606
|
+
|
|
3607
|
+
// `RegExpExec` abstract operation
|
|
3608
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
3609
|
+
var regexpExecAbstract = function (R, S) {
|
|
3610
|
+
var exec = R.exec;
|
|
3611
|
+
if (isCallable$1(exec)) {
|
|
3612
|
+
var result = call$1(exec, R, S);
|
|
3613
|
+
if (result !== null) anObject$1(result);
|
|
3614
|
+
return result;
|
|
3615
|
+
}
|
|
3616
|
+
if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
|
|
3617
|
+
throw TypeError$1('RegExp#exec called on incompatible receiver');
|
|
3618
|
+
};
|
|
3619
|
+
|
|
3620
|
+
var apply = functionApply;
|
|
3621
|
+
var call = functionCall;
|
|
3622
|
+
var uncurryThis = functionUncurryThis;
|
|
3623
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
3624
|
+
var fails = fails$f;
|
|
3625
|
+
var anObject = anObject$d;
|
|
3626
|
+
var isCallable = isCallable$g;
|
|
3627
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
3628
|
+
var toLength = toLength$3;
|
|
3629
|
+
var toString = toString$4;
|
|
3630
|
+
var requireObjectCoercible = requireObjectCoercible$5;
|
|
3631
|
+
var advanceStringIndex = advanceStringIndex$1;
|
|
3632
|
+
var getMethod = getMethod$4;
|
|
3633
|
+
var getSubstitution = getSubstitution$1;
|
|
3634
|
+
var regExpExec = regexpExecAbstract;
|
|
3635
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
3636
|
+
|
|
3637
|
+
var REPLACE = wellKnownSymbol('replace');
|
|
3638
|
+
var max = Math.max;
|
|
3639
|
+
var min = Math.min;
|
|
3640
|
+
var concat = uncurryThis([].concat);
|
|
3641
|
+
var push = uncurryThis([].push);
|
|
3642
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
3643
|
+
var stringSlice = uncurryThis(''.slice);
|
|
3644
|
+
|
|
3645
|
+
var maybeToString = function (it) {
|
|
3646
|
+
return it === undefined ? it : String(it);
|
|
3647
|
+
};
|
|
3648
|
+
|
|
3649
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
3650
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
3651
|
+
var REPLACE_KEEPS_$0 = (function () {
|
|
3652
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
3653
|
+
return 'a'.replace(/./, '$0') === '$0';
|
|
3654
|
+
})();
|
|
3655
|
+
|
|
3656
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
3657
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
3658
|
+
if (/./[REPLACE]) {
|
|
3659
|
+
return /./[REPLACE]('a', '$0') === '';
|
|
3660
|
+
}
|
|
3661
|
+
return false;
|
|
3662
|
+
})();
|
|
3663
|
+
|
|
3664
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
3665
|
+
var re = /./;
|
|
3666
|
+
re.exec = function () {
|
|
3667
|
+
var result = [];
|
|
3668
|
+
result.groups = { a: '7' };
|
|
3669
|
+
return result;
|
|
3670
|
+
};
|
|
3671
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
3672
|
+
return ''.replace(re, '$<a>') !== '7';
|
|
3673
|
+
});
|
|
3674
|
+
|
|
3675
|
+
// @@replace logic
|
|
3676
|
+
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
3677
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
3678
|
+
|
|
3679
|
+
return [
|
|
3680
|
+
// `String.prototype.replace` method
|
|
3681
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
3682
|
+
function replace(searchValue, replaceValue) {
|
|
3683
|
+
var O = requireObjectCoercible(this);
|
|
3684
|
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
|
3685
|
+
return replacer
|
|
3686
|
+
? call(replacer, searchValue, O, replaceValue)
|
|
3687
|
+
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
|
3688
|
+
},
|
|
3689
|
+
// `RegExp.prototype[@@replace]` method
|
|
3690
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
3691
|
+
function (string, replaceValue) {
|
|
3692
|
+
var rx = anObject(this);
|
|
3693
|
+
var S = toString(string);
|
|
3694
|
+
|
|
3695
|
+
if (
|
|
3696
|
+
typeof replaceValue == 'string' &&
|
|
3697
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
3698
|
+
stringIndexOf(replaceValue, '$<') === -1
|
|
3699
|
+
) {
|
|
3700
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
3701
|
+
if (res.done) return res.value;
|
|
3702
|
+
}
|
|
3703
|
+
|
|
3704
|
+
var functionalReplace = isCallable(replaceValue);
|
|
3705
|
+
if (!functionalReplace) replaceValue = toString(replaceValue);
|
|
3706
|
+
|
|
3707
|
+
var global = rx.global;
|
|
3708
|
+
if (global) {
|
|
3709
|
+
var fullUnicode = rx.unicode;
|
|
3710
|
+
rx.lastIndex = 0;
|
|
3711
|
+
}
|
|
3712
|
+
var results = [];
|
|
3713
|
+
while (true) {
|
|
3714
|
+
var result = regExpExec(rx, S);
|
|
3715
|
+
if (result === null) break;
|
|
3716
|
+
|
|
3717
|
+
push(results, result);
|
|
3718
|
+
if (!global) break;
|
|
3719
|
+
|
|
3720
|
+
var matchStr = toString(result[0]);
|
|
3721
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
3722
|
+
}
|
|
3723
|
+
|
|
3724
|
+
var accumulatedResult = '';
|
|
3725
|
+
var nextSourcePosition = 0;
|
|
3726
|
+
for (var i = 0; i < results.length; i++) {
|
|
3727
|
+
result = results[i];
|
|
3728
|
+
|
|
3729
|
+
var matched = toString(result[0]);
|
|
3730
|
+
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
3731
|
+
var captures = [];
|
|
3732
|
+
// NOTE: This is equivalent to
|
|
3733
|
+
// captures = result.slice(1).map(maybeToString)
|
|
3734
|
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
3735
|
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
3736
|
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
3737
|
+
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
3738
|
+
var namedCaptures = result.groups;
|
|
3739
|
+
if (functionalReplace) {
|
|
3740
|
+
var replacerArgs = concat([matched], captures, position, S);
|
|
3741
|
+
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
3742
|
+
var replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
|
3743
|
+
} else {
|
|
3744
|
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
3745
|
+
}
|
|
3746
|
+
if (position >= nextSourcePosition) {
|
|
3747
|
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
3748
|
+
nextSourcePosition = position + matched.length;
|
|
3749
|
+
}
|
|
3750
|
+
}
|
|
3751
|
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
3752
|
+
}
|
|
3753
|
+
];
|
|
3754
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
3755
|
+
|
|
3756
|
+
var EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
|
|
3757
|
+
|
|
3758
|
+
var selectActiveExperiments = function selectActiveExperiments(experiments, profile) {
|
|
3759
|
+
var experimentTraits = pickBy__default["default"](profile.traits, function (value, key) {
|
|
3760
|
+
return key.startsWith(EXPERIENCE_TRAIT_PREFIX) && value === true;
|
|
3761
|
+
});
|
|
3762
|
+
var experimentTraitsIds = Object.keys(experimentTraits).map(function (id) {
|
|
3763
|
+
return id.replace(EXPERIENCE_TRAIT_PREFIX, '');
|
|
3764
|
+
}); // a experiment is active when the use has it set as a true value on the traits and the experiment config is still active
|
|
3765
|
+
|
|
3766
|
+
var activeExperiments = experiments.filter(function (experiment) {
|
|
3767
|
+
return includes__default["default"](experimentTraitsIds, experiment.id);
|
|
3768
|
+
});
|
|
3769
|
+
return activeExperiments;
|
|
3770
|
+
};
|
|
3771
|
+
|
|
3772
|
+
/**
|
|
3773
|
+
* We can use any personalization as eglible experience
|
|
3774
|
+
* When going for an experiment we can only select a active experiment when 1 or more experiments are active
|
|
3775
|
+
* If the profile is not in any active experiments, we can select any expermiment
|
|
3776
|
+
*/
|
|
3777
|
+
|
|
3778
|
+
var selectEglibleExperiences = function selectEglibleExperiences(_a) {
|
|
3779
|
+
var experiences = _a.experiences,
|
|
3780
|
+
activeExperiments = _a.activeExperiments;
|
|
3781
|
+
return experiences.filter(function (experience) {
|
|
3782
|
+
return experience.type === 'nt_personalization' || activeExperiments.length === 0 || find__default["default"](activeExperiments, {
|
|
3783
|
+
id: experience.id
|
|
3784
|
+
});
|
|
3785
|
+
});
|
|
3786
|
+
};
|
|
3787
|
+
|
|
3788
|
+
var LOWER_BOUND = 0;
|
|
3789
|
+
var UPPER_BOUND = 4294967295;
|
|
3790
|
+
|
|
3791
|
+
var normalize = function normalize(val, min, max) {
|
|
3792
|
+
return (val - min) / (max - min);
|
|
3793
|
+
};
|
|
3794
|
+
|
|
3795
|
+
var getRandom = function getRandom(text) {
|
|
3796
|
+
var hash = murmurhashJs.murmur3(text, 0);
|
|
3797
|
+
var random = normalize(hash, LOWER_BOUND, UPPER_BOUND);
|
|
3798
|
+
return random;
|
|
3799
|
+
};
|
|
3800
|
+
|
|
3801
|
+
var getTrafficRandom = function getTrafficRandom(profile, experience) {
|
|
3802
|
+
return getRandom("traffic-".concat(experience.id, "-").concat(profile.id));
|
|
3803
|
+
};
|
|
3804
|
+
var getDistributionRandom = function getDistributionRandom(profile, experience) {
|
|
3805
|
+
return getRandom("distribution-".concat(experience.id, "-").concat(profile.id));
|
|
3806
|
+
};
|
|
3807
|
+
|
|
3808
|
+
var selectExperience = function selectExperience(_a) {
|
|
3809
|
+
var experiences = _a.experiences,
|
|
3810
|
+
activeExperiments = _a.activeExperiments,
|
|
3811
|
+
profile = _a.profile;
|
|
3812
|
+
var eglibleExperiences = selectEglibleExperiences({
|
|
3813
|
+
experiences: experiences,
|
|
3814
|
+
activeExperiments: activeExperiments
|
|
3815
|
+
});
|
|
3816
|
+
var selectedExperience = eglibleExperiences.find(function (experience) {
|
|
3817
|
+
var trafficRandom = getTrafficRandom(profile, experience);
|
|
3818
|
+
log("The traffic random factor for experience ".concat(experience.id, " is ").concat(trafficRandom, ". It's traffic allocation is set to ").concat(experience.trafficAllocation, "."));
|
|
3819
|
+
return experience.trafficAllocation > trafficRandom && (includes__default["default"](profile.audiences, experience.audience.id) || // if the expriment is active already then it's selectible without further contraints to be fullfilled
|
|
3820
|
+
find__default["default"](activeExperiments, {
|
|
3821
|
+
id: experience.id
|
|
3822
|
+
}));
|
|
3823
|
+
});
|
|
3824
|
+
return selectedExperience;
|
|
3825
|
+
};
|
|
3826
|
+
|
|
3827
|
+
var selectVariant = function selectVariant(_a) {
|
|
3828
|
+
var baseline = _a.baseline,
|
|
3829
|
+
experience = _a.experience,
|
|
3830
|
+
profile = _a.profile;
|
|
3831
|
+
var variants = selectVariants(experience, baseline);
|
|
3832
|
+
|
|
3833
|
+
if (!variants.length) {
|
|
3834
|
+
return null;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3837
|
+
if (experience.type === 'nt_personalization') {
|
|
3838
|
+
// Personalization Expriences can have only one variant.
|
|
3839
|
+
return variants[0];
|
|
3840
|
+
}
|
|
3841
|
+
|
|
3842
|
+
var distributionRandom = getDistributionRandom(profile, experience);
|
|
3843
|
+
log("The distribution random factor for experience ".concat(experience.id, " is ").concat(distributionRandom, ". It's distribution is set to ").concat(JSON.stringify(experience.distribution, null, 2), ".")); // Experiment
|
|
3844
|
+
|
|
3845
|
+
var distribution = find__default["default"](experience.distribution, function (_a) {
|
|
3846
|
+
var start = _a.start,
|
|
3847
|
+
end = _a.end;
|
|
3848
|
+
return distributionRandom > start && distributionRandom < end;
|
|
3849
|
+
});
|
|
3850
|
+
|
|
3851
|
+
if (!distribution) {
|
|
3852
|
+
return null;
|
|
3853
|
+
}
|
|
3854
|
+
|
|
3855
|
+
if (distribution.index === 0) {
|
|
3856
|
+
return __assign(__assign({}, baseline), {
|
|
3857
|
+
hidden: false
|
|
3858
|
+
});
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
var correctedVariantIndex = distribution.index - 1;
|
|
3862
|
+
|
|
3863
|
+
if (variants.length <= correctedVariantIndex) {
|
|
3864
|
+
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
3865
|
+
return null;
|
|
3866
|
+
}
|
|
3867
|
+
|
|
3868
|
+
var variant = variants[correctedVariantIndex];
|
|
3869
|
+
|
|
3870
|
+
if (!variant) {
|
|
3871
|
+
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
3872
|
+
return null;
|
|
3873
|
+
}
|
|
3874
|
+
|
|
3875
|
+
return variant;
|
|
3876
|
+
};
|
|
3877
|
+
|
|
3706
3878
|
exports.NINETAILED_TRACKER_EVENTS = NINETAILED_TRACKER_EVENTS;
|
|
3707
3879
|
exports.Ninetailed = Ninetailed;
|
|
3708
3880
|
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
3709
3881
|
exports.ninetailedPlugin = ninetailedPlugin;
|
|
3710
|
-
exports.
|
|
3882
|
+
exports.selectActiveExperiments = selectActiveExperiments;
|
|
3883
|
+
exports.selectEglibleExperiences = selectEglibleExperiences;
|
|
3884
|
+
exports.selectExperience = selectExperience;
|
|
3885
|
+
exports.selectExperienceBaselineWithVariants = selectBaselineWithVariants;
|
|
3886
|
+
exports.selectExperienceVariant = selectVariant;
|
|
3887
|
+
exports.selectExperienceVariants = selectVariants;
|
|
3888
|
+
exports.selectHasExperienceVariants = selectHasVariants;
|
|
3889
|
+
exports.selectVariant = selectVariant$1;
|
|
3711
3890
|
|
|
3712
3891
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3713
3892
|
|