@pie-element/select-text 12.0.0-next.43 → 12.1.0-next.0
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/configure/package.json +7 -7
- package/controller/package.json +4 -7
- package/lib/print.js +2 -2
- package/lib/print.js.map +1 -1
- package/module/configure.js +1 -1
- package/module/controller.js +332 -1759
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +3 -3
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +7 -7
- package/LICENSE.md +0 -5
- package/configure/lib/defaultConfiguration.js +0 -174
- package/configure/lib/defaultConfiguration.js.map +0 -1
- package/configure/lib/design.js +0 -407
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/index.js +0 -128
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -92
- package/configure/lib/utils.js.map +0 -1
- package/controller/lib/defaults.js +0 -25
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -196
- package/controller/lib/index.js.map +0 -1
package/module/controller.js
CHANGED
|
@@ -1,120 +1,36 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
/** Used for built-in method references. */
|
|
4
|
-
|
|
5
|
-
var objectProto$c = Object.prototype;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Checks if `value` is likely a prototype object.
|
|
9
|
-
*
|
|
10
|
-
* @private
|
|
11
|
-
* @param {*} value The value to check.
|
|
12
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
13
|
-
*/
|
|
14
|
-
function isPrototype$2(value) {
|
|
15
|
-
var Ctor = value && value.constructor,
|
|
16
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$c;
|
|
17
|
-
|
|
18
|
-
return value === proto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var _isPrototype = isPrototype$2;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
25
|
-
*
|
|
26
|
-
* @private
|
|
27
|
-
* @param {Function} func The function to wrap.
|
|
28
|
-
* @param {Function} transform The argument transform.
|
|
29
|
-
* @returns {Function} Returns the new function.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
function overArg$1(func, transform) {
|
|
33
|
-
return function(arg) {
|
|
34
|
-
return func(transform(arg));
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var _overArg = overArg$1;
|
|
39
|
-
|
|
40
|
-
var overArg = _overArg;
|
|
41
|
-
|
|
42
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
43
|
-
var nativeKeys$1 = overArg(Object.keys, Object);
|
|
44
|
-
|
|
45
|
-
var _nativeKeys = nativeKeys$1;
|
|
46
|
-
|
|
47
|
-
var isPrototype$1 = _isPrototype,
|
|
48
|
-
nativeKeys = _nativeKeys;
|
|
49
|
-
|
|
50
|
-
/** Used for built-in method references. */
|
|
51
|
-
var objectProto$b = Object.prototype;
|
|
52
|
-
|
|
53
|
-
/** Used to check objects for own properties. */
|
|
54
|
-
var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
58
|
-
*
|
|
59
|
-
* @private
|
|
60
|
-
* @param {Object} object The object to query.
|
|
61
|
-
* @returns {Array} Returns the array of property names.
|
|
62
|
-
*/
|
|
63
|
-
function baseKeys$1(object) {
|
|
64
|
-
if (!isPrototype$1(object)) {
|
|
65
|
-
return nativeKeys(object);
|
|
66
|
-
}
|
|
67
|
-
var result = [];
|
|
68
|
-
for (var key in Object(object)) {
|
|
69
|
-
if (hasOwnProperty$9.call(object, key) && key != 'constructor') {
|
|
70
|
-
result.push(key);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return result;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
var _baseKeys = baseKeys$1;
|
|
77
|
-
|
|
78
1
|
/** Detect free variable `global` from Node.js. */
|
|
2
|
+
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
79
3
|
|
|
80
|
-
var freeGlobal$
|
|
81
|
-
|
|
82
|
-
var _freeGlobal$1 = freeGlobal$3;
|
|
83
|
-
|
|
84
|
-
var freeGlobal$2 = _freeGlobal$1;
|
|
4
|
+
var freeGlobal$1 = freeGlobal;
|
|
85
5
|
|
|
86
6
|
/** Detect free variable `self`. */
|
|
87
|
-
var freeSelf
|
|
7
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
88
8
|
|
|
89
9
|
/** Used as a reference to the global object. */
|
|
90
|
-
var root
|
|
91
|
-
|
|
92
|
-
var _root$1 = root$f;
|
|
10
|
+
var root = freeGlobal$1 || freeSelf || Function('return this')();
|
|
93
11
|
|
|
94
|
-
var root$
|
|
12
|
+
var root$1 = root;
|
|
95
13
|
|
|
96
14
|
/** Built-in value references. */
|
|
97
|
-
var Symbol
|
|
15
|
+
var Symbol = root$1.Symbol;
|
|
98
16
|
|
|
99
|
-
var
|
|
100
|
-
|
|
101
|
-
var Symbol$5 = _Symbol$1;
|
|
17
|
+
var Symbol$1 = Symbol;
|
|
102
18
|
|
|
103
19
|
/** Used for built-in method references. */
|
|
104
|
-
var objectProto$
|
|
20
|
+
var objectProto$6 = Object.prototype;
|
|
105
21
|
|
|
106
22
|
/** Used to check objects for own properties. */
|
|
107
|
-
var hasOwnProperty$
|
|
23
|
+
var hasOwnProperty$4 = objectProto$6.hasOwnProperty;
|
|
108
24
|
|
|
109
25
|
/**
|
|
110
26
|
* Used to resolve the
|
|
111
27
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
112
28
|
* of values.
|
|
113
29
|
*/
|
|
114
|
-
var nativeObjectToString$
|
|
30
|
+
var nativeObjectToString$1 = objectProto$6.toString;
|
|
115
31
|
|
|
116
32
|
/** Built-in value references. */
|
|
117
|
-
var symToStringTag$
|
|
33
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
118
34
|
|
|
119
35
|
/**
|
|
120
36
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
@@ -123,38 +39,35 @@ var symToStringTag$3 = Symbol$5 ? Symbol$5.toStringTag : undefined;
|
|
|
123
39
|
* @param {*} value The value to query.
|
|
124
40
|
* @returns {string} Returns the raw `toStringTag`.
|
|
125
41
|
*/
|
|
126
|
-
function getRawTag
|
|
127
|
-
var isOwn = hasOwnProperty$
|
|
128
|
-
tag = value[symToStringTag$
|
|
42
|
+
function getRawTag(value) {
|
|
43
|
+
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1),
|
|
44
|
+
tag = value[symToStringTag$1];
|
|
129
45
|
|
|
130
46
|
try {
|
|
131
|
-
value[symToStringTag$
|
|
47
|
+
value[symToStringTag$1] = undefined;
|
|
132
48
|
var unmasked = true;
|
|
133
49
|
} catch (e) {}
|
|
134
50
|
|
|
135
|
-
var result = nativeObjectToString$
|
|
51
|
+
var result = nativeObjectToString$1.call(value);
|
|
136
52
|
if (unmasked) {
|
|
137
53
|
if (isOwn) {
|
|
138
|
-
value[symToStringTag$
|
|
54
|
+
value[symToStringTag$1] = tag;
|
|
139
55
|
} else {
|
|
140
|
-
delete value[symToStringTag$
|
|
56
|
+
delete value[symToStringTag$1];
|
|
141
57
|
}
|
|
142
58
|
}
|
|
143
59
|
return result;
|
|
144
60
|
}
|
|
145
61
|
|
|
146
|
-
var _getRawTag$1 = getRawTag$3;
|
|
147
|
-
|
|
148
62
|
/** Used for built-in method references. */
|
|
149
|
-
|
|
150
|
-
var objectProto$9 = Object.prototype;
|
|
63
|
+
var objectProto$5 = Object.prototype;
|
|
151
64
|
|
|
152
65
|
/**
|
|
153
66
|
* Used to resolve the
|
|
154
67
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
155
68
|
* of values.
|
|
156
69
|
*/
|
|
157
|
-
var nativeObjectToString
|
|
70
|
+
var nativeObjectToString = objectProto$5.toString;
|
|
158
71
|
|
|
159
72
|
/**
|
|
160
73
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
@@ -163,22 +76,16 @@ var nativeObjectToString$2 = objectProto$9.toString;
|
|
|
163
76
|
* @param {*} value The value to convert.
|
|
164
77
|
* @returns {string} Returns the converted string.
|
|
165
78
|
*/
|
|
166
|
-
function objectToString
|
|
167
|
-
return nativeObjectToString
|
|
79
|
+
function objectToString(value) {
|
|
80
|
+
return nativeObjectToString.call(value);
|
|
168
81
|
}
|
|
169
82
|
|
|
170
|
-
var _objectToString$1 = objectToString$3;
|
|
171
|
-
|
|
172
|
-
var Symbol$4 = _Symbol$1,
|
|
173
|
-
getRawTag$2 = _getRawTag$1,
|
|
174
|
-
objectToString$2 = _objectToString$1;
|
|
175
|
-
|
|
176
83
|
/** `Object#toString` result references. */
|
|
177
|
-
var nullTag
|
|
178
|
-
undefinedTag
|
|
84
|
+
var nullTag = '[object Null]',
|
|
85
|
+
undefinedTag = '[object Undefined]';
|
|
179
86
|
|
|
180
87
|
/** Built-in value references. */
|
|
181
|
-
var symToStringTag
|
|
88
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
182
89
|
|
|
183
90
|
/**
|
|
184
91
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
@@ -187,16 +94,69 @@ var symToStringTag$2 = Symbol$4 ? Symbol$4.toStringTag : undefined;
|
|
|
187
94
|
* @param {*} value The value to query.
|
|
188
95
|
* @returns {string} Returns the `toStringTag`.
|
|
189
96
|
*/
|
|
190
|
-
function baseGetTag
|
|
97
|
+
function baseGetTag(value) {
|
|
191
98
|
if (value == null) {
|
|
192
|
-
return value === undefined ? undefinedTag
|
|
99
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
193
100
|
}
|
|
194
|
-
return (symToStringTag
|
|
195
|
-
? getRawTag
|
|
196
|
-
: objectToString
|
|
101
|
+
return (symToStringTag && symToStringTag in Object(value))
|
|
102
|
+
? getRawTag(value)
|
|
103
|
+
: objectToString(value);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
108
|
+
* and has a `typeof` result of "object".
|
|
109
|
+
*
|
|
110
|
+
* @static
|
|
111
|
+
* @memberOf _
|
|
112
|
+
* @since 4.0.0
|
|
113
|
+
* @category Lang
|
|
114
|
+
* @param {*} value The value to check.
|
|
115
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
116
|
+
* @example
|
|
117
|
+
*
|
|
118
|
+
* _.isObjectLike({});
|
|
119
|
+
* // => true
|
|
120
|
+
*
|
|
121
|
+
* _.isObjectLike([1, 2, 3]);
|
|
122
|
+
* // => true
|
|
123
|
+
*
|
|
124
|
+
* _.isObjectLike(_.noop);
|
|
125
|
+
* // => false
|
|
126
|
+
*
|
|
127
|
+
* _.isObjectLike(null);
|
|
128
|
+
* // => false
|
|
129
|
+
*/
|
|
130
|
+
function isObjectLike(value) {
|
|
131
|
+
return value != null && typeof value == 'object';
|
|
197
132
|
}
|
|
198
133
|
|
|
199
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Checks if `value` is classified as an `Array` object.
|
|
136
|
+
*
|
|
137
|
+
* @static
|
|
138
|
+
* @memberOf _
|
|
139
|
+
* @since 0.1.0
|
|
140
|
+
* @category Lang
|
|
141
|
+
* @param {*} value The value to check.
|
|
142
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
143
|
+
* @example
|
|
144
|
+
*
|
|
145
|
+
* _.isArray([1, 2, 3]);
|
|
146
|
+
* // => true
|
|
147
|
+
*
|
|
148
|
+
* _.isArray(document.body.children);
|
|
149
|
+
* // => false
|
|
150
|
+
*
|
|
151
|
+
* _.isArray('abc');
|
|
152
|
+
* // => false
|
|
153
|
+
*
|
|
154
|
+
* _.isArray(_.noop);
|
|
155
|
+
* // => false
|
|
156
|
+
*/
|
|
157
|
+
var isArray = Array.isArray;
|
|
158
|
+
|
|
159
|
+
var isArray$1 = isArray;
|
|
200
160
|
|
|
201
161
|
/**
|
|
202
162
|
* Checks if `value` is the
|
|
@@ -223,22 +183,16 @@ var _baseGetTag$1 = baseGetTag$8;
|
|
|
223
183
|
* _.isObject(null);
|
|
224
184
|
* // => false
|
|
225
185
|
*/
|
|
226
|
-
|
|
227
|
-
function isObject$5(value) {
|
|
186
|
+
function isObject(value) {
|
|
228
187
|
var type = typeof value;
|
|
229
188
|
return value != null && (type == 'object' || type == 'function');
|
|
230
189
|
}
|
|
231
190
|
|
|
232
|
-
var isObject_1$1 = isObject$5;
|
|
233
|
-
|
|
234
|
-
var baseGetTag$7 = _baseGetTag$1,
|
|
235
|
-
isObject$4 = isObject_1$1;
|
|
236
|
-
|
|
237
191
|
/** `Object#toString` result references. */
|
|
238
|
-
var asyncTag
|
|
239
|
-
funcTag$
|
|
240
|
-
genTag
|
|
241
|
-
proxyTag
|
|
192
|
+
var asyncTag = '[object AsyncFunction]',
|
|
193
|
+
funcTag$1 = '[object Function]',
|
|
194
|
+
genTag = '[object GeneratorFunction]',
|
|
195
|
+
proxyTag = '[object Proxy]';
|
|
242
196
|
|
|
243
197
|
/**
|
|
244
198
|
* Checks if `value` is classified as a `Function` object.
|
|
@@ -257,30 +211,24 @@ var asyncTag$1 = '[object AsyncFunction]',
|
|
|
257
211
|
* _.isFunction(/abc/);
|
|
258
212
|
* // => false
|
|
259
213
|
*/
|
|
260
|
-
function isFunction
|
|
261
|
-
if (!isObject
|
|
214
|
+
function isFunction(value) {
|
|
215
|
+
if (!isObject(value)) {
|
|
262
216
|
return false;
|
|
263
217
|
}
|
|
264
218
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
265
219
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
266
|
-
var tag = baseGetTag
|
|
267
|
-
return tag == funcTag$
|
|
220
|
+
var tag = baseGetTag(value);
|
|
221
|
+
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
268
222
|
}
|
|
269
223
|
|
|
270
|
-
var isFunction_1$1 = isFunction$4;
|
|
271
|
-
|
|
272
|
-
var root$d = _root$1;
|
|
273
|
-
|
|
274
224
|
/** Used to detect overreaching core-js shims. */
|
|
275
|
-
var coreJsData
|
|
276
|
-
|
|
277
|
-
var _coreJsData$1 = coreJsData$3;
|
|
225
|
+
var coreJsData = root$1['__core-js_shared__'];
|
|
278
226
|
|
|
279
|
-
var coreJsData$
|
|
227
|
+
var coreJsData$1 = coreJsData;
|
|
280
228
|
|
|
281
229
|
/** Used to detect methods masquerading as native. */
|
|
282
|
-
var maskSrcKey
|
|
283
|
-
var uid = /[^.]+$/.exec(coreJsData$
|
|
230
|
+
var maskSrcKey = (function() {
|
|
231
|
+
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || '');
|
|
284
232
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
285
233
|
}());
|
|
286
234
|
|
|
@@ -291,18 +239,15 @@ var maskSrcKey$1 = (function() {
|
|
|
291
239
|
* @param {Function} func The function to check.
|
|
292
240
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
293
241
|
*/
|
|
294
|
-
function isMasked
|
|
295
|
-
return !!maskSrcKey
|
|
242
|
+
function isMasked(func) {
|
|
243
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
296
244
|
}
|
|
297
245
|
|
|
298
|
-
var _isMasked$1 = isMasked$3;
|
|
299
|
-
|
|
300
246
|
/** Used for built-in method references. */
|
|
301
|
-
|
|
302
|
-
var funcProto$3 = Function.prototype;
|
|
247
|
+
var funcProto$1 = Function.prototype;
|
|
303
248
|
|
|
304
249
|
/** Used to resolve the decompiled source of functions. */
|
|
305
|
-
var funcToString$
|
|
250
|
+
var funcToString$1 = funcProto$1.toString;
|
|
306
251
|
|
|
307
252
|
/**
|
|
308
253
|
* Converts `func` to its source code.
|
|
@@ -311,10 +256,10 @@ var funcToString$3 = funcProto$3.toString;
|
|
|
311
256
|
* @param {Function} func The function to convert.
|
|
312
257
|
* @returns {string} Returns the source code.
|
|
313
258
|
*/
|
|
314
|
-
function toSource
|
|
259
|
+
function toSource(func) {
|
|
315
260
|
if (func != null) {
|
|
316
261
|
try {
|
|
317
|
-
return funcToString$
|
|
262
|
+
return funcToString$1.call(func);
|
|
318
263
|
} catch (e) {}
|
|
319
264
|
try {
|
|
320
265
|
return (func + '');
|
|
@@ -323,35 +268,28 @@ function toSource$5(func) {
|
|
|
323
268
|
return '';
|
|
324
269
|
}
|
|
325
270
|
|
|
326
|
-
var _toSource$1 = toSource$5;
|
|
327
|
-
|
|
328
|
-
var isFunction$3 = isFunction_1$1,
|
|
329
|
-
isMasked$2 = _isMasked$1,
|
|
330
|
-
isObject$3 = isObject_1$1,
|
|
331
|
-
toSource$4 = _toSource$1;
|
|
332
|
-
|
|
333
271
|
/**
|
|
334
272
|
* Used to match `RegExp`
|
|
335
273
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
336
274
|
*/
|
|
337
|
-
var reRegExpChar
|
|
275
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
338
276
|
|
|
339
277
|
/** Used to detect host constructors (Safari). */
|
|
340
|
-
var reIsHostCtor
|
|
278
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
341
279
|
|
|
342
280
|
/** Used for built-in method references. */
|
|
343
|
-
var funcProto
|
|
344
|
-
objectProto$
|
|
281
|
+
var funcProto = Function.prototype,
|
|
282
|
+
objectProto$4 = Object.prototype;
|
|
345
283
|
|
|
346
284
|
/** Used to resolve the decompiled source of functions. */
|
|
347
|
-
var funcToString
|
|
285
|
+
var funcToString = funcProto.toString;
|
|
348
286
|
|
|
349
287
|
/** Used to check objects for own properties. */
|
|
350
|
-
var hasOwnProperty$
|
|
288
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
351
289
|
|
|
352
290
|
/** Used to detect if a method is native. */
|
|
353
|
-
var reIsNative
|
|
354
|
-
funcToString
|
|
291
|
+
var reIsNative = RegExp('^' +
|
|
292
|
+
funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&')
|
|
355
293
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
356
294
|
);
|
|
357
295
|
|
|
@@ -363,16 +301,14 @@ var reIsNative$1 = RegExp('^' +
|
|
|
363
301
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
364
302
|
* else `false`.
|
|
365
303
|
*/
|
|
366
|
-
function baseIsNative
|
|
367
|
-
if (!isObject
|
|
304
|
+
function baseIsNative(value) {
|
|
305
|
+
if (!isObject(value) || isMasked(value)) {
|
|
368
306
|
return false;
|
|
369
307
|
}
|
|
370
|
-
var pattern = isFunction
|
|
371
|
-
return pattern.test(toSource
|
|
308
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
309
|
+
return pattern.test(toSource(value));
|
|
372
310
|
}
|
|
373
311
|
|
|
374
|
-
var _baseIsNative$1 = baseIsNative$3;
|
|
375
|
-
|
|
376
312
|
/**
|
|
377
313
|
* Gets the value at `key` of `object`.
|
|
378
314
|
*
|
|
@@ -381,16 +317,10 @@ var _baseIsNative$1 = baseIsNative$3;
|
|
|
381
317
|
* @param {string} key The key of the property to get.
|
|
382
318
|
* @returns {*} Returns the property value.
|
|
383
319
|
*/
|
|
384
|
-
|
|
385
|
-
function getValue$3(object, key) {
|
|
320
|
+
function getValue(object, key) {
|
|
386
321
|
return object == null ? undefined : object[key];
|
|
387
322
|
}
|
|
388
323
|
|
|
389
|
-
var _getValue$1 = getValue$3;
|
|
390
|
-
|
|
391
|
-
var baseIsNative$2 = _baseIsNative$1,
|
|
392
|
-
getValue$2 = _getValue$1;
|
|
393
|
-
|
|
394
324
|
/**
|
|
395
325
|
* Gets the native function at `key` of `object`.
|
|
396
326
|
*
|
|
@@ -399,173 +329,118 @@ var baseIsNative$2 = _baseIsNative$1,
|
|
|
399
329
|
* @param {string} key The key of the method to get.
|
|
400
330
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
401
331
|
*/
|
|
402
|
-
function getNative
|
|
403
|
-
var value = getValue
|
|
404
|
-
return baseIsNative
|
|
332
|
+
function getNative(object, key) {
|
|
333
|
+
var value = getValue(object, key);
|
|
334
|
+
return baseIsNative(value) ? value : undefined;
|
|
405
335
|
}
|
|
406
336
|
|
|
407
|
-
var _getNative$1 = getNative$c;
|
|
408
|
-
|
|
409
|
-
var getNative$b = _getNative$1,
|
|
410
|
-
root$c = _root$1;
|
|
411
|
-
|
|
412
|
-
/* Built-in method references that are verified to be native. */
|
|
413
|
-
var DataView$3 = getNative$b(root$c, 'DataView');
|
|
414
|
-
|
|
415
|
-
var _DataView$1 = DataView$3;
|
|
416
|
-
|
|
417
|
-
var getNative$a = _getNative$1,
|
|
418
|
-
root$b = _root$1;
|
|
419
|
-
|
|
420
|
-
/* Built-in method references that are verified to be native. */
|
|
421
|
-
var Map$4 = getNative$a(root$b, 'Map');
|
|
422
|
-
|
|
423
|
-
var _Map$1 = Map$4;
|
|
424
|
-
|
|
425
|
-
var getNative$9 = _getNative$1,
|
|
426
|
-
root$a = _root$1;
|
|
427
|
-
|
|
428
|
-
/* Built-in method references that are verified to be native. */
|
|
429
|
-
var Promise$4 = getNative$9(root$a, 'Promise');
|
|
430
|
-
|
|
431
|
-
var _Promise$1 = Promise$4;
|
|
432
|
-
|
|
433
|
-
var getNative$8 = _getNative$1,
|
|
434
|
-
root$9 = _root$1;
|
|
435
|
-
|
|
436
|
-
/* Built-in method references that are verified to be native. */
|
|
437
|
-
var Set$3 = getNative$8(root$9, 'Set');
|
|
438
|
-
|
|
439
|
-
var _Set$1 = Set$3;
|
|
440
|
-
|
|
441
|
-
var getNative$7 = _getNative$1,
|
|
442
|
-
root$8 = _root$1;
|
|
443
|
-
|
|
444
337
|
/* Built-in method references that are verified to be native. */
|
|
445
|
-
var WeakMap
|
|
446
|
-
|
|
447
|
-
var _WeakMap$1 = WeakMap$3;
|
|
448
|
-
|
|
449
|
-
var DataView$2 = _DataView$1,
|
|
450
|
-
Map$3 = _Map$1,
|
|
451
|
-
Promise$3 = _Promise$1,
|
|
452
|
-
Set$2 = _Set$1,
|
|
453
|
-
WeakMap$2 = _WeakMap$1,
|
|
454
|
-
baseGetTag$6 = _baseGetTag$1,
|
|
455
|
-
toSource$3 = _toSource$1;
|
|
456
|
-
|
|
457
|
-
/** `Object#toString` result references. */
|
|
458
|
-
var mapTag$3 = '[object Map]',
|
|
459
|
-
objectTag$2 = '[object Object]',
|
|
460
|
-
promiseTag$1 = '[object Promise]',
|
|
461
|
-
setTag$3 = '[object Set]',
|
|
462
|
-
weakMapTag$2 = '[object WeakMap]';
|
|
338
|
+
var WeakMap = getNative(root$1, 'WeakMap');
|
|
463
339
|
|
|
464
|
-
var
|
|
340
|
+
var WeakMap$1 = WeakMap;
|
|
465
341
|
|
|
466
|
-
/** Used
|
|
467
|
-
var
|
|
468
|
-
mapCtorString$1 = toSource$3(Map$3),
|
|
469
|
-
promiseCtorString$1 = toSource$3(Promise$3),
|
|
470
|
-
setCtorString$1 = toSource$3(Set$2),
|
|
471
|
-
weakMapCtorString$1 = toSource$3(WeakMap$2);
|
|
342
|
+
/** Used as references for various `Number` constants. */
|
|
343
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
472
344
|
|
|
473
345
|
/**
|
|
474
|
-
*
|
|
346
|
+
* Checks if `value` is a valid array-like length.
|
|
475
347
|
*
|
|
476
|
-
*
|
|
477
|
-
*
|
|
478
|
-
*
|
|
348
|
+
* **Note:** This method is loosely based on
|
|
349
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
350
|
+
*
|
|
351
|
+
* @static
|
|
352
|
+
* @memberOf _
|
|
353
|
+
* @since 4.0.0
|
|
354
|
+
* @category Lang
|
|
355
|
+
* @param {*} value The value to check.
|
|
356
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
357
|
+
* @example
|
|
358
|
+
*
|
|
359
|
+
* _.isLength(3);
|
|
360
|
+
* // => true
|
|
361
|
+
*
|
|
362
|
+
* _.isLength(Number.MIN_VALUE);
|
|
363
|
+
* // => false
|
|
364
|
+
*
|
|
365
|
+
* _.isLength(Infinity);
|
|
366
|
+
* // => false
|
|
367
|
+
*
|
|
368
|
+
* _.isLength('3');
|
|
369
|
+
* // => false
|
|
479
370
|
*/
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
if ((DataView$2 && getTag$2(new DataView$2(new ArrayBuffer(1))) != dataViewTag$2) ||
|
|
484
|
-
(Map$3 && getTag$2(new Map$3) != mapTag$3) ||
|
|
485
|
-
(Promise$3 && getTag$2(Promise$3.resolve()) != promiseTag$1) ||
|
|
486
|
-
(Set$2 && getTag$2(new Set$2) != setTag$3) ||
|
|
487
|
-
(WeakMap$2 && getTag$2(new WeakMap$2) != weakMapTag$2)) {
|
|
488
|
-
getTag$2 = function(value) {
|
|
489
|
-
var result = baseGetTag$6(value),
|
|
490
|
-
Ctor = result == objectTag$2 ? value.constructor : undefined,
|
|
491
|
-
ctorString = Ctor ? toSource$3(Ctor) : '';
|
|
492
|
-
|
|
493
|
-
if (ctorString) {
|
|
494
|
-
switch (ctorString) {
|
|
495
|
-
case dataViewCtorString$1: return dataViewTag$2;
|
|
496
|
-
case mapCtorString$1: return mapTag$3;
|
|
497
|
-
case promiseCtorString$1: return promiseTag$1;
|
|
498
|
-
case setCtorString$1: return setTag$3;
|
|
499
|
-
case weakMapCtorString$1: return weakMapTag$2;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
return result;
|
|
503
|
-
};
|
|
371
|
+
function isLength(value) {
|
|
372
|
+
return typeof value == 'number' &&
|
|
373
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
504
374
|
}
|
|
505
375
|
|
|
506
|
-
var _getTag = getTag$2;
|
|
507
|
-
|
|
508
376
|
/**
|
|
509
|
-
* Checks if `value` is
|
|
510
|
-
* and has a `
|
|
377
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
378
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
379
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
511
380
|
*
|
|
512
381
|
* @static
|
|
513
382
|
* @memberOf _
|
|
514
383
|
* @since 4.0.0
|
|
515
384
|
* @category Lang
|
|
516
385
|
* @param {*} value The value to check.
|
|
517
|
-
* @returns {boolean} Returns `true` if `value` is
|
|
386
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
518
387
|
* @example
|
|
519
388
|
*
|
|
520
|
-
* _.
|
|
389
|
+
* _.isArrayLike([1, 2, 3]);
|
|
521
390
|
* // => true
|
|
522
391
|
*
|
|
523
|
-
* _.
|
|
392
|
+
* _.isArrayLike(document.body.children);
|
|
524
393
|
* // => true
|
|
525
394
|
*
|
|
526
|
-
* _.
|
|
527
|
-
* // =>
|
|
395
|
+
* _.isArrayLike('abc');
|
|
396
|
+
* // => true
|
|
528
397
|
*
|
|
529
|
-
* _.
|
|
398
|
+
* _.isArrayLike(_.noop);
|
|
530
399
|
* // => false
|
|
531
400
|
*/
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
return value != null && typeof value == 'object';
|
|
401
|
+
function isArrayLike(value) {
|
|
402
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
535
403
|
}
|
|
536
404
|
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
var baseGetTag$5 = _baseGetTag$1,
|
|
540
|
-
isObjectLike$5 = isObjectLike_1$1;
|
|
541
|
-
|
|
542
|
-
/** `Object#toString` result references. */
|
|
543
|
-
var argsTag$2 = '[object Arguments]';
|
|
405
|
+
/** Used for built-in method references. */
|
|
406
|
+
var objectProto$3 = Object.prototype;
|
|
544
407
|
|
|
545
408
|
/**
|
|
546
|
-
*
|
|
409
|
+
* Checks if `value` is likely a prototype object.
|
|
547
410
|
*
|
|
548
411
|
* @private
|
|
549
412
|
* @param {*} value The value to check.
|
|
550
|
-
* @returns {boolean} Returns `true` if `value` is
|
|
413
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
551
414
|
*/
|
|
552
|
-
function
|
|
553
|
-
|
|
415
|
+
function isPrototype(value) {
|
|
416
|
+
var Ctor = value && value.constructor,
|
|
417
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
|
|
418
|
+
|
|
419
|
+
return value === proto;
|
|
554
420
|
}
|
|
555
421
|
|
|
556
|
-
|
|
422
|
+
/** `Object#toString` result references. */
|
|
423
|
+
var argsTag$1 = '[object Arguments]';
|
|
557
424
|
|
|
558
|
-
|
|
559
|
-
|
|
425
|
+
/**
|
|
426
|
+
* The base implementation of `_.isArguments`.
|
|
427
|
+
*
|
|
428
|
+
* @private
|
|
429
|
+
* @param {*} value The value to check.
|
|
430
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
431
|
+
*/
|
|
432
|
+
function baseIsArguments(value) {
|
|
433
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$1;
|
|
434
|
+
}
|
|
560
435
|
|
|
561
436
|
/** Used for built-in method references. */
|
|
562
|
-
var objectProto$
|
|
437
|
+
var objectProto$2 = Object.prototype;
|
|
563
438
|
|
|
564
439
|
/** Used to check objects for own properties. */
|
|
565
|
-
var hasOwnProperty$
|
|
440
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
566
441
|
|
|
567
442
|
/** Built-in value references. */
|
|
568
|
-
var propertyIsEnumerable
|
|
443
|
+
var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
|
|
569
444
|
|
|
570
445
|
/**
|
|
571
446
|
* Checks if `value` is likely an `arguments` object.
|
|
@@ -585,113 +460,12 @@ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
|
|
|
585
460
|
* _.isArguments([1, 2, 3]);
|
|
586
461
|
* // => false
|
|
587
462
|
*/
|
|
588
|
-
var isArguments
|
|
589
|
-
return isObjectLike
|
|
590
|
-
!propertyIsEnumerable
|
|
463
|
+
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
464
|
+
return isObjectLike(value) && hasOwnProperty$2.call(value, 'callee') &&
|
|
465
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
591
466
|
};
|
|
592
467
|
|
|
593
|
-
var
|
|
594
|
-
|
|
595
|
-
/**
|
|
596
|
-
* Checks if `value` is classified as an `Array` object.
|
|
597
|
-
*
|
|
598
|
-
* @static
|
|
599
|
-
* @memberOf _
|
|
600
|
-
* @since 0.1.0
|
|
601
|
-
* @category Lang
|
|
602
|
-
* @param {*} value The value to check.
|
|
603
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
604
|
-
* @example
|
|
605
|
-
*
|
|
606
|
-
* _.isArray([1, 2, 3]);
|
|
607
|
-
* // => true
|
|
608
|
-
*
|
|
609
|
-
* _.isArray(document.body.children);
|
|
610
|
-
* // => false
|
|
611
|
-
*
|
|
612
|
-
* _.isArray('abc');
|
|
613
|
-
* // => false
|
|
614
|
-
*
|
|
615
|
-
* _.isArray(_.noop);
|
|
616
|
-
* // => false
|
|
617
|
-
*/
|
|
618
|
-
|
|
619
|
-
var isArray$1 = Array.isArray;
|
|
620
|
-
|
|
621
|
-
var isArray_1 = isArray$1;
|
|
622
|
-
|
|
623
|
-
/** Used as references for various `Number` constants. */
|
|
624
|
-
|
|
625
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* Checks if `value` is a valid array-like length.
|
|
629
|
-
*
|
|
630
|
-
* **Note:** This method is loosely based on
|
|
631
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
632
|
-
*
|
|
633
|
-
* @static
|
|
634
|
-
* @memberOf _
|
|
635
|
-
* @since 4.0.0
|
|
636
|
-
* @category Lang
|
|
637
|
-
* @param {*} value The value to check.
|
|
638
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
639
|
-
* @example
|
|
640
|
-
*
|
|
641
|
-
* _.isLength(3);
|
|
642
|
-
* // => true
|
|
643
|
-
*
|
|
644
|
-
* _.isLength(Number.MIN_VALUE);
|
|
645
|
-
* // => false
|
|
646
|
-
*
|
|
647
|
-
* _.isLength(Infinity);
|
|
648
|
-
* // => false
|
|
649
|
-
*
|
|
650
|
-
* _.isLength('3');
|
|
651
|
-
* // => false
|
|
652
|
-
*/
|
|
653
|
-
function isLength$2(value) {
|
|
654
|
-
return typeof value == 'number' &&
|
|
655
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
var isLength_1 = isLength$2;
|
|
659
|
-
|
|
660
|
-
var isFunction$2 = isFunction_1$1,
|
|
661
|
-
isLength$1 = isLength_1;
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
665
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
666
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
667
|
-
*
|
|
668
|
-
* @static
|
|
669
|
-
* @memberOf _
|
|
670
|
-
* @since 4.0.0
|
|
671
|
-
* @category Lang
|
|
672
|
-
* @param {*} value The value to check.
|
|
673
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
674
|
-
* @example
|
|
675
|
-
*
|
|
676
|
-
* _.isArrayLike([1, 2, 3]);
|
|
677
|
-
* // => true
|
|
678
|
-
*
|
|
679
|
-
* _.isArrayLike(document.body.children);
|
|
680
|
-
* // => true
|
|
681
|
-
*
|
|
682
|
-
* _.isArrayLike('abc');
|
|
683
|
-
* // => true
|
|
684
|
-
*
|
|
685
|
-
* _.isArrayLike(_.noop);
|
|
686
|
-
* // => false
|
|
687
|
-
*/
|
|
688
|
-
function isArrayLike$1(value) {
|
|
689
|
-
return value != null && isLength$1(value.length) && !isFunction$2(value);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
var isArrayLike_1 = isArrayLike$1;
|
|
693
|
-
|
|
694
|
-
var isBuffer$2 = {exports: {}};
|
|
468
|
+
var isArguments$1 = isArguments;
|
|
695
469
|
|
|
696
470
|
/**
|
|
697
471
|
* This method returns `false`.
|
|
@@ -706,28 +480,21 @@ var isBuffer$2 = {exports: {}};
|
|
|
706
480
|
* _.times(2, _.stubFalse);
|
|
707
481
|
* // => [false, false]
|
|
708
482
|
*/
|
|
709
|
-
|
|
710
|
-
function stubFalse$1() {
|
|
483
|
+
function stubFalse() {
|
|
711
484
|
return false;
|
|
712
485
|
}
|
|
713
486
|
|
|
714
|
-
var stubFalse_1$1 = stubFalse$1;
|
|
715
|
-
|
|
716
|
-
(function (module, exports) {
|
|
717
|
-
var root = _root$1,
|
|
718
|
-
stubFalse = stubFalse_1$1;
|
|
719
|
-
|
|
720
487
|
/** Detect free variable `exports`. */
|
|
721
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
488
|
+
var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
722
489
|
|
|
723
490
|
/** Detect free variable `module`. */
|
|
724
|
-
var freeModule = freeExports &&
|
|
491
|
+
var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
|
|
725
492
|
|
|
726
493
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
727
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
494
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
728
495
|
|
|
729
496
|
/** Built-in value references. */
|
|
730
|
-
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
497
|
+
var Buffer = moduleExports$1 ? root$1.Buffer : undefined;
|
|
731
498
|
|
|
732
499
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
733
500
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
@@ -751,20 +518,15 @@ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
|
751
518
|
*/
|
|
752
519
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
753
520
|
|
|
754
|
-
|
|
755
|
-
}(isBuffer$2, isBuffer$2.exports));
|
|
756
|
-
|
|
757
|
-
var baseGetTag$4 = _baseGetTag$1,
|
|
758
|
-
isLength = isLength_1,
|
|
759
|
-
isObjectLike$3 = isObjectLike_1$1;
|
|
521
|
+
var isBuffer$1 = isBuffer;
|
|
760
522
|
|
|
761
523
|
/** `Object#toString` result references. */
|
|
762
|
-
var argsTag
|
|
524
|
+
var argsTag = '[object Arguments]',
|
|
763
525
|
arrayTag = '[object Array]',
|
|
764
526
|
boolTag = '[object Boolean]',
|
|
765
527
|
dateTag = '[object Date]',
|
|
766
528
|
errorTag = '[object Error]',
|
|
767
|
-
funcTag
|
|
529
|
+
funcTag = '[object Function]',
|
|
768
530
|
mapTag$2 = '[object Map]',
|
|
769
531
|
numberTag = '[object Number]',
|
|
770
532
|
objectTag$1 = '[object Object]',
|
|
@@ -792,10 +554,10 @@ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
|
792
554
|
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
793
555
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
794
556
|
typedArrayTags[uint32Tag] = true;
|
|
795
|
-
typedArrayTags[argsTag
|
|
557
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
796
558
|
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
797
559
|
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
|
|
798
|
-
typedArrayTags[errorTag] = typedArrayTags[funcTag
|
|
560
|
+
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
799
561
|
typedArrayTags[mapTag$2] = typedArrayTags[numberTag] =
|
|
800
562
|
typedArrayTags[objectTag$1] = typedArrayTags[regexpTag] =
|
|
801
563
|
typedArrayTags[setTag$2] = typedArrayTags[stringTag] =
|
|
@@ -808,13 +570,11 @@ typedArrayTags[weakMapTag$1] = false;
|
|
|
808
570
|
* @param {*} value The value to check.
|
|
809
571
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
810
572
|
*/
|
|
811
|
-
function baseIsTypedArray
|
|
812
|
-
return isObjectLike
|
|
813
|
-
isLength(value.length) && !!typedArrayTags[baseGetTag
|
|
573
|
+
function baseIsTypedArray(value) {
|
|
574
|
+
return isObjectLike(value) &&
|
|
575
|
+
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
814
576
|
}
|
|
815
577
|
|
|
816
|
-
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
817
|
-
|
|
818
578
|
/**
|
|
819
579
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
820
580
|
*
|
|
@@ -822,31 +582,23 @@ var _baseIsTypedArray = baseIsTypedArray$1;
|
|
|
822
582
|
* @param {Function} func The function to cap arguments for.
|
|
823
583
|
* @returns {Function} Returns the new capped function.
|
|
824
584
|
*/
|
|
825
|
-
|
|
826
|
-
function baseUnary$1(func) {
|
|
585
|
+
function baseUnary(func) {
|
|
827
586
|
return function(value) {
|
|
828
587
|
return func(value);
|
|
829
588
|
};
|
|
830
589
|
}
|
|
831
590
|
|
|
832
|
-
var _baseUnary = baseUnary$1;
|
|
833
|
-
|
|
834
|
-
var _nodeUtil$1 = {exports: {}};
|
|
835
|
-
|
|
836
|
-
(function (module, exports) {
|
|
837
|
-
var freeGlobal = _freeGlobal$1;
|
|
838
|
-
|
|
839
591
|
/** Detect free variable `exports`. */
|
|
840
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
592
|
+
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
|
|
841
593
|
|
|
842
594
|
/** Detect free variable `module`. */
|
|
843
|
-
var freeModule = freeExports &&
|
|
595
|
+
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
844
596
|
|
|
845
597
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
846
598
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
847
599
|
|
|
848
600
|
/** Detect free variable `process` from Node.js. */
|
|
849
|
-
var freeProcess = moduleExports && freeGlobal.process;
|
|
601
|
+
var freeProcess = moduleExports && freeGlobal$1.process;
|
|
850
602
|
|
|
851
603
|
/** Used to access faster Node.js helpers. */
|
|
852
604
|
var nodeUtil = (function() {
|
|
@@ -863,12 +615,7 @@ var nodeUtil = (function() {
|
|
|
863
615
|
} catch (e) {}
|
|
864
616
|
}());
|
|
865
617
|
|
|
866
|
-
|
|
867
|
-
}(_nodeUtil$1, _nodeUtil$1.exports));
|
|
868
|
-
|
|
869
|
-
var baseIsTypedArray = _baseIsTypedArray,
|
|
870
|
-
baseUnary = _baseUnary,
|
|
871
|
-
nodeUtil$1 = _nodeUtil$1.exports;
|
|
618
|
+
var nodeUtil$1 = nodeUtil;
|
|
872
619
|
|
|
873
620
|
/* Node.js helper references. */
|
|
874
621
|
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
@@ -890,28 +637,135 @@ var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
|
890
637
|
* _.isTypedArray([]);
|
|
891
638
|
* // => false
|
|
892
639
|
*/
|
|
893
|
-
var isTypedArray
|
|
640
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
641
|
+
|
|
642
|
+
var isTypedArray$1 = isTypedArray;
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
646
|
+
*
|
|
647
|
+
* @private
|
|
648
|
+
* @param {Function} func The function to wrap.
|
|
649
|
+
* @param {Function} transform The argument transform.
|
|
650
|
+
* @returns {Function} Returns the new function.
|
|
651
|
+
*/
|
|
652
|
+
function overArg(func, transform) {
|
|
653
|
+
return function(arg) {
|
|
654
|
+
return func(transform(arg));
|
|
655
|
+
};
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
659
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
660
|
+
|
|
661
|
+
var nativeKeys$1 = nativeKeys;
|
|
662
|
+
|
|
663
|
+
/** Used for built-in method references. */
|
|
664
|
+
var objectProto$1 = Object.prototype;
|
|
665
|
+
|
|
666
|
+
/** Used to check objects for own properties. */
|
|
667
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
671
|
+
*
|
|
672
|
+
* @private
|
|
673
|
+
* @param {Object} object The object to query.
|
|
674
|
+
* @returns {Array} Returns the array of property names.
|
|
675
|
+
*/
|
|
676
|
+
function baseKeys(object) {
|
|
677
|
+
if (!isPrototype(object)) {
|
|
678
|
+
return nativeKeys$1(object);
|
|
679
|
+
}
|
|
680
|
+
var result = [];
|
|
681
|
+
for (var key in Object(object)) {
|
|
682
|
+
if (hasOwnProperty$1.call(object, key) && key != 'constructor') {
|
|
683
|
+
result.push(key);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
return result;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
/* Built-in method references that are verified to be native. */
|
|
690
|
+
var Map = getNative(root$1, 'Map');
|
|
691
|
+
|
|
692
|
+
var Map$1 = Map;
|
|
693
|
+
|
|
694
|
+
/* Built-in method references that are verified to be native. */
|
|
695
|
+
var DataView = getNative(root$1, 'DataView');
|
|
696
|
+
|
|
697
|
+
var DataView$1 = DataView;
|
|
698
|
+
|
|
699
|
+
/* Built-in method references that are verified to be native. */
|
|
700
|
+
var Promise$1 = getNative(root$1, 'Promise');
|
|
701
|
+
|
|
702
|
+
var Promise$2 = Promise$1;
|
|
894
703
|
|
|
895
|
-
|
|
704
|
+
/* Built-in method references that are verified to be native. */
|
|
705
|
+
var Set = getNative(root$1, 'Set');
|
|
896
706
|
|
|
897
|
-
var
|
|
898
|
-
getTag$1 = _getTag,
|
|
899
|
-
isArguments = isArguments_1,
|
|
900
|
-
isArray = isArray_1,
|
|
901
|
-
isArrayLike = isArrayLike_1,
|
|
902
|
-
isBuffer$1 = isBuffer$2.exports,
|
|
903
|
-
isPrototype = _isPrototype,
|
|
904
|
-
isTypedArray = isTypedArray_1;
|
|
707
|
+
var Set$1 = Set;
|
|
905
708
|
|
|
906
709
|
/** `Object#toString` result references. */
|
|
907
710
|
var mapTag$1 = '[object Map]',
|
|
908
|
-
|
|
711
|
+
objectTag = '[object Object]',
|
|
712
|
+
promiseTag = '[object Promise]',
|
|
713
|
+
setTag$1 = '[object Set]',
|
|
714
|
+
weakMapTag = '[object WeakMap]';
|
|
715
|
+
|
|
716
|
+
var dataViewTag = '[object DataView]';
|
|
717
|
+
|
|
718
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
719
|
+
var dataViewCtorString = toSource(DataView$1),
|
|
720
|
+
mapCtorString = toSource(Map$1),
|
|
721
|
+
promiseCtorString = toSource(Promise$2),
|
|
722
|
+
setCtorString = toSource(Set$1),
|
|
723
|
+
weakMapCtorString = toSource(WeakMap$1);
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Gets the `toStringTag` of `value`.
|
|
727
|
+
*
|
|
728
|
+
* @private
|
|
729
|
+
* @param {*} value The value to query.
|
|
730
|
+
* @returns {string} Returns the `toStringTag`.
|
|
731
|
+
*/
|
|
732
|
+
var getTag = baseGetTag;
|
|
733
|
+
|
|
734
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
735
|
+
if ((DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag) ||
|
|
736
|
+
(Map$1 && getTag(new Map$1) != mapTag$1) ||
|
|
737
|
+
(Promise$2 && getTag(Promise$2.resolve()) != promiseTag) ||
|
|
738
|
+
(Set$1 && getTag(new Set$1) != setTag$1) ||
|
|
739
|
+
(WeakMap$1 && getTag(new WeakMap$1) != weakMapTag)) {
|
|
740
|
+
getTag = function(value) {
|
|
741
|
+
var result = baseGetTag(value),
|
|
742
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
|
743
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
|
744
|
+
|
|
745
|
+
if (ctorString) {
|
|
746
|
+
switch (ctorString) {
|
|
747
|
+
case dataViewCtorString: return dataViewTag;
|
|
748
|
+
case mapCtorString: return mapTag$1;
|
|
749
|
+
case promiseCtorString: return promiseTag;
|
|
750
|
+
case setCtorString: return setTag$1;
|
|
751
|
+
case weakMapCtorString: return weakMapTag;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
return result;
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
var getTag$1 = getTag;
|
|
759
|
+
|
|
760
|
+
/** `Object#toString` result references. */
|
|
761
|
+
var mapTag = '[object Map]',
|
|
762
|
+
setTag = '[object Set]';
|
|
909
763
|
|
|
910
764
|
/** Used for built-in method references. */
|
|
911
|
-
var objectProto
|
|
765
|
+
var objectProto = Object.prototype;
|
|
912
766
|
|
|
913
767
|
/** Used to check objects for own properties. */
|
|
914
|
-
var hasOwnProperty
|
|
768
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
915
769
|
|
|
916
770
|
/**
|
|
917
771
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
@@ -951,27 +805,25 @@ function isEmpty(value) {
|
|
|
951
805
|
return true;
|
|
952
806
|
}
|
|
953
807
|
if (isArrayLike(value) &&
|
|
954
|
-
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
955
|
-
isBuffer$1(value) || isTypedArray(value) || isArguments(value))) {
|
|
808
|
+
(isArray$1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
809
|
+
isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
|
|
956
810
|
return !value.length;
|
|
957
811
|
}
|
|
958
812
|
var tag = getTag$1(value);
|
|
959
|
-
if (tag == mapTag
|
|
813
|
+
if (tag == mapTag || tag == setTag) {
|
|
960
814
|
return !value.size;
|
|
961
815
|
}
|
|
962
816
|
if (isPrototype(value)) {
|
|
963
817
|
return !baseKeys(value).length;
|
|
964
818
|
}
|
|
965
819
|
for (var key in value) {
|
|
966
|
-
if (hasOwnProperty
|
|
820
|
+
if (hasOwnProperty.call(value, key)) {
|
|
967
821
|
return false;
|
|
968
822
|
}
|
|
969
823
|
}
|
|
970
824
|
return true;
|
|
971
825
|
}
|
|
972
826
|
|
|
973
|
-
var isEmpty_1 = isEmpty;
|
|
974
|
-
|
|
975
827
|
const defaults$1 = {
|
|
976
828
|
correct: { type: 'default', default: 'Correct', custom: 'Correct' },
|
|
977
829
|
incorrect: { type: 'default', default: 'Incorrect', custom: 'Incorrect' },
|
|
@@ -1054,1285 +906,6 @@ const enabled = (config, env, defaultValue) => {
|
|
|
1054
906
|
return typeof defaultValue === 'boolean' ? defaultValue : true;
|
|
1055
907
|
};
|
|
1056
908
|
|
|
1057
|
-
/** Detect free variable `global` from Node.js. */
|
|
1058
|
-
|
|
1059
|
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1060
|
-
|
|
1061
|
-
var _freeGlobal = freeGlobal$1;
|
|
1062
|
-
|
|
1063
|
-
var freeGlobal = _freeGlobal;
|
|
1064
|
-
|
|
1065
|
-
/** Detect free variable `self`. */
|
|
1066
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1067
|
-
|
|
1068
|
-
/** Used as a reference to the global object. */
|
|
1069
|
-
var root$7 = freeGlobal || freeSelf || Function('return this')();
|
|
1070
|
-
|
|
1071
|
-
var _root = root$7;
|
|
1072
|
-
|
|
1073
|
-
var root$6 = _root;
|
|
1074
|
-
|
|
1075
|
-
/** Built-in value references. */
|
|
1076
|
-
var Symbol$3 = root$6.Symbol;
|
|
1077
|
-
|
|
1078
|
-
var _Symbol = Symbol$3;
|
|
1079
|
-
|
|
1080
|
-
var Symbol$2 = _Symbol;
|
|
1081
|
-
|
|
1082
|
-
/** Used for built-in method references. */
|
|
1083
|
-
var objectProto$5 = Object.prototype;
|
|
1084
|
-
|
|
1085
|
-
/** Used to check objects for own properties. */
|
|
1086
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1087
|
-
|
|
1088
|
-
/**
|
|
1089
|
-
* Used to resolve the
|
|
1090
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1091
|
-
* of values.
|
|
1092
|
-
*/
|
|
1093
|
-
var nativeObjectToString$1 = objectProto$5.toString;
|
|
1094
|
-
|
|
1095
|
-
/** Built-in value references. */
|
|
1096
|
-
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
1097
|
-
|
|
1098
|
-
/**
|
|
1099
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
1100
|
-
*
|
|
1101
|
-
* @private
|
|
1102
|
-
* @param {*} value The value to query.
|
|
1103
|
-
* @returns {string} Returns the raw `toStringTag`.
|
|
1104
|
-
*/
|
|
1105
|
-
function getRawTag$1(value) {
|
|
1106
|
-
var isOwn = hasOwnProperty$4.call(value, symToStringTag$1),
|
|
1107
|
-
tag = value[symToStringTag$1];
|
|
1108
|
-
|
|
1109
|
-
try {
|
|
1110
|
-
value[symToStringTag$1] = undefined;
|
|
1111
|
-
var unmasked = true;
|
|
1112
|
-
} catch (e) {}
|
|
1113
|
-
|
|
1114
|
-
var result = nativeObjectToString$1.call(value);
|
|
1115
|
-
if (unmasked) {
|
|
1116
|
-
if (isOwn) {
|
|
1117
|
-
value[symToStringTag$1] = tag;
|
|
1118
|
-
} else {
|
|
1119
|
-
delete value[symToStringTag$1];
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
return result;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
var _getRawTag = getRawTag$1;
|
|
1126
|
-
|
|
1127
|
-
/** Used for built-in method references. */
|
|
1128
|
-
|
|
1129
|
-
var objectProto$4 = Object.prototype;
|
|
1130
|
-
|
|
1131
|
-
/**
|
|
1132
|
-
* Used to resolve the
|
|
1133
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1134
|
-
* of values.
|
|
1135
|
-
*/
|
|
1136
|
-
var nativeObjectToString = objectProto$4.toString;
|
|
1137
|
-
|
|
1138
|
-
/**
|
|
1139
|
-
* Converts `value` to a string using `Object.prototype.toString`.
|
|
1140
|
-
*
|
|
1141
|
-
* @private
|
|
1142
|
-
* @param {*} value The value to convert.
|
|
1143
|
-
* @returns {string} Returns the converted string.
|
|
1144
|
-
*/
|
|
1145
|
-
function objectToString$1(value) {
|
|
1146
|
-
return nativeObjectToString.call(value);
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
var _objectToString = objectToString$1;
|
|
1150
|
-
|
|
1151
|
-
var Symbol$1 = _Symbol,
|
|
1152
|
-
getRawTag = _getRawTag,
|
|
1153
|
-
objectToString = _objectToString;
|
|
1154
|
-
|
|
1155
|
-
/** `Object#toString` result references. */
|
|
1156
|
-
var nullTag = '[object Null]',
|
|
1157
|
-
undefinedTag = '[object Undefined]';
|
|
1158
|
-
|
|
1159
|
-
/** Built-in value references. */
|
|
1160
|
-
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
1164
|
-
*
|
|
1165
|
-
* @private
|
|
1166
|
-
* @param {*} value The value to query.
|
|
1167
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1168
|
-
*/
|
|
1169
|
-
function baseGetTag$3(value) {
|
|
1170
|
-
if (value == null) {
|
|
1171
|
-
return value === undefined ? undefinedTag : nullTag;
|
|
1172
|
-
}
|
|
1173
|
-
return (symToStringTag && symToStringTag in Object(value))
|
|
1174
|
-
? getRawTag(value)
|
|
1175
|
-
: objectToString(value);
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
var _baseGetTag = baseGetTag$3;
|
|
1179
|
-
|
|
1180
|
-
/**
|
|
1181
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1182
|
-
* and has a `typeof` result of "object".
|
|
1183
|
-
*
|
|
1184
|
-
* @static
|
|
1185
|
-
* @memberOf _
|
|
1186
|
-
* @since 4.0.0
|
|
1187
|
-
* @category Lang
|
|
1188
|
-
* @param {*} value The value to check.
|
|
1189
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1190
|
-
* @example
|
|
1191
|
-
*
|
|
1192
|
-
* _.isObjectLike({});
|
|
1193
|
-
* // => true
|
|
1194
|
-
*
|
|
1195
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1196
|
-
* // => true
|
|
1197
|
-
*
|
|
1198
|
-
* _.isObjectLike(_.noop);
|
|
1199
|
-
* // => false
|
|
1200
|
-
*
|
|
1201
|
-
* _.isObjectLike(null);
|
|
1202
|
-
* // => false
|
|
1203
|
-
*/
|
|
1204
|
-
|
|
1205
|
-
function isObjectLike$2(value) {
|
|
1206
|
-
return value != null && typeof value == 'object';
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
var isObjectLike_1 = isObjectLike$2;
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* Checks if `value` is the
|
|
1213
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1214
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1215
|
-
*
|
|
1216
|
-
* @static
|
|
1217
|
-
* @memberOf _
|
|
1218
|
-
* @since 0.1.0
|
|
1219
|
-
* @category Lang
|
|
1220
|
-
* @param {*} value The value to check.
|
|
1221
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1222
|
-
* @example
|
|
1223
|
-
*
|
|
1224
|
-
* _.isObject({});
|
|
1225
|
-
* // => true
|
|
1226
|
-
*
|
|
1227
|
-
* _.isObject([1, 2, 3]);
|
|
1228
|
-
* // => true
|
|
1229
|
-
*
|
|
1230
|
-
* _.isObject(_.noop);
|
|
1231
|
-
* // => true
|
|
1232
|
-
*
|
|
1233
|
-
* _.isObject(null);
|
|
1234
|
-
* // => false
|
|
1235
|
-
*/
|
|
1236
|
-
|
|
1237
|
-
function isObject$2(value) {
|
|
1238
|
-
var type = typeof value;
|
|
1239
|
-
return value != null && (type == 'object' || type == 'function');
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
var isObject_1 = isObject$2;
|
|
1243
|
-
|
|
1244
|
-
var baseGetTag$2 = _baseGetTag,
|
|
1245
|
-
isObject$1 = isObject_1;
|
|
1246
|
-
|
|
1247
|
-
/** `Object#toString` result references. */
|
|
1248
|
-
var asyncTag = '[object AsyncFunction]',
|
|
1249
|
-
funcTag = '[object Function]',
|
|
1250
|
-
genTag = '[object GeneratorFunction]',
|
|
1251
|
-
proxyTag = '[object Proxy]';
|
|
1252
|
-
|
|
1253
|
-
/**
|
|
1254
|
-
* Checks if `value` is classified as a `Function` object.
|
|
1255
|
-
*
|
|
1256
|
-
* @static
|
|
1257
|
-
* @memberOf _
|
|
1258
|
-
* @since 0.1.0
|
|
1259
|
-
* @category Lang
|
|
1260
|
-
* @param {*} value The value to check.
|
|
1261
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1262
|
-
* @example
|
|
1263
|
-
*
|
|
1264
|
-
* _.isFunction(_);
|
|
1265
|
-
* // => true
|
|
1266
|
-
*
|
|
1267
|
-
* _.isFunction(/abc/);
|
|
1268
|
-
* // => false
|
|
1269
|
-
*/
|
|
1270
|
-
function isFunction$1(value) {
|
|
1271
|
-
if (!isObject$1(value)) {
|
|
1272
|
-
return false;
|
|
1273
|
-
}
|
|
1274
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1275
|
-
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
1276
|
-
var tag = baseGetTag$2(value);
|
|
1277
|
-
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
var isFunction_1 = isFunction$1;
|
|
1281
|
-
|
|
1282
|
-
var root$5 = _root;
|
|
1283
|
-
|
|
1284
|
-
/** Used to detect overreaching core-js shims. */
|
|
1285
|
-
var coreJsData$1 = root$5['__core-js_shared__'];
|
|
1286
|
-
|
|
1287
|
-
var _coreJsData = coreJsData$1;
|
|
1288
|
-
|
|
1289
|
-
var coreJsData = _coreJsData;
|
|
1290
|
-
|
|
1291
|
-
/** Used to detect methods masquerading as native. */
|
|
1292
|
-
var maskSrcKey = (function() {
|
|
1293
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
1294
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1295
|
-
}());
|
|
1296
|
-
|
|
1297
|
-
/**
|
|
1298
|
-
* Checks if `func` has its source masked.
|
|
1299
|
-
*
|
|
1300
|
-
* @private
|
|
1301
|
-
* @param {Function} func The function to check.
|
|
1302
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1303
|
-
*/
|
|
1304
|
-
function isMasked$1(func) {
|
|
1305
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
var _isMasked = isMasked$1;
|
|
1309
|
-
|
|
1310
|
-
/** Used for built-in method references. */
|
|
1311
|
-
|
|
1312
|
-
var funcProto$1 = Function.prototype;
|
|
1313
|
-
|
|
1314
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1315
|
-
var funcToString$1 = funcProto$1.toString;
|
|
1316
|
-
|
|
1317
|
-
/**
|
|
1318
|
-
* Converts `func` to its source code.
|
|
1319
|
-
*
|
|
1320
|
-
* @private
|
|
1321
|
-
* @param {Function} func The function to convert.
|
|
1322
|
-
* @returns {string} Returns the source code.
|
|
1323
|
-
*/
|
|
1324
|
-
function toSource$2(func) {
|
|
1325
|
-
if (func != null) {
|
|
1326
|
-
try {
|
|
1327
|
-
return funcToString$1.call(func);
|
|
1328
|
-
} catch (e) {}
|
|
1329
|
-
try {
|
|
1330
|
-
return (func + '');
|
|
1331
|
-
} catch (e) {}
|
|
1332
|
-
}
|
|
1333
|
-
return '';
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
var _toSource = toSource$2;
|
|
1337
|
-
|
|
1338
|
-
var isFunction = isFunction_1,
|
|
1339
|
-
isMasked = _isMasked,
|
|
1340
|
-
isObject = isObject_1,
|
|
1341
|
-
toSource$1 = _toSource;
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* Used to match `RegExp`
|
|
1345
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1346
|
-
*/
|
|
1347
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1348
|
-
|
|
1349
|
-
/** Used to detect host constructors (Safari). */
|
|
1350
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1351
|
-
|
|
1352
|
-
/** Used for built-in method references. */
|
|
1353
|
-
var funcProto = Function.prototype,
|
|
1354
|
-
objectProto$3 = Object.prototype;
|
|
1355
|
-
|
|
1356
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1357
|
-
var funcToString = funcProto.toString;
|
|
1358
|
-
|
|
1359
|
-
/** Used to check objects for own properties. */
|
|
1360
|
-
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
1361
|
-
|
|
1362
|
-
/** Used to detect if a method is native. */
|
|
1363
|
-
var reIsNative = RegExp('^' +
|
|
1364
|
-
funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&')
|
|
1365
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1366
|
-
);
|
|
1367
|
-
|
|
1368
|
-
/**
|
|
1369
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1370
|
-
*
|
|
1371
|
-
* @private
|
|
1372
|
-
* @param {*} value The value to check.
|
|
1373
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1374
|
-
* else `false`.
|
|
1375
|
-
*/
|
|
1376
|
-
function baseIsNative$1(value) {
|
|
1377
|
-
if (!isObject(value) || isMasked(value)) {
|
|
1378
|
-
return false;
|
|
1379
|
-
}
|
|
1380
|
-
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
1381
|
-
return pattern.test(toSource$1(value));
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
var _baseIsNative = baseIsNative$1;
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* Gets the value at `key` of `object`.
|
|
1388
|
-
*
|
|
1389
|
-
* @private
|
|
1390
|
-
* @param {Object} [object] The object to query.
|
|
1391
|
-
* @param {string} key The key of the property to get.
|
|
1392
|
-
* @returns {*} Returns the property value.
|
|
1393
|
-
*/
|
|
1394
|
-
|
|
1395
|
-
function getValue$1(object, key) {
|
|
1396
|
-
return object == null ? undefined : object[key];
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
var _getValue = getValue$1;
|
|
1400
|
-
|
|
1401
|
-
var baseIsNative = _baseIsNative,
|
|
1402
|
-
getValue = _getValue;
|
|
1403
|
-
|
|
1404
|
-
/**
|
|
1405
|
-
* Gets the native function at `key` of `object`.
|
|
1406
|
-
*
|
|
1407
|
-
* @private
|
|
1408
|
-
* @param {Object} object The object to query.
|
|
1409
|
-
* @param {string} key The key of the method to get.
|
|
1410
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1411
|
-
*/
|
|
1412
|
-
function getNative$6(object, key) {
|
|
1413
|
-
var value = getValue(object, key);
|
|
1414
|
-
return baseIsNative(value) ? value : undefined;
|
|
1415
|
-
}
|
|
1416
|
-
|
|
1417
|
-
var _getNative = getNative$6;
|
|
1418
|
-
|
|
1419
|
-
var getNative$5 = _getNative;
|
|
1420
|
-
|
|
1421
|
-
/* Built-in method references that are verified to be native. */
|
|
1422
|
-
var nativeCreate$4 = getNative$5(Object, 'create');
|
|
1423
|
-
|
|
1424
|
-
var _nativeCreate = nativeCreate$4;
|
|
1425
|
-
|
|
1426
|
-
var nativeCreate$3 = _nativeCreate;
|
|
1427
|
-
|
|
1428
|
-
/**
|
|
1429
|
-
* Removes all key-value entries from the hash.
|
|
1430
|
-
*
|
|
1431
|
-
* @private
|
|
1432
|
-
* @name clear
|
|
1433
|
-
* @memberOf Hash
|
|
1434
|
-
*/
|
|
1435
|
-
function hashClear$1() {
|
|
1436
|
-
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
1437
|
-
this.size = 0;
|
|
1438
|
-
}
|
|
1439
|
-
|
|
1440
|
-
var _hashClear = hashClear$1;
|
|
1441
|
-
|
|
1442
|
-
/**
|
|
1443
|
-
* Removes `key` and its value from the hash.
|
|
1444
|
-
*
|
|
1445
|
-
* @private
|
|
1446
|
-
* @name delete
|
|
1447
|
-
* @memberOf Hash
|
|
1448
|
-
* @param {Object} hash The hash to modify.
|
|
1449
|
-
* @param {string} key The key of the value to remove.
|
|
1450
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1451
|
-
*/
|
|
1452
|
-
|
|
1453
|
-
function hashDelete$1(key) {
|
|
1454
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
1455
|
-
this.size -= result ? 1 : 0;
|
|
1456
|
-
return result;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
var _hashDelete = hashDelete$1;
|
|
1460
|
-
|
|
1461
|
-
var nativeCreate$2 = _nativeCreate;
|
|
1462
|
-
|
|
1463
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1464
|
-
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
1465
|
-
|
|
1466
|
-
/** Used for built-in method references. */
|
|
1467
|
-
var objectProto$2 = Object.prototype;
|
|
1468
|
-
|
|
1469
|
-
/** Used to check objects for own properties. */
|
|
1470
|
-
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1471
|
-
|
|
1472
|
-
/**
|
|
1473
|
-
* Gets the hash value for `key`.
|
|
1474
|
-
*
|
|
1475
|
-
* @private
|
|
1476
|
-
* @name get
|
|
1477
|
-
* @memberOf Hash
|
|
1478
|
-
* @param {string} key The key of the value to get.
|
|
1479
|
-
* @returns {*} Returns the entry value.
|
|
1480
|
-
*/
|
|
1481
|
-
function hashGet$1(key) {
|
|
1482
|
-
var data = this.__data__;
|
|
1483
|
-
if (nativeCreate$2) {
|
|
1484
|
-
var result = data[key];
|
|
1485
|
-
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
1486
|
-
}
|
|
1487
|
-
return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
var _hashGet = hashGet$1;
|
|
1491
|
-
|
|
1492
|
-
var nativeCreate$1 = _nativeCreate;
|
|
1493
|
-
|
|
1494
|
-
/** Used for built-in method references. */
|
|
1495
|
-
var objectProto$1 = Object.prototype;
|
|
1496
|
-
|
|
1497
|
-
/** Used to check objects for own properties. */
|
|
1498
|
-
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1499
|
-
|
|
1500
|
-
/**
|
|
1501
|
-
* Checks if a hash value for `key` exists.
|
|
1502
|
-
*
|
|
1503
|
-
* @private
|
|
1504
|
-
* @name has
|
|
1505
|
-
* @memberOf Hash
|
|
1506
|
-
* @param {string} key The key of the entry to check.
|
|
1507
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1508
|
-
*/
|
|
1509
|
-
function hashHas$1(key) {
|
|
1510
|
-
var data = this.__data__;
|
|
1511
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
var _hashHas = hashHas$1;
|
|
1515
|
-
|
|
1516
|
-
var nativeCreate = _nativeCreate;
|
|
1517
|
-
|
|
1518
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
1519
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
1520
|
-
|
|
1521
|
-
/**
|
|
1522
|
-
* Sets the hash `key` to `value`.
|
|
1523
|
-
*
|
|
1524
|
-
* @private
|
|
1525
|
-
* @name set
|
|
1526
|
-
* @memberOf Hash
|
|
1527
|
-
* @param {string} key The key of the value to set.
|
|
1528
|
-
* @param {*} value The value to set.
|
|
1529
|
-
* @returns {Object} Returns the hash instance.
|
|
1530
|
-
*/
|
|
1531
|
-
function hashSet$1(key, value) {
|
|
1532
|
-
var data = this.__data__;
|
|
1533
|
-
this.size += this.has(key) ? 0 : 1;
|
|
1534
|
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
1535
|
-
return this;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
var _hashSet = hashSet$1;
|
|
1539
|
-
|
|
1540
|
-
var hashClear = _hashClear,
|
|
1541
|
-
hashDelete = _hashDelete,
|
|
1542
|
-
hashGet = _hashGet,
|
|
1543
|
-
hashHas = _hashHas,
|
|
1544
|
-
hashSet = _hashSet;
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* Creates a hash object.
|
|
1548
|
-
*
|
|
1549
|
-
* @private
|
|
1550
|
-
* @constructor
|
|
1551
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1552
|
-
*/
|
|
1553
|
-
function Hash$1(entries) {
|
|
1554
|
-
var index = -1,
|
|
1555
|
-
length = entries == null ? 0 : entries.length;
|
|
1556
|
-
|
|
1557
|
-
this.clear();
|
|
1558
|
-
while (++index < length) {
|
|
1559
|
-
var entry = entries[index];
|
|
1560
|
-
this.set(entry[0], entry[1]);
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
// Add methods to `Hash`.
|
|
1565
|
-
Hash$1.prototype.clear = hashClear;
|
|
1566
|
-
Hash$1.prototype['delete'] = hashDelete;
|
|
1567
|
-
Hash$1.prototype.get = hashGet;
|
|
1568
|
-
Hash$1.prototype.has = hashHas;
|
|
1569
|
-
Hash$1.prototype.set = hashSet;
|
|
1570
|
-
|
|
1571
|
-
var _Hash = Hash$1;
|
|
1572
|
-
|
|
1573
|
-
/**
|
|
1574
|
-
* Removes all key-value entries from the list cache.
|
|
1575
|
-
*
|
|
1576
|
-
* @private
|
|
1577
|
-
* @name clear
|
|
1578
|
-
* @memberOf ListCache
|
|
1579
|
-
*/
|
|
1580
|
-
|
|
1581
|
-
function listCacheClear$1() {
|
|
1582
|
-
this.__data__ = [];
|
|
1583
|
-
this.size = 0;
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
var _listCacheClear = listCacheClear$1;
|
|
1587
|
-
|
|
1588
|
-
/**
|
|
1589
|
-
* Performs a
|
|
1590
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1591
|
-
* comparison between two values to determine if they are equivalent.
|
|
1592
|
-
*
|
|
1593
|
-
* @static
|
|
1594
|
-
* @memberOf _
|
|
1595
|
-
* @since 4.0.0
|
|
1596
|
-
* @category Lang
|
|
1597
|
-
* @param {*} value The value to compare.
|
|
1598
|
-
* @param {*} other The other value to compare.
|
|
1599
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1600
|
-
* @example
|
|
1601
|
-
*
|
|
1602
|
-
* var object = { 'a': 1 };
|
|
1603
|
-
* var other = { 'a': 1 };
|
|
1604
|
-
*
|
|
1605
|
-
* _.eq(object, object);
|
|
1606
|
-
* // => true
|
|
1607
|
-
*
|
|
1608
|
-
* _.eq(object, other);
|
|
1609
|
-
* // => false
|
|
1610
|
-
*
|
|
1611
|
-
* _.eq('a', 'a');
|
|
1612
|
-
* // => true
|
|
1613
|
-
*
|
|
1614
|
-
* _.eq('a', Object('a'));
|
|
1615
|
-
* // => false
|
|
1616
|
-
*
|
|
1617
|
-
* _.eq(NaN, NaN);
|
|
1618
|
-
* // => true
|
|
1619
|
-
*/
|
|
1620
|
-
|
|
1621
|
-
function eq$1(value, other) {
|
|
1622
|
-
return value === other || (value !== value && other !== other);
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
var eq_1 = eq$1;
|
|
1626
|
-
|
|
1627
|
-
var eq = eq_1;
|
|
1628
|
-
|
|
1629
|
-
/**
|
|
1630
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1631
|
-
*
|
|
1632
|
-
* @private
|
|
1633
|
-
* @param {Array} array The array to inspect.
|
|
1634
|
-
* @param {*} key The key to search for.
|
|
1635
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1636
|
-
*/
|
|
1637
|
-
function assocIndexOf$4(array, key) {
|
|
1638
|
-
var length = array.length;
|
|
1639
|
-
while (length--) {
|
|
1640
|
-
if (eq(array[length][0], key)) {
|
|
1641
|
-
return length;
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
|
-
return -1;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
var _assocIndexOf = assocIndexOf$4;
|
|
1648
|
-
|
|
1649
|
-
var assocIndexOf$3 = _assocIndexOf;
|
|
1650
|
-
|
|
1651
|
-
/** Used for built-in method references. */
|
|
1652
|
-
var arrayProto = Array.prototype;
|
|
1653
|
-
|
|
1654
|
-
/** Built-in value references. */
|
|
1655
|
-
var splice = arrayProto.splice;
|
|
1656
|
-
|
|
1657
|
-
/**
|
|
1658
|
-
* Removes `key` and its value from the list cache.
|
|
1659
|
-
*
|
|
1660
|
-
* @private
|
|
1661
|
-
* @name delete
|
|
1662
|
-
* @memberOf ListCache
|
|
1663
|
-
* @param {string} key The key of the value to remove.
|
|
1664
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1665
|
-
*/
|
|
1666
|
-
function listCacheDelete$1(key) {
|
|
1667
|
-
var data = this.__data__,
|
|
1668
|
-
index = assocIndexOf$3(data, key);
|
|
1669
|
-
|
|
1670
|
-
if (index < 0) {
|
|
1671
|
-
return false;
|
|
1672
|
-
}
|
|
1673
|
-
var lastIndex = data.length - 1;
|
|
1674
|
-
if (index == lastIndex) {
|
|
1675
|
-
data.pop();
|
|
1676
|
-
} else {
|
|
1677
|
-
splice.call(data, index, 1);
|
|
1678
|
-
}
|
|
1679
|
-
--this.size;
|
|
1680
|
-
return true;
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
var _listCacheDelete = listCacheDelete$1;
|
|
1684
|
-
|
|
1685
|
-
var assocIndexOf$2 = _assocIndexOf;
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Gets the list cache value for `key`.
|
|
1689
|
-
*
|
|
1690
|
-
* @private
|
|
1691
|
-
* @name get
|
|
1692
|
-
* @memberOf ListCache
|
|
1693
|
-
* @param {string} key The key of the value to get.
|
|
1694
|
-
* @returns {*} Returns the entry value.
|
|
1695
|
-
*/
|
|
1696
|
-
function listCacheGet$1(key) {
|
|
1697
|
-
var data = this.__data__,
|
|
1698
|
-
index = assocIndexOf$2(data, key);
|
|
1699
|
-
|
|
1700
|
-
return index < 0 ? undefined : data[index][1];
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
var _listCacheGet = listCacheGet$1;
|
|
1704
|
-
|
|
1705
|
-
var assocIndexOf$1 = _assocIndexOf;
|
|
1706
|
-
|
|
1707
|
-
/**
|
|
1708
|
-
* Checks if a list cache value for `key` exists.
|
|
1709
|
-
*
|
|
1710
|
-
* @private
|
|
1711
|
-
* @name has
|
|
1712
|
-
* @memberOf ListCache
|
|
1713
|
-
* @param {string} key The key of the entry to check.
|
|
1714
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1715
|
-
*/
|
|
1716
|
-
function listCacheHas$1(key) {
|
|
1717
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
var _listCacheHas = listCacheHas$1;
|
|
1721
|
-
|
|
1722
|
-
var assocIndexOf = _assocIndexOf;
|
|
1723
|
-
|
|
1724
|
-
/**
|
|
1725
|
-
* Sets the list cache `key` to `value`.
|
|
1726
|
-
*
|
|
1727
|
-
* @private
|
|
1728
|
-
* @name set
|
|
1729
|
-
* @memberOf ListCache
|
|
1730
|
-
* @param {string} key The key of the value to set.
|
|
1731
|
-
* @param {*} value The value to set.
|
|
1732
|
-
* @returns {Object} Returns the list cache instance.
|
|
1733
|
-
*/
|
|
1734
|
-
function listCacheSet$1(key, value) {
|
|
1735
|
-
var data = this.__data__,
|
|
1736
|
-
index = assocIndexOf(data, key);
|
|
1737
|
-
|
|
1738
|
-
if (index < 0) {
|
|
1739
|
-
++this.size;
|
|
1740
|
-
data.push([key, value]);
|
|
1741
|
-
} else {
|
|
1742
|
-
data[index][1] = value;
|
|
1743
|
-
}
|
|
1744
|
-
return this;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
var _listCacheSet = listCacheSet$1;
|
|
1748
|
-
|
|
1749
|
-
var listCacheClear = _listCacheClear,
|
|
1750
|
-
listCacheDelete = _listCacheDelete,
|
|
1751
|
-
listCacheGet = _listCacheGet,
|
|
1752
|
-
listCacheHas = _listCacheHas,
|
|
1753
|
-
listCacheSet = _listCacheSet;
|
|
1754
|
-
|
|
1755
|
-
/**
|
|
1756
|
-
* Creates an list cache object.
|
|
1757
|
-
*
|
|
1758
|
-
* @private
|
|
1759
|
-
* @constructor
|
|
1760
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1761
|
-
*/
|
|
1762
|
-
function ListCache$1(entries) {
|
|
1763
|
-
var index = -1,
|
|
1764
|
-
length = entries == null ? 0 : entries.length;
|
|
1765
|
-
|
|
1766
|
-
this.clear();
|
|
1767
|
-
while (++index < length) {
|
|
1768
|
-
var entry = entries[index];
|
|
1769
|
-
this.set(entry[0], entry[1]);
|
|
1770
|
-
}
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
// Add methods to `ListCache`.
|
|
1774
|
-
ListCache$1.prototype.clear = listCacheClear;
|
|
1775
|
-
ListCache$1.prototype['delete'] = listCacheDelete;
|
|
1776
|
-
ListCache$1.prototype.get = listCacheGet;
|
|
1777
|
-
ListCache$1.prototype.has = listCacheHas;
|
|
1778
|
-
ListCache$1.prototype.set = listCacheSet;
|
|
1779
|
-
|
|
1780
|
-
var _ListCache = ListCache$1;
|
|
1781
|
-
|
|
1782
|
-
var getNative$4 = _getNative,
|
|
1783
|
-
root$4 = _root;
|
|
1784
|
-
|
|
1785
|
-
/* Built-in method references that are verified to be native. */
|
|
1786
|
-
var Map$2 = getNative$4(root$4, 'Map');
|
|
1787
|
-
|
|
1788
|
-
var _Map = Map$2;
|
|
1789
|
-
|
|
1790
|
-
var Hash = _Hash,
|
|
1791
|
-
ListCache = _ListCache,
|
|
1792
|
-
Map$1 = _Map;
|
|
1793
|
-
|
|
1794
|
-
/**
|
|
1795
|
-
* Removes all key-value entries from the map.
|
|
1796
|
-
*
|
|
1797
|
-
* @private
|
|
1798
|
-
* @name clear
|
|
1799
|
-
* @memberOf MapCache
|
|
1800
|
-
*/
|
|
1801
|
-
function mapCacheClear$1() {
|
|
1802
|
-
this.size = 0;
|
|
1803
|
-
this.__data__ = {
|
|
1804
|
-
'hash': new Hash,
|
|
1805
|
-
'map': new (Map$1 || ListCache),
|
|
1806
|
-
'string': new Hash
|
|
1807
|
-
};
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
var _mapCacheClear = mapCacheClear$1;
|
|
1811
|
-
|
|
1812
|
-
/**
|
|
1813
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
1814
|
-
*
|
|
1815
|
-
* @private
|
|
1816
|
-
* @param {*} value The value to check.
|
|
1817
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1818
|
-
*/
|
|
1819
|
-
|
|
1820
|
-
function isKeyable$1(value) {
|
|
1821
|
-
var type = typeof value;
|
|
1822
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
1823
|
-
? (value !== '__proto__')
|
|
1824
|
-
: (value === null);
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
var _isKeyable = isKeyable$1;
|
|
1828
|
-
|
|
1829
|
-
var isKeyable = _isKeyable;
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* Gets the data for `map`.
|
|
1833
|
-
*
|
|
1834
|
-
* @private
|
|
1835
|
-
* @param {Object} map The map to query.
|
|
1836
|
-
* @param {string} key The reference key.
|
|
1837
|
-
* @returns {*} Returns the map data.
|
|
1838
|
-
*/
|
|
1839
|
-
function getMapData$4(map, key) {
|
|
1840
|
-
var data = map.__data__;
|
|
1841
|
-
return isKeyable(key)
|
|
1842
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
1843
|
-
: data.map;
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
var _getMapData = getMapData$4;
|
|
1847
|
-
|
|
1848
|
-
var getMapData$3 = _getMapData;
|
|
1849
|
-
|
|
1850
|
-
/**
|
|
1851
|
-
* Removes `key` and its value from the map.
|
|
1852
|
-
*
|
|
1853
|
-
* @private
|
|
1854
|
-
* @name delete
|
|
1855
|
-
* @memberOf MapCache
|
|
1856
|
-
* @param {string} key The key of the value to remove.
|
|
1857
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1858
|
-
*/
|
|
1859
|
-
function mapCacheDelete$1(key) {
|
|
1860
|
-
var result = getMapData$3(this, key)['delete'](key);
|
|
1861
|
-
this.size -= result ? 1 : 0;
|
|
1862
|
-
return result;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
1866
|
-
|
|
1867
|
-
var getMapData$2 = _getMapData;
|
|
1868
|
-
|
|
1869
|
-
/**
|
|
1870
|
-
* Gets the map value for `key`.
|
|
1871
|
-
*
|
|
1872
|
-
* @private
|
|
1873
|
-
* @name get
|
|
1874
|
-
* @memberOf MapCache
|
|
1875
|
-
* @param {string} key The key of the value to get.
|
|
1876
|
-
* @returns {*} Returns the entry value.
|
|
1877
|
-
*/
|
|
1878
|
-
function mapCacheGet$1(key) {
|
|
1879
|
-
return getMapData$2(this, key).get(key);
|
|
1880
|
-
}
|
|
1881
|
-
|
|
1882
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
1883
|
-
|
|
1884
|
-
var getMapData$1 = _getMapData;
|
|
1885
|
-
|
|
1886
|
-
/**
|
|
1887
|
-
* Checks if a map value for `key` exists.
|
|
1888
|
-
*
|
|
1889
|
-
* @private
|
|
1890
|
-
* @name has
|
|
1891
|
-
* @memberOf MapCache
|
|
1892
|
-
* @param {string} key The key of the entry to check.
|
|
1893
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1894
|
-
*/
|
|
1895
|
-
function mapCacheHas$1(key) {
|
|
1896
|
-
return getMapData$1(this, key).has(key);
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
1900
|
-
|
|
1901
|
-
var getMapData = _getMapData;
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
* Sets the map `key` to `value`.
|
|
1905
|
-
*
|
|
1906
|
-
* @private
|
|
1907
|
-
* @name set
|
|
1908
|
-
* @memberOf MapCache
|
|
1909
|
-
* @param {string} key The key of the value to set.
|
|
1910
|
-
* @param {*} value The value to set.
|
|
1911
|
-
* @returns {Object} Returns the map cache instance.
|
|
1912
|
-
*/
|
|
1913
|
-
function mapCacheSet$1(key, value) {
|
|
1914
|
-
var data = getMapData(this, key),
|
|
1915
|
-
size = data.size;
|
|
1916
|
-
|
|
1917
|
-
data.set(key, value);
|
|
1918
|
-
this.size += data.size == size ? 0 : 1;
|
|
1919
|
-
return this;
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
var _mapCacheSet = mapCacheSet$1;
|
|
1923
|
-
|
|
1924
|
-
var mapCacheClear = _mapCacheClear,
|
|
1925
|
-
mapCacheDelete = _mapCacheDelete,
|
|
1926
|
-
mapCacheGet = _mapCacheGet,
|
|
1927
|
-
mapCacheHas = _mapCacheHas,
|
|
1928
|
-
mapCacheSet = _mapCacheSet;
|
|
1929
|
-
|
|
1930
|
-
/**
|
|
1931
|
-
* Creates a map cache object to store key-value pairs.
|
|
1932
|
-
*
|
|
1933
|
-
* @private
|
|
1934
|
-
* @constructor
|
|
1935
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1936
|
-
*/
|
|
1937
|
-
function MapCache$1(entries) {
|
|
1938
|
-
var index = -1,
|
|
1939
|
-
length = entries == null ? 0 : entries.length;
|
|
1940
|
-
|
|
1941
|
-
this.clear();
|
|
1942
|
-
while (++index < length) {
|
|
1943
|
-
var entry = entries[index];
|
|
1944
|
-
this.set(entry[0], entry[1]);
|
|
1945
|
-
}
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
// Add methods to `MapCache`.
|
|
1949
|
-
MapCache$1.prototype.clear = mapCacheClear;
|
|
1950
|
-
MapCache$1.prototype['delete'] = mapCacheDelete;
|
|
1951
|
-
MapCache$1.prototype.get = mapCacheGet;
|
|
1952
|
-
MapCache$1.prototype.has = mapCacheHas;
|
|
1953
|
-
MapCache$1.prototype.set = mapCacheSet;
|
|
1954
|
-
|
|
1955
|
-
var _MapCache = MapCache$1;
|
|
1956
|
-
|
|
1957
|
-
var MapCache = _MapCache;
|
|
1958
|
-
|
|
1959
|
-
/** Error message constants. */
|
|
1960
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
1961
|
-
|
|
1962
|
-
/**
|
|
1963
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
1964
|
-
* provided, it determines the cache key for storing the result based on the
|
|
1965
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
1966
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
1967
|
-
* is invoked with the `this` binding of the memoized function.
|
|
1968
|
-
*
|
|
1969
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
1970
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
1971
|
-
* constructor with one whose instances implement the
|
|
1972
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
1973
|
-
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
1974
|
-
*
|
|
1975
|
-
* @static
|
|
1976
|
-
* @memberOf _
|
|
1977
|
-
* @since 0.1.0
|
|
1978
|
-
* @category Function
|
|
1979
|
-
* @param {Function} func The function to have its output memoized.
|
|
1980
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
1981
|
-
* @returns {Function} Returns the new memoized function.
|
|
1982
|
-
* @example
|
|
1983
|
-
*
|
|
1984
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
1985
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
1986
|
-
*
|
|
1987
|
-
* var values = _.memoize(_.values);
|
|
1988
|
-
* values(object);
|
|
1989
|
-
* // => [1, 2]
|
|
1990
|
-
*
|
|
1991
|
-
* values(other);
|
|
1992
|
-
* // => [3, 4]
|
|
1993
|
-
*
|
|
1994
|
-
* object.a = 2;
|
|
1995
|
-
* values(object);
|
|
1996
|
-
* // => [1, 2]
|
|
1997
|
-
*
|
|
1998
|
-
* // Modify the result cache.
|
|
1999
|
-
* values.cache.set(object, ['a', 'b']);
|
|
2000
|
-
* values(object);
|
|
2001
|
-
* // => ['a', 'b']
|
|
2002
|
-
*
|
|
2003
|
-
* // Replace `_.memoize.Cache`.
|
|
2004
|
-
* _.memoize.Cache = WeakMap;
|
|
2005
|
-
*/
|
|
2006
|
-
function memoize$1(func, resolver) {
|
|
2007
|
-
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
2008
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2009
|
-
}
|
|
2010
|
-
var memoized = function() {
|
|
2011
|
-
var args = arguments,
|
|
2012
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
2013
|
-
cache = memoized.cache;
|
|
2014
|
-
|
|
2015
|
-
if (cache.has(key)) {
|
|
2016
|
-
return cache.get(key);
|
|
2017
|
-
}
|
|
2018
|
-
var result = func.apply(this, args);
|
|
2019
|
-
memoized.cache = cache.set(key, result) || cache;
|
|
2020
|
-
return result;
|
|
2021
|
-
};
|
|
2022
|
-
memoized.cache = new (memoize$1.Cache || MapCache);
|
|
2023
|
-
return memoized;
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
// Expose `MapCache`.
|
|
2027
|
-
memoize$1.Cache = MapCache;
|
|
2028
|
-
|
|
2029
|
-
var memoize_1 = memoize$1;
|
|
2030
|
-
|
|
2031
|
-
var memoize = memoize_1;
|
|
2032
|
-
|
|
2033
|
-
/** Used as the maximum memoize cache size. */
|
|
2034
|
-
var MAX_MEMOIZE_SIZE = 500;
|
|
2035
|
-
|
|
2036
|
-
/**
|
|
2037
|
-
* A specialized version of `_.memoize` which clears the memoized function's
|
|
2038
|
-
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
2039
|
-
*
|
|
2040
|
-
* @private
|
|
2041
|
-
* @param {Function} func The function to have its output memoized.
|
|
2042
|
-
* @returns {Function} Returns the new memoized function.
|
|
2043
|
-
*/
|
|
2044
|
-
function memoizeCapped$1(func) {
|
|
2045
|
-
var result = memoize(func, function(key) {
|
|
2046
|
-
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
2047
|
-
cache.clear();
|
|
2048
|
-
}
|
|
2049
|
-
return key;
|
|
2050
|
-
});
|
|
2051
|
-
|
|
2052
|
-
var cache = result.cache;
|
|
2053
|
-
return result;
|
|
2054
|
-
}
|
|
2055
|
-
|
|
2056
|
-
var _memoizeCapped = memoizeCapped$1;
|
|
2057
|
-
|
|
2058
|
-
var memoizeCapped = _memoizeCapped;
|
|
2059
|
-
|
|
2060
|
-
/** Used to match property names within property paths. */
|
|
2061
|
-
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
2062
|
-
|
|
2063
|
-
/** Used to match backslashes in property paths. */
|
|
2064
|
-
var reEscapeChar = /\\(\\)?/g;
|
|
2065
|
-
|
|
2066
|
-
/**
|
|
2067
|
-
* Converts `string` to a property path array.
|
|
2068
|
-
*
|
|
2069
|
-
* @private
|
|
2070
|
-
* @param {string} string The string to convert.
|
|
2071
|
-
* @returns {Array} Returns the property path array.
|
|
2072
|
-
*/
|
|
2073
|
-
memoizeCapped(function(string) {
|
|
2074
|
-
var result = [];
|
|
2075
|
-
if (string.charCodeAt(0) === 46 /* . */) {
|
|
2076
|
-
result.push('');
|
|
2077
|
-
}
|
|
2078
|
-
string.replace(rePropName, function(match, number, quote, subString) {
|
|
2079
|
-
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
2080
|
-
});
|
|
2081
|
-
return result;
|
|
2082
|
-
});
|
|
2083
|
-
|
|
2084
|
-
var Symbol = _Symbol;
|
|
2085
|
-
|
|
2086
|
-
/** Used to convert symbols to primitives and strings. */
|
|
2087
|
-
var symbolProto = Symbol ? Symbol.prototype : undefined;
|
|
2088
|
-
symbolProto ? symbolProto.toString : undefined;
|
|
2089
|
-
|
|
2090
|
-
var baseGetTag$1 = _baseGetTag,
|
|
2091
|
-
isObjectLike$1 = isObjectLike_1;
|
|
2092
|
-
|
|
2093
|
-
/** `Object#toString` result references. */
|
|
2094
|
-
var argsTag = '[object Arguments]';
|
|
2095
|
-
|
|
2096
|
-
/**
|
|
2097
|
-
* The base implementation of `_.isArguments`.
|
|
2098
|
-
*
|
|
2099
|
-
* @private
|
|
2100
|
-
* @param {*} value The value to check.
|
|
2101
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2102
|
-
*/
|
|
2103
|
-
function baseIsArguments$1(value) {
|
|
2104
|
-
return isObjectLike$1(value) && baseGetTag$1(value) == argsTag;
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
var _baseIsArguments = baseIsArguments$1;
|
|
2108
|
-
|
|
2109
|
-
var baseIsArguments = _baseIsArguments,
|
|
2110
|
-
isObjectLike = isObjectLike_1;
|
|
2111
|
-
|
|
2112
|
-
/** Used for built-in method references. */
|
|
2113
|
-
var objectProto = Object.prototype;
|
|
2114
|
-
|
|
2115
|
-
/** Used to check objects for own properties. */
|
|
2116
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2117
|
-
|
|
2118
|
-
/** Built-in value references. */
|
|
2119
|
-
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
2120
|
-
|
|
2121
|
-
/**
|
|
2122
|
-
* Checks if `value` is likely an `arguments` object.
|
|
2123
|
-
*
|
|
2124
|
-
* @static
|
|
2125
|
-
* @memberOf _
|
|
2126
|
-
* @since 0.1.0
|
|
2127
|
-
* @category Lang
|
|
2128
|
-
* @param {*} value The value to check.
|
|
2129
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2130
|
-
* else `false`.
|
|
2131
|
-
* @example
|
|
2132
|
-
*
|
|
2133
|
-
* _.isArguments(function() { return arguments; }());
|
|
2134
|
-
* // => true
|
|
2135
|
-
*
|
|
2136
|
-
* _.isArguments([1, 2, 3]);
|
|
2137
|
-
* // => false
|
|
2138
|
-
*/
|
|
2139
|
-
baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
2140
|
-
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
2141
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
2142
|
-
};
|
|
2143
|
-
|
|
2144
|
-
var isBuffer = {exports: {}};
|
|
2145
|
-
|
|
2146
|
-
/**
|
|
2147
|
-
* This method returns `false`.
|
|
2148
|
-
*
|
|
2149
|
-
* @static
|
|
2150
|
-
* @memberOf _
|
|
2151
|
-
* @since 4.13.0
|
|
2152
|
-
* @category Util
|
|
2153
|
-
* @returns {boolean} Returns `false`.
|
|
2154
|
-
* @example
|
|
2155
|
-
*
|
|
2156
|
-
* _.times(2, _.stubFalse);
|
|
2157
|
-
* // => [false, false]
|
|
2158
|
-
*/
|
|
2159
|
-
|
|
2160
|
-
function stubFalse() {
|
|
2161
|
-
return false;
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
var stubFalse_1 = stubFalse;
|
|
2165
|
-
|
|
2166
|
-
(function (module, exports) {
|
|
2167
|
-
var root = _root,
|
|
2168
|
-
stubFalse = stubFalse_1;
|
|
2169
|
-
|
|
2170
|
-
/** Detect free variable `exports`. */
|
|
2171
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
2172
|
-
|
|
2173
|
-
/** Detect free variable `module`. */
|
|
2174
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2175
|
-
|
|
2176
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
2177
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2178
|
-
|
|
2179
|
-
/** Built-in value references. */
|
|
2180
|
-
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
2181
|
-
|
|
2182
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
2183
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
* Checks if `value` is a buffer.
|
|
2187
|
-
*
|
|
2188
|
-
* @static
|
|
2189
|
-
* @memberOf _
|
|
2190
|
-
* @since 4.3.0
|
|
2191
|
-
* @category Lang
|
|
2192
|
-
* @param {*} value The value to check.
|
|
2193
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
2194
|
-
* @example
|
|
2195
|
-
*
|
|
2196
|
-
* _.isBuffer(new Buffer(2));
|
|
2197
|
-
* // => true
|
|
2198
|
-
*
|
|
2199
|
-
* _.isBuffer(new Uint8Array(2));
|
|
2200
|
-
* // => false
|
|
2201
|
-
*/
|
|
2202
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
2203
|
-
|
|
2204
|
-
module.exports = isBuffer;
|
|
2205
|
-
}(isBuffer, isBuffer.exports));
|
|
2206
|
-
|
|
2207
|
-
var _nodeUtil = {exports: {}};
|
|
2208
|
-
|
|
2209
|
-
(function (module, exports) {
|
|
2210
|
-
var freeGlobal = _freeGlobal;
|
|
2211
|
-
|
|
2212
|
-
/** Detect free variable `exports`. */
|
|
2213
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
2214
|
-
|
|
2215
|
-
/** Detect free variable `module`. */
|
|
2216
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2217
|
-
|
|
2218
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
2219
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2220
|
-
|
|
2221
|
-
/** Detect free variable `process` from Node.js. */
|
|
2222
|
-
var freeProcess = moduleExports && freeGlobal.process;
|
|
2223
|
-
|
|
2224
|
-
/** Used to access faster Node.js helpers. */
|
|
2225
|
-
var nodeUtil = (function() {
|
|
2226
|
-
try {
|
|
2227
|
-
// Use `util.types` for Node.js 10+.
|
|
2228
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
2229
|
-
|
|
2230
|
-
if (types) {
|
|
2231
|
-
return types;
|
|
2232
|
-
}
|
|
2233
|
-
|
|
2234
|
-
// Legacy `process.binding('util')` for Node.js < 10.
|
|
2235
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
2236
|
-
} catch (e) {}
|
|
2237
|
-
}());
|
|
2238
|
-
|
|
2239
|
-
module.exports = nodeUtil;
|
|
2240
|
-
}(_nodeUtil, _nodeUtil.exports));
|
|
2241
|
-
|
|
2242
|
-
var nodeUtil = _nodeUtil.exports;
|
|
2243
|
-
|
|
2244
|
-
/* Node.js helper references. */
|
|
2245
|
-
nodeUtil && nodeUtil.isTypedArray;
|
|
2246
|
-
|
|
2247
|
-
var getNative$3 = _getNative,
|
|
2248
|
-
root$3 = _root;
|
|
2249
|
-
|
|
2250
|
-
/* Built-in method references that are verified to be native. */
|
|
2251
|
-
var DataView$1 = getNative$3(root$3, 'DataView');
|
|
2252
|
-
|
|
2253
|
-
var _DataView = DataView$1;
|
|
2254
|
-
|
|
2255
|
-
var getNative$2 = _getNative,
|
|
2256
|
-
root$2 = _root;
|
|
2257
|
-
|
|
2258
|
-
/* Built-in method references that are verified to be native. */
|
|
2259
|
-
var Promise$2 = getNative$2(root$2, 'Promise');
|
|
2260
|
-
|
|
2261
|
-
var _Promise = Promise$2;
|
|
2262
|
-
|
|
2263
|
-
var getNative$1 = _getNative,
|
|
2264
|
-
root$1 = _root;
|
|
2265
|
-
|
|
2266
|
-
/* Built-in method references that are verified to be native. */
|
|
2267
|
-
var Set$1 = getNative$1(root$1, 'Set');
|
|
2268
|
-
|
|
2269
|
-
var _Set = Set$1;
|
|
2270
|
-
|
|
2271
|
-
var getNative = _getNative,
|
|
2272
|
-
root = _root;
|
|
2273
|
-
|
|
2274
|
-
/* Built-in method references that are verified to be native. */
|
|
2275
|
-
var WeakMap$1 = getNative(root, 'WeakMap');
|
|
2276
|
-
|
|
2277
|
-
var _WeakMap = WeakMap$1;
|
|
2278
|
-
|
|
2279
|
-
var DataView = _DataView,
|
|
2280
|
-
Map = _Map,
|
|
2281
|
-
Promise$1 = _Promise,
|
|
2282
|
-
Set = _Set,
|
|
2283
|
-
WeakMap = _WeakMap,
|
|
2284
|
-
baseGetTag = _baseGetTag,
|
|
2285
|
-
toSource = _toSource;
|
|
2286
|
-
|
|
2287
|
-
/** `Object#toString` result references. */
|
|
2288
|
-
var mapTag = '[object Map]',
|
|
2289
|
-
objectTag = '[object Object]',
|
|
2290
|
-
promiseTag = '[object Promise]',
|
|
2291
|
-
setTag = '[object Set]',
|
|
2292
|
-
weakMapTag = '[object WeakMap]';
|
|
2293
|
-
|
|
2294
|
-
var dataViewTag = '[object DataView]';
|
|
2295
|
-
|
|
2296
|
-
/** Used to detect maps, sets, and weakmaps. */
|
|
2297
|
-
var dataViewCtorString = toSource(DataView),
|
|
2298
|
-
mapCtorString = toSource(Map),
|
|
2299
|
-
promiseCtorString = toSource(Promise$1),
|
|
2300
|
-
setCtorString = toSource(Set),
|
|
2301
|
-
weakMapCtorString = toSource(WeakMap);
|
|
2302
|
-
|
|
2303
|
-
/**
|
|
2304
|
-
* Gets the `toStringTag` of `value`.
|
|
2305
|
-
*
|
|
2306
|
-
* @private
|
|
2307
|
-
* @param {*} value The value to query.
|
|
2308
|
-
* @returns {string} Returns the `toStringTag`.
|
|
2309
|
-
*/
|
|
2310
|
-
var getTag = baseGetTag;
|
|
2311
|
-
|
|
2312
|
-
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
2313
|
-
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
2314
|
-
(Map && getTag(new Map) != mapTag) ||
|
|
2315
|
-
(Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
|
|
2316
|
-
(Set && getTag(new Set) != setTag) ||
|
|
2317
|
-
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
2318
|
-
getTag = function(value) {
|
|
2319
|
-
var result = baseGetTag(value),
|
|
2320
|
-
Ctor = result == objectTag ? value.constructor : undefined,
|
|
2321
|
-
ctorString = Ctor ? toSource(Ctor) : '';
|
|
2322
|
-
|
|
2323
|
-
if (ctorString) {
|
|
2324
|
-
switch (ctorString) {
|
|
2325
|
-
case dataViewCtorString: return dataViewTag;
|
|
2326
|
-
case mapCtorString: return mapTag;
|
|
2327
|
-
case promiseCtorString: return promiseTag;
|
|
2328
|
-
case setCtorString: return setTag;
|
|
2329
|
-
case weakMapCtorString: return weakMapTag;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
return result;
|
|
2333
|
-
};
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
909
|
// eslint-disable-next-line no-console
|
|
2337
910
|
const lg = (n) => console[n].bind(console, 'controller-utils:');
|
|
2338
911
|
lg('debug');
|
|
@@ -2405,7 +978,7 @@ const getCorrectSelected = (tokens, selected) =>
|
|
|
2405
978
|
(selected || []).filter((s) => tokens.findIndex((token) => token.correct && equalTokens(token, s)) !== -1);
|
|
2406
979
|
|
|
2407
980
|
const getPartialScore = (question, session, totalCorrect) => {
|
|
2408
|
-
if (!session ||
|
|
981
|
+
if (!session || isEmpty(session)) {
|
|
2409
982
|
return 0;
|
|
2410
983
|
}
|
|
2411
984
|
|
|
@@ -2421,7 +994,7 @@ const getPartialScore = (question, session, totalCorrect) => {
|
|
|
2421
994
|
|
|
2422
995
|
const outcome = (question, session, env) =>
|
|
2423
996
|
new Promise((resolve) => {
|
|
2424
|
-
if (!session ||
|
|
997
|
+
if (!session || isEmpty(session)) {
|
|
2425
998
|
resolve({ score: 0, empty: true });
|
|
2426
999
|
}
|
|
2427
1000
|
|