@ninetailed/experience.js 1.8.1-beta.0 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/index.esm.js +1183 -456
- package/index.umd.js +1310 -459
- package/lib/Ninetailed.d.ts +1 -1
- 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 +10 -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/ExperienceConfiguration.d.ts +16 -0
- package/lib/experience/types/Variant.d.ts +4 -0
- package/lib/experience/types/index.d.ts +4 -0
- package/lib/selectVariant.d.ts +1 -1
- package/lib/types.d.ts +18 -5
- package/package.json +2 -2
package/index.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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('analytics'), require('lodash/flatten'), require('lodash/find'), require('lodash/includes'), require('lodash/pickBy')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'lodash/get', 'lodash/unionBy', '@ninetailed/experience.js-shared', 'analytics', 'lodash/flatten', 'lodash/find', 'lodash/includes', 'lodash/pickBy'], 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, global.pickBy));
|
|
5
|
+
})(this, (function (exports, get$2, unionBy, experience_jsShared, Analytics, flatten, find, includes, pickBy) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
var flatten__default = /*#__PURE__*/_interopDefaultLegacy(flatten);
|
|
13
13
|
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
|
|
14
14
|
var includes__default = /*#__PURE__*/_interopDefaultLegacy(includes);
|
|
15
|
+
var pickBy__default = /*#__PURE__*/_interopDefaultLegacy(pickBy);
|
|
15
16
|
|
|
16
17
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
18
|
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
23
|
-
var global$
|
|
24
|
+
var global$F =
|
|
24
25
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
25
26
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
26
27
|
check(typeof window == 'object' && window) ||
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
var objectGetOwnPropertyDescriptor = {};
|
|
34
35
|
|
|
35
|
-
var fails$
|
|
36
|
+
var fails$f = function (exec) {
|
|
36
37
|
try {
|
|
37
38
|
return !!exec();
|
|
38
39
|
} catch (error) {
|
|
@@ -40,17 +41,17 @@
|
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
|
|
43
|
-
var fails$
|
|
44
|
+
var fails$e = fails$f;
|
|
44
45
|
|
|
45
46
|
// Detect IE8's incomplete defineProperty implementation
|
|
46
|
-
var descriptors = !fails$
|
|
47
|
+
var descriptors = !fails$e(function () {
|
|
47
48
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
48
49
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
49
50
|
});
|
|
50
51
|
|
|
51
|
-
var fails$
|
|
52
|
+
var fails$d = fails$f;
|
|
52
53
|
|
|
53
|
-
var functionBindNative = !fails$
|
|
54
|
+
var functionBindNative = !fails$d(function () {
|
|
54
55
|
var test = (function () { /* empty */ }).bind();
|
|
55
56
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
56
57
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -58,25 +59,25 @@
|
|
|
58
59
|
|
|
59
60
|
var NATIVE_BIND$3 = functionBindNative;
|
|
60
61
|
|
|
61
|
-
var call$
|
|
62
|
+
var call$d = Function.prototype.call;
|
|
62
63
|
|
|
63
|
-
var functionCall = NATIVE_BIND$3 ? call$
|
|
64
|
-
return call$
|
|
64
|
+
var functionCall = NATIVE_BIND$3 ? call$d.bind(call$d) : function () {
|
|
65
|
+
return call$d.apply(call$d, arguments);
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
var objectPropertyIsEnumerable = {};
|
|
68
69
|
|
|
69
70
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
70
71
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
71
|
-
var getOwnPropertyDescriptor$
|
|
72
|
+
var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
|
|
72
73
|
|
|
73
74
|
// Nashorn ~ JDK8 bug
|
|
74
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
75
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
75
76
|
|
|
76
77
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
77
78
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
78
79
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
79
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
80
|
+
var descriptor = getOwnPropertyDescriptor$3(this, V);
|
|
80
81
|
return !!descriptor && descriptor.enumerable;
|
|
81
82
|
} : $propertyIsEnumerable;
|
|
82
83
|
|
|
@@ -93,98 +94,98 @@
|
|
|
93
94
|
|
|
94
95
|
var FunctionPrototype$2 = Function.prototype;
|
|
95
96
|
var bind$5 = FunctionPrototype$2.bind;
|
|
96
|
-
var call$
|
|
97
|
-
var uncurryThis$
|
|
97
|
+
var call$c = FunctionPrototype$2.call;
|
|
98
|
+
var uncurryThis$k = NATIVE_BIND$2 && bind$5.bind(call$c, call$c);
|
|
98
99
|
|
|
99
100
|
var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
|
|
100
|
-
return fn && uncurryThis$
|
|
101
|
+
return fn && uncurryThis$k(fn);
|
|
101
102
|
} : function (fn) {
|
|
102
103
|
return fn && function () {
|
|
103
|
-
return call$
|
|
104
|
+
return call$c.apply(fn, arguments);
|
|
104
105
|
};
|
|
105
106
|
};
|
|
106
107
|
|
|
107
|
-
var uncurryThis$
|
|
108
|
+
var uncurryThis$j = functionUncurryThis;
|
|
108
109
|
|
|
109
|
-
var toString$
|
|
110
|
-
var stringSlice = uncurryThis$
|
|
110
|
+
var toString$6 = uncurryThis$j({}.toString);
|
|
111
|
+
var stringSlice$5 = uncurryThis$j(''.slice);
|
|
111
112
|
|
|
112
113
|
var classofRaw$1 = function (it) {
|
|
113
|
-
return stringSlice(toString$
|
|
114
|
+
return stringSlice$5(toString$6(it), 8, -1);
|
|
114
115
|
};
|
|
115
116
|
|
|
116
|
-
var global$
|
|
117
|
-
var uncurryThis$
|
|
118
|
-
var fails$
|
|
119
|
-
var classof$
|
|
117
|
+
var global$E = global$F;
|
|
118
|
+
var uncurryThis$i = functionUncurryThis;
|
|
119
|
+
var fails$c = fails$f;
|
|
120
|
+
var classof$7 = classofRaw$1;
|
|
120
121
|
|
|
121
|
-
var Object$4 = global$
|
|
122
|
-
var split = uncurryThis$
|
|
122
|
+
var Object$4 = global$E.Object;
|
|
123
|
+
var split = uncurryThis$i(''.split);
|
|
123
124
|
|
|
124
125
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
125
|
-
var indexedObject = fails$
|
|
126
|
+
var indexedObject = fails$c(function () {
|
|
126
127
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
127
128
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
128
129
|
return !Object$4('z').propertyIsEnumerable(0);
|
|
129
130
|
}) ? function (it) {
|
|
130
|
-
return classof$
|
|
131
|
+
return classof$7(it) == 'String' ? split(it, '') : Object$4(it);
|
|
131
132
|
} : Object$4;
|
|
132
133
|
|
|
133
|
-
var global$
|
|
134
|
+
var global$D = global$F;
|
|
134
135
|
|
|
135
|
-
var TypeError$
|
|
136
|
+
var TypeError$g = global$D.TypeError;
|
|
136
137
|
|
|
137
138
|
// `RequireObjectCoercible` abstract operation
|
|
138
139
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
139
|
-
var requireObjectCoercible$
|
|
140
|
-
if (it == undefined) throw TypeError$
|
|
140
|
+
var requireObjectCoercible$5 = function (it) {
|
|
141
|
+
if (it == undefined) throw TypeError$g("Can't call method on " + it);
|
|
141
142
|
return it;
|
|
142
143
|
};
|
|
143
144
|
|
|
144
145
|
// toObject with fallback for non-array-like ES3 strings
|
|
145
146
|
var IndexedObject$1 = indexedObject;
|
|
146
|
-
var requireObjectCoercible$
|
|
147
|
+
var requireObjectCoercible$4 = requireObjectCoercible$5;
|
|
147
148
|
|
|
148
|
-
var toIndexedObject$
|
|
149
|
-
return IndexedObject$1(requireObjectCoercible$
|
|
149
|
+
var toIndexedObject$4 = function (it) {
|
|
150
|
+
return IndexedObject$1(requireObjectCoercible$4(it));
|
|
150
151
|
};
|
|
151
152
|
|
|
152
153
|
// `IsCallable` abstract operation
|
|
153
154
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
154
|
-
var isCallable$
|
|
155
|
+
var isCallable$g = function (argument) {
|
|
155
156
|
return typeof argument == 'function';
|
|
156
157
|
};
|
|
157
158
|
|
|
158
|
-
var isCallable$
|
|
159
|
+
var isCallable$f = isCallable$g;
|
|
159
160
|
|
|
160
|
-
var isObject$
|
|
161
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
161
|
+
var isObject$8 = function (it) {
|
|
162
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
162
163
|
};
|
|
163
164
|
|
|
164
|
-
var global$
|
|
165
|
-
var isCallable$
|
|
165
|
+
var global$C = global$F;
|
|
166
|
+
var isCallable$e = isCallable$g;
|
|
166
167
|
|
|
167
168
|
var aFunction = function (argument) {
|
|
168
|
-
return isCallable$
|
|
169
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
169
170
|
};
|
|
170
171
|
|
|
171
172
|
var getBuiltIn$7 = function (namespace, method) {
|
|
172
|
-
return arguments.length < 2 ? aFunction(global$
|
|
173
|
+
return arguments.length < 2 ? aFunction(global$C[namespace]) : global$C[namespace] && global$C[namespace][method];
|
|
173
174
|
};
|
|
174
175
|
|
|
175
|
-
var uncurryThis$
|
|
176
|
+
var uncurryThis$h = functionUncurryThis;
|
|
176
177
|
|
|
177
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
178
|
+
var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
|
|
178
179
|
|
|
179
180
|
var getBuiltIn$6 = getBuiltIn$7;
|
|
180
181
|
|
|
181
182
|
var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || '';
|
|
182
183
|
|
|
183
|
-
var global$
|
|
184
|
+
var global$B = global$F;
|
|
184
185
|
var userAgent$3 = engineUserAgent;
|
|
185
186
|
|
|
186
|
-
var process$4 = global$
|
|
187
|
-
var Deno = global$
|
|
187
|
+
var process$4 = global$B.process;
|
|
188
|
+
var Deno = global$B.Deno;
|
|
188
189
|
var versions = process$4 && process$4.versions || Deno && Deno.version;
|
|
189
190
|
var v8 = versions && versions.v8;
|
|
190
191
|
var match, version;
|
|
@@ -211,10 +212,10 @@
|
|
|
211
212
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
212
213
|
|
|
213
214
|
var V8_VERSION$1 = engineV8Version;
|
|
214
|
-
var fails$
|
|
215
|
+
var fails$b = fails$f;
|
|
215
216
|
|
|
216
217
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
217
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$
|
|
218
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$b(function () {
|
|
218
219
|
var symbol = Symbol();
|
|
219
220
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
220
221
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -231,97 +232,97 @@
|
|
|
231
232
|
&& !Symbol.sham
|
|
232
233
|
&& typeof Symbol.iterator == 'symbol';
|
|
233
234
|
|
|
234
|
-
var global$
|
|
235
|
+
var global$A = global$F;
|
|
235
236
|
var getBuiltIn$5 = getBuiltIn$7;
|
|
236
|
-
var isCallable$
|
|
237
|
+
var isCallable$d = isCallable$g;
|
|
237
238
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
238
239
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
239
240
|
|
|
240
|
-
var Object$3 = global$
|
|
241
|
+
var Object$3 = global$A.Object;
|
|
241
242
|
|
|
242
243
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
243
244
|
return typeof it == 'symbol';
|
|
244
245
|
} : function (it) {
|
|
245
246
|
var $Symbol = getBuiltIn$5('Symbol');
|
|
246
|
-
return isCallable$
|
|
247
|
+
return isCallable$d($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$3(it));
|
|
247
248
|
};
|
|
248
249
|
|
|
249
|
-
var global$
|
|
250
|
+
var global$z = global$F;
|
|
250
251
|
|
|
251
|
-
var String$
|
|
252
|
+
var String$5 = global$z.String;
|
|
252
253
|
|
|
253
254
|
var tryToString$4 = function (argument) {
|
|
254
255
|
try {
|
|
255
|
-
return String$
|
|
256
|
+
return String$5(argument);
|
|
256
257
|
} catch (error) {
|
|
257
258
|
return 'Object';
|
|
258
259
|
}
|
|
259
260
|
};
|
|
260
261
|
|
|
261
|
-
var global$
|
|
262
|
-
var isCallable$
|
|
262
|
+
var global$y = global$F;
|
|
263
|
+
var isCallable$c = isCallable$g;
|
|
263
264
|
var tryToString$3 = tryToString$4;
|
|
264
265
|
|
|
265
|
-
var TypeError$
|
|
266
|
+
var TypeError$f = global$y.TypeError;
|
|
266
267
|
|
|
267
268
|
// `Assert: IsCallable(argument) is true`
|
|
268
269
|
var aCallable$5 = function (argument) {
|
|
269
|
-
if (isCallable$
|
|
270
|
-
throw TypeError$
|
|
270
|
+
if (isCallable$c(argument)) return argument;
|
|
271
|
+
throw TypeError$f(tryToString$3(argument) + ' is not a function');
|
|
271
272
|
};
|
|
272
273
|
|
|
273
274
|
var aCallable$4 = aCallable$5;
|
|
274
275
|
|
|
275
276
|
// `GetMethod` abstract operation
|
|
276
277
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
277
|
-
var getMethod$
|
|
278
|
+
var getMethod$4 = function (V, P) {
|
|
278
279
|
var func = V[P];
|
|
279
280
|
return func == null ? undefined : aCallable$4(func);
|
|
280
281
|
};
|
|
281
282
|
|
|
282
|
-
var global$
|
|
283
|
-
var call$
|
|
284
|
-
var isCallable$
|
|
285
|
-
var isObject$
|
|
283
|
+
var global$x = global$F;
|
|
284
|
+
var call$b = functionCall;
|
|
285
|
+
var isCallable$b = isCallable$g;
|
|
286
|
+
var isObject$7 = isObject$8;
|
|
286
287
|
|
|
287
|
-
var TypeError$
|
|
288
|
+
var TypeError$e = global$x.TypeError;
|
|
288
289
|
|
|
289
290
|
// `OrdinaryToPrimitive` abstract operation
|
|
290
291
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
291
292
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
292
293
|
var fn, val;
|
|
293
|
-
if (pref === 'string' && isCallable$
|
|
294
|
-
if (isCallable$
|
|
295
|
-
if (pref !== 'string' && isCallable$
|
|
296
|
-
throw TypeError$
|
|
294
|
+
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$b(fn, input))) return val;
|
|
295
|
+
if (isCallable$b(fn = input.valueOf) && !isObject$7(val = call$b(fn, input))) return val;
|
|
296
|
+
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$7(val = call$b(fn, input))) return val;
|
|
297
|
+
throw TypeError$e("Can't convert object to primitive value");
|
|
297
298
|
};
|
|
298
299
|
|
|
299
|
-
var shared$
|
|
300
|
+
var shared$4 = {exports: {}};
|
|
300
301
|
|
|
301
|
-
var global$
|
|
302
|
+
var global$w = global$F;
|
|
302
303
|
|
|
303
304
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
304
305
|
var defineProperty$2 = Object.defineProperty;
|
|
305
306
|
|
|
306
307
|
var setGlobal$3 = function (key, value) {
|
|
307
308
|
try {
|
|
308
|
-
defineProperty$2(global$
|
|
309
|
+
defineProperty$2(global$w, key, { value: value, configurable: true, writable: true });
|
|
309
310
|
} catch (error) {
|
|
310
|
-
global$
|
|
311
|
+
global$w[key] = value;
|
|
311
312
|
} return value;
|
|
312
313
|
};
|
|
313
314
|
|
|
314
|
-
var global$
|
|
315
|
+
var global$v = global$F;
|
|
315
316
|
var setGlobal$2 = setGlobal$3;
|
|
316
317
|
|
|
317
318
|
var SHARED = '__core-js_shared__';
|
|
318
|
-
var store$3 = global$
|
|
319
|
+
var store$3 = global$v[SHARED] || setGlobal$2(SHARED, {});
|
|
319
320
|
|
|
320
321
|
var sharedStore = store$3;
|
|
321
322
|
|
|
322
323
|
var store$2 = sharedStore;
|
|
323
324
|
|
|
324
|
-
(shared$
|
|
325
|
+
(shared$4.exports = function (key, value) {
|
|
325
326
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
326
327
|
})('versions', []).push({
|
|
327
328
|
version: '3.21.1',
|
|
@@ -331,51 +332,51 @@
|
|
|
331
332
|
source: 'https://github.com/zloirock/core-js'
|
|
332
333
|
});
|
|
333
334
|
|
|
334
|
-
var global$
|
|
335
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
335
|
+
var global$u = global$F;
|
|
336
|
+
var requireObjectCoercible$3 = requireObjectCoercible$5;
|
|
336
337
|
|
|
337
|
-
var Object$2 = global$
|
|
338
|
+
var Object$2 = global$u.Object;
|
|
338
339
|
|
|
339
340
|
// `ToObject` abstract operation
|
|
340
341
|
// https://tc39.es/ecma262/#sec-toobject
|
|
341
|
-
var toObject$
|
|
342
|
-
return Object$2(requireObjectCoercible(argument));
|
|
342
|
+
var toObject$3 = function (argument) {
|
|
343
|
+
return Object$2(requireObjectCoercible$3(argument));
|
|
343
344
|
};
|
|
344
345
|
|
|
345
|
-
var uncurryThis$
|
|
346
|
-
var toObject$
|
|
346
|
+
var uncurryThis$g = functionUncurryThis;
|
|
347
|
+
var toObject$2 = toObject$3;
|
|
347
348
|
|
|
348
|
-
var hasOwnProperty = uncurryThis$
|
|
349
|
+
var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
|
|
349
350
|
|
|
350
351
|
// `HasOwnProperty` abstract operation
|
|
351
352
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
352
353
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
353
|
-
return hasOwnProperty(toObject$
|
|
354
|
+
return hasOwnProperty(toObject$2(it), key);
|
|
354
355
|
};
|
|
355
356
|
|
|
356
|
-
var uncurryThis$
|
|
357
|
+
var uncurryThis$f = functionUncurryThis;
|
|
357
358
|
|
|
358
359
|
var id = 0;
|
|
359
360
|
var postfix = Math.random();
|
|
360
|
-
var toString = uncurryThis$
|
|
361
|
+
var toString$5 = uncurryThis$f(1.0.toString);
|
|
361
362
|
|
|
362
363
|
var uid$2 = function (key) {
|
|
363
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
364
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
364
365
|
};
|
|
365
366
|
|
|
366
|
-
var global$
|
|
367
|
-
var shared$
|
|
367
|
+
var global$t = global$F;
|
|
368
|
+
var shared$3 = shared$4.exports;
|
|
368
369
|
var hasOwn$8 = hasOwnProperty_1;
|
|
369
370
|
var uid$1 = uid$2;
|
|
370
371
|
var NATIVE_SYMBOL = nativeSymbol;
|
|
371
372
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
372
373
|
|
|
373
|
-
var WellKnownSymbolsStore = shared$
|
|
374
|
-
var Symbol$1 = global$
|
|
374
|
+
var WellKnownSymbolsStore = shared$3('wks');
|
|
375
|
+
var Symbol$1 = global$t.Symbol;
|
|
375
376
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
376
377
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
377
378
|
|
|
378
|
-
var wellKnownSymbol$
|
|
379
|
+
var wellKnownSymbol$e = function (name) {
|
|
379
380
|
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
380
381
|
var description = 'Symbol.' + name;
|
|
381
382
|
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
@@ -388,28 +389,28 @@
|
|
|
388
389
|
} return WellKnownSymbolsStore[name];
|
|
389
390
|
};
|
|
390
391
|
|
|
391
|
-
var global$
|
|
392
|
-
var call$
|
|
393
|
-
var isObject$
|
|
392
|
+
var global$s = global$F;
|
|
393
|
+
var call$a = functionCall;
|
|
394
|
+
var isObject$6 = isObject$8;
|
|
394
395
|
var isSymbol$1 = isSymbol$2;
|
|
395
|
-
var getMethod$
|
|
396
|
+
var getMethod$3 = getMethod$4;
|
|
396
397
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
397
|
-
var wellKnownSymbol$
|
|
398
|
+
var wellKnownSymbol$d = wellKnownSymbol$e;
|
|
398
399
|
|
|
399
|
-
var TypeError$
|
|
400
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
400
|
+
var TypeError$d = global$s.TypeError;
|
|
401
|
+
var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
|
|
401
402
|
|
|
402
403
|
// `ToPrimitive` abstract operation
|
|
403
404
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
404
405
|
var toPrimitive$1 = function (input, pref) {
|
|
405
|
-
if (!isObject$
|
|
406
|
-
var exoticToPrim = getMethod$
|
|
406
|
+
if (!isObject$6(input) || isSymbol$1(input)) return input;
|
|
407
|
+
var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
|
|
407
408
|
var result;
|
|
408
409
|
if (exoticToPrim) {
|
|
409
410
|
if (pref === undefined) pref = 'default';
|
|
410
|
-
result = call$
|
|
411
|
-
if (!isObject$
|
|
412
|
-
throw TypeError$
|
|
411
|
+
result = call$a(exoticToPrim, input, pref);
|
|
412
|
+
if (!isObject$6(result) || isSymbol$1(result)) return result;
|
|
413
|
+
throw TypeError$d("Can't convert object to primitive value");
|
|
413
414
|
}
|
|
414
415
|
if (pref === undefined) pref = 'number';
|
|
415
416
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -425,34 +426,34 @@
|
|
|
425
426
|
return isSymbol(key) ? key : key + '';
|
|
426
427
|
};
|
|
427
428
|
|
|
428
|
-
var global$
|
|
429
|
-
var isObject$
|
|
429
|
+
var global$r = global$F;
|
|
430
|
+
var isObject$5 = isObject$8;
|
|
430
431
|
|
|
431
|
-
var document$3 = global$
|
|
432
|
+
var document$3 = global$r.document;
|
|
432
433
|
// typeof document.createElement is 'object' in old IE
|
|
433
|
-
var EXISTS$1 = isObject$
|
|
434
|
+
var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
|
|
434
435
|
|
|
435
|
-
var documentCreateElement = function (it) {
|
|
436
|
+
var documentCreateElement$1 = function (it) {
|
|
436
437
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
437
438
|
};
|
|
438
439
|
|
|
439
|
-
var DESCRIPTORS$
|
|
440
|
-
var fails$
|
|
441
|
-
var createElement$1 = documentCreateElement;
|
|
440
|
+
var DESCRIPTORS$8 = descriptors;
|
|
441
|
+
var fails$a = fails$f;
|
|
442
|
+
var createElement$1 = documentCreateElement$1;
|
|
442
443
|
|
|
443
444
|
// Thanks to IE8 for its funny defineProperty
|
|
444
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
445
|
+
var ie8DomDefine = !DESCRIPTORS$8 && !fails$a(function () {
|
|
445
446
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
446
447
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
447
448
|
get: function () { return 7; }
|
|
448
449
|
}).a != 7;
|
|
449
450
|
});
|
|
450
451
|
|
|
451
|
-
var DESCRIPTORS$
|
|
452
|
-
var call$
|
|
452
|
+
var DESCRIPTORS$7 = descriptors;
|
|
453
|
+
var call$9 = functionCall;
|
|
453
454
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
454
455
|
var createPropertyDescriptor$1 = createPropertyDescriptor$2;
|
|
455
|
-
var toIndexedObject$
|
|
456
|
+
var toIndexedObject$3 = toIndexedObject$4;
|
|
456
457
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
457
458
|
var hasOwn$7 = hasOwnProperty_1;
|
|
458
459
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
@@ -462,23 +463,23 @@
|
|
|
462
463
|
|
|
463
464
|
// `Object.getOwnPropertyDescriptor` method
|
|
464
465
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
465
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
466
|
-
O = toIndexedObject$
|
|
466
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$7 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
467
|
+
O = toIndexedObject$3(O);
|
|
467
468
|
P = toPropertyKey$1(P);
|
|
468
469
|
if (IE8_DOM_DEFINE$1) try {
|
|
469
470
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
470
471
|
} catch (error) { /* empty */ }
|
|
471
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$
|
|
472
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$9(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
472
473
|
};
|
|
473
474
|
|
|
474
475
|
var objectDefineProperty = {};
|
|
475
476
|
|
|
476
|
-
var DESCRIPTORS$
|
|
477
|
-
var fails$
|
|
477
|
+
var DESCRIPTORS$6 = descriptors;
|
|
478
|
+
var fails$9 = fails$f;
|
|
478
479
|
|
|
479
480
|
// V8 ~ Chrome 36-
|
|
480
481
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
481
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
482
|
+
var v8PrototypeDefineBug = DESCRIPTORS$6 && fails$9(function () {
|
|
482
483
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
483
484
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
484
485
|
value: 42,
|
|
@@ -486,26 +487,26 @@
|
|
|
486
487
|
}).prototype != 42;
|
|
487
488
|
});
|
|
488
489
|
|
|
489
|
-
var global$
|
|
490
|
-
var isObject$
|
|
490
|
+
var global$q = global$F;
|
|
491
|
+
var isObject$4 = isObject$8;
|
|
491
492
|
|
|
492
|
-
var String$
|
|
493
|
-
var TypeError$
|
|
493
|
+
var String$4 = global$q.String;
|
|
494
|
+
var TypeError$c = global$q.TypeError;
|
|
494
495
|
|
|
495
496
|
// `Assert: Type(argument) is Object`
|
|
496
|
-
var anObject$
|
|
497
|
-
if (isObject$
|
|
498
|
-
throw TypeError$
|
|
497
|
+
var anObject$d = function (argument) {
|
|
498
|
+
if (isObject$4(argument)) return argument;
|
|
499
|
+
throw TypeError$c(String$4(argument) + ' is not an object');
|
|
499
500
|
};
|
|
500
501
|
|
|
501
|
-
var global$
|
|
502
|
-
var DESCRIPTORS$
|
|
502
|
+
var global$p = global$F;
|
|
503
|
+
var DESCRIPTORS$5 = descriptors;
|
|
503
504
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
504
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
505
|
-
var anObject$
|
|
505
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
506
|
+
var anObject$c = anObject$d;
|
|
506
507
|
var toPropertyKey = toPropertyKey$2;
|
|
507
508
|
|
|
508
|
-
var TypeError$
|
|
509
|
+
var TypeError$b = global$p.TypeError;
|
|
509
510
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
510
511
|
var $defineProperty = Object.defineProperty;
|
|
511
512
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -516,10 +517,10 @@
|
|
|
516
517
|
|
|
517
518
|
// `Object.defineProperty` method
|
|
518
519
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
519
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
520
|
-
anObject$
|
|
520
|
+
objectDefineProperty.f = DESCRIPTORS$5 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
521
|
+
anObject$c(O);
|
|
521
522
|
P = toPropertyKey(P);
|
|
522
|
-
anObject$
|
|
523
|
+
anObject$c(Attributes);
|
|
523
524
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
524
525
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
525
526
|
if (current && current[WRITABLE]) {
|
|
@@ -532,38 +533,38 @@
|
|
|
532
533
|
}
|
|
533
534
|
} return $defineProperty(O, P, Attributes);
|
|
534
535
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
535
|
-
anObject$
|
|
536
|
+
anObject$c(O);
|
|
536
537
|
P = toPropertyKey(P);
|
|
537
|
-
anObject$
|
|
538
|
+
anObject$c(Attributes);
|
|
538
539
|
if (IE8_DOM_DEFINE) try {
|
|
539
540
|
return $defineProperty(O, P, Attributes);
|
|
540
541
|
} catch (error) { /* empty */ }
|
|
541
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
542
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
|
|
542
543
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
543
544
|
return O;
|
|
544
545
|
};
|
|
545
546
|
|
|
546
|
-
var DESCRIPTORS$
|
|
547
|
-
var definePropertyModule$
|
|
547
|
+
var DESCRIPTORS$4 = descriptors;
|
|
548
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
548
549
|
var createPropertyDescriptor = createPropertyDescriptor$2;
|
|
549
550
|
|
|
550
|
-
var createNonEnumerableProperty$
|
|
551
|
-
return definePropertyModule$
|
|
551
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$4 ? function (object, key, value) {
|
|
552
|
+
return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
|
|
552
553
|
} : function (object, key, value) {
|
|
553
554
|
object[key] = value;
|
|
554
555
|
return object;
|
|
555
556
|
};
|
|
556
557
|
|
|
557
|
-
var redefine$
|
|
558
|
+
var redefine$4 = {exports: {}};
|
|
558
559
|
|
|
559
|
-
var uncurryThis$
|
|
560
|
-
var isCallable$
|
|
560
|
+
var uncurryThis$e = functionUncurryThis;
|
|
561
|
+
var isCallable$a = isCallable$g;
|
|
561
562
|
var store$1 = sharedStore;
|
|
562
563
|
|
|
563
|
-
var functionToString = uncurryThis$
|
|
564
|
+
var functionToString = uncurryThis$e(Function.toString);
|
|
564
565
|
|
|
565
566
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
566
|
-
if (!isCallable$
|
|
567
|
+
if (!isCallable$a(store$1.inspectSource)) {
|
|
567
568
|
store$1.inspectSource = function (it) {
|
|
568
569
|
return functionToString(it);
|
|
569
570
|
};
|
|
@@ -571,38 +572,38 @@
|
|
|
571
572
|
|
|
572
573
|
var inspectSource$4 = store$1.inspectSource;
|
|
573
574
|
|
|
574
|
-
var global$
|
|
575
|
-
var isCallable$
|
|
575
|
+
var global$o = global$F;
|
|
576
|
+
var isCallable$9 = isCallable$g;
|
|
576
577
|
var inspectSource$3 = inspectSource$4;
|
|
577
578
|
|
|
578
|
-
var WeakMap$1 = global$
|
|
579
|
+
var WeakMap$1 = global$o.WeakMap;
|
|
579
580
|
|
|
580
|
-
var nativeWeakMap = isCallable$
|
|
581
|
+
var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
|
|
581
582
|
|
|
582
|
-
var shared$
|
|
583
|
+
var shared$2 = shared$4.exports;
|
|
583
584
|
var uid = uid$2;
|
|
584
585
|
|
|
585
|
-
var keys = shared$
|
|
586
|
+
var keys = shared$2('keys');
|
|
586
587
|
|
|
587
|
-
var sharedKey$
|
|
588
|
+
var sharedKey$2 = function (key) {
|
|
588
589
|
return keys[key] || (keys[key] = uid(key));
|
|
589
590
|
};
|
|
590
591
|
|
|
591
|
-
var hiddenKeys$
|
|
592
|
+
var hiddenKeys$4 = {};
|
|
592
593
|
|
|
593
594
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
594
|
-
var global$
|
|
595
|
-
var uncurryThis$
|
|
596
|
-
var isObject$
|
|
597
|
-
var createNonEnumerableProperty$
|
|
595
|
+
var global$n = global$F;
|
|
596
|
+
var uncurryThis$d = functionUncurryThis;
|
|
597
|
+
var isObject$3 = isObject$8;
|
|
598
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
598
599
|
var hasOwn$6 = hasOwnProperty_1;
|
|
599
|
-
var shared = sharedStore;
|
|
600
|
-
var sharedKey = sharedKey$
|
|
601
|
-
var hiddenKeys$
|
|
600
|
+
var shared$1 = sharedStore;
|
|
601
|
+
var sharedKey$1 = sharedKey$2;
|
|
602
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
602
603
|
|
|
603
604
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
604
|
-
var TypeError$
|
|
605
|
-
var WeakMap = global$
|
|
605
|
+
var TypeError$a = global$n.TypeError;
|
|
606
|
+
var WeakMap = global$n.WeakMap;
|
|
606
607
|
var set$2, get$1, has;
|
|
607
608
|
|
|
608
609
|
var enforce = function (it) {
|
|
@@ -612,19 +613,19 @@
|
|
|
612
613
|
var getterFor = function (TYPE) {
|
|
613
614
|
return function (it) {
|
|
614
615
|
var state;
|
|
615
|
-
if (!isObject$
|
|
616
|
-
throw TypeError$
|
|
616
|
+
if (!isObject$3(it) || (state = get$1(it)).type !== TYPE) {
|
|
617
|
+
throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
|
|
617
618
|
} return state;
|
|
618
619
|
};
|
|
619
620
|
};
|
|
620
621
|
|
|
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$
|
|
622
|
+
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
623
|
+
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
624
|
+
var wmget = uncurryThis$d(store.get);
|
|
625
|
+
var wmhas = uncurryThis$d(store.has);
|
|
626
|
+
var wmset = uncurryThis$d(store.set);
|
|
626
627
|
set$2 = function (it, metadata) {
|
|
627
|
-
if (wmhas(store, it)) throw new TypeError$
|
|
628
|
+
if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
628
629
|
metadata.facade = it;
|
|
629
630
|
wmset(store, it, metadata);
|
|
630
631
|
return metadata;
|
|
@@ -636,12 +637,12 @@
|
|
|
636
637
|
return wmhas(store, it);
|
|
637
638
|
};
|
|
638
639
|
} else {
|
|
639
|
-
var STATE = sharedKey('state');
|
|
640
|
-
hiddenKeys$
|
|
640
|
+
var STATE = sharedKey$1('state');
|
|
641
|
+
hiddenKeys$3[STATE] = true;
|
|
641
642
|
set$2 = function (it, metadata) {
|
|
642
|
-
if (hasOwn$6(it, STATE)) throw new TypeError$
|
|
643
|
+
if (hasOwn$6(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
643
644
|
metadata.facade = it;
|
|
644
|
-
createNonEnumerableProperty$
|
|
645
|
+
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
645
646
|
return metadata;
|
|
646
647
|
};
|
|
647
648
|
get$1 = function (it) {
|
|
@@ -660,17 +661,17 @@
|
|
|
660
661
|
getterFor: getterFor
|
|
661
662
|
};
|
|
662
663
|
|
|
663
|
-
var DESCRIPTORS$
|
|
664
|
+
var DESCRIPTORS$3 = descriptors;
|
|
664
665
|
var hasOwn$5 = hasOwnProperty_1;
|
|
665
666
|
|
|
666
667
|
var FunctionPrototype$1 = Function.prototype;
|
|
667
668
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
668
|
-
var getDescriptor = DESCRIPTORS$
|
|
669
|
+
var getDescriptor = DESCRIPTORS$3 && Object.getOwnPropertyDescriptor;
|
|
669
670
|
|
|
670
671
|
var EXISTS = hasOwn$5(FunctionPrototype$1, 'name');
|
|
671
672
|
// additional protection from minified / mangled / dropped function names
|
|
672
673
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
673
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
674
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$3 || (DESCRIPTORS$3 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
674
675
|
|
|
675
676
|
var functionName = {
|
|
676
677
|
EXISTS: EXISTS,
|
|
@@ -678,38 +679,38 @@
|
|
|
678
679
|
CONFIGURABLE: CONFIGURABLE
|
|
679
680
|
};
|
|
680
681
|
|
|
681
|
-
var global$
|
|
682
|
-
var isCallable$
|
|
682
|
+
var global$m = global$F;
|
|
683
|
+
var isCallable$8 = isCallable$g;
|
|
683
684
|
var hasOwn$4 = hasOwnProperty_1;
|
|
684
|
-
var createNonEnumerableProperty$
|
|
685
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
685
686
|
var setGlobal$1 = setGlobal$3;
|
|
686
687
|
var inspectSource$2 = inspectSource$4;
|
|
687
688
|
var InternalStateModule$1 = internalState;
|
|
688
689
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
689
690
|
|
|
690
|
-
var getInternalState$
|
|
691
|
+
var getInternalState$2 = InternalStateModule$1.get;
|
|
691
692
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
692
693
|
var TEMPLATE = String(String).split('String');
|
|
693
694
|
|
|
694
|
-
(redefine$
|
|
695
|
+
(redefine$4.exports = function (O, key, value, options) {
|
|
695
696
|
var unsafe = options ? !!options.unsafe : false;
|
|
696
697
|
var simple = options ? !!options.enumerable : false;
|
|
697
698
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
698
699
|
var name = options && options.name !== undefined ? options.name : key;
|
|
699
700
|
var state;
|
|
700
|
-
if (isCallable$
|
|
701
|
+
if (isCallable$8(value)) {
|
|
701
702
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
702
703
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
703
704
|
}
|
|
704
705
|
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
705
|
-
createNonEnumerableProperty$
|
|
706
|
+
createNonEnumerableProperty$2(value, 'name', name);
|
|
706
707
|
}
|
|
707
708
|
state = enforceInternalState(value);
|
|
708
709
|
if (!state.source) {
|
|
709
710
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
if (O === global$
|
|
713
|
+
if (O === global$m) {
|
|
713
714
|
if (simple) O[key] = value;
|
|
714
715
|
else setGlobal$1(key, value);
|
|
715
716
|
return;
|
|
@@ -719,64 +720,64 @@
|
|
|
719
720
|
simple = true;
|
|
720
721
|
}
|
|
721
722
|
if (simple) O[key] = value;
|
|
722
|
-
else createNonEnumerableProperty$
|
|
723
|
+
else createNonEnumerableProperty$2(O, key, value);
|
|
723
724
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
724
725
|
})(Function.prototype, 'toString', function toString() {
|
|
725
|
-
return isCallable$
|
|
726
|
+
return isCallable$8(this) && getInternalState$2(this).source || inspectSource$2(this);
|
|
726
727
|
});
|
|
727
728
|
|
|
728
729
|
var objectGetOwnPropertyNames = {};
|
|
729
730
|
|
|
730
731
|
var ceil = Math.ceil;
|
|
731
|
-
var floor = Math.floor;
|
|
732
|
+
var floor$1 = Math.floor;
|
|
732
733
|
|
|
733
734
|
// `ToIntegerOrInfinity` abstract operation
|
|
734
735
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
735
|
-
var toIntegerOrInfinity$
|
|
736
|
+
var toIntegerOrInfinity$4 = function (argument) {
|
|
736
737
|
var number = +argument;
|
|
737
738
|
// eslint-disable-next-line no-self-compare -- safe
|
|
738
|
-
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
739
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
|
|
739
740
|
};
|
|
740
741
|
|
|
741
|
-
var toIntegerOrInfinity$
|
|
742
|
+
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
742
743
|
|
|
743
|
-
var max = Math.max;
|
|
744
|
-
var min$
|
|
744
|
+
var max$1 = Math.max;
|
|
745
|
+
var min$3 = Math.min;
|
|
745
746
|
|
|
746
747
|
// Helper for a popular repeating case of the spec:
|
|
747
748
|
// Let integer be ? ToInteger(index).
|
|
748
749
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
749
750
|
var toAbsoluteIndex$1 = function (index, length) {
|
|
750
|
-
var integer = toIntegerOrInfinity$
|
|
751
|
-
return integer < 0 ? max(integer + length, 0) : min$
|
|
751
|
+
var integer = toIntegerOrInfinity$3(index);
|
|
752
|
+
return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
|
|
752
753
|
};
|
|
753
754
|
|
|
754
|
-
var toIntegerOrInfinity = toIntegerOrInfinity$
|
|
755
|
+
var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
|
|
755
756
|
|
|
756
|
-
var min = Math.min;
|
|
757
|
+
var min$2 = Math.min;
|
|
757
758
|
|
|
758
759
|
// `ToLength` abstract operation
|
|
759
760
|
// https://tc39.es/ecma262/#sec-tolength
|
|
760
|
-
var toLength$
|
|
761
|
-
return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
761
|
+
var toLength$3 = function (argument) {
|
|
762
|
+
return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
762
763
|
};
|
|
763
764
|
|
|
764
|
-
var toLength = toLength$
|
|
765
|
+
var toLength$2 = toLength$3;
|
|
765
766
|
|
|
766
767
|
// `LengthOfArrayLike` abstract operation
|
|
767
768
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
768
769
|
var lengthOfArrayLike$2 = function (obj) {
|
|
769
|
-
return toLength(obj.length);
|
|
770
|
+
return toLength$2(obj.length);
|
|
770
771
|
};
|
|
771
772
|
|
|
772
|
-
var toIndexedObject$
|
|
773
|
+
var toIndexedObject$2 = toIndexedObject$4;
|
|
773
774
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
774
775
|
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
775
776
|
|
|
776
777
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
777
|
-
var createMethod = function (IS_INCLUDES) {
|
|
778
|
+
var createMethod$1 = function (IS_INCLUDES) {
|
|
778
779
|
return function ($this, el, fromIndex) {
|
|
779
|
-
var O = toIndexedObject$
|
|
780
|
+
var O = toIndexedObject$2($this);
|
|
780
781
|
var length = lengthOfArrayLike$1(O);
|
|
781
782
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
782
783
|
var value;
|
|
@@ -796,35 +797,35 @@
|
|
|
796
797
|
var arrayIncludes = {
|
|
797
798
|
// `Array.prototype.includes` method
|
|
798
799
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
799
|
-
includes: createMethod(true),
|
|
800
|
+
includes: createMethod$1(true),
|
|
800
801
|
// `Array.prototype.indexOf` method
|
|
801
802
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
802
|
-
indexOf: createMethod(false)
|
|
803
|
+
indexOf: createMethod$1(false)
|
|
803
804
|
};
|
|
804
805
|
|
|
805
|
-
var uncurryThis$
|
|
806
|
+
var uncurryThis$c = functionUncurryThis;
|
|
806
807
|
var hasOwn$3 = hasOwnProperty_1;
|
|
807
|
-
var toIndexedObject = toIndexedObject$
|
|
808
|
-
var indexOf = arrayIncludes.indexOf;
|
|
809
|
-
var hiddenKeys$
|
|
808
|
+
var toIndexedObject$1 = toIndexedObject$4;
|
|
809
|
+
var indexOf$1 = arrayIncludes.indexOf;
|
|
810
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
810
811
|
|
|
811
|
-
var push = uncurryThis$
|
|
812
|
+
var push$1 = uncurryThis$c([].push);
|
|
812
813
|
|
|
813
814
|
var objectKeysInternal = function (object, names) {
|
|
814
|
-
var O = toIndexedObject(object);
|
|
815
|
+
var O = toIndexedObject$1(object);
|
|
815
816
|
var i = 0;
|
|
816
817
|
var result = [];
|
|
817
818
|
var key;
|
|
818
|
-
for (key in O) !hasOwn$3(hiddenKeys$
|
|
819
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
|
|
819
820
|
// Don't enum bug & hidden keys
|
|
820
821
|
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
821
|
-
~indexOf(result, key) || push(result, key);
|
|
822
|
+
~indexOf$1(result, key) || push$1(result, key);
|
|
822
823
|
}
|
|
823
824
|
return result;
|
|
824
825
|
};
|
|
825
826
|
|
|
826
827
|
// IE8- don't enum bug keys
|
|
827
|
-
var enumBugKeys$
|
|
828
|
+
var enumBugKeys$3 = [
|
|
828
829
|
'constructor',
|
|
829
830
|
'hasOwnProperty',
|
|
830
831
|
'isPrototypeOf',
|
|
@@ -835,15 +836,15 @@
|
|
|
835
836
|
];
|
|
836
837
|
|
|
837
838
|
var internalObjectKeys$1 = objectKeysInternal;
|
|
838
|
-
var enumBugKeys$
|
|
839
|
+
var enumBugKeys$2 = enumBugKeys$3;
|
|
839
840
|
|
|
840
|
-
var hiddenKeys = enumBugKeys$
|
|
841
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
841
842
|
|
|
842
843
|
// `Object.getOwnPropertyNames` method
|
|
843
844
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
844
845
|
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
845
846
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
846
|
-
return internalObjectKeys$1(O, hiddenKeys);
|
|
847
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
847
848
|
};
|
|
848
849
|
|
|
849
850
|
var objectGetOwnPropertySymbols = {};
|
|
@@ -852,28 +853,28 @@
|
|
|
852
853
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
853
854
|
|
|
854
855
|
var getBuiltIn$4 = getBuiltIn$7;
|
|
855
|
-
var uncurryThis$
|
|
856
|
+
var uncurryThis$b = functionUncurryThis;
|
|
856
857
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
857
858
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
858
|
-
var anObject$
|
|
859
|
+
var anObject$b = anObject$d;
|
|
859
860
|
|
|
860
|
-
var concat$
|
|
861
|
+
var concat$2 = uncurryThis$b([].concat);
|
|
861
862
|
|
|
862
863
|
// all object keys, includes non-enumerable and symbols
|
|
863
864
|
var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
864
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
865
|
+
var keys = getOwnPropertyNamesModule.f(anObject$b(it));
|
|
865
866
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
866
|
-
return getOwnPropertySymbols ? concat$
|
|
867
|
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
867
868
|
};
|
|
868
869
|
|
|
869
870
|
var hasOwn$2 = hasOwnProperty_1;
|
|
870
871
|
var ownKeys = ownKeys$1;
|
|
871
872
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
872
|
-
var definePropertyModule$
|
|
873
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
873
874
|
|
|
874
875
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
875
876
|
var keys = ownKeys(source);
|
|
876
|
-
var defineProperty = definePropertyModule$
|
|
877
|
+
var defineProperty = definePropertyModule$2.f;
|
|
877
878
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
878
879
|
for (var i = 0; i < keys.length; i++) {
|
|
879
880
|
var key = keys[i];
|
|
@@ -883,8 +884,8 @@
|
|
|
883
884
|
}
|
|
884
885
|
};
|
|
885
886
|
|
|
886
|
-
var fails$
|
|
887
|
-
var isCallable$
|
|
887
|
+
var fails$8 = fails$f;
|
|
888
|
+
var isCallable$7 = isCallable$g;
|
|
888
889
|
|
|
889
890
|
var replacement = /#|\.prototype\./;
|
|
890
891
|
|
|
@@ -892,7 +893,7 @@
|
|
|
892
893
|
var value = data[normalize(feature)];
|
|
893
894
|
return value == POLYFILL ? true
|
|
894
895
|
: value == NATIVE ? false
|
|
895
|
-
: isCallable$
|
|
896
|
+
: isCallable$7(detection) ? fails$8(detection)
|
|
896
897
|
: !!detection;
|
|
897
898
|
};
|
|
898
899
|
|
|
@@ -906,10 +907,10 @@
|
|
|
906
907
|
|
|
907
908
|
var isForced_1 = isForced$2;
|
|
908
909
|
|
|
909
|
-
var global$
|
|
910
|
-
var getOwnPropertyDescriptor$
|
|
911
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
912
|
-
var redefine$
|
|
910
|
+
var global$l = global$F;
|
|
911
|
+
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
912
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
913
|
+
var redefine$3 = redefine$4.exports;
|
|
913
914
|
var setGlobal = setGlobal$3;
|
|
914
915
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
915
916
|
var isForced$1 = isForced_1;
|
|
@@ -935,16 +936,16 @@
|
|
|
935
936
|
var STATIC = options.stat;
|
|
936
937
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
937
938
|
if (GLOBAL) {
|
|
938
|
-
target = global$
|
|
939
|
+
target = global$l;
|
|
939
940
|
} else if (STATIC) {
|
|
940
|
-
target = global$
|
|
941
|
+
target = global$l[TARGET] || setGlobal(TARGET, {});
|
|
941
942
|
} else {
|
|
942
|
-
target = (global$
|
|
943
|
+
target = (global$l[TARGET] || {}).prototype;
|
|
943
944
|
}
|
|
944
945
|
if (target) for (key in source) {
|
|
945
946
|
sourceProperty = source[key];
|
|
946
947
|
if (options.noTargetGet) {
|
|
947
|
-
descriptor = getOwnPropertyDescriptor$
|
|
948
|
+
descriptor = getOwnPropertyDescriptor$2(target, key);
|
|
948
949
|
targetProperty = descriptor && descriptor.value;
|
|
949
950
|
} else targetProperty = target[key];
|
|
950
951
|
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
@@ -955,39 +956,39 @@
|
|
|
955
956
|
}
|
|
956
957
|
// add a flag to not completely full polyfills
|
|
957
958
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
958
|
-
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
959
|
+
createNonEnumerableProperty$1(sourceProperty, 'sham', true);
|
|
959
960
|
}
|
|
960
961
|
// extend global
|
|
961
|
-
redefine$
|
|
962
|
+
redefine$3(target, key, sourceProperty, options);
|
|
962
963
|
}
|
|
963
964
|
};
|
|
964
965
|
|
|
965
|
-
var global$
|
|
966
|
+
var global$k = global$F;
|
|
966
967
|
|
|
967
|
-
var nativePromiseConstructor = global$
|
|
968
|
+
var nativePromiseConstructor = global$k.Promise;
|
|
968
969
|
|
|
969
|
-
var redefine$
|
|
970
|
+
var redefine$2 = redefine$4.exports;
|
|
970
971
|
|
|
971
972
|
var redefineAll$1 = function (target, src, options) {
|
|
972
|
-
for (var key in src) redefine$
|
|
973
|
+
for (var key in src) redefine$2(target, key, src[key], options);
|
|
973
974
|
return target;
|
|
974
975
|
};
|
|
975
976
|
|
|
976
|
-
var global$
|
|
977
|
-
var isCallable$
|
|
977
|
+
var global$j = global$F;
|
|
978
|
+
var isCallable$6 = isCallable$g;
|
|
978
979
|
|
|
979
|
-
var String$
|
|
980
|
-
var TypeError$
|
|
980
|
+
var String$3 = global$j.String;
|
|
981
|
+
var TypeError$9 = global$j.TypeError;
|
|
981
982
|
|
|
982
983
|
var aPossiblePrototype$1 = function (argument) {
|
|
983
|
-
if (typeof argument == 'object' || isCallable$
|
|
984
|
-
throw TypeError$
|
|
984
|
+
if (typeof argument == 'object' || isCallable$6(argument)) return argument;
|
|
985
|
+
throw TypeError$9("Can't set " + String$3(argument) + ' as a prototype');
|
|
985
986
|
};
|
|
986
987
|
|
|
987
988
|
/* eslint-disable no-proto -- safe */
|
|
988
989
|
|
|
989
|
-
var uncurryThis$
|
|
990
|
-
var anObject$
|
|
990
|
+
var uncurryThis$a = functionUncurryThis;
|
|
991
|
+
var anObject$a = anObject$d;
|
|
991
992
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
992
993
|
|
|
993
994
|
// `Object.setPrototypeOf` method
|
|
@@ -1000,12 +1001,12 @@
|
|
|
1000
1001
|
var setter;
|
|
1001
1002
|
try {
|
|
1002
1003
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1003
|
-
setter = uncurryThis$
|
|
1004
|
+
setter = uncurryThis$a(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1004
1005
|
setter(test, []);
|
|
1005
1006
|
CORRECT_SETTER = test instanceof Array;
|
|
1006
1007
|
} catch (error) { /* empty */ }
|
|
1007
1008
|
return function setPrototypeOf(O, proto) {
|
|
1008
|
-
anObject$
|
|
1009
|
+
anObject$a(O);
|
|
1009
1010
|
aPossiblePrototype(proto);
|
|
1010
1011
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1011
1012
|
else O.__proto__ = proto;
|
|
@@ -1015,9 +1016,9 @@
|
|
|
1015
1016
|
|
|
1016
1017
|
var defineProperty$1 = objectDefineProperty.f;
|
|
1017
1018
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1018
|
-
var wellKnownSymbol$
|
|
1019
|
+
var wellKnownSymbol$c = wellKnownSymbol$e;
|
|
1019
1020
|
|
|
1020
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1021
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$c('toStringTag');
|
|
1021
1022
|
|
|
1022
1023
|
var setToStringTag$1 = function (target, TAG, STATIC) {
|
|
1023
1024
|
if (target && !STATIC) target = target.prototype;
|
|
@@ -1027,39 +1028,39 @@
|
|
|
1027
1028
|
};
|
|
1028
1029
|
|
|
1029
1030
|
var getBuiltIn$3 = getBuiltIn$7;
|
|
1030
|
-
var definePropertyModule = objectDefineProperty;
|
|
1031
|
-
var wellKnownSymbol$
|
|
1032
|
-
var DESCRIPTORS$
|
|
1031
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1032
|
+
var wellKnownSymbol$b = wellKnownSymbol$e;
|
|
1033
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1033
1034
|
|
|
1034
|
-
var SPECIES$
|
|
1035
|
+
var SPECIES$3 = wellKnownSymbol$b('species');
|
|
1035
1036
|
|
|
1036
1037
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1037
1038
|
var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
|
|
1038
|
-
var defineProperty = definePropertyModule.f;
|
|
1039
|
+
var defineProperty = definePropertyModule$1.f;
|
|
1039
1040
|
|
|
1040
|
-
if (DESCRIPTORS$
|
|
1041
|
-
defineProperty(Constructor, SPECIES$
|
|
1041
|
+
if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
|
|
1042
|
+
defineProperty(Constructor, SPECIES$3, {
|
|
1042
1043
|
configurable: true,
|
|
1043
1044
|
get: function () { return this; }
|
|
1044
1045
|
});
|
|
1045
1046
|
}
|
|
1046
1047
|
};
|
|
1047
1048
|
|
|
1048
|
-
var global$
|
|
1049
|
+
var global$i = global$F;
|
|
1049
1050
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1050
1051
|
|
|
1051
|
-
var TypeError$
|
|
1052
|
+
var TypeError$8 = global$i.TypeError;
|
|
1052
1053
|
|
|
1053
1054
|
var anInstance$1 = function (it, Prototype) {
|
|
1054
1055
|
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1055
|
-
throw TypeError$
|
|
1056
|
+
throw TypeError$8('Incorrect invocation');
|
|
1056
1057
|
};
|
|
1057
1058
|
|
|
1058
|
-
var uncurryThis$
|
|
1059
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
1059
1060
|
var aCallable$3 = aCallable$5;
|
|
1060
1061
|
var NATIVE_BIND$1 = functionBindNative;
|
|
1061
1062
|
|
|
1062
|
-
var bind$4 = uncurryThis$
|
|
1063
|
+
var bind$4 = uncurryThis$9(uncurryThis$9.bind);
|
|
1063
1064
|
|
|
1064
1065
|
// optional / simple context binding
|
|
1065
1066
|
var functionBindContext = function (fn, that) {
|
|
@@ -1071,10 +1072,10 @@
|
|
|
1071
1072
|
|
|
1072
1073
|
var iterators = {};
|
|
1073
1074
|
|
|
1074
|
-
var wellKnownSymbol$
|
|
1075
|
+
var wellKnownSymbol$a = wellKnownSymbol$e;
|
|
1075
1076
|
var Iterators$1 = iterators;
|
|
1076
1077
|
|
|
1077
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1078
|
+
var ITERATOR$2 = wellKnownSymbol$a('iterator');
|
|
1078
1079
|
var ArrayPrototype = Array.prototype;
|
|
1079
1080
|
|
|
1080
1081
|
// check on default Array iterator
|
|
@@ -1082,23 +1083,23 @@
|
|
|
1082
1083
|
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1083
1084
|
};
|
|
1084
1085
|
|
|
1085
|
-
var wellKnownSymbol$
|
|
1086
|
+
var wellKnownSymbol$9 = wellKnownSymbol$e;
|
|
1086
1087
|
|
|
1087
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1088
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$9('toStringTag');
|
|
1088
1089
|
var test = {};
|
|
1089
1090
|
|
|
1090
1091
|
test[TO_STRING_TAG$1] = 'z';
|
|
1091
1092
|
|
|
1092
1093
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1093
1094
|
|
|
1094
|
-
var global$
|
|
1095
|
+
var global$h = global$F;
|
|
1095
1096
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1096
|
-
var isCallable$
|
|
1097
|
+
var isCallable$5 = isCallable$g;
|
|
1097
1098
|
var classofRaw = classofRaw$1;
|
|
1098
|
-
var wellKnownSymbol$
|
|
1099
|
+
var wellKnownSymbol$8 = wellKnownSymbol$e;
|
|
1099
1100
|
|
|
1100
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1101
|
-
var Object$1 = global$
|
|
1101
|
+
var TO_STRING_TAG = wellKnownSymbol$8('toStringTag');
|
|
1102
|
+
var Object$1 = global$h.Object;
|
|
1102
1103
|
|
|
1103
1104
|
// ES3 wrong here
|
|
1104
1105
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -1111,7 +1112,7 @@
|
|
|
1111
1112
|
};
|
|
1112
1113
|
|
|
1113
1114
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1114
|
-
var classof$
|
|
1115
|
+
var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1115
1116
|
var O, tag, result;
|
|
1116
1117
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1117
1118
|
// @@toStringTag case
|
|
@@ -1119,65 +1120,65 @@
|
|
|
1119
1120
|
// builtinTag case
|
|
1120
1121
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1121
1122
|
// ES3 arguments fallback
|
|
1122
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$
|
|
1123
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
|
|
1123
1124
|
};
|
|
1124
1125
|
|
|
1125
|
-
var classof$
|
|
1126
|
-
var getMethod$
|
|
1126
|
+
var classof$5 = classof$6;
|
|
1127
|
+
var getMethod$2 = getMethod$4;
|
|
1127
1128
|
var Iterators = iterators;
|
|
1128
|
-
var wellKnownSymbol$
|
|
1129
|
+
var wellKnownSymbol$7 = wellKnownSymbol$e;
|
|
1129
1130
|
|
|
1130
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1131
|
+
var ITERATOR$1 = wellKnownSymbol$7('iterator');
|
|
1131
1132
|
|
|
1132
1133
|
var getIteratorMethod$2 = function (it) {
|
|
1133
|
-
if (it != undefined) return getMethod$
|
|
1134
|
-
|| getMethod$
|
|
1135
|
-
|| Iterators[classof$
|
|
1134
|
+
if (it != undefined) return getMethod$2(it, ITERATOR$1)
|
|
1135
|
+
|| getMethod$2(it, '@@iterator')
|
|
1136
|
+
|| Iterators[classof$5(it)];
|
|
1136
1137
|
};
|
|
1137
1138
|
|
|
1138
|
-
var global$
|
|
1139
|
-
var call$
|
|
1139
|
+
var global$g = global$F;
|
|
1140
|
+
var call$8 = functionCall;
|
|
1140
1141
|
var aCallable$2 = aCallable$5;
|
|
1141
|
-
var anObject$
|
|
1142
|
+
var anObject$9 = anObject$d;
|
|
1142
1143
|
var tryToString$2 = tryToString$4;
|
|
1143
1144
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1144
1145
|
|
|
1145
|
-
var TypeError$
|
|
1146
|
+
var TypeError$7 = global$g.TypeError;
|
|
1146
1147
|
|
|
1147
1148
|
var getIterator$1 = function (argument, usingIterator) {
|
|
1148
1149
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1149
|
-
if (aCallable$2(iteratorMethod)) return anObject$
|
|
1150
|
-
throw TypeError$
|
|
1150
|
+
if (aCallable$2(iteratorMethod)) return anObject$9(call$8(iteratorMethod, argument));
|
|
1151
|
+
throw TypeError$7(tryToString$2(argument) + ' is not iterable');
|
|
1151
1152
|
};
|
|
1152
1153
|
|
|
1153
|
-
var call$
|
|
1154
|
-
var anObject$
|
|
1155
|
-
var getMethod = getMethod$
|
|
1154
|
+
var call$7 = functionCall;
|
|
1155
|
+
var anObject$8 = anObject$d;
|
|
1156
|
+
var getMethod$1 = getMethod$4;
|
|
1156
1157
|
|
|
1157
1158
|
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1158
1159
|
var innerResult, innerError;
|
|
1159
|
-
anObject$
|
|
1160
|
+
anObject$8(iterator);
|
|
1160
1161
|
try {
|
|
1161
|
-
innerResult = getMethod(iterator, 'return');
|
|
1162
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1162
1163
|
if (!innerResult) {
|
|
1163
1164
|
if (kind === 'throw') throw value;
|
|
1164
1165
|
return value;
|
|
1165
1166
|
}
|
|
1166
|
-
innerResult = call$
|
|
1167
|
+
innerResult = call$7(innerResult, iterator);
|
|
1167
1168
|
} catch (error) {
|
|
1168
1169
|
innerError = true;
|
|
1169
1170
|
innerResult = error;
|
|
1170
1171
|
}
|
|
1171
1172
|
if (kind === 'throw') throw value;
|
|
1172
1173
|
if (innerError) throw innerResult;
|
|
1173
|
-
anObject$
|
|
1174
|
+
anObject$8(innerResult);
|
|
1174
1175
|
return value;
|
|
1175
1176
|
};
|
|
1176
1177
|
|
|
1177
|
-
var global$
|
|
1178
|
+
var global$f = global$F;
|
|
1178
1179
|
var bind$3 = functionBindContext;
|
|
1179
|
-
var call$
|
|
1180
|
-
var anObject$
|
|
1180
|
+
var call$6 = functionCall;
|
|
1181
|
+
var anObject$7 = anObject$d;
|
|
1181
1182
|
var tryToString$1 = tryToString$4;
|
|
1182
1183
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1183
1184
|
var lengthOfArrayLike = lengthOfArrayLike$2;
|
|
@@ -1186,7 +1187,7 @@
|
|
|
1186
1187
|
var getIteratorMethod = getIteratorMethod$2;
|
|
1187
1188
|
var iteratorClose = iteratorClose$1;
|
|
1188
1189
|
|
|
1189
|
-
var TypeError$
|
|
1190
|
+
var TypeError$6 = global$f.TypeError;
|
|
1190
1191
|
|
|
1191
1192
|
var Result = function (stopped, result) {
|
|
1192
1193
|
this.stopped = stopped;
|
|
@@ -1210,7 +1211,7 @@
|
|
|
1210
1211
|
|
|
1211
1212
|
var callFn = function (value) {
|
|
1212
1213
|
if (AS_ENTRIES) {
|
|
1213
|
-
anObject$
|
|
1214
|
+
anObject$7(value);
|
|
1214
1215
|
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1215
1216
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1216
1217
|
};
|
|
@@ -1219,7 +1220,7 @@
|
|
|
1219
1220
|
iterator = iterable;
|
|
1220
1221
|
} else {
|
|
1221
1222
|
iterFn = getIteratorMethod(iterable);
|
|
1222
|
-
if (!iterFn) throw TypeError$
|
|
1223
|
+
if (!iterFn) throw TypeError$6(tryToString$1(iterable) + ' is not iterable');
|
|
1223
1224
|
// optimisation for array iterators
|
|
1224
1225
|
if (isArrayIteratorMethod(iterFn)) {
|
|
1225
1226
|
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
@@ -1231,7 +1232,7 @@
|
|
|
1231
1232
|
}
|
|
1232
1233
|
|
|
1233
1234
|
next = iterator.next;
|
|
1234
|
-
while (!(step = call$
|
|
1235
|
+
while (!(step = call$6(next, iterator)).done) {
|
|
1235
1236
|
try {
|
|
1236
1237
|
result = callFn(step.value);
|
|
1237
1238
|
} catch (error) {
|
|
@@ -1241,9 +1242,9 @@
|
|
|
1241
1242
|
} return new Result(false);
|
|
1242
1243
|
};
|
|
1243
1244
|
|
|
1244
|
-
var wellKnownSymbol$
|
|
1245
|
+
var wellKnownSymbol$6 = wellKnownSymbol$e;
|
|
1245
1246
|
|
|
1246
|
-
var ITERATOR = wellKnownSymbol$
|
|
1247
|
+
var ITERATOR = wellKnownSymbol$6('iterator');
|
|
1247
1248
|
var SAFE_CLOSING = false;
|
|
1248
1249
|
|
|
1249
1250
|
try {
|
|
@@ -1280,10 +1281,10 @@
|
|
|
1280
1281
|
return ITERATION_SUPPORT;
|
|
1281
1282
|
};
|
|
1282
1283
|
|
|
1283
|
-
var uncurryThis$
|
|
1284
|
-
var fails$
|
|
1285
|
-
var isCallable$
|
|
1286
|
-
var classof$
|
|
1284
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1285
|
+
var fails$7 = fails$f;
|
|
1286
|
+
var isCallable$4 = isCallable$g;
|
|
1287
|
+
var classof$4 = classof$6;
|
|
1287
1288
|
var getBuiltIn$2 = getBuiltIn$7;
|
|
1288
1289
|
var inspectSource$1 = inspectSource$4;
|
|
1289
1290
|
|
|
@@ -1291,11 +1292,11 @@
|
|
|
1291
1292
|
var empty = [];
|
|
1292
1293
|
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
1293
1294
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1294
|
-
var exec = uncurryThis$
|
|
1295
|
+
var exec$1 = uncurryThis$8(constructorRegExp.exec);
|
|
1295
1296
|
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1296
1297
|
|
|
1297
1298
|
var isConstructorModern = function isConstructor(argument) {
|
|
1298
|
-
if (!isCallable$
|
|
1299
|
+
if (!isCallable$4(argument)) return false;
|
|
1299
1300
|
try {
|
|
1300
1301
|
construct(noop, empty, argument);
|
|
1301
1302
|
return true;
|
|
@@ -1305,8 +1306,8 @@
|
|
|
1305
1306
|
};
|
|
1306
1307
|
|
|
1307
1308
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
1308
|
-
if (!isCallable$
|
|
1309
|
-
switch (classof$
|
|
1309
|
+
if (!isCallable$4(argument)) return false;
|
|
1310
|
+
switch (classof$4(argument)) {
|
|
1310
1311
|
case 'AsyncFunction':
|
|
1311
1312
|
case 'GeneratorFunction':
|
|
1312
1313
|
case 'AsyncGeneratorFunction': return false;
|
|
@@ -1315,7 +1316,7 @@
|
|
|
1315
1316
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1316
1317
|
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1317
1318
|
// (for example, `DOMQuad` and similar in FF41-)
|
|
1318
|
-
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
|
|
1319
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
1319
1320
|
} catch (error) {
|
|
1320
1321
|
return true;
|
|
1321
1322
|
}
|
|
@@ -1325,7 +1326,7 @@
|
|
|
1325
1326
|
|
|
1326
1327
|
// `IsConstructor` abstract operation
|
|
1327
1328
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1328
|
-
var isConstructor$1 = !construct || fails$
|
|
1329
|
+
var isConstructor$1 = !construct || fails$7(function () {
|
|
1329
1330
|
var called;
|
|
1330
1331
|
return isConstructorModern(isConstructorModern.call)
|
|
1331
1332
|
|| !isConstructorModern(Object)
|
|
@@ -1333,57 +1334,57 @@
|
|
|
1333
1334
|
|| called;
|
|
1334
1335
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
1335
1336
|
|
|
1336
|
-
var global$
|
|
1337
|
+
var global$e = global$F;
|
|
1337
1338
|
var isConstructor = isConstructor$1;
|
|
1338
1339
|
var tryToString = tryToString$4;
|
|
1339
1340
|
|
|
1340
|
-
var TypeError$
|
|
1341
|
+
var TypeError$5 = global$e.TypeError;
|
|
1341
1342
|
|
|
1342
1343
|
// `Assert: IsConstructor(argument) is true`
|
|
1343
1344
|
var aConstructor$1 = function (argument) {
|
|
1344
1345
|
if (isConstructor(argument)) return argument;
|
|
1345
|
-
throw TypeError$
|
|
1346
|
+
throw TypeError$5(tryToString(argument) + ' is not a constructor');
|
|
1346
1347
|
};
|
|
1347
1348
|
|
|
1348
|
-
var anObject$
|
|
1349
|
+
var anObject$6 = anObject$d;
|
|
1349
1350
|
var aConstructor = aConstructor$1;
|
|
1350
|
-
var wellKnownSymbol$
|
|
1351
|
+
var wellKnownSymbol$5 = wellKnownSymbol$e;
|
|
1351
1352
|
|
|
1352
|
-
var SPECIES$
|
|
1353
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
1353
1354
|
|
|
1354
1355
|
// `SpeciesConstructor` abstract operation
|
|
1355
1356
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1356
1357
|
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1357
|
-
var C = anObject$
|
|
1358
|
+
var C = anObject$6(O).constructor;
|
|
1358
1359
|
var S;
|
|
1359
|
-
return C === undefined || (S = anObject$
|
|
1360
|
+
return C === undefined || (S = anObject$6(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
|
|
1360
1361
|
};
|
|
1361
1362
|
|
|
1362
1363
|
var NATIVE_BIND = functionBindNative;
|
|
1363
1364
|
|
|
1364
1365
|
var FunctionPrototype = Function.prototype;
|
|
1365
|
-
var apply$
|
|
1366
|
-
var call$
|
|
1366
|
+
var apply$2 = FunctionPrototype.apply;
|
|
1367
|
+
var call$5 = FunctionPrototype.call;
|
|
1367
1368
|
|
|
1368
1369
|
// eslint-disable-next-line es/no-reflect -- safe
|
|
1369
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
1370
|
-
return call$
|
|
1370
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$2) : function () {
|
|
1371
|
+
return call$5.apply(apply$2, arguments);
|
|
1371
1372
|
});
|
|
1372
1373
|
|
|
1373
1374
|
var getBuiltIn$1 = getBuiltIn$7;
|
|
1374
1375
|
|
|
1375
|
-
var html$
|
|
1376
|
+
var html$2 = getBuiltIn$1('document', 'documentElement');
|
|
1376
1377
|
|
|
1377
|
-
var uncurryThis$
|
|
1378
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1378
1379
|
|
|
1379
|
-
var arraySlice$1 = uncurryThis$
|
|
1380
|
+
var arraySlice$1 = uncurryThis$7([].slice);
|
|
1380
1381
|
|
|
1381
|
-
var global$
|
|
1382
|
+
var global$d = global$F;
|
|
1382
1383
|
|
|
1383
|
-
var TypeError$
|
|
1384
|
+
var TypeError$4 = global$d.TypeError;
|
|
1384
1385
|
|
|
1385
1386
|
var validateArgumentsLength$1 = function (passed, required) {
|
|
1386
|
-
if (passed < required) throw TypeError$
|
|
1387
|
+
if (passed < required) throw TypeError$4('Not enough arguments');
|
|
1387
1388
|
return passed;
|
|
1388
1389
|
};
|
|
1389
1390
|
|
|
@@ -1391,31 +1392,31 @@
|
|
|
1391
1392
|
|
|
1392
1393
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1393
1394
|
|
|
1394
|
-
var classof = classofRaw$1;
|
|
1395
|
-
var global$
|
|
1395
|
+
var classof$3 = classofRaw$1;
|
|
1396
|
+
var global$c = global$F;
|
|
1396
1397
|
|
|
1397
|
-
var engineIsNode = classof(global$
|
|
1398
|
+
var engineIsNode = classof$3(global$c.process) == 'process';
|
|
1398
1399
|
|
|
1399
|
-
var global$
|
|
1400
|
-
var apply = functionApply;
|
|
1400
|
+
var global$b = global$F;
|
|
1401
|
+
var apply$1 = functionApply;
|
|
1401
1402
|
var bind$2 = functionBindContext;
|
|
1402
|
-
var isCallable$
|
|
1403
|
+
var isCallable$3 = isCallable$g;
|
|
1403
1404
|
var hasOwn = hasOwnProperty_1;
|
|
1404
|
-
var fails$
|
|
1405
|
-
var html = html$
|
|
1405
|
+
var fails$6 = fails$f;
|
|
1406
|
+
var html$1 = html$2;
|
|
1406
1407
|
var arraySlice = arraySlice$1;
|
|
1407
|
-
var createElement = documentCreateElement;
|
|
1408
|
+
var createElement = documentCreateElement$1;
|
|
1408
1409
|
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1409
1410
|
var IS_IOS$1 = engineIsIos;
|
|
1410
1411
|
var IS_NODE$2 = engineIsNode;
|
|
1411
1412
|
|
|
1412
|
-
var set$1 = global$
|
|
1413
|
-
var clear = global$
|
|
1414
|
-
var process$3 = global$
|
|
1415
|
-
var Dispatch = global$
|
|
1416
|
-
var Function$1 = global$
|
|
1417
|
-
var MessageChannel = global$
|
|
1418
|
-
var String$
|
|
1413
|
+
var set$1 = global$b.setImmediate;
|
|
1414
|
+
var clear = global$b.clearImmediate;
|
|
1415
|
+
var process$3 = global$b.process;
|
|
1416
|
+
var Dispatch = global$b.Dispatch;
|
|
1417
|
+
var Function$1 = global$b.Function;
|
|
1418
|
+
var MessageChannel = global$b.MessageChannel;
|
|
1419
|
+
var String$2 = global$b.String;
|
|
1419
1420
|
var counter = 0;
|
|
1420
1421
|
var queue$1 = {};
|
|
1421
1422
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
@@ -1423,7 +1424,7 @@
|
|
|
1423
1424
|
|
|
1424
1425
|
try {
|
|
1425
1426
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1426
|
-
location = global$
|
|
1427
|
+
location = global$b.location;
|
|
1427
1428
|
} catch (error) { /* empty */ }
|
|
1428
1429
|
|
|
1429
1430
|
var run = function (id) {
|
|
@@ -1446,17 +1447,17 @@
|
|
|
1446
1447
|
|
|
1447
1448
|
var post = function (id) {
|
|
1448
1449
|
// old engines have not location.origin
|
|
1449
|
-
global$
|
|
1450
|
+
global$b.postMessage(String$2(id), location.protocol + '//' + location.host);
|
|
1450
1451
|
};
|
|
1451
1452
|
|
|
1452
1453
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1453
1454
|
if (!set$1 || !clear) {
|
|
1454
1455
|
set$1 = function setImmediate(handler) {
|
|
1455
1456
|
validateArgumentsLength(arguments.length, 1);
|
|
1456
|
-
var fn = isCallable$
|
|
1457
|
+
var fn = isCallable$3(handler) ? handler : Function$1(handler);
|
|
1457
1458
|
var args = arraySlice(arguments, 1);
|
|
1458
1459
|
queue$1[++counter] = function () {
|
|
1459
|
-
apply(fn, undefined, args);
|
|
1460
|
+
apply$1(fn, undefined, args);
|
|
1460
1461
|
};
|
|
1461
1462
|
defer(counter);
|
|
1462
1463
|
return counter;
|
|
@@ -1484,19 +1485,19 @@
|
|
|
1484
1485
|
// Browsers with postMessage, skip WebWorkers
|
|
1485
1486
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1486
1487
|
} else if (
|
|
1487
|
-
global$
|
|
1488
|
-
isCallable$
|
|
1489
|
-
!global$
|
|
1488
|
+
global$b.addEventListener &&
|
|
1489
|
+
isCallable$3(global$b.postMessage) &&
|
|
1490
|
+
!global$b.importScripts &&
|
|
1490
1491
|
location && location.protocol !== 'file:' &&
|
|
1491
|
-
!fails$
|
|
1492
|
+
!fails$6(post)
|
|
1492
1493
|
) {
|
|
1493
1494
|
defer = post;
|
|
1494
|
-
global$
|
|
1495
|
+
global$b.addEventListener('message', listener, false);
|
|
1495
1496
|
// IE8-
|
|
1496
1497
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1497
1498
|
defer = function (id) {
|
|
1498
|
-
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1499
|
-
html.removeChild(this);
|
|
1499
|
+
html$1.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
|
|
1500
|
+
html$1.removeChild(this);
|
|
1500
1501
|
run(id);
|
|
1501
1502
|
};
|
|
1502
1503
|
};
|
|
@@ -1514,29 +1515,29 @@
|
|
|
1514
1515
|
};
|
|
1515
1516
|
|
|
1516
1517
|
var userAgent$1 = engineUserAgent;
|
|
1517
|
-
var global$
|
|
1518
|
+
var global$a = global$F;
|
|
1518
1519
|
|
|
1519
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$
|
|
1520
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$a.Pebble !== undefined;
|
|
1520
1521
|
|
|
1521
1522
|
var userAgent = engineUserAgent;
|
|
1522
1523
|
|
|
1523
1524
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1524
1525
|
|
|
1525
|
-
var global$
|
|
1526
|
+
var global$9 = global$F;
|
|
1526
1527
|
var bind$1 = functionBindContext;
|
|
1527
|
-
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1528
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1528
1529
|
var macrotask = task$1.set;
|
|
1529
1530
|
var IS_IOS = engineIsIos;
|
|
1530
1531
|
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
1531
1532
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
1532
1533
|
var IS_NODE$1 = engineIsNode;
|
|
1533
1534
|
|
|
1534
|
-
var MutationObserver = global$
|
|
1535
|
-
var document$2 = global$
|
|
1536
|
-
var process$2 = global$
|
|
1537
|
-
var Promise$1 = global$
|
|
1535
|
+
var MutationObserver = global$9.MutationObserver || global$9.WebKitMutationObserver;
|
|
1536
|
+
var document$2 = global$9.document;
|
|
1537
|
+
var process$2 = global$9.process;
|
|
1538
|
+
var Promise$1 = global$9.Promise;
|
|
1538
1539
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
1539
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$
|
|
1540
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$9, 'queueMicrotask');
|
|
1540
1541
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
1541
1542
|
|
|
1542
1543
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
|
@@ -1592,7 +1593,7 @@
|
|
|
1592
1593
|
// - setTimeout
|
|
1593
1594
|
} else {
|
|
1594
1595
|
// strange IE + webpack dev server bug - use .bind(global)
|
|
1595
|
-
macrotask = bind$1(macrotask, global$
|
|
1596
|
+
macrotask = bind$1(macrotask, global$9);
|
|
1596
1597
|
notify$1 = function () {
|
|
1597
1598
|
macrotask(flush);
|
|
1598
1599
|
};
|
|
@@ -1629,23 +1630,23 @@
|
|
|
1629
1630
|
return new PromiseCapability(C);
|
|
1630
1631
|
};
|
|
1631
1632
|
|
|
1632
|
-
var anObject = anObject$
|
|
1633
|
-
var isObject$
|
|
1633
|
+
var anObject$5 = anObject$d;
|
|
1634
|
+
var isObject$2 = isObject$8;
|
|
1634
1635
|
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
1635
1636
|
|
|
1636
1637
|
var promiseResolve$1 = function (C, x) {
|
|
1637
|
-
anObject(C);
|
|
1638
|
-
if (isObject$
|
|
1638
|
+
anObject$5(C);
|
|
1639
|
+
if (isObject$2(x) && x.constructor === C) return x;
|
|
1639
1640
|
var promiseCapability = newPromiseCapability$1.f(C);
|
|
1640
1641
|
var resolve = promiseCapability.resolve;
|
|
1641
1642
|
resolve(x);
|
|
1642
1643
|
return promiseCapability.promise;
|
|
1643
1644
|
};
|
|
1644
1645
|
|
|
1645
|
-
var global$
|
|
1646
|
+
var global$8 = global$F;
|
|
1646
1647
|
|
|
1647
1648
|
var hostReportErrors$1 = function (a, b) {
|
|
1648
|
-
var console = global$
|
|
1649
|
+
var console = global$8.console;
|
|
1649
1650
|
if (console && console.error) {
|
|
1650
1651
|
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
1651
1652
|
}
|
|
@@ -1685,19 +1686,19 @@
|
|
|
1685
1686
|
|
|
1686
1687
|
var engineIsBrowser = typeof window == 'object';
|
|
1687
1688
|
|
|
1688
|
-
var $$
|
|
1689
|
-
var global$
|
|
1689
|
+
var $$3 = _export;
|
|
1690
|
+
var global$7 = global$F;
|
|
1690
1691
|
var getBuiltIn = getBuiltIn$7;
|
|
1691
|
-
var call$
|
|
1692
|
+
var call$4 = functionCall;
|
|
1692
1693
|
var NativePromise = nativePromiseConstructor;
|
|
1693
|
-
var redefine = redefine$
|
|
1694
|
+
var redefine$1 = redefine$4.exports;
|
|
1694
1695
|
var redefineAll = redefineAll$1;
|
|
1695
1696
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1696
1697
|
var setToStringTag = setToStringTag$1;
|
|
1697
1698
|
var setSpecies = setSpecies$1;
|
|
1698
1699
|
var aCallable = aCallable$5;
|
|
1699
|
-
var isCallable = isCallable$
|
|
1700
|
-
var isObject = isObject$
|
|
1700
|
+
var isCallable$2 = isCallable$g;
|
|
1701
|
+
var isObject$1 = isObject$8;
|
|
1701
1702
|
var anInstance = anInstance$1;
|
|
1702
1703
|
var inspectSource = inspectSource$4;
|
|
1703
1704
|
var iterate = iterate$1;
|
|
@@ -1712,28 +1713,28 @@
|
|
|
1712
1713
|
var Queue = queue;
|
|
1713
1714
|
var InternalStateModule = internalState;
|
|
1714
1715
|
var isForced = isForced_1;
|
|
1715
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
1716
|
+
var wellKnownSymbol$4 = wellKnownSymbol$e;
|
|
1716
1717
|
var IS_BROWSER = engineIsBrowser;
|
|
1717
1718
|
var IS_NODE = engineIsNode;
|
|
1718
1719
|
var V8_VERSION = engineV8Version;
|
|
1719
1720
|
|
|
1720
|
-
var SPECIES = wellKnownSymbol('species');
|
|
1721
|
+
var SPECIES$1 = wellKnownSymbol$4('species');
|
|
1721
1722
|
var PROMISE = 'Promise';
|
|
1722
1723
|
|
|
1723
|
-
var getInternalState = InternalStateModule.getterFor(PROMISE);
|
|
1724
|
+
var getInternalState$1 = InternalStateModule.getterFor(PROMISE);
|
|
1724
1725
|
var setInternalState = InternalStateModule.set;
|
|
1725
1726
|
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
1726
1727
|
var NativePromisePrototype = NativePromise && NativePromise.prototype;
|
|
1727
1728
|
var PromiseConstructor = NativePromise;
|
|
1728
1729
|
var PromisePrototype = NativePromisePrototype;
|
|
1729
|
-
var TypeError$
|
|
1730
|
-
var document$1 = global$
|
|
1731
|
-
var process$1 = global$
|
|
1730
|
+
var TypeError$3 = global$7.TypeError;
|
|
1731
|
+
var document$1 = global$7.document;
|
|
1732
|
+
var process$1 = global$7.process;
|
|
1732
1733
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
1733
1734
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
1734
1735
|
|
|
1735
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$
|
|
1736
|
-
var NATIVE_REJECTION_EVENT = isCallable(global$
|
|
1736
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$7.dispatchEvent);
|
|
1737
|
+
var NATIVE_REJECTION_EVENT = isCallable$2(global$7.PromiseRejectionEvent);
|
|
1737
1738
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1738
1739
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1739
1740
|
var PENDING = 0;
|
|
@@ -1762,7 +1763,7 @@
|
|
|
1762
1763
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1763
1764
|
};
|
|
1764
1765
|
var constructor = promise.constructor = {};
|
|
1765
|
-
constructor[SPECIES] = FakePromise;
|
|
1766
|
+
constructor[SPECIES$1] = FakePromise;
|
|
1766
1767
|
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1767
1768
|
if (!SUBCLASSING) return true;
|
|
1768
1769
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -1776,7 +1777,7 @@
|
|
|
1776
1777
|
// helpers
|
|
1777
1778
|
var isThenable = function (it) {
|
|
1778
1779
|
var then;
|
|
1779
|
-
return isObject(it) && isCallable(then = it.then) ? then : false;
|
|
1780
|
+
return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
|
|
1780
1781
|
};
|
|
1781
1782
|
|
|
1782
1783
|
var callReaction = function (reaction, state) {
|
|
@@ -1803,9 +1804,9 @@
|
|
|
1803
1804
|
}
|
|
1804
1805
|
}
|
|
1805
1806
|
if (result === reaction.promise) {
|
|
1806
|
-
reject(TypeError$
|
|
1807
|
+
reject(TypeError$3('Promise-chain cycle'));
|
|
1807
1808
|
} else if (then = isThenable(result)) {
|
|
1808
|
-
call$
|
|
1809
|
+
call$4(then, result, resolve, reject);
|
|
1809
1810
|
} else resolve(result);
|
|
1810
1811
|
} else reject(value);
|
|
1811
1812
|
} catch (error) {
|
|
@@ -1835,14 +1836,14 @@
|
|
|
1835
1836
|
event.promise = promise;
|
|
1836
1837
|
event.reason = reason;
|
|
1837
1838
|
event.initEvent(name, false, true);
|
|
1838
|
-
global$
|
|
1839
|
+
global$7.dispatchEvent(event);
|
|
1839
1840
|
} else event = { promise: promise, reason: reason };
|
|
1840
|
-
if (!NATIVE_REJECTION_EVENT && (handler = global$
|
|
1841
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global$7['on' + name])) handler(event);
|
|
1841
1842
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
1842
1843
|
};
|
|
1843
1844
|
|
|
1844
1845
|
var onUnhandled = function (state) {
|
|
1845
|
-
call$
|
|
1846
|
+
call$4(task, global$7, function () {
|
|
1846
1847
|
var promise = state.facade;
|
|
1847
1848
|
var value = state.value;
|
|
1848
1849
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -1865,7 +1866,7 @@
|
|
|
1865
1866
|
};
|
|
1866
1867
|
|
|
1867
1868
|
var onHandleUnhandled = function (state) {
|
|
1868
|
-
call$
|
|
1869
|
+
call$4(task, global$7, function () {
|
|
1869
1870
|
var promise = state.facade;
|
|
1870
1871
|
if (IS_NODE) {
|
|
1871
1872
|
process$1.emit('rejectionHandled', promise);
|
|
@@ -1893,13 +1894,13 @@
|
|
|
1893
1894
|
state.done = true;
|
|
1894
1895
|
if (unwrap) state = unwrap;
|
|
1895
1896
|
try {
|
|
1896
|
-
if (state.facade === value) throw TypeError$
|
|
1897
|
+
if (state.facade === value) throw TypeError$3("Promise can't be resolved itself");
|
|
1897
1898
|
var then = isThenable(value);
|
|
1898
1899
|
if (then) {
|
|
1899
1900
|
microtask(function () {
|
|
1900
1901
|
var wrapper = { done: false };
|
|
1901
1902
|
try {
|
|
1902
|
-
call$
|
|
1903
|
+
call$4(then, value,
|
|
1903
1904
|
bind(internalResolve, wrapper, state),
|
|
1904
1905
|
bind(internalReject, wrapper, state)
|
|
1905
1906
|
);
|
|
@@ -1923,8 +1924,8 @@
|
|
|
1923
1924
|
PromiseConstructor = function Promise(executor) {
|
|
1924
1925
|
anInstance(this, PromisePrototype);
|
|
1925
1926
|
aCallable(executor);
|
|
1926
|
-
call$
|
|
1927
|
-
var state = getInternalState(this);
|
|
1927
|
+
call$4(Internal, this);
|
|
1928
|
+
var state = getInternalState$1(this);
|
|
1928
1929
|
try {
|
|
1929
1930
|
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
1930
1931
|
} catch (error) {
|
|
@@ -1953,8 +1954,8 @@
|
|
|
1953
1954
|
var state = getInternalPromiseState(this);
|
|
1954
1955
|
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
1955
1956
|
state.parent = true;
|
|
1956
|
-
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
|
|
1957
|
-
reaction.fail = isCallable(onRejected) && onRejected;
|
|
1957
|
+
reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
|
|
1958
|
+
reaction.fail = isCallable$2(onRejected) && onRejected;
|
|
1958
1959
|
reaction.domain = IS_NODE ? process$1.domain : undefined;
|
|
1959
1960
|
if (state.state == PENDING) state.reactions.add(reaction);
|
|
1960
1961
|
else microtask(function () {
|
|
@@ -1970,7 +1971,7 @@
|
|
|
1970
1971
|
});
|
|
1971
1972
|
OwnPromiseCapability = function () {
|
|
1972
1973
|
var promise = new Internal();
|
|
1973
|
-
var state = getInternalState(promise);
|
|
1974
|
+
var state = getInternalState$1(promise);
|
|
1974
1975
|
this.promise = promise;
|
|
1975
1976
|
this.resolve = bind(internalResolve, state);
|
|
1976
1977
|
this.reject = bind(internalReject, state);
|
|
@@ -1981,21 +1982,21 @@
|
|
|
1981
1982
|
: newGenericPromiseCapability(C);
|
|
1982
1983
|
};
|
|
1983
1984
|
|
|
1984
|
-
if (isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
|
|
1985
|
+
if (isCallable$2(NativePromise) && NativePromisePrototype !== Object.prototype) {
|
|
1985
1986
|
nativeThen = NativePromisePrototype.then;
|
|
1986
1987
|
|
|
1987
1988
|
if (!SUBCLASSING) {
|
|
1988
1989
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
1989
|
-
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
1990
|
+
redefine$1(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
1990
1991
|
var that = this;
|
|
1991
1992
|
return new PromiseConstructor(function (resolve, reject) {
|
|
1992
|
-
call$
|
|
1993
|
+
call$4(nativeThen, that, resolve, reject);
|
|
1993
1994
|
}).then(onFulfilled, onRejected);
|
|
1994
1995
|
// https://github.com/zloirock/core-js/issues/640
|
|
1995
1996
|
}, { unsafe: true });
|
|
1996
1997
|
|
|
1997
1998
|
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1998
|
-
redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1999
|
+
redefine$1(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1999
2000
|
}
|
|
2000
2001
|
|
|
2001
2002
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
@@ -2010,7 +2011,7 @@
|
|
|
2010
2011
|
}
|
|
2011
2012
|
}
|
|
2012
2013
|
|
|
2013
|
-
$$
|
|
2014
|
+
$$3({ global: true, wrap: true, forced: FORCED }, {
|
|
2014
2015
|
Promise: PromiseConstructor
|
|
2015
2016
|
});
|
|
2016
2017
|
|
|
@@ -2020,17 +2021,17 @@
|
|
|
2020
2021
|
PromiseWrapper = getBuiltIn(PROMISE);
|
|
2021
2022
|
|
|
2022
2023
|
// statics
|
|
2023
|
-
$$
|
|
2024
|
+
$$3({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
2024
2025
|
// `Promise.reject` method
|
|
2025
2026
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2026
2027
|
reject: function reject(r) {
|
|
2027
2028
|
var capability = newPromiseCapability(this);
|
|
2028
|
-
call$
|
|
2029
|
+
call$4(capability.reject, undefined, r);
|
|
2029
2030
|
return capability.promise;
|
|
2030
2031
|
}
|
|
2031
2032
|
});
|
|
2032
2033
|
|
|
2033
|
-
$$
|
|
2034
|
+
$$3({ target: PROMISE, stat: true, forced: FORCED }, {
|
|
2034
2035
|
// `Promise.resolve` method
|
|
2035
2036
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2036
2037
|
resolve: function resolve(x) {
|
|
@@ -2038,7 +2039,7 @@
|
|
|
2038
2039
|
}
|
|
2039
2040
|
});
|
|
2040
2041
|
|
|
2041
|
-
$$
|
|
2042
|
+
$$3({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
2042
2043
|
// `Promise.all` method
|
|
2043
2044
|
// https://tc39.es/ecma262/#sec-promise.all
|
|
2044
2045
|
all: function all(iterable) {
|
|
@@ -2055,7 +2056,7 @@
|
|
|
2055
2056
|
var index = counter++;
|
|
2056
2057
|
var alreadyCalled = false;
|
|
2057
2058
|
remaining++;
|
|
2058
|
-
call$
|
|
2059
|
+
call$4($promiseResolve, C, promise).then(function (value) {
|
|
2059
2060
|
if (alreadyCalled) return;
|
|
2060
2061
|
alreadyCalled = true;
|
|
2061
2062
|
values[index] = value;
|
|
@@ -2076,7 +2077,7 @@
|
|
|
2076
2077
|
var result = perform(function () {
|
|
2077
2078
|
var $promiseResolve = aCallable(C.resolve);
|
|
2078
2079
|
iterate(iterable, function (promise) {
|
|
2079
|
-
call$
|
|
2080
|
+
call$4($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2080
2081
|
});
|
|
2081
2082
|
});
|
|
2082
2083
|
if (result.error) reject(result.value);
|
|
@@ -2085,36 +2086,36 @@
|
|
|
2085
2086
|
});
|
|
2086
2087
|
|
|
2087
2088
|
var internalObjectKeys = objectKeysInternal;
|
|
2088
|
-
var enumBugKeys = enumBugKeys$
|
|
2089
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
2089
2090
|
|
|
2090
2091
|
// `Object.keys` method
|
|
2091
2092
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
2092
2093
|
// eslint-disable-next-line es/no-object-keys -- safe
|
|
2093
|
-
var objectKeys$
|
|
2094
|
-
return internalObjectKeys(O, enumBugKeys);
|
|
2094
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
2095
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
2095
2096
|
};
|
|
2096
2097
|
|
|
2097
|
-
var DESCRIPTORS = descriptors;
|
|
2098
|
-
var uncurryThis = functionUncurryThis;
|
|
2099
|
-
var call = functionCall;
|
|
2100
|
-
var fails = fails$
|
|
2101
|
-
var objectKeys = objectKeys$
|
|
2098
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2099
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
2100
|
+
var call$3 = functionCall;
|
|
2101
|
+
var fails$5 = fails$f;
|
|
2102
|
+
var objectKeys$1 = objectKeys$2;
|
|
2102
2103
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2103
2104
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
2104
|
-
var toObject = toObject$
|
|
2105
|
+
var toObject$1 = toObject$3;
|
|
2105
2106
|
var IndexedObject = indexedObject;
|
|
2106
2107
|
|
|
2107
2108
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
2108
2109
|
var $assign = Object.assign;
|
|
2109
2110
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2110
2111
|
var defineProperty = Object.defineProperty;
|
|
2111
|
-
var concat = uncurryThis([].concat);
|
|
2112
|
+
var concat$1 = uncurryThis$6([].concat);
|
|
2112
2113
|
|
|
2113
2114
|
// `Object.assign` method
|
|
2114
2115
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2115
|
-
var objectAssign = !$assign || fails(function () {
|
|
2116
|
+
var objectAssign = !$assign || fails$5(function () {
|
|
2116
2117
|
// should have correct order of operations (Edge bug)
|
|
2117
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
2118
|
+
if (DESCRIPTORS$1 && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
2118
2119
|
enumerable: true,
|
|
2119
2120
|
get: function () {
|
|
2120
2121
|
defineProperty(this, 'b', {
|
|
@@ -2131,33 +2132,33 @@
|
|
|
2131
2132
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
2132
2133
|
A[symbol] = 7;
|
|
2133
2134
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
2134
|
-
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
2135
|
+
return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
|
|
2135
2136
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
2136
|
-
var T = toObject(target);
|
|
2137
|
+
var T = toObject$1(target);
|
|
2137
2138
|
var argumentsLength = arguments.length;
|
|
2138
2139
|
var index = 1;
|
|
2139
2140
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
2140
2141
|
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
2141
2142
|
while (argumentsLength > index) {
|
|
2142
2143
|
var S = IndexedObject(arguments[index++]);
|
|
2143
|
-
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
2144
|
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
2144
2145
|
var length = keys.length;
|
|
2145
2146
|
var j = 0;
|
|
2146
2147
|
var key;
|
|
2147
2148
|
while (length > j) {
|
|
2148
2149
|
key = keys[j++];
|
|
2149
|
-
if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2150
|
+
if (!DESCRIPTORS$1 || call$3(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
2150
2151
|
}
|
|
2151
2152
|
} return T;
|
|
2152
2153
|
} : $assign;
|
|
2153
2154
|
|
|
2154
|
-
var
|
|
2155
|
+
var $$2 = _export;
|
|
2155
2156
|
var assign = objectAssign;
|
|
2156
2157
|
|
|
2157
2158
|
// `Object.assign` method
|
|
2158
2159
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2159
2160
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2160
|
-
|
|
2161
|
+
$$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
2161
2162
|
assign: assign
|
|
2162
2163
|
});
|
|
2163
2164
|
|
|
@@ -3539,7 +3540,7 @@
|
|
|
3539
3540
|
return _this.instance.on(NINETAILED_TRACKER_EVENTS.profile, function (_a) {
|
|
3540
3541
|
var payload = _a.payload;
|
|
3541
3542
|
cb(__assign(__assign({}, _this._profileState), {
|
|
3542
|
-
|
|
3543
|
+
status: 'success',
|
|
3543
3544
|
profile: payload.profile,
|
|
3544
3545
|
error: undefined
|
|
3545
3546
|
}));
|
|
@@ -3547,12 +3548,23 @@
|
|
|
3547
3548
|
};
|
|
3548
3549
|
|
|
3549
3550
|
this.plugins = flatten__default["default"](plugins || []);
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3551
|
+
|
|
3552
|
+
if (profile) {
|
|
3553
|
+
this._profileState = {
|
|
3554
|
+
status: 'success',
|
|
3555
|
+
profile: profile,
|
|
3556
|
+
error: undefined,
|
|
3557
|
+
from: 'hydrated'
|
|
3558
|
+
};
|
|
3559
|
+
} else {
|
|
3560
|
+
this._profileState = {
|
|
3561
|
+
status: 'loading',
|
|
3562
|
+
profile: null,
|
|
3563
|
+
error: undefined,
|
|
3564
|
+
from: 'api'
|
|
3565
|
+
};
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3556
3568
|
this.instance = Analytics__default["default"]({
|
|
3557
3569
|
app: 'ninetailed',
|
|
3558
3570
|
plugins: __spreadArray(__spreadArray([], this.plugins, true), [ninetailedPlugin({
|
|
@@ -3603,8 +3615,8 @@
|
|
|
3603
3615
|
return Ninetailed;
|
|
3604
3616
|
}();
|
|
3605
3617
|
|
|
3606
|
-
var selectVariant = function selectVariant(baseline, variants, _a, options) {
|
|
3607
|
-
var
|
|
3618
|
+
var selectVariant$1 = function selectVariant(baseline, variants, _a, options) {
|
|
3619
|
+
var status = _a.status,
|
|
3608
3620
|
profile = _a.profile,
|
|
3609
3621
|
error = _a.error;
|
|
3610
3622
|
|
|
@@ -3614,7 +3626,7 @@
|
|
|
3614
3626
|
};
|
|
3615
3627
|
}
|
|
3616
3628
|
|
|
3617
|
-
if (loading) {
|
|
3629
|
+
if (status === 'loading') {
|
|
3618
3630
|
return {
|
|
3619
3631
|
loading: true,
|
|
3620
3632
|
variant: __assign({
|
|
@@ -3631,7 +3643,7 @@
|
|
|
3631
3643
|
};
|
|
3632
3644
|
}
|
|
3633
3645
|
|
|
3634
|
-
if (error) {
|
|
3646
|
+
if (status === 'error') {
|
|
3635
3647
|
return {
|
|
3636
3648
|
loading: false,
|
|
3637
3649
|
variant: __assign({
|
|
@@ -3703,11 +3715,850 @@
|
|
|
3703
3715
|
};
|
|
3704
3716
|
};
|
|
3705
3717
|
|
|
3718
|
+
var selectBaselineWithVariants = function selectBaselineWithVariants(experience, baseline) {
|
|
3719
|
+
return experience.components.find(function (baselineWithVariants) {
|
|
3720
|
+
return baselineWithVariants.baseline.id === baseline.id;
|
|
3721
|
+
});
|
|
3722
|
+
};
|
|
3723
|
+
|
|
3724
|
+
var selectVariants = function selectVariants(experience, baseline) {
|
|
3725
|
+
var baselineWithVariants = selectBaselineWithVariants(experience, baseline);
|
|
3726
|
+
|
|
3727
|
+
if (!baselineWithVariants) {
|
|
3728
|
+
return [];
|
|
3729
|
+
}
|
|
3730
|
+
|
|
3731
|
+
return baselineWithVariants.variants;
|
|
3732
|
+
};
|
|
3733
|
+
|
|
3734
|
+
var selectHasVariants = function selectHasVariants(experience, baseline) {
|
|
3735
|
+
var variants = selectVariants(experience, baseline);
|
|
3736
|
+
return variants.length > 0;
|
|
3737
|
+
};
|
|
3738
|
+
|
|
3739
|
+
var global$6 = global$F;
|
|
3740
|
+
var classof$2 = classof$6;
|
|
3741
|
+
|
|
3742
|
+
var String$1 = global$6.String;
|
|
3743
|
+
|
|
3744
|
+
var toString$4 = function (argument) {
|
|
3745
|
+
if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
3746
|
+
return String$1(argument);
|
|
3747
|
+
};
|
|
3748
|
+
|
|
3749
|
+
var isObject = isObject$8;
|
|
3750
|
+
var classof$1 = classofRaw$1;
|
|
3751
|
+
var wellKnownSymbol$3 = wellKnownSymbol$e;
|
|
3752
|
+
|
|
3753
|
+
var MATCH$1 = wellKnownSymbol$3('match');
|
|
3754
|
+
|
|
3755
|
+
// `IsRegExp` abstract operation
|
|
3756
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
3757
|
+
var isRegexp = function (it) {
|
|
3758
|
+
var isRegExp;
|
|
3759
|
+
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
|
|
3760
|
+
};
|
|
3761
|
+
|
|
3762
|
+
var global$5 = global$F;
|
|
3763
|
+
var isRegExp = isRegexp;
|
|
3764
|
+
|
|
3765
|
+
var TypeError$2 = global$5.TypeError;
|
|
3766
|
+
|
|
3767
|
+
var notARegexp = function (it) {
|
|
3768
|
+
if (isRegExp(it)) {
|
|
3769
|
+
throw TypeError$2("The method doesn't accept regular expressions");
|
|
3770
|
+
} return it;
|
|
3771
|
+
};
|
|
3772
|
+
|
|
3773
|
+
var wellKnownSymbol$2 = wellKnownSymbol$e;
|
|
3774
|
+
|
|
3775
|
+
var MATCH = wellKnownSymbol$2('match');
|
|
3776
|
+
|
|
3777
|
+
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
3778
|
+
var regexp = /./;
|
|
3779
|
+
try {
|
|
3780
|
+
'/./'[METHOD_NAME](regexp);
|
|
3781
|
+
} catch (error1) {
|
|
3782
|
+
try {
|
|
3783
|
+
regexp[MATCH] = false;
|
|
3784
|
+
return '/./'[METHOD_NAME](regexp);
|
|
3785
|
+
} catch (error2) { /* empty */ }
|
|
3786
|
+
} return false;
|
|
3787
|
+
};
|
|
3788
|
+
|
|
3789
|
+
var $$1 = _export;
|
|
3790
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
3791
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
3792
|
+
var toLength$1 = toLength$3;
|
|
3793
|
+
var toString$3 = toString$4;
|
|
3794
|
+
var notARegExp = notARegexp;
|
|
3795
|
+
var requireObjectCoercible$2 = requireObjectCoercible$5;
|
|
3796
|
+
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3797
|
+
|
|
3798
|
+
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
3799
|
+
var un$StartsWith = uncurryThis$5(''.startsWith);
|
|
3800
|
+
var stringSlice$4 = uncurryThis$5(''.slice);
|
|
3801
|
+
var min$1 = Math.min;
|
|
3802
|
+
|
|
3803
|
+
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
3804
|
+
// https://github.com/zloirock/core-js/pull/702
|
|
3805
|
+
var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
3806
|
+
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
|
|
3807
|
+
return descriptor && !descriptor.writable;
|
|
3808
|
+
}();
|
|
3809
|
+
|
|
3810
|
+
// `String.prototype.startsWith` method
|
|
3811
|
+
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
3812
|
+
$$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
3813
|
+
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
3814
|
+
var that = toString$3(requireObjectCoercible$2(this));
|
|
3815
|
+
notARegExp(searchString);
|
|
3816
|
+
var index = toLength$1(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
3817
|
+
var search = toString$3(searchString);
|
|
3818
|
+
return un$StartsWith
|
|
3819
|
+
? un$StartsWith(that, search, index)
|
|
3820
|
+
: stringSlice$4(that, index, index + search.length) === search;
|
|
3821
|
+
}
|
|
3822
|
+
});
|
|
3823
|
+
|
|
3824
|
+
var anObject$4 = anObject$d;
|
|
3825
|
+
|
|
3826
|
+
// `RegExp.prototype.flags` getter implementation
|
|
3827
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
3828
|
+
var regexpFlags$1 = function () {
|
|
3829
|
+
var that = anObject$4(this);
|
|
3830
|
+
var result = '';
|
|
3831
|
+
if (that.global) result += 'g';
|
|
3832
|
+
if (that.ignoreCase) result += 'i';
|
|
3833
|
+
if (that.multiline) result += 'm';
|
|
3834
|
+
if (that.dotAll) result += 's';
|
|
3835
|
+
if (that.unicode) result += 'u';
|
|
3836
|
+
if (that.sticky) result += 'y';
|
|
3837
|
+
return result;
|
|
3838
|
+
};
|
|
3839
|
+
|
|
3840
|
+
var fails$4 = fails$f;
|
|
3841
|
+
var global$4 = global$F;
|
|
3842
|
+
|
|
3843
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
3844
|
+
var $RegExp$2 = global$4.RegExp;
|
|
3845
|
+
|
|
3846
|
+
var UNSUPPORTED_Y$1 = fails$4(function () {
|
|
3847
|
+
var re = $RegExp$2('a', 'y');
|
|
3848
|
+
re.lastIndex = 2;
|
|
3849
|
+
return re.exec('abcd') != null;
|
|
3850
|
+
});
|
|
3851
|
+
|
|
3852
|
+
// UC Browser bug
|
|
3853
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
3854
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
3855
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
3856
|
+
});
|
|
3857
|
+
|
|
3858
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
|
|
3859
|
+
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
3860
|
+
var re = $RegExp$2('^r', 'gy');
|
|
3861
|
+
re.lastIndex = 2;
|
|
3862
|
+
return re.exec('str') != null;
|
|
3863
|
+
});
|
|
3864
|
+
|
|
3865
|
+
var regexpStickyHelpers = {
|
|
3866
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
3867
|
+
MISSED_STICKY: MISSED_STICKY,
|
|
3868
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
3869
|
+
};
|
|
3870
|
+
|
|
3871
|
+
var objectDefineProperties = {};
|
|
3872
|
+
|
|
3873
|
+
var DESCRIPTORS = descriptors;
|
|
3874
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
3875
|
+
var definePropertyModule = objectDefineProperty;
|
|
3876
|
+
var anObject$3 = anObject$d;
|
|
3877
|
+
var toIndexedObject = toIndexedObject$4;
|
|
3878
|
+
var objectKeys = objectKeys$2;
|
|
3879
|
+
|
|
3880
|
+
// `Object.defineProperties` method
|
|
3881
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
3882
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
3883
|
+
objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
3884
|
+
anObject$3(O);
|
|
3885
|
+
var props = toIndexedObject(Properties);
|
|
3886
|
+
var keys = objectKeys(Properties);
|
|
3887
|
+
var length = keys.length;
|
|
3888
|
+
var index = 0;
|
|
3889
|
+
var key;
|
|
3890
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
3891
|
+
return O;
|
|
3892
|
+
};
|
|
3893
|
+
|
|
3894
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
3895
|
+
|
|
3896
|
+
var anObject$2 = anObject$d;
|
|
3897
|
+
var definePropertiesModule = objectDefineProperties;
|
|
3898
|
+
var enumBugKeys = enumBugKeys$3;
|
|
3899
|
+
var hiddenKeys = hiddenKeys$4;
|
|
3900
|
+
var html = html$2;
|
|
3901
|
+
var documentCreateElement = documentCreateElement$1;
|
|
3902
|
+
var sharedKey = sharedKey$2;
|
|
3903
|
+
|
|
3904
|
+
var GT = '>';
|
|
3905
|
+
var LT = '<';
|
|
3906
|
+
var PROTOTYPE = 'prototype';
|
|
3907
|
+
var SCRIPT = 'script';
|
|
3908
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
3909
|
+
|
|
3910
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
3911
|
+
|
|
3912
|
+
var scriptTag = function (content) {
|
|
3913
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
3914
|
+
};
|
|
3915
|
+
|
|
3916
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
3917
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
3918
|
+
activeXDocument.write(scriptTag(''));
|
|
3919
|
+
activeXDocument.close();
|
|
3920
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
3921
|
+
activeXDocument = null; // avoid memory leak
|
|
3922
|
+
return temp;
|
|
3923
|
+
};
|
|
3924
|
+
|
|
3925
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
3926
|
+
var NullProtoObjectViaIFrame = function () {
|
|
3927
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
3928
|
+
var iframe = documentCreateElement('iframe');
|
|
3929
|
+
var JS = 'java' + SCRIPT + ':';
|
|
3930
|
+
var iframeDocument;
|
|
3931
|
+
iframe.style.display = 'none';
|
|
3932
|
+
html.appendChild(iframe);
|
|
3933
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
3934
|
+
iframe.src = String(JS);
|
|
3935
|
+
iframeDocument = iframe.contentWindow.document;
|
|
3936
|
+
iframeDocument.open();
|
|
3937
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
3938
|
+
iframeDocument.close();
|
|
3939
|
+
return iframeDocument.F;
|
|
3940
|
+
};
|
|
3941
|
+
|
|
3942
|
+
// Check for document.domain and active x support
|
|
3943
|
+
// No need to use active x approach when document.domain is not set
|
|
3944
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
3945
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
3946
|
+
// avoid IE GC bug
|
|
3947
|
+
var activeXDocument;
|
|
3948
|
+
var NullProtoObject = function () {
|
|
3949
|
+
try {
|
|
3950
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
3951
|
+
} catch (error) { /* ignore */ }
|
|
3952
|
+
NullProtoObject = typeof document != 'undefined'
|
|
3953
|
+
? document.domain && activeXDocument
|
|
3954
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
3955
|
+
: NullProtoObjectViaIFrame()
|
|
3956
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
3957
|
+
var length = enumBugKeys.length;
|
|
3958
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
3959
|
+
return NullProtoObject();
|
|
3960
|
+
};
|
|
3961
|
+
|
|
3962
|
+
hiddenKeys[IE_PROTO] = true;
|
|
3963
|
+
|
|
3964
|
+
// `Object.create` method
|
|
3965
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
3966
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
3967
|
+
var result;
|
|
3968
|
+
if (O !== null) {
|
|
3969
|
+
EmptyConstructor[PROTOTYPE] = anObject$2(O);
|
|
3970
|
+
result = new EmptyConstructor();
|
|
3971
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
3972
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
3973
|
+
result[IE_PROTO] = O;
|
|
3974
|
+
} else result = NullProtoObject();
|
|
3975
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
3976
|
+
};
|
|
3977
|
+
|
|
3978
|
+
var fails$3 = fails$f;
|
|
3979
|
+
var global$3 = global$F;
|
|
3980
|
+
|
|
3981
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
3982
|
+
var $RegExp$1 = global$3.RegExp;
|
|
3983
|
+
|
|
3984
|
+
var regexpUnsupportedDotAll = fails$3(function () {
|
|
3985
|
+
var re = $RegExp$1('.', 's');
|
|
3986
|
+
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
3987
|
+
});
|
|
3988
|
+
|
|
3989
|
+
var fails$2 = fails$f;
|
|
3990
|
+
var global$2 = global$F;
|
|
3991
|
+
|
|
3992
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
3993
|
+
var $RegExp = global$2.RegExp;
|
|
3994
|
+
|
|
3995
|
+
var regexpUnsupportedNcg = fails$2(function () {
|
|
3996
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
3997
|
+
return re.exec('b').groups.a !== 'b' ||
|
|
3998
|
+
'b'.replace(re, '$<a>c') !== 'bc';
|
|
3999
|
+
});
|
|
4000
|
+
|
|
4001
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
4002
|
+
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
4003
|
+
var call$2 = functionCall;
|
|
4004
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
4005
|
+
var toString$2 = toString$4;
|
|
4006
|
+
var regexpFlags = regexpFlags$1;
|
|
4007
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
4008
|
+
var shared = shared$4.exports;
|
|
4009
|
+
var create = objectCreate;
|
|
4010
|
+
var getInternalState = internalState.get;
|
|
4011
|
+
var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
|
|
4012
|
+
var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
4013
|
+
|
|
4014
|
+
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
4015
|
+
var nativeExec = RegExp.prototype.exec;
|
|
4016
|
+
var patchedExec = nativeExec;
|
|
4017
|
+
var charAt$3 = uncurryThis$4(''.charAt);
|
|
4018
|
+
var indexOf = uncurryThis$4(''.indexOf);
|
|
4019
|
+
var replace$1 = uncurryThis$4(''.replace);
|
|
4020
|
+
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
4021
|
+
|
|
4022
|
+
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
4023
|
+
var re1 = /a/;
|
|
4024
|
+
var re2 = /b*/g;
|
|
4025
|
+
call$2(nativeExec, re1, 'a');
|
|
4026
|
+
call$2(nativeExec, re2, 'a');
|
|
4027
|
+
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
4028
|
+
})();
|
|
4029
|
+
|
|
4030
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
4031
|
+
|
|
4032
|
+
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
4033
|
+
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
4034
|
+
|
|
4035
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
4036
|
+
|
|
4037
|
+
if (PATCH) {
|
|
4038
|
+
patchedExec = function exec(string) {
|
|
4039
|
+
var re = this;
|
|
4040
|
+
var state = getInternalState(re);
|
|
4041
|
+
var str = toString$2(string);
|
|
4042
|
+
var raw = state.raw;
|
|
4043
|
+
var result, reCopy, lastIndex, match, i, object, group;
|
|
4044
|
+
|
|
4045
|
+
if (raw) {
|
|
4046
|
+
raw.lastIndex = re.lastIndex;
|
|
4047
|
+
result = call$2(patchedExec, raw, str);
|
|
4048
|
+
re.lastIndex = raw.lastIndex;
|
|
4049
|
+
return result;
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
var groups = state.groups;
|
|
4053
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
4054
|
+
var flags = call$2(regexpFlags, re);
|
|
4055
|
+
var source = re.source;
|
|
4056
|
+
var charsAdded = 0;
|
|
4057
|
+
var strCopy = str;
|
|
4058
|
+
|
|
4059
|
+
if (sticky) {
|
|
4060
|
+
flags = replace$1(flags, 'y', '');
|
|
4061
|
+
if (indexOf(flags, 'g') === -1) {
|
|
4062
|
+
flags += 'g';
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
strCopy = stringSlice$3(str, re.lastIndex);
|
|
4066
|
+
// Support anchored sticky behavior.
|
|
4067
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
4068
|
+
source = '(?: ' + source + ')';
|
|
4069
|
+
strCopy = ' ' + strCopy;
|
|
4070
|
+
charsAdded++;
|
|
4071
|
+
}
|
|
4072
|
+
// ^(? + rx + ) is needed, in combination with some str slicing, to
|
|
4073
|
+
// simulate the 'y' flag.
|
|
4074
|
+
reCopy = new RegExp('^(?:' + source + ')', flags);
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
if (NPCG_INCLUDED) {
|
|
4078
|
+
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
|
|
4079
|
+
}
|
|
4080
|
+
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
4081
|
+
|
|
4082
|
+
match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
|
|
4083
|
+
|
|
4084
|
+
if (sticky) {
|
|
4085
|
+
if (match) {
|
|
4086
|
+
match.input = stringSlice$3(match.input, charsAdded);
|
|
4087
|
+
match[0] = stringSlice$3(match[0], charsAdded);
|
|
4088
|
+
match.index = re.lastIndex;
|
|
4089
|
+
re.lastIndex += match[0].length;
|
|
4090
|
+
} else re.lastIndex = 0;
|
|
4091
|
+
} else if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
4092
|
+
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
|
|
4093
|
+
}
|
|
4094
|
+
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
4095
|
+
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
4096
|
+
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
4097
|
+
call$2(nativeReplace, match[0], reCopy, function () {
|
|
4098
|
+
for (i = 1; i < arguments.length - 2; i++) {
|
|
4099
|
+
if (arguments[i] === undefined) match[i] = undefined;
|
|
4100
|
+
}
|
|
4101
|
+
});
|
|
4102
|
+
}
|
|
4103
|
+
|
|
4104
|
+
if (match && groups) {
|
|
4105
|
+
match.groups = object = create(null);
|
|
4106
|
+
for (i = 0; i < groups.length; i++) {
|
|
4107
|
+
group = groups[i];
|
|
4108
|
+
object[group[0]] = match[group[1]];
|
|
4109
|
+
}
|
|
4110
|
+
}
|
|
4111
|
+
|
|
4112
|
+
return match;
|
|
4113
|
+
};
|
|
4114
|
+
}
|
|
4115
|
+
|
|
4116
|
+
var regexpExec$2 = patchedExec;
|
|
4117
|
+
|
|
4118
|
+
var $ = _export;
|
|
4119
|
+
var exec = regexpExec$2;
|
|
4120
|
+
|
|
4121
|
+
// `RegExp.prototype.exec` method
|
|
4122
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
4123
|
+
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
4124
|
+
exec: exec
|
|
4125
|
+
});
|
|
4126
|
+
|
|
4127
|
+
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
4128
|
+
|
|
4129
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
4130
|
+
var redefine = redefine$4.exports;
|
|
4131
|
+
var regexpExec$1 = regexpExec$2;
|
|
4132
|
+
var fails$1 = fails$f;
|
|
4133
|
+
var wellKnownSymbol$1 = wellKnownSymbol$e;
|
|
4134
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
4135
|
+
|
|
4136
|
+
var SPECIES = wellKnownSymbol$1('species');
|
|
4137
|
+
var RegExpPrototype = RegExp.prototype;
|
|
4138
|
+
|
|
4139
|
+
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
4140
|
+
var SYMBOL = wellKnownSymbol$1(KEY);
|
|
4141
|
+
|
|
4142
|
+
var DELEGATES_TO_SYMBOL = !fails$1(function () {
|
|
4143
|
+
// String methods call symbol-named RegEp methods
|
|
4144
|
+
var O = {};
|
|
4145
|
+
O[SYMBOL] = function () { return 7; };
|
|
4146
|
+
return ''[KEY](O) != 7;
|
|
4147
|
+
});
|
|
4148
|
+
|
|
4149
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
|
|
4150
|
+
// Symbol-named RegExp methods call .exec
|
|
4151
|
+
var execCalled = false;
|
|
4152
|
+
var re = /a/;
|
|
4153
|
+
|
|
4154
|
+
if (KEY === 'split') {
|
|
4155
|
+
// We can't use real regex here since it causes deoptimization
|
|
4156
|
+
// and serious performance degradation in V8
|
|
4157
|
+
// https://github.com/zloirock/core-js/issues/306
|
|
4158
|
+
re = {};
|
|
4159
|
+
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
4160
|
+
// a new one. We need to return the patched regex when creating the new one.
|
|
4161
|
+
re.constructor = {};
|
|
4162
|
+
re.constructor[SPECIES] = function () { return re; };
|
|
4163
|
+
re.flags = '';
|
|
4164
|
+
re[SYMBOL] = /./[SYMBOL];
|
|
4165
|
+
}
|
|
4166
|
+
|
|
4167
|
+
re.exec = function () { execCalled = true; return null; };
|
|
4168
|
+
|
|
4169
|
+
re[SYMBOL]('');
|
|
4170
|
+
return !execCalled;
|
|
4171
|
+
});
|
|
4172
|
+
|
|
4173
|
+
if (
|
|
4174
|
+
!DELEGATES_TO_SYMBOL ||
|
|
4175
|
+
!DELEGATES_TO_EXEC ||
|
|
4176
|
+
FORCED
|
|
4177
|
+
) {
|
|
4178
|
+
var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
|
|
4179
|
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
4180
|
+
var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
|
|
4181
|
+
var $exec = regexp.exec;
|
|
4182
|
+
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
4183
|
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
4184
|
+
// The native String method already delegates to @@method (this
|
|
4185
|
+
// polyfilled function), leasing to infinite recursion.
|
|
4186
|
+
// We avoid it by directly calling the native @@method method.
|
|
4187
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
|
4188
|
+
}
|
|
4189
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
|
4190
|
+
}
|
|
4191
|
+
return { done: false };
|
|
4192
|
+
});
|
|
4193
|
+
|
|
4194
|
+
redefine(String.prototype, KEY, methods[0]);
|
|
4195
|
+
redefine(RegExpPrototype, SYMBOL, methods[1]);
|
|
4196
|
+
}
|
|
4197
|
+
|
|
4198
|
+
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
4199
|
+
};
|
|
4200
|
+
|
|
4201
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
4202
|
+
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
4203
|
+
var toString$1 = toString$4;
|
|
4204
|
+
var requireObjectCoercible$1 = requireObjectCoercible$5;
|
|
4205
|
+
|
|
4206
|
+
var charAt$2 = uncurryThis$2(''.charAt);
|
|
4207
|
+
var charCodeAt = uncurryThis$2(''.charCodeAt);
|
|
4208
|
+
var stringSlice$2 = uncurryThis$2(''.slice);
|
|
4209
|
+
|
|
4210
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
4211
|
+
return function ($this, pos) {
|
|
4212
|
+
var S = toString$1(requireObjectCoercible$1($this));
|
|
4213
|
+
var position = toIntegerOrInfinity$1(pos);
|
|
4214
|
+
var size = S.length;
|
|
4215
|
+
var first, second;
|
|
4216
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
4217
|
+
first = charCodeAt(S, position);
|
|
4218
|
+
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
4219
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
4220
|
+
? CONVERT_TO_STRING
|
|
4221
|
+
? charAt$2(S, position)
|
|
4222
|
+
: first
|
|
4223
|
+
: CONVERT_TO_STRING
|
|
4224
|
+
? stringSlice$2(S, position, position + 2)
|
|
4225
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
4226
|
+
};
|
|
4227
|
+
};
|
|
4228
|
+
|
|
4229
|
+
var stringMultibyte = {
|
|
4230
|
+
// `String.prototype.codePointAt` method
|
|
4231
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
4232
|
+
codeAt: createMethod(false),
|
|
4233
|
+
// `String.prototype.at` method
|
|
4234
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
4235
|
+
charAt: createMethod(true)
|
|
4236
|
+
};
|
|
4237
|
+
|
|
4238
|
+
var charAt$1 = stringMultibyte.charAt;
|
|
4239
|
+
|
|
4240
|
+
// `AdvanceStringIndex` abstract operation
|
|
4241
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
4242
|
+
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
4243
|
+
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
4244
|
+
};
|
|
4245
|
+
|
|
4246
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
4247
|
+
var toObject = toObject$3;
|
|
4248
|
+
|
|
4249
|
+
var floor = Math.floor;
|
|
4250
|
+
var charAt = uncurryThis$1(''.charAt);
|
|
4251
|
+
var replace = uncurryThis$1(''.replace);
|
|
4252
|
+
var stringSlice$1 = uncurryThis$1(''.slice);
|
|
4253
|
+
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
4254
|
+
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
4255
|
+
|
|
4256
|
+
// `GetSubstitution` abstract operation
|
|
4257
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
4258
|
+
var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
4259
|
+
var tailPos = position + matched.length;
|
|
4260
|
+
var m = captures.length;
|
|
4261
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
4262
|
+
if (namedCaptures !== undefined) {
|
|
4263
|
+
namedCaptures = toObject(namedCaptures);
|
|
4264
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
4265
|
+
}
|
|
4266
|
+
return replace(replacement, symbols, function (match, ch) {
|
|
4267
|
+
var capture;
|
|
4268
|
+
switch (charAt(ch, 0)) {
|
|
4269
|
+
case '$': return '$';
|
|
4270
|
+
case '&': return matched;
|
|
4271
|
+
case '`': return stringSlice$1(str, 0, position);
|
|
4272
|
+
case "'": return stringSlice$1(str, tailPos);
|
|
4273
|
+
case '<':
|
|
4274
|
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
4275
|
+
break;
|
|
4276
|
+
default: // \d\d?
|
|
4277
|
+
var n = +ch;
|
|
4278
|
+
if (n === 0) return match;
|
|
4279
|
+
if (n > m) {
|
|
4280
|
+
var f = floor(n / 10);
|
|
4281
|
+
if (f === 0) return match;
|
|
4282
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
|
|
4283
|
+
return match;
|
|
4284
|
+
}
|
|
4285
|
+
capture = captures[n - 1];
|
|
4286
|
+
}
|
|
4287
|
+
return capture === undefined ? '' : capture;
|
|
4288
|
+
});
|
|
4289
|
+
};
|
|
4290
|
+
|
|
4291
|
+
var global$1 = global$F;
|
|
4292
|
+
var call$1 = functionCall;
|
|
4293
|
+
var anObject$1 = anObject$d;
|
|
4294
|
+
var isCallable$1 = isCallable$g;
|
|
4295
|
+
var classof = classofRaw$1;
|
|
4296
|
+
var regexpExec = regexpExec$2;
|
|
4297
|
+
|
|
4298
|
+
var TypeError$1 = global$1.TypeError;
|
|
4299
|
+
|
|
4300
|
+
// `RegExpExec` abstract operation
|
|
4301
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
4302
|
+
var regexpExecAbstract = function (R, S) {
|
|
4303
|
+
var exec = R.exec;
|
|
4304
|
+
if (isCallable$1(exec)) {
|
|
4305
|
+
var result = call$1(exec, R, S);
|
|
4306
|
+
if (result !== null) anObject$1(result);
|
|
4307
|
+
return result;
|
|
4308
|
+
}
|
|
4309
|
+
if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
|
|
4310
|
+
throw TypeError$1('RegExp#exec called on incompatible receiver');
|
|
4311
|
+
};
|
|
4312
|
+
|
|
4313
|
+
var apply = functionApply;
|
|
4314
|
+
var call = functionCall;
|
|
4315
|
+
var uncurryThis = functionUncurryThis;
|
|
4316
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
4317
|
+
var fails = fails$f;
|
|
4318
|
+
var anObject = anObject$d;
|
|
4319
|
+
var isCallable = isCallable$g;
|
|
4320
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
4321
|
+
var toLength = toLength$3;
|
|
4322
|
+
var toString = toString$4;
|
|
4323
|
+
var requireObjectCoercible = requireObjectCoercible$5;
|
|
4324
|
+
var advanceStringIndex = advanceStringIndex$1;
|
|
4325
|
+
var getMethod = getMethod$4;
|
|
4326
|
+
var getSubstitution = getSubstitution$1;
|
|
4327
|
+
var regExpExec = regexpExecAbstract;
|
|
4328
|
+
var wellKnownSymbol = wellKnownSymbol$e;
|
|
4329
|
+
|
|
4330
|
+
var REPLACE = wellKnownSymbol('replace');
|
|
4331
|
+
var max = Math.max;
|
|
4332
|
+
var min = Math.min;
|
|
4333
|
+
var concat = uncurryThis([].concat);
|
|
4334
|
+
var push = uncurryThis([].push);
|
|
4335
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
4336
|
+
var stringSlice = uncurryThis(''.slice);
|
|
4337
|
+
|
|
4338
|
+
var maybeToString = function (it) {
|
|
4339
|
+
return it === undefined ? it : String(it);
|
|
4340
|
+
};
|
|
4341
|
+
|
|
4342
|
+
// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
4343
|
+
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
4344
|
+
var REPLACE_KEEPS_$0 = (function () {
|
|
4345
|
+
// eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
|
|
4346
|
+
return 'a'.replace(/./, '$0') === '$0';
|
|
4347
|
+
})();
|
|
4348
|
+
|
|
4349
|
+
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
4350
|
+
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
4351
|
+
if (/./[REPLACE]) {
|
|
4352
|
+
return /./[REPLACE]('a', '$0') === '';
|
|
4353
|
+
}
|
|
4354
|
+
return false;
|
|
4355
|
+
})();
|
|
4356
|
+
|
|
4357
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
4358
|
+
var re = /./;
|
|
4359
|
+
re.exec = function () {
|
|
4360
|
+
var result = [];
|
|
4361
|
+
result.groups = { a: '7' };
|
|
4362
|
+
return result;
|
|
4363
|
+
};
|
|
4364
|
+
// eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
|
|
4365
|
+
return ''.replace(re, '$<a>') !== '7';
|
|
4366
|
+
});
|
|
4367
|
+
|
|
4368
|
+
// @@replace logic
|
|
4369
|
+
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
4370
|
+
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
4371
|
+
|
|
4372
|
+
return [
|
|
4373
|
+
// `String.prototype.replace` method
|
|
4374
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
4375
|
+
function replace(searchValue, replaceValue) {
|
|
4376
|
+
var O = requireObjectCoercible(this);
|
|
4377
|
+
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
|
4378
|
+
return replacer
|
|
4379
|
+
? call(replacer, searchValue, O, replaceValue)
|
|
4380
|
+
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
|
4381
|
+
},
|
|
4382
|
+
// `RegExp.prototype[@@replace]` method
|
|
4383
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
4384
|
+
function (string, replaceValue) {
|
|
4385
|
+
var rx = anObject(this);
|
|
4386
|
+
var S = toString(string);
|
|
4387
|
+
|
|
4388
|
+
if (
|
|
4389
|
+
typeof replaceValue == 'string' &&
|
|
4390
|
+
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
4391
|
+
stringIndexOf(replaceValue, '$<') === -1
|
|
4392
|
+
) {
|
|
4393
|
+
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
4394
|
+
if (res.done) return res.value;
|
|
4395
|
+
}
|
|
4396
|
+
|
|
4397
|
+
var functionalReplace = isCallable(replaceValue);
|
|
4398
|
+
if (!functionalReplace) replaceValue = toString(replaceValue);
|
|
4399
|
+
|
|
4400
|
+
var global = rx.global;
|
|
4401
|
+
if (global) {
|
|
4402
|
+
var fullUnicode = rx.unicode;
|
|
4403
|
+
rx.lastIndex = 0;
|
|
4404
|
+
}
|
|
4405
|
+
var results = [];
|
|
4406
|
+
while (true) {
|
|
4407
|
+
var result = regExpExec(rx, S);
|
|
4408
|
+
if (result === null) break;
|
|
4409
|
+
|
|
4410
|
+
push(results, result);
|
|
4411
|
+
if (!global) break;
|
|
4412
|
+
|
|
4413
|
+
var matchStr = toString(result[0]);
|
|
4414
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
var accumulatedResult = '';
|
|
4418
|
+
var nextSourcePosition = 0;
|
|
4419
|
+
for (var i = 0; i < results.length; i++) {
|
|
4420
|
+
result = results[i];
|
|
4421
|
+
|
|
4422
|
+
var matched = toString(result[0]);
|
|
4423
|
+
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
4424
|
+
var captures = [];
|
|
4425
|
+
// NOTE: This is equivalent to
|
|
4426
|
+
// captures = result.slice(1).map(maybeToString)
|
|
4427
|
+
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
4428
|
+
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
4429
|
+
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
4430
|
+
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
4431
|
+
var namedCaptures = result.groups;
|
|
4432
|
+
if (functionalReplace) {
|
|
4433
|
+
var replacerArgs = concat([matched], captures, position, S);
|
|
4434
|
+
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
4435
|
+
var replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
|
4436
|
+
} else {
|
|
4437
|
+
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
4438
|
+
}
|
|
4439
|
+
if (position >= nextSourcePosition) {
|
|
4440
|
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
4441
|
+
nextSourcePosition = position + matched.length;
|
|
4442
|
+
}
|
|
4443
|
+
}
|
|
4444
|
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
4445
|
+
}
|
|
4446
|
+
];
|
|
4447
|
+
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
4448
|
+
|
|
4449
|
+
var EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
|
|
4450
|
+
|
|
4451
|
+
var selectActiveExperiments = function selectActiveExperiments(experiments, profile) {
|
|
4452
|
+
var experimentTraits = pickBy__default["default"](profile.traits, function (value, key) {
|
|
4453
|
+
return key.startsWith(EXPERIENCE_TRAIT_PREFIX) && value === true;
|
|
4454
|
+
});
|
|
4455
|
+
var experimentTraitsIds = Object.keys(experimentTraits).map(function (id) {
|
|
4456
|
+
return id.replace(EXPERIENCE_TRAIT_PREFIX, '');
|
|
4457
|
+
}); // a experiment is active when the use has it set as a true value on the traits and the experiment config is still active
|
|
4458
|
+
|
|
4459
|
+
var activeExperiments = experiments.filter(function (experiment) {
|
|
4460
|
+
return includes__default["default"](experimentTraitsIds, experiment.id);
|
|
4461
|
+
});
|
|
4462
|
+
return activeExperiments;
|
|
4463
|
+
};
|
|
4464
|
+
|
|
4465
|
+
/**
|
|
4466
|
+
* We can use any personalization as eglible experience
|
|
4467
|
+
* When going for an experiment we can only select a active experiment when 1 or more experiments are active
|
|
4468
|
+
* If the profile is not in any active experiments, we can select any expermiment
|
|
4469
|
+
*/
|
|
4470
|
+
|
|
4471
|
+
var selectEglibleExperiences = function selectEglibleExperiences(_a) {
|
|
4472
|
+
var experiences = _a.experiences,
|
|
4473
|
+
activeExperiments = _a.activeExperiments;
|
|
4474
|
+
return experiences.filter(function (experience) {
|
|
4475
|
+
return experience.type === 'nt_personalization' || activeExperiments.length === 0 || find__default["default"](activeExperiments, {
|
|
4476
|
+
id: experience.id
|
|
4477
|
+
});
|
|
4478
|
+
});
|
|
4479
|
+
};
|
|
4480
|
+
|
|
4481
|
+
var selectExperience = function selectExperience(_a) {
|
|
4482
|
+
var experiences = _a.experiences,
|
|
4483
|
+
activeExperiments = _a.activeExperiments,
|
|
4484
|
+
profile = _a.profile;
|
|
4485
|
+
var eglibleExperiences = selectEglibleExperiences({
|
|
4486
|
+
experiences: experiences,
|
|
4487
|
+
activeExperiments: activeExperiments
|
|
4488
|
+
});
|
|
4489
|
+
var selectedExperience = eglibleExperiences.find(function (experience) {
|
|
4490
|
+
// TODO check traffic allocation
|
|
4491
|
+
return includes__default["default"](profile.audiences, experience.audience.id) || // if the expriment is active already then it's selectible without further contraints to be fullfilled
|
|
4492
|
+
find__default["default"](activeExperiments, {
|
|
4493
|
+
id: experience.id
|
|
4494
|
+
});
|
|
4495
|
+
});
|
|
4496
|
+
return selectedExperience;
|
|
4497
|
+
};
|
|
4498
|
+
|
|
4499
|
+
var selectVariant = function selectVariant(_a) {
|
|
4500
|
+
var baseline = _a.baseline,
|
|
4501
|
+
experience = _a.experience,
|
|
4502
|
+
profile = _a.profile;
|
|
4503
|
+
var variants = selectVariants(experience, baseline);
|
|
4504
|
+
|
|
4505
|
+
if (!variants.length) {
|
|
4506
|
+
return null;
|
|
4507
|
+
} // Personalization
|
|
4508
|
+
|
|
4509
|
+
|
|
4510
|
+
if (experience.type === 'nt_personalization') {
|
|
4511
|
+
// TODO check holdout
|
|
4512
|
+
// Personalization Expriences can have only one variant.
|
|
4513
|
+
return variants[0];
|
|
4514
|
+
} // Experiment
|
|
4515
|
+
|
|
4516
|
+
|
|
4517
|
+
var distribution = find__default["default"](experience.distribution, function (_a) {
|
|
4518
|
+
var start = _a.start,
|
|
4519
|
+
end = _a.end;
|
|
4520
|
+
return profile.random > start && profile.random < end;
|
|
4521
|
+
});
|
|
4522
|
+
|
|
4523
|
+
if (!distribution) {
|
|
4524
|
+
return null;
|
|
4525
|
+
}
|
|
4526
|
+
|
|
4527
|
+
if (distribution.index === 0) {
|
|
4528
|
+
return __assign(__assign({}, baseline), {
|
|
4529
|
+
hidden: false
|
|
4530
|
+
});
|
|
4531
|
+
}
|
|
4532
|
+
|
|
4533
|
+
var correctedVariantIndex = distribution.index - 1;
|
|
4534
|
+
|
|
4535
|
+
if (variants.length <= correctedVariantIndex) {
|
|
4536
|
+
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
4537
|
+
return null;
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4540
|
+
var variant = variants[correctedVariantIndex];
|
|
4541
|
+
|
|
4542
|
+
if (!variant) {
|
|
4543
|
+
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
4544
|
+
return null;
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4547
|
+
return variant;
|
|
4548
|
+
};
|
|
4549
|
+
|
|
3706
4550
|
exports.NINETAILED_TRACKER_EVENTS = NINETAILED_TRACKER_EVENTS;
|
|
3707
4551
|
exports.Ninetailed = Ninetailed;
|
|
3708
4552
|
exports.PLUGIN_NAME = PLUGIN_NAME;
|
|
3709
4553
|
exports.ninetailedPlugin = ninetailedPlugin;
|
|
3710
|
-
exports.
|
|
4554
|
+
exports.selectActiveExperiments = selectActiveExperiments;
|
|
4555
|
+
exports.selectEglibleExperiences = selectEglibleExperiences;
|
|
4556
|
+
exports.selectExperience = selectExperience;
|
|
4557
|
+
exports.selectExperienceBaselineWithVariants = selectBaselineWithVariants;
|
|
4558
|
+
exports.selectExperienceVariant = selectVariant;
|
|
4559
|
+
exports.selectExperienceVariants = selectVariants;
|
|
4560
|
+
exports.selectHasExperienceVariants = selectHasVariants;
|
|
4561
|
+
exports.selectVariant = selectVariant$1;
|
|
3711
4562
|
|
|
3712
4563
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3713
4564
|
|