@ninetailed/experience.js-react 3.0.0-beta.19 → 3.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +2910 -0
- package/index.js +961 -938
- package/lib/Experience/ExperimentsContext.d.ts +1 -0
- package/lib/NinetailedContext.d.ts +1 -0
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import React, { createContext, useMemo, useContext, useState, useRef, useEffect, createElement as createElement$1, useCallback } from 'react';
|
|
2
3
|
import { Ninetailed, selectVariant, selectDistribution, selectHasExperienceVariants, selectActiveExperiments, selectExperience, selectExperienceVariant } from '@ninetailed/experience.js';
|
|
3
4
|
import isEqual from 'lodash/isEqual';
|
|
4
5
|
import { logger, isBrowser } from '@ninetailed/experience.js-shared';
|
|
@@ -6,64 +7,24 @@ import { useInView } from 'react-intersection-observer';
|
|
|
6
7
|
import get$1 from 'lodash/get';
|
|
7
8
|
import has$1 from 'lodash/has';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const ExperimentsContext = /*#__PURE__*/createContext(undefined);
|
|
12
|
-
|
|
13
|
-
const ExperimentsProvider = ({
|
|
14
|
-
experiments,
|
|
15
|
-
children
|
|
16
|
-
}) => {
|
|
17
|
-
return /*#__PURE__*/React.createElement(ExperimentsContext.Provider, {
|
|
18
|
-
value: {
|
|
19
|
-
experiments
|
|
20
|
-
}
|
|
21
|
-
}, children);
|
|
22
|
-
};
|
|
10
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
23
11
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
clientId,
|
|
27
|
-
experiments: _experiments = [],
|
|
28
|
-
environment,
|
|
29
|
-
preview,
|
|
30
|
-
url,
|
|
31
|
-
profile,
|
|
32
|
-
locale,
|
|
33
|
-
requestTimeout,
|
|
34
|
-
plugins: _plugins = [],
|
|
35
|
-
onLog,
|
|
36
|
-
onError
|
|
37
|
-
}) => {
|
|
38
|
-
const ninetailed = useMemo(() => new Ninetailed({
|
|
39
|
-
clientId,
|
|
40
|
-
environment,
|
|
41
|
-
preview
|
|
42
|
-
}, {
|
|
43
|
-
url,
|
|
44
|
-
plugins: _plugins,
|
|
45
|
-
profile,
|
|
46
|
-
locale,
|
|
47
|
-
requestTimeout,
|
|
48
|
-
onLog,
|
|
49
|
-
onError
|
|
50
|
-
}), []);
|
|
51
|
-
return /*#__PURE__*/React.createElement(NinetailedContext.Provider, {
|
|
52
|
-
value: ninetailed
|
|
53
|
-
}, /*#__PURE__*/React.createElement(ExperimentsProvider, {
|
|
54
|
-
experiments: _experiments
|
|
55
|
-
}, children));
|
|
12
|
+
var check = function (it) {
|
|
13
|
+
return it && it.Math == Math && it;
|
|
56
14
|
};
|
|
57
15
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
16
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
17
|
+
var global$f =
|
|
18
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
19
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
20
|
+
check(typeof window == 'object' && window) ||
|
|
21
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
22
|
+
check(typeof self == 'object' && self) ||
|
|
23
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
24
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
25
|
+
(function () { return this; })() || Function('return this')();
|
|
65
26
|
|
|
66
|
-
var
|
|
27
|
+
var objectGetOwnPropertyDescriptor = {};
|
|
67
28
|
|
|
68
29
|
var fails$h = function (exec) {
|
|
69
30
|
try {
|
|
@@ -75,7 +36,15 @@ var fails$h = function (exec) {
|
|
|
75
36
|
|
|
76
37
|
var fails$g = fails$h;
|
|
77
38
|
|
|
78
|
-
|
|
39
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
40
|
+
var descriptors = !fails$g(function () {
|
|
41
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
42
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
var fails$f = fails$h;
|
|
46
|
+
|
|
47
|
+
var functionBindNative = !fails$f(function () {
|
|
79
48
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
80
49
|
var test = (function () { /* empty */ }).bind();
|
|
81
50
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -84,13 +53,46 @@ var functionBindNative = !fails$g(function () {
|
|
|
84
53
|
|
|
85
54
|
var NATIVE_BIND$2 = functionBindNative;
|
|
86
55
|
|
|
56
|
+
var call$a = Function.prototype.call;
|
|
57
|
+
|
|
58
|
+
var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () {
|
|
59
|
+
return call$a.apply(call$a, arguments);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var objectPropertyIsEnumerable = {};
|
|
63
|
+
|
|
64
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
65
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
66
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
67
|
+
|
|
68
|
+
// Nashorn ~ JDK8 bug
|
|
69
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
70
|
+
|
|
71
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
72
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
73
|
+
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
74
|
+
var descriptor = getOwnPropertyDescriptor$1(this, V);
|
|
75
|
+
return !!descriptor && descriptor.enumerable;
|
|
76
|
+
} : $propertyIsEnumerable;
|
|
77
|
+
|
|
78
|
+
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
79
|
+
return {
|
|
80
|
+
enumerable: !(bitmap & 1),
|
|
81
|
+
configurable: !(bitmap & 2),
|
|
82
|
+
writable: !(bitmap & 4),
|
|
83
|
+
value: value
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
88
|
+
|
|
87
89
|
var FunctionPrototype$2 = Function.prototype;
|
|
88
|
-
var call$
|
|
89
|
-
var uncurryThisWithBind = NATIVE_BIND$
|
|
90
|
+
var call$9 = FunctionPrototype$2.call;
|
|
91
|
+
var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$9, call$9);
|
|
90
92
|
|
|
91
|
-
var functionUncurryThis = NATIVE_BIND$
|
|
93
|
+
var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
|
|
92
94
|
return function () {
|
|
93
|
-
return call$
|
|
95
|
+
return call$9.apply(fn, arguments);
|
|
94
96
|
};
|
|
95
97
|
};
|
|
96
98
|
|
|
@@ -104,14 +106,14 @@ var classofRaw$2 = function (it) {
|
|
|
104
106
|
};
|
|
105
107
|
|
|
106
108
|
var uncurryThis$e = functionUncurryThis;
|
|
107
|
-
var fails$
|
|
109
|
+
var fails$e = fails$h;
|
|
108
110
|
var classof$4 = classofRaw$2;
|
|
109
111
|
|
|
110
112
|
var $Object$4 = Object;
|
|
111
113
|
var split = uncurryThis$e(''.split);
|
|
112
114
|
|
|
113
115
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
114
|
-
var indexedObject = fails$
|
|
116
|
+
var indexedObject = fails$e(function () {
|
|
115
117
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
116
118
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
117
119
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
@@ -144,88 +146,6 @@ var toIndexedObject$5 = function (it) {
|
|
|
144
146
|
return IndexedObject$2(requireObjectCoercible$3(it));
|
|
145
147
|
};
|
|
146
148
|
|
|
147
|
-
var check = function (it) {
|
|
148
|
-
return it && it.Math == Math && it;
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
152
|
-
var global$f =
|
|
153
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
154
|
-
check(typeof globalThis == 'object' && globalThis) ||
|
|
155
|
-
check(typeof window == 'object' && window) ||
|
|
156
|
-
// eslint-disable-next-line no-restricted-globals -- safe
|
|
157
|
-
check(typeof self == 'object' && self) ||
|
|
158
|
-
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
159
|
-
// eslint-disable-next-line no-new-func -- fallback
|
|
160
|
-
(function () { return this; })() || Function('return this')();
|
|
161
|
-
|
|
162
|
-
var shared$4 = {exports: {}};
|
|
163
|
-
|
|
164
|
-
var global$e = global$f;
|
|
165
|
-
|
|
166
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
167
|
-
var defineProperty$5 = Object.defineProperty;
|
|
168
|
-
|
|
169
|
-
var defineGlobalProperty$3 = function (key, value) {
|
|
170
|
-
try {
|
|
171
|
-
defineProperty$5(global$e, key, { value: value, configurable: true, writable: true });
|
|
172
|
-
} catch (error) {
|
|
173
|
-
global$e[key] = value;
|
|
174
|
-
} return value;
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
var global$d = global$f;
|
|
178
|
-
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
179
|
-
|
|
180
|
-
var SHARED = '__core-js_shared__';
|
|
181
|
-
var store$3 = global$d[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
182
|
-
|
|
183
|
-
var sharedStore = store$3;
|
|
184
|
-
|
|
185
|
-
var store$2 = sharedStore;
|
|
186
|
-
|
|
187
|
-
(shared$4.exports = function (key, value) {
|
|
188
|
-
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
189
|
-
})('versions', []).push({
|
|
190
|
-
version: '3.26.1',
|
|
191
|
-
mode: 'global',
|
|
192
|
-
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
193
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
194
|
-
source: 'https://github.com/zloirock/core-js'
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
198
|
-
|
|
199
|
-
var $Object$3 = Object;
|
|
200
|
-
|
|
201
|
-
// `ToObject` abstract operation
|
|
202
|
-
// https://tc39.es/ecma262/#sec-toobject
|
|
203
|
-
var toObject$5 = function (argument) {
|
|
204
|
-
return $Object$3(requireObjectCoercible$2(argument));
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
var uncurryThis$d = functionUncurryThis;
|
|
208
|
-
var toObject$4 = toObject$5;
|
|
209
|
-
|
|
210
|
-
var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
|
|
211
|
-
|
|
212
|
-
// `HasOwnProperty` abstract operation
|
|
213
|
-
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
214
|
-
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
215
|
-
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
216
|
-
return hasOwnProperty(toObject$4(it), key);
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
var uncurryThis$c = functionUncurryThis;
|
|
220
|
-
|
|
221
|
-
var id = 0;
|
|
222
|
-
var postfix = Math.random();
|
|
223
|
-
var toString$4 = uncurryThis$c(1.0.toString);
|
|
224
|
-
|
|
225
|
-
var uid$2 = function (key) {
|
|
226
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
|
|
227
|
-
};
|
|
228
|
-
|
|
229
149
|
var documentAll$2 = typeof document == 'object' && document.all;
|
|
230
150
|
|
|
231
151
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
@@ -248,26 +168,41 @@ var isCallable$h = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
|
248
168
|
return typeof argument == 'function';
|
|
249
169
|
};
|
|
250
170
|
|
|
251
|
-
var global$c = global$f;
|
|
252
171
|
var isCallable$g = isCallable$h;
|
|
172
|
+
var $documentAll = documentAll_1;
|
|
173
|
+
|
|
174
|
+
var documentAll = $documentAll.all;
|
|
175
|
+
|
|
176
|
+
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
177
|
+
return typeof it == 'object' ? it !== null : isCallable$g(it) || it === documentAll;
|
|
178
|
+
} : function (it) {
|
|
179
|
+
return typeof it == 'object' ? it !== null : isCallable$g(it);
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
var global$e = global$f;
|
|
183
|
+
var isCallable$f = isCallable$h;
|
|
253
184
|
|
|
254
185
|
var aFunction = function (argument) {
|
|
255
|
-
return isCallable$
|
|
186
|
+
return isCallable$f(argument) ? argument : undefined;
|
|
256
187
|
};
|
|
257
188
|
|
|
258
189
|
var getBuiltIn$4 = function (namespace, method) {
|
|
259
|
-
return arguments.length < 2 ? aFunction(global$
|
|
190
|
+
return arguments.length < 2 ? aFunction(global$e[namespace]) : global$e[namespace] && global$e[namespace][method];
|
|
260
191
|
};
|
|
261
192
|
|
|
193
|
+
var uncurryThis$d = functionUncurryThis;
|
|
194
|
+
|
|
195
|
+
var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
|
|
196
|
+
|
|
262
197
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
263
198
|
|
|
264
199
|
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
265
200
|
|
|
266
|
-
var global$
|
|
201
|
+
var global$d = global$f;
|
|
267
202
|
var userAgent = engineUserAgent;
|
|
268
203
|
|
|
269
|
-
var process = global$
|
|
270
|
-
var Deno = global$
|
|
204
|
+
var process = global$d.process;
|
|
205
|
+
var Deno = global$d.Deno;
|
|
271
206
|
var versions = process && process.versions || Deno && Deno.version;
|
|
272
207
|
var v8 = versions && versions.v8;
|
|
273
208
|
var match, version;
|
|
@@ -294,10 +229,10 @@ var engineV8Version = version;
|
|
|
294
229
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
295
230
|
|
|
296
231
|
var V8_VERSION = engineV8Version;
|
|
297
|
-
var fails$
|
|
232
|
+
var fails$d = fails$h;
|
|
298
233
|
|
|
299
234
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
300
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
235
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
|
|
301
236
|
var symbol = Symbol();
|
|
302
237
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
303
238
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -314,195 +249,180 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
|
314
249
|
&& !Symbol.sham
|
|
315
250
|
&& typeof Symbol.iterator == 'symbol';
|
|
316
251
|
|
|
317
|
-
var
|
|
318
|
-
var
|
|
319
|
-
var
|
|
320
|
-
var uid$1 = uid$2;
|
|
321
|
-
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
252
|
+
var getBuiltIn$2 = getBuiltIn$4;
|
|
253
|
+
var isCallable$e = isCallable$h;
|
|
254
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
322
255
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
323
256
|
|
|
324
|
-
var
|
|
325
|
-
var Symbol$1 = global$a.Symbol;
|
|
326
|
-
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
327
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
257
|
+
var $Object$3 = Object;
|
|
328
258
|
|
|
329
|
-
var
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
} else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
|
|
335
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
336
|
-
} else {
|
|
337
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
338
|
-
}
|
|
339
|
-
} return WellKnownSymbolsStore[name];
|
|
259
|
+
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
260
|
+
return typeof it == 'symbol';
|
|
261
|
+
} : function (it) {
|
|
262
|
+
var $Symbol = getBuiltIn$2('Symbol');
|
|
263
|
+
return isCallable$e($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
|
|
340
264
|
};
|
|
341
265
|
|
|
342
|
-
var
|
|
343
|
-
var $documentAll = documentAll_1;
|
|
344
|
-
|
|
345
|
-
var documentAll = $documentAll.all;
|
|
266
|
+
var $String$3 = String;
|
|
346
267
|
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
268
|
+
var tryToString$1 = function (argument) {
|
|
269
|
+
try {
|
|
270
|
+
return $String$3(argument);
|
|
271
|
+
} catch (error) {
|
|
272
|
+
return 'Object';
|
|
273
|
+
}
|
|
351
274
|
};
|
|
352
275
|
|
|
353
|
-
var
|
|
276
|
+
var isCallable$d = isCallable$h;
|
|
277
|
+
var tryToString = tryToString$1;
|
|
354
278
|
|
|
355
|
-
var $String$3 = String;
|
|
356
279
|
var $TypeError$7 = TypeError;
|
|
357
280
|
|
|
358
|
-
// `Assert:
|
|
359
|
-
var
|
|
360
|
-
if (
|
|
361
|
-
throw $TypeError$7(
|
|
281
|
+
// `Assert: IsCallable(argument) is true`
|
|
282
|
+
var aCallable$2 = function (argument) {
|
|
283
|
+
if (isCallable$d(argument)) return argument;
|
|
284
|
+
throw $TypeError$7(tryToString(argument) + ' is not a function');
|
|
362
285
|
};
|
|
363
286
|
|
|
364
|
-
var
|
|
365
|
-
|
|
366
|
-
var fails$d = fails$h;
|
|
287
|
+
var aCallable$1 = aCallable$2;
|
|
288
|
+
var isNullOrUndefined$1 = isNullOrUndefined$3;
|
|
367
289
|
|
|
368
|
-
//
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
290
|
+
// `GetMethod` abstract operation
|
|
291
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
292
|
+
var getMethod$2 = function (V, P) {
|
|
293
|
+
var func = V[P];
|
|
294
|
+
return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
|
|
295
|
+
};
|
|
373
296
|
|
|
374
|
-
var
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
// V8 ~ Chrome 36-
|
|
378
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
379
|
-
var v8PrototypeDefineBug = DESCRIPTORS$9 && fails$c(function () {
|
|
380
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
381
|
-
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
382
|
-
value: 42,
|
|
383
|
-
writable: false
|
|
384
|
-
}).prototype != 42;
|
|
385
|
-
});
|
|
386
|
-
|
|
387
|
-
var objectDefineProperty = {};
|
|
388
|
-
|
|
389
|
-
var global$9 = global$f;
|
|
390
|
-
var isObject$4 = isObject$6;
|
|
297
|
+
var call$8 = functionCall;
|
|
298
|
+
var isCallable$c = isCallable$h;
|
|
299
|
+
var isObject$5 = isObject$6;
|
|
391
300
|
|
|
392
|
-
var
|
|
393
|
-
// typeof document.createElement is 'object' in old IE
|
|
394
|
-
var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
|
|
301
|
+
var $TypeError$6 = TypeError;
|
|
395
302
|
|
|
396
|
-
|
|
397
|
-
|
|
303
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
304
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
305
|
+
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
306
|
+
var fn, val;
|
|
307
|
+
if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
|
|
308
|
+
if (isCallable$c(fn = input.valueOf) && !isObject$5(val = call$8(fn, input))) return val;
|
|
309
|
+
if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
|
|
310
|
+
throw $TypeError$6("Can't convert object to primitive value");
|
|
398
311
|
};
|
|
399
312
|
|
|
400
|
-
var
|
|
401
|
-
var fails$b = fails$h;
|
|
402
|
-
var createElement = documentCreateElement$2;
|
|
403
|
-
|
|
404
|
-
// Thanks to IE8 for its funny defineProperty
|
|
405
|
-
var ie8DomDefine = !DESCRIPTORS$8 && !fails$b(function () {
|
|
406
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
407
|
-
return Object.defineProperty(createElement('div'), 'a', {
|
|
408
|
-
get: function () { return 7; }
|
|
409
|
-
}).a != 7;
|
|
410
|
-
});
|
|
313
|
+
var shared$4 = {exports: {}};
|
|
411
314
|
|
|
412
|
-
var
|
|
315
|
+
var global$c = global$f;
|
|
413
316
|
|
|
414
|
-
|
|
317
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
318
|
+
var defineProperty$5 = Object.defineProperty;
|
|
415
319
|
|
|
416
|
-
var
|
|
417
|
-
|
|
320
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
321
|
+
try {
|
|
322
|
+
defineProperty$5(global$c, key, { value: value, configurable: true, writable: true });
|
|
323
|
+
} catch (error) {
|
|
324
|
+
global$c[key] = value;
|
|
325
|
+
} return value;
|
|
418
326
|
};
|
|
419
327
|
|
|
420
|
-
var
|
|
328
|
+
var global$b = global$f;
|
|
329
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
421
330
|
|
|
422
|
-
var
|
|
331
|
+
var SHARED = '__core-js_shared__';
|
|
332
|
+
var store$3 = global$b[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
423
333
|
|
|
424
|
-
var
|
|
425
|
-
var isCallable$e = isCallable$h;
|
|
426
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
427
|
-
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
334
|
+
var sharedStore = store$3;
|
|
428
335
|
|
|
429
|
-
var $
|
|
336
|
+
var store$2 = sharedStore;
|
|
430
337
|
|
|
431
|
-
|
|
432
|
-
return
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
338
|
+
(shared$4.exports = function (key, value) {
|
|
339
|
+
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
340
|
+
})('versions', []).push({
|
|
341
|
+
version: '3.26.1',
|
|
342
|
+
mode: 'global',
|
|
343
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
344
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
345
|
+
source: 'https://github.com/zloirock/core-js'
|
|
346
|
+
});
|
|
437
347
|
|
|
438
|
-
var $
|
|
348
|
+
var requireObjectCoercible$2 = requireObjectCoercible$4;
|
|
439
349
|
|
|
440
|
-
var
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
350
|
+
var $Object$2 = Object;
|
|
351
|
+
|
|
352
|
+
// `ToObject` abstract operation
|
|
353
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
354
|
+
var toObject$5 = function (argument) {
|
|
355
|
+
return $Object$2(requireObjectCoercible$2(argument));
|
|
446
356
|
};
|
|
447
357
|
|
|
448
|
-
var
|
|
449
|
-
var
|
|
358
|
+
var uncurryThis$c = functionUncurryThis;
|
|
359
|
+
var toObject$4 = toObject$5;
|
|
450
360
|
|
|
451
|
-
var
|
|
361
|
+
var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
|
|
452
362
|
|
|
453
|
-
// `
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
363
|
+
// `HasOwnProperty` abstract operation
|
|
364
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
365
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
366
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
367
|
+
return hasOwnProperty(toObject$4(it), key);
|
|
457
368
|
};
|
|
458
369
|
|
|
459
|
-
var
|
|
460
|
-
var isNullOrUndefined$1 = isNullOrUndefined$3;
|
|
370
|
+
var uncurryThis$b = functionUncurryThis;
|
|
461
371
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
var
|
|
465
|
-
|
|
466
|
-
|
|
372
|
+
var id = 0;
|
|
373
|
+
var postfix = Math.random();
|
|
374
|
+
var toString$4 = uncurryThis$b(1.0.toString);
|
|
375
|
+
|
|
376
|
+
var uid$2 = function (key) {
|
|
377
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
|
|
467
378
|
};
|
|
468
379
|
|
|
469
|
-
var
|
|
470
|
-
var
|
|
471
|
-
var
|
|
380
|
+
var global$a = global$f;
|
|
381
|
+
var shared$3 = shared$4.exports;
|
|
382
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
383
|
+
var uid$1 = uid$2;
|
|
384
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
385
|
+
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
472
386
|
|
|
473
|
-
var
|
|
387
|
+
var WellKnownSymbolsStore = shared$3('wks');
|
|
388
|
+
var Symbol$1 = global$a.Symbol;
|
|
389
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
390
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
474
391
|
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
392
|
+
var wellKnownSymbol$a = function (name) {
|
|
393
|
+
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
394
|
+
var description = 'Symbol.' + name;
|
|
395
|
+
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
396
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
397
|
+
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
398
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
399
|
+
} else {
|
|
400
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
401
|
+
}
|
|
402
|
+
} return WellKnownSymbolsStore[name];
|
|
483
403
|
};
|
|
484
404
|
|
|
485
405
|
var call$7 = functionCall;
|
|
486
|
-
var isObject$
|
|
406
|
+
var isObject$4 = isObject$6;
|
|
487
407
|
var isSymbol$1 = isSymbol$2;
|
|
488
408
|
var getMethod$1 = getMethod$2;
|
|
489
409
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
490
410
|
var wellKnownSymbol$9 = wellKnownSymbol$a;
|
|
491
411
|
|
|
492
|
-
var $TypeError$
|
|
412
|
+
var $TypeError$5 = TypeError;
|
|
493
413
|
var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
|
|
494
414
|
|
|
495
415
|
// `ToPrimitive` abstract operation
|
|
496
416
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
497
417
|
var toPrimitive$1 = function (input, pref) {
|
|
498
|
-
if (!isObject$
|
|
418
|
+
if (!isObject$4(input) || isSymbol$1(input)) return input;
|
|
499
419
|
var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
|
|
500
420
|
var result;
|
|
501
421
|
if (exoticToPrim) {
|
|
502
422
|
if (pref === undefined) pref = 'default';
|
|
503
423
|
result = call$7(exoticToPrim, input, pref);
|
|
504
|
-
if (!isObject$
|
|
505
|
-
throw $TypeError$
|
|
424
|
+
if (!isObject$4(result) || isSymbol$1(result)) return result;
|
|
425
|
+
throw $TypeError$5("Can't convert object to primitive value");
|
|
506
426
|
}
|
|
507
427
|
if (pref === undefined) pref = 'number';
|
|
508
428
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -518,29 +438,101 @@ var toPropertyKey$2 = function (argument) {
|
|
|
518
438
|
return isSymbol(key) ? key : key + '';
|
|
519
439
|
};
|
|
520
440
|
|
|
521
|
-
var
|
|
441
|
+
var global$9 = global$f;
|
|
442
|
+
var isObject$3 = isObject$6;
|
|
443
|
+
|
|
444
|
+
var document$1 = global$9.document;
|
|
445
|
+
// typeof document.createElement is 'object' in old IE
|
|
446
|
+
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
447
|
+
|
|
448
|
+
var documentCreateElement$2 = function (it) {
|
|
449
|
+
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
var DESCRIPTORS$9 = descriptors;
|
|
453
|
+
var fails$c = fails$h;
|
|
454
|
+
var createElement = documentCreateElement$2;
|
|
455
|
+
|
|
456
|
+
// Thanks to IE8 for its funny defineProperty
|
|
457
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
|
|
458
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
459
|
+
return Object.defineProperty(createElement('div'), 'a', {
|
|
460
|
+
get: function () { return 7; }
|
|
461
|
+
}).a != 7;
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
var DESCRIPTORS$8 = descriptors;
|
|
465
|
+
var call$6 = functionCall;
|
|
466
|
+
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
467
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
468
|
+
var toIndexedObject$4 = toIndexedObject$5;
|
|
469
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
470
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
522
471
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
472
|
+
|
|
473
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
474
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
475
|
+
|
|
476
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
477
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
478
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
479
|
+
O = toIndexedObject$4(O);
|
|
480
|
+
P = toPropertyKey$1(P);
|
|
481
|
+
if (IE8_DOM_DEFINE$1) try {
|
|
482
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
483
|
+
} catch (error) { /* empty */ }
|
|
484
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
var objectDefineProperty = {};
|
|
488
|
+
|
|
489
|
+
var DESCRIPTORS$7 = descriptors;
|
|
490
|
+
var fails$b = fails$h;
|
|
491
|
+
|
|
492
|
+
// V8 ~ Chrome 36-
|
|
493
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
494
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
|
|
495
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
496
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
497
|
+
value: 42,
|
|
498
|
+
writable: false
|
|
499
|
+
}).prototype != 42;
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
var isObject$2 = isObject$6;
|
|
503
|
+
|
|
504
|
+
var $String$2 = String;
|
|
505
|
+
var $TypeError$4 = TypeError;
|
|
506
|
+
|
|
507
|
+
// `Assert: Type(argument) is Object`
|
|
508
|
+
var anObject$8 = function (argument) {
|
|
509
|
+
if (isObject$2(argument)) return argument;
|
|
510
|
+
throw $TypeError$4($String$2(argument) + ' is not an object');
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
var DESCRIPTORS$6 = descriptors;
|
|
514
|
+
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
523
515
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
524
516
|
var anObject$7 = anObject$8;
|
|
525
|
-
var toPropertyKey
|
|
517
|
+
var toPropertyKey = toPropertyKey$2;
|
|
526
518
|
|
|
527
519
|
var $TypeError$3 = TypeError;
|
|
528
520
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
529
521
|
var $defineProperty = Object.defineProperty;
|
|
530
522
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
531
|
-
var $getOwnPropertyDescriptor
|
|
523
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
532
524
|
var ENUMERABLE = 'enumerable';
|
|
533
525
|
var CONFIGURABLE$1 = 'configurable';
|
|
534
526
|
var WRITABLE = 'writable';
|
|
535
527
|
|
|
536
528
|
// `Object.defineProperty` method
|
|
537
529
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
538
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
530
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
539
531
|
anObject$7(O);
|
|
540
|
-
P = toPropertyKey
|
|
532
|
+
P = toPropertyKey(P);
|
|
541
533
|
anObject$7(Attributes);
|
|
542
534
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
543
|
-
var current = $getOwnPropertyDescriptor
|
|
535
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
544
536
|
if (current && current[WRITABLE]) {
|
|
545
537
|
O[P] = Attributes.value;
|
|
546
538
|
Attributes = {
|
|
@@ -552,9 +544,9 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
552
544
|
} return $defineProperty(O, P, Attributes);
|
|
553
545
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
554
546
|
anObject$7(O);
|
|
555
|
-
P = toPropertyKey
|
|
547
|
+
P = toPropertyKey(P);
|
|
556
548
|
anObject$7(Attributes);
|
|
557
|
-
if (IE8_DOM_DEFINE
|
|
549
|
+
if (IE8_DOM_DEFINE) try {
|
|
558
550
|
return $defineProperty(O, P, Attributes);
|
|
559
551
|
} catch (error) { /* empty */ }
|
|
560
552
|
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$3('Accessors not supported');
|
|
@@ -562,31 +554,246 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
562
554
|
return O;
|
|
563
555
|
};
|
|
564
556
|
|
|
565
|
-
var
|
|
566
|
-
var
|
|
557
|
+
var DESCRIPTORS$5 = descriptors;
|
|
558
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
559
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
567
560
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
return (n > 0 ? floor$1 : ceil)(n);
|
|
561
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
562
|
+
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
|
|
563
|
+
} : function (object, key, value) {
|
|
564
|
+
object[key] = value;
|
|
565
|
+
return object;
|
|
574
566
|
};
|
|
575
567
|
|
|
576
|
-
var
|
|
568
|
+
var makeBuiltIn$2 = {exports: {}};
|
|
577
569
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
570
|
+
var DESCRIPTORS$4 = descriptors;
|
|
571
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
572
|
+
|
|
573
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
574
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
575
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
576
|
+
|
|
577
|
+
var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
|
|
578
|
+
// additional protection from minified / mangled / dropped function names
|
|
579
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
580
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
581
|
+
|
|
582
|
+
var functionName = {
|
|
583
|
+
EXISTS: EXISTS,
|
|
584
|
+
PROPER: PROPER,
|
|
585
|
+
CONFIGURABLE: CONFIGURABLE
|
|
584
586
|
};
|
|
585
587
|
|
|
586
|
-
var
|
|
588
|
+
var uncurryThis$a = functionUncurryThis;
|
|
589
|
+
var isCallable$b = isCallable$h;
|
|
590
|
+
var store$1 = sharedStore;
|
|
587
591
|
|
|
588
|
-
var
|
|
589
|
-
|
|
592
|
+
var functionToString = uncurryThis$a(Function.toString);
|
|
593
|
+
|
|
594
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
595
|
+
if (!isCallable$b(store$1.inspectSource)) {
|
|
596
|
+
store$1.inspectSource = function (it) {
|
|
597
|
+
return functionToString(it);
|
|
598
|
+
};
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
var inspectSource$1 = store$1.inspectSource;
|
|
602
|
+
|
|
603
|
+
var global$8 = global$f;
|
|
604
|
+
var isCallable$a = isCallable$h;
|
|
605
|
+
|
|
606
|
+
var WeakMap$1 = global$8.WeakMap;
|
|
607
|
+
|
|
608
|
+
var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
609
|
+
|
|
610
|
+
var shared$2 = shared$4.exports;
|
|
611
|
+
var uid = uid$2;
|
|
612
|
+
|
|
613
|
+
var keys = shared$2('keys');
|
|
614
|
+
|
|
615
|
+
var sharedKey$3 = function (key) {
|
|
616
|
+
return keys[key] || (keys[key] = uid(key));
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
var hiddenKeys$4 = {};
|
|
620
|
+
|
|
621
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
622
|
+
var global$7 = global$f;
|
|
623
|
+
var isObject$1 = isObject$6;
|
|
624
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
625
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
626
|
+
var shared$1 = sharedStore;
|
|
627
|
+
var sharedKey$2 = sharedKey$3;
|
|
628
|
+
var hiddenKeys$3 = hiddenKeys$4;
|
|
629
|
+
|
|
630
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
631
|
+
var TypeError$1 = global$7.TypeError;
|
|
632
|
+
var WeakMap = global$7.WeakMap;
|
|
633
|
+
var set, get, has;
|
|
634
|
+
|
|
635
|
+
var enforce = function (it) {
|
|
636
|
+
return has(it) ? get(it) : set(it, {});
|
|
637
|
+
};
|
|
638
|
+
|
|
639
|
+
var getterFor = function (TYPE) {
|
|
640
|
+
return function (it) {
|
|
641
|
+
var state;
|
|
642
|
+
if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
|
|
643
|
+
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
644
|
+
} return state;
|
|
645
|
+
};
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
649
|
+
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
650
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
651
|
+
store.get = store.get;
|
|
652
|
+
store.has = store.has;
|
|
653
|
+
store.set = store.set;
|
|
654
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
655
|
+
set = function (it, metadata) {
|
|
656
|
+
if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
657
|
+
metadata.facade = it;
|
|
658
|
+
store.set(it, metadata);
|
|
659
|
+
return metadata;
|
|
660
|
+
};
|
|
661
|
+
get = function (it) {
|
|
662
|
+
return store.get(it) || {};
|
|
663
|
+
};
|
|
664
|
+
has = function (it) {
|
|
665
|
+
return store.has(it);
|
|
666
|
+
};
|
|
667
|
+
} else {
|
|
668
|
+
var STATE = sharedKey$2('state');
|
|
669
|
+
hiddenKeys$3[STATE] = true;
|
|
670
|
+
set = function (it, metadata) {
|
|
671
|
+
if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
672
|
+
metadata.facade = it;
|
|
673
|
+
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
674
|
+
return metadata;
|
|
675
|
+
};
|
|
676
|
+
get = function (it) {
|
|
677
|
+
return hasOwn$5(it, STATE) ? it[STATE] : {};
|
|
678
|
+
};
|
|
679
|
+
has = function (it) {
|
|
680
|
+
return hasOwn$5(it, STATE);
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
var internalState = {
|
|
685
|
+
set: set,
|
|
686
|
+
get: get,
|
|
687
|
+
has: has,
|
|
688
|
+
enforce: enforce,
|
|
689
|
+
getterFor: getterFor
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
var fails$a = fails$h;
|
|
693
|
+
var isCallable$9 = isCallable$h;
|
|
694
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
695
|
+
var DESCRIPTORS$3 = descriptors;
|
|
696
|
+
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
697
|
+
var inspectSource = inspectSource$1;
|
|
698
|
+
var InternalStateModule$1 = internalState;
|
|
699
|
+
|
|
700
|
+
var enforceInternalState = InternalStateModule$1.enforce;
|
|
701
|
+
var getInternalState$2 = InternalStateModule$1.get;
|
|
702
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
703
|
+
var defineProperty$4 = Object.defineProperty;
|
|
704
|
+
|
|
705
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
|
|
706
|
+
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
var TEMPLATE = String(String).split('String');
|
|
710
|
+
|
|
711
|
+
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
712
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
713
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
714
|
+
}
|
|
715
|
+
if (options && options.getter) name = 'get ' + name;
|
|
716
|
+
if (options && options.setter) name = 'set ' + name;
|
|
717
|
+
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
718
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
719
|
+
else value.name = name;
|
|
720
|
+
}
|
|
721
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
722
|
+
defineProperty$4(value, 'length', { value: options.arity });
|
|
723
|
+
}
|
|
724
|
+
try {
|
|
725
|
+
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
726
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
|
|
727
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
728
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
729
|
+
} catch (error) { /* empty */ }
|
|
730
|
+
var state = enforceInternalState(value);
|
|
731
|
+
if (!hasOwn$4(state, 'source')) {
|
|
732
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
733
|
+
} return value;
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
737
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
738
|
+
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
739
|
+
return isCallable$9(this) && getInternalState$2(this).source || inspectSource(this);
|
|
740
|
+
}, 'toString');
|
|
741
|
+
|
|
742
|
+
var isCallable$8 = isCallable$h;
|
|
743
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
744
|
+
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
745
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
746
|
+
|
|
747
|
+
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
748
|
+
if (!options) options = {};
|
|
749
|
+
var simple = options.enumerable;
|
|
750
|
+
var name = options.name !== undefined ? options.name : key;
|
|
751
|
+
if (isCallable$8(value)) makeBuiltIn(value, name, options);
|
|
752
|
+
if (options.global) {
|
|
753
|
+
if (simple) O[key] = value;
|
|
754
|
+
else defineGlobalProperty$1(key, value);
|
|
755
|
+
} else {
|
|
756
|
+
try {
|
|
757
|
+
if (!options.unsafe) delete O[key];
|
|
758
|
+
else if (O[key]) simple = true;
|
|
759
|
+
} catch (error) { /* empty */ }
|
|
760
|
+
if (simple) O[key] = value;
|
|
761
|
+
else definePropertyModule$2.f(O, key, {
|
|
762
|
+
value: value,
|
|
763
|
+
enumerable: false,
|
|
764
|
+
configurable: !options.nonConfigurable,
|
|
765
|
+
writable: !options.nonWritable
|
|
766
|
+
});
|
|
767
|
+
} return O;
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
var objectGetOwnPropertyNames = {};
|
|
771
|
+
|
|
772
|
+
var ceil = Math.ceil;
|
|
773
|
+
var floor$1 = Math.floor;
|
|
774
|
+
|
|
775
|
+
// `Math.trunc` method
|
|
776
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
777
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
778
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
779
|
+
var n = +x;
|
|
780
|
+
return (n > 0 ? floor$1 : ceil)(n);
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
var trunc = mathTrunc;
|
|
784
|
+
|
|
785
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
786
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
787
|
+
var toIntegerOrInfinity$4 = function (argument) {
|
|
788
|
+
var number = +argument;
|
|
789
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
790
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
794
|
+
|
|
795
|
+
var max$1 = Math.max;
|
|
796
|
+
var min$2 = Math.min;
|
|
590
797
|
|
|
591
798
|
// Helper for a popular repeating case of the spec:
|
|
592
799
|
// Let integer be ? ToInteger(index).
|
|
@@ -614,14 +821,14 @@ var lengthOfArrayLike$2 = function (obj) {
|
|
|
614
821
|
return toLength$1(obj.length);
|
|
615
822
|
};
|
|
616
823
|
|
|
617
|
-
var toIndexedObject$
|
|
824
|
+
var toIndexedObject$3 = toIndexedObject$5;
|
|
618
825
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
619
826
|
var lengthOfArrayLike$1 = lengthOfArrayLike$2;
|
|
620
827
|
|
|
621
828
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
622
829
|
var createMethod$2 = function (IS_INCLUDES) {
|
|
623
830
|
return function ($this, el, fromIndex) {
|
|
624
|
-
var O = toIndexedObject$
|
|
831
|
+
var O = toIndexedObject$3($this);
|
|
625
832
|
var length = lengthOfArrayLike$1(O);
|
|
626
833
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
627
834
|
var value;
|
|
@@ -647,24 +854,22 @@ var arrayIncludes = {
|
|
|
647
854
|
indexOf: createMethod$2(false)
|
|
648
855
|
};
|
|
649
856
|
|
|
650
|
-
var
|
|
651
|
-
|
|
652
|
-
var
|
|
653
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
654
|
-
var toIndexedObject$3 = toIndexedObject$5;
|
|
857
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
858
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
859
|
+
var toIndexedObject$2 = toIndexedObject$5;
|
|
655
860
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
656
|
-
var hiddenKeys$
|
|
861
|
+
var hiddenKeys$2 = hiddenKeys$4;
|
|
657
862
|
|
|
658
|
-
var push$1 = uncurryThis$
|
|
863
|
+
var push$1 = uncurryThis$9([].push);
|
|
659
864
|
|
|
660
865
|
var objectKeysInternal = function (object, names) {
|
|
661
|
-
var O = toIndexedObject$
|
|
866
|
+
var O = toIndexedObject$2(object);
|
|
662
867
|
var i = 0;
|
|
663
868
|
var result = [];
|
|
664
869
|
var key;
|
|
665
|
-
for (key in O) !hasOwn$
|
|
870
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
|
|
666
871
|
// Don't enum bug & hidden keys
|
|
667
|
-
while (names.length > i) if (hasOwn$
|
|
872
|
+
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
668
873
|
~indexOf$1(result, key) || push$1(result, key);
|
|
669
874
|
}
|
|
670
875
|
return result;
|
|
@@ -684,539 +889,408 @@ var enumBugKeys$3 = [
|
|
|
684
889
|
var internalObjectKeys$1 = objectKeysInternal;
|
|
685
890
|
var enumBugKeys$2 = enumBugKeys$3;
|
|
686
891
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
//
|
|
690
|
-
|
|
691
|
-
|
|
892
|
+
var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
893
|
+
|
|
894
|
+
// `Object.getOwnPropertyNames` method
|
|
895
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
896
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
897
|
+
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
898
|
+
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
692
899
|
};
|
|
693
900
|
|
|
694
|
-
var
|
|
695
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
696
|
-
var definePropertyModule$3 = objectDefineProperty;
|
|
697
|
-
var anObject$6 = anObject$8;
|
|
698
|
-
var toIndexedObject$2 = toIndexedObject$5;
|
|
699
|
-
var objectKeys$1 = objectKeys$2;
|
|
901
|
+
var objectGetOwnPropertySymbols = {};
|
|
700
902
|
|
|
701
|
-
//
|
|
702
|
-
|
|
703
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
704
|
-
objectDefineProperties.f = DESCRIPTORS$6 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
705
|
-
anObject$6(O);
|
|
706
|
-
var props = toIndexedObject$2(Properties);
|
|
707
|
-
var keys = objectKeys$1(Properties);
|
|
708
|
-
var length = keys.length;
|
|
709
|
-
var index = 0;
|
|
710
|
-
var key;
|
|
711
|
-
while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
|
|
712
|
-
return O;
|
|
713
|
-
};
|
|
903
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
904
|
+
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
714
905
|
|
|
715
906
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
907
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
908
|
+
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
909
|
+
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
910
|
+
var anObject$6 = anObject$8;
|
|
716
911
|
|
|
717
|
-
var
|
|
912
|
+
var concat$2 = uncurryThis$8([].concat);
|
|
718
913
|
|
|
719
|
-
|
|
720
|
-
var
|
|
914
|
+
// all object keys, includes non-enumerable and symbols
|
|
915
|
+
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
916
|
+
var keys = getOwnPropertyNamesModule.f(anObject$6(it));
|
|
917
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
918
|
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
919
|
+
};
|
|
721
920
|
|
|
722
|
-
var
|
|
921
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
922
|
+
var ownKeys = ownKeys$1;
|
|
923
|
+
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
924
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
723
925
|
|
|
724
|
-
var
|
|
725
|
-
|
|
926
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
927
|
+
var keys = ownKeys(source);
|
|
928
|
+
var defineProperty = definePropertyModule$1.f;
|
|
929
|
+
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
930
|
+
for (var i = 0; i < keys.length; i++) {
|
|
931
|
+
var key = keys[i];
|
|
932
|
+
if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
|
|
933
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
934
|
+
}
|
|
935
|
+
}
|
|
726
936
|
};
|
|
727
937
|
|
|
728
|
-
|
|
938
|
+
var fails$9 = fails$h;
|
|
939
|
+
var isCallable$7 = isCallable$h;
|
|
729
940
|
|
|
730
|
-
var
|
|
731
|
-
var definePropertiesModule = objectDefineProperties;
|
|
732
|
-
var enumBugKeys$1 = enumBugKeys$3;
|
|
733
|
-
var hiddenKeys$2 = hiddenKeys$4;
|
|
734
|
-
var html = html$1;
|
|
735
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
736
|
-
var sharedKey$2 = sharedKey$3;
|
|
941
|
+
var replacement = /#|\.prototype\./;
|
|
737
942
|
|
|
738
|
-
var
|
|
739
|
-
var
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
745
|
-
|
|
746
|
-
var scriptTag = function (content) {
|
|
747
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
748
|
-
};
|
|
749
|
-
|
|
750
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
751
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
752
|
-
activeXDocument.write(scriptTag(''));
|
|
753
|
-
activeXDocument.close();
|
|
754
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
755
|
-
activeXDocument = null; // avoid memory leak
|
|
756
|
-
return temp;
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
760
|
-
var NullProtoObjectViaIFrame = function () {
|
|
761
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
762
|
-
var iframe = documentCreateElement$1('iframe');
|
|
763
|
-
var JS = 'java' + SCRIPT + ':';
|
|
764
|
-
var iframeDocument;
|
|
765
|
-
iframe.style.display = 'none';
|
|
766
|
-
html.appendChild(iframe);
|
|
767
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
768
|
-
iframe.src = String(JS);
|
|
769
|
-
iframeDocument = iframe.contentWindow.document;
|
|
770
|
-
iframeDocument.open();
|
|
771
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
772
|
-
iframeDocument.close();
|
|
773
|
-
return iframeDocument.F;
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
// Check for document.domain and active x support
|
|
777
|
-
// No need to use active x approach when document.domain is not set
|
|
778
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
779
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
780
|
-
// avoid IE GC bug
|
|
781
|
-
var activeXDocument;
|
|
782
|
-
var NullProtoObject = function () {
|
|
783
|
-
try {
|
|
784
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
785
|
-
} catch (error) { /* ignore */ }
|
|
786
|
-
NullProtoObject = typeof document != 'undefined'
|
|
787
|
-
? document.domain && activeXDocument
|
|
788
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
789
|
-
: NullProtoObjectViaIFrame()
|
|
790
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
791
|
-
var length = enumBugKeys$1.length;
|
|
792
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
|
|
793
|
-
return NullProtoObject();
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
hiddenKeys$2[IE_PROTO$1] = true;
|
|
797
|
-
|
|
798
|
-
// `Object.create` method
|
|
799
|
-
// https://tc39.es/ecma262/#sec-object.create
|
|
800
|
-
// eslint-disable-next-line es/no-object-create -- safe
|
|
801
|
-
var objectCreate = Object.create || function create(O, Properties) {
|
|
802
|
-
var result;
|
|
803
|
-
if (O !== null) {
|
|
804
|
-
EmptyConstructor[PROTOTYPE] = anObject$5(O);
|
|
805
|
-
result = new EmptyConstructor();
|
|
806
|
-
EmptyConstructor[PROTOTYPE] = null;
|
|
807
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
808
|
-
result[IE_PROTO$1] = O;
|
|
809
|
-
} else result = NullProtoObject();
|
|
810
|
-
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
811
|
-
};
|
|
812
|
-
|
|
813
|
-
var wellKnownSymbol$8 = wellKnownSymbol$a;
|
|
814
|
-
var create$2 = objectCreate;
|
|
815
|
-
var defineProperty$4 = objectDefineProperty.f;
|
|
816
|
-
|
|
817
|
-
var UNSCOPABLES = wellKnownSymbol$8('unscopables');
|
|
818
|
-
var ArrayPrototype = Array.prototype;
|
|
819
|
-
|
|
820
|
-
// Array.prototype[@@unscopables]
|
|
821
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
822
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
823
|
-
defineProperty$4(ArrayPrototype, UNSCOPABLES, {
|
|
824
|
-
configurable: true,
|
|
825
|
-
value: create$2(null)
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
// add a key to Array.prototype[@@unscopables]
|
|
830
|
-
var addToUnscopables$1 = function (key) {
|
|
831
|
-
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
var iterators = {};
|
|
835
|
-
|
|
836
|
-
var global$8 = global$f;
|
|
837
|
-
var isCallable$b = isCallable$h;
|
|
838
|
-
|
|
839
|
-
var WeakMap$1 = global$8.WeakMap;
|
|
840
|
-
|
|
841
|
-
var weakMapBasicDetection = isCallable$b(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
842
|
-
|
|
843
|
-
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
844
|
-
return {
|
|
845
|
-
enumerable: !(bitmap & 1),
|
|
846
|
-
configurable: !(bitmap & 2),
|
|
847
|
-
writable: !(bitmap & 4),
|
|
848
|
-
value: value
|
|
849
|
-
};
|
|
943
|
+
var isForced$1 = function (feature, detection) {
|
|
944
|
+
var value = data[normalize(feature)];
|
|
945
|
+
return value == POLYFILL ? true
|
|
946
|
+
: value == NATIVE ? false
|
|
947
|
+
: isCallable$7(detection) ? fails$9(detection)
|
|
948
|
+
: !!detection;
|
|
850
949
|
};
|
|
851
950
|
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
855
|
-
|
|
856
|
-
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
857
|
-
return definePropertyModule$2.f(object, key, createPropertyDescriptor$2(1, value));
|
|
858
|
-
} : function (object, key, value) {
|
|
859
|
-
object[key] = value;
|
|
860
|
-
return object;
|
|
951
|
+
var normalize = isForced$1.normalize = function (string) {
|
|
952
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
861
953
|
};
|
|
862
954
|
|
|
863
|
-
var
|
|
864
|
-
var
|
|
865
|
-
var
|
|
866
|
-
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
867
|
-
var hasOwn$6 = hasOwnProperty_1;
|
|
868
|
-
var shared$1 = sharedStore;
|
|
869
|
-
var sharedKey$1 = sharedKey$3;
|
|
870
|
-
var hiddenKeys$1 = hiddenKeys$4;
|
|
955
|
+
var data = isForced$1.data = {};
|
|
956
|
+
var NATIVE = isForced$1.NATIVE = 'N';
|
|
957
|
+
var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
871
958
|
|
|
872
|
-
var
|
|
873
|
-
var TypeError$1 = global$7.TypeError;
|
|
874
|
-
var WeakMap = global$7.WeakMap;
|
|
875
|
-
var set, get, has;
|
|
959
|
+
var isForced_1 = isForced$1;
|
|
876
960
|
|
|
877
|
-
var
|
|
878
|
-
|
|
879
|
-
|
|
961
|
+
var global$6 = global$f;
|
|
962
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
963
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
964
|
+
var defineBuiltIn$3 = defineBuiltIn$4;
|
|
965
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
966
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
967
|
+
var isForced = isForced_1;
|
|
880
968
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
969
|
+
/*
|
|
970
|
+
options.target - name of the target object
|
|
971
|
+
options.global - target is the global object
|
|
972
|
+
options.stat - export as static methods of target
|
|
973
|
+
options.proto - export as prototype methods of target
|
|
974
|
+
options.real - real prototype method for the `pure` version
|
|
975
|
+
options.forced - export even if the native feature is available
|
|
976
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
977
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
978
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
979
|
+
options.sham - add a flag to not completely full polyfills
|
|
980
|
+
options.enumerable - export as enumerable property
|
|
981
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
982
|
+
options.name - the .name of the function if it does not match the key
|
|
983
|
+
*/
|
|
984
|
+
var _export = function (options, source) {
|
|
985
|
+
var TARGET = options.target;
|
|
986
|
+
var GLOBAL = options.global;
|
|
987
|
+
var STATIC = options.stat;
|
|
988
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
989
|
+
if (GLOBAL) {
|
|
990
|
+
target = global$6;
|
|
991
|
+
} else if (STATIC) {
|
|
992
|
+
target = global$6[TARGET] || defineGlobalProperty(TARGET, {});
|
|
993
|
+
} else {
|
|
994
|
+
target = (global$6[TARGET] || {}).prototype;
|
|
995
|
+
}
|
|
996
|
+
if (target) for (key in source) {
|
|
997
|
+
sourceProperty = source[key];
|
|
998
|
+
if (options.dontCallGetSet) {
|
|
999
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1000
|
+
targetProperty = descriptor && descriptor.value;
|
|
1001
|
+
} else targetProperty = target[key];
|
|
1002
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1003
|
+
// contained in target
|
|
1004
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
1005
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1006
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1007
|
+
}
|
|
1008
|
+
// add a flag to not completely full polyfills
|
|
1009
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1010
|
+
createNonEnumerableProperty$3(sourceProperty, 'sham', true);
|
|
1011
|
+
}
|
|
1012
|
+
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1013
|
+
}
|
|
888
1014
|
};
|
|
889
1015
|
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
893
|
-
store$1.get = store$1.get;
|
|
894
|
-
store$1.has = store$1.has;
|
|
895
|
-
store$1.set = store$1.set;
|
|
896
|
-
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
897
|
-
set = function (it, metadata) {
|
|
898
|
-
if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
899
|
-
metadata.facade = it;
|
|
900
|
-
store$1.set(it, metadata);
|
|
901
|
-
return metadata;
|
|
902
|
-
};
|
|
903
|
-
get = function (it) {
|
|
904
|
-
return store$1.get(it) || {};
|
|
905
|
-
};
|
|
906
|
-
has = function (it) {
|
|
907
|
-
return store$1.has(it);
|
|
908
|
-
};
|
|
909
|
-
} else {
|
|
910
|
-
var STATE = sharedKey$1('state');
|
|
911
|
-
hiddenKeys$1[STATE] = true;
|
|
912
|
-
set = function (it, metadata) {
|
|
913
|
-
if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
914
|
-
metadata.facade = it;
|
|
915
|
-
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
916
|
-
return metadata;
|
|
917
|
-
};
|
|
918
|
-
get = function (it) {
|
|
919
|
-
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
920
|
-
};
|
|
921
|
-
has = function (it) {
|
|
922
|
-
return hasOwn$6(it, STATE);
|
|
923
|
-
};
|
|
924
|
-
}
|
|
1016
|
+
var internalObjectKeys = objectKeysInternal;
|
|
1017
|
+
var enumBugKeys$1 = enumBugKeys$3;
|
|
925
1018
|
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
getterFor: getterFor
|
|
1019
|
+
// `Object.keys` method
|
|
1020
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
1021
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
1022
|
+
var objectKeys$2 = Object.keys || function keys(O) {
|
|
1023
|
+
return internalObjectKeys(O, enumBugKeys$1);
|
|
932
1024
|
};
|
|
933
1025
|
|
|
934
|
-
var
|
|
1026
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1027
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1028
|
+
var call$5 = functionCall;
|
|
1029
|
+
var fails$8 = fails$h;
|
|
1030
|
+
var objectKeys$1 = objectKeys$2;
|
|
1031
|
+
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1032
|
+
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1033
|
+
var toObject$3 = toObject$5;
|
|
1034
|
+
var IndexedObject$1 = indexedObject;
|
|
935
1035
|
|
|
936
|
-
|
|
1036
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1037
|
+
var $assign = Object.assign;
|
|
1038
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1039
|
+
var defineProperty$3 = Object.defineProperty;
|
|
1040
|
+
var concat$1 = uncurryThis$7([].concat);
|
|
937
1041
|
|
|
938
|
-
|
|
939
|
-
//
|
|
940
|
-
var
|
|
1042
|
+
// `Object.assign` method
|
|
1043
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1044
|
+
var objectAssign = !$assign || fails$8(function () {
|
|
1045
|
+
// should have correct order of operations (Edge bug)
|
|
1046
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1047
|
+
enumerable: true,
|
|
1048
|
+
get: function () {
|
|
1049
|
+
defineProperty$3(this, 'b', {
|
|
1050
|
+
value: 3,
|
|
1051
|
+
enumerable: false
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
}), { b: 2 })).b !== 1) return true;
|
|
1055
|
+
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1056
|
+
var A = {};
|
|
1057
|
+
var B = {};
|
|
1058
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1059
|
+
var symbol = Symbol();
|
|
1060
|
+
var alphabet = 'abcdefghijklmnopqrst';
|
|
1061
|
+
A[symbol] = 7;
|
|
1062
|
+
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1063
|
+
return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
|
|
1064
|
+
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1065
|
+
var T = toObject$3(target);
|
|
1066
|
+
var argumentsLength = arguments.length;
|
|
1067
|
+
var index = 1;
|
|
1068
|
+
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1069
|
+
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1070
|
+
while (argumentsLength > index) {
|
|
1071
|
+
var S = IndexedObject$1(arguments[index++]);
|
|
1072
|
+
var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
|
|
1073
|
+
var length = keys.length;
|
|
1074
|
+
var j = 0;
|
|
1075
|
+
var key;
|
|
1076
|
+
while (length > j) {
|
|
1077
|
+
key = keys[j++];
|
|
1078
|
+
if (!DESCRIPTORS$2 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1079
|
+
}
|
|
1080
|
+
} return T;
|
|
1081
|
+
} : $assign;
|
|
941
1082
|
|
|
942
|
-
|
|
943
|
-
var
|
|
1083
|
+
var $$3 = _export;
|
|
1084
|
+
var assign = objectAssign;
|
|
944
1085
|
|
|
945
|
-
// `Object.
|
|
946
|
-
// https://tc39.es/ecma262/#sec-object.
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
}
|
|
1086
|
+
// `Object.assign` method
|
|
1087
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
1088
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1089
|
+
$$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1090
|
+
assign: assign
|
|
1091
|
+
});
|
|
951
1092
|
|
|
952
|
-
|
|
953
|
-
var call$6 = functionCall;
|
|
954
|
-
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
955
|
-
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
956
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
957
|
-
var toPropertyKey = toPropertyKey$2;
|
|
958
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
959
|
-
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
1093
|
+
const NinetailedContext = /*#__PURE__*/createContext(undefined);
|
|
960
1094
|
|
|
961
|
-
|
|
962
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
1095
|
+
const ExperimentsContext = /*#__PURE__*/createContext(undefined);
|
|
963
1096
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1097
|
+
const ExperimentsProvider = ({
|
|
1098
|
+
experiments,
|
|
1099
|
+
children
|
|
1100
|
+
}) => {
|
|
1101
|
+
return jsx(ExperimentsContext.Provider, Object.assign({
|
|
1102
|
+
value: {
|
|
1103
|
+
experiments
|
|
1104
|
+
}
|
|
1105
|
+
}, {
|
|
1106
|
+
children: children
|
|
1107
|
+
}));
|
|
973
1108
|
};
|
|
974
1109
|
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1110
|
+
const NinetailedProvider = ({
|
|
1111
|
+
children,
|
|
1112
|
+
clientId,
|
|
1113
|
+
experiments: _experiments = [],
|
|
1114
|
+
environment,
|
|
1115
|
+
preview,
|
|
1116
|
+
url,
|
|
1117
|
+
profile,
|
|
1118
|
+
locale,
|
|
1119
|
+
requestTimeout,
|
|
1120
|
+
plugins: _plugins = [],
|
|
1121
|
+
onLog,
|
|
1122
|
+
onError
|
|
1123
|
+
}) => {
|
|
1124
|
+
const ninetailed = useMemo(() => new Ninetailed({
|
|
1125
|
+
clientId,
|
|
1126
|
+
environment,
|
|
1127
|
+
preview
|
|
1128
|
+
}, {
|
|
1129
|
+
url,
|
|
1130
|
+
plugins: _plugins,
|
|
1131
|
+
profile,
|
|
1132
|
+
locale,
|
|
1133
|
+
requestTimeout,
|
|
1134
|
+
onLog,
|
|
1135
|
+
onError
|
|
1136
|
+
}), []);
|
|
1137
|
+
return jsx(NinetailedContext.Provider, Object.assign({
|
|
1138
|
+
value: ninetailed
|
|
1139
|
+
}, {
|
|
1140
|
+
children: jsx(ExperimentsProvider, Object.assign({
|
|
1141
|
+
experiments: _experiments
|
|
1142
|
+
}, {
|
|
1143
|
+
children: children
|
|
1144
|
+
}))
|
|
1145
|
+
}));
|
|
993
1146
|
};
|
|
994
1147
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
var functionToString = uncurryThis$9(Function.toString);
|
|
1000
|
-
|
|
1001
|
-
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
1002
|
-
if (!isCallable$a(store.inspectSource)) {
|
|
1003
|
-
store.inspectSource = function (it) {
|
|
1004
|
-
return functionToString(it);
|
|
1005
|
-
};
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
var inspectSource$1 = store.inspectSource;
|
|
1009
|
-
|
|
1010
|
-
var fails$a = fails$h;
|
|
1011
|
-
var isCallable$9 = isCallable$h;
|
|
1012
|
-
var hasOwn$3 = hasOwnProperty_1;
|
|
1013
|
-
var DESCRIPTORS$2 = descriptors;
|
|
1014
|
-
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
1015
|
-
var inspectSource = inspectSource$1;
|
|
1016
|
-
var InternalStateModule$1 = internalState;
|
|
1017
|
-
|
|
1018
|
-
var enforceInternalState = InternalStateModule$1.enforce;
|
|
1019
|
-
var getInternalState$2 = InternalStateModule$1.get;
|
|
1020
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
1021
|
-
var defineProperty$3 = Object.defineProperty;
|
|
1022
|
-
|
|
1023
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$2 && !fails$a(function () {
|
|
1024
|
-
return defineProperty$3(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
1025
|
-
});
|
|
1026
|
-
|
|
1027
|
-
var TEMPLATE = String(String).split('String');
|
|
1028
|
-
|
|
1029
|
-
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
1030
|
-
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
1031
|
-
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
1032
|
-
}
|
|
1033
|
-
if (options && options.getter) name = 'get ' + name;
|
|
1034
|
-
if (options && options.setter) name = 'set ' + name;
|
|
1035
|
-
if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
1036
|
-
if (DESCRIPTORS$2) defineProperty$3(value, 'name', { value: name, configurable: true });
|
|
1037
|
-
else value.name = name;
|
|
1038
|
-
}
|
|
1039
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$3(options, 'arity') && value.length !== options.arity) {
|
|
1040
|
-
defineProperty$3(value, 'length', { value: options.arity });
|
|
1148
|
+
const useNinetailed = () => {
|
|
1149
|
+
const ninetailed = useContext(NinetailedContext);
|
|
1150
|
+
if (ninetailed === undefined) {
|
|
1151
|
+
throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
|
|
1041
1152
|
}
|
|
1042
|
-
|
|
1043
|
-
if (options && hasOwn$3(options, 'constructor') && options.constructor) {
|
|
1044
|
-
if (DESCRIPTORS$2) defineProperty$3(value, 'prototype', { writable: false });
|
|
1045
|
-
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
1046
|
-
} else if (value.prototype) value.prototype = undefined;
|
|
1047
|
-
} catch (error) { /* empty */ }
|
|
1048
|
-
var state = enforceInternalState(value);
|
|
1049
|
-
if (!hasOwn$3(state, 'source')) {
|
|
1050
|
-
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
1051
|
-
} return value;
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
1055
|
-
// eslint-disable-next-line no-extend-native -- required
|
|
1056
|
-
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
1057
|
-
return isCallable$9(this) && getInternalState$2(this).source || inspectSource(this);
|
|
1058
|
-
}, 'toString');
|
|
1059
|
-
|
|
1060
|
-
var isCallable$8 = isCallable$h;
|
|
1061
|
-
var definePropertyModule$1 = objectDefineProperty;
|
|
1062
|
-
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
1063
|
-
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
1064
|
-
|
|
1065
|
-
var defineBuiltIn$4 = function (O, key, value, options) {
|
|
1066
|
-
if (!options) options = {};
|
|
1067
|
-
var simple = options.enumerable;
|
|
1068
|
-
var name = options.name !== undefined ? options.name : key;
|
|
1069
|
-
if (isCallable$8(value)) makeBuiltIn(value, name, options);
|
|
1070
|
-
if (options.global) {
|
|
1071
|
-
if (simple) O[key] = value;
|
|
1072
|
-
else defineGlobalProperty$1(key, value);
|
|
1073
|
-
} else {
|
|
1074
|
-
try {
|
|
1075
|
-
if (!options.unsafe) delete O[key];
|
|
1076
|
-
else if (O[key]) simple = true;
|
|
1077
|
-
} catch (error) { /* empty */ }
|
|
1078
|
-
if (simple) O[key] = value;
|
|
1079
|
-
else definePropertyModule$1.f(O, key, {
|
|
1080
|
-
value: value,
|
|
1081
|
-
enumerable: false,
|
|
1082
|
-
configurable: !options.nonConfigurable,
|
|
1083
|
-
writable: !options.nonWritable
|
|
1084
|
-
});
|
|
1085
|
-
} return O;
|
|
1153
|
+
return ninetailed;
|
|
1086
1154
|
};
|
|
1087
1155
|
|
|
1088
|
-
var
|
|
1089
|
-
|
|
1090
|
-
var internalObjectKeys = objectKeysInternal;
|
|
1091
|
-
var enumBugKeys = enumBugKeys$3;
|
|
1156
|
+
var objectDefineProperties = {};
|
|
1092
1157
|
|
|
1093
|
-
var
|
|
1158
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1159
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1160
|
+
var definePropertyModule = objectDefineProperty;
|
|
1161
|
+
var anObject$5 = anObject$8;
|
|
1162
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
1163
|
+
var objectKeys = objectKeys$2;
|
|
1094
1164
|
|
|
1095
|
-
// `Object.
|
|
1096
|
-
// https://tc39.es/ecma262/#sec-object.
|
|
1097
|
-
// eslint-disable-next-line es/no-object-
|
|
1098
|
-
|
|
1099
|
-
|
|
1165
|
+
// `Object.defineProperties` method
|
|
1166
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1167
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1168
|
+
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1169
|
+
anObject$5(O);
|
|
1170
|
+
var props = toIndexedObject$1(Properties);
|
|
1171
|
+
var keys = objectKeys(Properties);
|
|
1172
|
+
var length = keys.length;
|
|
1173
|
+
var index = 0;
|
|
1174
|
+
var key;
|
|
1175
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1176
|
+
return O;
|
|
1100
1177
|
};
|
|
1101
1178
|
|
|
1102
|
-
var objectGetOwnPropertySymbols = {};
|
|
1103
|
-
|
|
1104
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1105
|
-
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1106
|
-
|
|
1107
1179
|
var getBuiltIn = getBuiltIn$4;
|
|
1108
|
-
var uncurryThis$8 = functionUncurryThis;
|
|
1109
|
-
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1110
|
-
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1111
|
-
var anObject$4 = anObject$8;
|
|
1112
1180
|
|
|
1113
|
-
var
|
|
1181
|
+
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1114
1182
|
|
|
1115
|
-
|
|
1116
|
-
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1117
|
-
var keys = getOwnPropertyNamesModule.f(anObject$4(it));
|
|
1118
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1119
|
-
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
1120
|
-
};
|
|
1183
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
1121
1184
|
|
|
1122
|
-
var
|
|
1123
|
-
var
|
|
1124
|
-
var
|
|
1125
|
-
var
|
|
1185
|
+
var anObject$4 = anObject$8;
|
|
1186
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1187
|
+
var enumBugKeys = enumBugKeys$3;
|
|
1188
|
+
var hiddenKeys = hiddenKeys$4;
|
|
1189
|
+
var html = html$1;
|
|
1190
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
1191
|
+
var sharedKey$1 = sharedKey$3;
|
|
1126
1192
|
|
|
1127
|
-
var
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1193
|
+
var GT = '>';
|
|
1194
|
+
var LT = '<';
|
|
1195
|
+
var PROTOTYPE = 'prototype';
|
|
1196
|
+
var SCRIPT = 'script';
|
|
1197
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
1198
|
+
|
|
1199
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
1200
|
+
|
|
1201
|
+
var scriptTag = function (content) {
|
|
1202
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
1137
1203
|
};
|
|
1138
1204
|
|
|
1139
|
-
|
|
1140
|
-
var
|
|
1205
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
1206
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
1207
|
+
activeXDocument.write(scriptTag(''));
|
|
1208
|
+
activeXDocument.close();
|
|
1209
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
1210
|
+
activeXDocument = null; // avoid memory leak
|
|
1211
|
+
return temp;
|
|
1212
|
+
};
|
|
1141
1213
|
|
|
1142
|
-
|
|
1214
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
1215
|
+
var NullProtoObjectViaIFrame = function () {
|
|
1216
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
1217
|
+
var iframe = documentCreateElement$1('iframe');
|
|
1218
|
+
var JS = 'java' + SCRIPT + ':';
|
|
1219
|
+
var iframeDocument;
|
|
1220
|
+
iframe.style.display = 'none';
|
|
1221
|
+
html.appendChild(iframe);
|
|
1222
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
1223
|
+
iframe.src = String(JS);
|
|
1224
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1225
|
+
iframeDocument.open();
|
|
1226
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
1227
|
+
iframeDocument.close();
|
|
1228
|
+
return iframeDocument.F;
|
|
1229
|
+
};
|
|
1143
1230
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1231
|
+
// Check for document.domain and active x support
|
|
1232
|
+
// No need to use active x approach when document.domain is not set
|
|
1233
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
1234
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
1235
|
+
// avoid IE GC bug
|
|
1236
|
+
var activeXDocument;
|
|
1237
|
+
var NullProtoObject = function () {
|
|
1238
|
+
try {
|
|
1239
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
1240
|
+
} catch (error) { /* ignore */ }
|
|
1241
|
+
NullProtoObject = typeof document != 'undefined'
|
|
1242
|
+
? document.domain && activeXDocument
|
|
1243
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
1244
|
+
: NullProtoObjectViaIFrame()
|
|
1245
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
1246
|
+
var length = enumBugKeys.length;
|
|
1247
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1248
|
+
return NullProtoObject();
|
|
1150
1249
|
};
|
|
1151
1250
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1251
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
1252
|
+
|
|
1253
|
+
// `Object.create` method
|
|
1254
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
1255
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
1256
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
1257
|
+
var result;
|
|
1258
|
+
if (O !== null) {
|
|
1259
|
+
EmptyConstructor[PROTOTYPE] = anObject$4(O);
|
|
1260
|
+
result = new EmptyConstructor();
|
|
1261
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1262
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1263
|
+
result[IE_PROTO$1] = O;
|
|
1264
|
+
} else result = NullProtoObject();
|
|
1265
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1154
1266
|
};
|
|
1155
1267
|
|
|
1156
|
-
var
|
|
1157
|
-
var
|
|
1158
|
-
var
|
|
1268
|
+
var wellKnownSymbol$8 = wellKnownSymbol$a;
|
|
1269
|
+
var create$2 = objectCreate;
|
|
1270
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1159
1271
|
|
|
1160
|
-
var
|
|
1272
|
+
var UNSCOPABLES = wellKnownSymbol$8('unscopables');
|
|
1273
|
+
var ArrayPrototype = Array.prototype;
|
|
1161
1274
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1275
|
+
// Array.prototype[@@unscopables]
|
|
1276
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1277
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1278
|
+
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
1279
|
+
configurable: true,
|
|
1280
|
+
value: create$2(null)
|
|
1281
|
+
});
|
|
1282
|
+
}
|
|
1169
1283
|
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
options.stat - export as static methods of target
|
|
1174
|
-
options.proto - export as prototype methods of target
|
|
1175
|
-
options.real - real prototype method for the `pure` version
|
|
1176
|
-
options.forced - export even if the native feature is available
|
|
1177
|
-
options.bind - bind methods to the target, required for the `pure` version
|
|
1178
|
-
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
1179
|
-
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
1180
|
-
options.sham - add a flag to not completely full polyfills
|
|
1181
|
-
options.enumerable - export as enumerable property
|
|
1182
|
-
options.dontCallGetSet - prevent calling a getter on target
|
|
1183
|
-
options.name - the .name of the function if it does not match the key
|
|
1184
|
-
*/
|
|
1185
|
-
var _export = function (options, source) {
|
|
1186
|
-
var TARGET = options.target;
|
|
1187
|
-
var GLOBAL = options.global;
|
|
1188
|
-
var STATIC = options.stat;
|
|
1189
|
-
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
1190
|
-
if (GLOBAL) {
|
|
1191
|
-
target = global$6;
|
|
1192
|
-
} else if (STATIC) {
|
|
1193
|
-
target = global$6[TARGET] || defineGlobalProperty(TARGET, {});
|
|
1194
|
-
} else {
|
|
1195
|
-
target = (global$6[TARGET] || {}).prototype;
|
|
1196
|
-
}
|
|
1197
|
-
if (target) for (key in source) {
|
|
1198
|
-
sourceProperty = source[key];
|
|
1199
|
-
if (options.dontCallGetSet) {
|
|
1200
|
-
descriptor = getOwnPropertyDescriptor(target, key);
|
|
1201
|
-
targetProperty = descriptor && descriptor.value;
|
|
1202
|
-
} else targetProperty = target[key];
|
|
1203
|
-
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
1204
|
-
// contained in target
|
|
1205
|
-
if (!FORCED && targetProperty !== undefined) {
|
|
1206
|
-
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1207
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1208
|
-
}
|
|
1209
|
-
// add a flag to not completely full polyfills
|
|
1210
|
-
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1211
|
-
createNonEnumerableProperty$3(sourceProperty, 'sham', true);
|
|
1212
|
-
}
|
|
1213
|
-
defineBuiltIn$3(target, key, sourceProperty, options);
|
|
1214
|
-
}
|
|
1284
|
+
// add a key to Array.prototype[@@unscopables]
|
|
1285
|
+
var addToUnscopables$1 = function (key) {
|
|
1286
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
1215
1287
|
};
|
|
1216
1288
|
|
|
1217
|
-
var
|
|
1289
|
+
var iterators = {};
|
|
1290
|
+
|
|
1291
|
+
var fails$7 = fails$h;
|
|
1218
1292
|
|
|
1219
|
-
var correctPrototypeGetter = !fails$
|
|
1293
|
+
var correctPrototypeGetter = !fails$7(function () {
|
|
1220
1294
|
function F() { /* empty */ }
|
|
1221
1295
|
F.prototype.constructor = null;
|
|
1222
1296
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
@@ -1225,7 +1299,7 @@ var correctPrototypeGetter = !fails$8(function () {
|
|
|
1225
1299
|
|
|
1226
1300
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1227
1301
|
var isCallable$6 = isCallable$h;
|
|
1228
|
-
var toObject$
|
|
1302
|
+
var toObject$2 = toObject$5;
|
|
1229
1303
|
var sharedKey = sharedKey$3;
|
|
1230
1304
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1231
1305
|
|
|
@@ -1237,7 +1311,7 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
1237
1311
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1238
1312
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1239
1313
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1240
|
-
var object = toObject$
|
|
1314
|
+
var object = toObject$2(O);
|
|
1241
1315
|
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1242
1316
|
var constructor = object.constructor;
|
|
1243
1317
|
if (isCallable$6(constructor) && object instanceof constructor) {
|
|
@@ -1245,7 +1319,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1245
1319
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1246
1320
|
};
|
|
1247
1321
|
|
|
1248
|
-
var fails$
|
|
1322
|
+
var fails$6 = fails$h;
|
|
1249
1323
|
var isCallable$5 = isCallable$h;
|
|
1250
1324
|
var isObject = isObject$6;
|
|
1251
1325
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
@@ -1270,7 +1344,7 @@ if ([].keys) {
|
|
|
1270
1344
|
}
|
|
1271
1345
|
}
|
|
1272
1346
|
|
|
1273
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$
|
|
1347
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$6(function () {
|
|
1274
1348
|
var test = {};
|
|
1275
1349
|
// FF44- legacy iterators case
|
|
1276
1350
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
@@ -1291,7 +1365,7 @@ var iteratorsCore = {
|
|
|
1291
1365
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1292
1366
|
};
|
|
1293
1367
|
|
|
1294
|
-
var defineProperty$
|
|
1368
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1295
1369
|
var hasOwn = hasOwnProperty_1;
|
|
1296
1370
|
var wellKnownSymbol$6 = wellKnownSymbol$a;
|
|
1297
1371
|
|
|
@@ -1300,7 +1374,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
|
|
|
1300
1374
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1301
1375
|
if (target && !STATIC) target = target.prototype;
|
|
1302
1376
|
if (target && !hasOwn(target, TO_STRING_TAG$3)) {
|
|
1303
|
-
defineProperty$
|
|
1377
|
+
defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1304
1378
|
}
|
|
1305
1379
|
};
|
|
1306
1380
|
|
|
@@ -1332,7 +1406,7 @@ var aPossiblePrototype$1 = function (argument) {
|
|
|
1332
1406
|
|
|
1333
1407
|
/* eslint-disable no-proto -- safe */
|
|
1334
1408
|
|
|
1335
|
-
var uncurryThis$
|
|
1409
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1336
1410
|
var anObject$3 = anObject$8;
|
|
1337
1411
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1338
1412
|
|
|
@@ -1346,7 +1420,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1346
1420
|
var setter;
|
|
1347
1421
|
try {
|
|
1348
1422
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1349
|
-
setter = uncurryThis$
|
|
1423
|
+
setter = uncurryThis$6(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1350
1424
|
setter(test, []);
|
|
1351
1425
|
CORRECT_SETTER = test instanceof Array;
|
|
1352
1426
|
} catch (error) { /* empty */ }
|
|
@@ -1359,8 +1433,8 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1359
1433
|
};
|
|
1360
1434
|
}() : undefined);
|
|
1361
1435
|
|
|
1362
|
-
var $$
|
|
1363
|
-
var call$
|
|
1436
|
+
var $$2 = _export;
|
|
1437
|
+
var call$4 = functionCall;
|
|
1364
1438
|
var FunctionName = functionName;
|
|
1365
1439
|
var isCallable$3 = isCallable$h;
|
|
1366
1440
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
@@ -1429,7 +1503,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1429
1503
|
createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
|
|
1430
1504
|
} else {
|
|
1431
1505
|
INCORRECT_VALUES_NAME = true;
|
|
1432
|
-
defaultIterator = function values() { return call$
|
|
1506
|
+
defaultIterator = function values() { return call$4(nativeIterator, this); };
|
|
1433
1507
|
}
|
|
1434
1508
|
}
|
|
1435
1509
|
|
|
@@ -1444,7 +1518,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1444
1518
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1445
1519
|
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
1446
1520
|
}
|
|
1447
|
-
} else $$
|
|
1521
|
+
} else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1448
1522
|
}
|
|
1449
1523
|
|
|
1450
1524
|
// define iterator
|
|
@@ -1466,10 +1540,10 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1466
1540
|
var addToUnscopables = addToUnscopables$1;
|
|
1467
1541
|
var Iterators = iterators;
|
|
1468
1542
|
var InternalStateModule = internalState;
|
|
1469
|
-
var defineProperty
|
|
1543
|
+
var defineProperty = objectDefineProperty.f;
|
|
1470
1544
|
var defineIterator = iteratorDefine;
|
|
1471
1545
|
var createIterResultObject = createIterResultObject$1;
|
|
1472
|
-
var DESCRIPTORS
|
|
1546
|
+
var DESCRIPTORS = descriptors;
|
|
1473
1547
|
|
|
1474
1548
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1475
1549
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1519,8 +1593,8 @@ addToUnscopables('values');
|
|
|
1519
1593
|
addToUnscopables('entries');
|
|
1520
1594
|
|
|
1521
1595
|
// V8 ~ Chrome 45- bug
|
|
1522
|
-
if (DESCRIPTORS
|
|
1523
|
-
defineProperty
|
|
1596
|
+
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1597
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
1524
1598
|
} catch (error) { /* empty */ }
|
|
1525
1599
|
|
|
1526
1600
|
// iterable DOM collections
|
|
@@ -1606,73 +1680,6 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1606
1680
|
|
|
1607
1681
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1608
1682
|
|
|
1609
|
-
var DESCRIPTORS = descriptors;
|
|
1610
|
-
var uncurryThis$6 = functionUncurryThis;
|
|
1611
|
-
var call$4 = functionCall;
|
|
1612
|
-
var fails$6 = fails$h;
|
|
1613
|
-
var objectKeys = objectKeys$2;
|
|
1614
|
-
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1615
|
-
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1616
|
-
var toObject$2 = toObject$5;
|
|
1617
|
-
var IndexedObject$1 = indexedObject;
|
|
1618
|
-
|
|
1619
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1620
|
-
var $assign = Object.assign;
|
|
1621
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1622
|
-
var defineProperty = Object.defineProperty;
|
|
1623
|
-
var concat$1 = uncurryThis$6([].concat);
|
|
1624
|
-
|
|
1625
|
-
// `Object.assign` method
|
|
1626
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1627
|
-
var objectAssign = !$assign || fails$6(function () {
|
|
1628
|
-
// should have correct order of operations (Edge bug)
|
|
1629
|
-
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1630
|
-
enumerable: true,
|
|
1631
|
-
get: function () {
|
|
1632
|
-
defineProperty(this, 'b', {
|
|
1633
|
-
value: 3,
|
|
1634
|
-
enumerable: false
|
|
1635
|
-
});
|
|
1636
|
-
}
|
|
1637
|
-
}), { b: 2 })).b !== 1) return true;
|
|
1638
|
-
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1639
|
-
var A = {};
|
|
1640
|
-
var B = {};
|
|
1641
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
1642
|
-
var symbol = Symbol();
|
|
1643
|
-
var alphabet = 'abcdefghijklmnopqrst';
|
|
1644
|
-
A[symbol] = 7;
|
|
1645
|
-
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1646
|
-
return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
|
|
1647
|
-
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1648
|
-
var T = toObject$2(target);
|
|
1649
|
-
var argumentsLength = arguments.length;
|
|
1650
|
-
var index = 1;
|
|
1651
|
-
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
1652
|
-
var propertyIsEnumerable = propertyIsEnumerableModule.f;
|
|
1653
|
-
while (argumentsLength > index) {
|
|
1654
|
-
var S = IndexedObject$1(arguments[index++]);
|
|
1655
|
-
var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
1656
|
-
var length = keys.length;
|
|
1657
|
-
var j = 0;
|
|
1658
|
-
var key;
|
|
1659
|
-
while (length > j) {
|
|
1660
|
-
key = keys[j++];
|
|
1661
|
-
if (!DESCRIPTORS || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1662
|
-
}
|
|
1663
|
-
} return T;
|
|
1664
|
-
} : $assign;
|
|
1665
|
-
|
|
1666
|
-
var $$2 = _export;
|
|
1667
|
-
var assign = objectAssign;
|
|
1668
|
-
|
|
1669
|
-
// `Object.assign` method
|
|
1670
|
-
// https://tc39.es/ecma262/#sec-object.assign
|
|
1671
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1672
|
-
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1673
|
-
assign: assign
|
|
1674
|
-
});
|
|
1675
|
-
|
|
1676
1683
|
const useProfile = () => {
|
|
1677
1684
|
const ninetailed = useNinetailed();
|
|
1678
1685
|
const [profileState, setProfileState] = useState(ninetailed.profileState);
|
|
@@ -1765,9 +1772,11 @@ const TrackHasSeenComponent = ({
|
|
|
1765
1772
|
});
|
|
1766
1773
|
}
|
|
1767
1774
|
}, [inView]);
|
|
1768
|
-
return
|
|
1769
|
-
|
|
1770
|
-
|
|
1775
|
+
return jsxs(Fragment, {
|
|
1776
|
+
children: [jsx("div", {
|
|
1777
|
+
ref: ref
|
|
1778
|
+
}), children]
|
|
1779
|
+
});
|
|
1771
1780
|
};
|
|
1772
1781
|
|
|
1773
1782
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -1789,7 +1798,7 @@ const Personalize = _a => {
|
|
|
1789
1798
|
});
|
|
1790
1799
|
const hasVariants = variants.length > 0;
|
|
1791
1800
|
if (!hasVariants) {
|
|
1792
|
-
return
|
|
1801
|
+
return jsx(Component, Object.assign({}, baseline, {
|
|
1793
1802
|
ninetailed: {
|
|
1794
1803
|
isPersonalized,
|
|
1795
1804
|
audience
|
|
@@ -1798,31 +1807,34 @@ const Personalize = _a => {
|
|
|
1798
1807
|
}
|
|
1799
1808
|
if (loading) {
|
|
1800
1809
|
if (LoadingComponent) {
|
|
1801
|
-
return
|
|
1810
|
+
return jsx(LoadingComponent, {});
|
|
1802
1811
|
}
|
|
1803
|
-
return
|
|
1804
|
-
key: "hide",
|
|
1812
|
+
return jsx("div", Object.assign({
|
|
1805
1813
|
style: {
|
|
1806
1814
|
opacity: 0
|
|
1807
1815
|
}
|
|
1808
|
-
},
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1816
|
+
}, {
|
|
1817
|
+
children: jsx(Component, Object.assign({}, variant, {
|
|
1818
|
+
ninetailed: {
|
|
1819
|
+
isPersonalized,
|
|
1820
|
+
audience
|
|
1821
|
+
}
|
|
1822
|
+
}))
|
|
1823
|
+
}), "hide");
|
|
1814
1824
|
}
|
|
1815
|
-
return
|
|
1825
|
+
return jsx(TrackHasSeenComponent, Object.assign({
|
|
1816
1826
|
variant: variant,
|
|
1817
1827
|
audience: audience,
|
|
1818
1828
|
isPersonalized: isPersonalized
|
|
1819
|
-
},
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1829
|
+
}, {
|
|
1830
|
+
children: /*#__PURE__*/createElement$1(Component, Object.assign({}, variant, {
|
|
1831
|
+
key: `${audience.id}-${variant.id}`,
|
|
1832
|
+
ninetailed: {
|
|
1833
|
+
isPersonalized,
|
|
1834
|
+
audience
|
|
1835
|
+
}
|
|
1836
|
+
}))
|
|
1837
|
+
}));
|
|
1826
1838
|
};
|
|
1827
1839
|
|
|
1828
1840
|
var wellKnownSymbol$3 = wellKnownSymbol$a;
|
|
@@ -2426,7 +2438,9 @@ const MergeTag = ({
|
|
|
2426
2438
|
}
|
|
2427
2439
|
const value = get$1(profile, id.replace(/_/g, '.'));
|
|
2428
2440
|
// DON'T CHANGE
|
|
2429
|
-
return
|
|
2441
|
+
return jsx(Fragment, {
|
|
2442
|
+
children: value
|
|
2443
|
+
});
|
|
2430
2444
|
};
|
|
2431
2445
|
|
|
2432
2446
|
const TrackExperience = ({
|
|
@@ -2455,10 +2469,12 @@ const TrackExperience = ({
|
|
|
2455
2469
|
});
|
|
2456
2470
|
}
|
|
2457
2471
|
}, [inView]);
|
|
2458
|
-
return
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2472
|
+
return jsxs(Fragment, {
|
|
2473
|
+
children: [jsx("div", {
|
|
2474
|
+
ref: ref,
|
|
2475
|
+
id: "nt-experience-handle"
|
|
2476
|
+
}), children]
|
|
2477
|
+
});
|
|
2462
2478
|
};
|
|
2463
2479
|
|
|
2464
2480
|
var aCallable = aCallable$2;
|
|
@@ -2673,21 +2689,22 @@ const DefaultExperienceLoadingComponent = _a => {
|
|
|
2673
2689
|
};
|
|
2674
2690
|
}, []);
|
|
2675
2691
|
if (hidden) {
|
|
2676
|
-
return
|
|
2677
|
-
key: "hide",
|
|
2692
|
+
return jsx("div", Object.assign({
|
|
2678
2693
|
style: {
|
|
2679
2694
|
opacity: 0
|
|
2680
2695
|
}
|
|
2681
|
-
},
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2696
|
+
}, {
|
|
2697
|
+
children: jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2698
|
+
ninetailed: {
|
|
2699
|
+
isPersonalized: false,
|
|
2700
|
+
audience: {
|
|
2701
|
+
id: 'baseline'
|
|
2702
|
+
}
|
|
2686
2703
|
}
|
|
2687
|
-
}
|
|
2688
|
-
}))
|
|
2704
|
+
}))
|
|
2705
|
+
}), "hide");
|
|
2689
2706
|
}
|
|
2690
|
-
return
|
|
2707
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2691
2708
|
ninetailed: {
|
|
2692
2709
|
isPersonalized: false,
|
|
2693
2710
|
audience: {
|
|
@@ -2728,17 +2745,17 @@ const Experience = _a => {
|
|
|
2728
2745
|
}
|
|
2729
2746
|
}, [status, experience, profile]);
|
|
2730
2747
|
if (!hasVariants) {
|
|
2731
|
-
return
|
|
2748
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline));
|
|
2732
2749
|
}
|
|
2733
2750
|
if (status === 'loading') {
|
|
2734
|
-
return
|
|
2751
|
+
return jsx(LoadingComponent, Object.assign({}, baseline, {
|
|
2735
2752
|
passthroughProps: passthroughProps,
|
|
2736
2753
|
experiences: experiences,
|
|
2737
2754
|
component: Component
|
|
2738
2755
|
}));
|
|
2739
2756
|
}
|
|
2740
2757
|
if (!experience) {
|
|
2741
|
-
return /*#__PURE__*/
|
|
2758
|
+
return /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2742
2759
|
key: baseline.id,
|
|
2743
2760
|
ninetailed: {
|
|
2744
2761
|
isPersonalized: false,
|
|
@@ -2749,35 +2766,39 @@ const Experience = _a => {
|
|
|
2749
2766
|
}));
|
|
2750
2767
|
}
|
|
2751
2768
|
if (!variant) {
|
|
2752
|
-
return
|
|
2769
|
+
return jsx(TrackExperience, Object.assign({
|
|
2753
2770
|
experience: experience,
|
|
2754
2771
|
variant: baseline,
|
|
2755
2772
|
// the profile is definitely defined, otherwise there wouldn't be an experience selected
|
|
2756
2773
|
profile: profile
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2774
|
+
}, {
|
|
2775
|
+
children: /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2776
|
+
key: baseline.id,
|
|
2777
|
+
ninetailed: {
|
|
2778
|
+
isPersonalized: false,
|
|
2779
|
+
audience: {
|
|
2780
|
+
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2781
|
+
}
|
|
2763
2782
|
}
|
|
2764
|
-
}
|
|
2765
|
-
}))
|
|
2783
|
+
}))
|
|
2784
|
+
}));
|
|
2766
2785
|
}
|
|
2767
|
-
return
|
|
2786
|
+
return jsx(TrackExperience, Object.assign({
|
|
2768
2787
|
experience: experience,
|
|
2769
2788
|
variant: variant,
|
|
2770
2789
|
// the profile is definitely defined, otherwise there wouldn't be an experience selected
|
|
2771
2790
|
profile: profile
|
|
2772
|
-
},
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2791
|
+
}, {
|
|
2792
|
+
children: (variant === null || variant === void 0 ? void 0 : variant.hidden) ? null : /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, variant, {
|
|
2793
|
+
key: `${experience.id}-${variant.id}`,
|
|
2794
|
+
ninetailed: {
|
|
2795
|
+
isPersonalized,
|
|
2796
|
+
audience: {
|
|
2797
|
+
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2798
|
+
}
|
|
2778
2799
|
}
|
|
2779
|
-
}
|
|
2780
|
-
}))
|
|
2800
|
+
}))
|
|
2801
|
+
}));
|
|
2781
2802
|
};
|
|
2782
2803
|
|
|
2783
2804
|
const ESRContext = /*#__PURE__*/React.createContext(undefined);
|
|
@@ -2785,11 +2806,13 @@ const ESRProvider = ({
|
|
|
2785
2806
|
experienceVariantsMap,
|
|
2786
2807
|
children
|
|
2787
2808
|
}) => {
|
|
2788
|
-
return
|
|
2809
|
+
return jsx(ESRContext.Provider, Object.assign({
|
|
2789
2810
|
value: {
|
|
2790
2811
|
experienceVariantsMap
|
|
2791
2812
|
}
|
|
2792
|
-
},
|
|
2813
|
+
}, {
|
|
2814
|
+
children: children
|
|
2815
|
+
}));
|
|
2793
2816
|
};
|
|
2794
2817
|
const useESR = () => {
|
|
2795
2818
|
const context = React.useContext(ESRContext);
|
|
@@ -2812,7 +2835,7 @@ const ESRLoadingComponent = _a => {
|
|
|
2812
2835
|
} = useESR();
|
|
2813
2836
|
const experience = experiences.find(experience => has$1(experienceVariantsMap, experience.id));
|
|
2814
2837
|
if (!experience) {
|
|
2815
|
-
return
|
|
2838
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2816
2839
|
ninetailed: {
|
|
2817
2840
|
isPersonalized: false,
|
|
2818
2841
|
audience: {
|
|
@@ -2823,7 +2846,7 @@ const ESRLoadingComponent = _a => {
|
|
|
2823
2846
|
}
|
|
2824
2847
|
const component = experience.components.find(component => component.baseline.id === baseline.id);
|
|
2825
2848
|
if (!component) {
|
|
2826
|
-
return
|
|
2849
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2827
2850
|
ninetailed: {
|
|
2828
2851
|
isPersonalized: false,
|
|
2829
2852
|
audience: {
|
|
@@ -2833,7 +2856,7 @@ const ESRLoadingComponent = _a => {
|
|
|
2833
2856
|
}));
|
|
2834
2857
|
}
|
|
2835
2858
|
if (experienceVariantsMap[experience.id] === 0) {
|
|
2836
|
-
return
|
|
2859
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2837
2860
|
ninetailed: {
|
|
2838
2861
|
isPersonalized: false,
|
|
2839
2862
|
audience: {
|
|
@@ -2844,7 +2867,7 @@ const ESRLoadingComponent = _a => {
|
|
|
2844
2867
|
}
|
|
2845
2868
|
const variant = component.variants[experienceVariantsMap[experience.id] - 1];
|
|
2846
2869
|
if (!variant) {
|
|
2847
|
-
return
|
|
2870
|
+
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2848
2871
|
ninetailed: {
|
|
2849
2872
|
isPersonalized: false,
|
|
2850
2873
|
audience: {
|
|
@@ -2853,7 +2876,7 @@ const ESRLoadingComponent = _a => {
|
|
|
2853
2876
|
}
|
|
2854
2877
|
}));
|
|
2855
2878
|
}
|
|
2856
|
-
return
|
|
2879
|
+
return jsx(Component, Object.assign({}, passthroughProps, variant, {
|
|
2857
2880
|
ninetailed: {
|
|
2858
2881
|
isPersonalized: false,
|
|
2859
2882
|
audience: {
|